getPublicStates
Midnight.js API Reference v2.0.2
Midnight.js API Reference / @midnight-ntwrk/midnight-js-contracts / getPublicStates
Function: getPublicStates()
getPublicStates(
publicDataProvider,contractAddress):Promise<PublicContractStates>
Fetches only the public visible (Zswap and ledger) states of a contract.
Parameters​
publicDataProvider​
The provider to use to fetch the public states (Zswap and ledger) from the blockchain.
contractAddress​
string
The ledger address of the contract.
Returns​
Promise<PublicContractStates>