Skip to content

Commit 42ce393

Browse files
committed
update docs
1 parent 1c1636c commit 42ce393

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

docs/jsdoc.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* [client](#module_client)
4848
* _static_
4949
* [.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)
5151
* [.initChain()](#module_client.BncClient+initChain) ⇒ <code>Promise</code>
5252
* [.chooseNetwork(network)](#module_client.BncClient+chooseNetwork)
5353
* [.setPrivateKey()](#module_client.BncClient+setPrivateKey) ⇒ <code>Promise</code>
@@ -75,7 +75,7 @@
7575
* [.recoverAccountFromKeystore(keystore, keystore)](#module_client.BncClient+recoverAccountFromKeystore)
7676
* [.recoverAccountFromMnemonic(mneomnic)](#module_client.BncClient+recoverAccountFromMnemonic)
7777
* [.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>
7979
* [.getClientKeyAddress()](#module_client.BncClient+getClientKeyAddress) ⇒ <code>String</code>
8080
* [.DefaultSigningDelegate](#module_client.DefaultSigningDelegate)[<code>Transaction</code>](#Transaction)
8181
* [.DefaultBroadcastDelegate](#module_client.DefaultBroadcastDelegate)
@@ -92,7 +92,7 @@ The Binance Chain client.
9292
**Kind**: static class of [<code>client</code>](#module_client)
9393

9494
* [.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)
9696
* [.initChain()](#module_client.BncClient+initChain) ⇒ <code>Promise</code>
9797
* [.chooseNetwork(network)](#module_client.BncClient+chooseNetwork)
9898
* [.setPrivateKey()](#module_client.BncClient+setPrivateKey) ⇒ <code>Promise</code>
@@ -120,17 +120,18 @@ The Binance Chain client.
120120
* [.recoverAccountFromKeystore(keystore, keystore)](#module_client.BncClient+recoverAccountFromKeystore)
121121
* [.recoverAccountFromMnemonic(mneomnic)](#module_client.BncClient+recoverAccountFromMnemonic)
122122
* [.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>
124124
* [.getClientKeyAddress()](#module_client.BncClient+getClientKeyAddress) ⇒ <code>String</code>
125125

126126
<a name="new_module_client.BncClient_new"></a>
127127

128-
#### new exports.BncClient(server, useAsyncBroadcast)
128+
#### new exports.BncClient(server, useAsyncBroadcast, source)
129129

130130
| Param | Type | Default | Description |
131131
| --- | --- | --- | --- |
132-
| server | <code>string</code> | | Binance Chain public url |
132+
| server | <code>String</code> | | Binance Chain public url |
133133
| 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) |
134135

135136
<a name="module_client.BncClient+initChain"></a>
136137

@@ -489,14 +490,15 @@ Recovers an account using private key.
489490

490491
<a name="module_client.BncClient+checkAddress"></a>
491492

492-
#### bncClient.checkAddress(address) ⇒ <code>Boolean</code>
493+
#### bncClient.checkAddress(address, prefix) ⇒ <code>Boolean</code>
493494
Validates an address.
494495

495496
**Kind**: instance method of [<code>BncClient</code>](#module_client.BncClient)
496497

497498
| Param | Type |
498499
| --- | --- |
499500
| address | <code>String</code> |
501+
| prefix | <code>String</code> |
500502

501503
<a name="module_client.BncClient+getClientKeyAddress"></a>
502504

@@ -608,6 +610,7 @@ Checks whether an address is valid.
608610
| Param | Type | Description |
609611
| --- | --- | --- |
610612
| address | <code>string</code> | the bech32 address to decode |
613+
| hrp | <code>string</code> | the prefix to check for the bech32 address |
611614

612615
<a name="module_crypto.encodeAddress"></a>
613616

@@ -786,6 +789,7 @@ Get a private key from mnemonic words.
786789
| mnemonic | <code>string</code> | the mnemonic phrase words |
787790
| derive | <code>Boolean</code> | derive a private key using the default HD path (default: true) |
788791
| index | <code>number</code> | the bip44 address index (default: 0) |
792+
| password | <code>string</code> | according to bip39 |
789793

790794
<a name="amino.module_decode"></a>
791795

@@ -1037,8 +1041,8 @@ var listParams = {
10371041
<a name="module_gov..Gov+submitProposal"></a>
10381042

10391043
#### 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
10421046
be given directly or through a proposal JSON file.
10431047

10441048
**Kind**: instance method of [<code>Gov</code>](#module_gov..Gov)
@@ -1071,7 +1075,7 @@ Deposit tokens for activing proposal
10711075
var coins = [{
10721076
"denom": "BNB",
10731077
"amount": 10
1074-
}]
1078+
}]
10751079
```
10761080
<a name="module_gov..Gov+vote"></a>
10771081

@@ -1700,6 +1704,7 @@ Creates a new transaction object.
17001704
| type | <code>String</code> | transaction type |
17011705
| data.msg | <code>Object</code> | object data of tx type |
17021706
| data.sequence | <code>Number</code> | transaction counts |
1707+
| data.source | <code>Number</code> | where does this transaction come from |
17031708

17041709
**Example**
17051710
```js
@@ -1710,6 +1715,7 @@ var rawTx = {
17101715
msg: {},
17111716
type: 'NewOrderMsg',
17121717
sequence: 29,
1718+
source: 0
17131719
};
17141720
var tx = new Transaction(rawTx);
17151721
```

src/client/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ export class BncClient {
758758
/**
759759
* Validates an address.
760760
* @param {String} address
761-
* @param {String prefix}
761+
* @param {String} prefix
762762
* @return {Boolean}
763763
*/
764764
checkAddress(address, prefix = this.addressPrefix) {

0 commit comments

Comments
 (0)