withdrawExchangeTokens

Create an unsigned transaction to withdraw tokens from an exchange pair based on Bancor protocol.

Usage

visionWeb.transactionBuilder.withdrawExchangeTokens(
  exchangeId,
  tokenId,
  tokenAmount,
  ownerAddress,
  options
);

Parameters

ParameterDescriptionTypeDefault
exchangeIdnon-negative integer exchange id.number-
tokenIdToken Id of the token withdraw.string-
tokenAmountThe number of the token withdraw.number0
ownerAddressThe address of the creator of the exchange pair.stringDefault account address
optionsDescriptions are below.object-

options parameters

ParameterDescriptionTypeDefault
permissionIdPermission id for multi-signature use.number-

Returns

Object.

Example

visionWeb.transactionBuilder.withdrawExchangeTokens(1,"1000003",100);
> {
  visible: false,
  txID: '0635bb80799f3cc2a73ee6dabd81a68df404c9ecd3c753fe2d2f85a293c55fff',
  raw_data: {
    contract: [ [Object] ],
    ref_block_bytes: 'b53a',
    ref_block_hash: '529136100d100956',
    expiration: 1608553542000,
    timestamp: 1608553482954
  },
  raw_data_hex: '0a02b53a2208529136100d10095640f0e28caae82e5a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a154653cd48c2723cb985679f4e44d99c64d22d89f41d1215462d7a77f8bef6fe225bf5e353dd6a380f588a1496180a70ca9589aae82e'
}