getBalanceByHolder(contract, holder, partition)

Feature
get balance information of given partition for certain holder

Parameters

string contract address, string holder address, string partition

data of SuccessResponse

object partition balance information for certain holder

example

const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const partition = "EFGH";
const holder = "0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca";

// Note: an asynchrous request
const getBalanceByHolder = async () => {
    const info = await mitum.sto.getBalanceByHolder(contractAddress, holder, partition);
    console.log(info.data);
};
getBalanceByHolder();

//output
{
    "_hint": "mitum-currency-hal-v0.0.1",
    "_embedded": {
        "amount": "30000"
    },
    "_links": {
        "self": {
            "href": "/sto/0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca/holder/0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca/partition/EFGH/balance"
        }
    }
}

Last updated