injectExchangeTokens

Create an unsigned transaction to inject tokens into an exchange pair based on Bancor protocol.

Usage

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

Parameters

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

options parameters

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

Returns

Object

Example

visionWeb.transactionBuilder.injectExchangeTokens(1,"1000001",10000);
>{
  visible: false,
  txID: 'b389917e0f8f96c03136a793b86f9bd18d169875e5f22417cef8b01e1b0d17f6',
  raw_data: {
    contract: [ [Object] ],
    ref_block_bytes: '47d2',
    ref_block_hash: '221e6396e98b38b6',
    expiration: 1608467808000,
    timestamp: 1608467750130
  },
  raw_data_hex: '0a0247d22208221e6396e98b38b64080fe9b81e82e5a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a154653cd48c2723cb985679f4e44d99c64d22d89f41d1215462d7a77f8bef6fe225bf5e353dd6a380f588a1496180a70f2b99881e82e'
}