Interface

BulkTransferItemResponse

BulkTransferItemResponse

Properties:
Name Type Description
senderWalletAddress number

Wallet address of sender

receiverWalletAddress string

Wallet address of receiver

senderVaultId number

Vault ID of sender

senderPublicKey string

Public stark key of sender

receiverVaultId number

Vault ID of receiver

receiverPublicKey string

Public stark key of receiver

token string

Token hex string to be transferred

quantizedAmount string

Quantized amount for transferred token (calculated amount based Myria system rule)

  • quantizedAmount = (amount * 10^18) / 10^10 (weiAmount/quantum)
  • amount = quantizedAmount * 10^10 / 10^18
tokenId string

Token ID for the asset (if asset is NFTs)

nonce number

The nonce to identify the unique transactions

expirationTimestamp number

Timestamp expiration for the transactions

signature SplitSignature

Stark's signature

View Source types/TransactionTypes.ts, line 60

Example

Sample function convert to readable amount with Web3 lib

  function convertQuantizedAmountToNormalAmount(amount: string): string {
    const QUANTUM = 10000000000;
    if (!amount || Number(amount) === 0) {
      return '0';
    }
    const amountQuantum = Number(amount) * Number(QUANTUM);
    return Web3.utils.fromWei(
      String(amountQuantum.toLocaleString('fullwide', { useGrouping: false })),
    );
  }