Create an unsigned transaction to create token exchange between vs and vrc10.
Usage
visionWeb.transactionBuilder.createVSExchange(
tokenName,
tokenBalance,
vsBalance,
ownerAddress,
options
);
Parameters
Parameter | Description | Type | Default |
---|---|---|---|
tokenName | The vrc10 token name. | string | - |
tokenBalance | The vrc10 token balance . | number | - |
vsBalance | The vs 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.createVSExchange("1000001",1000,1000);
> {
visible: false,
txID: '1ab501e2a6f2c1ee0c91fbbedccb57f4bc0bb9a7033875b3167be12b21c4339d',
raw_data: {
contract: [ [Object] ],
ref_block_bytes: '4fc6',
ref_block_hash: '3c293e431c022227',
expiration: 1608560670000,
timestamp: 1608560611032
},
raw_data_hex: '0a024fc622083c293e431c02222740b0eabfade82e5a64082912600a33747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e45786368616e6765437265617465436f6e747261637412290a1541401a8da8a7fc86f0087f8c62e630d10df10a963b12073130303030303118e80722015f28e80770d89dbcade82e'
}