Javascript Node SDK - Representing a "concordium-std::collections::BTreeMap" as JSON

Hi all, I’m trying to use the Node SDK to update a cis2-multi nft contract instance on testnet. However, I’m unsure how to represent a BTreeMap as JSON.

for some more context, here is the parameter I’m trying to represent:

pub struct MintParams {
    /// Owner of the newly minted tokens.
    owner: Address,
    /// A collection of tokens to mint.
    tokens: collections::BTreeMap<ContractTokenId, ContractTokenAmount>,
}

Any help would be greatly appreciated. Thanks!

The tokens would be a list of key-value pairs, so something like

tokens: [("00", "10"), ("01", "1232456")]
1 Like