Provider a generic client with high level methods to manage and interact with DAO's
Decoding module the SDK Generic Client
Encoding module the SDK Generic Client
Estimation module the SDK Generic Client
Methods module the SDK Generic Client
Provider a generic client with high level methods to manage and interact with DAO's
- -**Kind**: global class - - -## ClientDecoding -Decoding module the SDK Generic Client
- -**Kind**: global class - -* [ClientDecoding](#clientdecoding) - * [.applyInstallationAction(Uint8Array)](#clientdecodingapplyinstallationactionuint8array--decodedapplyinstallationparams) ⇒DecodedApplyInstallationParams
- * [.applyUninstallationAction(Uint8Array)](#clientdecodingapplyuninstallationactionuint8array--decodedapplyinstallationparams) ⇒ DecodedApplyInstallationParams
- * [.applyUpdateAction(data)](#clientdecodingapplyupdateactiondata--decodedapplyupdateparams) ⇒ DecodedApplyUpdateParams
- * [.grantAction(data)](#clientdecodinggrantactiondata--grantpermissiondecodedparams) ⇒ GrantPermissionDecodedParams
- * [.grantWithConditionAction(data)](#clientdecodinggrantwithconditionactiondata--grantpermissionwithconditionparams) ⇒ GrantPermissionWithConditionParams
- * [.revokeAction(data)](#clientdecodingrevokeactiondata--revokepermissiondecodedparams) ⇒ RevokePermissionDecodedParams
- * [.withdrawAction(data)](#clientdecodingwithdrawactiondata--withdrawparams) ⇒ WithdrawParams
- * [.updateDaoMetadataRawAction(data)](#clientdecodingupdatedaometadatarawactiondata--string) ⇒ string
- * [.updateDaoMetadataAction(data)](#clientdecodingupdatedaometadataactiondata--promisedaometadata) ⇒ Promise.<DaoMetadata>
- * [.setDaoUriAction(data)](#clientdecodingsetdaouriactiondata--string) ⇒ string
- * [.registerStandardCallbackAction(data)](#clientdecodingregisterstandardcallbackactiondata--registerstandardcallbackparams) ⇒ RegisterStandardCallbackParams
- * [.setSignatureValidatorAction(data)](#clientdecodingsetsignaturevalidatoractiondata--string) ⇒ string
- * [.upgradeToAndCallAction(data)](#clientdecodingupgradetoandcallactiondata--upgradetoandcallparams) ⇒ UpgradeToAndCallParams
- * [.initializeFromAction(data)](#clientdecodinginitializefromactiondata--initializefromparams) ⇒ InitializeFromParams
- * [.findInterface(data)](#clientdecodingfindinterfacedata--interfaceparams--null) ⇒ InterfaceParams
\| null
- * [.daoUpdateAction(data)](#clientdecodingdaoupdateactiondata--daoupdatedecodedparams) ⇒ DaoUpdateDecodedParams
-
-
-
-### clientDecoding.applyInstallationAction(Uint8Array) ⇒ DecodedApplyInstallationParams
-**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: DecodedApplyInstallationParams
-
-| Param | Type |
-| --- | --- |
-| Uint8Array | data
|
-
-
-
-### clientDecoding.applyUninstallationAction(Uint8Array) ⇒ DecodedApplyInstallationParams
-**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: DecodedApplyInstallationParams
-
-| Param | Type |
-| --- | --- |
-| Uint8Array | data
|
-
-
-
-### clientDecoding.applyUpdateAction(data) ⇒ DecodedApplyUpdateParams
-Decodes the apply update parameters from an encoded apply update action
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: DecodedApplyUpdateParams
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.grantAction(data) ⇒ GrantPermissionDecodedParams
-Decodes the permission parameters from an encoded grant action
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: GrantPermissionDecodedParams
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.grantWithConditionAction(data) ⇒ GrantPermissionWithConditionParams
-Decodes the grant permission with condition parameters from an encoded grant with condition action
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: GrantPermissionWithConditionParams
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.revokeAction(data) ⇒ RevokePermissionDecodedParams
-Decodes the permission parameters from an encoded revoke action
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: RevokePermissionDecodedParams
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.withdrawAction(data) ⇒ WithdrawParams
-Decodes the withdraw parameters from an encoded withdraw action
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: WithdrawParams
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.updateDaoMetadataRawAction(data) ⇒ string
-Decodes a dao metadata ipfs uri from an encoded update metadata action
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: string
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.updateDaoMetadataAction(data) ⇒ Promise.<DaoMetadata>
-Decodes a dao metadata from an encoded update metadata raw action
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: Promise.<DaoMetadata>
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.setDaoUriAction(data) ⇒ string
-Decodes the daoUri from a setDaoUriAction
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: string
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.registerStandardCallbackAction(data) ⇒ RegisterStandardCallbackParams
-Decodes the RegisterStandardCallbackParams from a registerStandardCallbackAction
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: RegisterStandardCallbackParams
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.setSignatureValidatorAction(data) ⇒ string
-Decodes the implementation address from an encoded upgradeToAction
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: string
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.upgradeToAndCallAction(data) ⇒ UpgradeToAndCallParams
-Decodes upgradeToAndCallback params from an upgradeToAndCallAction
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: UpgradeToAndCallParams
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.initializeFromAction(data) ⇒ InitializeFromParams
-Decodes the initializeFrom params from an initializeFromAction
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: InitializeFromParams
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.findInterface(data) ⇒ InterfaceParams
\| null
-Returns the decoded function info given the encoded data of an action
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: InterfaceParams
\| null
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### clientDecoding.daoUpdateAction(data) ⇒ DaoUpdateDecodedParams
-Decodes the dao update params from a daoUpdateAction
- -**Kind**: instance method of [ClientDecoding
](#clientdecoding)
-**Returns**: DaoUpdateDecodedParams
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-## ClientEncoding
-Encoding module the SDK Generic Client
- -**Kind**: global class - -* [ClientEncoding](#clientencoding) - * [.applyInstallationAction(daoAddress, params)](#clientencodingapplyinstallationactiondaoaddress-params--daoaction) ⇒DaoAction
- * [.applyUpdateAndPermissionsActionBlock(daoAddress, params)](#clientencodingapplyupdateandpermissionsactionblockdaoaddress-params--arraydaoaction) ⇒ Array.<DaoAction>
- * [.grantAction(daoAddress, params)](#clientencodinggrantactiondaoaddress-params--daoaction) ⇒ DaoAction
- * [.grantWithConditionAction(daoAddress, params)](#clientencodinggrantwithconditionactiondaoaddress-params--daoaction) ⇒ DaoAction
- * [.revokeAction(daoAddress, params)](#clientencodingrevokeactiondaoaddress-params--daoaction) ⇒ DaoAction
- * [.withdrawAction(recipientAddressOrEns, value)](#clientencodingwithdrawactionrecipientaddressorens-value--promisedaoaction) ⇒ Promise.<DaoAction>
- * [.updateDaoMetadataAction(daoAddressOrEns, params)](#clientencodingupdatedaometadataactiondaoaddressorens-params--promisedaoaction) ⇒ Promise.<DaoAction>
- * [.setDaoUriAction(daoAddressOrEns, daoUri)](#clientencodingsetdaouriactiondaoaddressorens-daouri--daoaction) ⇒ DaoAction
- * [.registerStandardCallbackAction(daoAddressOrEns, daoUri)](#clientencodingregisterstandardcallbackactiondaoaddressorens-daouri--daoaction) ⇒ DaoAction
- * [.setSignatureValidatorAction(daoAddressOrEns, signatureValidator)](#clientencodingsetsignaturevalidatoractiondaoaddressorens-signaturevalidator--daoaction) ⇒ DaoAction
- * [.upgradeToAction(daoAddressOrEns, implementationAddress)](#clientencodingupgradetoactiondaoaddressorens-implementationaddress--daoaction) ⇒ DaoAction
- * [.upgradeToAndCallAction(daoAddressOrEns, params)](#clientencodingupgradetoandcallactiondaoaddressorens-params--daoaction) ⇒ DaoAction
- * [.initializeFromAction(daoAddressOrEns, params)](#clientencodinginitializefromactiondaoaddressorens-params--daoaction) ⇒ DaoAction
- * [.daoUpdateAction(daoAddressOrEns, params)](#clientencodingdaoupdateactiondaoaddressorens-params--promisedaoaction) ⇒ Promise.<DaoAction>
-
-
-
-### clientEncoding.applyInstallationAction(daoAddress, params) ⇒ DaoAction
-**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| daoAddress | string
|
-| params | ApplyInstallationParams
|
-
-
-
-### clientEncoding.applyUpdateAndPermissionsActionBlock(daoAddress, params) ⇒ Array.<DaoAction>
-Computes the payload to be given when creating a proposal that applies an update to a plugin
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: Array.<DaoAction>
-
-| Param | Type |
-| --- | --- |
-| daoAddress | string
|
-| params | ApplyUpdateParams
|
-
-
-
-### clientEncoding.grantAction(daoAddress, params) ⇒ DaoAction
-Computes the payload to be given when creating a proposal that grants a permission within a DAO
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| daoAddress | string
|
-| params | GrantPermissionParams
|
-
-
-
-### clientEncoding.grantWithConditionAction(daoAddress, params) ⇒ DaoAction
-Computes the payload to be given when creating a proposal that grants a permission within a DAO given a certain condition
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| daoAddress | string
|
-| params | GrantPermissionWithConditionParams
|
-
-
-
-### clientEncoding.revokeAction(daoAddress, params) ⇒ DaoAction
-Computes the payload to be given when creating a proposal that revokes a permission within a DAO
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| daoAddress | string
|
-| params | RevokePermissionParams
|
-
-
-
-### clientEncoding.withdrawAction(recipientAddressOrEns, value) ⇒ Promise.<DaoAction>
-Computes the payload to be given when creating a proposal that withdraws ether from the DAO
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: Promise.<DaoAction>
-
-| Param | Type |
-| --- | --- |
-| recipientAddressOrEns | string
|
-| value | WithdrawParams
|
-
-
-
-### clientEncoding.updateDaoMetadataAction(daoAddressOrEns, params) ⇒ Promise.<DaoAction>
-Computes the payload to be given when creating a proposal that updates the metadata the DAO
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: Promise.<DaoAction>
-
-| Param | Type |
-| --- | --- |
-| daoAddressOrEns | string
|
-| params | DaoMetadata
|
-
-
-
-### clientEncoding.setDaoUriAction(daoAddressOrEns, daoUri) ⇒ DaoAction
-Computes the payload to be given when creating a proposal that sets the dao uri
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| daoAddressOrEns | string
|
-| daoUri | string
|
-
-
-
-### clientEncoding.registerStandardCallbackAction(daoAddressOrEns, daoUri) ⇒ DaoAction
-Computes the payload to be given when creating a proposal that registers a new standard callback
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| daoAddressOrEns | string
|
-| daoUri | string
|
-
-
-
-### clientEncoding.setSignatureValidatorAction(daoAddressOrEns, signatureValidator) ⇒ DaoAction
-Computes the payload to be given when creating a proposal that sets the signature validator
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| daoAddressOrEns | string
|
-| signatureValidator | string
|
-
-
-
-### clientEncoding.upgradeToAction(daoAddressOrEns, implementationAddress) ⇒ DaoAction
-Computes the payload to be given when creating a proposal that sets a new implementation for the proxy
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| daoAddressOrEns | string
|
-| implementationAddress | string
|
-
-
-
-### clientEncoding.upgradeToAndCallAction(daoAddressOrEns, params) ⇒ DaoAction
-Computes the payload to be given when creating a proposal that sets a new implementation for the proxy and calls the callback function with the specified data
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| daoAddressOrEns | string
|
-| params | UpgradeToAndCallParams
|
-
-
-
-### clientEncoding.initializeFromAction(daoAddressOrEns, params) ⇒ DaoAction
-Computes an action to be passed to the upgradeToAndCallAction method when upgrading a DAO to a new version.
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| daoAddressOrEns | string
|
-| params | InitializeFromParams
|
-
-
-
-### clientEncoding.daoUpdateAction(daoAddressOrEns, params) ⇒ Promise.<DaoAction>
-Does the necessary steps to encode an action that updates a DAO
- -**Kind**: instance method of [ClientEncoding
](#clientencoding)
-**Returns**: Promise.<DaoAction>
-
-| Param | Type |
-| --- | --- |
-| daoAddressOrEns | string
|
-| params | DaoUpdateParams
|
-
-
-
-## ClientEstimation
-Estimation module the SDK Generic Client
- -**Kind**: global class - -* [ClientEstimation](#clientestimation) - * [.createDao(_params)](#clientestimationcreatedao_params--promisegasfeeestimation) ⇒Promise.<GasFeeEstimation>
- * [.deposit(params)](#clientestimationdepositparams--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
- * [.setAllowance(_params)](#clientestimationsetallowance_params--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
- * [.prepareUpdate(params)](#clientestimationprepareupdateparams--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
-
-
-
-### clientEstimation.createDao(_params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of creating a DAO
- -**Kind**: instance method of [ClientEstimation
](#clientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| _params | CreateDaoParams
|
-
-
-
-### clientEstimation.deposit(params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of depositing ether or an ERC20 token into the DAO -This does not estimate the gas cost of updating the allowance of an ERC20 token
- -**Kind**: instance method of [ClientEstimation
](#clientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| params | DepositParams
|
-
-
-
-### clientEstimation.setAllowance(_params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of updating the allowance of an ERC20 token
- -**Kind**: instance method of [ClientEstimation
](#clientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| _params | SetAllowanceParams
|
-
-
-
-### clientEstimation.prepareUpdate(params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of preparing an update
- -**Kind**: instance method of [ClientEstimation
](#clientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| params | PrepareUpdateParams
|
-
-
-
-## ClientMethods
-Methods module the SDK Generic Client
- -**Kind**: global class - -* [ClientMethods](#clientmethods) - * [.createDao(params)](#clientmethodscreatedaoparams--asyncgeneratordaocreationstepvalue) ⇒AsyncGenerator.<DaoCreationStepValue>
- * [.pinMetadata(params)](#clientmethodspinmetadataparams--promisestring) ⇒ Promise.<string>
- * [.deposit(params)](#clientmethodsdepositparams--asyncgeneratordaodepositstepvalue) ⇒ AsyncGenerator.<DaoDepositStepValue>
- * [.setAllowance(params)](#clientmethodssetallowanceparams--asyncgeneratorsetallowancestepvalue) ⇒ AsyncGenerator.<SetAllowanceStepValue>
- * [.prepareUninstallation(params)](#clientmethodsprepareuninstallationparams--asyncgeneratorprepareuninstallationstepvalue) ⇒ AsyncGenerator.<PrepareUninstallationStepValue>
- * [.prepareUpdate(params)](#clientmethodsprepareupdateparams--asyncgeneratorprepareupdatestepvalue) ⇒ AsyncGenerator.<PrepareUpdateStepValue>
- * [.hasPermission(params)](#clientmethodshaspermissionparams--promiseboolean) ⇒ Promise.<boolean>
- * [.getDao(daoAddressOrEns)](#clientmethodsgetdaodaoaddressorens--promisedaodetailsnull) ⇒ Promise.<(DaoDetails\|null)>
- * [.getDaos(params)](#clientmethodsgetdaosparams--promisearraydaolistitem) ⇒ Promise.<Array.<DaoListItem>>
- * [.getDaoBalances(params)](#clientmethodsgetdaobalancesparams--promisearrayassetbalancenull) ⇒ Promise.<(Array.<AssetBalance>\|null)>
- * [.getDaoTransfers(params)](#clientmethodsgetdaotransfersparams--promisearraytransfernull) ⇒ Promise.<(Array.<Transfer>\|null)>
- * [.getPlugins(params)](#clientmethodsgetpluginsparams--promisearraypluginreponull) ⇒ Promise.<(Array.<PluginRepo>\|null)>
- * [.getPlugin(pluginAddress)](#clientmethodsgetpluginpluginaddress--promisepluginrepo) ⇒ Promise.<PluginRepo>
- * [.getProtocolVersion(contractAddress)](#clientmethodsgetprotocolversioncontractaddress--promisearraynumber) ⇒ Promise.<Array.<number>>
- * [.isDaoUpdateProposal(proposalId)](#clientmethodsisdaoupdateproposalproposalid--promiseboolean) ⇒ Promise.<boolean>
- * [.isPluginUpdateProposal(proposalId)](#clientmethodsispluginupdateproposalproposalid--promiseboolean) ⇒ Promise.<boolean>
- * [.isPluginUpdateProposalValid(proposalId)](#clientmethodsispluginupdateproposalvalidproposalid--promisepluginupdateproposalvalidity) ⇒ Promise.<PluginUpdateProposalValidity>
- * [.isDaoUpdateProposalValid(proposalId, [version])](#clientmethodsisdaoupdateproposalvalidproposalid-version--promisedaoupdateproposalvalidity) ⇒ Promise.<DaoUpdateProposalValidity>
- * [.getDaoImplementation(daoFactoryAddress)](#clientmethodsgetdaoimplementationdaofactoryaddress--promisestring) ⇒ Promise.<string>
-
-
-
-### clientMethods.createDao(params) ⇒ AsyncGenerator.<DaoCreationStepValue>
-Creates a DAO with the given settings and plugins
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: AsyncGenerator.<DaoCreationStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | CreateDaoParams
|
-
-
-
-### clientMethods.pinMetadata(params) ⇒ Promise.<string>
-Pins a metadata object into IPFS and retruns the generated hash
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<string>
-
-| Param | Type |
-| --- | --- |
-| params | DaoMetadata
|
-
-
-
-### clientMethods.deposit(params) ⇒ AsyncGenerator.<DaoDepositStepValue>
-Deposits ether or an ERC20 token into the DAO
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: AsyncGenerator.<DaoDepositStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | DepositParams
|
-
-
-
-### clientMethods.setAllowance(params) ⇒ AsyncGenerator.<SetAllowanceStepValue>
-Checks if the allowance is enough and updates it
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: AsyncGenerator.<SetAllowanceStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | SetAllowanceParams
|
-
-
-
-### clientMethods.prepareUninstallation(params) ⇒ AsyncGenerator.<PrepareUninstallationStepValue>
-Prepare uninstallation of a plugin
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: AsyncGenerator.<PrepareUninstallationStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | PrepareUninstallationParams
|
-
-
-
-### clientMethods.prepareUpdate(params) ⇒ AsyncGenerator.<PrepareUpdateStepValue>
-Prepare update of a plugin
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: AsyncGenerator.<PrepareUpdateStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | PrepareUpdateParams
|
-
-
-
-### clientMethods.hasPermission(params) ⇒ Promise.<boolean>
-Checks whether a role is granted by the current DAO's ACL settings
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<boolean>
-
-| Param | Type |
-| --- | --- |
-| params | HasPermissionParams
|
-
-
-
-### clientMethods.getDao(daoAddressOrEns) ⇒ Promise.<(DaoDetails\|null)>
-Retrieves metadata for DAO with given identifier (address or ens domain)
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<(DaoDetails\|null)>
-
-| Param | Type |
-| --- | --- |
-| daoAddressOrEns | string
|
-
-
-
-### clientMethods.getDaos(params) ⇒ Promise.<Array.<DaoListItem>>
-Retrieves metadata for DAO with given identifier (address or ens domain)
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<Array.<DaoListItem>>
-
-| Param | Type | Description |
-| --- | --- | --- |
-| params | DaoQueryParams
| Promise.<(Array.<AssetBalance>\|null)>
-Retrieves the asset balances of the given DAO, by default, ETH, DAI, USDC and USDT on Mainnet
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<(Array.<AssetBalance>\|null)>
-
-| Param | Type | Description |
-| --- | --- | --- |
-| params | DaoBalancesQueryParams
| Promise.<(Array.<Transfer>\|null)>
-Retrieves the list of asset transfers to and from the given DAO (by default, from ETH, DAI, USDC and USDT, on Mainnet)
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<(Array.<Transfer>\|null)>
-
-| Param | Type | Description |
-| --- | --- | --- |
-| params | TransferQueryParams
| Promise.<(Array.<PluginRepo>\|null)>
-Retrieves the list of plugins available on the PluginRegistry
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<(Array.<PluginRepo>\|null)>
-
-| Param | Type | Description |
-| --- | --- | --- |
-| params | PluginQueryParams
| Promise.<PluginRepo>
-Get plugin details given an address, release and build
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<PluginRepo>
-
-| Param | Type |
-| --- | --- |
-| pluginAddress | string
|
-
-
-
-### clientMethods.getProtocolVersion(contractAddress) ⇒ Promise.<Array.<number>>
-Returns the protocol version of a contract -if the transaction fails returns [1,0,0]
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<Array.<number>>
-
-| Param | Type |
-| --- | --- |
-| contractAddress | string
|
-
-
-
-### clientMethods.isDaoUpdateProposal(proposalId) ⇒ Promise.<boolean>
-Given a proposal id returns if that proposal is a dao update proposal
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<boolean>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### clientMethods.isPluginUpdateProposal(proposalId) ⇒ Promise.<boolean>
-Given a proposal id returns if that proposal is a plugin update proposal
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<boolean>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### clientMethods.isPluginUpdateProposalValid(proposalId) ⇒ Promise.<PluginUpdateProposalValidity>
-Check if the specified proposal id is valid for updating a plugin
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<PluginUpdateProposalValidity>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### clientMethods.isDaoUpdateProposalValid(proposalId, [version]) ⇒ Promise.<DaoUpdateProposalValidity>
-Check if the specified proposalId actions are valid for updating a dao
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<DaoUpdateProposalValidity>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-| [version] | SupportedVersion
|
-
-
-
-### clientMethods.getDaoImplementation(daoFactoryAddress) ⇒ Promise.<string>
-Return the implementation address for the specified dao factory
- -**Kind**: instance method of [ClientMethods
](#clientmethods)
-**Returns**: Promise.<string>
-
-| Param | Type |
-| --- | --- |
-| daoFactoryAddress | string
|
-
diff --git a/versioned_docs/version-1.3.0/sdk/02-reference-guide/02-multisig.md b/versioned_docs/version-1.3.0/sdk/02-reference-guide/02-multisig.md
deleted file mode 100644
index 4b337ced..00000000
--- a/versioned_docs/version-1.3.0/sdk/02-reference-guide/02-multisig.md
+++ /dev/null
@@ -1,404 +0,0 @@
-## Classes
-
-Provider a generic client with high level methods to manage and interact an Address List Voting plugin installed in a DAO
Decoding module for the SDK AddressList Client
Encoding module for the SDK Multisig Client
Estimation module the SDK Address List Client
Methods module the SDK Address List Client
Provider a generic client with high level methods to manage and interact an Address List Voting plugin installed in a DAO
- -**Kind**: global class - - -### MultisigClient.getPluginInstallItem(params, [network]) ⇒PluginInstallItem
-Computes the parameters to be given when creating the DAO, -so that the plugin is configured
- -**Kind**: static method of [MultisigClient
](#multisigclient)
-**Returns**: PluginInstallItem
-
-| Param | Type | Default |
-| --- | --- | --- |
-| params | MultisigPluginInstallParams
| |
-| [network] | Networkish
| "mainnet"
|
-
-
-
-## MultisigClientDecoding
-Decoding module for the SDK AddressList Client
- -**Kind**: global class - -* [MultisigClientDecoding](#multisigclientdecoding) - * [.addAddressesAction(data)](#multisigclientdecodingaddaddressesactiondata--arraystring) ⇒Array.<string>
- * [.removeAddressesAction(data)](#multisigclientdecodingremoveaddressesactiondata--arraystring) ⇒ Array.<string>
- * [.updateMultisigVotingSettings(data)](#multisigclientdecodingupdatemultisigvotingsettingsdata--multisigvotingsettings) ⇒ MultisigVotingSettings
- * [.findInterface(data)](#multisigclientdecodingfindinterfacedata--interfaceparams--null) ⇒ InterfaceParams
\| null
-
-
-
-### multisigClientDecoding.addAddressesAction(data) ⇒ Array.<string>
-Decodes a list of addresses from an encoded add members action
- -**Kind**: instance method of [MultisigClientDecoding
](#multisigclientdecoding)
-**Returns**: Array.<string>
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### multisigClientDecoding.removeAddressesAction(data) ⇒ Array.<string>
-Decodes a list of addresses from an encoded remove members action
- -**Kind**: instance method of [MultisigClientDecoding
](#multisigclientdecoding)
-**Returns**: Array.<string>
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### multisigClientDecoding.updateMultisigVotingSettings(data) ⇒ MultisigVotingSettings
-Decodes a list of min approvals from an encoded update min approval action
- -**Kind**: instance method of [MultisigClientDecoding
](#multisigclientdecoding)
-**Returns**: MultisigVotingSettings
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### multisigClientDecoding.findInterface(data) ⇒ InterfaceParams
\| null
-Returns the decoded function info given the encoded data of an action
- -**Kind**: instance method of [MultisigClientDecoding
](#multisigclientdecoding)
-**Returns**: InterfaceParams
\| null
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-## MultisigClientEncoding
-Encoding module for the SDK Multisig Client
- -**Kind**: global class - -* [MultisigClientEncoding](#multisigclientencoding) - * _instance_ - * [.addAddressesAction(params)](#multisigclientencodingaddaddressesactionparams--arraydaoaction) ⇒Array.<DaoAction>
- * [.removeAddressesAction(params)](#multisigclientencodingremoveaddressesactionparams--arraydaoaction) ⇒ Array.<DaoAction>
- * [.updateMultisigVotingSettings(params)](#multisigclientencodingupdatemultisigvotingsettingsparams--daoaction) ⇒ DaoAction
- * _static_
- * [.getPluginInstallItem(params, network)](#multisigclientencodinggetplugininstallitemparams-network--plugininstallitem) ⇒ PluginInstallItem
-
-
-
-### multisigClientEncoding.addAddressesAction(params) ⇒ Array.<DaoAction>
-Computes the parameters to be given when creating a proposal that updates the governance configuration
- -**Kind**: instance method of [MultisigClientEncoding
](#multisigclientencoding)
-**Returns**: Array.<DaoAction>
-
-| Param | Type |
-| --- | --- |
-| params | AddAddressesParams
|
-
-
-
-### multisigClientEncoding.removeAddressesAction(params) ⇒ Array.<DaoAction>
-Computes the parameters to be given when creating a proposal that adds addresses to address list
- -**Kind**: instance method of [MultisigClientEncoding
](#multisigclientencoding)
-**Returns**: Array.<DaoAction>
-
-| Param | Type |
-| --- | --- |
-| params | RemoveAddressesParams
|
-
-
-
-### multisigClientEncoding.updateMultisigVotingSettings(params) ⇒ DaoAction
-Computes the parameters to be given when creating a proposal updates multisig settings
- -**Kind**: instance method of [MultisigClientEncoding
](#multisigclientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| params | UpdateMultisigVotingSettingsParams
|
-
-
-
-### MultisigClientEncoding.getPluginInstallItem(params, network) ⇒ PluginInstallItem
-Computes the parameters to be given when creating the DAO, -so that the plugin is configured
- -**Kind**: static method of [MultisigClientEncoding
](#multisigclientencoding)
-**Returns**: PluginInstallItem
-
-| Param | Type |
-| --- | --- |
-| params | MultisigPluginInstallParams
|
-| network | Networkish
|
-
-
-
-## MultisigClientEstimation
-Estimation module the SDK Address List Client
- -**Kind**: global class - -* [MultisigClientEstimation](#multisigclientestimation) - * [.createProposal(params)](#multisigclientestimationcreateproposalparams--promisegasfeeestimation) ⇒Promise.<GasFeeEstimation>
- * [.approveProposal(params)](#multisigclientestimationapproveproposalparams--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
- * [.executeProposal(proposalId)](#multisigclientestimationexecuteproposalproposalid--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
- * [.prepareUpdate(params)](#multisigclientestimationprepareupdateparams--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
-
-
-
-### multisigClientEstimation.createProposal(params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of creating a proposal on the plugin
- -**Kind**: instance method of [MultisigClientEstimation
](#multisigclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| params | CreateMultisigProposalParams
|
-
-
-
-### multisigClientEstimation.approveProposal(params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of approving a proposal
- -**Kind**: instance method of [MultisigClientEstimation
](#multisigclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| params | ApproveMultisigProposalParams
|
-
-
-
-### multisigClientEstimation.executeProposal(proposalId) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of executing a proposal
- -**Kind**: instance method of [MultisigClientEstimation
](#multisigclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### multisigClientEstimation.prepareUpdate(params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of preparing an update
- -**Kind**: instance method of [MultisigClientEstimation
](#multisigclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| params | MultisigPluginPrepareUpdateParams
|
-
-
-
-## MultisigClientMethods
-Methods module the SDK Address List Client
- -**Kind**: global class - -* [MultisigClientMethods](#multisigclientmethods) - * [.createProposal(params)](#multisigclientmethodscreateproposalparams--asyncgeneratorproposalcreationstepvalue) ⇒AsyncGenerator.<ProposalCreationStepValue>
- * [.pinMetadata(params)](#multisigclientmethodspinmetadataparams--promisestring) ⇒ Promise.<string>
- * [.approveProposal(params)](#multisigclientmethodsapproveproposalparams--asyncgeneratorapproveproposalstepvalue) ⇒ AsyncGenerator.<ApproveProposalStepValue>
- * [.executeProposal(proposalId)](#multisigclientmethodsexecuteproposalproposalid--asyncgeneratorexecutemultisigproposalstepvalue) ⇒ AsyncGenerator.<ExecuteMultisigProposalStepValue>
- * [.prepareInstallation(params)](#multisigclientmethodsprepareinstallationparams--asyncgeneratorprepareinstallationstepvalue) ⇒ AsyncGenerator.<PrepareInstallationStepValue>
- * [.prepareUpdate(params)](#multisigclientmethodsprepareupdateparams--asyncgeneratorprepareupdatestepvalue) ⇒ AsyncGenerator.<PrepareUpdateStepValue>
- * [.canApprove(addressOrEns)](#multisigclientmethodscanapproveaddressorens--promiseboolean) ⇒ Promise.<boolean>
- * [.canExecute(proposalId)](#multisigclientmethodscanexecuteproposalid--promiseboolean) ⇒ Promise.<boolean>
- * [.getVotingSettings(addressOrEns, blockNumber)](#multisigclientmethodsgetvotingsettingsaddressorens-blocknumber--promisemultisigvotingsettings) ⇒ Promise.<MultisigVotingSettings>
- * [.getMembers(params)](#multisigclientmethodsgetmembersparams--promisearraystring) ⇒ Promise.<Array.<string>>
- * [.getProposal(proposalId)](#multisigclientmethodsgetproposalproposalid--promisemultisigproposalnull) ⇒ Promise.<(MultisigProposal\|null)>
- * [.getProposals(params)](#multisigclientmethodsgetproposalsparams--promisearraymultisigproposallistitem) ⇒ Promise.<Array.<MultisigProposalListItem>>
- * [.isMember(params)](#multisigclientmethodsismemberparams--boolean) ⇒ boolean
-
-
-
-### multisigClientMethods.createProposal(params) ⇒ AsyncGenerator.<ProposalCreationStepValue>
-Creates a new proposal on the given multisig plugin contract
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: AsyncGenerator.<ProposalCreationStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | CreateMultisigProposalParams
|
-
-
-
-### multisigClientMethods.pinMetadata(params) ⇒ Promise.<string>
-Pins a metadata object into IPFS and retruns the generated hash
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: Promise.<string>
-
-| Param | Type |
-| --- | --- |
-| params | ProposalMetadata
|
-
-
-
-### multisigClientMethods.approveProposal(params) ⇒ AsyncGenerator.<ApproveProposalStepValue>
-Allow a wallet in the multisig give approval to a proposal
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: AsyncGenerator.<ApproveProposalStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | ApproveMultisigProposalParams
|
-
-
-
-### multisigClientMethods.executeProposal(proposalId) ⇒ AsyncGenerator.<ExecuteMultisigProposalStepValue>
-Allow a wallet in the multisig give approval to a proposal
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: AsyncGenerator.<ExecuteMultisigProposalStepValue>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### multisigClientMethods.prepareInstallation(params) ⇒ AsyncGenerator.<PrepareInstallationStepValue>
-Prepares the installation of a multisig plugin in a given dao
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: AsyncGenerator.<PrepareInstallationStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | MultisigPluginPrepareInstallationParams
|
-
-
-
-### multisigClientMethods.prepareUpdate(params) ⇒ AsyncGenerator.<PrepareUpdateStepValue>
-Prepares the update of a multisig plugin in a given dao
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: AsyncGenerator.<PrepareUpdateStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | MultisigPluginPrepareUpdateParams
|
-
-
-
-### multisigClientMethods.canApprove(addressOrEns) ⇒ Promise.<boolean>
-Checks whether the current proposal can be approved by the given address
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: Promise.<boolean>
-
-| Param | Type |
-| --- | --- |
-| addressOrEns | string
|
-
-
-
-### multisigClientMethods.canExecute(proposalId) ⇒ Promise.<boolean>
-Checks whether the current proposal can be executed
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: Promise.<boolean>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### multisigClientMethods.getVotingSettings(addressOrEns, blockNumber) ⇒ Promise.<MultisigVotingSettings>
-Returns the voting settings
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: Promise.<MultisigVotingSettings>
-
-| Param | Type |
-| --- | --- |
-| addressOrEns | string
|
-| blockNumber | number
|
-
-
-
-### multisigClientMethods.getMembers(params) ⇒ Promise.<Array.<string>>
-returns the members of the multisig
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: Promise.<Array.<string>>
-
-| Param | Type | Description |
-| --- | --- | --- |
-| params | MembersQueryParams
| Promise.<(MultisigProposal\|null)>
-Returns the details of the given proposal
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: Promise.<(MultisigProposal\|null)>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### multisigClientMethods.getProposals(params) ⇒ Promise.<Array.<MultisigProposalListItem>>
-Returns a list of proposals on the Plugin, filtered by the given criteria
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: Promise.<Array.<MultisigProposalListItem>>
-
-| Param | Type | Description |
-| --- | --- | --- |
-| params | ProposalQueryParams
| boolean
-Checks if a given address is a member of the tokenVoting contract.
- -**Kind**: instance method of [MultisigClientMethods
](#multisigclientmethods)
-**Returns**: boolean
- A boolean indicating whether the address is a member or not.
-
-| Param | Description |
-| --- | --- |
-| params | The parameters for the isMember method.
| -| params.pluginAddress |The address of the plugin.
| -| params.address |The address to check.
| -| params.blockNumber |The block number for specifying a specific block.
| - diff --git a/versioned_docs/version-1.3.0/sdk/02-reference-guide/03-token-voting.md b/versioned_docs/version-1.3.0/sdk/02-reference-guide/03-token-voting.md deleted file mode 100644 index 5cc52f9e..00000000 --- a/versioned_docs/version-1.3.0/sdk/02-reference-guide/03-token-voting.md +++ /dev/null @@ -1,463 +0,0 @@ -## Classes - -Provider a generic client with high level methods to manage and interact a Token Voting plugin installed in a DAO
Decoding module the SDK TokenVoting Client
Encoding module the SDK TokenVoting Client
Estimation module the SDK TokenVoting Client
Methods module the SDK TokenVoting Client
Provider a generic client with high level methods to manage and interact a Token Voting plugin installed in a DAO
- -**Kind**: global class - -* [TokenVotingClient](#tokenvotingclient) - * [.getPluginInstallItem(params, [network])](#tokenvotingclientgetplugininstallitemparams-network--plugininstallitem) ⇒PluginInstallItem
- * [.TokenVotingClientMethods#createProposal(params)](#tokenvotingclienttokenvotingclientmethodscreateproposalparams--asyncgeneratorproposalcreationstepvalue) ⇒ AsyncGenerator.<ProposalCreationStepValue>
- * [.TokenVotingClientMethods#voteProposal(params, vote)](#tokenvotingclienttokenvotingclientmethodsvoteproposalparams-vote--asyncgeneratorvoteproposalstepvalue) ⇒ AsyncGenerator.<VoteProposalStepValue>
- * [.TokenVotingClientMethods#executeProposal(proposalId)](#tokenvotingclienttokenvotingclientmethodsexecuteproposalproposalid--asyncgeneratorexecuteproposalstepvalue) ⇒ AsyncGenerator.<ExecuteProposalStepValue>
- * [.TokenVotingClientMethods#getProposal(proposalId)](#tokenvotingclienttokenvotingclientmethodsgetproposalproposalid--promisetokenvotingproposal) ⇒ Promise.<TokenVotingProposal>
- * [.TokenVotingClientMethods#getProposals(params)](#tokenvotingclienttokenvotingclientmethodsgetproposalsparams--promisearraytokenvotingproposallistitem) ⇒ Promise.<Array.<TokenVotingProposalListItem>>
- * [.TokenVotingClientMethods#getVotingSettings(pluginAddress, blockNumber)](#tokenvotingclienttokenvotingclientmethodsgetvotingsettingspluginaddress-blocknumber--promisevotingsettings) ⇒ Promise.<VotingSettings>
- * [.TokenVotingClientMethods#getToken(pluginAddress)](#tokenvotingclienttokenvotingclientmethodsgettokenpluginaddress--promiseerc20tokendetailsnull) ⇒ Promise.<(Erc20TokenDetails\|null)>
-
-
-
-### TokenVotingClient.getPluginInstallItem(params, [network]) ⇒ PluginInstallItem
-Computes the parameters to be given when creating the DAO, -so that the plugin is configured
- -**Kind**: static method of [TokenVotingClient
](#tokenvotingclient)
-**Returns**: PluginInstallItem
-
-| Param | Type | Default |
-| --- | --- | --- |
-| params | TokenVotingPluginInstall
| |
-| [network] | Networkish
| "mainnet"
|
-
-
-
-### TokenVotingClient.TokenVotingClientMethods#createProposal(params) ⇒ AsyncGenerator.<ProposalCreationStepValue>
-Creates a new proposal on the given TokenVoting plugin contract
- -**Kind**: static method of [TokenVotingClient
](#tokenvotingclient)
-**Returns**: AsyncGenerator.<ProposalCreationStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | CreateMajorityVotingProposalParams
|
-
-
-
-### TokenVotingClient.TokenVotingClientMethods#voteProposal(params, vote) ⇒ AsyncGenerator.<VoteProposalStepValue>
-Cast a vote on the given proposal using the client's wallet. Depending on the proposal settings, an affirmative vote may execute the proposal's actions on the DAO.
- -**Kind**: static method of [TokenVotingClient
](#tokenvotingclient)
-**Returns**: AsyncGenerator.<VoteProposalStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | VoteProposalParams
|
-| vote | VoteValues
|
-
-
-
-### TokenVotingClient.TokenVotingClientMethods#executeProposal(proposalId) ⇒ AsyncGenerator.<ExecuteProposalStepValue>
-Executes the given proposal, provided that it has already passed
- -**Kind**: static method of [TokenVotingClient
](#tokenvotingclient)
-**Returns**: AsyncGenerator.<ExecuteProposalStepValue>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### TokenVotingClient.TokenVotingClientMethods#getProposal(proposalId) ⇒ Promise.<TokenVotingProposal>
-Returns the details of the given proposal
- -**Kind**: static method of [TokenVotingClient
](#tokenvotingclient)
-**Returns**: Promise.<TokenVotingProposal>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### TokenVotingClient.TokenVotingClientMethods#getProposals(params) ⇒ Promise.<Array.<TokenVotingProposalListItem>>
-Returns a list of proposals on the Plugin, filtered by the given criteria
- -**Kind**: static method of [TokenVotingClient
](#tokenvotingclient)
-**Returns**: Promise.<Array.<TokenVotingProposalListItem>>
-
-| Param | Type |
-| --- | --- |
-| params | ProposalQueryParams
|
-
-
-
-### TokenVotingClient.TokenVotingClientMethods#getVotingSettings(pluginAddress, blockNumber) ⇒ Promise.<VotingSettings>
-Returns the settings of a plugin given the address of the plugin instance
- -**Kind**: static method of [TokenVotingClient
](#tokenvotingclient)
-**Returns**: Promise.<VotingSettings>
-
-| Param | Type |
-| --- | --- |
-| pluginAddress | string
|
-| blockNumber | number
|
-
-
-
-### TokenVotingClient.TokenVotingClientMethods#getToken(pluginAddress) ⇒ Promise.<(Erc20TokenDetails\|null)>
-Returns the details of the token used in a specific plugin instance
- -**Kind**: static method of [TokenVotingClient
](#tokenvotingclient)
-**Returns**: Promise.<(Erc20TokenDetails\|null)>
-
-| Param | Type |
-| --- | --- |
-| pluginAddress | string
|
-
-
-
-## TokenVotingClientDecoding
-Decoding module the SDK TokenVoting Client
- -**Kind**: global class - -* [TokenVotingClientDecoding](#tokenvotingclientdecoding) - * [.updatePluginSettingsAction(data)](#tokenvotingclientdecodingupdatepluginsettingsactiondata--votingsettings) ⇒VotingSettings
- * [.mintTokenAction(data)](#tokenvotingclientdecodingminttokenactiondata--minttokenparams) ⇒ MintTokenParams
- * [.findInterface(data)](#tokenvotingclientdecodingfindinterfacedata--interfaceparams--null) ⇒ InterfaceParams
\| null
-
-
-
-### tokenVotingClientDecoding.updatePluginSettingsAction(data) ⇒ VotingSettings
-Decodes a dao metadata from an encoded update metadata action
- -**Kind**: instance method of [TokenVotingClientDecoding
](#tokenvotingclientdecoding)
-**Returns**: VotingSettings
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### tokenVotingClientDecoding.mintTokenAction(data) ⇒ MintTokenParams
-Decodes the mint token params from an encoded mint token action
- -**Kind**: instance method of [TokenVotingClientDecoding
](#tokenvotingclientdecoding)
-**Returns**: MintTokenParams
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### tokenVotingClientDecoding.findInterface(data) ⇒ InterfaceParams
\| null
-Returns the decoded function info given the encoded data of an action
- -**Kind**: instance method of [TokenVotingClientDecoding
](#tokenvotingclientdecoding)
-**Returns**: InterfaceParams
\| null
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-## TokenVotingClientEncoding
-Encoding module the SDK TokenVoting Client
- -**Kind**: global class - -* [TokenVotingClientEncoding](#tokenvotingclientencoding) - * _instance_ - * [.updatePluginSettingsAction(pluginAddress, params)](#tokenvotingclientencodingupdatepluginsettingsactionpluginaddress-params--daoaction) ⇒DaoAction
- * [.mintTokenAction(minterAddress, params)](#tokenvotingclientencodingminttokenactionminteraddress-params--daoaction) ⇒ DaoAction
- * _static_
- * [.getPluginInstallItem(params, network)](#tokenvotingclientencodinggetplugininstallitemparams-network--plugininstallitem) ⇒ PluginInstallItem
-
-
-
-### tokenVotingClientEncoding.updatePluginSettingsAction(pluginAddress, params) ⇒ DaoAction
-Computes the parameters to be given when creating a proposal that updates the governance configuration
- -**Kind**: instance method of [TokenVotingClientEncoding
](#tokenvotingclientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| pluginAddress | string
|
-| params | VotingSettings
|
-
-
-
-### tokenVotingClientEncoding.mintTokenAction(minterAddress, params) ⇒ DaoAction
-Computes the parameters to be given when creating a proposal that mints an amount of ERC-20 tokens to an address
- -**Kind**: instance method of [TokenVotingClientEncoding
](#tokenvotingclientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| minterAddress | string
|
-| params | MintTokenParams
|
-
-
-
-### TokenVotingClientEncoding.getPluginInstallItem(params, network) ⇒ PluginInstallItem
-Computes the parameters to be given when creating the DAO, -so that the plugin is configured
- -**Kind**: static method of [TokenVotingClientEncoding
](#tokenvotingclientencoding)
-**Returns**: PluginInstallItem
-
-| Param | Type |
-| --- | --- |
-| params | TokenVotingPluginInstall
|
-| network | Networkish
|
-
-
-
-## TokenVotingClientEstimation
-Estimation module the SDK TokenVoting Client
- -**Kind**: global class - -* [TokenVotingClientEstimation](#tokenvotingclientestimation) - * [.createProposal(params)](#tokenvotingclientestimationcreateproposalparams--promisegasfeeestimation) ⇒Promise.<GasFeeEstimation>
- * [.voteProposal(params)](#tokenvotingclientestimationvoteproposalparams--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
- * [.executeProposal(proposalId)](#tokenvotingclientestimationexecuteproposalproposalid--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
- * [.delegateTokens(params)](#tokenvotingclientestimationdelegatetokensparams--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
- * [.undelegateTokens(tokenAddress)](#tokenvotingclientestimationundelegatetokenstokenaddress--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
- * [.prepareUpdate(params)](#tokenvotingclientestimationprepareupdateparams--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
-
-
-
-### tokenVotingClientEstimation.createProposal(params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of creating a proposal on the plugin
- -**Kind**: instance method of [TokenVotingClientEstimation
](#tokenvotingclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| params | CreateMajorityVotingProposalParams
|
-
-
-
-### tokenVotingClientEstimation.voteProposal(params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of casting a vote on a proposal
- -**Kind**: instance method of [TokenVotingClientEstimation
](#tokenvotingclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| params | VoteProposalParams
|
-
-
-
-### tokenVotingClientEstimation.executeProposal(proposalId) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of executing a TokenVoting proposal
- -**Kind**: instance method of [TokenVotingClientEstimation
](#tokenvotingclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### tokenVotingClientEstimation.delegateTokens(params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of delegating voting power to a delegatee
- -**Kind**: instance method of [TokenVotingClientEstimation
](#tokenvotingclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| params | DelegateTokensParams
|
-
-
-
-### tokenVotingClientEstimation.undelegateTokens(tokenAddress) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of undelegating voting power
- -**Kind**: instance method of [TokenVotingClientEstimation
](#tokenvotingclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| tokenAddress | string
|
-
-
-
-### tokenVotingClientEstimation.prepareUpdate(params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of preparing an update
- -**Kind**: instance method of [TokenVotingClientEstimation
](#tokenvotingclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| params | TokenVotingPluginPrepareUpdateParams
|
-
-
-
-## TokenVotingClientMethods
-Methods module the SDK TokenVoting Client
- -**Kind**: global class - -* [TokenVotingClientMethods](#tokenvotingclientmethods) - * [.prepareInstallation(params)](#tokenvotingclientmethodsprepareinstallationparams--asyncgeneratorprepareinstallationstepvalue) ⇒AsyncGenerator.<PrepareInstallationStepValue>
- * [.prepareUpdate(params)](#tokenvotingclientmethodsprepareupdateparams--asyncgeneratorprepareupdatestepvalue) ⇒ AsyncGenerator.<PrepareUpdateStepValue>
- * [.delegateTokens(params)](#tokenvotingclientmethodsdelegatetokensparams--asyncgeneratordelegatetokensstepvalue) ⇒ AsyncGenerator.<DelegateTokensStepValue>
- * [.undelegateTokens(tokenAddress)](#tokenvotingclientmethodsundelegatetokenstokenaddress--asyncgeneratorundelegatetokensstepvalue) ⇒ AsyncGenerator.<UndelegateTokensStepValue>
- * [.getDelegatee(tokenAddress)](#tokenvotingclientmethodsgetdelegateetokenaddress--promisestringnull) ⇒ Promise.<(string\|null)>
- * [.canVote(params)](#tokenvotingclientmethodscanvoteparams--promiseboolean) ⇒ Promise.<boolean>
- * [.canExecute(proposalId)](#tokenvotingclientmethodscanexecuteproposalid--promiseboolean) ⇒ Promise.<boolean>
- * [.getMembers(params)](#tokenvotingclientmethodsgetmembersparams--promisearraystring) ⇒ Promise.<Array.<string>>
- * [.isTokenVotingCompatibleToken(tokenAddress)](#tokenvotingclientmethodsistokenvotingcompatibletokentokenaddress--promisetokenvotingtokencompatibility) ⇒ Promise.<TokenVotingTokenCompatibility>
- * [.isMember(params)](#tokenvotingclientmethodsismemberparams--boolean) ⇒ boolean
-
-
-
-### tokenVotingClientMethods.prepareInstallation(params) ⇒ AsyncGenerator.<PrepareInstallationStepValue>
-Prepares the installation of a token voting plugin in a given dao
- -**Kind**: instance method of [TokenVotingClientMethods
](#tokenvotingclientmethods)
-**Returns**: AsyncGenerator.<PrepareInstallationStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | TokenVotingPluginPrepareInstallationParams
|
-
-
-
-### tokenVotingClientMethods.prepareUpdate(params) ⇒ AsyncGenerator.<PrepareUpdateStepValue>
-Prepares the update of a token voting plugin in a given dao
- -**Kind**: instance method of [TokenVotingClientMethods
](#tokenvotingclientmethods)
-**Returns**: AsyncGenerator.<PrepareUpdateStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | TokenVotingPluginPrepareUpdateParams
|
-
-
-
-### tokenVotingClientMethods.delegateTokens(params) ⇒ AsyncGenerator.<DelegateTokensStepValue>
-Delegates all the signer's voting power to a delegatee
- -**Kind**: instance method of [TokenVotingClientMethods
](#tokenvotingclientmethods)
-**Returns**: AsyncGenerator.<DelegateTokensStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | DelegateTokensParams
|
-
-
-
-### tokenVotingClientMethods.undelegateTokens(tokenAddress) ⇒ AsyncGenerator.<UndelegateTokensStepValue>
-Delegates all the signer's tokens back to itself
- -**Kind**: instance method of [TokenVotingClientMethods
](#tokenvotingclientmethods)
-**Returns**: AsyncGenerator.<UndelegateTokensStepValue>
-
-| Param | Type |
-| --- | --- |
-| tokenAddress | string
|
-
-
-
-### tokenVotingClientMethods.getDelegatee(tokenAddress) ⇒ Promise.<(string\|null)>
-Retrieves the current signer's delegatee for the given token
- -**Kind**: instance method of [TokenVotingClientMethods
](#tokenvotingclientmethods)
-**Returns**: Promise.<(string\|null)>
-
-| Param | Type |
-| --- | --- |
-| tokenAddress | string
|
-
-
-
-### tokenVotingClientMethods.canVote(params) ⇒ Promise.<boolean>
-Checks if an user can vote in a proposal
- -**Kind**: instance method of [TokenVotingClientMethods
](#tokenvotingclientmethods)
-**Returns**: Promise.<boolean>
-
-| Param | Type |
-| --- | --- |
-| params | CanVoteParams
|
-
-
-
-### tokenVotingClientMethods.canExecute(proposalId) ⇒ Promise.<boolean>
-Checks whether the current proposal can be executed
- -**Kind**: instance method of [TokenVotingClientMethods
](#tokenvotingclientmethods)
-**Returns**: Promise.<boolean>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### tokenVotingClientMethods.getMembers(params) ⇒ Promise.<Array.<string>>
-Returns the list of wallet addresses holding tokens from the underlying Token contract used by the plugin
- -**Kind**: instance method of [TokenVotingClientMethods
](#tokenvotingclientmethods)
-**Returns**: Promise.<Array.<string>>
-
-| Param | Type | Description |
-| --- | --- | --- |
-| params | MembersQueryParams
| Promise.<TokenVotingTokenCompatibility>
-Checks if the given token is compatible with the TokenVoting plugin
- -**Kind**: instance method of [TokenVotingClientMethods
](#tokenvotingclientmethods)
-**Returns**: Promise.<TokenVotingTokenCompatibility>
-
-| Param | Type |
-| --- | --- |
-| tokenAddress | string
|
-
-
-
-### tokenVotingClientMethods.isMember(params) ⇒ boolean
-Checks if a given address is a member of the tokenVoting contract.
- -**Kind**: instance method of [TokenVotingClientMethods
](#tokenvotingclientmethods)
-**Returns**: boolean
- A boolean indicating whether the address is a member or not.
-
-| Param | Description |
-| --- | --- |
-| params | The parameters for the isMember method.
| -| params.pluginAddress |The address of the plugin.
| -| params.address |The address to check.
| -| params.blockNumber |The block number for specifying a specific block.
| - diff --git a/versioned_docs/version-1.3.0/sdk/02-reference-guide/04-addresslist-voting.md b/versioned_docs/version-1.3.0/sdk/02-reference-guide/04-addresslist-voting.md deleted file mode 100644 index d7b2d34f..00000000 --- a/versioned_docs/version-1.3.0/sdk/02-reference-guide/04-addresslist-voting.md +++ /dev/null @@ -1,381 +0,0 @@ -## Classes - -Provider a generic client with high level methods to manage and interact an Address List Voting plugin installed in a DAO
Decoding module for the SDK AddressList Client
Encoding module for the SDK AddressList Client
Estimation module the SDK Address List Client
Methods module the SDK Address List Client
Provider a generic client with high level methods to manage and interact an Address List Voting plugin installed in a DAO
- -**Kind**: global class - - -### AddresslistVotingClient.getPluginInstallItem(params, [network]) ⇒PluginInstallItem
-Computes the parameters to be given when creating the DAO, -so that the plugin is configured
- -**Kind**: static method of [AddresslistVotingClient
](#addresslistvotingclient)
-**Returns**: PluginInstallItem
-
-| Param | Type | Default |
-| --- | --- | --- |
-| params | AddresslistVotingPluginInstall
| |
-| [network] | Networkish
| "mainnet"
|
-
-
-
-## AddresslistVotingClientDecoding
-Decoding module for the SDK AddressList Client
- -**Kind**: global class - -* [AddresslistVotingClientDecoding](#addresslistvotingclientdecoding) - * [.updatePluginSettingsAction(data)](#addresslistvotingclientdecodingupdatepluginsettingsactiondata--votingsettings) ⇒VotingSettings
- * [.addMembersAction(data)](#addresslistvotingclientdecodingaddmembersactiondata--arraystring) ⇒ Array.<string>
- * [.removeMembersAction(data)](#addresslistvotingclientdecodingremovemembersactiondata--arraystring) ⇒ Array.<string>
- * [.findInterface(data)](#addresslistvotingclientdecodingfindinterfacedata--interfaceparams--null) ⇒ InterfaceParams
\| null
-
-
-
-### addresslistVotingClientDecoding.updatePluginSettingsAction(data) ⇒ VotingSettings
-Decodes a dao metadata from an encoded update metadata action
- -**Kind**: instance method of [AddresslistVotingClientDecoding
](#addresslistvotingclientdecoding)
-**Returns**: VotingSettings
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### addresslistVotingClientDecoding.addMembersAction(data) ⇒ Array.<string>
-Decodes a list of addresses from an encoded add members action
- -**Kind**: instance method of [AddresslistVotingClientDecoding
](#addresslistvotingclientdecoding)
-**Returns**: Array.<string>
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### addresslistVotingClientDecoding.removeMembersAction(data) ⇒ Array.<string>
-Decodes a list of addresses from an encoded remove members action
- -**Kind**: instance method of [AddresslistVotingClientDecoding
](#addresslistvotingclientdecoding)
-**Returns**: Array.<string>
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-### addresslistVotingClientDecoding.findInterface(data) ⇒ InterfaceParams
\| null
-Returns the decoded function info given the encoded data of an action
- -**Kind**: instance method of [AddresslistVotingClientDecoding
](#addresslistvotingclientdecoding)
-**Returns**: InterfaceParams
\| null
-
-| Param | Type |
-| --- | --- |
-| data | Uint8Array
|
-
-
-
-## AddresslistVotingClientEncoding
-Encoding module for the SDK AddressList Client
- -**Kind**: global class - -* [AddresslistVotingClientEncoding](#addresslistvotingclientencoding) - * _instance_ - * [.updatePluginSettingsAction(pluginAddress, params)](#addresslistvotingclientencodingupdatepluginsettingsactionpluginaddress-params--daoaction) ⇒DaoAction
- * [.addMembersAction(pluginAddress, members)](#addresslistvotingclientencodingaddmembersactionpluginaddress-members--daoaction) ⇒ DaoAction
- * [.removeMembersAction(pluginAddress, members)](#addresslistvotingclientencodingremovemembersactionpluginaddress-members--daoaction) ⇒ DaoAction
- * _static_
- * [.getPluginInstallItem(params, network)](#addresslistvotingclientencodinggetplugininstallitemparams-network--plugininstallitem) ⇒ PluginInstallItem
-
-
-
-### addresslistVotingClientEncoding.updatePluginSettingsAction(pluginAddress, params) ⇒ DaoAction
-Computes the parameters to be given when creating a proposal that updates the governance configuration
- -**Kind**: instance method of [AddresslistVotingClientEncoding
](#addresslistvotingclientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| pluginAddress | string
|
-| params | VotingSettings
|
-
-
-
-### addresslistVotingClientEncoding.addMembersAction(pluginAddress, members) ⇒ DaoAction
-Computes the parameters to be given when creating a proposal that adds addresses to address list
- -**Kind**: instance method of [AddresslistVotingClientEncoding
](#addresslistvotingclientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| pluginAddress | string
|
-| members | Array.<string>
|
-
-
-
-### addresslistVotingClientEncoding.removeMembersAction(pluginAddress, members) ⇒ DaoAction
-Computes the parameters to be given when creating a proposal that removes addresses from the address list
- -**Kind**: instance method of [AddresslistVotingClientEncoding
](#addresslistvotingclientencoding)
-**Returns**: DaoAction
-
-| Param | Type |
-| --- | --- |
-| pluginAddress | string
|
-| members | Array.<string>
|
-
-
-
-### AddresslistVotingClientEncoding.getPluginInstallItem(params, network) ⇒ PluginInstallItem
-Computes the parameters to be given when creating the DAO, -so that the plugin is configured
- -**Kind**: static method of [AddresslistVotingClientEncoding
](#addresslistvotingclientencoding)
-**Returns**: PluginInstallItem
-
-| Param | Type |
-| --- | --- |
-| params | AddresslistVotingPluginInstall
|
-| network | Networkish
|
-
-
-
-## AddresslistVotingClientEstimation
-Estimation module the SDK Address List Client
- -**Kind**: global class - -* [AddresslistVotingClientEstimation](#addresslistvotingclientestimation) - * [.createProposal(params)](#addresslistvotingclientestimationcreateproposalparams--promisegasfeeestimation) ⇒Promise.<GasFeeEstimation>
- * [.voteProposal(params)](#addresslistvotingclientestimationvoteproposalparams--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
- * [.executeProposal(proposalId)](#addresslistvotingclientestimationexecuteproposalproposalid--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
- * [.prepareUpdate(params)](#addresslistvotingclientestimationprepareupdateparams--promisegasfeeestimation) ⇒ Promise.<GasFeeEstimation>
-
-
-
-### addresslistVotingClientEstimation.createProposal(params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of creating a proposal on the plugin
- -**Kind**: instance method of [AddresslistVotingClientEstimation
](#addresslistvotingclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| params | CreateMajorityVotingProposalParams
|
-
-
-
-### addresslistVotingClientEstimation.voteProposal(params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of casting a vote on a proposal
- -**Kind**: instance method of [AddresslistVotingClientEstimation
](#addresslistvotingclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| params | VoteProposalParams
|
-
-
-
-### addresslistVotingClientEstimation.executeProposal(proposalId) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of executing an AddressList proposal
- -**Kind**: instance method of [AddresslistVotingClientEstimation
](#addresslistvotingclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### addresslistVotingClientEstimation.prepareUpdate(params) ⇒ Promise.<GasFeeEstimation>
-Estimates the gas fee of preparing an update
- -**Kind**: instance method of [AddresslistVotingClientEstimation
](#addresslistvotingclientestimation)
-**Returns**: Promise.<GasFeeEstimation>
-
-| Param | Type |
-| --- | --- |
-| params | AddresslistVotingPluginPrepareUpdateParams
|
-
-
-
-## AddresslistVotingClientMethods
-Methods module the SDK Address List Client
- -**Kind**: global class - -* [AddresslistVotingClientMethods](#addresslistvotingclientmethods) - * [.createProposal(params)](#addresslistvotingclientmethodscreateproposalparams--asyncgeneratorproposalcreationstepvalue) ⇒AsyncGenerator.<ProposalCreationStepValue>
- * [.voteProposal(params)](#addresslistvotingclientmethodsvoteproposalparams--asyncgeneratorvoteproposalstepvalue) ⇒ AsyncGenerator.<VoteProposalStepValue>
- * [.executeProposal(proposalId)](#addresslistvotingclientmethodsexecuteproposalproposalid--asyncgeneratorexecuteproposalstepvalue) ⇒ AsyncGenerator.<ExecuteProposalStepValue>
- * [.prepareUpdate(params)](#addresslistvotingclientmethodsprepareupdateparams--asyncgeneratorprepareupdatestepvalue) ⇒ AsyncGenerator.<PrepareUpdateStepValue>
- * [.canVote(params)](#addresslistvotingclientmethodscanvoteparams--promiseboolean) ⇒ Promise.<boolean>
- * [.canExecute(proposalId)](#addresslistvotingclientmethodscanexecuteproposalid--promiseboolean) ⇒ Promise.<boolean>
- * [.getMembers(params)](#addresslistvotingclientmethodsgetmembersparams--promisearraystring) ⇒ Promise.<Array.<string>>
- * [.getProposal(proposalId)](#addresslistvotingclientmethodsgetproposalproposalid--promiseaddresslistvotingproposalnull) ⇒ Promise.<(AddresslistVotingProposal\|null)>
- * [.getProposals(params)](#addresslistvotingclientmethodsgetproposalsparams--promisearrayaddresslistvotingproposallistitem) ⇒ Promise.<Array.<AddresslistVotingProposalListItem>>
- * [.getVotingSettings(pluginAddress, blockNumber)](#addresslistvotingclientmethodsgetvotingsettingspluginaddress-blocknumber--promisevotingsettingsnull) ⇒ Promise.<(VotingSettings\|null)>
- * [.isMember(params)](#addresslistvotingclientmethodsismemberparams--boolean) ⇒ boolean
-
-
-
-### addresslistVotingClientMethods.createProposal(params) ⇒ AsyncGenerator.<ProposalCreationStepValue>
-Creates a new proposal on the given AddressList plugin contract
- -**Kind**: instance method of [AddresslistVotingClientMethods
](#addresslistvotingclientmethods)
-**Returns**: AsyncGenerator.<ProposalCreationStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | CreateMajorityVotingProposalParams
|
-
-
-
-### addresslistVotingClientMethods.voteProposal(params) ⇒ AsyncGenerator.<VoteProposalStepValue>
-Cast a vote on the given proposal using the client's wallet. Depending on the proposal settings, an affirmative vote may execute the proposal's actions on the DAO.
- -**Kind**: instance method of [AddresslistVotingClientMethods
](#addresslistvotingclientmethods)
-**Returns**: AsyncGenerator.<VoteProposalStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | VoteProposalParams
|
-
-
-
-### addresslistVotingClientMethods.executeProposal(proposalId) ⇒ AsyncGenerator.<ExecuteProposalStepValue>
-Executes the given proposal, provided that it has already passed
- -**Kind**: instance method of [AddresslistVotingClientMethods
](#addresslistvotingclientmethods)
-**Returns**: AsyncGenerator.<ExecuteProposalStepValue>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### addresslistVotingClientMethods.prepareUpdate(params) ⇒ AsyncGenerator.<PrepareUpdateStepValue>
-Prepares the update of a token voting plugin in a given dao
- -**Kind**: instance method of [AddresslistVotingClientMethods
](#addresslistvotingclientmethods)
-**Returns**: AsyncGenerator.<PrepareUpdateStepValue>
-
-| Param | Type |
-| --- | --- |
-| params | AddresslistVotingPluginPrepareUpdateParams
|
-
-
-
-### addresslistVotingClientMethods.canVote(params) ⇒ Promise.<boolean>
-Checks if an user can vote in a proposal
- -**Kind**: instance method of [AddresslistVotingClientMethods
](#addresslistvotingclientmethods)
-**Returns**: Promise.<boolean>
-
-| Param | Type |
-| --- | --- |
-| params | CanVoteParams
|
-
-
-
-### addresslistVotingClientMethods.canExecute(proposalId) ⇒ Promise.<boolean>
-Checks whether the current proposal can be executed
- -**Kind**: instance method of [AddresslistVotingClientMethods
](#addresslistvotingclientmethods)
-**Returns**: Promise.<boolean>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### addresslistVotingClientMethods.getMembers(params) ⇒ Promise.<Array.<string>>
-Returns the list of wallet addresses with signing capabilities on the plugin
- -**Kind**: instance method of [AddresslistVotingClientMethods
](#addresslistvotingclientmethods)
-**Returns**: Promise.<Array.<string>>
-
-| Param | Type | Description |
-| --- | --- | --- |
-| params | MembersQueryParams
| Promise.<(AddresslistVotingProposal\|null)>
-Returns the details of the given proposal
- -**Kind**: instance method of [AddresslistVotingClientMethods
](#addresslistvotingclientmethods)
-**Returns**: Promise.<(AddresslistVotingProposal\|null)>
-
-| Param | Type |
-| --- | --- |
-| proposalId | string
|
-
-
-
-### addresslistVotingClientMethods.getProposals(params) ⇒ Promise.<Array.<AddresslistVotingProposalListItem>>
-Returns a list of proposals on the Plugin, filtered by the given criteria
- -**Kind**: instance method of [AddresslistVotingClientMethods
](#addresslistvotingclientmethods)
-**Returns**: Promise.<Array.<AddresslistVotingProposalListItem>>
-
-| Param | Type | Description |
-| --- | --- | --- |
-| params | ProposalQueryParams
| Promise.<(VotingSettings\|null)>
-Returns the settings of a plugin given the address of the plugin instance
- -**Kind**: instance method of [AddresslistVotingClientMethods
](#addresslistvotingclientmethods)
-**Returns**: Promise.<(VotingSettings\|null)>
-
-| Param | Type |
-| --- | --- |
-| pluginAddress | string
|
-| blockNumber | number
|
-
-
-
-### addresslistVotingClientMethods.isMember(params) ⇒ boolean
-Checks if a given address is a member of the AddresslistVoting contract.
- -**Kind**: instance method of [AddresslistVotingClientMethods
](#addresslistvotingclientmethods)
-**Returns**: boolean
- A boolean indicating whether the address is a member or not.
-
-| Param | Description |
-| --- | --- |
-| params | The parameters for the isMember method.
| -| params.pluginAddress |The address of the plugin.
| -| params.address |The address to check.
| -| params.blockNumber |The block number for specifying a specific block.
| - diff --git a/versioned_docs/version-1.3.0/sdk/02-reference-guide/index.md b/versioned_docs/version-1.3.0/sdk/02-reference-guide/index.md deleted file mode 100644 index 5e57cd92..00000000 --- a/versioned_docs/version-1.3.0/sdk/02-reference-guide/index.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Reference Guide ---- - -## Overview - -This section contains the auto-generated documentation of the individual clients that the `@aragon/sdk-client` is offering: - -- [Generic SDK Client](./01-client.md) -- [Multisig Client](./02-multisig.md) -- [Token Voting Client](./03-token-voting.md) -- [Addresslist Voting Client](./04-addresslist-voting.md) diff --git a/versioned_docs/version-1.3.0/sdk/03-update-security-check/index.md b/versioned_docs/version-1.3.0/sdk/03-update-security-check/index.md deleted file mode 100644 index 212b1bae..00000000 --- a/versioned_docs/version-1.3.0/sdk/03-update-security-check/index.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -title: Update Security Check ---- - -## Context - -Aragon DAOs and the plugins installed can be updated via proposals. Upon execution, the proposal will call the DAO's [`execute` function][execute] and execute whatever action are specified inside its action list. -Accordingly, proposals must be checked thoroughly, especially when it comes to DAO or plugin updates. This happens automatically on the Aragon App frontend. - -All proposals scheduled in the DAO are checked via their proposal ID. A proposal is identified as an update proposals if it contains - -- one call to either - - [`upgradeTo(address newImplementation)`][oz-upgradeto] - OR - - [`upgradeToAndCall(address newImplementation, bytes memory data)`][oz-upgradetoandcall] -- one or more calls to [`applyUpdate(address _dao, ApplyUpdateParams _params)`][applyupdate] - -If a proposal is identified as an update proposal, we conduct general and specific checks on it. - -## General Proposal Checks - -After a proposal was identified as an update proposal, we check that only allowed actions are part of the action list and that none of them is allowed to fail. - -| Error | Explanation | -| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `"invalidActions"` | The proposal contains unexpected actions that are not allowed for update proposals. | -| `"nonZeroAllowFailureMapValue"` | The allow failure map is not zero (see [the Aragon OSX docs](https://devs.aragon.org/docs/osx/how-it-works/core/dao/actions#the-allowfailuremap-input-argument)). | -| `"proposalNotFound"` | The proposal could not be found. | - -## Action-Specific Checks - -After the general checks, we check every action in the `Action[]` array separately. An action has three fields [see][action]: - -```solidity title="@aragon/osx/core/dao/IDAO.sol" -/// @notice The action struct to be consumed by the DAO's `execute` function resulting in an external call. -/// @param to The address to call. -/// @param value The native token value to be sent with the call. -/// @param data The bytes-encoded function selector and calldata for the call. -struct Action { - address to; - uint256 value; - bytes data; -} - -``` - -In the following, we explain the action specific checks. - -### DAO Update - -For DAO updates, we expect single action at position 0 of the action array. This action, must call - -- `upgradeTo(address newImplementation)` - OR -- `upgradeToAndCall(address newImplementation, bytes memory data)` - -#### Checking the `upgradeTo` Calldata - -| Item | Error | Explanation | -| ------- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `"invalidToAddress"` | The `to` address of the action must be the DAO contract. | -| | | | -| `value` | `"nonZeroCallValue"` | The `value` native token value send with the call must be zero. | -| | | | -| `data` | `"invalidActions"` | The first 4 bytes must match the [`upgradeTo` function][oz-upgradeto] selector (see [General Proposal Checks](#general-proposal-checks)). | -| | `"invalidUpgradeToImplementationAddress"` | The `newImplementation` address must match with a newer DAO implementation contract developed by Aragon. | - -#### Checking the Action `data` calling `upgradeToAndCall` - -| Item | Error | Explanation | -| ------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `to` | `"invalidToAddress"` | The `to` address of the action must be the DAO contract. | -| | | | -| `value` | `"nonZeroCallValue"` | The `value` native token value send with the call must be zero. | -| | | | -| `data` | `"invalidActions"` | The first 4 bytes must match the [`upgradeToAndCall` function][oz-upgradetoandcall] selector (see [General Proposal Checks](#general-proposal-checks)). | -| | `"invalidUpgradeToAndCallImplementationAddress"` | The `newImplementation` address must match with a newer DAO implementation contract developed by Aragon. | -| | `"invalidUpgradeToAndCallData"` | The `data` passed into `upgradeToAndCall` must call the [`initializeFrom(uint8[3] _previousProtocolVersion, bytes _initData)` function][initializefrom]. The first 96 bytes of `data` must be occupied by an `uint[3] _previousProtocolVersion` semantic version number. The sub `_initData` must be empty for the current Aragon updates. | -| | `"invalidUpgradeToAndCallVersion"` | `uint[3] _previousProtocolVersion` must match with the semantic version number of the DAO the upgrade is transitioning from. | - -### Plugin Update - -For each plugin update, we expect a block of associated actions. There can be multiple, independent plugin updates happening in one update proposal. -We expect two types of blocks: - -```solidity -[ - grant({_where: plugin, _who: pluginSetupProcessor, _permissionId: UPGRADE_PLUGIN_PERMISSION_ID}), - applyUpdate({_dao: dao, _params: applyUpdateParams}), - revoke({_where: plugin, _who: pluginSetupProcessor, _permissionId: UPGRADE_PLUGIN_PERMISSION_ID}) -] -``` - -or - -```solidity -[ - grant({_where: plugin, _who: pluginSetupProcessor, _permissionId: UPGRADE_PLUGIN_PERMISSION_ID}), - grant({_where: dao, _who: pluginSetupProcessor, _permissionId: ROOT_PERMISSION_ID}), - applyUpdate({_dao: dao, _params: applyUpdateParams}), - revoke({_where: dao, _who: pluginSetupProcessor, _permissionId: ROOT_PERMISSION_ID}), - revoke({_where: plugin, _who: pluginSetupProcessor, _permissionId: UPGRADE_PLUGIN_PERMISSION_ID}) -] -``` - -#### Mandatory `applyUpdate` Call - -Each block being related to a plugin update must contain an action calling the [`applyUpdate(address _dao, ApplyUpdateParams _params)` function][applyupdate] exactly once. -This action is composed as follows: - -This action calls the [`applyUpdate(address _dao, ApplyUpdateParams _params)` function][applyupdate] - -| `Action` field | Error | Explanation | -| -------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `to` | `"invalidToAddress"` | The `to` address of the action must be Aragon's `PluginSetupProcessor` contract. | -| | | | -| `value` | `"nonZeroApplyUpdateCallValue"` | The `value` send with the call must be zero. | -| | | | -| `data` | `"invalidActions"` | The first 4 bytes must match the [`applyUpdate` function][applyupdate] selector (see [General Proposal Checks](#general-proposal-checks)). | -| | `"invalidData"` | The bytes must be decodable as specified in the plugins `_metadata` [see our specs][build-metadata] (**currently we skip this**). | -| | `"invalidPluginRepoMetadata"` | The [`build-metadata`][build-metadata] could not be found or is incorrectly formatted. | -| | `"pluginNotInstalled"` | The plugin address referenced in the `_params` is not installed. | -| | `"missingPluginRepo"` | The plugin repo referenced in the `_params` is not existing. | -| | `"notAragonPluginRepo"` | The plugin repo referenced in the `_params` is not an Aragon plugin repo. | -| | `"missingPluginPreparation"` | The update was not prepared in Aragon's `PluginSetupProcessor` contract. | -| | `"updateToOlderOrSameBuild"` | The update wants to transition to the same or an older build. | -| | `"updateToIncompatibleRelease"` | The update wants to transition to a different, incompatible release. | - -#### Mandatory `grant`/`revoke` `UPGRADE_PLUGIN_PERMISSION` Calls - -The `applyUpdate` action must be wrapped by `grant` and `revoke` actions: - -| `Action` field | Error | Explanation | -| -------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `"invalidGrantUpgradePluginPermissionToAddress"` | The `to` address must be the DAO contract. | -| | | | -| `value` | `"nonZeroGrantUpgradePluginPermissionCallValue"` | The `value` send with the call must be zero. | -| | `"nonZeroRevokeUpgradePluginPermissionCallValue"` | " | -| | | | -| `data` | `"invalidActions"` | The first 4 bytes must match the [`grant` or][grant] [`revoke` function][revoke] selector (see [General Proposal Checks](#general-proposal-checks)). | -| | `"invalidGrantUpgradePluginPermissionWhereAddress"` | The `where` address must be the plugin proxy contract. | -| | `"invalidRevokeUpgradePluginPermissionWhereAddress"` | " | -| | `"invalidGrantUpgradePluginPermissionWhoAddress"` | The `who` address must be Aragon's `PluginSetupProcessor` contract. | -| | `"invalidRevokeUpgradePluginPermissionWhoAddress"` | " | -| | `"invalidGrantUpgradePluginPermissionPermissionId"` | `permissionId` must be `keccak256("UPGRADE_PLUGIN_PERMISSION")`. | -| | `"invalidRevokeUpgradePluginPermissionPermissionId"` | " | -| | `"invalidGrantUpgradePluginPermissionPermissionName"` | `permissionName` must be `UPGRADE_PLUGIN_PERMISSION`. | -| | `"invalidRevokeUpgradePluginPermissionPermissionName"` | " | - -#### Optional `grant`/`revoke` `ROOT_PERMISSION` Calls - -The `applyUpdate` action CAN be wrapped by `grant` and `revoke` actions: - -| `Action` field | Error | Explanation | -| -------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | `"invalidGrantRootPermissionToAddress"` | The `to` address must be the DAO contract. | -| | | | -| `value` | `"nonZeroGrantRootPermissionCallValue"` | The `value` send with the call must be zero. | -| | `"nonZeroRevokeRootPermissionCallValue"` | The `value` send with the call must be zero. | -| | | | -| `data` | `"invalidActions"` | The first 4 bytes must match the [`grant` or][grant] [`revoke` function][revoke] selector (see [General Proposal Checks](#general-proposal-checks)). | -| | `"invalidGrantRootPermissionWhereAddress"` | The `where` address must be the DAO contract. | -| | `"invalidRevokeRootPermissionWhereAddress"` | " | -| | `"invalidGrantRootPermissionWhoAddress"` | The `who` address must be Aragon's `PluginSetupProcessor`. | -| | `"invalidRevokeRootPermissionWhoAddress"` | " | -| | `"invalidGrantRootPermissionPermissionId"` | The `permissionId` must be `keccak256("ROOT_PERMISSION")`. | -| | `"invalidRevokeRootPermissionPermissionId"` | " | -| | `"invalidGrantRootPermissionPermissionName"` | The `permissionName` must be `ROOT_PERMISSION`. | -| | `"invalidRevokeRootPermissionPermissionName"` | " | - -[execute]: ../../osx/01-how-it-works/01-core/01-dao/01-actions.md#a-deep-dive-into-actions-and-execution -[action]: ../../osx/01-how-it-works/01-core/01-dao/01-actions.md#actions -[allowfailuremap]: ../../osx/01-how-it-works/01-core/01-dao/01-actions.md#allowing-for-failure -[initializefrom]: ../../osx/03-reference-guide/core/dao/DAO.md#external-function-initializefrom -[oz-upgradeto]: https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/3d4c0d5741b131c231e558d7a6213392ab3672a5/contracts/proxy/utils/UUPSUpgradeable.sol#L74-L77 -[oz-upgradetoandcall]: https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/3d4c0d5741b131c231e558d7a6213392ab3672a5/contracts/proxy/utils/UUPSUpgradeable.sol#L89-L92 -[applyupdate]: ../../osx/03-reference-guide/framework/plugin/setup/PluginSetupProcessor.md#external-function-applyupdate -[grant]: ../../osx/03-reference-guide/core/permission/PermissionManager.md#external-function-grant -[revoke]: ../../osx/03-reference-guide/core/permission/PermissionManager.md#external-function-revoke \ No newline at end of file diff --git a/versioned_docs/version-1.3.0/sdk/index.md b/versioned_docs/version-1.3.0/sdk/index.md deleted file mode 100644 index 200aab32..00000000 --- a/versioned_docs/version-1.3.0/sdk/index.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Aragon SDK -sidebar_label: Intro -sidebar_position: 0 ---- - -## The JavaScript/TypeScript SDK for Aragon OSx - -`@aragon/sdk-client` provides easy access to the high level interactions to be -made with an Aragon DAO. It consists of three different components: - -- General-purpose DAO client -- Custom clients for specific DAO plugins -- Context for holding inheritable configuration - -Contributors: See [development](#development) below - -### Installation - -Use [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/) to install -@aragon/sdk-client. - -```bash -npm install @aragon/sdk-client -yarn add @aragon/sdk-client -``` - -### Usage - -The use of the different SDK features and methods is demonstrated in the [Examples (coming soon)](./01-examples/index.md) section. - -An extensive documentation of the different clients can be found in the auto-generated [Reference Guide](./02-reference-guide/index.md) section. - -#### React Native - -In order for the SDK to be used in restricted environments like react native install the following polyfills into your project: - -- [@ethersproject/shims](https://www.npmjs.com/package/@ethersproject/shims) -- [react-native-url-polyfill](https://www.npmjs.com/package/react-native-url-polyfill) - -Then import them like the following **before** you import the Aragon SDK package: - -```javascript -import '@ethersproject/shims'; -import 'react-native-url-polyfill/auto'; -import {Client} from '@aragon/sdk-client'; -``` - -### Development - -The building blocks are defined within the `src/internal` folder. The high level -client wrappers are implemented in `src/client*.ts` - -#### Low level networking - -See `ClientCore` (`/src/internal/core.ts`): - -- Abstract class implementing primitives for: - - Web3, contracts, signing - - IPFS - - GraphQL -- Inherited by classes like `Client` and all plugin classes like `TokenVotingClient`. - -#### Common interfaces, types, enums - -When updating a `ClientXXX` (plugin) class: - -- **Update first** all affected enums, types and interfaces in - `src/internal/interfaces/plugins.ts` - -When updating the `Client` class: - -- **Update first** all affected enums, types and interfaces in - `src/internal/interfaces/client.ts` - -When updating the `ClientCore` class: - -- **Update first** all affected enums, types and interfaces in - `src/internal/interfaces/core.ts` - -#### Developing a new Plugin client - -Create a new class that `extends` from `ClientCore`, receives a `Context` on the -`constructor` and follows the structure of `TokenVotingClient` (`./src/tokenVoting/client.ts`).