Properties:
Name | Type | Attributes | Description |
---|---|---|---|
senderWalletAddress |
string
|
Wallet address of sender |
|
senderPublicKey |
string
|
Public stark key of sender |
|
receiverPublicKey |
string
|
Public stark key of receiver |
|
tokenAddress |
string
|
Smart contract address of ERC-20 token |
|
groupRequestId |
string
|
<optional> |
Unique group request ID for the transaction |
partnerRefId |
string
|
<optional> |
Unique partner group request ID. Should be Project ID in Myria system |
quantizedAmount |
string
|
Quantized amount for transferred token (calculated amount based Myria system rule)
|
Example
function convertAmountToQuantizedAmount(amount: number | string): number {
const wei = convertNormalAmountToWei(String(amount));
const QUANTUM = '10000000000'; // 10^10
return BigNumber.from(wei).div(BigNumber.from(QUANTUM)).toNumber();
}
function convertNormalAmountToWei(amount: string): string {
return ethers.utils.parseEther(String(amount)).toString();
}