47
47
* [ client] ( #module_client )
48
48
* _ static_
49
49
* [ .BncClient] ( #module_client.BncClient )
50
- * [ new exports.BncClient(server, useAsyncBroadcast)] ( #new_module_client.BncClient_new )
50
+ * [ new exports.BncClient(server, useAsyncBroadcast, source )] ( #new_module_client.BncClient_new )
51
51
* [ .initChain()] ( #module_client.BncClient+initChain ) ⇒ <code >Promise</code >
52
52
* [ .chooseNetwork(network)] ( #module_client.BncClient+chooseNetwork )
53
53
* [ .setPrivateKey()] ( #module_client.BncClient+setPrivateKey ) ⇒ <code >Promise</code >
75
75
* [ .recoverAccountFromKeystore(keystore, keystore)] ( #module_client.BncClient+recoverAccountFromKeystore )
76
76
* [ .recoverAccountFromMnemonic(mneomnic)] ( #module_client.BncClient+recoverAccountFromMnemonic )
77
77
* [ .recoverAccountFromPrivateKey(privateKey)] ( #module_client.BncClient+recoverAccountFromPrivateKey )
78
- * [ .checkAddress(address)] ( #module_client.BncClient+checkAddress ) ⇒ <code >Boolean</code >
78
+ * [ .checkAddress(address, prefix )] ( #module_client.BncClient+checkAddress ) ⇒ <code >Boolean</code >
79
79
* [ .getClientKeyAddress()] ( #module_client.BncClient+getClientKeyAddress ) ⇒ <code >String</code >
80
80
* [ .DefaultSigningDelegate] ( #module_client.DefaultSigningDelegate ) ⇒ [ <code >Transaction</code >] ( #Transaction )
81
81
* [ .DefaultBroadcastDelegate] ( #module_client.DefaultBroadcastDelegate )
@@ -92,7 +92,7 @@ The Binance Chain client.
92
92
** Kind** : static class of [ <code >client</code >] ( #module_client )
93
93
94
94
* [ .BncClient] ( #module_client.BncClient )
95
- * [ new exports.BncClient(server, useAsyncBroadcast)] ( #new_module_client.BncClient_new )
95
+ * [ new exports.BncClient(server, useAsyncBroadcast, source )] ( #new_module_client.BncClient_new )
96
96
* [ .initChain()] ( #module_client.BncClient+initChain ) ⇒ <code >Promise</code >
97
97
* [ .chooseNetwork(network)] ( #module_client.BncClient+chooseNetwork )
98
98
* [ .setPrivateKey()] ( #module_client.BncClient+setPrivateKey ) ⇒ <code >Promise</code >
@@ -120,17 +120,18 @@ The Binance Chain client.
120
120
* [ .recoverAccountFromKeystore(keystore, keystore)] ( #module_client.BncClient+recoverAccountFromKeystore )
121
121
* [ .recoverAccountFromMnemonic(mneomnic)] ( #module_client.BncClient+recoverAccountFromMnemonic )
122
122
* [ .recoverAccountFromPrivateKey(privateKey)] ( #module_client.BncClient+recoverAccountFromPrivateKey )
123
- * [ .checkAddress(address)] ( #module_client.BncClient+checkAddress ) ⇒ <code >Boolean</code >
123
+ * [ .checkAddress(address, prefix )] ( #module_client.BncClient+checkAddress ) ⇒ <code >Boolean</code >
124
124
* [ .getClientKeyAddress()] ( #module_client.BncClient+getClientKeyAddress ) ⇒ <code >String</code >
125
125
126
126
<a name =" new_module_client.BncClient_new " ></a >
127
127
128
- #### new exports.BncClient(server, useAsyncBroadcast)
128
+ #### new exports.BncClient(server, useAsyncBroadcast, source )
129
129
130
130
| Param | Type | Default | Description |
131
131
| --- | --- | --- | --- |
132
- | server | <code >string </code > | | Binance Chain public url |
132
+ | server | <code >String </code > | | Binance Chain public url |
133
133
| useAsyncBroadcast | <code >Boolean</code > | <code >false</code > | use async broadcast mode, faster but less guarantees (default off) |
134
+ | source | <code >Number</code > | <code >0</code > | where does this transaction come from (default 0) |
134
135
135
136
<a name =" module_client.BncClient+initChain " ></a >
136
137
@@ -489,14 +490,15 @@ Recovers an account using private key.
489
490
490
491
<a name =" module_client.BncClient+checkAddress " ></a >
491
492
492
- #### bncClient.checkAddress(address) ⇒ <code >Boolean</code >
493
+ #### bncClient.checkAddress(address, prefix ) ⇒ <code >Boolean</code >
493
494
Validates an address.
494
495
495
496
** Kind** : instance method of [ <code >BncClient</code >] ( #module_client.BncClient )
496
497
497
498
| Param | Type |
498
499
| --- | --- |
499
500
| address | <code >String</code > |
501
+ | prefix | <code >String</code > |
500
502
501
503
<a name =" module_client.BncClient+getClientKeyAddress " ></a >
502
504
@@ -608,6 +610,7 @@ Checks whether an address is valid.
608
610
| Param | Type | Description |
609
611
| --- | --- | --- |
610
612
| address | <code >string</code > | the bech32 address to decode |
613
+ | hrp | <code >string</code > | the prefix to check for the bech32 address |
611
614
612
615
<a name =" module_crypto.encodeAddress " ></a >
613
616
@@ -786,6 +789,7 @@ Get a private key from mnemonic words.
786
789
| mnemonic | <code >string</code > | the mnemonic phrase words |
787
790
| derive | <code >Boolean</code > | derive a private key using the default HD path (default: true) |
788
791
| index | <code >number</code > | the bip44 address index (default: 0) |
792
+ | password | <code >string</code > | according to bip39 |
789
793
790
794
<a name =" amino.module_decode " ></a >
791
795
@@ -1037,8 +1041,8 @@ var listParams = {
1037
1041
<a name =" module_gov..Gov+submitProposal " ></a >
1038
1042
1039
1043
#### gov.submitProposal(address, title, description, proposalType, initialDeposit, votingPeriod) ⇒ <code >Promise</code >
1040
- Submit a proposal along with an initial deposit.
1041
- Proposal title, description, type and deposit can
1044
+ Submit a proposal along with an initial deposit.
1045
+ Proposal title, description, type and deposit can
1042
1046
be given directly or through a proposal JSON file.
1043
1047
1044
1048
** Kind** : instance method of [ <code >Gov</code >] ( #module_gov..Gov )
@@ -1071,7 +1075,7 @@ Deposit tokens for activing proposal
1071
1075
var coins = [{
1072
1076
" denom" : " BNB" ,
1073
1077
" amount" : 10
1074
- }]
1078
+ }]
1075
1079
```
1076
1080
<a name =" module_gov..Gov+vote " ></a >
1077
1081
@@ -1700,6 +1704,7 @@ Creates a new transaction object.
1700
1704
| type | <code >String</code > | transaction type |
1701
1705
| data.msg | <code >Object</code > | object data of tx type |
1702
1706
| data.sequence | <code >Number</code > | transaction counts |
1707
+ | data.source | <code >Number</code > | where does this transaction come from |
1703
1708
1704
1709
** Example**
1705
1710
``` js
@@ -1710,6 +1715,7 @@ var rawTx = {
1710
1715
msg: {},
1711
1716
type: ' NewOrderMsg' ,
1712
1717
sequence: 29 ,
1718
+ source: 0
1713
1719
};
1714
1720
var tx = new Transaction (rawTx);
1715
1721
```
0 commit comments