-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add multisig client * fix integraction with contracts * fix comments * add mustisig client changes * fix constant addresses * fix tests * update examples and jsdoc * update examples * fix examples * fix examples * fix tests * update version and changelog, fix comments
- Loading branch information
1 parent
4ab81db
commit 4f6abf5
Showing
57 changed files
with
3,931 additions
and
31 deletions.
There are no files selected for viewing
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,346 @@ | ||
## Classes | ||
|
||
<dl> | ||
<dt><a href="#MultisigClient">MultisigClient</a></dt> | ||
<dd><p>Provider a generic client with high level methods to manage and interact an Address List Voting plugin installed in a DAO</p></dd> | ||
<dt><a href="#MultisigClientDecoding">MultisigClientDecoding</a></dt> | ||
<dd><p>Decoding module for the SDK AddressList Client</p></dd> | ||
<dt><a href="#MultisigClientEncoding">MultisigClientEncoding</a></dt> | ||
<dd><p>Encoding module for the SDK Multisig Client</p></dd> | ||
<dt><a href="#MultisigClientEstimation">MultisigClientEstimation</a></dt> | ||
<dd><p>Estimation module the SDK Address List Client</p></dd> | ||
<dt><a href="#MultisigClientMethods">MultisigClientMethods</a></dt> | ||
<dd><p>Methods module the SDK Address List Client</p></dd> | ||
</dl> | ||
|
||
## Members | ||
|
||
<dl> | ||
<dt><a href="#ApproveProposalStep">ApproveProposalStep</a></dt> | ||
<dd><p>Defines the shape of the AddressList client class</p></dd> | ||
</dl> | ||
|
||
<a name="MultisigClient"></a> | ||
|
||
## MultisigClient | ||
<p>Provider a generic client with high level methods to manage and interact an Address List Voting plugin installed in a DAO</p> | ||
|
||
**Kind**: global class | ||
<a name="MultisigClient.getPluginInstallItem"></a> | ||
|
||
### MultisigClient.getPluginInstallItem(members) ⇒ <code>\*</code> | ||
<p>Computes the parameters to be given when creating the DAO, | ||
so that the plugin is configured</p> | ||
|
||
**Kind**: static method of [<code>MultisigClient</code>](#MultisigClient) | ||
**Returns**: <code>\*</code> - <p>{IPluginInstallItem}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| members | <code>Array.<string></code> | | ||
|
||
<a name="MultisigClientDecoding"></a> | ||
|
||
## MultisigClientDecoding | ||
<p>Decoding module for the SDK AddressList Client</p> | ||
|
||
**Kind**: global class | ||
|
||
* [MultisigClientDecoding](#MultisigClientDecoding) | ||
* [.addAddressesAction(data)](#MultisigClientDecoding+addAddressesAction) ⇒ <code>\*</code> | ||
* [.removeAddressesAction(data)](#MultisigClientDecoding+removeAddressesAction) ⇒ <code>\*</code> | ||
* [.updateMultisigVotingSettings(data)](#MultisigClientDecoding+updateMultisigVotingSettings) ⇒ <code>\*</code> | ||
* [.findInterface(data)](#MultisigClientDecoding+findInterface) ⇒ <code>\*</code> | ||
|
||
<a name="MultisigClientDecoding+addAddressesAction"></a> | ||
|
||
### multisigClientDecoding.addAddressesAction(data) ⇒ <code>\*</code> | ||
<p>Decodes a list of addresses from an encoded add members action</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientDecoding</code>](#MultisigClientDecoding) | ||
**Returns**: <code>\*</code> - <p>{string[]}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| data | <code>Uint8Array</code> | | ||
|
||
<a name="MultisigClientDecoding+removeAddressesAction"></a> | ||
|
||
### multisigClientDecoding.removeAddressesAction(data) ⇒ <code>\*</code> | ||
<p>Decodes a list of addresses from an encoded remove members action</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientDecoding</code>](#MultisigClientDecoding) | ||
**Returns**: <code>\*</code> - <p>{string[]}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| data | <code>Uint8Array</code> | | ||
|
||
<a name="MultisigClientDecoding+updateMultisigVotingSettings"></a> | ||
|
||
### multisigClientDecoding.updateMultisigVotingSettings(data) ⇒ <code>\*</code> | ||
<p>Decodes a list of min approvals from an encoded update min approval action</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientDecoding</code>](#MultisigClientDecoding) | ||
**Returns**: <code>\*</code> - <p>{MultisigVotingSettings}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| data | <code>Uint8Array</code> | | ||
|
||
<a name="MultisigClientDecoding+findInterface"></a> | ||
|
||
### multisigClientDecoding.findInterface(data) ⇒ <code>\*</code> | ||
<p>Returns the decoded function info given the encoded data of an action</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientDecoding</code>](#MultisigClientDecoding) | ||
**Returns**: <code>\*</code> - <p>{(IInterfaceParams | null)}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| data | <code>Uint8Array</code> | | ||
|
||
<a name="MultisigClientEncoding"></a> | ||
|
||
## MultisigClientEncoding | ||
<p>Encoding module for the SDK Multisig Client</p> | ||
|
||
**Kind**: global class | ||
|
||
* [MultisigClientEncoding](#MultisigClientEncoding) | ||
* _instance_ | ||
* [.addAddressesAction(params)](#MultisigClientEncoding+addAddressesAction) ⇒ <code>\*</code> | ||
* [.removeAddressesAction(params)](#MultisigClientEncoding+removeAddressesAction) ⇒ <code>\*</code> | ||
* [.updateMultisigVotingSettings(params)](#MultisigClientEncoding+updateMultisigVotingSettings) ⇒ <code>\*</code> | ||
* _static_ | ||
* [.getPluginInstallItem(params)](#MultisigClientEncoding.getPluginInstallItem) ⇒ <code>\*</code> | ||
|
||
<a name="MultisigClientEncoding+addAddressesAction"></a> | ||
|
||
### multisigClientEncoding.addAddressesAction(params) ⇒ <code>\*</code> | ||
<p>Computes the parameters to be given when creating a proposal that updates the governance configuration</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientEncoding</code>](#MultisigClientEncoding) | ||
**Returns**: <code>\*</code> - <p>{DaoAction}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| params | <code>UpdateAddressesParams</code> | | ||
|
||
<a name="MultisigClientEncoding+removeAddressesAction"></a> | ||
|
||
### multisigClientEncoding.removeAddressesAction(params) ⇒ <code>\*</code> | ||
<p>Computes the parameters to be given when creating a proposal that adds addresses to address list</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientEncoding</code>](#MultisigClientEncoding) | ||
**Returns**: <code>\*</code> - <p>{DaoAction}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| params | <code>UpdateAddressesParams</code> | | ||
|
||
<a name="MultisigClientEncoding+updateMultisigVotingSettings"></a> | ||
|
||
### multisigClientEncoding.updateMultisigVotingSettings(params) ⇒ <code>\*</code> | ||
<p>Computes the parameters to be given when creating a proposal updates multisig settings</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientEncoding</code>](#MultisigClientEncoding) | ||
**Returns**: <code>\*</code> - <p>{DaoAction}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| params | <code>UpdateMultisigVotingSettingsParams</code> | | ||
|
||
<a name="MultisigClientEncoding.getPluginInstallItem"></a> | ||
|
||
### MultisigClientEncoding.getPluginInstallItem(params) ⇒ <code>\*</code> | ||
<p>Computes the parameters to be given when creating the DAO, | ||
so that the plugin is configured</p> | ||
|
||
**Kind**: static method of [<code>MultisigClientEncoding</code>](#MultisigClientEncoding) | ||
**Returns**: <code>\*</code> - <p>{IPluginInstallItem}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| params | <code>MultisigPluginInstallParams</code> | | ||
|
||
<a name="MultisigClientEstimation"></a> | ||
|
||
## MultisigClientEstimation | ||
<p>Estimation module the SDK Address List Client</p> | ||
|
||
**Kind**: global class | ||
|
||
* [MultisigClientEstimation](#MultisigClientEstimation) | ||
* [.createProposal(params)](#MultisigClientEstimation+createProposal) ⇒ <code>\*</code> | ||
* [.approveProposal(params)](#MultisigClientEstimation+approveProposal) ⇒ <code>\*</code> | ||
* [.executeProposal(params)](#MultisigClientEstimation+executeProposal) ⇒ <code>\*</code> | ||
|
||
<a name="MultisigClientEstimation+createProposal"></a> | ||
|
||
### multisigClientEstimation.createProposal(params) ⇒ <code>\*</code> | ||
<p>Estimates the gas fee of creating a proposal on the plugin</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientEstimation</code>](#MultisigClientEstimation) | ||
**Returns**: <code>\*</code> - <p>{Promise<GasFeeEstimation>}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| params | <code>CreateMultisigProposalParams</code> | | ||
|
||
<a name="MultisigClientEstimation+approveProposal"></a> | ||
|
||
### multisigClientEstimation.approveProposal(params) ⇒ <code>\*</code> | ||
<p>Estimates the gas fee of approving a proposal</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientEstimation</code>](#MultisigClientEstimation) | ||
**Returns**: <code>\*</code> - <p>{Promise<GasFeeEstimation>}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| params | <code>ApproveMultisigProposalParams</code> | | ||
|
||
<a name="MultisigClientEstimation+executeProposal"></a> | ||
|
||
### multisigClientEstimation.executeProposal(params) ⇒ <code>\*</code> | ||
<p>Estimates the gas fee of executing a proposal</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientEstimation</code>](#MultisigClientEstimation) | ||
**Returns**: <code>\*</code> - <p>{Promise<GasFeeEstimation>}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| params | <code>ExecuteProposalParams</code> | | ||
|
||
<a name="MultisigClientMethods"></a> | ||
|
||
## MultisigClientMethods | ||
<p>Methods module the SDK Address List Client</p> | ||
|
||
**Kind**: global class | ||
|
||
* [MultisigClientMethods](#MultisigClientMethods) | ||
* [.createProposal(params)](#MultisigClientMethods+createProposal) ⇒ <code>\*</code> | ||
* [.pinMetadata(params)](#MultisigClientMethods+pinMetadata) ⇒ <code>\*</code> | ||
* [.approveProposal(params)](#MultisigClientMethods+approveProposal) ⇒ <code>\*</code> | ||
* [.executeProposal(ExecuteProposalParams)](#MultisigClientMethods+executeProposal) ⇒ <code>\*</code> | ||
* [.canApprove(addressOrEns)](#MultisigClientMethods+canApprove) ⇒ <code>\*</code> | ||
* [.canExecute(addressOrEns)](#MultisigClientMethods+canExecute) ⇒ <code>\*</code> | ||
* [.getPluginSettings(addressOrEns)](#MultisigClientMethods+getPluginSettings) ⇒ <code>\*</code> | ||
* [.getProposal(proposalId)](#MultisigClientMethods+getProposal) ⇒ <code>\*</code> | ||
* [.getProposals({)](#MultisigClientMethods+getProposals) ⇒ <code>\*</code> | ||
|
||
<a name="MultisigClientMethods+createProposal"></a> | ||
|
||
### multisigClientMethods.createProposal(params) ⇒ <code>\*</code> | ||
<p>Creates a new proposal on the given multisig plugin contract</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientMethods</code>](#MultisigClientMethods) | ||
**Returns**: <code>\*</code> - <p>{AsyncGenerator<ProposalCreationStepValue>}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| params | <code>CreateMultisigProposalParams</code> | | ||
|
||
<a name="MultisigClientMethods+pinMetadata"></a> | ||
|
||
### multisigClientMethods.pinMetadata(params) ⇒ <code>\*</code> | ||
<p>Pins a metadata object into IPFS and retruns the generated hash</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientMethods</code>](#MultisigClientMethods) | ||
**Returns**: <code>\*</code> - <p>{Promise<string>}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| params | <code>ProposalMetadata</code> | | ||
|
||
<a name="MultisigClientMethods+approveProposal"></a> | ||
|
||
### multisigClientMethods.approveProposal(params) ⇒ <code>\*</code> | ||
<p>Allow a wallet in the multisig give approval to a proposal</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientMethods</code>](#MultisigClientMethods) | ||
**Returns**: <code>\*</code> - <p>{AsyncGenerator<ApproveProposalStepValue>}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| params | <code>ApproveMultisigProposalParams</code> | | ||
|
||
<a name="MultisigClientMethods+executeProposal"></a> | ||
|
||
### multisigClientMethods.executeProposal(ExecuteProposalParams) ⇒ <code>\*</code> | ||
<p>Allow a wallet in the multisig give approval to a proposal</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientMethods</code>](#MultisigClientMethods) | ||
**Returns**: <code>\*</code> - <p>{AsyncGenerator<ExecuteMultisigProposalStepValue>}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| ExecuteProposalParams | <code>params</code> | | ||
|
||
<a name="MultisigClientMethods+canApprove"></a> | ||
|
||
### multisigClientMethods.canApprove(addressOrEns) ⇒ <code>\*</code> | ||
<p>Returns the list of wallet addresses with signing capabilities on the plugin</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientMethods</code>](#MultisigClientMethods) | ||
**Returns**: <code>\*</code> - <p>{Promise<boolean>}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| addressOrEns | <code>string</code> | | ||
|
||
<a name="MultisigClientMethods+canExecute"></a> | ||
|
||
### multisigClientMethods.canExecute(addressOrEns) ⇒ <code>\*</code> | ||
<p>Returns the list of wallet addresses with signing capabilities on the plugin</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientMethods</code>](#MultisigClientMethods) | ||
**Returns**: <code>\*</code> - <p>{Promise<boolean>}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| addressOrEns | <code>string</code> | | ||
|
||
<a name="MultisigClientMethods+getPluginSettings"></a> | ||
|
||
### multisigClientMethods.getPluginSettings(addressOrEns) ⇒ <code>\*</code> | ||
<p>returns the plugin settings</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientMethods</code>](#MultisigClientMethods) | ||
**Returns**: <code>\*</code> - <p>{Promise<MultisigPluginSettings>}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| addressOrEns | <code>string</code> | | ||
|
||
<a name="MultisigClientMethods+getProposal"></a> | ||
|
||
### multisigClientMethods.getProposal(proposalId) ⇒ <code>\*</code> | ||
<p>Returns the details of the given proposal</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientMethods</code>](#MultisigClientMethods) | ||
**Returns**: <code>\*</code> - <p>{(Promise<MultisigProposal | null>)}</p> | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| proposalId | <code>string</code> | | ||
|
||
<a name="MultisigClientMethods+getProposals"></a> | ||
|
||
### multisigClientMethods.getProposals({) ⇒ <code>\*</code> | ||
<p>Returns a list of proposals on the Plugin, filtered by the given criteria</p> | ||
|
||
**Kind**: instance method of [<code>MultisigClientMethods</code>](#MultisigClientMethods) | ||
**Returns**: <code>\*</code> - <p>{Promise<MultisigProposalListItem[]>}</p> | ||
|
||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| { | <code>IProposalQueryParams</code> | <p>daoAddressOrEns, limit = 10, status, skip = 0, direction = SortDirection.ASC, sortBy = ProposalSortBy.CREATED_AT, }</p> | | ||
|
||
<a name="ApproveProposalStep"></a> | ||
|
||
## ApproveProposalStep | ||
<p>Defines the shape of the AddressList client class</p> | ||
|
||
**Kind**: global variable |
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
Oops, something went wrong.