Skip to main content

assertIsContractAddress

For the complete documentation index, see llms.txt

Midnight.js API Reference v4.0.4


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

Function: assertIsContractAddress()

assertIsContractAddress(contractAddress): asserts contractAddress is string

Internal

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.