- Transaction
Creates a new transaction object.
- client
- static
- .BncClient
- new exports.BncClient(server, useAsyncBroadcast)
- .initChain() ⇒
Promise - .chooseNetwork(network)
- .setPrivateKey() ⇒
Promise - .useAsyncBroadcast(useAsyncBroadcast) ⇒
BncClient - .setSigningDelegate(delegate) ⇒
BncClient - .setBroadcastDelegate(delegate) ⇒
BncClient - .useDefaultSigningDelegate() ⇒
BncClient - .useDefaultBroadcastDelegate() ⇒
BncClient - .useLedgerSigningDelegate(ledgerApp, preSignCb, postSignCb, errCb) ⇒
BncClient - .transfer(fromAddress, toAddress, amount, asset, memo, sequence) ⇒
Promise - .multiSend(fromAddress, outputs, memo, sequence) ⇒
Promise - .cancelOrder(fromAddress, symbol, refid, sequence) ⇒
Promise - .placeOrder(address, symbol, side, price, quantity, sequence, timeinforce) ⇒
Promise - ._prepareTransaction(msg, stdSignMsg, address, sequence, memo) ⇒
Transaction - .sendTransaction(tx, sync) ⇒
Promise - .sendRawTransaction(signedBz, sync) ⇒
Promise - ._sendTransaction(msg, stdSignMsg, address, sequence, memo, sync) ⇒
Promise - .getAccount(address) ⇒
Promise - .getBalance(address) ⇒
Promise - .getMarkets(offset, limit,) ⇒
Promise - .createAccount() ⇒
object - .createAccountWithKeystore(password)
- .createAccountWithMneomnic() ⇒
object - .recoverAccountFromKeystore(keystore, keystore)
- .recoverAccountFromMnemonic(mneomnic)
- .recoverAccountFromPrivateKey(privateKey)
- .checkAddress(address) ⇒
Boolean - .getClientKeyAddress() ⇒
String
- .DefaultSigningDelegate ⇒
Transaction - .DefaultBroadcastDelegate
- .LedgerSigningDelegate ⇒
function - .checkNumber
- .BncClient
- inner
- static
The Binance Chain client.
Kind: static class of client
- .BncClient
- new exports.BncClient(server, useAsyncBroadcast)
- .initChain() ⇒
Promise - .chooseNetwork(network)
- .setPrivateKey() ⇒
Promise - .useAsyncBroadcast(useAsyncBroadcast) ⇒
BncClient - .setSigningDelegate(delegate) ⇒
BncClient - .setBroadcastDelegate(delegate) ⇒
BncClient - .useDefaultSigningDelegate() ⇒
BncClient - .useDefaultBroadcastDelegate() ⇒
BncClient - .useLedgerSigningDelegate(ledgerApp, preSignCb, postSignCb, errCb) ⇒
BncClient - .transfer(fromAddress, toAddress, amount, asset, memo, sequence) ⇒
Promise - .multiSend(fromAddress, outputs, memo, sequence) ⇒
Promise - .cancelOrder(fromAddress, symbol, refid, sequence) ⇒
Promise - .placeOrder(address, symbol, side, price, quantity, sequence, timeinforce) ⇒
Promise - ._prepareTransaction(msg, stdSignMsg, address, sequence, memo) ⇒
Transaction - .sendTransaction(tx, sync) ⇒
Promise - .sendRawTransaction(signedBz, sync) ⇒
Promise - ._sendTransaction(msg, stdSignMsg, address, sequence, memo, sync) ⇒
Promise - .getAccount(address) ⇒
Promise - .getBalance(address) ⇒
Promise - .getMarkets(offset, limit,) ⇒
Promise - .createAccount() ⇒
object - .createAccountWithKeystore(password)
- .createAccountWithMneomnic() ⇒
object - .recoverAccountFromKeystore(keystore, keystore)
- .recoverAccountFromMnemonic(mneomnic)
- .recoverAccountFromPrivateKey(privateKey)
- .checkAddress(address) ⇒
Boolean - .getClientKeyAddress() ⇒
String
| Param | Type | Default | Description |
|---|---|---|---|
| server | string |
Binance Chain public url | |
| useAsyncBroadcast | Boolean |
false |
use async broadcast mode, faster but less guarantees (default off) |
Initialize the client with the chain's ID. Asynchronous.
Kind: instance method of BncClient
Sets the client network (testnet or mainnet).
Kind: instance method of BncClient
| Param | Type | Description |
|---|---|---|
| network | String |
Indicate testnet or mainnet |
Sets the client's private key for calls made by this client. Asynchronous.
Kind: instance method of BncClient
Use async broadcast mode. Broadcasts faster with less guarantees (default off)
Kind: instance method of BncClient
Returns: BncClient - this instance (for chaining)
| Param | Type | Default |
|---|---|---|
| useAsyncBroadcast | Boolean |
true |
Sets the signing delegate (for wallet integrations).
Kind: instance method of BncClient
Returns: BncClient - this instance (for chaining)
| Param | Type |
|---|---|
| delegate | function |
Sets the broadcast delegate (for wallet integrations).
Kind: instance method of BncClient
Returns: BncClient - this instance (for chaining)
| Param | Type |
|---|---|
| delegate | function |
Applies the default signing delegate.
Kind: instance method of BncClient
Returns: BncClient - this instance (for chaining)
Applies the default broadcast delegate.
Kind: instance method of BncClient
Returns: BncClient - this instance (for chaining)
Applies the Ledger signing delegate.
Kind: instance method of BncClient
Returns: BncClient - this instance (for chaining)
| Param | Type |
|---|---|
| ledgerApp | function |
| preSignCb | function |
| postSignCb | function |
| errCb | function |
Transfer tokens from one address to another.
Kind: instance method of BncClient
Returns: Promise - resolves with response (success or fail)
| Param | Type | Default | Description |
|---|---|---|---|
| fromAddress | String |
||
| toAddress | String |
||
| amount | Number |
||
| asset | String |
||
| memo | String |
optional memo | |
| sequence | Number |
|
optional sequence |
Create and sign a multi send tx
Kind: instance method of BncClient
Returns: Promise - resolves with response (success or fail)
| Param | Type | Default | Description |
|---|---|---|---|
| fromAddress | String |
||
| outputs | Array |
||
| memo | String |
optional memo | |
| sequence | Number |
|
optional sequence |
Example
const outputs = [
{
"to": "tbnb1p4kpnj5qz5spsaf0d2555h6ctngse0me5q57qe",
"coins": [{
"denom": "BNB",
"amount": 10
},{
"denom": "BTC",
"amount": 10
}]
},
{
"to": "tbnb1scjj8chhhp7lngdeflltzex22yaf9ep59ls4gk",
"coins": [{
"denom": "BTC",
"amount": 10
},{
"denom": "BNB",
"amount": 10
}]
}]Cancel an order.
Kind: instance method of BncClient
Returns: Promise - resolves with response (success or fail)
| Param | Type | Default | Description |
|---|---|---|---|
| fromAddress | String |
||
| symbol | String |
the market pair | |
| refid | String |
the order ID of the order to cancel | |
| sequence | Number |
|
optional sequence |
Place an order.
Kind: instance method of BncClient
Returns: Promise - resolves with response (success or fail)
| Param | Type | Default | Description |
|---|---|---|---|
| address | String |
||
| symbol | String |
the market pair | |
| side | Number |
(1-Buy, 2-Sell) | |
| price | Number |
||
| quantity | Number |
||
| sequence | Number |
|
optional sequence |
| timeinforce | Number |
1 |
(1-GTC(Good Till Expire), 3-IOC(Immediate or Cancel)) |
bncClient._prepareTransaction(msg, stdSignMsg, address, sequence, memo) ⇒ Transaction
Prepare a serialized raw transaction for sending to the blockchain.
Kind: instance method of BncClient
Returns: Transaction - signed transaction
| Param | Type | Default | Description |
|---|---|---|---|
| msg | Object |
the msg object | |
| stdSignMsg | Object |
the sign doc object used to generate a signature | |
| address | String |
||
| sequence | Number |
|
optional sequence |
| memo | String |
optional memo |
Broadcast a transaction to the blockchain.
Kind: instance method of BncClient
Returns: Promise - resolves with response (success or fail)
| Param | Type | Description |
|---|---|---|
| tx | signedTx |
signed Transaction object |
| sync | Boolean |
use synchronous mode, optional |
Broadcast a raw transaction to the blockchain.
Kind: instance method of BncClient
Returns: Promise - resolves with response (success or fail)
| Param | Type | Description |
|---|---|---|
| signedBz | String |
signed and serialized raw transaction |
| sync | Boolean |
use synchronous mode, optional |
Broadcast a raw transaction to the blockchain.
Kind: instance method of BncClient
Returns: Promise - resolves with response (success or fail)
| Param | Type | Default | Description |
|---|---|---|---|
| msg | Object |
the msg object | |
| stdSignMsg | Object |
the sign doc object used to generate a signature | |
| address | String |
||
| sequence | Number |
|
optional sequence |
| memo | String |
optional memo | |
| sync | Boolean |
use synchronous mode, optional |
get account
Kind: instance method of BncClient
Returns: Promise - resolves with http response
| Param | Type |
|---|---|
| address | String |
get balances
Kind: instance method of BncClient
Returns: Promise - resolves with http response
| Param | Type | Description |
|---|---|---|
| address | String |
optional address |
get markets
Kind: instance method of BncClient
Returns: Promise - resolves with http response
| Param | Type | Default | Description |
|---|---|---|---|
| offset | Number |
0 |
from beggining, default 0 |
| limit, | Number |
max 1000 is default |
Creates a private key and returns it and its address.
Kind: instance method of BncClient
Returns: object - the private key and address in an object.
{
address,
privateKey
}
Creates an account keystore object, and returns the private key and address.
Kind: instance method of BncClient
| Param | Type | Description |
|---|---|---|
| password | String |
{ privateKey, address, keystore } |
Creates an account from mnemonic seed phrase.
Kind: instance method of BncClient
Returns: object - {
privateKey,
address,
mnemonic
}
Recovers an account from a keystore object.
Kind: instance method of BncClient
| Param | Type | Description |
|---|---|---|
| keystore | object |
object. |
| keystore | string |
password. { privateKey, address } |
Recovers an account from a mnemonic seed phrase.
Kind: instance method of BncClient
| Param | Type | Description |
|---|---|---|
| mneomnic | string |
{ privateKey, address } |
Recovers an account using private key.
Kind: instance method of BncClient
| Param | Type | Description |
|---|---|---|
| privateKey | String |
{ privateKey, address } |
Validates an address.
Kind: instance method of BncClient
| Param | Type |
|---|---|
| address | String |
Returns the address for the current account if setPrivateKey has been called on this client.
Kind: instance method of BncClient
client.DefaultSigningDelegate ⇒ Transaction
The default signing delegate which uses the local private key.
Kind: static constant of client
| Param | Type | Description |
|---|---|---|
| tx | Transaction |
the transaction |
| signMsg | Object |
the canonical sign bytes for the msg |
The default broadcast delegate which immediately broadcasts a transaction.
Kind: static constant of client
| Param | Type | Description |
|---|---|---|
| signedTx | Transaction |
the signed transaction |
The Ledger signing delegate.
Kind: static constant of client
| Param | Type |
|---|---|
| ledgerApp | LedgerApp |
| function | preSignCb |
| function | postSignCb |
| function | errCb |
validate the input number.
Kind: static constant of client
| Param | Type |
|---|---|
| value | Number |
validate the input number.
Kind: inner method of client
| Param | Type |
|---|---|
| outputs | Array |
sum corresponding input coin
Kind: inner method of client
| Param | Type |
|---|---|
| inputs | Array |
| coins | Array |
- crypto
- .decodeAddress
- .checkAddress ⇒
boolean - .encodeAddress
- .generatePrivateKey ⇒
string - .generateRandomArray ⇒
ArrayBuffer - .getPublicKey ⇒
Elliptic.PublicKey - .getPublicKeyFromPrivateKey ⇒
string - .generatePubKey ⇒
Elliptic.PublicKey - .getAddressFromPublicKey
- .getAddressFromPrivateKey
- .generateSignature ⇒
Buffer - .verifySignature ⇒
Buffer - .generateKeyStore ⇒
object - .getPrivateKeyFromKeyStore
- .generateMnemonic
- .validateMnemonic ⇒
bool - .getPrivateKeyFromMnemonic ⇒
string
Decodes an address in bech32 format.
Kind: static constant of crypto
| Param | Type | Description |
|---|---|---|
| value | string |
the bech32 address to decode |
Checks whether an address is valid.
Kind: static constant of crypto
| Param | Type | Description |
|---|---|---|
| address | string |
the bech32 address to decode |
Encodes an address from input data bytes.
Kind: static constant of crypto
| Param | Type | Description |
|---|---|---|
| value | string |
the public key to encode |
| prefix | * |
the address prefix |
| type | * |
the output type (default: hex) |
Generates 32 bytes of random entropy
Kind: static constant of crypto
Returns: string - entropy bytes hexstring
| Param | Type | Description |
|---|---|---|
| len | number |
output length (default: 32 bytes) |
Generates an arrayBuffer filled with random bits.
Kind: static constant of crypto
| Param | Type | Description |
|---|---|---|
| length | number |
Length of buffer. |
Kind: static constant of crypto
Returns: Elliptic.PublicKey - public key hexstring
| Param | Type | Description |
|---|---|---|
| publicKey | string |
Encoded public key |
Calculates the public key from a given private key.
Kind: static constant of crypto
Returns: string - public key hexstring
| Param | Type | Description |
|---|---|---|
| privateKeyHex | string |
the private key hexstring |
PubKey performs the point-scalar multiplication from the privKey on the generator point to get the pubkey.
Kind: static constant of crypto
Returns: Elliptic.PublicKey - PubKey
| Param | Type |
|---|---|
| privateKey | Buffer |
Gets an address from a public key hex.
Kind: static constant of crypto
| Param | Type | Description |
|---|---|---|
| publicKeyHex | string |
the public key hexstring |
| prefix | string |
the address prefix |
Gets an address from a private key.
Kind: static constant of crypto
| Param | Type | Description |
|---|---|---|
| privateKeyHex | string |
the private key hexstring |
Generates a signature (64 byte <r,s>) for a transaction based on given private key.
Kind: static constant of crypto
Returns: Buffer - Signature. Does not include tx.
| Param | Type | Description |
|---|---|---|
| signBytesHex | string |
Unsigned transaction sign bytes hexstring. |
| privateKey | string | Buffer |
The private key. |
Verifies a signature (64 byte <r,s>) given the sign bytes and public key.
Kind: static constant of crypto
Returns: Buffer - Signature. Does not include tx.
| Param | Type | Description |
|---|---|---|
| sigHex | string |
The signature hexstring. |
| signBytesHex | string |
Unsigned transaction sign bytes hexstring. |
| publicKeyHex | string |
The public key. |
Generates a keystore object (web3 secret storage format) given a private key to store and a password.
Kind: static constant of crypto
Returns: object - the keystore object.
| Param | Type | Description |
|---|---|---|
| privateKeyHex | string |
the private key hexstring. |
| password | string |
the password. |
Gets a private key from a keystore given its password.
Kind: static constant of crypto
| Param | Type | Description |
|---|---|---|
| keystore | string |
the keystore in json format |
| password | string |
the password. |
Generates mnemonic phrase words using random entropy.
Kind: static constant of crypto
Validates mnemonic phrase words.
Kind: static constant of crypto
Returns: bool - validation result
| Param | Type | Description |
|---|---|---|
| mnemonic | string |
the mnemonic phrase words |
Get a private key from mnemonic words.
Kind: static constant of crypto
Returns: string - hexstring
| Param | Type | Description |
|---|---|---|
| mnemonic | string |
the mnemonic phrase words |
| derive | Boolean |
derive a private key using the default HD path (default: true) |
| index | number |
the bip44 address index (default: 0) |
js amino UnmarshalBinaryLengthPrefixed
Kind: static constant of amino-decode
| Param | Type |
|---|---|
| bytes | Buffer |
| type | Object |
js amino UnmarshalBinaryBare
Kind: static constant of amino-decode
| Param | Type |
|---|---|
| bytes | Buffer |
| type | Object |
- amino-encode
- .encodeNumber
- .encodeBool
- .encodeString
- .encodeTime
- .convertObjectToSignBytes ⇒
Buffer - .marshalBinary
- .marshalBinaryBare
- .encodeBinary ⇒
Buffer - .encodeBinaryByteArray ⇒
Buffer - .encodeObjectBinary ⇒
Buffer - .encodeArrayBinary ⇒
Buffer
encode number
Kind: static constant of amino-encode
| Param |
|---|
| num |
encode bool
Kind: static constant of amino-encode
| Param |
|---|
| b |
encode string
Kind: static constant of amino-encode
| Param |
|---|
| str |
encode time
Kind: static constant of amino-encode
| Param |
|---|
| value |
Kind: static constant of amino-encode
Returns: Buffer - bytes
| Param | Type | Description |
|---|---|---|
| obj | object |
- |
js amino MarshalBinary
Kind: static constant of amino-encode
| Param | Type |
|---|---|
| obj | Object |
js amino MarshalBinaryBare
Kind: static constant of amino-encode
| Param | Type |
|---|---|
| obj | Object |
This is the main entrypoint for encoding all types in binary form.
Kind: static constant of amino-encode
Returns: Buffer - binary of object.
| Param | Type | Description |
|---|---|---|
| js | * |
data type (not null, not undefined) |
| field | Number |
index of object |
| isByteLenPrefix | Boolean |
prefixed with bytes length
Kind: static constant of amino-encode
Returns: Buffer - with bytes length prefixed
| Param | Type |
|---|---|
| bytes | Buffer |
Kind: static constant of amino-encode
Returns: Buffer - with bytes length prefixed
| Param | Type |
|---|---|
| obj | Object |
Kind: static constant of amino-encode
Returns: Buffer - bytes of array
| Param | Type | Description |
|---|---|---|
| fieldNum | Number |
object field index |
| arr | Array |
|
| isByteLenPrefix | Boolean |
Ledger app interface.
Kind: inner class of ledger
Constructs a new LedgerApp.
| Param | Type | Description |
|---|---|---|
| transport | Transport |
Ledger Transport, a subclass of ledgerjs Transport. |
| interactiveTimeout | Number |
The interactive (user input) timeout in ms. Default 45s. |
| nonInteractiveTimeout | Number |
The non-interactive timeout in ms. Default 3s. |
Gets the version of the Ledger app that is currently open on the device.
Kind: instance method of LedgerApp
Throws:
- Will throw Error if a transport error occurs, or if the firmware app is not open.
Gets the public key from the Ledger app that is currently open on the device.
Kind: instance method of LedgerApp
Throws:
- Will throw Error if a transport error occurs, or if the firmware app is not open.
| Param | Type | Description |
|---|---|---|
| hdPath | array |
The HD path to use to get the public key. Default is [44, 714, 0, 0, 0] |
Sends a transaction sign doc to the Ledger app to be signed.
Kind: instance method of LedgerApp
Throws:
- Will throw Error if a transport error occurs, or if the firmware app is not open.
| Param | Type | Description |
|---|---|---|
| signBytes | Buffer |
The TX sign doc bytes to sign |
| hdPath | array |
The HD path to use to get the public key. Default is [44, 714, 0, 0, 0] |
Shows the user's address for the given HD path on the device display.
Kind: instance method of LedgerApp
Throws:
- Will throw Error if a transport error occurs, or if the firmware app is not open.
| Param | Type | Default | Description |
|---|---|---|---|
| hrp | string |
"bnb" |
The bech32 human-readable prefix |
| hdPath | array |
The HD path to use to get the public key. Default is [44, 714, 0, 0, 0] |
Gets the public key from the Ledger app that is currently open on the device.
Kind: instance method of LedgerApp
Throws:
- Will throw Error if a transport error occurs, or if the firmware app is not open.
| Param | Type | Description |
|---|---|---|
| hdPath | array |
The HD path to use to get the public key. Default is [44, 714, 0, 0, 0] |
Sends a transaction sign doc to the Ledger app to be signed.
Kind: instance method of LedgerApp
Throws:
- Will throw Error if a transport error occurs, or if the firmware app is not open.
| Param | Type | Description |
|---|---|---|
| signBytes | Buffer |
The TX sign doc bytes to sign |
| hdPath | array |
The HD path to use to get the public key. Default is [44, 714, 0, 0, 0] |
- utils
- .ab2str ⇒
string - .str2ab ⇒
arrayBuffer - .hexstring2ab ⇒
Array.<number> - .ab2hexstring ⇒
string - .str2hexstring ⇒
string - .hexstring2str ⇒
string - .int2hex ⇒
string - .num2hexstring ⇒
string - .num2VarInt ⇒
string - .hexXor ⇒
string - .reverseArray ⇒
Uint8Array - .reverseHex ⇒
string - .isHex ⇒
boolean - .ensureHex
- .sha256ripemd160 ⇒
string - .sha256 ⇒
string - .sha3 ⇒
string
- .ab2str ⇒
Kind: static constant of utils
Returns: string - ASCII string
| Param | Type |
|---|---|
| buf | arrayBuffer |
Kind: static constant of utils
| Param | Type | Description |
|---|---|---|
| str | string |
ASCII string |
Kind: static constant of utils
| Param | Type | Description |
|---|---|---|
| str | string |
HEX string |
Kind: static constant of utils
Returns: string - HEX string
| Param | Type |
|---|---|
| arr | arrayBuffer |
Kind: static constant of utils
Returns: string - HEX string
| Param | Type | Description |
|---|---|---|
| str | string |
ASCII string |
Kind: static constant of utils
Returns: string - ASCII string
| Param | Type | Description |
|---|---|---|
| hexstring | string |
HEX string |
convert an integer to big endian hex and add leading zeros
Kind: static constant of utils
| Param | Type |
|---|---|
| num | Number |
Converts a number to a big endian hexstring of a suitable size, optionally little endian
Kind: static constant of utils
| Param | Type | Description |
|---|---|---|
| num | Number |
|
| size | Number |
The required size in bytes, eg 1 for Uint8, 2 for Uint16. Defaults to 1. |
| littleEndian | Boolean |
Encode the hex in little endian form |
Converts a number to a variable length Int. Used for array length header
Kind: static constant of utils
Returns: string - hexstring of the variable Int.
| Param | Type | Description |
|---|---|---|
| num | Number |
The number |
XORs two hexstrings
Kind: static constant of utils
Returns: string - XOR output as a HEX string
| Param | Type | Description |
|---|---|---|
| str1 | string |
HEX string |
| str2 | string |
HEX string |
Reverses an array. Accepts arrayBuffer.
Kind: static constant of utils
| Param | Type |
|---|---|
| arr | Array |
Reverses a HEX string, treating 2 chars as a byte.
Kind: static constant of utils
Returns: string - HEX string reversed in 2s.
| Param | Type | Description |
|---|---|---|
| hex | string |
HEX string |
Example
reverseHex('abcdef') = 'efcdab'Checks if input is a hexstring. Empty string is considered a hexstring.
Kind: static constant of utils
| Param | Type |
|---|---|
| str | string |
Example
isHex('0101') = true
isHex('') = true
isHex('0x01') = falseThrows an error if input is not hexstring.
Kind: static constant of utils
| Param | Type |
|---|---|
| str | string |
Computes a SHA256 followed by a RIPEMD160.
Kind: static constant of utils
Returns: string - hash output
| Param | Type | Description |
|---|---|---|
| hex | string |
message to hash |
Computes a single SHA256 digest.
Kind: static constant of utils
Returns: string - hash output
| Param | Type | Description |
|---|---|---|
| hex | string |
message to hash |
Computes a single SHA3 (Keccak) digest.
Kind: static constant of utils
Returns: string - hash output
| Param | Type | Description |
|---|---|---|
| hex | string |
message to hash |
Creates a new transaction object.
Kind: global class
Properties
| Name | Type | Description |
|---|---|---|
| raw | Buffer |
The raw vstruct encoded transaction |
| Param | Type | Description |
|---|---|---|
| data.account_number | Number |
account number |
| data.chain_id | String |
bnbChain Id |
| data.memo | String |
transaction memo |
| type | String |
transaction type |
| data.msg | Object |
object data of tx type |
| data.sequence | Number |
transaction counts |
Example
var rawTx = {
account_number: 1,
chain_id: 'bnbchain-1000',
memo: '',
msg: {},
type: 'NewOrderMsg',
sequence: 29,
};
var tx = new Transaction(rawTx);generate the sign bytes for a transaction, given a msg
Kind: instance method of Transaction
| Param | Type | Description |
|---|---|---|
| concrete | Object |
msg object |
transaction.addSignature(pubKey, signature) ⇒ Transaction
attaches a signature to the transaction
Kind: instance method of Transaction
| Param | Type |
|---|---|
| pubKey | Elliptic.PublicKey |
| signature | Buffer |
transaction.sign(privateKey, concrete) ⇒ Transaction
sign transaction with a given private key and msg
Kind: instance method of Transaction
| Param | Type | Description |
|---|---|---|
| privateKey | string |
private key hex string |
| concrete | Object |
msg object |
encode signed transaction to hex which is compatible with amino
Kind: instance method of Transaction
| Param | Type | Description |
|---|---|---|
| opts | object |
msg field |
serializes a public key in a 33-byte compressed format.
Kind: instance method of Transaction
| Param | Type |
|---|---|
| unencodedPubKey | Elliptic.PublicKey |