Create an unsigned transaction to create token exchange between vrc10 and vrc10.
Usage
visionWeb.transactionBuilder.createTokenExchange(
firstTokenName,
firstTokenBalance,
secondTokenName,
secondTokenBalance
ownerAddress,
options
);
Parameters
Parameter | Description | Type | Default |
---|---|---|---|
firstTokenName | First vrc10 token name. | string | - |
firstTokenBalance | First vrc10 token balance. | number | - |
secondTokenName | Second vrc10 token name. | string | - |
secondTokenBalance | Second vrc10 token balance. | number | - |
ownerAddress | Owner account address. | string | Default account address |
options | Descriptions are below. | object | - |
options parameters
Parameter | Description | Type | Default |
---|---|---|---|
permissionId | The permission Id,optional, for multi-signature use. | number | - |
Returns
Object
Example
visionWeb.transactionBuilder.createTokenExchange("1000001",1000,"1000002",1000);
> {
visible: false,
txID: '0f6a4552273dc22dd07332034cd529382a2a3d47eadc0c4b22c181f8b96e9c36',
raw_data: {
contract: [ [Object] ],
ref_block_bytes: '50a8',
ref_block_hash: 'aa1cbccf14841e87',
expiration: 1608561360000,
timestamp: 1608561304113
},
raw_data_hex: '0a0250a82208aa1cbccf14841e874080f9e9ade82e5a68082912640a33747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e45786368616e6765437265617465436f6e7472616374122d0a1541401a8da8a7fc86f0087f8c62e630d10df10a963b120731303030303031180a220731303030303034280a70b1c4e6ade82e'
}