sendToken

Creates an unsigned vrc10 token transfer transaction,equivalent to sendAsset.

Usage

visionWeb.transactionBuilder.sendToken(to, amount, tokenId, from, options);

Parameters

ParameterDescriptionTypeDefault
toAddress to send token to.string-
amountAmount of Token to send.number0
tokenIdToken id.string|number-
fromOptional address that is transferring the Tokens.stringDefault account address
optionsDescriptions are below.object-

options parameters

ParameterDescriptionTypeDefault
permissionIdThe permission Id,optional, for multi-signature use.number-

Returns

Object

Example

visionWeb.transactionBuilder.sendToken("4653cd48c2723cb985679f4e44d99c64d22d89f41d",1000,"1000001");
> {
  visible: false,
  txID: '0ba97f68c86b68ada9a3c15e58336f9f220252f6f90b5abf93290c9d3ec57948',
  raw_data: {
    contract: [ [Object] ],
    ref_block_bytes: '4940',
    ref_block_hash: '560c5c46ec1f0fdf',
    expiration: 1608468924000,
    timestamp: 1608468866616
  },
  raw_data_hex: '0a0249402208560c5c46ec1f0fdf40e08ce081e82e5a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a154653cd48c2723cb985679f4e44d99c64d22d89f41d1215462d7a77f8bef6fe225bf5e353dd6a380f588a1496180a70b8ccdc81e82e'
}