fetchContractMapEntry
Usage
import { fetchContractMapEntry, Cl } from '@stacks/transactions';
const value = await fetchContractMapEntry({
contractAddress: 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM',
contractName: 'my-contract',
mapName: 'balances',
mapKey: Cl.standardPrincipal('ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5'),
network: 'testnet',
});
console.log(value); // ClarityValue — e.g. SomeCV wrapping a UIntCV, or NoneCVNotes
Signature
Returns
Parameters
opts.contractAddress (required)
opts.contractName (required)
opts.mapName (required)
opts.mapKey (required)
opts.network (optional)
opts.client (optional)
Last updated
Was this helpful?