Skip to main content

@midnight-ntwrk/midnight-js-contracts v0.1.15 • API


Midnight.js API Reference v0.1.15 / @midnight-ntwrk/midnight-js-contracts / utils / assertIsContractAddress

Function: assertIsContractAddress()

Internal

assertIsContractAddress(contractAddress): asserts contractAddress is string

Asserts that a string represents a hex-encoded contract address.

Parameters

contractAddress: string

The source string.

Returns

asserts contractAddress is string

Throws

TypeError contractAddress is not a correctly formatted ContractAddress.