Balances
Tutorial: Using the TypeScript SDK for Balance Operations
const userBalance = BalanceArray.From([{
"amount": 5n, // example amount using the BigInt type
"tokenIds": [{ start: 1n, end: 5n }],
"ownershipTimes": [{ start: 1628770800000n, end: 1628857200000n }] // example timestamps using BigInt
}])const balanceToAdd = {
amount: 3n,
tokenIds: [{ start: 6n, end: 8n }],
ownershipTimes: [{ start: 1628860800000n, end: 1628947200000n }],
};
userBalance.addBalances([balanceToAdd]);Tutorial: Retrieving Balances Based on Token ID and Time
Last updated