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