Interface

TransactionData

TransactionData

Properties:
Name Type Description
assetType string

Asset hex string which is a combination of token address / id

retryAttempt number

The number of attempted retries

quantum number

The quantum number for token to calculate the quantized amount (Default is 10^10)

expirationTimestamp number

Expiration timestamp for transaction

tokenType TokenType

Type of token (ERC20 / MINTABLE_ERC20 / ERC721 / MINTABLE_ERC721 / ETH)

partnerRefId string

Partner reference ID (Partner ID, Project ID of Partner) to identify who made request

transactionType string

Type of transaction (Transfer/Deposit/Withdraw)

requestId string

Unique request ID to keep track and re-query the status of the transaction

signature SplitSignature

The ECDSA signature which is {r, s}

tokenAddress string

Address of the token

assetId string

Asset hex string which is a combination of token address / id

tokenId string

Token ID if the transaction is an NFT

tokenSymbol string

Symbol of the token (USDT, ETH, BNB, MYR)

transactionCategory string

The category of the transaction which is a combination of request#nonce

environment string

The environment of Myria system (dev/staging/preprod/prod)

groupRequestId string

The group request ID in case of transaction batches

receiverVaultId number

The vault ID of the receiver

vaultId number

The vault ID of the sender

transactionStatus TransactionStatus

The status of transaction (PREPARE / VALIDATING / PENDING / SUCCESS / COMPLETED)

createdAt number

The time of creation of the transaction

transactionId number

The unique ID of the transaction

quantizedAmount string

The quantized amount of the token which is a calculated amount on Myria system

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

The name of the token in transaction

updatedAt number

The last updatedAt time for transaction

nonce number

The unique integer nonce to identify the unique transaction

receiverPublicKey string

The stark public key of the receiver

starkKey string

The sender stark key

description string

The description of the transaction

trackingStatuses Array.<string>

The life cycle status of the transaction (prepare/pending/success/completed)

senderWalletAddress string

Wallet address of sender

receiverWalletAddress string

Wallet address of sender

View Source types/TransactionTypes.ts, line 308

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 })),
    );
  }