createTokenExchange

Create an unsigned transaction to create token exchange between vrc10 and vrc10.

Usage

visionWeb.transactionBuilder.createTokenExchange(
  firstTokenName,
  firstTokenBalance,
  secondTokenName,
  secondTokenBalance
  ownerAddress,
  options
);

Parameters

ParameterDescriptionTypeDefault
firstTokenNameFirst vrc10 token name.string-
firstTokenBalanceFirst vrc10 token balance.number-
secondTokenNameSecond vrc10 token name.string-
secondTokenBalanceSecond vrc10 token balance.number-
ownerAddressOwner account address.stringDefault account address
optionsDescriptions are below.object-

options parameters

ParameterDescriptionTypeDefault
permissionIdThe 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'
}