-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
537 additions
and
34 deletions.
There are no files selected for viewing
106 changes: 106 additions & 0 deletions
106
docs/jsdocs/goodserver/server/blockchain/admin-wallet.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> | ||
|
||
### Table of Contents | ||
|
||
- [Wallet][1] | ||
- [Parameters][2] | ||
- [whitelistUser][3] | ||
- [Parameters][4] | ||
- [blacklistUser][5] | ||
- [Parameters][6] | ||
- [isVerified][7] | ||
- [Parameters][8] | ||
- [topWallet][9] | ||
- [Parameters][10] | ||
- [getBalance][11] | ||
|
||
## Wallet | ||
|
||
Exported as AdminWallet | ||
Interface with blockchain contracts via web3 using HDWalletProvider | ||
|
||
### Parameters | ||
|
||
- `mnemonic` **[string][12]** | ||
|
||
### whitelistUser | ||
|
||
whitelist an user in the `Identity` contract | ||
|
||
#### Parameters | ||
|
||
- `address` **[string][12]** | ||
- `did` **[string][12]** | ||
|
||
Returns **[Promise][13]<TransactionReceipt>** | ||
|
||
### blacklistUser | ||
|
||
blacklist an user in the `Identity` contract | ||
|
||
#### Parameters | ||
|
||
- `address` **[string][12]** | ||
|
||
Returns **[Promise][13]<TransactionReceipt>** | ||
|
||
### isVerified | ||
|
||
verify if an user is verified in the `Identity` contract | ||
|
||
#### Parameters | ||
|
||
- `address` **[string][12]** | ||
|
||
Returns **[Promise][13]<[boolean][14]>** | ||
|
||
### topWallet | ||
|
||
top wallet if needed | ||
|
||
#### Parameters | ||
|
||
- `address` **[string][12]** | ||
- `lastTopping` **moment.Moment** (optional, default `moment().subtract(1,'day')`) | ||
- `force` **[boolean][14]** (optional, default `false`) | ||
|
||
Returns **PromiEvent<TransactionReceipt>** | ||
|
||
### getBalance | ||
|
||
get balance for admin wallet | ||
|
||
Returns **[Promise][13]<[number][15]>** | ||
|
||
[1]: #wallet | ||
|
||
[2]: #parameters | ||
|
||
[3]: #whitelistuser | ||
|
||
[4]: #parameters-1 | ||
|
||
[5]: #blacklistuser | ||
|
||
[6]: #parameters-2 | ||
|
||
[7]: #isverified | ||
|
||
[8]: #parameters-3 | ||
|
||
[9]: #topwallet | ||
|
||
[10]: #parameters-4 | ||
|
||
[11]: #getbalance | ||
|
||
[12]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String | ||
|
||
[13]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise | ||
|
||
[14]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean | ||
|
||
[15]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number | ||
## Source | ||
[https://github.com/GoodDollar/GoodServer/src/server/blockchain/AdminWallet.js](https://github.com/GoodDollar/GoodServer/src/server/blockchain/AdminWallet.js) | ||
|
164 changes: 164 additions & 0 deletions
164
docs/jsdocs/goodserver/server/blockchain/blockchain-types.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> | ||
|
||
### Table of Contents | ||
|
||
- [Callback][1] | ||
- [EventLog][2] | ||
- [Properties][3] | ||
- [TransactionReceipt][4] | ||
- [Properties][5] | ||
- [EncodedTransaction][6] | ||
- [Properties][7] | ||
- [Logs][8] | ||
- [Properties][9] | ||
- [Log][10] | ||
- [Properties][11] | ||
- [Subscribe][12] | ||
- [Properties][13] | ||
- [Shh][14] | ||
- [Properties][15] | ||
|
||
## Callback | ||
|
||
Type: function (error: [Error][16], result: T): void | ||
|
||
## EventLog | ||
|
||
### Properties | ||
|
||
- `event` **[string][17]** | ||
- `address` **[string][17]** | ||
- `returnValues` **any** | ||
- `logIndex` **[number][18]** | ||
- `transactionIndex` **[number][18]** | ||
- `transactionHash` **[string][17]** | ||
- `blockHash` **[string][17]** | ||
- `blockNumber` **[number][18]** | ||
- `raw` **{data: [string][17], topics: [Array][19]<[string][17]>}?** | ||
- `raw.data` **[string][17]** | ||
- `raw.topics` **[Array][19]<[string][17]>** | ||
|
||
## TransactionReceipt | ||
|
||
### Properties | ||
|
||
- `transactionHash` **[string][17]** | ||
- `transactionIndex` **[number][18]** | ||
- `blockHash` **[string][17]** | ||
- `blockNumber` **[number][18]** | ||
- `from` **[string][17]** | ||
- `to` **[string][17]** | ||
- `contractAddress` **[string][17]** | ||
- `cumulativeGasUsed` **[number][18]** | ||
- `gasUsed` **[number][18]** | ||
- `logs` **[Array][19]<[Log][20]>?** | ||
- `events` **{}?** | ||
- `status` **[boolean][21]** | ||
|
||
## EncodedTransaction | ||
|
||
### Properties | ||
|
||
- `raw` **[string][17]** | ||
- `tx` **{nonce: [string][17], gasPrice: [string][17], gas: [string][17], to: [string][17], value: [string][17], input: [string][17], v: [string][17], r: [string][17], s: [string][17], hash: [string][17]}** | ||
- `tx.nonce` **[string][17]** | ||
- `tx.gasPrice` **[string][17]** | ||
- `tx.gas` **[string][17]** | ||
- `tx.to` **[string][17]** | ||
- `tx.value` **[string][17]** | ||
- `tx.input` **[string][17]** | ||
- `tx.v` **[string][17]** | ||
- `tx.r` **[string][17]** | ||
- `tx.s` **[string][17]** | ||
- `tx.hash` **[string][17]** | ||
|
||
## Logs | ||
|
||
### Properties | ||
|
||
- `fromBlock` **[number][18]?** | ||
- `address` **[string][17]?** | ||
- `topics` **[Array][19]<([string][17] \| [Array][19]<[string][17]>)>?** | ||
|
||
## Log | ||
|
||
### Properties | ||
|
||
- `address` **[string][17]** | ||
- `data` **[string][17]** | ||
- `topics` **[Array][19]<[string][17]>** | ||
- `logIndex` **[number][18]** | ||
- `transactionHash` **[string][17]** | ||
- `transactionIndex` **[number][18]** | ||
- `blockHash` **[string][17]** | ||
- `blockNumber` **[number][18]** | ||
|
||
## Subscribe | ||
|
||
### Properties | ||
|
||
- `subscription` **{id: [string][17], subscribe: function (callback: [Callback][22]<[Subscribe][23]<T>>): [Subscribe][23]<T>, unsubscribe: function (callback: [Callback][22]<[boolean][21]>): (void | [boolean][21]), arguments: {}}** | ||
- `subscription.id` **[string][17]** | ||
- `subscription.subscribe` **function (callback: [Callback][22]<[Subscribe][23]<T>>): [Subscribe][23]<T>** | ||
- `subscription.unsubscribe` **function (callback: [Callback][22]<[boolean][21]>): (void | [boolean][21])** | ||
- `subscription.arguments` **{}** | ||
- `on` **function (type: (`"data"` \| `"changed"`), handler: function (data: T): void): void** | ||
- `on` **function (type: `"error"`, handler: function (data: [Error][16]): void): void** | ||
|
||
## Shh | ||
|
||
### Properties | ||
|
||
- `generateSymKeyFromPassword` **function (password: [string][17]): [Promise][24]<[string][17]>** | ||
- `generateSymKeyFromPassword` **function (password: [string][17], callback: [Callback][22]<[string][17]>): void** | ||
|
||
[1]: #callback | ||
|
||
[2]: #eventlog | ||
|
||
[3]: #properties | ||
|
||
[4]: #transactionreceipt | ||
|
||
[5]: #properties-1 | ||
|
||
[6]: #encodedtransaction | ||
|
||
[7]: #properties-2 | ||
|
||
[8]: #logs | ||
|
||
[9]: #properties-3 | ||
|
||
[10]: #log | ||
|
||
[11]: #properties-4 | ||
|
||
[12]: #subscribe | ||
|
||
[13]: #properties-5 | ||
|
||
[14]: #shh | ||
|
||
[15]: #properties-6 | ||
|
||
[16]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error | ||
|
||
[17]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String | ||
|
||
[18]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number | ||
|
||
[19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array | ||
|
||
[20]: #log | ||
|
||
[21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean | ||
|
||
[22]: #callback | ||
|
||
[23]: #subscribe | ||
|
||
[24]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise | ||
## Source | ||
[https://github.com/GoodDollar/GoodServer/src/server/blockchain/blockchain-types.js](https://github.com/GoodDollar/GoodServer/src/server/blockchain/blockchain-types.js) | ||
|
Oops, something went wrong.