diff --git a/docs/api-reference/classes/AaveBorrowCondition.md b/docs/api-reference/classes/AaveBorrowCondition.md deleted file mode 100644 index 82bedc5ee..000000000 --- a/docs/api-reference/classes/AaveBorrowCondition.md +++ /dev/null @@ -1,968 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / AaveBorrowCondition - -# Class: AaveBorrowCondition - -## Hierarchy - -- [`ProviderCondition`](ProviderCondition.md)<`AaveBorrowConditionContext`\> - - ↳ **`AaveBorrowCondition`** - -## Table of contents - -### Constructors - -- [constructor](AaveBorrowCondition.md#constructor) - -### Properties - -- [address](AaveBorrowCondition.md#address) -- [contract](AaveBorrowCondition.md#contract) -- [contractName](AaveBorrowCondition.md#contractname) -- [events](AaveBorrowCondition.md#events) -- [version](AaveBorrowCondition.md#version) - -### Accessors - -- [artifactsFolder](AaveBorrowCondition.md#artifactsfolder) -- [circuitsFolder](AaveBorrowCondition.md#circuitsfolder) -- [config](AaveBorrowCondition.md#config) -- [instanceConfig](AaveBorrowCondition.md#instanceconfig) -- [instantiableConfig](AaveBorrowCondition.md#instantiableconfig) -- [logger](AaveBorrowCondition.md#logger) -- [nevermined](AaveBorrowCondition.md#nevermined) -- [web3](AaveBorrowCondition.md#web3) - -### Methods - -- [abortByTimeOut](AaveBorrowCondition.md#abortbytimeout) -- [call](AaveBorrowCondition.md#call) -- [fulfill](AaveBorrowCondition.md#fulfill) -- [fulfillInstance](AaveBorrowCondition.md#fulfillinstance) -- [fulfillPlain](AaveBorrowCondition.md#fulfillplain) -- [fulfillWithNode](AaveBorrowCondition.md#fulfillwithnode) -- [generateId](AaveBorrowCondition.md#generateid) -- [generateIdHash](AaveBorrowCondition.md#generateidhash) -- [generateIdWithSeed](AaveBorrowCondition.md#generateidwithseed) -- [getConditionFulfilledEvent](AaveBorrowCondition.md#getconditionfulfilledevent) -- [getFromAddress](AaveBorrowCondition.md#getfromaddress) -- [getInputsOfMethod](AaveBorrowCondition.md#getinputsofmethod) -- [getSignatureOfMethod](AaveBorrowCondition.md#getsignatureofmethod) -- [hashValues](AaveBorrowCondition.md#hashvalues) -- [hashValuesPlain](AaveBorrowCondition.md#hashvaluesplain) -- [init](AaveBorrowCondition.md#init) -- [instance](AaveBorrowCondition.md#instance) -- [instanceFromDDO](AaveBorrowCondition.md#instancefromddo) -- [nodeMethod](AaveBorrowCondition.md#nodemethod) -- [params](AaveBorrowCondition.md#params) -- [paramsFromDDO](AaveBorrowCondition.md#paramsfromddo) -- [send](AaveBorrowCondition.md#send) -- [sendFrom](AaveBorrowCondition.md#sendfrom) -- [setInstanceConfig](AaveBorrowCondition.md#setinstanceconfig) -- [getInstance](AaveBorrowCondition.md#getinstance) -- [setInstanceConfig](AaveBorrowCondition.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new AaveBorrowCondition**(`contractName`) - -#### Parameters - -| Name | Type | -| :------------- | :------- | -| `contractName` | `string` | - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) - -## Properties - -### address - -• **address**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) - ---- - -### contract - -• **contract**: `BaseContract` = `null` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) - ---- - -### contractName - -• `Readonly` **contractName**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) - ---- - -### events - -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) - ---- - -### version - -• **version**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ProviderCondition.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ProviderCondition.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -ProviderCondition.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ProviderCondition.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ProviderCondition.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -ProviderCondition.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -ProviderCondition.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -ProviderCondition.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### abortByTimeOut - -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------- | -| `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) - ---- - -### call - -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> - -#### Type parameters - -| Name | -| :--- | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | - -#### Returns - -`Promise`<`T`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) - ---- - -### fulfill - -▸ **fulfill**(`agreementId`, `did`, `vaultAddress`, `assetToBorrow`, `amount`, `interestRateMode`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :----------------- | :---------------------------------------------- | -| `agreementId` | `string` | -| `did` | `string` | -| `vaultAddress` | `string` | -| `assetToBorrow` | `string` | -| `amount` | `string` | -| `interestRateMode` | `number` | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) - -#### Defined in - -[src/keeper/contracts/defi/AaveBorrowCondition.ts:45](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveBorrowCondition.ts#L45) - ---- - -### fulfillInstance - -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) - ---- - -### fulfillPlain - -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :------------ | :-------------------------------------------------------- | :------------ | -| `agreementId` | `string` | `undefined` | -| `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) - ---- - -### fulfillWithNode - -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) - ---- - -### generateId - -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) - ---- - -### generateIdHash - -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...values` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) - ---- - -### generateIdWithSeed - -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<[`string`, `string`]\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) - ---- - -### getConditionFulfilledEvent - -▸ **getConditionFulfilledEvent**(`agreementId`): [`EventResult`](../code-reference.md#eventresult) - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | - -#### Returns - -[`EventResult`](../code-reference.md#eventresult) - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) - ---- - -### getFromAddress - -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `from?` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) - ---- - -### hashValues - -▸ **hashValues**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) - ---- - -### hashValuesPlain - -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) - ---- - -### init - -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) - ---- - -### instance - -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) - ---- - -### instanceFromDDO - -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :------------ | :-------------------------------------------------------------------- | -| `agreementId` | `string` | -| `ctx` | `AaveBorrowConditionContext` | -| `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) - ---- - -### nodeMethod - -▸ **nodeMethod**(): [`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Returns - -[`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L208) - ---- - -### params - -▸ **params**(`did`, `vaultAddress`, `assetToBorrow`, `amount`, `interestRateMode`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> - -#### Parameters - -| Name | Type | -| :----------------- | :------- | -| `did` | `string` | -| `vaultAddress` | `string` | -| `assetToBorrow` | `string` | -| `amount` | `string` | -| `interestRateMode` | `number` | - -#### Returns - -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) - -#### Defined in - -[src/keeper/contracts/defi/AaveBorrowCondition.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveBorrowCondition.ts#L19) - ---- - -### paramsFromDDO - -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :--------------- | :--------------------------- | -| `«destructured»` | `AaveBorrowConditionContext` | - -#### Returns - -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) - -#### Defined in - -[src/keeper/contracts/defi/AaveBorrowCondition.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveBorrowCondition.ts#L35) - ---- - -### send - -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) - ---- - -### sendFrom - -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### getInstance - -▸ `Static` **getInstance**(`config`): `Promise`<[`AaveBorrowCondition`](AaveBorrowCondition.md)\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`Promise`<[`AaveBorrowCondition`](AaveBorrowCondition.md)\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) - -#### Defined in - -[src/keeper/contracts/defi/AaveBorrowCondition.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveBorrowCondition.ts#L15) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/AaveCollateralDepositCondition.md b/docs/api-reference/classes/AaveCollateralDepositCondition.md deleted file mode 100644 index 63f380c9a..000000000 --- a/docs/api-reference/classes/AaveCollateralDepositCondition.md +++ /dev/null @@ -1,972 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / AaveCollateralDepositCondition - -# Class: AaveCollateralDepositCondition - -## Hierarchy - -- [`ProviderCondition`](ProviderCondition.md)<`AaveCollateralDepositConditionContext`\> - - ↳ **`AaveCollateralDepositCondition`** - -## Table of contents - -### Constructors - -- [constructor](AaveCollateralDepositCondition.md#constructor) - -### Properties - -- [address](AaveCollateralDepositCondition.md#address) -- [contract](AaveCollateralDepositCondition.md#contract) -- [contractName](AaveCollateralDepositCondition.md#contractname) -- [events](AaveCollateralDepositCondition.md#events) -- [version](AaveCollateralDepositCondition.md#version) - -### Accessors - -- [artifactsFolder](AaveCollateralDepositCondition.md#artifactsfolder) -- [circuitsFolder](AaveCollateralDepositCondition.md#circuitsfolder) -- [config](AaveCollateralDepositCondition.md#config) -- [instanceConfig](AaveCollateralDepositCondition.md#instanceconfig) -- [instantiableConfig](AaveCollateralDepositCondition.md#instantiableconfig) -- [logger](AaveCollateralDepositCondition.md#logger) -- [nevermined](AaveCollateralDepositCondition.md#nevermined) -- [web3](AaveCollateralDepositCondition.md#web3) - -### Methods - -- [abortByTimeOut](AaveCollateralDepositCondition.md#abortbytimeout) -- [call](AaveCollateralDepositCondition.md#call) -- [fulfill](AaveCollateralDepositCondition.md#fulfill) -- [fulfillInstance](AaveCollateralDepositCondition.md#fulfillinstance) -- [fulfillPlain](AaveCollateralDepositCondition.md#fulfillplain) -- [fulfillWithNode](AaveCollateralDepositCondition.md#fulfillwithnode) -- [generateId](AaveCollateralDepositCondition.md#generateid) -- [generateIdHash](AaveCollateralDepositCondition.md#generateidhash) -- [generateIdWithSeed](AaveCollateralDepositCondition.md#generateidwithseed) -- [getConditionFulfilledEvent](AaveCollateralDepositCondition.md#getconditionfulfilledevent) -- [getFromAddress](AaveCollateralDepositCondition.md#getfromaddress) -- [getInputsOfMethod](AaveCollateralDepositCondition.md#getinputsofmethod) -- [getSignatureOfMethod](AaveCollateralDepositCondition.md#getsignatureofmethod) -- [hashValues](AaveCollateralDepositCondition.md#hashvalues) -- [hashValuesPlain](AaveCollateralDepositCondition.md#hashvaluesplain) -- [init](AaveCollateralDepositCondition.md#init) -- [instance](AaveCollateralDepositCondition.md#instance) -- [instanceFromDDO](AaveCollateralDepositCondition.md#instancefromddo) -- [nodeMethod](AaveCollateralDepositCondition.md#nodemethod) -- [params](AaveCollateralDepositCondition.md#params) -- [paramsFromDDO](AaveCollateralDepositCondition.md#paramsfromddo) -- [send](AaveCollateralDepositCondition.md#send) -- [sendFrom](AaveCollateralDepositCondition.md#sendfrom) -- [setInstanceConfig](AaveCollateralDepositCondition.md#setinstanceconfig) -- [getInstance](AaveCollateralDepositCondition.md#getinstance) -- [setInstanceConfig](AaveCollateralDepositCondition.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new AaveCollateralDepositCondition**(`contractName`) - -#### Parameters - -| Name | Type | -| :------------- | :------- | -| `contractName` | `string` | - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) - -## Properties - -### address - -• **address**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) - ---- - -### contract - -• **contract**: `BaseContract` = `null` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) - ---- - -### contractName - -• `Readonly` **contractName**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) - ---- - -### events - -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) - ---- - -### version - -• **version**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ProviderCondition.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ProviderCondition.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -ProviderCondition.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ProviderCondition.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ProviderCondition.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -ProviderCondition.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -ProviderCondition.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -ProviderCondition.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### abortByTimeOut - -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------- | -| `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) - ---- - -### call - -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> - -#### Type parameters - -| Name | -| :--- | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | - -#### Returns - -`Promise`<`T`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) - ---- - -### fulfill - -▸ **fulfill**(`agreementId`, `did`, `vaultAddress`, `collateralAsset`, `collateralAmount`, `delegatedAsset`, `delegatedAmount`, `interestRateMode`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :----------------- | :---------------------------------------------- | -| `agreementId` | `string` | -| `did` | `string` | -| `vaultAddress` | `string` | -| `collateralAsset` | `string` | -| `collateralAmount` | `string` | -| `delegatedAsset` | `string` | -| `delegatedAmount` | `string` | -| `interestRateMode` | `number` | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) - -#### Defined in - -[src/keeper/contracts/defi/AaveCollateralDepositCondition.ts:67](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCollateralDepositCondition.ts#L67) - ---- - -### fulfillInstance - -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) - ---- - -### fulfillPlain - -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :------------ | :-------------------------------------------------------- | :------------ | -| `agreementId` | `string` | `undefined` | -| `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) - ---- - -### fulfillWithNode - -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) - ---- - -### generateId - -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) - ---- - -### generateIdHash - -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...values` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) - ---- - -### generateIdWithSeed - -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<[`string`, `string`]\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) - ---- - -### getConditionFulfilledEvent - -▸ **getConditionFulfilledEvent**(`agreementId`): [`EventResult`](../code-reference.md#eventresult) - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | - -#### Returns - -[`EventResult`](../code-reference.md#eventresult) - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) - ---- - -### getFromAddress - -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `from?` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) - ---- - -### hashValues - -▸ **hashValues**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) - ---- - -### hashValuesPlain - -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) - ---- - -### init - -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) - ---- - -### instance - -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) - ---- - -### instanceFromDDO - -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :------------ | :-------------------------------------------------------------------- | -| `agreementId` | `string` | -| `ctx` | `AaveCollateralDepositConditionContext` | -| `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) - ---- - -### nodeMethod - -▸ **nodeMethod**(): [`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Returns - -[`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L208) - ---- - -### params - -▸ **params**(`did`, `vaultAddress`, `collateralAsset`, `collateralAmount`, `delegatedAsset`, `delegatedAmount`, `interestRateMode`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> - -#### Parameters - -| Name | Type | -| :----------------- | :------- | -| `did` | `string` | -| `vaultAddress` | `string` | -| `collateralAsset` | `string` | -| `collateralAmount` | `string` | -| `delegatedAsset` | `string` | -| `delegatedAmount` | `string` | -| `interestRateMode` | `number` | - -#### Returns - -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) - -#### Defined in - -[src/keeper/contracts/defi/AaveCollateralDepositCondition.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCollateralDepositCondition.ts#L28) - ---- - -### paramsFromDDO - -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :--------------- | :-------------------------------------- | -| `«destructured»` | `AaveCollateralDepositConditionContext` | - -#### Returns - -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) - -#### Defined in - -[src/keeper/contracts/defi/AaveCollateralDepositCondition.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCollateralDepositCondition.ts#L47) - ---- - -### send - -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) - ---- - -### sendFrom - -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### getInstance - -▸ `Static` **getInstance**(`config`): `Promise`<[`AaveCollateralDepositCondition`](AaveCollateralDepositCondition.md)\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`Promise`<[`AaveCollateralDepositCondition`](AaveCollateralDepositCondition.md)\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) - -#### Defined in - -[src/keeper/contracts/defi/AaveCollateralDepositCondition.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCollateralDepositCondition.ts#L17) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/AaveCollateralWithdrawCondition.md b/docs/api-reference/classes/AaveCollateralWithdrawCondition.md deleted file mode 100644 index a63bb373e..000000000 --- a/docs/api-reference/classes/AaveCollateralWithdrawCondition.md +++ /dev/null @@ -1,964 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / AaveCollateralWithdrawCondition - -# Class: AaveCollateralWithdrawCondition - -## Hierarchy - -- [`ProviderCondition`](ProviderCondition.md)<`AaveCollateralWithdrawConditionContext`\> - - ↳ **`AaveCollateralWithdrawCondition`** - -## Table of contents - -### Constructors - -- [constructor](AaveCollateralWithdrawCondition.md#constructor) - -### Properties - -- [address](AaveCollateralWithdrawCondition.md#address) -- [contract](AaveCollateralWithdrawCondition.md#contract) -- [contractName](AaveCollateralWithdrawCondition.md#contractname) -- [events](AaveCollateralWithdrawCondition.md#events) -- [version](AaveCollateralWithdrawCondition.md#version) - -### Accessors - -- [artifactsFolder](AaveCollateralWithdrawCondition.md#artifactsfolder) -- [circuitsFolder](AaveCollateralWithdrawCondition.md#circuitsfolder) -- [config](AaveCollateralWithdrawCondition.md#config) -- [instanceConfig](AaveCollateralWithdrawCondition.md#instanceconfig) -- [instantiableConfig](AaveCollateralWithdrawCondition.md#instantiableconfig) -- [logger](AaveCollateralWithdrawCondition.md#logger) -- [nevermined](AaveCollateralWithdrawCondition.md#nevermined) -- [web3](AaveCollateralWithdrawCondition.md#web3) - -### Methods - -- [abortByTimeOut](AaveCollateralWithdrawCondition.md#abortbytimeout) -- [call](AaveCollateralWithdrawCondition.md#call) -- [fulfill](AaveCollateralWithdrawCondition.md#fulfill) -- [fulfillInstance](AaveCollateralWithdrawCondition.md#fulfillinstance) -- [fulfillPlain](AaveCollateralWithdrawCondition.md#fulfillplain) -- [fulfillWithNode](AaveCollateralWithdrawCondition.md#fulfillwithnode) -- [generateId](AaveCollateralWithdrawCondition.md#generateid) -- [generateIdHash](AaveCollateralWithdrawCondition.md#generateidhash) -- [generateIdWithSeed](AaveCollateralWithdrawCondition.md#generateidwithseed) -- [getConditionFulfilledEvent](AaveCollateralWithdrawCondition.md#getconditionfulfilledevent) -- [getFromAddress](AaveCollateralWithdrawCondition.md#getfromaddress) -- [getInputsOfMethod](AaveCollateralWithdrawCondition.md#getinputsofmethod) -- [getSignatureOfMethod](AaveCollateralWithdrawCondition.md#getsignatureofmethod) -- [hashValues](AaveCollateralWithdrawCondition.md#hashvalues) -- [hashValuesPlain](AaveCollateralWithdrawCondition.md#hashvaluesplain) -- [init](AaveCollateralWithdrawCondition.md#init) -- [instance](AaveCollateralWithdrawCondition.md#instance) -- [instanceFromDDO](AaveCollateralWithdrawCondition.md#instancefromddo) -- [nodeMethod](AaveCollateralWithdrawCondition.md#nodemethod) -- [params](AaveCollateralWithdrawCondition.md#params) -- [paramsFromDDO](AaveCollateralWithdrawCondition.md#paramsfromddo) -- [send](AaveCollateralWithdrawCondition.md#send) -- [sendFrom](AaveCollateralWithdrawCondition.md#sendfrom) -- [setInstanceConfig](AaveCollateralWithdrawCondition.md#setinstanceconfig) -- [getInstance](AaveCollateralWithdrawCondition.md#getinstance) -- [setInstanceConfig](AaveCollateralWithdrawCondition.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new AaveCollateralWithdrawCondition**(`contractName`) - -#### Parameters - -| Name | Type | -| :------------- | :------- | -| `contractName` | `string` | - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) - -## Properties - -### address - -• **address**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) - ---- - -### contract - -• **contract**: `BaseContract` = `null` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) - ---- - -### contractName - -• `Readonly` **contractName**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) - ---- - -### events - -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) - ---- - -### version - -• **version**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ProviderCondition.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ProviderCondition.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -ProviderCondition.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ProviderCondition.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ProviderCondition.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -ProviderCondition.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -ProviderCondition.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -ProviderCondition.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### abortByTimeOut - -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------- | -| `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) - ---- - -### call - -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> - -#### Type parameters - -| Name | -| :--- | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | - -#### Returns - -`Promise`<`T`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) - ---- - -### fulfill - -▸ **fulfill**(`agreementId`, `did`, `vaultAddress`, `collateralAsset`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :---------------- | :---------------------------------------------- | -| `agreementId` | `string` | -| `did` | `string` | -| `vaultAddress` | `string` | -| `collateralAsset` | `string` | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) - -#### Defined in - -[src/keeper/contracts/defi/AaveCollateralWithdrawCondition.ts:36](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCollateralWithdrawCondition.ts#L36) - ---- - -### fulfillInstance - -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) - ---- - -### fulfillPlain - -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :------------ | :-------------------------------------------------------- | :------------ | -| `agreementId` | `string` | `undefined` | -| `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) - ---- - -### fulfillWithNode - -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) - ---- - -### generateId - -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) - ---- - -### generateIdHash - -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...values` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) - ---- - -### generateIdWithSeed - -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<[`string`, `string`]\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) - ---- - -### getConditionFulfilledEvent - -▸ **getConditionFulfilledEvent**(`agreementId`): [`EventResult`](../code-reference.md#eventresult) - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | - -#### Returns - -[`EventResult`](../code-reference.md#eventresult) - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) - ---- - -### getFromAddress - -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `from?` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) - ---- - -### hashValues - -▸ **hashValues**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) - ---- - -### hashValuesPlain - -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) - ---- - -### init - -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) - ---- - -### instance - -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) - ---- - -### instanceFromDDO - -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :------------ | :-------------------------------------------------------------------- | -| `agreementId` | `string` | -| `ctx` | `AaveCollateralWithdrawConditionContext` | -| `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) - ---- - -### nodeMethod - -▸ **nodeMethod**(): [`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Returns - -[`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L208) - ---- - -### params - -▸ **params**(`did`, `vaultAddress`, `collateralAsset`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> - -#### Parameters - -| Name | Type | -| :---------------- | :------- | -| `did` | `string` | -| `vaultAddress` | `string` | -| `collateralAsset` | `string` | - -#### Returns - -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) - -#### Defined in - -[src/keeper/contracts/defi/AaveCollateralWithdrawCondition.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCollateralWithdrawCondition.ts#L24) - ---- - -### paramsFromDDO - -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :--------------- | :--------------------------------------- | -| `«destructured»` | `AaveCollateralWithdrawConditionContext` | - -#### Returns - -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) - -#### Defined in - -[src/keeper/contracts/defi/AaveCollateralWithdrawCondition.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCollateralWithdrawCondition.ts#L28) - ---- - -### send - -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) - ---- - -### sendFrom - -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### getInstance - -▸ `Static` **getInstance**(`config`): `Promise`<[`AaveCollateralWithdrawCondition`](AaveCollateralWithdrawCondition.md)\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`Promise`<[`AaveCollateralWithdrawCondition`](AaveCollateralWithdrawCondition.md)\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) - -#### Defined in - -[src/keeper/contracts/defi/AaveCollateralWithdrawCondition.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCollateralWithdrawCondition.ts#L13) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/AaveCredit.md b/docs/api-reference/classes/AaveCredit.md deleted file mode 100644 index 4c1865de9..000000000 --- a/docs/api-reference/classes/AaveCredit.md +++ /dev/null @@ -1,682 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / AaveCredit - -# Class: AaveCredit - -AaveCredit allows taking loans from Aave protocol using NFT tokens as collateral - -## Hierarchy - -- [`Instantiable`](Instantiable.md) - - ↳ **`AaveCredit`** - -## Table of contents - -### Constructors - -- [constructor](AaveCredit.md#constructor) - -### Properties - -- [aaveConfig](AaveCredit.md#aaveconfig) -- [serviceType](AaveCredit.md#servicetype) -- [template](AaveCredit.md#template) - -### Accessors - -- [artifactsFolder](AaveCredit.md#artifactsfolder) -- [circuitsFolder](AaveCredit.md#circuitsfolder) -- [config](AaveCredit.md#config) -- [instanceConfig](AaveCredit.md#instanceconfig) -- [instantiableConfig](AaveCredit.md#instantiableconfig) -- [logger](AaveCredit.md#logger) -- [nevermined](AaveCredit.md#nevermined) -- [web3](AaveCredit.md#web3) - -### Methods - -- [borrow](AaveCredit.md#borrow) -- [create](AaveCredit.md#create) -- [delegatedAmount](AaveCredit.md#delegatedamount) -- [depositCollateral](AaveCredit.md#depositcollateral) -- [getActualCreditDebt](AaveCredit.md#getactualcreditdebt) -- [getAssetPrice](AaveCredit.md#getassetprice) -- [getBorrowedAmount](AaveCredit.md#getborrowedamount) -- [getCreditAssetDebt](AaveCredit.md#getcreditassetdebt) -- [getTotalActualDebt](AaveCredit.md#gettotalactualdebt) -- [getVaultContract](AaveCredit.md#getvaultcontract) -- [lockNft](AaveCredit.md#locknft) -- [repayDebt](AaveCredit.md#repaydebt) -- [setInstanceConfig](AaveCredit.md#setinstanceconfig) -- [unlockNft](AaveCredit.md#unlocknft) -- [withdrawCollateral](AaveCredit.md#withdrawcollateral) -- [getInstance](AaveCredit.md#getinstance) -- [setInstanceConfig](AaveCredit.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new AaveCredit**() - -#### Inherited from - -[Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) - -## Properties - -### aaveConfig - -• **aaveConfig**: [`AaveConfig`](../interfaces/AaveConfig.md) - -#### Defined in - -[src/services/aave/AaveCredit.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L22) - ---- - -### serviceType - -• **serviceType**: `"aave-credit"` - -#### Defined in - -[src/services/aave/AaveCredit.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L23) - ---- - -### template - -• **template**: [`AaveCreditTemplate`](AaveCreditTemplate.md) - -#### Defined in - -[src/services/aave/AaveCredit.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L21) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -Instantiable.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -Instantiable.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -Instantiable.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -Instantiable.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -Instantiable.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -Instantiable.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -Instantiable.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -Instantiable.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### borrow - -▸ **borrow**(`agreementId`, `delegatedAsset`, `delegatedAmount`, `interestRateMode`, `from`, `did?`, `vaultAddress?`): `Promise`<`boolean`\> - -#### Parameters - -| Name | Type | -| :----------------- | :---------------------- | -| `agreementId` | `string` | -| `delegatedAsset` | `string` | -| `delegatedAmount` | `number` | -| `interestRateMode` | `number` | -| `from` | [`Account`](Account.md) | -| `did?` | `string` | -| `vaultAddress?` | `string` | - -#### Returns - -`Promise`<`boolean`\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:219](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L219) - ---- - -### create - -▸ **create**(`did`, `nftTokenContract`, `nftAmount`, `collateralToken`, `collateralAmount`, `delegatedToken`, `delegatedAmount`, `interestRateMode`, `borrower`, `lender`, `from`, `timeLocks?`, `timeOuts?`, `txParams?`): `Promise`<{ `agreementId`: `string` ; `data`: [`AgreementInstance`](../interfaces/AgreementInstance.md)<[`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md)\> }\> - -Create new Aave agreement where a borrower puts an NFT asset as collateral -and the lender uses their own Token as collateral to allow the borrower to -use Aave protocol to borrow some other token (the `delegatedToken`). All of -this is facilitated via the credit vault contract and the agreement conditions. -All interactions with the Aave protocol have to go through the credit vault. - -#### Parameters - -| Name | Type | Description | -| :----------------- | :---------------------------------------------- | :---------------------------------------------------------------------------------------------- | -| `did` | `string` | id of DDO/asset that represent the `nftToken`. This is the NFT token id | -| `nftTokenContract` | `string` | nft (ERC721) contract address of token to use as collateral by the borrower | -| `nftAmount` | `number` | the number of nft tokens | -| `collateralToken` | `string` | erc20 token address to use as loan-collateral by the lender to enable the borrower to take loan | -| `collateralAmount` | `number` | amount of `collateralToken` to lock in the vault | -| `delegatedToken` | `string` | address of erc20 token to be borrowed under this agreement | -| `delegatedAmount` | `number` | amount of `delegatedToken` that well be borrowed | -| `interestRateMode` | `number` | the type of interest rate to use when borrowing from Aave | -| `borrower` | `string` | wallet address of borrower | -| `lender` | `string` | wallet address of lender | -| `from` | [`Account`](Account.md) | account/wallet of borrower or lender creating this agreement | -| `timeLocks?` | `number`[] | list of time lock values for each agreement condition | -| `timeOuts?` | `number`[] | list of time out values for each agreement condition | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | extra transaction parameters can be included here | - -#### Returns - -`Promise`<{ `agreementId`: `string` ; `data`: [`AgreementInstance`](../interfaces/AgreementInstance.md)<[`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md)\> }\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:59](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L59) - ---- - -### delegatedAmount - -▸ **delegatedAmount**(`agreementId`, `borrower`, `delegatedToken`, `interestRateMode`, `from`, `vaultAddress?`): `Promise`<`number`\> - -Returned value is already converted from Wei - -#### Parameters - -| Name | Type | -| :----------------- | :---------------------- | -| `agreementId` | `string` | -| `borrower` | `string` | -| `delegatedToken` | `string` | -| `interestRateMode` | `number` | -| `from` | [`Account`](Account.md) | -| `vaultAddress?` | `string` | - -#### Returns - -`Promise`<`number`\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:498](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L498) - ---- - -### depositCollateral - -▸ **depositCollateral**(`agreementId`, `collateralAsset`, `collateralAmount`, `delegatedAsset`, `delegatedAmount`, `interestRateMode`, `from`, `useWethGateway?`, `did?`, `vaultAddress?`): `Promise`<`boolean`\> - -#### Parameters - -| Name | Type | Default value | -| :----------------- | :---------------------- | :------------ | -| `agreementId` | `string` | `undefined` | -| `collateralAsset` | `string` | `undefined` | -| `collateralAmount` | `number` | `undefined` | -| `delegatedAsset` | `string` | `undefined` | -| `delegatedAmount` | `number` | `undefined` | -| `interestRateMode` | `number` | `undefined` | -| `from` | [`Account`](Account.md) | `undefined` | -| `useWethGateway` | `boolean` | `false` | -| `did?` | `string` | `undefined` | -| `vaultAddress?` | `string` | `undefined` | - -#### Returns - -`Promise`<`boolean`\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:157](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L157) - ---- - -### getActualCreditDebt - -▸ **getActualCreditDebt**(`agreementId`, `from`, `vaultAddress?`): `Promise`<`number`\> - -Returned value is already converted from Wei - -#### Parameters - -| Name | Type | -| :-------------- | :---------------------- | -| `agreementId` | `string` | -| `from` | [`Account`](Account.md) | -| `vaultAddress?` | `string` | - -#### Returns - -`Promise`<`number`\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:427](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L427) - ---- - -### getAssetPrice - -▸ **getAssetPrice**(`agreementId`, `tokenAddress`, `from`, `vaultAddress?`): `Promise`<`number`\> - -#### Parameters - -| Name | Type | -| :-------------- | :---------------------- | -| `agreementId` | `string` | -| `tokenAddress` | `string` | -| `from` | [`Account`](Account.md) | -| `vaultAddress?` | `string` | - -#### Returns - -`Promise`<`number`\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:459](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L459) - ---- - -### getBorrowedAmount - -▸ **getBorrowedAmount**(`agreementId`, `from`, `vaultAddress?`): `Promise`<`number`\> - -Returned value is already converted from Wei - -#### Parameters - -| Name | Type | -| :-------------- | :---------------------- | -| `agreementId` | `string` | -| `from` | [`Account`](Account.md) | -| `vaultAddress?` | `string` | - -#### Returns - -`Promise`<`number`\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:479](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L479) - ---- - -### getCreditAssetDebt - -▸ **getCreditAssetDebt**(`agreementId`, `from`, `vaultAddress?`): `Promise`<`number`\> - -Returned value is already converted from Wei - -#### Parameters - -| Name | Type | -| :-------------- | :---------------------- | -| `agreementId` | `string` | -| `from` | [`Account`](Account.md) | -| `vaultAddress?` | `string` | - -#### Returns - -`Promise`<`number`\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:446](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L446) - ---- - -### getTotalActualDebt - -▸ **getTotalActualDebt**(`agreementId`, `from`, `vaultAddress?`): `Promise`<`number`\> - -Returned value is already converted from Wei - -#### Parameters - -| Name | Type | -| :-------------- | :---------------------- | -| `agreementId` | `string` | -| `from` | [`Account`](Account.md) | -| `vaultAddress?` | `string` | - -#### Returns - -`Promise`<`number`\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:407](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L407) - ---- - -### getVaultContract - -▸ **getVaultContract**(`agreementId`, `from`, `vaultAddress?`): `Promise`<[`GenericContract`](GenericContract.md)\> - -#### Parameters - -| Name | Type | -| :-------------- | :------- | -| `agreementId` | `string` | -| `from` | `string` | -| `vaultAddress?` | `string` | - -#### Returns - -`Promise`<[`GenericContract`](GenericContract.md)\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:390](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L390) - ---- - -### lockNft - -▸ **lockNft**(`agreementId`, `nftContractAddress`, `nftAmount`, `from?`, `did?`, `vaultAddress?`): `Promise`<`boolean`\> - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------- | -| `agreementId` | `string` | -| `nftContractAddress` | `string` | -| `nftAmount` | `number` | -| `from?` | [`Account`](Account.md) | -| `did?` | `string` | -| `vaultAddress?` | `string` | - -#### Returns - -`Promise`<`boolean`\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L115) - ---- - -### repayDebt - -▸ **repayDebt**(`agreementId`, `delegatedAsset`, `delegatedAmount`, `interestRateMode`, `from?`, `did?`, `vaultAddress?`): `Promise`<`boolean`\> - -#### Parameters - -| Name | Type | -| :----------------- | :---------------------- | -| `agreementId` | `string` | -| `delegatedAsset` | `string` | -| `delegatedAmount` | `number` | -| `interestRateMode` | `number` | -| `from?` | [`Account`](Account.md) | -| `did?` | `string` | -| `vaultAddress?` | `string` | - -#### Returns - -`Promise`<`boolean`\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:257](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L257) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[Instantiable](Instantiable.md).[setInstanceConfig](Instantiable.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### unlockNft - -▸ **unlockNft**(`agreementId`, `nftContractAddress`, `from?`, `did?`, `vaultAddress?`): `Promise`<`boolean`\> - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------- | -| `agreementId` | `string` | -| `nftContractAddress` | `string` | -| `from?` | [`Account`](Account.md) | -| `did?` | `string` | -| `vaultAddress?` | `string` | - -#### Returns - -`Promise`<`boolean`\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:354](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L354) - ---- - -### withdrawCollateral - -▸ **withdrawCollateral**(`agreementId`, `collateralAsset`, `collateralAmount`, `delegatedAsset`, `delegatedAmount`, `interestRateMode`, `from?`, `did?`, `vaultAddress?`): `Promise`<`boolean`\> - -#### Parameters - -| Name | Type | -| :----------------- | :---------------------- | -| `agreementId` | `string` | -| `collateralAsset` | `string` | -| `collateralAmount` | `number` | -| `delegatedAsset` | `string` | -| `delegatedAmount` | `number` | -| `interestRateMode` | `number` | -| `from?` | [`Account`](Account.md) | -| `did?` | `string` | -| `vaultAddress?` | `string` | - -#### Returns - -`Promise`<`boolean`\> - -#### Defined in - -[src/services/aave/AaveCredit.ts:319](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L319) - ---- - -### getInstance - -▸ `Static` **getInstance**(`config`): `Promise`<[`AaveCredit`](AaveCredit.md)\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`Promise`<[`AaveCredit`](AaveCredit.md)\> - -#### Overrides - -[Instantiable](Instantiable.md).[getInstance](Instantiable.md#getinstance) - -#### Defined in - -[src/services/aave/AaveCredit.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/aave/AaveCredit.ts#L25) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[Instantiable](Instantiable.md).[setInstanceConfig](Instantiable.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/AaveCreditTemplate.md b/docs/api-reference/classes/AaveCreditTemplate.md deleted file mode 100644 index ba8a3e0fe..000000000 --- a/docs/api-reference/classes/AaveCreditTemplate.md +++ /dev/null @@ -1,1600 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / AaveCreditTemplate - -# Class: AaveCreditTemplate - -## Hierarchy - -- [`BaseTemplate`](BaseTemplate.md)<[`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md), [`ServiceAaveCredit`](../interfaces/ServiceAaveCredit.md)\> - - ↳ **`AaveCreditTemplate`** - -## Table of contents - -### Constructors - -- [constructor](AaveCreditTemplate.md#constructor) - -### Properties - -- [aaveConfig](AaveCreditTemplate.md#aaveconfig) -- [address](AaveCreditTemplate.md#address) -- [contract](AaveCreditTemplate.md#contract) -- [contractName](AaveCreditTemplate.md#contractname) -- [events](AaveCreditTemplate.md#events) -- [version](AaveCreditTemplate.md#version) - -### Accessors - -- [artifactsFolder](AaveCreditTemplate.md#artifactsfolder) -- [circuitsFolder](AaveCreditTemplate.md#circuitsfolder) -- [config](AaveCreditTemplate.md#config) -- [instanceConfig](AaveCreditTemplate.md#instanceconfig) -- [instantiableConfig](AaveCreditTemplate.md#instantiableconfig) -- [logger](AaveCreditTemplate.md#logger) -- [nevermined](AaveCreditTemplate.md#nevermined) -- [web3](AaveCreditTemplate.md#web3) - -### Methods - -- [\_createAgreement](AaveCreditTemplate.md#_createagreement) -- [accept](AaveCreditTemplate.md#accept) -- [agreementId](AaveCreditTemplate.md#agreementid) -- [call](AaveCreditTemplate.md#call) -- [conditions](AaveCreditTemplate.md#conditions) -- [createAgreement](AaveCreditTemplate.md#createagreement) -- [createAgreementAndDeployVault](AaveCreditTemplate.md#createagreementanddeployvault) -- [createAgreementAndPay](AaveCreditTemplate.md#createagreementandpay) -- [createAgreementFromDDO](AaveCreditTemplate.md#createagreementfromddo) -- [createAgreementWithPaymentFromDDO](AaveCreditTemplate.md#createagreementwithpaymentfromddo) -- [createService](AaveCreditTemplate.md#createservice) -- [deployVault](AaveCreditTemplate.md#deployvault) -- [description](AaveCreditTemplate.md#description) -- [extraGen](AaveCreditTemplate.md#extragen) -- [getAgreementCreatedEvent](AaveCreditTemplate.md#getagreementcreatedevent) -- [getAgreementData](AaveCreditTemplate.md#getagreementdata) -- [getAgreementDid](AaveCreditTemplate.md#getagreementdid) -- [getAgreementIdsFromDDO](AaveCreditTemplate.md#getagreementidsfromddo) -- [getAgreementStatus](AaveCreditTemplate.md#getagreementstatus) -- [getAgreementVaultAddress](AaveCreditTemplate.md#getagreementvaultaddress) -- [getAgreementsForDID](AaveCreditTemplate.md#getagreementsfordid) -- [getConditionTypes](AaveCreditTemplate.md#getconditiontypes) -- [getConditions](AaveCreditTemplate.md#getconditions) -- [getFromAddress](AaveCreditTemplate.md#getfromaddress) -- [getInputsOfMethod](AaveCreditTemplate.md#getinputsofmethod) -- [getServiceAgreementTemplate](AaveCreditTemplate.md#getserviceagreementtemplate) -- [getServiceAgreementTemplateConditionByRef](AaveCreditTemplate.md#getserviceagreementtemplateconditionbyref) -- [getServiceAgreementTemplateConditions](AaveCreditTemplate.md#getserviceagreementtemplateconditions) -- [getServiceAgreementTemplateDependencies](AaveCreditTemplate.md#getserviceagreementtemplatedependencies) -- [getSignatureOfMethod](AaveCreditTemplate.md#getsignatureofmethod) -- [init](AaveCreditTemplate.md#init) -- [instanceFromDDO](AaveCreditTemplate.md#instancefromddo) -- [lockConditionIndex](AaveCreditTemplate.md#lockconditionindex) -- [lockTokens](AaveCreditTemplate.md#locktokens) -- [name](AaveCreditTemplate.md#name) -- [params](AaveCreditTemplate.md#params) -- [paramsGen](AaveCreditTemplate.md#paramsgen) -- [paymentData](AaveCreditTemplate.md#paymentdata) -- [printAgreementStatus](AaveCreditTemplate.md#printagreementstatus) -- [process](AaveCreditTemplate.md#process) -- [send](AaveCreditTemplate.md#send) -- [sendFrom](AaveCreditTemplate.md#sendfrom) -- [service](AaveCreditTemplate.md#service) -- [serviceEndpoint](AaveCreditTemplate.md#serviceendpoint) -- [setInstanceConfig](AaveCreditTemplate.md#setinstanceconfig) -- [standardContext](AaveCreditTemplate.md#standardcontext) -- [track](AaveCreditTemplate.md#track) -- [validateAgreement](AaveCreditTemplate.md#validateagreement) -- [getInstance](AaveCreditTemplate.md#getinstance) -- [setInstanceConfig](AaveCreditTemplate.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• `Protected` **new AaveCreditTemplate**(`contractName`) - -#### Parameters - -| Name | Type | -| :------------- | :------- | -| `contractName` | `string` | - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[constructor](BaseTemplate.md#constructor) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L68) - -## Properties - -### aaveConfig - -• **aaveConfig**: [`AaveConfig`](../interfaces/AaveConfig.md) - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:48](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L48) - ---- - -### address - -• **address**: `string` - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[address](BaseTemplate.md#address) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) - ---- - -### contract - -• **contract**: `BaseContract` = `null` - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[contract](BaseTemplate.md#contract) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) - ---- - -### contractName - -• `Readonly` **contractName**: `string` - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[contractName](BaseTemplate.md#contractname) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) - ---- - -### events - -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[events](BaseTemplate.md#events) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) - ---- - -### version - -• **version**: `string` - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[version](BaseTemplate.md#version) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -BaseTemplate.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -BaseTemplate.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -BaseTemplate.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -BaseTemplate.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -BaseTemplate.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -BaseTemplate.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -BaseTemplate.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -BaseTemplate.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### \_createAgreement - -▸ `Private` **\_createAgreement**(`agreementIdSeed`, `ddo`, `vaultAddress`, `nftTokenContract`, `nftAmount`, `collateralToken`, `collateralAmount`, `delegatedToken`, `delegatedAmount`, `interestRateMode`, `timeLocks`, `timeOuts`, `txParams?`, `from?`): `Promise`<[`ContractTransactionReceipt`, [`AgreementInstance`](../interfaces/AgreementInstance.md)<[`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md)\>]\> - -#### Parameters - -| Name | Type | -| :----------------- | :---------------------------------------------- | -| `agreementIdSeed` | `string` | -| `ddo` | [`DDO`](DDO.md) | -| `vaultAddress` | `string` | -| `nftTokenContract` | `string` | -| `nftAmount` | `number` | -| `collateralToken` | `string` | -| `collateralAmount` | `number` | -| `delegatedToken` | `string` | -| `delegatedAmount` | `number` | -| `interestRateMode` | `number` | -| `timeLocks` | `number`[] | -| `timeOuts` | `number`[] | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | -| `from?` | [`Account`](Account.md) | - -#### Returns - -`Promise`<[`ContractTransactionReceipt`, [`AgreementInstance`](../interfaces/AgreementInstance.md)<[`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md)\>]\> - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:96](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L96) - ---- - -### accept - -▸ **accept**(`_params`): `Promise`<`boolean`\> - -#### Parameters - -| Name | Type | -| :-------- | :------------------------------------------------------ | -| `_params` | [`ValidationParams`](../interfaces/ValidationParams.md) | - -#### Returns - -`Promise`<`boolean`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[accept](BaseTemplate.md#accept) - -#### Defined in - -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L98) - ---- - -### agreementId - -▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :---------------- | :------- | -| `agreementIdSeed` | `string` | -| `creator` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[agreementId](BaseTemplate.md#agreementid) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L213) - ---- - -### call - -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> - -#### Type parameters - -| Name | -| :--- | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | - -#### Returns - -`Promise`<`T`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[call](BaseTemplate.md#call) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) - ---- - -### conditions - -▸ **conditions**(): [[`NFT721LockCondition`](NFT721LockCondition.md), [`AaveCollateralDepositCondition`](AaveCollateralDepositCondition.md), [`AaveBorrowCondition`](AaveBorrowCondition.md), [`AaveRepayCondition`](AaveRepayCondition.md), [`AaveCollateralWithdrawCondition`](AaveCollateralWithdrawCondition.md), [`DistributeNFTCollateralCondition`](DistributeNFTCollateralCondition.md)] - -#### Returns - -[[`NFT721LockCondition`](NFT721LockCondition.md), [`AaveCollateralDepositCondition`](AaveCollateralDepositCondition.md), [`AaveBorrowCondition`](AaveBorrowCondition.md), [`AaveRepayCondition`](AaveRepayCondition.md), [`AaveCollateralWithdrawCondition`](AaveCollateralWithdrawCondition.md), [`DistributeNFTCollateralCondition`](DistributeNFTCollateralCondition.md)] - -#### Overrides - -[BaseTemplate](BaseTemplate.md).[conditions](BaseTemplate.md#conditions) - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:275](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L275) - ---- - -### createAgreement - -▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------------- | :---------------------------------------------- | -| `agreementId` | `string` | -| `did` | `string` | -| `conditionIds` | `string`[] | -| `timeLocks` | `number`[] | -| `timeOuts` | `number`[] | -| `extraArgs` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[createAgreement](BaseTemplate.md#createagreement) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L90) - ---- - -### createAgreementAndDeployVault - -▸ **createAgreementAndDeployVault**(`agreementIdSeed`, `ddo`, `nftTokenContract`, `nftAmount`, `collateralToken`, `collateralAmount`, `delegatedToken`, `delegatedAmount`, `interestRateMode`, `borrower`, `lender`, `timeLocks`, `timeOuts`, `txParams?`, `from?`): `Promise`<[`ContractTransactionReceipt`, `string`, [`AgreementInstance`](../interfaces/AgreementInstance.md)<[`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md)\>]\> - -#### Parameters - -| Name | Type | -| :----------------- | :---------------------------------------------- | -| `agreementIdSeed` | `string` | -| `ddo` | [`DDO`](DDO.md) | -| `nftTokenContract` | `string` | -| `nftAmount` | `number` | -| `collateralToken` | `string` | -| `collateralAmount` | `number` | -| `delegatedToken` | `string` | -| `delegatedAmount` | `number` | -| `interestRateMode` | `number` | -| `borrower` | `string` | -| `lender` | `string` | -| `timeLocks` | `number`[] | -| `timeOuts` | `number`[] | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | -| `from?` | [`Account`](Account.md) | - -#### Returns - -`Promise`<[`ContractTransactionReceipt`, `string`, [`AgreementInstance`](../interfaces/AgreementInstance.md)<[`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md)\>]\> - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:149](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L149) - ---- - -### createAgreementAndPay - -▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :--------------- | :---------------------------------------------- | -| `agreementId` | `string` | -| `did` | `string` | -| `conditionIds` | `string`[] | -| `timeLocks` | `number`[] | -| `timeOuts` | `number`[] | -| `accessConsumer` | `string` | -| `condIdx` | `number` | -| `rewardAddress` | `string` | -| `tokenAddress` | `string` | -| `amounts` | `bigint`[] | -| `receivers` | `string`[] | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[createAgreementAndPay](BaseTemplate.md#createagreementandpay) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L115) - ---- - -### createAgreementFromDDO - -▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `from`, `timeOuts?`, `txParams?`): `Promise`<`string`\> - -Create a new agreement using the data of a DDO. - -#### Parameters - -| Name | Type | Description | -| :---------------- | :---------------------------------------------------------------------- | :---------- | -| `agreementIdSeed` | `string` | - | -| `ddo` | [`DDO`](DDO.md) | DDO. | -| `parameters` | [`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md) | | -| `consumer` | [`Account`](Account.md) | - | -| `from` | [`Account`](Account.md) | - | -| `timeOuts?` | `number`[] | - | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | - -#### Returns - -`Promise`<`string`\> - -true if the call was successful. - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[createAgreementFromDDO](BaseTemplate.md#createagreementfromddo) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:222](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L222) - ---- - -### createAgreementWithPaymentFromDDO - -▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :----------------- | :------------------------------------------------------------------------------------ | -| `agreementIdSeed` | `string` | -| `ddo` | [`DDO`](DDO.md) | -| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | -| `parameters` | [`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md) | -| `consumer` | [`Account`](Account.md) | -| `from` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | -| `observer?` | (`orderProgressStep`: [`OrderProgressStep`](../enums/OrderProgressStep.md)) => `void` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[createAgreementWithPaymentFromDDO](BaseTemplate.md#createagreementwithpaymentfromddo) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L252) - ---- - -### createService - -▸ **createService**(`publisher`, `metadata`, `serviceAttributes`, `nftAttributes?`, `priceData?`): [`ServiceAaveCredit`](../interfaces/ServiceAaveCredit.md) - -#### Parameters - -| Name | Type | -| :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](Account.md) | -| `metadata` | [`MetaData`](../interfaces/MetaData.md) | -| `serviceAttributes` | [`ServiceAttributes`](../interfaces/ServiceAttributes.md) | -| `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | -| `priceData?` | [`PricedMetadataInformation`](../code-reference.md#pricedmetadatainformation) | - -#### Returns - -[`ServiceAaveCredit`](../interfaces/ServiceAaveCredit.md) - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[createService](BaseTemplate.md#createservice) - -#### Defined in - -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L35) - ---- - -### deployVault - -▸ **deployVault**(`lendingPool`, `dataProvider`, `weth`, `agreementFee`, `treasuryAddress`, `borrower`, `lender`, `from`): `Promise`<`string`\> - -Deploy a new credit vault that is required to facilitate an Aave credit agreement - -#### Parameters - -| Name | Type | -| :---------------- | :------- | -| `lendingPool` | `string` | -| `dataProvider` | `string` | -| `weth` | `string` | -| `agreementFee` | `number` | -| `treasuryAddress` | `string` | -| `borrower` | `string` | -| `lender` | `string` | -| `from` | `string` | - -#### Returns - -`Promise`<`string`\> - -Agreement ID. - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:201](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L201) - ---- - -### description - -▸ **description**(): `string` - -#### Returns - -`string` - -#### Overrides - -[BaseTemplate](BaseTemplate.md).[description](BaseTemplate.md#description) - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:45](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L45) - ---- - -### extraGen - -▸ **extraGen**(`_params`): `Promise`<`any`\> - -#### Parameters - -| Name | Type | -| :-------- | :------------------------------------------------------ | -| `_params` | [`ValidationParams`](../interfaces/ValidationParams.md) | - -#### Returns - -`Promise`<`any`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[extraGen](BaseTemplate.md#extragen) - -#### Defined in - -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:94](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L94) - ---- - -### getAgreementCreatedEvent - -▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`<`any`[]\> - -Generates and returns the agreement creation event. - -#### Parameters - -| Name | Type | Description | -| :------------ | :------- | :------------ | -| `agreementId` | `string` | Agreement ID. | - -#### Returns - -`Promise`<`any`[]\> - -Agreement created event. - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getAgreementCreatedEvent](BaseTemplate.md#getagreementcreatedevent) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:459](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L459) - ---- - -### getAgreementData - -▸ **getAgreementData**(`agreementId`): `Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | - -#### Returns - -`Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getAgreementData](BaseTemplate.md#getagreementdata) - -#### Defined in - -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L21) - ---- - -### getAgreementDid - -▸ **getAgreementDid**(`agreementId`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:305](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L305) - ---- - -### getAgreementIdsFromDDO - -▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`<`string`[]\> - -Get agreement conditions IDs. - -#### Parameters - -| Name | Type | Description | -| :------------ | :---------------------------------------------------------------------- | :------------ | -| `agreementId` | `string` | Agreement ID. | -| `ddo` | [`DDO`](DDO.md) | DDO. | -| `creator` | `string` | - | -| `params` | [`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md) | - | - -#### Returns - -`Promise`<`string`[]\> - -The condition IDs. - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getAgreementIdsFromDDO](BaseTemplate.md#getagreementidsfromddo) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:180](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L180) - ---- - -### getAgreementStatus - -▸ **getAgreementStatus**(`agreementId`): `Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> - -Returns the status of the conditions. - -#### Parameters - -| Name | Type | Description | -| :------------ | :------- | :------------ | -| `agreementId` | `string` | Agreement ID. | - -#### Returns - -`Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> - -The conditions status. - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getAgreementStatus](BaseTemplate.md#getagreementstatus) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:346](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L346) - ---- - -### getAgreementVaultAddress - -▸ **getAgreementVaultAddress**(`agreementId`, `from`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `from` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:301](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L301) - ---- - -### getAgreementsForDID - -▸ **getAgreementsForDID**(`did`): `Promise`<`string`[]\> - -#### Parameters - -| Name | Type | -| :---- | :------- | -| `did` | `string` | - -#### Returns - -`Promise`<`string`[]\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getAgreementsForDID](BaseTemplate.md#getagreementsfordid) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:485](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L485) - ---- - -### getConditionTypes - -▸ **getConditionTypes**(): `Promise`<`string`[]\> - -Conditions address list. - -#### Returns - -`Promise`<`string`[]\> - -A list of condition addresses. - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getConditionTypes](BaseTemplate.md#getconditiontypes) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L154) - ---- - -### getConditions - -▸ **getConditions**(): `Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> - -List of condition contracts. - -#### Returns - -`Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> - -A list of condition contracts. - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getConditions](BaseTemplate.md#getconditions) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:165](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L165) - ---- - -### getFromAddress - -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `from?` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getFromAddress](BaseTemplate.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getInputsOfMethod](BaseTemplate.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getServiceAgreementTemplate - -▸ **getServiceAgreementTemplate**(): [`ServiceAgreementTemplate`](../interfaces/ServiceAgreementTemplate.md) - -#### Returns - -[`ServiceAgreementTemplate`](../interfaces/ServiceAgreementTemplate.md) - -#### Overrides - -[BaseTemplate](BaseTemplate.md).[getServiceAgreementTemplate](BaseTemplate.md#getserviceagreementtemplate) - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L92) - ---- - -### getServiceAgreementTemplateConditionByRef - -▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`<[`ConditionSmall`](ConditionSmall.md)\> - -#### Parameters - -| Name | Type | -| :---- | :------- | -| `ref` | `string` | - -#### Returns - -`Promise`<[`ConditionSmall`](ConditionSmall.md)\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getServiceAgreementTemplateConditionByRef](BaseTemplate.md#getserviceagreementtemplateconditionbyref) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:329](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L329) - ---- - -### getServiceAgreementTemplateConditions - -▸ **getServiceAgreementTemplateConditions**(): [`ServiceAgreementTemplateCondition`](../interfaces/ServiceAgreementTemplateCondition.md)[] - -#### Returns - -[`ServiceAgreementTemplateCondition`](../interfaces/ServiceAgreementTemplateCondition.md)[] - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getServiceAgreementTemplateConditions](BaseTemplate.md#getserviceagreementtemplateconditions) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:324](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L324) - ---- - -### getServiceAgreementTemplateDependencies - -▸ **getServiceAgreementTemplateDependencies**(): `Promise`<{ `[condition: string]`: `string`[]; }\> - -#### Returns - -`Promise`<{ `[condition: string]`: `string`[]; }\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getServiceAgreementTemplateDependencies](BaseTemplate.md#getserviceagreementtemplatedependencies) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:336](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L336) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getSignatureOfMethod](BaseTemplate.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) - ---- - -### init - -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[init](BaseTemplate.md#init) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) - ---- - -### instanceFromDDO - -▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`): `Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<[`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md)\>\> - -#### Parameters - -| Name | Type | -| :---------------- | :---------------------------------------------------------------------- | -| `agreementIdSeed` | `string` | -| `ddo` | [`DDO`](DDO.md) | -| `creator` | `string` | -| `parameters` | [`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md) | - -#### Returns - -`Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<[`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md)\>\> - -#### Overrides - -[BaseTemplate](BaseTemplate.md).[instanceFromDDO](BaseTemplate.md#instancefromddo) - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:227](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L227) - ---- - -### lockConditionIndex - -▸ **lockConditionIndex**(): `number` - -#### Returns - -`number` - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[lockConditionIndex](BaseTemplate.md#lockconditionindex) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L74) - ---- - -### lockTokens - -▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | -| :------------- | :---------------------------------------------- | -| `tokenAddress` | `any` | -| `amounts` | `any` | -| `from` | [`Account`](Account.md) | -| `txParams` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[lockTokens](BaseTemplate.md#locktokens) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:393](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L393) - ---- - -### name - -▸ **name**(): `string` - -#### Returns - -`string` - -#### Overrides - -[BaseTemplate](BaseTemplate.md).[name](BaseTemplate.md#name) - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L42) - ---- - -### params - -▸ **params**(`vaultAddress`, `nftContractAddress`, `nftAmount`, `collateralAsset`, `collateralAmount`, `delegatedAsset`, `delegatedAmount`, `interestRateMode`): [`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md) - -#### Parameters - -| Name | Type | -| :------------------- | :------- | -| `vaultAddress` | `string` | -| `nftContractAddress` | `string` | -| `nftAmount` | `number` | -| `collateralAsset` | `string` | -| `collateralAmount` | `string` | -| `delegatedAsset` | `string` | -| `delegatedAmount` | `string` | -| `interestRateMode` | `number` | - -#### Returns - -[`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md) - -#### Overrides - -[BaseTemplate](BaseTemplate.md).[params](BaseTemplate.md#params) - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:65](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L65) - ---- - -### paramsGen - -▸ **paramsGen**(`_params`): `Promise`<[`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md)\> - -Specialize params - -#### Parameters - -| Name | Type | Description | -| :-------- | :------------------------------------------------------ | :----------------- | -| `_params` | [`ValidationParams`](../interfaces/ValidationParams.md) | Generic parameters | - -#### Returns - -`Promise`<[`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md)\> - -#### Overrides - -[BaseTemplate](BaseTemplate.md).[paramsGen](BaseTemplate.md#paramsgen) - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L39) - ---- - -### paymentData - -▸ **paymentData**(`service`): `Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> - -#### Parameters - -| Name | Type | -| :-------- | :------------------------------------------------ | -| `service` | [`ServiceCommon`](../interfaces/ServiceCommon.md) | - -#### Returns - -`Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[paymentData](BaseTemplate.md#paymentdata) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L78) - ---- - -### printAgreementStatus - -▸ **printAgreementStatus**(`agreementId`): `Promise`<`void`\> - -Prints the agreement status. - -#### Parameters - -| Name | Type | Description | -| :------------ | :------- | :------------ | -| `agreementId` | `string` | Agreement ID. | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[printAgreementStatus](BaseTemplate.md#printagreementstatus) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:429](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L429) - ---- - -### process - -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | -| :---------- | :------------------------------------------------------ | -| `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | -| `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[process](BaseTemplate.md#process) - -#### Defined in - -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) - ---- - -### send - -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[send](BaseTemplate.md#send) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) - ---- - -### sendFrom - -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[sendFrom](BaseTemplate.md#sendfrom) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) - ---- - -### service - -▸ **service**(): [`ServiceType`](../code-reference.md#servicetype) - -#### Returns - -[`ServiceType`](../code-reference.md#servicetype) - -#### Overrides - -[BaseTemplate](BaseTemplate.md).[service](BaseTemplate.md#service) - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:61](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L61) - ---- - -### serviceEndpoint - -▸ **serviceEndpoint**(): `string` - -#### Returns - -`string` - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[serviceEndpoint](BaseTemplate.md#serviceendpoint) - -#### Defined in - -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L31) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[setInstanceConfig](BaseTemplate.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### standardContext - -▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): [`ConditionContext`](../interfaces/ConditionContext.md) - -#### Parameters - -| Name | Type | -| :-------------- | :-------------- | -| `ddo` | [`DDO`](DDO.md) | -| `creator` | `string` | -| `serviceIndex?` | `number` | - -#### Returns - -[`ConditionContext`](../interfaces/ConditionContext.md) - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[standardContext](BaseTemplate.md#standardcontext) - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L200) - ---- - -### track - -▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`<`boolean`\> - -#### Parameters - -| Name | Type | -| :----------- | :------------------------------------------------------ | -| `_params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `_from` | [`Account`](Account.md) | -| `_txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`boolean`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[track](BaseTemplate.md#track) - -#### Defined in - -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:102](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L102) - ---- - -### validateAgreement - -▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | -| :------------- | :---------------------------------------------------------------------- | -| `agreement_id` | `string` | -| `did` | `string` | -| `params` | [`AaveCreditTemplateParams`](../interfaces/AaveCreditTemplateParams.md) | -| `from` | [`Account`](Account.md) | -| `extra` | `any` | -| `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[validateAgreement](BaseTemplate.md#validateagreement) - -#### Defined in - -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:125](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L125) - ---- - -### getInstance - -▸ `Static` **getInstance**(`config`): `Promise`<[`AaveCreditTemplate`](AaveCreditTemplate.md)\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`Promise`<[`AaveCreditTemplate`](AaveCreditTemplate.md)\> - -#### Overrides - -[BaseTemplate](BaseTemplate.md).[getInstance](BaseTemplate.md#getinstance) - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L50) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[setInstanceConfig](BaseTemplate.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/AaveRepayCondition.md b/docs/api-reference/classes/AaveRepayCondition.md deleted file mode 100644 index ca2972a08..000000000 --- a/docs/api-reference/classes/AaveRepayCondition.md +++ /dev/null @@ -1,968 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / AaveRepayCondition - -# Class: AaveRepayCondition - -## Hierarchy - -- [`ProviderCondition`](ProviderCondition.md)<`AaveRepayConditionContext`\> - - ↳ **`AaveRepayCondition`** - -## Table of contents - -### Constructors - -- [constructor](AaveRepayCondition.md#constructor) - -### Properties - -- [address](AaveRepayCondition.md#address) -- [contract](AaveRepayCondition.md#contract) -- [contractName](AaveRepayCondition.md#contractname) -- [events](AaveRepayCondition.md#events) -- [version](AaveRepayCondition.md#version) - -### Accessors - -- [artifactsFolder](AaveRepayCondition.md#artifactsfolder) -- [circuitsFolder](AaveRepayCondition.md#circuitsfolder) -- [config](AaveRepayCondition.md#config) -- [instanceConfig](AaveRepayCondition.md#instanceconfig) -- [instantiableConfig](AaveRepayCondition.md#instantiableconfig) -- [logger](AaveRepayCondition.md#logger) -- [nevermined](AaveRepayCondition.md#nevermined) -- [web3](AaveRepayCondition.md#web3) - -### Methods - -- [abortByTimeOut](AaveRepayCondition.md#abortbytimeout) -- [call](AaveRepayCondition.md#call) -- [fulfill](AaveRepayCondition.md#fulfill) -- [fulfillInstance](AaveRepayCondition.md#fulfillinstance) -- [fulfillPlain](AaveRepayCondition.md#fulfillplain) -- [fulfillWithNode](AaveRepayCondition.md#fulfillwithnode) -- [generateId](AaveRepayCondition.md#generateid) -- [generateIdHash](AaveRepayCondition.md#generateidhash) -- [generateIdWithSeed](AaveRepayCondition.md#generateidwithseed) -- [getConditionFulfilledEvent](AaveRepayCondition.md#getconditionfulfilledevent) -- [getFromAddress](AaveRepayCondition.md#getfromaddress) -- [getInputsOfMethod](AaveRepayCondition.md#getinputsofmethod) -- [getSignatureOfMethod](AaveRepayCondition.md#getsignatureofmethod) -- [hashValues](AaveRepayCondition.md#hashvalues) -- [hashValuesPlain](AaveRepayCondition.md#hashvaluesplain) -- [init](AaveRepayCondition.md#init) -- [instance](AaveRepayCondition.md#instance) -- [instanceFromDDO](AaveRepayCondition.md#instancefromddo) -- [nodeMethod](AaveRepayCondition.md#nodemethod) -- [params](AaveRepayCondition.md#params) -- [paramsFromDDO](AaveRepayCondition.md#paramsfromddo) -- [send](AaveRepayCondition.md#send) -- [sendFrom](AaveRepayCondition.md#sendfrom) -- [setInstanceConfig](AaveRepayCondition.md#setinstanceconfig) -- [getInstance](AaveRepayCondition.md#getinstance) -- [setInstanceConfig](AaveRepayCondition.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new AaveRepayCondition**(`contractName`) - -#### Parameters - -| Name | Type | -| :------------- | :------- | -| `contractName` | `string` | - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) - -## Properties - -### address - -• **address**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) - ---- - -### contract - -• **contract**: `BaseContract` = `null` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) - ---- - -### contractName - -• `Readonly` **contractName**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) - ---- - -### events - -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) - ---- - -### version - -• **version**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ProviderCondition.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ProviderCondition.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -ProviderCondition.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ProviderCondition.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ProviderCondition.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -ProviderCondition.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -ProviderCondition.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -ProviderCondition.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### abortByTimeOut - -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------- | -| `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) - ---- - -### call - -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> - -#### Type parameters - -| Name | -| :--- | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | - -#### Returns - -`Promise`<`T`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) - ---- - -### fulfill - -▸ **fulfill**(`agreementId`, `did`, `vaultAddress`, `assetToRepay`, `amountToRepay`, `interestRateMode`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :----------------- | :---------------------------------------------- | -| `agreementId` | `string` | -| `did` | `string` | -| `vaultAddress` | `string` | -| `assetToRepay` | `string` | -| `amountToRepay` | `string` | -| `interestRateMode` | `number` | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) - -#### Defined in - -[src/keeper/contracts/defi/AaveRepayCondition.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveRepayCondition.ts#L44) - ---- - -### fulfillInstance - -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) - ---- - -### fulfillPlain - -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :------------ | :-------------------------------------------------------- | :------------ | -| `agreementId` | `string` | `undefined` | -| `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) - ---- - -### fulfillWithNode - -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) - ---- - -### generateId - -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) - ---- - -### generateIdHash - -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...values` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) - ---- - -### generateIdWithSeed - -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<[`string`, `string`]\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) - ---- - -### getConditionFulfilledEvent - -▸ **getConditionFulfilledEvent**(`agreementId`): [`EventResult`](../code-reference.md#eventresult) - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | - -#### Returns - -[`EventResult`](../code-reference.md#eventresult) - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) - ---- - -### getFromAddress - -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `from?` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) - ---- - -### hashValues - -▸ **hashValues**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) - ---- - -### hashValuesPlain - -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) - ---- - -### init - -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) - ---- - -### instance - -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) - ---- - -### instanceFromDDO - -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :------------ | :-------------------------------------------------------------------- | -| `agreementId` | `string` | -| `ctx` | `AaveRepayConditionContext` | -| `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) - ---- - -### nodeMethod - -▸ **nodeMethod**(): [`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Returns - -[`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L208) - ---- - -### params - -▸ **params**(`did`, `vaultAddress`, `assetToRepay`, `amountToRepay`, `interestRateMode`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> - -#### Parameters - -| Name | Type | -| :----------------- | :------- | -| `did` | `string` | -| `vaultAddress` | `string` | -| `assetToRepay` | `string` | -| `amountToRepay` | `string` | -| `interestRateMode` | `number` | - -#### Returns - -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) - -#### Defined in - -[src/keeper/contracts/defi/AaveRepayCondition.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveRepayCondition.ts#L19) - ---- - -### paramsFromDDO - -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :--------------- | :-------------------------- | -| `«destructured»` | `AaveRepayConditionContext` | - -#### Returns - -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) - -#### Defined in - -[src/keeper/contracts/defi/AaveRepayCondition.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveRepayCondition.ts#L34) - ---- - -### send - -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) - ---- - -### sendFrom - -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### getInstance - -▸ `Static` **getInstance**(`config`): `Promise`<[`AaveRepayCondition`](AaveRepayCondition.md)\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`Promise`<[`AaveRepayCondition`](AaveRepayCondition.md)\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) - -#### Defined in - -[src/keeper/contracts/defi/AaveRepayCondition.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveRepayCondition.ts#L15) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/AccessCondition.md b/docs/api-reference/classes/AccessCondition.md index dfed1d69b..375f63152 100644 --- a/docs/api-reference/classes/AccessCondition.md +++ b/docs/api-reference/classes/AccessCondition.md @@ -4,7 +4,7 @@ ## Hierarchy -- [`ProviderCondition`](ProviderCondition.md)<`AccessConditionContext`\> +- `ProviderCondition`\<`AccessConditionContext`\> ↳ **`AccessCondition`** @@ -26,12 +26,14 @@ - [artifactsFolder](AccessCondition.md#artifactsfolder) - [circuitsFolder](AccessCondition.md#circuitsfolder) +- [client](AccessCondition.md#client) - [config](AccessCondition.md#config) - [instanceConfig](AccessCondition.md#instanceconfig) - [instantiableConfig](AccessCondition.md#instantiableconfig) - [logger](AccessCondition.md#logger) - [nevermined](AccessCondition.md#nevermined) -- [web3](AccessCondition.md#web3) +- [publicClient](AccessCondition.md#publicclient) +- [walletClient](AccessCondition.md#walletclient) ### Methods @@ -48,8 +50,7 @@ - [getConditionFulfilledEvent](AccessCondition.md#getconditionfulfilledevent) - [getFromAddress](AccessCondition.md#getfromaddress) - [getGrantedDidByConsumer](AccessCondition.md#getgranteddidbyconsumer) -- [getInputsOfMethod](AccessCondition.md#getinputsofmethod) -- [getSignatureOfMethod](AccessCondition.md#getsignatureofmethod) +- [getTransactionLogs](AccessCondition.md#gettransactionlogs) - [hashValues](AccessCondition.md#hashvalues) - [hashValuesPlain](AccessCondition.md#hashvaluesplain) - [init](AccessCondition.md#init) @@ -61,6 +62,7 @@ - [send](AccessCondition.md#send) - [sendFrom](AccessCondition.md#sendfrom) - [setInstanceConfig](AccessCondition.md#setinstanceconfig) +- [someLog](AccessCondition.md#somelog) - [getInstance](AccessCondition.md#getinstance) - [setInstanceConfig](AccessCondition.md#setinstanceconfig-1) @@ -68,7 +70,7 @@ ### constructor -• **new AccessCondition**(`contractName`) +• **new AccessCondition**(`contractName`): [`AccessCondition`](AccessCondition.md) #### Parameters @@ -76,41 +78,45 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`AccessCondition`](AccessCondition.md) + #### Inherited from -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) +ProviderCondition\.constructor #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) +ProviderCondition.address #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) +ProviderCondition.contract #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -120,25 +126,25 @@ #### Inherited from -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) +ProviderCondition.contractName #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) +ProviderCondition.events #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -148,21 +154,21 @@ #### Inherited from -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) +ProviderCondition.version #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -170,17 +176,17 @@ ProviderCondition.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -188,13 +194,31 @@ ProviderCondition.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ProviderCondition.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -206,13 +230,13 @@ ProviderCondition.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -224,17 +248,17 @@ ProviderCondition.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -242,13 +266,13 @@ ProviderCondition.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -260,13 +284,13 @@ ProviderCondition.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -278,57 +302,172 @@ ProviderCondition.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ProviderCondition.web3 +ProviderCondition.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ProviderCondition.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### abortByTimeOut -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **abortByTimeOut**(`conditionId`, `from`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :------------ | :---------------------------------------------- | | `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) +ProviderCondition.abortByTimeOut #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) +[src/keeper/contracts/conditions/Condition.abstract.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L75) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -338,51 +477,51 @@ ProviderCondition.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) +ProviderCondition.call #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### checkPermissions -▸ **checkPermissions**(`grantee`, `did`, `from?`): `Promise`<`boolean`\> +▸ **checkPermissions**(`grantee`, `did`, `from?`): `Promise`\<`boolean`\> #### Parameters -| Name | Type | -| :-------- | :---------------------- | -| `grantee` | `string` | -| `did` | `string` | -| `from?` | [`Account`](Account.md) | +| Name | Type | +| :-------- | :---------------------------- | +| `grantee` | `string` | +| `did` | `string` | +| `from?` | [`NvmAccount`](NvmAccount.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Defined in -[src/keeper/contracts/conditions/AccessCondition.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/AccessCondition.ts#L35) +[src/keeper/contracts/conditions/AccessCondition.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/AccessCondition.ts#L39) --- ### fulfill -▸ **fulfill**(`agreementId`, `did`, `grantee`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfill**(`agreementId`, `did`, `grantee`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -391,54 +530,54 @@ ProviderCondition.web3 | `agreementId` | `string` | | `did` | `string` | | `grantee` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Overrides -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) +ProviderCondition.fulfill #### Defined in -[src/keeper/contracts/conditions/AccessCondition.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/AccessCondition.ts#L25) +[src/keeper/contracts/conditions/AccessCondition.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/AccessCondition.ts#L29) --- ### fulfillInstance -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillInstance**(`cond`, `additionalParams`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | +| Name | Type | Default value | +| :----------------- | :-------------------------------------------------------- | :------------ | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | `undefined` | +| `additionalParams` | `Record`\<`string`, `unknown`\> | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | +| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) +ProviderCondition.fulfillInstance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) +[src/keeper/contracts/conditions/Condition.abstract.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L139) --- ### fulfillPlain -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillPlain**(`agreementId`, `args`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters @@ -446,54 +585,54 @@ ProviderCondition.web3 | :------------ | :-------------------------------------------------------- | :------------ | | `agreementId` | `string` | `undefined` | | `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | | `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) +ProviderCondition.fulfillPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) +[src/keeper/contracts/conditions/Condition.abstract.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L47) --- ### fulfillWithNode -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillWithNode**(`cond`, `additionalParams`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :----------------- | :----------------------------------------------------- | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | +| `additionalParams` | `Record`\<`string`, `unknown`\> | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) +ProviderCondition.fulfillWithNode #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) +[src/keeper/contracts/conditions/Condition.abstract.ts:183](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L183) --- ### generateId -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> +▸ **generateId**(`agreementId`, `valueHash`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -504,21 +643,21 @@ ProviderCondition.web3 #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) +ProviderCondition.generateId #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) +[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L61) --- ### generateIdHash -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> +▸ **generateIdHash**(`agreementId`, `...values`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -529,21 +668,21 @@ ProviderCondition.web3 #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) +ProviderCondition.generateIdHash #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) +[src/keeper/contracts/conditions/Condition.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L57) --- ### generateIdWithSeed -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> +▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`\<[`string`, `string`]\> #### Parameters @@ -554,15 +693,15 @@ ProviderCondition.web3 #### Returns -`Promise`<[`string`, `string`]\> +`Promise`\<[`string`, `string`]\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) +ProviderCondition.generateIdWithSeed #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) +[src/keeper/contracts/conditions/Condition.abstract.ts:65](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L65) --- @@ -582,17 +721,17 @@ ProviderCondition.web3 #### Inherited from -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) +ProviderCondition.getConditionFulfilledEvent #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) +[src/keeper/contracts/conditions/Condition.abstract.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L79) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -602,21 +741,21 @@ ProviderCondition.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) +ProviderCondition.getFromAddress #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getGrantedDidByConsumer -▸ **getGrantedDidByConsumer**(`consumer`): `Promise`<{ `agreementId`: `string` ; `did`: `string` }[]\> +▸ **getGrantedDidByConsumer**(`consumer`): `Promise`\<\{ `agreementId`: `string` ; `did`: `string` }[]\> #### Parameters @@ -626,66 +765,42 @@ ProviderCondition.web3 #### Returns -`Promise`<{ `agreementId`: `string` ; `did`: `string` }[]\> - -#### Defined in - -[src/keeper/contracts/conditions/AccessCondition.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/AccessCondition.ts#L43) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) +`Promise`\<\{ `agreementId`: `string` ; `did`: `string` }[]\> #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/conditions/AccessCondition.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/AccessCondition.ts#L47) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) +ProviderCondition.getTransactionLogs #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### hashValues -▸ **hashValues**(`...args`): `Promise`<`string`\> +▸ **hashValues**(`...args`): `Promise`\<`string`\> #### Parameters @@ -695,21 +810,21 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) +ProviderCondition.hashValues #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) +[src/keeper/contracts/conditions/Condition.abstract.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L116) --- ### hashValuesPlain -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> +▸ **hashValuesPlain**(`...args`): `Promise`\<`string`\> #### Parameters @@ -719,71 +834,72 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) +ProviderCondition.hashValuesPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) +[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L122) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) +ProviderCondition.init #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instance -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instance**(`agreementId`, `params`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | +| Name | Type | +| :------------ | :------------------------------------------------------- | +| `agreementId` | `string` | +| `params` | `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> | #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) +ProviderCondition.instance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) +[src/keeper/contracts/conditions/Condition.abstract.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L163) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -795,15 +911,15 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) +ProviderCondition.instanceFromDDO #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) +[src/keeper/contracts/conditions/Condition.abstract.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L131) --- @@ -817,17 +933,17 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) +ProviderCondition.nodeMethod #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L208) +[src/keeper/contracts/conditions/Condition.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L200) --- ### params -▸ **params**(`did`, `grantee`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +▸ **params**(`did`, `grantee`): `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> #### Parameters @@ -838,21 +954,21 @@ readonly `ParamType`[] #### Returns -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +`ConditionParameters`\<`Record`\<`string`, `unknown`\>\> #### Overrides -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) +ProviderCondition.params #### Defined in -[src/keeper/contracts/conditions/AccessCondition.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/AccessCondition.ts#L17) +[src/keeper/contracts/conditions/AccessCondition.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/AccessCondition.ts#L21) --- ### paramsFromDDO -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +▸ **paramsFromDDO**(`«destructured»`): `Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -862,75 +978,75 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Overrides -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) +ProviderCondition.paramsFromDDO #### Defined in -[src/keeper/contracts/conditions/AccessCondition.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/AccessCondition.ts#L21) +[src/keeper/contracts/conditions/AccessCondition.ts:25](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/AccessCondition.ts#L25) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) +ProviderCondition.send #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) +ProviderCondition.sendFrom #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -944,17 +1060,41 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) +ProviderCondition.setInstanceConfig + +#### Defined in + +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +ProviderCondition.someLog #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`AccessCondition`](AccessCondition.md)\> +▸ **getInstance**(`config`): `Promise`\<[`AccessCondition`](AccessCondition.md)\> #### Parameters @@ -964,21 +1104,21 @@ readonly `ParamType`[] #### Returns -`Promise`<[`AccessCondition`](AccessCondition.md)\> +`Promise`\<[`AccessCondition`](AccessCondition.md)\> #### Overrides -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) +ProviderCondition.getInstance #### Defined in -[src/keeper/contracts/conditions/AccessCondition.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/AccessCondition.ts#L13) +[src/keeper/contracts/conditions/AccessCondition.ts:17](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/AccessCondition.ts#L17) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -999,8 +1139,8 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) +ProviderCondition.setInstanceConfig #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/AccessService.md b/docs/api-reference/classes/AccessService.md index d500f57e8..164a0822a 100644 --- a/docs/api-reference/classes/AccessService.md +++ b/docs/api-reference/classes/AccessService.md @@ -10,7 +10,7 @@ ## Implements -- [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceAccess`](../interfaces/ServiceAccess.md)\> +- [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`ServiceAccess`](../interfaces/ServiceAccess.md)\> ## Table of contents @@ -26,12 +26,14 @@ - [artifactsFolder](AccessService.md#artifactsfolder) - [circuitsFolder](AccessService.md#circuitsfolder) +- [client](AccessService.md#client) - [config](AccessService.md#config) - [instanceConfig](AccessService.md#instanceconfig) - [instantiableConfig](AccessService.md#instantiableconfig) - [logger](AccessService.md#logger) - [nevermined](AccessService.md#nevermined) -- [web3](AccessService.md#web3) +- [publicClient](AccessService.md#publicclient) +- [walletClient](AccessService.md#walletclient) ### Methods @@ -47,7 +49,7 @@ ### constructor -• **new AccessService**(`config`, `normal`) +• **new AccessService**(`config`, `normal`): [`AccessService`](AccessService.md) #### Parameters @@ -56,13 +58,17 @@ | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | | `normal` | [`AccessTemplate`](AccessTemplate.md) | +#### Returns + +[`AccessService`](AccessService.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/AccessService.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L33) +[src/nevermined/AccessService.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L31) ## Properties @@ -72,17 +78,17 @@ #### Defined in -[src/nevermined/AccessService.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L31) +[src/nevermined/AccessService.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L29) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -90,17 +96,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -108,13 +114,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -126,13 +150,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -144,17 +168,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -162,13 +186,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -180,13 +204,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -198,31 +222,146 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### accept -▸ **accept**(`params`): `Promise`<`boolean`\> +▸ **accept**(`params`): `Promise`\<`boolean`\> #### Parameters @@ -232,7 +371,7 @@ Instantiable.web3 #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Implementation of @@ -240,7 +379,7 @@ Instantiable.web3 #### Defined in -[src/nevermined/AccessService.ts:62](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L62) +[src/nevermined/AccessService.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L60) --- @@ -252,7 +391,7 @@ Instantiable.web3 | Name | Type | | :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](Account.md) | +| `publisher` | [`NvmAccount`](NvmAccount.md) | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | | `serviceAttributes` | [`ServiceAttributes`](../interfaces/ServiceAttributes.md) | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | @@ -268,25 +407,25 @@ Instantiable.web3 #### Defined in -[src/nevermined/AccessService.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L39) +[src/nevermined/AccessService.ts:37](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L37) --- ### process -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> +▸ **process**(`params`, `from`, `txparams?`): `Promise`\<`void`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Implementation of @@ -294,13 +433,13 @@ Instantiable.web3 #### Defined in -[src/nevermined/AccessService.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L55) +[src/nevermined/AccessService.ts:53](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L53) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -318,25 +457,25 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### track -▸ **track**(`params`, `from`, `txparams?`): `Promise`<`boolean`\> +▸ **track**(`params`, `from`, `txparams?`): `Promise`\<`boolean`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Implementation of @@ -344,13 +483,13 @@ Instantiable.web3 #### Defined in -[src/nevermined/AccessService.ts:65](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L65) +[src/nevermined/AccessService.ts:63](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L63) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -368,13 +507,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -399,4 +538,4 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/AccessTemplate.md b/docs/api-reference/classes/AccessTemplate.md index 493813601..a1215af8e 100644 --- a/docs/api-reference/classes/AccessTemplate.md +++ b/docs/api-reference/classes/AccessTemplate.md @@ -4,7 +4,7 @@ ## Hierarchy -- [`BaseTemplate`](BaseTemplate.md)<`AccessTemplateParams`, [`ServiceAccess`](../interfaces/ServiceAccess.md)\> +- [`BaseTemplate`](BaseTemplate.md)\<`AccessTemplateParams`, [`ServiceAccess`](../interfaces/ServiceAccess.md)\> ↳ **`AccessTemplate`** @@ -26,12 +26,14 @@ - [artifactsFolder](AccessTemplate.md#artifactsfolder) - [circuitsFolder](AccessTemplate.md#circuitsfolder) +- [client](AccessTemplate.md#client) - [config](AccessTemplate.md#config) - [instanceConfig](AccessTemplate.md#instanceconfig) - [instantiableConfig](AccessTemplate.md#instantiableconfig) - [logger](AccessTemplate.md#logger) - [nevermined](AccessTemplate.md#nevermined) -- [web3](AccessTemplate.md#web3) +- [publicClient](AccessTemplate.md#publicclient) +- [walletClient](AccessTemplate.md#walletclient) ### Methods @@ -54,12 +56,11 @@ - [getConditionTypes](AccessTemplate.md#getconditiontypes) - [getConditions](AccessTemplate.md#getconditions) - [getFromAddress](AccessTemplate.md#getfromaddress) -- [getInputsOfMethod](AccessTemplate.md#getinputsofmethod) - [getServiceAgreementTemplate](AccessTemplate.md#getserviceagreementtemplate) - [getServiceAgreementTemplateConditionByRef](AccessTemplate.md#getserviceagreementtemplateconditionbyref) - [getServiceAgreementTemplateConditions](AccessTemplate.md#getserviceagreementtemplateconditions) - [getServiceAgreementTemplateDependencies](AccessTemplate.md#getserviceagreementtemplatedependencies) -- [getSignatureOfMethod](AccessTemplate.md#getsignatureofmethod) +- [getTransactionLogs](AccessTemplate.md#gettransactionlogs) - [init](AccessTemplate.md#init) - [instanceFromDDO](AccessTemplate.md#instancefromddo) - [lockConditionIndex](AccessTemplate.md#lockconditionindex) @@ -75,6 +76,7 @@ - [service](AccessTemplate.md#service) - [serviceEndpoint](AccessTemplate.md#serviceendpoint) - [setInstanceConfig](AccessTemplate.md#setinstanceconfig) +- [someLog](AccessTemplate.md#somelog) - [standardContext](AccessTemplate.md#standardcontext) - [track](AccessTemplate.md#track) - [validateAgreement](AccessTemplate.md#validateagreement) @@ -85,7 +87,7 @@ ### constructor -• `Protected` **new AccessTemplate**(`contractName`) +• **new AccessTemplate**(`contractName`): [`AccessTemplate`](AccessTemplate.md) #### Parameters @@ -93,19 +95,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`AccessTemplate`](AccessTemplate.md) + #### Inherited from [BaseTemplate](BaseTemplate.md).[constructor](BaseTemplate.md#constructor) #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L68) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L51) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -113,13 +119,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -127,7 +133,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -141,13 +147,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -155,7 +161,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -169,17 +175,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -187,17 +193,17 @@ BaseTemplate.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -205,13 +211,31 @@ BaseTemplate.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +BaseTemplate.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -223,13 +247,13 @@ BaseTemplate.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -241,17 +265,17 @@ BaseTemplate.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -259,13 +283,13 @@ BaseTemplate.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -277,13 +301,13 @@ BaseTemplate.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -295,31 +319,146 @@ BaseTemplate.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -BaseTemplate.web3 +BaseTemplate.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +BaseTemplate.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### accept -▸ **accept**(`params`): `Promise`<`boolean`\> +▸ **accept**(`params`): `Promise`\<`boolean`\> #### Parameters @@ -329,7 +468,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Overrides @@ -337,13 +476,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AccessTemplate.ts:98](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AccessTemplate.ts#L98) +[src/keeper/contracts/templates/AccessTemplate.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AccessTemplate.ts#L127) --- ### agreementId -▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`<`string`\> +▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`\<`string`\> #### Parameters @@ -354,7 +493,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -362,13 +501,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L213) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:202](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L202) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -378,15 +517,15 @@ BaseTemplate.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -394,7 +533,7 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- @@ -412,13 +551,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AccessTemplate.ts:52](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AccessTemplate.ts#L52) +[src/keeper/contracts/templates/AccessTemplate.ts:81](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AccessTemplate.ts#L81) --- ### createAgreement -▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -430,12 +569,12 @@ BaseTemplate.web3 | `timeLocks` | `number`[] | | `timeOuts` | `number`[] | | `extraArgs` | `any`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -443,13 +582,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L90) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L73) --- ### createAgreementAndPay -▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -466,12 +605,12 @@ BaseTemplate.web3 | `tokenAddress` | `string` | | `amounts` | `bigint`[] | | `receivers` | `string`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -479,13 +618,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L115) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L98) --- ### createAgreementFromDDO -▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `from`, `timeOuts?`, `txParams?`): `Promise`<`string`\> +▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `timeOuts?`, `txParams?`): `Promise`\<`string`\> Create a new agreement using the data of a DDO. @@ -496,14 +635,13 @@ Create a new agreement using the data of a DDO. | `agreementIdSeed` | `string` | - | | `ddo` | [`DDO`](DDO.md) | DDO. | | `parameters` | `AccessTemplateParams` | | -| `consumer` | [`Account`](Account.md) | - | -| `from` | [`Account`](Account.md) | - | +| `consumer` | [`NvmAccount`](NvmAccount.md) | - | | `timeOuts?` | `number`[] | - | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> true if the call was successful. @@ -513,13 +651,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:222](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L222) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:211](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L211) --- ### createAgreementWithPaymentFromDDO -▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`<`string`\> +▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`\<`string`\> #### Parameters @@ -529,14 +667,14 @@ true if the call was successful. | `ddo` | [`DDO`](DDO.md) | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | | `parameters` | `AccessTemplateParams` | -| `consumer` | [`Account`](Account.md) | -| `from` | [`Account`](Account.md) | +| `consumer` | [`NvmAccount`](NvmAccount.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | | `observer?` | (`orderProgressStep`: [`OrderProgressStep`](../enums/OrderProgressStep.md)) => `void` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -544,7 +682,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L252) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:240](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L240) --- @@ -556,7 +694,7 @@ true if the call was successful. | Name | Type | | :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](Account.md) | +| `publisher` | [`NvmAccount`](NvmAccount.md) | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | | `serviceAttributes` | [`ServiceAttributes`](../interfaces/ServiceAttributes.md) | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | @@ -572,7 +710,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L35) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L48) --- @@ -590,13 +728,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AccessTemplate.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AccessTemplate.ts#L28) +[src/keeper/contracts/templates/AccessTemplate.ts:37](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AccessTemplate.ts#L37) --- ### extraGen -▸ **extraGen**(`_params`): `Promise`<`any`\> +▸ **extraGen**(`_params`): `Promise`\<`any`\> #### Parameters @@ -606,7 +744,7 @@ true if the call was successful. #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Inherited from @@ -614,13 +752,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:94](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L94) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) --- ### getAgreementCreatedEvent -▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`<`any`[]\> +▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`\<`any`[]\> Generates and returns the agreement creation event. @@ -632,7 +770,7 @@ Generates and returns the agreement creation event. #### Returns -`Promise`<`any`[]\> +`Promise`\<`any`[]\> Agreement created event. @@ -642,13 +780,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:459](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L459) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:450](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L450) --- ### getAgreementData -▸ **getAgreementData**(`agreementId`): `Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +▸ **getAgreementData**(`agreementId`): `Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Parameters @@ -658,7 +796,7 @@ Agreement created event. #### Returns -`Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +`Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Inherited from @@ -666,13 +804,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L21) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L29) --- ### getAgreementIdsFromDDO -▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`<`string`[]\> +▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`\<`string`[]\> Get agreement conditions IDs. @@ -687,7 +825,7 @@ Get agreement conditions IDs. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> The condition IDs. @@ -697,13 +835,13 @@ The condition IDs. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:180](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L180) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:169](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L169) --- ### getAgreementStatus -▸ **getAgreementStatus**(`agreementId`): `Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +▸ **getAgreementStatus**(`agreementId`): `Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> Returns the status of the conditions. @@ -715,7 +853,7 @@ Returns the status of the conditions. #### Returns -`Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +`Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> The conditions status. @@ -725,13 +863,13 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:346](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L346) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:331](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L331) --- ### getAgreementsForDID -▸ **getAgreementsForDID**(`did`): `Promise`<`string`[]\> +▸ **getAgreementsForDID**(`did`): `Promise`\<`string`[]\> #### Parameters @@ -741,7 +879,7 @@ The conditions status. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> #### Inherited from @@ -749,19 +887,19 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:485](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L485) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:476](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L476) --- ### getConditionTypes -▸ **getConditionTypes**(): `Promise`<`string`[]\> +▸ **getConditionTypes**(): `Promise`\<`string`[]\> Conditions address list. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> A list of condition addresses. @@ -771,19 +909,19 @@ A list of condition addresses. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L154) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:137](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L137) --- ### getConditions -▸ **getConditions**(): `Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +▸ **getConditions**(): `Promise`\<`ConditionSmall`[]\> List of condition contracts. #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +`Promise`\<`ConditionSmall`[]\> A list of condition contracts. @@ -793,13 +931,13 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:165](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L165) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L148) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -809,7 +947,7 @@ A list of condition contracts. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -817,41 +955,28 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getInputsOfMethod](BaseTemplate.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getServiceAgreementTemplate -▸ **getServiceAgreementTemplate**(): [`ServiceAgreementTemplate`](../interfaces/ServiceAgreementTemplate.md) +▸ **getServiceAgreementTemplate**(): `Object` #### Returns -[`ServiceAgreementTemplate`](../interfaces/ServiceAgreementTemplate.md) +`Object` + +| Name | Type | +| :---------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `conditionDependency` | \{ `access`: `never`[] = []; `escrowPayment`: `string`[] ; `lockPayment`: `never`[] = [] } | +| `conditionDependency.access` | `never`[] | +| `conditionDependency.escrowPayment` | `string`[] | +| `conditionDependency.lockPayment` | `never`[] | +| `conditions` | \{ `contractName`: `string` = 'LockPaymentCondition'; `events`: \{ `actorType`: `string` = 'publisher'; `handler`: \{ `functionName`: `string` = 'fulfillAccessCondition'; `moduleName`: `string` = 'lockPaymentCondition'; `version`: `string` = '0.1' } ; `name`: `string` = 'Fulfilled' }[] ; `functionName`: `string` = 'fulfill'; `name`: `string` = 'lockPayment'; `parameters`: (\{ `name`: `string` = '\_did'; `type`: `string` = 'bytes32'; `value`: `string` = '' } \| \{ `name`: `string` = '\_amounts'; `type`: `string` = 'uint256[]'; `value`: `never`[] = [] })[] ; `timelock`: `number` = 0; `timeout`: `number` = 0 }[] | +| `contractName` | `string` | +| `events` | \{ `actorType`: `string` = 'consumer'; `handler`: \{ `functionName`: `string` = 'fulfillLockPaymentCondition'; `moduleName`: `string` = 'escrowAccessTemplate'; `version`: `string` = '0.1' } ; `name`: `string` = 'AgreementCreated' }[] | +| `fulfillmentOrder` | `string`[] | #### Overrides @@ -859,13 +984,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AccessTemplate.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AccessTemplate.ts#L39) +[src/keeper/contracts/templates/AccessTemplate.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AccessTemplate.ts#L48) --- ### getServiceAgreementTemplateConditionByRef -▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`<[`ConditionSmall`](ConditionSmall.md)\> +▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`\<`undefined` \| `ConditionSmall`\> #### Parameters @@ -875,7 +1000,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)\> +`Promise`\<`undefined` \| `ConditionSmall`\> #### Inherited from @@ -883,7 +1008,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:329](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L329) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:314](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L314) --- @@ -901,17 +1026,17 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:324](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L324) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:309](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L309) --- ### getServiceAgreementTemplateDependencies -▸ **getServiceAgreementTemplateDependencies**(): `Promise`<{ `[condition: string]`: `string`[]; }\> +▸ **getServiceAgreementTemplateDependencies**(): `Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Returns -`Promise`<{ `[condition: string]`: `string`[]; }\> +`Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Inherited from @@ -919,49 +1044,50 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:336](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L336) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:321](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L321) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[BaseTemplate](BaseTemplate.md).[getSignatureOfMethod](BaseTemplate.md#getsignatureofmethod) +[BaseTemplate](BaseTemplate.md).[getTransactionLogs](BaseTemplate.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -969,13 +1095,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`): `Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`AccessTemplateParams`\>\> +▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`): `Promise`\<`AgreementInstance`\<`AccessTemplateParams`\>\> #### Parameters @@ -988,7 +1114,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`AccessTemplateParams`\>\> +`Promise`\<`AgreementInstance`\<`AccessTemplateParams`\>\> #### Overrides @@ -996,7 +1122,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AccessTemplate.ts:58](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AccessTemplate.ts#L58) +[src/keeper/contracts/templates/AccessTemplate.ts:87](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AccessTemplate.ts#L87) --- @@ -1014,13 +1140,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L74) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L57) --- ### lockTokens -▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams`): `Promise`<`void`\> +▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams?`): `Promise`\<`void`\> #### Parameters @@ -1028,12 +1154,12 @@ readonly `ParamType`[] | :------------- | :---------------------------------------------- | | `tokenAddress` | `any` | | `amounts` | `any` | -| `from` | [`Account`](Account.md) | -| `txParams` | [`TxParameters`](../interfaces/TxParameters.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1041,7 +1167,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:393](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L393) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:382](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L382) --- @@ -1059,7 +1185,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AccessTemplate.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AccessTemplate.ts#L25) +[src/keeper/contracts/templates/AccessTemplate.ts:34](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AccessTemplate.ts#L34) --- @@ -1071,7 +1197,7 @@ readonly `ParamType`[] | Name | Type | Default value | | :------------ | :------------------------------------------------ | :------------ | -| `consumer` | [`Account`](Account.md) | `undefined` | +| `consumer` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `serviceType` | [`ServiceType`](../code-reference.md#servicetype) | `'access'` | #### Returns @@ -1084,13 +1210,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AccessTemplate.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AccessTemplate.ts#L43) +[src/keeper/contracts/templates/AccessTemplate.ts:72](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AccessTemplate.ts#L72) --- ### paramsGen -▸ **paramsGen**(`«destructured»`): `Promise`<`AccessTemplateParams`\> +▸ **paramsGen**(`«destructured»`): `Promise`\<`AccessTemplateParams`\> Specialize params @@ -1102,7 +1228,7 @@ Specialize params #### Returns -`Promise`<`AccessTemplateParams`\> +`Promise`\<`AccessTemplateParams`\> #### Overrides @@ -1110,13 +1236,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/AccessTemplate.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AccessTemplate.ts#L17) +[src/keeper/contracts/templates/AccessTemplate.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AccessTemplate.ts#L26) --- ### paymentData -▸ **paymentData**(`service`): `Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +▸ **paymentData**(`service`): `Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Parameters @@ -1126,7 +1252,7 @@ Specialize params #### Returns -`Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +`Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Inherited from @@ -1134,13 +1260,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L78) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L61) --- ### printAgreementStatus -▸ **printAgreementStatus**(`agreementId`): `Promise`<`void`\> +▸ **printAgreementStatus**(`agreementId`): `Promise`\<`void`\> Prints the agreement status. @@ -1152,7 +1278,7 @@ Prints the agreement status. #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1160,25 +1286,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:429](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L429) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:418](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L418) --- ### process -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> +▸ **process**(`params`, `from`, `txparams?`): `Promise`\<`void`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1186,26 +1312,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:126](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L126) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1213,26 +1339,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1240,7 +1366,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- @@ -1258,7 +1384,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AccessTemplate.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AccessTemplate.ts#L35) +[src/keeper/contracts/templates/AccessTemplate.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AccessTemplate.ts#L44) --- @@ -1276,13 +1402,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L31) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L44) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1300,13 +1426,37 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[BaseTemplate](BaseTemplate.md).[someLog](BaseTemplate.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### standardContext -▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): [`ConditionContext`](../interfaces/ConditionContext.md) +▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): `ConditionContext` #### Parameters @@ -1318,7 +1468,7 @@ Prints the agreement status. #### Returns -[`ConditionContext`](../interfaces/ConditionContext.md) +`ConditionContext` #### Inherited from @@ -1326,25 +1476,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L200) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:189](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L189) --- ### track -▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`<`boolean`\> +▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`\<`boolean`\> #### Parameters | Name | Type | | :----------- | :------------------------------------------------------ | | `_params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `_from` | [`Account`](Account.md) | +| `_from` | [`NvmAccount`](NvmAccount.md) | | `_txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Inherited from @@ -1352,13 +1502,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:102](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L102) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L118) --- ### validateAgreement -▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`<`void`\> +▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`\<`void`\> #### Parameters @@ -1367,13 +1517,13 @@ Prints the agreement status. | `agreement_id` | `string` | | `did` | `string` | | `params` | `AccessTemplateParams` | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `extra` | `any` | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1381,13 +1531,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:125](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L125) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:141](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L141) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`AccessTemplate`](AccessTemplate.md)\> +▸ **getInstance**(`config`): `Promise`\<[`AccessTemplate`](AccessTemplate.md)\> #### Parameters @@ -1397,7 +1547,7 @@ Prints the agreement status. #### Returns -`Promise`<[`AccessTemplate`](AccessTemplate.md)\> +`Promise`\<[`AccessTemplate`](AccessTemplate.md)\> #### Overrides @@ -1405,13 +1555,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AccessTemplate.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AccessTemplate.ts#L31) +[src/keeper/contracts/templates/AccessTemplate.ts:40](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AccessTemplate.ts#L40) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1436,4 +1586,4 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/Account.md b/docs/api-reference/classes/Account.md deleted file mode 100644 index 6d8bc94cd..000000000 --- a/docs/api-reference/classes/Account.md +++ /dev/null @@ -1,555 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / Account - -# Class: Account - -Account information. - -## Hierarchy - -- [`Instantiable`](Instantiable.md) - - ↳ **`Account`** - -## Table of contents - -### Constructors - -- [constructor](Account.md#constructor) - -### Properties - -- [babySecret](Account.md#babysecret) -- [babyX](Account.md#babyx) -- [babyY](Account.md#babyy) -- [id](Account.md#id) -- [password](Account.md#password) -- [zeroDevSigner](Account.md#zerodevsigner) - -### Accessors - -- [artifactsFolder](Account.md#artifactsfolder) -- [circuitsFolder](Account.md#circuitsfolder) -- [config](Account.md#config) -- [instanceConfig](Account.md#instanceconfig) -- [instantiableConfig](Account.md#instantiableconfig) -- [logger](Account.md#logger) -- [nevermined](Account.md#nevermined) -- [web3](Account.md#web3) - -### Methods - -- [getBalance](Account.md#getbalance) -- [getEtherBalance](Account.md#getetherbalance) -- [getId](Account.md#getid) -- [getNeverminedBalance](Account.md#getneverminedbalance) -- [getPassword](Account.md#getpassword) -- [getPublic](Account.md#getpublic) -- [isZeroDev](Account.md#iszerodev) -- [requestTokens](Account.md#requesttokens) -- [setId](Account.md#setid) -- [setInstanceConfig](Account.md#setinstanceconfig) -- [setPassword](Account.md#setpassword) -- [fromZeroDevSigner](Account.md#fromzerodevsigner) -- [getInstance](Account.md#getinstance) -- [setInstanceConfig](Account.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new Account**(`id?`, `config?`) - -#### Parameters - -| Name | Type | Default value | -| :-------- | :---------------------------------------------------------- | :------------ | -| `id` | `string` | `'0x0'` | -| `config?` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | - -#### Overrides - -[Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) - -#### Defined in - -[src/nevermined/Account.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L19) - -## Properties - -### babySecret - -• `Optional` **babySecret**: `string` - -#### Defined in - -[src/nevermined/Account.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L16) - ---- - -### babyX - -• `Optional` **babyX**: `string` - -#### Defined in - -[src/nevermined/Account.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L14) - ---- - -### babyY - -• `Optional` **babyY**: `string` - -#### Defined in - -[src/nevermined/Account.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L15) - ---- - -### id - -• `Private` **id**: `string` = `'0x0'` - -#### Defined in - -[src/nevermined/Account.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L19) - ---- - -### password - -• `Private` `Optional` **password**: `string` - -#### Defined in - -[src/nevermined/Account.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L13) - ---- - -### zeroDevSigner - -• **zeroDevSigner**: `ZeroDevAccountSigner`<`"ECDSA"`\> - -#### Defined in - -[src/nevermined/Account.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L17) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -Instantiable.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -Instantiable.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -Instantiable.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -Instantiable.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -Instantiable.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -Instantiable.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -Instantiable.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -Instantiable.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### getBalance - -▸ **getBalance**(): `Promise`<[`Balance`](../interfaces/Balance.md)\> - -Balances of Ether and Nevermined Token. - -#### Returns - -`Promise`<[`Balance`](../interfaces/Balance.md)\> - -#### Defined in - -[src/nevermined/Account.ts:93](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L93) - ---- - -### getEtherBalance - -▸ **getEtherBalance**(): `Promise`<`bigint`\> - -Balance of Ether. - -#### Returns - -`Promise`<`bigint`\> - -#### Defined in - -[src/nevermined/Account.ts:85](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L85) - ---- - -### getId - -▸ **getId**(): `string` - -#### Returns - -`string` - -#### Defined in - -[src/nevermined/Account.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L43) - ---- - -### getNeverminedBalance - -▸ **getNeverminedBalance**(): `Promise`<`bigint`\> - -Balance of Nevermined Token. - -#### Returns - -`Promise`<`bigint`\> - -#### Defined in - -[src/nevermined/Account.ts:75](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L75) - ---- - -### getPassword - -▸ **getPassword**(): `string` - -Returns account password. - -#### Returns - -`string` - -The account password. - -#### Defined in - -[src/nevermined/Account.ts:67](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L67) - ---- - -### getPublic - -▸ **getPublic**(): `string` - -#### Returns - -`string` - -#### Defined in - -[src/nevermined/Account.ts:51](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L51) - ---- - -### isZeroDev - -▸ **isZeroDev**(): `boolean` - -#### Returns - -`boolean` - -#### Defined in - -[src/nevermined/Account.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L39) - ---- - -### requestTokens - -▸ **requestTokens**(`amount`, `txParams?`): `Promise`<`string`\> - -Request Nevermined Tokens. - -#### Parameters - -| Name | Type | Description | -| :---------- | :-------------------------------------------------- | :---------------------- | -| `amount` | [`BigNumberish`](../code-reference.md#bignumberish) | Tokens to be requested. | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | - -#### Returns - -`Promise`<`string`\> - -#### Defined in - -[src/nevermined/Account.ts:106](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L106) - ---- - -### setId - -▸ **setId**(`id`): `void` - -#### Parameters - -| Name | Type | -| :--- | :---- | -| `id` | `any` | - -#### Returns - -`void` - -#### Defined in - -[src/nevermined/Account.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L47) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[Instantiable](Instantiable.md).[setInstanceConfig](Instantiable.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### setPassword - -▸ **setPassword**(`password`): `void` - -Set account password. - -#### Parameters - -| Name | Type | Description | -| :--------- | :------- | :-------------------- | -| `password` | `string` | Password for account. | - -#### Returns - -`void` - -#### Defined in - -[src/nevermined/Account.ts:59](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L59) - ---- - -### fromZeroDevSigner - -▸ `Static` **fromZeroDevSigner**(`signer`): `Promise`<[`Account`](Account.md)\> - -Returns a nevermined Account from a zerodev signer - -#### Parameters - -| Name | Type | Description | -| :------- | :--------------------------------- | :----------------------- | -| `signer` | `ZeroDevAccountSigner`<`"ECDSA"`\> | A zerodev account signer | - -#### Returns - -`Promise`<[`Account`](Account.md)\> - -The nevermined account - -#### Defined in - -[src/nevermined/Account.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Account.ts#L32) - ---- - -### getInstance - -▸ `Static` **getInstance**(`..._args`): `any` - -#### Parameters - -| Name | Type | -| :--------- | :---- | -| `..._args` | `any` | - -#### Returns - -`any` - -#### Inherited from - -[Instantiable](Instantiable.md).[getInstance](Instantiable.md#getinstance) - -#### Defined in - -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[Instantiable](Instantiable.md).[setInstanceConfig](Instantiable.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/AccountsApi.md b/docs/api-reference/classes/AccountsApi.md index baeb7cfd0..8caf91f2d 100644 --- a/docs/api-reference/classes/AccountsApi.md +++ b/docs/api-reference/classes/AccountsApi.md @@ -20,23 +20,30 @@ Nevermined Accounts API. It allows execute operations related with Ethereum acco - [artifactsFolder](AccountsApi.md#artifactsfolder) - [circuitsFolder](AccountsApi.md#circuitsfolder) +- [client](AccountsApi.md#client) - [config](AccountsApi.md#config) - [instanceConfig](AccountsApi.md#instanceconfig) - [instantiableConfig](AccountsApi.md#instantiableconfig) - [logger](AccountsApi.md#logger) - [nevermined](AccountsApi.md#nevermined) -- [web3](AccountsApi.md#web3) +- [publicClient](AccountsApi.md#publicclient) +- [walletClient](AccountsApi.md#walletclient) ### Methods - [addresses](AccountsApi.md#addresses) -- [balance](AccountsApi.md#balance) -- [findSigner](AccountsApi.md#findsigner) -- [findSignerStatic](AccountsApi.md#findsignerstatic) +- [findAccount](AccountsApi.md#findaccount) - [getAccount](AccountsApi.md#getaccount) +- [getBalance](AccountsApi.md#getbalance) +- [getEtherBalance](AccountsApi.md#getetherbalance) +- [getNeverminedBalance](AccountsApi.md#getneverminedbalance) - [list](AccountsApi.md#list) +- [listBrowserAccounts](AccountsApi.md#listbrowseraccounts) - [requestTokens](AccountsApi.md#requesttokens) - [setInstanceConfig](AccountsApi.md#setinstanceconfig) +- [signTextWithRemoteAccount](AccountsApi.md#signtextwithremoteaccount) +- [signTransactionWithRemoteAccount](AccountsApi.md#signtransactionwithremoteaccount) +- [signTypedData](AccountsApi.md#signtypeddata) - [getInstance](AccountsApi.md#getinstance) - [setInstanceConfig](AccountsApi.md#setinstanceconfig-1) @@ -44,7 +51,7 @@ Nevermined Accounts API. It allows execute operations related with Ethereum acco ### constructor -• **new AccountsApi**(`config`) +• **new AccountsApi**(`config`): [`AccountsApi`](AccountsApi.md) Creates a new AccountsApi @@ -54,23 +61,29 @@ Creates a new AccountsApi | :------- | :---------------------------------------------------------- | :--------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | Configuration of the Nevermined instance | +#### Returns + +[`AccountsApi`](AccountsApi.md) + +[AccountsApi](AccountsApi.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/api/AccountsApi.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AccountsApi.ts#L16) +[src/nevermined/api/AccountsApi.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L16) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -78,17 +91,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -96,13 +109,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -114,13 +145,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -132,17 +163,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -150,13 +181,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -168,13 +199,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -186,179 +217,346 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### addresses -▸ **addresses**(): `Promise`<`string`[]\> +▸ **addresses**(): `Promise`\<`string`[]\> + +Returns the list of addresses (Local or Json-Rpc) #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> + +The list of addresses. #### Defined in -[src/nevermined/api/AccountsApi.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AccountsApi.ts#L90) +[src/nevermined/api/AccountsApi.ts:70](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L70) --- -### balance +### findAccount -▸ **balance**(`account`): `Promise`<[`Balance`](../interfaces/Balance.md)\> +▸ **findAccount**(`from`): `undefined` \| [`NvmAccount`](NvmAccount.md) -Return account balance. +Given an address, it returns the account if it exists in the list of accounts. #### Parameters -| Name | Type | Description | -| :-------- | :---------------------- | :---------------- | -| `account` | [`Account`](Account.md) | Account instance. | +| Name | Type | +| :----- | :------- | +| `from` | `string` | + +#### Returns + +`undefined` \| [`NvmAccount`](NvmAccount.md) + +#### Defined in + +[src/nevermined/api/AccountsApi.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L56) + +--- + +### getAccount + +▸ **getAccount**(`address`): [`NvmAccount`](NvmAccount.md) + +Returns an account initialized with existing web3 provider + +#### Parameters + +| Name | Type | Description | +| :-------- | :------- | :------------------ | +| `address` | `string` | The account address | #### Returns -`Promise`<[`Balance`](../interfaces/Balance.md)\> +[`NvmAccount`](NvmAccount.md) -Ether and Nevermined Token balance. +The account #### Defined in -[src/nevermined/api/AccountsApi.ts:46](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AccountsApi.ts#L46) +[src/nevermined/api/AccountsApi.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L47) --- -### findSigner +### getBalance + +▸ **getBalance**(`account`): `Promise`\<[`Balance`](../interfaces/Balance.md)\> -▸ **findSigner**(`from`): `Promise`<`Signer`\> +It gets the balance of the native token (i.e ETH) and the ERC20 token associated to the account #### Parameters -| Name | Type | -| :----- | :------- | -| `from` | `string` | +| Name | Type | Description | +| :-------- | :---------------------------------------- | :---------------------------------------------------------------- | +| `account` | `string` \| [`NvmAccount`](NvmAccount.md) | Account instance or the address of the account to get the balance | #### Returns -`Promise`<`Signer`\> +`Promise`\<[`Balance`](../interfaces/Balance.md)\> + +The balance of the ERC20 and Native tokens #### Defined in -[src/nevermined/api/AccountsApi.ts:70](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AccountsApi.ts#L70) +[src/nevermined/api/AccountsApi.ts:188](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L188) --- -### findSignerStatic +### getEtherBalance -▸ **findSignerStatic**(`from`): `Promise`<`Signer`\> +▸ **getEtherBalance**(`account`): `Promise`\<`bigint`\> + +It gets the native token (i.e ETH) balance of an account #### Parameters -| Name | Type | -| :----- | :------- | -| `from` | `string` | +| Name | Type | Description | +| :-------- | :---------------------------------------- | :---------------------------------------------------------------- | +| `account` | `string` \| [`NvmAccount`](NvmAccount.md) | Account instance or the address of the account to get the balance | #### Returns -`Promise`<`Signer`\> +`Promise`\<`bigint`\> + +the balance of the native token #### Defined in -[src/nevermined/api/AccountsApi.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AccountsApi.ts#L80) +[src/nevermined/api/AccountsApi.ts:177](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L177) --- -### getAccount +### getNeverminedBalance -▸ **getAccount**(`address`): [`Account`](Account.md) +▸ **getNeverminedBalance**(`account`): `Promise`\<`bigint`\> -Returns an account initialized with existing web3 provider +It gets the balance of the ERC20 Token loaded in the Nevermined instance #### Parameters -| Name | Type | Description | -| :-------- | :------- | :------------------ | -| `address` | `string` | The account address | +| Name | Type | Description | +| :-------- | :---------------------------------------- | :---------------------------------------------------------------- | +| `account` | `string` \| [`NvmAccount`](NvmAccount.md) | Account instance or the address of the account to get the balance | #### Returns -[`Account`](Account.md) +`Promise`\<`bigint`\> -The account +the balance of ERC20 Token related to the account #### Defined in -[src/nevermined/api/AccountsApi.ts:37](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AccountsApi.ts#L37) +[src/nevermined/api/AccountsApi.ts:164](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L164) --- ### list -▸ **list**(): `Promise`<[`Account`](Account.md)[]\> +▸ **list**(): [`NvmAccount`](NvmAccount.md)[] -Returns the list of accounts including the addresses not controlled by the node, +Returns the list of accounts (Local or Json-Rpc) + +#### Returns + +[`NvmAccount`](NvmAccount.md)[] + +The list of accounts. + +#### Defined in + +[src/nevermined/api/AccountsApi.ts:25](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L25) + +--- + +### listBrowserAccounts + +▸ **listBrowserAccounts**(): `Promise`\<[`NvmAccount`](NvmAccount.md)[]\> + +Returns the list of accounts (JSON-RPC), only can be used by providers like metamask, Status or Trustwallet but not by default provider #### Returns -`Promise`<[`Account`](Account.md)[]\> +`Promise`\<[`NvmAccount`](NvmAccount.md)[]\> The list of accounts. #### Defined in -[src/nevermined/api/AccountsApi.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AccountsApi.ts#L27) +[src/nevermined/api/AccountsApi.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L35) --- ### requestTokens -▸ **requestTokens**(`account`, `amount`, `params?`): `Promise`<`boolean`\> +▸ **requestTokens**(`account`, `amount`, `txParams?`): `Promise`\<`boolean`\> Request tokens for an account. #### Parameters -| Name | Type | Description | -| :-------- | :---------------------------------------------- | :---------------- | -| `account` | [`Account`](Account.md) | Account instance. | -| `amount` | `number` | Token amount. | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :---------- | :---------------------------------------------- | :------------------------------------------------------------------- | +| `account` | `string` \| [`NvmAccount`](NvmAccount.md) | Account instance or the address of the account to receive the tokens | +| `amount` | `bigint` | Token amount to request | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the call was successful. false otherwise. #### Defined in -[src/nevermined/api/AccountsApi.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AccountsApi.ts#L57) +[src/nevermined/api/AccountsApi.ts:138](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L138) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -376,13 +574,90 @@ true if the call was successful. false otherwise. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### signTextWithRemoteAccount + +▸ **signTextWithRemoteAccount**(`text`, `from`): `Promise`\<\`0x$\{string}\`\> + +It signs a message using a remote account + +#### Parameters + +| Name | Type | Description | +| :----- | :----------------------- | :--------------------------------------------------------- | +| `text` | `string` \| `Uint8Array` | the message to sign | +| `from` | `string` | the address of the remote account used to sign the message | + +#### Returns + +`Promise`\<\`0x$\{string}\`\> + +the message signed message + +#### Defined in + +[src/nevermined/api/AccountsApi.ts:80](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L80) + +--- + +### signTransactionWithRemoteAccount + +▸ **signTransactionWithRemoteAccount**(`data`, `from`): `Promise`\<\`0x$\{string}\`\> + +It signs a transaction using a remote account + +#### Parameters + +| Name | Type | Description | +| :----- | :--------------- | :------------------------------------------------------------- | +| `data` | \`0x$\{string}\` | the transaction data | +| `from` | `string` | the address of the remote account used to sign the transaction | + +#### Returns + +`Promise`\<\`0x$\{string}\`\> + +the signed transaction + +#### Defined in + +[src/nevermined/api/AccountsApi.ts:97](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L97) + +--- + +### signTypedData + +▸ **signTypedData**(`domain`, `types`, `value`, `from`): `Promise`\<\`0x$\{string}\`\> + +It signs a typed data using a remote account + +#### Parameters + +| Name | Type | Description | +| :------- | :---------------------------------------------------- | :------------------------------------------------------------ | +| `domain` | [`TypedDataDomain`](../interfaces/TypedDataDomain.md) | the domain of the typed data | +| `types` | [`TypedDataTypes`](../interfaces/TypedDataTypes.md) | the types of the typed data | +| `value` | `Record`\<`string`, `any`\> | the value of the typed data | +| `from` | `string` | the address of the remote account used to sign the typed data | + +#### Returns + +`Promise`\<\`0x$\{string}\`\> + +the signed typed data + +#### Defined in + +[src/nevermined/api/AccountsApi.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AccountsApi.ts#L116) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -400,13 +675,13 @@ true if the call was successful. false otherwise. #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -431,4 +706,4 @@ true if the call was successful. false otherwise. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/AgreementStoreManager.md b/docs/api-reference/classes/AgreementStoreManager.md index 572644364..d17d28d2e 100644 --- a/docs/api-reference/classes/AgreementStoreManager.md +++ b/docs/api-reference/classes/AgreementStoreManager.md @@ -27,12 +27,14 @@ - [artifactsFolder](AgreementStoreManager.md#artifactsfolder) - [circuitsFolder](AgreementStoreManager.md#circuitsfolder) +- [client](AgreementStoreManager.md#client) - [config](AgreementStoreManager.md#config) - [instanceConfig](AgreementStoreManager.md#instanceconfig) - [instantiableConfig](AgreementStoreManager.md#instantiableconfig) - [logger](AgreementStoreManager.md#logger) - [nevermined](AgreementStoreManager.md#nevermined) -- [web3](AgreementStoreManager.md#web3) +- [publicClient](AgreementStoreManager.md#publicclient) +- [walletClient](AgreementStoreManager.md#walletclient) ### Methods @@ -43,14 +45,14 @@ - [getAgreement](AgreementStoreManager.md#getagreement) - [getAgreements](AgreementStoreManager.md#getagreements) - [getFromAddress](AgreementStoreManager.md#getfromaddress) -- [getInputsOfMethod](AgreementStoreManager.md#getinputsofmethod) - [getOwner](AgreementStoreManager.md#getowner) -- [getSignatureOfMethod](AgreementStoreManager.md#getsignatureofmethod) +- [getTransactionLogs](AgreementStoreManager.md#gettransactionlogs) - [init](AgreementStoreManager.md#init) - [send](AgreementStoreManager.md#send) - [sendFrom](AgreementStoreManager.md#sendfrom) - [setInstanceConfig](AgreementStoreManager.md#setinstanceconfig) - [setTemplates](AgreementStoreManager.md#settemplates) +- [someLog](AgreementStoreManager.md#somelog) - [getInstance](AgreementStoreManager.md#getinstance) - [setInstanceConfig](AgreementStoreManager.md#setinstanceconfig-1) @@ -58,7 +60,7 @@ ### constructor -• **new AgreementStoreManager**(`contractName`) +• **new AgreementStoreManager**(`contractName`): [`AgreementStoreManager`](AgreementStoreManager.md) #### Parameters @@ -66,19 +68,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`AgreementStoreManager`](AgreementStoreManager.md) + #### Inherited from [ContractBase](ContractBase.md).[constructor](ContractBase.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -86,13 +92,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -100,7 +106,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -114,13 +120,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -128,7 +134,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -138,7 +144,7 @@ #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L19) +[src/keeper/contracts/managers/AgreementStoreManager.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L21) --- @@ -152,17 +158,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -170,17 +176,17 @@ ContractBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -188,13 +194,31 @@ ContractBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ContractBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -206,13 +230,13 @@ ContractBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -224,17 +248,17 @@ ContractBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -242,13 +266,13 @@ ContractBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -260,13 +284,13 @@ ContractBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -278,25 +302,140 @@ ContractBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ContractBase.web3 +ContractBase.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ContractBase.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods @@ -317,13 +456,13 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L33) +[src/keeper/contracts/managers/AgreementStoreManager.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L35) --- ### agreementId -▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`<`string`\> +▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`\<`string`\> #### Parameters @@ -334,17 +473,17 @@ ContractBase.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:76](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L76) +[src/keeper/contracts/managers/AgreementStoreManager.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L100) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -354,15 +493,15 @@ ContractBase.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -370,13 +509,13 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### createAgreement -▸ **createAgreement**(`agreementId`, `did`, `conditionTypes`, `conditionIds`, `timeLocks`, `timeOuts`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreement**(`agreementId`, `did`, `conditionTypes`, `conditionIds`, `timeLocks`, `timeOuts`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -388,42 +527,43 @@ ContractBase.web3 | `conditionIds` | `string`[] | | `timeLocks` | `number`[] | | `timeOuts` | `number`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L80) +[src/keeper/contracts/managers/AgreementStoreManager.ts:104](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L104) --- ### getAgreement -▸ **getAgreement**(`agreementId`): `Promise`<[`AgreementData`](../interfaces/AgreementData.md)\> +▸ **getAgreement**(`agreementId`, `tryOnchain?`): `Promise`\<[`AgreementData`](../interfaces/AgreementData.md)\> #### Parameters -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | +| Name | Type | Default value | +| :------------ | :-------- | :------------ | +| `agreementId` | `string` | `undefined` | +| `tryOnchain` | `boolean` | `false` | #### Returns -`Promise`<[`AgreementData`](../interfaces/AgreementData.md)\> +`Promise`\<[`AgreementData`](../interfaces/AgreementData.md)\> #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L41) +[src/keeper/contracts/managers/AgreementStoreManager.ts:43](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L43) --- ### getAgreements -▸ **getAgreements**(`did`): `Promise`<[`AgreementData`](../interfaces/AgreementData.md)[]\> +▸ **getAgreements**(`did`): `Promise`\<[`AgreementData`](../interfaces/AgreementData.md)[]\> #### Parameters @@ -433,17 +573,17 @@ ContractBase.web3 #### Returns -`Promise`<[`AgreementData`](../interfaces/AgreementData.md)[]\> +`Promise`\<[`AgreementData`](../interfaces/AgreementData.md)[]\> #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L68) +[src/keeper/contracts/managers/AgreementStoreManager.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L92) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -453,7 +593,7 @@ ContractBase.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -461,87 +601,64 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ContractBase](ContractBase.md).[getInputsOfMethod](ContractBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getOwner -▸ **getOwner**(): `Promise`<`string`\> +▸ **getOwner**(): `Promise`\<`string`\> #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:37](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L37) +[src/keeper/contracts/managers/AgreementStoreManager.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L39) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ContractBase](ContractBase.md).[getSignatureOfMethod](ContractBase.md#getsignatureofmethod) +[ContractBase](ContractBase.md).[getTransactionLogs](ContractBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -549,26 +666,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -576,26 +693,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -603,13 +720,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -627,7 +744,7 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- @@ -647,13 +764,37 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L29) +[src/keeper/contracts/managers/AgreementStoreManager.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L31) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[ContractBase](ContractBase.md).[someLog](ContractBase.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`AgreementStoreManager`](AgreementStoreManager.md)\> +▸ **getInstance**(`config`): `Promise`\<[`AgreementStoreManager`](AgreementStoreManager.md)\> #### Parameters @@ -663,7 +804,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`AgreementStoreManager`](AgreementStoreManager.md)\> +`Promise`\<[`AgreementStoreManager`](AgreementStoreManager.md)\> #### Overrides @@ -671,13 +812,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L21) +[src/keeper/contracts/managers/AgreementStoreManager.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L23) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -702,4 +843,4 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/AgreementTemplate.md b/docs/api-reference/classes/AgreementTemplate.md index 9686c168e..1cbbddf0e 100644 --- a/docs/api-reference/classes/AgreementTemplate.md +++ b/docs/api-reference/classes/AgreementTemplate.md @@ -1,6 +1,6 @@ [@nevermined-io/sdk](../code-reference.md) / AgreementTemplate -# Class: AgreementTemplate +# Class: AgreementTemplate\ ## Type parameters @@ -36,12 +36,14 @@ - [artifactsFolder](AgreementTemplate.md#artifactsfolder) - [circuitsFolder](AgreementTemplate.md#circuitsfolder) +- [client](AgreementTemplate.md#client) - [config](AgreementTemplate.md#config) - [instanceConfig](AgreementTemplate.md#instanceconfig) - [instantiableConfig](AgreementTemplate.md#instantiableconfig) - [logger](AgreementTemplate.md#logger) - [nevermined](AgreementTemplate.md#nevermined) -- [web3](AgreementTemplate.md#web3) +- [publicClient](AgreementTemplate.md#publicclient) +- [walletClient](AgreementTemplate.md#walletclient) ### Methods @@ -58,12 +60,11 @@ - [getConditionTypes](AgreementTemplate.md#getconditiontypes) - [getConditions](AgreementTemplate.md#getconditions) - [getFromAddress](AgreementTemplate.md#getfromaddress) -- [getInputsOfMethod](AgreementTemplate.md#getinputsofmethod) - [getServiceAgreementTemplate](AgreementTemplate.md#getserviceagreementtemplate) - [getServiceAgreementTemplateConditionByRef](AgreementTemplate.md#getserviceagreementtemplateconditionbyref) - [getServiceAgreementTemplateConditions](AgreementTemplate.md#getserviceagreementtemplateconditions) - [getServiceAgreementTemplateDependencies](AgreementTemplate.md#getserviceagreementtemplatedependencies) -- [getSignatureOfMethod](AgreementTemplate.md#getsignatureofmethod) +- [getTransactionLogs](AgreementTemplate.md#gettransactionlogs) - [init](AgreementTemplate.md#init) - [instanceFromDDO](AgreementTemplate.md#instancefromddo) - [lockConditionIndex](AgreementTemplate.md#lockconditionindex) @@ -75,6 +76,7 @@ - [sendFrom](AgreementTemplate.md#sendfrom) - [service](AgreementTemplate.md#service) - [setInstanceConfig](AgreementTemplate.md#setinstanceconfig) +- [someLog](AgreementTemplate.md#somelog) - [standardContext](AgreementTemplate.md#standardcontext) - [getInstance](AgreementTemplate.md#getinstance) - [setInstanceConfig](AgreementTemplate.md#setinstanceconfig-1) @@ -83,7 +85,7 @@ ### constructor -• `Protected` **new AgreementTemplate**<`Params`\>(`contractName`) +• **new AgreementTemplate**\<`Params`\>(`contractName`): [`AgreementTemplate`](AgreementTemplate.md)\<`Params`\> #### Type parameters @@ -97,13 +99,17 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`AgreementTemplate`](AgreementTemplate.md)\<`Params`\> + #### Overrides [ContractBase](ContractBase.md).[constructor](ContractBase.md#constructor) #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L68) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L51) ## Properties @@ -113,23 +119,23 @@ #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:52](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L52) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L35) --- ### \_conditions -• `Private` **\_conditions**: [`ConditionSmall`](ConditionSmall.md)[] +• `Private` **\_conditions**: `ConditionSmall`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:53](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L53) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L36) --- ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -137,13 +143,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -151,7 +157,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -165,13 +171,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -179,7 +185,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -193,17 +199,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -211,17 +217,17 @@ ContractBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -229,13 +235,31 @@ ContractBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ContractBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -247,13 +271,13 @@ ContractBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -265,17 +289,17 @@ ContractBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -283,13 +307,13 @@ ContractBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -301,13 +325,13 @@ ContractBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -319,31 +343,146 @@ ContractBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +ContractBase.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -ContractBase.web3 +ContractBase.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### agreementId -▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`<`string`\> +▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`\<`string`\> #### Parameters @@ -354,17 +493,17 @@ ContractBase.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L213) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:202](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L202) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -374,15 +513,15 @@ ContractBase.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -390,13 +529,13 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### createAgreement -▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -408,22 +547,22 @@ ContractBase.web3 | `timeLocks` | `number`[] | | `timeOuts` | `number`[] | | `extraArgs` | `any`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L90) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L73) --- ### createAgreementAndPay -▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -440,22 +579,22 @@ ContractBase.web3 | `tokenAddress` | `string` | | `amounts` | `bigint`[] | | `receivers` | `string`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L115) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L98) --- ### createAgreementFromDDO -▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `from`, `timeOuts?`, `txParams?`): `Promise`<`string`\> +▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `timeOuts?`, `txParams?`): `Promise`\<`string`\> Create a new agreement using the data of a DDO. @@ -466,26 +605,25 @@ Create a new agreement using the data of a DDO. | `agreementIdSeed` | `string` | - | | `ddo` | [`DDO`](DDO.md) | DDO. | | `parameters` | `Params` | | -| `consumer` | [`Account`](Account.md) | - | -| `from` | [`Account`](Account.md) | - | +| `consumer` | [`NvmAccount`](NvmAccount.md) | - | | `timeOuts?` | `number`[] | - | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:222](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L222) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:211](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L211) --- ### createAgreementWithPaymentFromDDO -▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`<`string`\> +▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`\<`string`\> #### Parameters @@ -495,24 +633,24 @@ true if the call was successful. | `ddo` | [`DDO`](DDO.md) | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | | `parameters` | `Params` | -| `consumer` | [`Account`](Account.md) | -| `from` | [`Account`](Account.md) | +| `consumer` | [`NvmAccount`](NvmAccount.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | | `observer?` | (`orderProgressStep`: [`OrderProgressStep`](../enums/OrderProgressStep.md)) => `void` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L252) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:240](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L240) --- ### getAgreementCreatedEvent -▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`<`any`[]\> +▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`\<`any`[]\> Generates and returns the agreement creation event. @@ -524,19 +662,19 @@ Generates and returns the agreement creation event. #### Returns -`Promise`<`any`[]\> +`Promise`\<`any`[]\> Agreement created event. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:459](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L459) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:450](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L450) --- ### getAgreementIdsFromDDO -▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`<`string`[]\> +▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`\<`string`[]\> Get agreement conditions IDs. @@ -551,19 +689,19 @@ Get agreement conditions IDs. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> The condition IDs. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:180](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L180) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:169](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L169) --- ### getAgreementStatus -▸ **getAgreementStatus**(`agreementId`): `Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +▸ **getAgreementStatus**(`agreementId`): `Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> Returns the status of the conditions. @@ -575,19 +713,19 @@ Returns the status of the conditions. #### Returns -`Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +`Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:346](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L346) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:331](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L331) --- ### getAgreementsForDID -▸ **getAgreementsForDID**(`did`): `Promise`<`string`[]\> +▸ **getAgreementsForDID**(`did`): `Promise`\<`string`[]\> #### Parameters @@ -597,53 +735,53 @@ The conditions status. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:485](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L485) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:476](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L476) --- ### getConditionTypes -▸ **getConditionTypes**(): `Promise`<`string`[]\> +▸ **getConditionTypes**(): `Promise`\<`string`[]\> Conditions address list. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> A list of condition addresses. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L154) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:137](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L137) --- ### getConditions -▸ **getConditions**(): `Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +▸ **getConditions**(): `Promise`\<`ConditionSmall`[]\> List of condition contracts. #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +`Promise`\<`ConditionSmall`[]\> A list of condition contracts. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:165](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L165) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L148) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -653,7 +791,7 @@ A list of condition contracts. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -661,37 +799,13 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ContractBase](ContractBase.md).[getInputsOfMethod](ContractBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getServiceAgreementTemplate -▸ `Abstract` **getServiceAgreementTemplate**(): [`ServiceAgreementTemplate`](../interfaces/ServiceAgreementTemplate.md) +▸ **getServiceAgreementTemplate**(): [`ServiceAgreementTemplate`](../interfaces/ServiceAgreementTemplate.md) #### Returns @@ -699,13 +813,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:322](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L322) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:307](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L307) --- ### getServiceAgreementTemplateConditionByRef -▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`<[`ConditionSmall`](ConditionSmall.md)\> +▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`\<`undefined` \| `ConditionSmall`\> #### Parameters @@ -715,11 +829,11 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)\> +`Promise`\<`undefined` \| `ConditionSmall`\> #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:329](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L329) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:314](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L314) --- @@ -733,63 +847,64 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:324](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L324) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:309](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L309) --- ### getServiceAgreementTemplateDependencies -▸ **getServiceAgreementTemplateDependencies**(): `Promise`<{ `[condition: string]`: `string`[]; }\> +▸ **getServiceAgreementTemplateDependencies**(): `Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Returns -`Promise`<{ `[condition: string]`: `string`[]; }\> +`Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:336](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L336) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:321](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L321) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ContractBase](ContractBase.md).[getSignatureOfMethod](ContractBase.md#getsignatureofmethod) +[ContractBase](ContractBase.md).[getTransactionLogs](ContractBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -797,13 +912,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instanceFromDDO -▸ `Optional` `Abstract` **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`, `serviceIndex?`): `Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`Params`\>\> +▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`, `serviceIndex?`): `Promise`\<`AgreementInstance`\<`Params`\>\> #### Parameters @@ -817,11 +932,11 @@ readonly `ParamType`[] #### Returns -`Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`Params`\>\> +`Promise`\<`AgreementInstance`\<`Params`\>\> #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:190](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L190) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:179](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L179) --- @@ -835,13 +950,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L74) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L57) --- ### lockTokens -▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams`): `Promise`<`void`\> +▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams?`): `Promise`\<`void`\> #### Parameters @@ -849,22 +964,22 @@ readonly `ParamType`[] | :------------- | :---------------------------------------------- | | `tokenAddress` | `any` | | `amounts` | `any` | -| `from` | [`Account`](Account.md) | -| `txParams` | [`TxParameters`](../interfaces/TxParameters.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:393](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L393) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:382](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L382) --- ### params -▸ `Abstract` **params**(`...args`): `Params` +▸ **params**(`...args`): `Params` #### Parameters @@ -878,13 +993,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:72](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L72) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L55) --- ### paymentData -▸ **paymentData**(`service`): `Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +▸ **paymentData**(`service`): `Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Parameters @@ -894,17 +1009,17 @@ readonly `ParamType`[] #### Returns -`Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +`Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L78) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L61) --- ### printAgreementStatus -▸ **printAgreementStatus**(`agreementId`): `Promise`<`void`\> +▸ **printAgreementStatus**(`agreementId`): `Promise`\<`void`\> Prints the agreement status. @@ -916,30 +1031,30 @@ Prints the agreement status. #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:429](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L429) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:418](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L418) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -947,26 +1062,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -974,13 +1089,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### service -▸ `Abstract` **service**(): [`ServiceType`](../code-reference.md#servicetype) +▸ **service**(): [`ServiceType`](../code-reference.md#servicetype) #### Returns @@ -988,13 +1103,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:198](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L198) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:187](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L187) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1012,13 +1127,37 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[ContractBase](ContractBase.md).[someLog](ContractBase.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### standardContext -▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): [`ConditionContext`](../interfaces/ConditionContext.md) +▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): `ConditionContext` #### Parameters @@ -1030,17 +1169,17 @@ Prints the agreement status. #### Returns -[`ConditionContext`](../interfaces/ConditionContext.md) +`ConditionContext` #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L200) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:189](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L189) --- ### getInstance -▸ `Static` **getInstance**<`Params`\>(`config`, `templateContractName`, `templateClass`, `optional?`): `Promise`<`any`\> +▸ **getInstance**\<`Params`\>(`config`, `templateContractName`, `templateClass`, `optional?`): `Promise`\<`any`\> #### Type parameters @@ -1059,7 +1198,7 @@ Prints the agreement status. #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Overrides @@ -1067,13 +1206,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L55) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L38) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1098,4 +1237,4 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/AgreementsApi.md b/docs/api-reference/classes/AgreementsApi.md index 7a5cac352..42c8fb499 100644 --- a/docs/api-reference/classes/AgreementsApi.md +++ b/docs/api-reference/classes/AgreementsApi.md @@ -24,12 +24,14 @@ Nevermined Agreements API. It allows the integration with Nevermined Service Exe - [artifactsFolder](AgreementsApi.md#artifactsfolder) - [circuitsFolder](AgreementsApi.md#circuitsfolder) +- [client](AgreementsApi.md#client) - [config](AgreementsApi.md#config) - [instanceConfig](AgreementsApi.md#instanceconfig) - [instantiableConfig](AgreementsApi.md#instantiableconfig) - [logger](AgreementsApi.md#logger) - [nevermined](AgreementsApi.md#nevermined) -- [web3](AgreementsApi.md#web3) +- [publicClient](AgreementsApi.md#publicclient) +- [walletClient](AgreementsApi.md#walletclient) ### Methods @@ -47,7 +49,7 @@ Nevermined Agreements API. It allows the integration with Nevermined Service Exe ### constructor -• **new AgreementsApi**(`config`) +• **new AgreementsApi**(`config`): [`AgreementsApi`](AgreementsApi.md) Creates a new AgreementsApi @@ -57,13 +59,19 @@ Creates a new AgreementsApi | :------- | :---------------------------------------------------------- | :--------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | Configuration of the Nevermined instance | +#### Returns + +[`AgreementsApi`](AgreementsApi.md) + +[AgreementsApi](AgreementsApi.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/api/AgreementsApi.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AgreementsApi.ts#L28) +[src/nevermined/api/AgreementsApi.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AgreementsApi.ts#L28) ## Properties @@ -75,17 +83,17 @@ Agreements Conditions submodule. #### Defined in -[src/nevermined/api/AgreementsApi.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AgreementsApi.ts#L21) +[src/nevermined/api/AgreementsApi.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AgreementsApi.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -93,17 +101,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -111,13 +119,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -129,13 +155,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -147,17 +173,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -165,13 +191,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -183,13 +209,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -201,49 +227,163 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### create -▸ **create**(`did`, `agreementIdSeed`, `serviceType`, `agreementParams`, `consumer`, `publisher`, `params?`): `Promise`<`string`\> +▸ **create**(`did`, `agreementIdSeed`, `serviceType`, `agreementParams`, `from`, `txParams?`): `Promise`\<`string`\> Create a service agreement on-chain. This should be called by the publisher of the asset. #### Parameters -| Name | Type | Description | -| :---------------- | :------------------------------------------------ | :----------------- | -| `did` | `string` | Decentralized ID. | -| `agreementIdSeed` | `string` | - | -| `serviceType` | [`ServiceType`](../code-reference.md#servicetype) | Service. | -| `agreementParams` | `any` | - | -| `consumer` | [`Account`](Account.md) | Consumer account. | -| `publisher` | [`Account`](Account.md) | Publisher account. | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :---------------- | :------------------------------------------------ | :----------------------------------------------------- | +| `did` | `string` | Decentralized ID. | +| `agreementIdSeed` | `string` | Service agreement ID seed. | +| `serviceType` | [`ServiceType`](../code-reference.md#servicetype) | Service. | +| `agreementParams` | `any` | Agreement parameters. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the user creating the service agreement | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters. | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> The service agreement id @@ -254,13 +394,13 @@ in this method before submitting on-chain. #### Defined in -[src/nevermined/api/AgreementsApi.ts:87](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AgreementsApi.ts#L87) +[src/nevermined/api/AgreementsApi.ts:88](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AgreementsApi.ts#L88) --- ### getAgreement -▸ **getAgreement**(`agreementId`): `Promise`<[`AgreementData`](../interfaces/AgreementData.md)\> +▸ **getAgreement**(`agreementId`): `Promise`\<[`AgreementData`](../interfaces/AgreementData.md)\> It returns the details of one agreement @@ -272,19 +412,19 @@ It returns the details of one agreement #### Returns -`Promise`<[`AgreementData`](../interfaces/AgreementData.md)\> +`Promise`\<[`AgreementData`](../interfaces/AgreementData.md)\> the details of the agreement #### Defined in -[src/nevermined/api/AgreementsApi.ts:148](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AgreementsApi.ts#L148) +[src/nevermined/api/AgreementsApi.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AgreementsApi.ts#L140) --- ### getAgreements -▸ **getAgreements**(`did`): `Promise`<[`AgreementData`](../interfaces/AgreementData.md)[]\> +▸ **getAgreements**(`did`): `Promise`\<[`AgreementData`](../interfaces/AgreementData.md)[]\> Gets the list of agreements created about an asset @@ -296,46 +436,46 @@ Gets the list of agreements created about an asset #### Returns -`Promise`<[`AgreementData`](../interfaces/AgreementData.md)[]\> +`Promise`\<[`AgreementData`](../interfaces/AgreementData.md)[]\> the list of agreements #### Defined in -[src/nevermined/api/AgreementsApi.ts:157](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AgreementsApi.ts#L157) +[src/nevermined/api/AgreementsApi.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AgreementsApi.ts#L149) --- ### isAccessGranted -▸ **isAccessGranted**(`agreementId`, `did`, `consumerAddress`, `account`): `Promise`<`boolean`\> +▸ **isAccessGranted**(`agreementId`, `did`, `consumerAddress`, `from`): `Promise`\<`boolean`\> Checks if a consumer has permissions for a certain DID and Agreement Id #### Parameters -| Name | Type | Description | -| :---------------- | :---------------------- | :--------------------------------- | -| `agreementId` | `string` | the agreement id | -| `did` | `string` | the unique identifier of the asset | -| `consumerAddress` | `string` | the address of the consumer | -| `account` | [`Account`](Account.md) | the user account | +| Name | Type | Description | +| :---------------- | :---------------------------- | :--------------------------------- | +| `agreementId` | `string` | the agreement id | +| `did` | `string` | the unique identifier of the asset | +| `consumerAddress` | `string` | the address of the consumer | +| `from` | [`NvmAccount`](NvmAccount.md) | the user account | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the user has permissions #### Defined in -[src/nevermined/api/AgreementsApi.ts:169](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AgreementsApi.ts#L169) +[src/nevermined/api/AgreementsApi.ts:161](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AgreementsApi.ts#L161) --- ### prepareSignature -▸ **prepareSignature**(`did`, `serviceType`, `consumer`): `Promise`<[`AgreementPrepareResult`](../interfaces/AgreementPrepareResult.md)\> +▸ **prepareSignature**(`did`, `serviceType`, `from`): `Promise`\<[`AgreementPrepareResult`](../interfaces/AgreementPrepareResult.md)\> Creates a consumer signature for the specified asset service. @@ -345,23 +485,23 @@ Creates a consumer signature for the specified asset service. | :------------ | :------------------------------------------------ | :---------------- | | `did` | `string` | Decentralized ID. | | `serviceType` | [`ServiceType`](../code-reference.md#servicetype) | Service. | -| `consumer` | [`Account`](Account.md) | Consumer account. | +| `from` | [`NvmAccount`](NvmAccount.md) | Consumer account. | #### Returns -`Promise`<[`AgreementPrepareResult`](../interfaces/AgreementPrepareResult.md)\> +`Promise`\<[`AgreementPrepareResult`](../interfaces/AgreementPrepareResult.md)\> The agreement ID and signature. #### Defined in -[src/nevermined/api/AgreementsApi.ts:45](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AgreementsApi.ts#L45) +[src/nevermined/api/AgreementsApi.ts:45](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AgreementsApi.ts#L45) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -379,38 +519,38 @@ The agreement ID and signature. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### status -▸ **status**(`agreementId`, `extended?`): `Promise`<`any`\> +▸ **status**(`agreementId`, `extended?`): `Promise`\<`any`\> Get the status of a service agreement. #### Parameters -| Name | Type | Default value | Description | -| :------------ | :-------- | :------------ | :------------------------------------------- | -| `agreementId` | `string` | `undefined` | Service agreement ID. | -| `extended` | `boolean` | `false` | Returns a complete status with dependencies. | +| Name | Type | Default value | Description | +| :------------ | :-------- | :------------ | :--------------------------------------------------- | +| `agreementId` | `string` | `undefined` | Service agreement ID. | +| `extended` | `boolean` | `false` | If true returns a complete status with dependencies. | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> status of the agreement #### Defined in -[src/nevermined/api/AgreementsApi.ts:122](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AgreementsApi.ts#L122) +[src/nevermined/api/AgreementsApi.ts:114](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AgreementsApi.ts#L114) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -428,13 +568,13 @@ status of the agreement #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -459,4 +599,4 @@ status of the agreement #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/ApiError.md b/docs/api-reference/classes/ApiError.md index 292680753..c8dc0883c 100644 --- a/docs/api-reference/classes/ApiError.md +++ b/docs/api-reference/classes/ApiError.md @@ -16,6 +16,7 @@ ### Properties +- [cause](ApiError.md#cause) - [message](ApiError.md#message) - [name](ApiError.md#name) - [stack](ApiError.md#stack) @@ -30,7 +31,7 @@ ### constructor -• **new ApiError**(`message`) +• **new ApiError**(`message`): [`ApiError`](ApiError.md) #### Parameters @@ -38,16 +39,34 @@ | :-------- | :------- | | `message` | `string` | +#### Returns + +[`ApiError`](ApiError.md) + #### Overrides Error.constructor #### Defined in -[src/errors/ApiError.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/errors/ApiError.ts#L2) +[src/errors/NeverminedErrors.ts:32](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L32) ## Properties +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +Error.cause + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + ### message • **message**: `string` @@ -58,7 +77,7 @@ Error.message #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1068 +node_modules/typescript/lib/lib.es5.d.ts:1077 --- @@ -72,7 +91,7 @@ Error.name #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1067 +node_modules/typescript/lib/lib.es5.d.ts:1076 --- @@ -86,7 +105,7 @@ Error.stack #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1069 +node_modules/typescript/lib/lib.es5.d.ts:1078 --- @@ -94,12 +113,16 @@ node_modules/typescript/lib/lib.es5.d.ts:1069 ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Type declaration ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -111,17 +134,13 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from Error.prepareStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:11 +node_modules/@types/node/globals.d.ts:28 --- @@ -135,13 +154,13 @@ Error.stackTraceLimit #### Defined in -node_modules/@types/node/globals.d.ts:13 +node_modules/@types/node/globals.d.ts:30 ## Methods ### captureStackTrace -▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object @@ -162,4 +181,4 @@ Error.captureStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:4 +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/AssetAttributes.md b/docs/api-reference/classes/AssetAttributes.md index f178f2c16..2edf4cdfc 100644 --- a/docs/api-reference/classes/AssetAttributes.md +++ b/docs/api-reference/classes/AssetAttributes.md @@ -24,7 +24,6 @@ - [predefinedAssetServices](AssetAttributes.md#predefinedassetservices) - [providers](AssetAttributes.md#providers) - [services](AssetAttributes.md#services) -- [DEFAULT_ENCRYPTION_METHOD](AssetAttributes.md#default_encryption_method) - [defaultValues](AssetAttributes.md#defaultvalues) ### Methods @@ -35,7 +34,11 @@ ### constructor -• **new AssetAttributes**() +• **new AssetAttributes**(): [`AssetAttributes`](AssetAttributes.md) + +#### Returns + +[`AssetAttributes`](AssetAttributes.md) ## Properties @@ -48,7 +51,7 @@ That asset association typically helps to search and filter between assets part #### Defined in -[src/models/AssetAttributes.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L47) +[src/models/AssetAttributes.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L48) --- @@ -65,7 +68,7 @@ This method allows to specify the encryption method to be used. #### Defined in -[src/models/AssetAttributes.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L20) +[src/models/AssetAttributes.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L21) --- @@ -82,7 +85,7 @@ This would allow to create an agreement that can not fulfilled until certain per #### Defined in -[src/models/AssetAttributes.ts:67](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L67) +[src/models/AssetAttributes.ts:68](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L68) --- @@ -99,7 +102,7 @@ This would allow to create an agreement that is not fulfilled after a certain pe #### Defined in -[src/models/AssetAttributes.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L57) +[src/models/AssetAttributes.ts:58](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L58) --- @@ -115,7 +118,7 @@ Metadata describing the asset #### Defined in -[src/models/AssetAttributes.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L13) +[src/models/AssetAttributes.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L14) --- @@ -131,7 +134,7 @@ List of additional asset services to be included as part of an asset #### Defined in -[src/models/AssetAttributes.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L32) +[src/models/AssetAttributes.ts:33](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L33) --- @@ -147,7 +150,7 @@ Typically just the address of one Nevermined Node trusted by the user. #### Defined in -[src/models/AssetAttributes.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L41) +[src/models/AssetAttributes.ts:42](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L42) --- @@ -163,17 +166,7 @@ List of services and their attributes offered by an asset. #### Defined in -[src/models/AssetAttributes.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L26) - ---- - -### DEFAULT_ENCRYPTION_METHOD - -▪ `Static` **DEFAULT_ENCRYPTION_METHOD**: [`EncryptionMethod`](../code-reference.md#encryptionmethod) - -#### Defined in - -[src/models/AssetAttributes.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L7) +[src/models/AssetAttributes.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L27) --- @@ -183,25 +176,25 @@ List of services and their attributes offered by an asset. #### Type declaration -| Name | Type | -| :------------------------ | :-------------------------------------------------------------------------------------------------------------- | -| `appId` | `string` | -| `encryptionMethod` | [`EncryptionMethod`](../code-reference.md#encryptionmethod) | -| `fulfillAccessTimelock` | `number` | -| `fulfillAccessTimeout` | `number` | -| `predefinedAssetServices` | [`ServiceCommon`](../interfaces/ServiceCommon.md)[] | -| `providers` | `any`[] | -| `services` | { `price`: [`AssetPrice`](AssetPrice.md) ; `serviceType`: [`ServiceType`](../code-reference.md#servicetype) }[] | +| Name | Type | +| :------------------------ | :--------------------------------------------------------------------------------------------------------------- | +| `appId` | `string` | +| `encryptionMethod` | [`EncryptionMethod`](../code-reference.md#encryptionmethod) | +| `fulfillAccessTimelock` | `number` | +| `fulfillAccessTimeout` | `number` | +| `predefinedAssetServices` | [`ServiceCommon`](../interfaces/ServiceCommon.md)[] | +| `providers` | `never`[] | +| `services` | \{ `price`: [`AssetPrice`](AssetPrice.md) ; `serviceType`: [`ServiceType`](../code-reference.md#servicetype) }[] | #### Defined in -[src/models/AssetAttributes.ts:69](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L69) +[src/models/AssetAttributes.ts:70](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L70) ## Methods ### getInstance -▸ `Static` **getInstance**(`assetAttributes`): `Required`<[`AssetAttributes`](AssetAttributes.md)\> +▸ **getInstance**(`assetAttributes`): `Required`\<[`AssetAttributes`](AssetAttributes.md)\> #### Parameters @@ -211,8 +204,8 @@ List of services and their attributes offered by an asset. #### Returns -`Required`<[`AssetAttributes`](AssetAttributes.md)\> +`Required`\<[`AssetAttributes`](AssetAttributes.md)\> #### Defined in -[src/models/AssetAttributes.ts:84](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L84) +[src/models/AssetAttributes.ts:85](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L85) diff --git a/docs/api-reference/classes/AssetError.md b/docs/api-reference/classes/AssetError.md index 8e3642d68..0d6b2658f 100644 --- a/docs/api-reference/classes/AssetError.md +++ b/docs/api-reference/classes/AssetError.md @@ -16,6 +16,7 @@ ### Properties +- [cause](AssetError.md#cause) - [message](AssetError.md#message) - [name](AssetError.md#name) - [stack](AssetError.md#stack) @@ -30,7 +31,7 @@ ### constructor -• **new AssetError**(`message`) +• **new AssetError**(`message`): [`AssetError`](AssetError.md) #### Parameters @@ -38,16 +39,34 @@ | :-------- | :------- | | `message` | `string` | +#### Returns + +[`AssetError`](AssetError.md) + #### Overrides Error.constructor #### Defined in -[src/errors/AssetError.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/errors/AssetError.ts#L2) +[src/errors/NeverminedErrors.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L56) ## Properties +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +Error.cause + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + ### message • **message**: `string` @@ -58,7 +77,7 @@ Error.message #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1068 +node_modules/typescript/lib/lib.es5.d.ts:1077 --- @@ -72,7 +91,7 @@ Error.name #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1067 +node_modules/typescript/lib/lib.es5.d.ts:1076 --- @@ -86,7 +105,7 @@ Error.stack #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1069 +node_modules/typescript/lib/lib.es5.d.ts:1078 --- @@ -94,12 +113,16 @@ node_modules/typescript/lib/lib.es5.d.ts:1069 ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Type declaration ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -111,17 +134,13 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from Error.prepareStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:11 +node_modules/@types/node/globals.d.ts:28 --- @@ -135,13 +154,13 @@ Error.stackTraceLimit #### Defined in -node_modules/@types/node/globals.d.ts:13 +node_modules/@types/node/globals.d.ts:30 ## Methods ### captureStackTrace -▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object @@ -162,4 +181,4 @@ Error.captureStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:4 +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/AssetPrice.md b/docs/api-reference/classes/AssetPrice.md index 57fd7d073..d0daadb37 100644 --- a/docs/api-reference/classes/AssetPrice.md +++ b/docs/api-reference/classes/AssetPrice.md @@ -13,7 +13,6 @@ - [rewards](AssetPrice.md#rewards) - [tokenAddress](AssetPrice.md#tokenaddress) - [totalPrice](AssetPrice.md#totalprice) -- [NETWORK_FEE_DENOMINATOR](AssetPrice.md#network_fee_denominator) ### Methods @@ -35,25 +34,33 @@ ### constructor -• **new AssetPrice**() +• **new AssetPrice**(): [`AssetPrice`](AssetPrice.md) + +#### Returns + +[`AssetPrice`](AssetPrice.md) #### Defined in -[src/models/AssetPrice.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L10) +[src/models/AssetPrice.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L10) -• **new AssetPrice**(`_rewards`) +• **new AssetPrice**(`_rewards`): [`AssetPrice`](AssetPrice.md) #### Parameters -| Name | Type | -| :--------- | :------------------------- | -| `_rewards` | `Map`<`string`, `bigint`\> | +| Name | Type | +| :--------- | :-------------------------- | +| `_rewards` | `Map`\<`string`, `bigint`\> | + +#### Returns + +[`AssetPrice`](AssetPrice.md) #### Defined in -[src/models/AssetPrice.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L11) +[src/models/AssetPrice.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L11) -• **new AssetPrice**(`address`, `amount`) +• **new AssetPrice**(`address`, `amount`): [`AssetPrice`](AssetPrice.md) #### Parameters @@ -62,11 +69,15 @@ | `address` | `string` | | `amount` | `bigint` | +#### Returns + +[`AssetPrice`](AssetPrice.md) + #### Defined in -[src/models/AssetPrice.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L12) +[src/models/AssetPrice.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L12) -• **new AssetPrice**(`address`, `amount`, `tokenAddress`) +• **new AssetPrice**(`address`, `amount`, `tokenAddress`): [`AssetPrice`](AssetPrice.md) #### Parameters @@ -76,19 +87,23 @@ | `amount` | `bigint` | | `tokenAddress` | `string` | +#### Returns + +[`AssetPrice`](AssetPrice.md) + #### Defined in -[src/models/AssetPrice.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L13) +[src/models/AssetPrice.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L13) ## Properties ### rewards -• `Private` **rewards**: `Map`<`string`, `bigint`\> +• `Private` **rewards**: `Map`\<`string`, `bigint`\> #### Defined in -[src/models/AssetPrice.ts:6](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L6) +[src/models/AssetPrice.ts:6](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L6) --- @@ -98,7 +113,7 @@ #### Defined in -[src/models/AssetPrice.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L8) +[src/models/AssetPrice.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L8) --- @@ -108,17 +123,7 @@ #### Defined in -[src/models/AssetPrice.ts:4](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L4) - ---- - -### NETWORK_FEE_DENOMINATOR - -▪ `Static` `Readonly` **NETWORK_FEE_DENOMINATOR**: `10000n` - -#### Defined in - -[src/models/AssetPrice.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L2) +[src/models/AssetPrice.ts:4](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L4) ## Methods @@ -147,7 +152,7 @@ AssetPrice.NETWORK_FEE_DENOMINATOR #### Defined in -[src/models/AssetPrice.ts:75](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L75) +[src/models/AssetPrice.ts:77](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L77) --- @@ -176,7 +181,7 @@ AssetPrice.NETWORK_FEE_DENOMINATOR #### Defined in -[src/models/AssetPrice.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L88) +[src/models/AssetPrice.ts:88](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L88) --- @@ -190,7 +195,7 @@ AssetPrice.NETWORK_FEE_DENOMINATOR #### Defined in -[src/models/AssetPrice.ts:46](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L46) +[src/models/AssetPrice.ts:46](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L46) --- @@ -204,7 +209,7 @@ AssetPrice.NETWORK_FEE_DENOMINATOR #### Defined in -[src/models/AssetPrice.ts:103](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L103) +[src/models/AssetPrice.ts:104](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L104) --- @@ -218,7 +223,7 @@ AssetPrice.NETWORK_FEE_DENOMINATOR #### Defined in -[src/models/AssetPrice.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L50) +[src/models/AssetPrice.ts:50](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L50) --- @@ -232,21 +237,21 @@ AssetPrice.NETWORK_FEE_DENOMINATOR #### Defined in -[src/models/AssetPrice.ts:109](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L109) +[src/models/AssetPrice.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L110) --- ### getRewards -▸ **getRewards**(): `Map`<`string`, `bigint`\> +▸ **getRewards**(): `Map`\<`string`, `bigint`\> #### Returns -`Map`<`string`, `bigint`\> +`Map`\<`string`, `bigint`\> #### Defined in -[src/models/AssetPrice.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L42) +[src/models/AssetPrice.ts:42](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L42) --- @@ -260,7 +265,7 @@ AssetPrice.NETWORK_FEE_DENOMINATOR #### Defined in -[src/models/AssetPrice.ts:65](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L65) +[src/models/AssetPrice.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L67) --- @@ -274,7 +279,7 @@ AssetPrice.NETWORK_FEE_DENOMINATOR #### Defined in -[src/models/AssetPrice.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L38) +[src/models/AssetPrice.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L38) --- @@ -295,7 +300,7 @@ AssetPrice.NETWORK_FEE_DENOMINATOR #### Defined in -[src/models/AssetPrice.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L54) +[src/models/AssetPrice.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L54) --- @@ -315,7 +320,7 @@ AssetPrice.NETWORK_FEE_DENOMINATOR #### Defined in -[src/models/AssetPrice.ts:60](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L60) +[src/models/AssetPrice.ts:62](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L62) --- @@ -329,13 +334,13 @@ AssetPrice.NETWORK_FEE_DENOMINATOR #### Defined in -[src/models/AssetPrice.ts:114](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L114) +[src/models/AssetPrice.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L115) --- ### sumAmounts -▸ `Static` **sumAmounts**(`amounts`): `bigint` +▸ **sumAmounts**(`amounts`): `bigint` #### Parameters @@ -349,4 +354,4 @@ AssetPrice.NETWORK_FEE_DENOMINATOR #### Defined in -[src/models/AssetPrice.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetPrice.ts#L34) +[src/models/AssetPrice.ts:34](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetPrice.ts#L34) diff --git a/docs/api-reference/classes/AssetPublicationOptions.md b/docs/api-reference/classes/AssetPublicationOptions.md index 7b56ce7d1..bfd897bd6 100644 --- a/docs/api-reference/classes/AssetPublicationOptions.md +++ b/docs/api-reference/classes/AssetPublicationOptions.md @@ -17,7 +17,11 @@ ### constructor -• **new AssetPublicationOptions**() +• **new AssetPublicationOptions**(): [`AssetPublicationOptions`](AssetPublicationOptions.md) + +#### Returns + +[`AssetPublicationOptions`](AssetPublicationOptions.md) ## Properties @@ -27,7 +31,7 @@ #### Defined in -[src/nevermined/api/AssetsApi.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L38) +[src/types/MetadataTypes.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L41) --- @@ -37,4 +41,4 @@ #### Defined in -[src/nevermined/api/AssetsApi.ts:37](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L37) +[src/types/MetadataTypes.ts:40](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L40) diff --git a/docs/api-reference/classes/AssetsApi.md b/docs/api-reference/classes/AssetsApi.md index f5399a2c3..5ff59520b 100644 --- a/docs/api-reference/classes/AssetsApi.md +++ b/docs/api-reference/classes/AssetsApi.md @@ -28,12 +28,14 @@ You can find more information about you can do in a Nevermined information here: - [artifactsFolder](AssetsApi.md#artifactsfolder) - [circuitsFolder](AssetsApi.md#circuitsfolder) +- [client](AssetsApi.md#client) - [config](AssetsApi.md#config) - [instanceConfig](AssetsApi.md#instanceconfig) - [instantiableConfig](AssetsApi.md#instantiableconfig) - [logger](AssetsApi.md#logger) - [nevermined](AssetsApi.md#nevermined) -- [web3](AssetsApi.md#web3) +- [publicClient](AssetsApi.md#publicclient) +- [walletClient](AssetsApi.md#walletclient) ### Methods @@ -68,7 +70,7 @@ You can find more information about you can do in a Nevermined information here: ### constructor -• **new AssetsApi**(`config`) +• **new AssetsApi**(`config`): [`AssetsApi`](AssetsApi.md) Creates a new AssetsApi @@ -78,13 +80,19 @@ Creates a new AssetsApi | :------- | :---------------------------------------------------------- | :--------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | Configuration of the Nevermined instance | +#### Returns + +[`AssetsApi`](AssetsApi.md) + +[AssetsApi](AssetsApi.md) + #### Overrides [RegistryBaseApi](RegistryBaseApi.md).[constructor](RegistryBaseApi.md#constructor) #### Defined in -[src/nevermined/api/AssetsApi.ts:121](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L121) +[src/nevermined/api/AssetsApi.ts:87](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L87) ## Properties @@ -96,7 +104,7 @@ Utilities about the providers associated to an asset #### Defined in -[src/nevermined/api/AssetsApi.ts:114](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L114) +[src/nevermined/api/AssetsApi.ts:80](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L80) --- @@ -106,7 +114,7 @@ Utilities about the providers associated to an asset #### Index signature -▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`Service`](../code-reference.md#service)\> +▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`Service`](../code-reference.md#service)\> #### Inherited from @@ -114,17 +122,17 @@ Utilities about the providers associated to an asset #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L29) +[src/nevermined/api/RegistryBaseApi.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L39) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -132,17 +140,17 @@ RegistryBaseApi.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -150,13 +158,31 @@ RegistryBaseApi.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +RegistryBaseApi.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -168,13 +194,13 @@ RegistryBaseApi.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -186,17 +212,17 @@ RegistryBaseApi.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -204,13 +230,13 @@ RegistryBaseApi.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -222,13 +248,13 @@ RegistryBaseApi.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -240,31 +266,146 @@ RegistryBaseApi.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +RegistryBaseApi.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -RegistryBaseApi.web3 +RegistryBaseApi.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### access -▸ **access**(`agreementId`, `did`, `serviceReference`, `consumerAccount`, `resultPath?`, `fileIndex?`, `buyer?`, `babysig?`): `Promise`<`string` \| `true`\> +▸ **access**(`agreementId`, `did`, `serviceReference`, `from`, `resultPath?`, `fileIndex?`, `buyer?`, `babysig?`): `Promise`\<`string` \| `true`\> Having previously ordered an "access" service (referenced via an "agreementId"). This method allows to download the assets associated to that service. @@ -276,7 +417,7 @@ This method allows to download the assets associated to that service. | `agreementId` | `string` | `undefined` | The unique identifier of the order placed for a service | | `did` | `string` | `undefined` | Unique identifier of the asset ordered | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `undefined` | The service to download. By default is the access service, but it can be specified the service.index to refer a different specific service | -| `consumerAccount` | [`Account`](Account.md) | `undefined` | The account of the user who ordered the asset and is downloading the files | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The account of the user who ordered the asset and is downloading the files | | `resultPath?` | `string` | `undefined` | Where the files will be downloaded | | `fileIndex` | `number` | `-1` | The file to download. If not given or is -1 it will download all of them. | | `buyer?` | `string` | `undefined` | Key which represent the buyer | @@ -284,19 +425,19 @@ This method allows to download the assets associated to that service. #### Returns -`Promise`<`string` \| `true`\> +`Promise`\<`string` \| `true`\> The result path or true if everything went okay #### Defined in -[src/nevermined/api/AssetsApi.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L235) +[src/nevermined/api/AssetsApi.ts:217](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L217) --- ### addRating -▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, it adds a vote to the asset curation information. @@ -307,13 +448,13 @@ Given a DID, it adds a vote to the asset curation information. | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `newRating` | `number` | `undefined` | New average rating of the asset | | `numVotesAdded` | `number` | `1` | Number of new votes added to the rating, typically just 1 | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -323,13 +464,13 @@ Given a DID, it adds a vote to the asset curation information. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:514](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L514) +[src/nevermined/api/RegistryBaseApi.ts:534](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L534) --- ### consumerAssets -▸ **consumerAssets**(`consumerAccount`): `Promise`<`string`[]\> +▸ **consumerAssets**(`consumerAccount`): `Promise`\<`string`[]\> Returns the assets of a consumer. @@ -341,79 +482,92 @@ Returns the assets of a consumer. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> List of DIDs. #### Defined in -[src/nevermined/api/AssetsApi.ts:352](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L352) +[src/nevermined/api/AssetsApi.ts:360](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L360) --- ### create -▸ **create**(`assetAttributes`, `publisherAccount`, `publicationOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **create**(`assetAttributes`, `from`, `publicationOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> Registers a new asset in Nevermined. You can find more information about how different data is stored in Nevermined here: [https://docs.nevermined.io/docs/architecture/nevermined-data](https://docs.nevermined.io/docs/architecture/nevermined-data) +- + #### Parameters | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | | `assetAttributes` | [`AssetAttributes`](AssetAttributes.md) | Attributes describing the asset | -| `publisherAccount` | [`Account`](Account.md) | The account publishing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The metadata of the asset created (DDO) [DDO](DDO.md) +**`Example`** + +```ts +const assetAttributes = AssetAttributes.getInstance({ + metadata, + price: assetPrice, + serviceTypes: ['sales', 'access'], +}) +const ddo = await nevermined.assets.create(assetAttributes, publisher, PublishMetadata.IPFS) +``` + **`See`** [PublishOnChainOptions](../enums/PublishOnChainOptions.md) and [PublishMetadataOptions](../enums/PublishMetadataOptions.md) #### Defined in -[src/nevermined/api/AssetsApi.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L154) +[src/nevermined/api/AssetsApi.ts:134](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L134) --- ### download -▸ **download**(`did`, `ownerAccount`, `resultPath?`, `fileIndex?`, `serviceType?`, `buyer?`, `babysig?`): `Promise`<`string`\> +▸ **download**(`did`, `from`, `resultPath?`, `fileIndex?`, `serviceType?`, `buyer?`, `babysig?`): `Promise`\<`string`\> It allows to download of the files attached to the asset by their owner or provider. This method only can be called successfully by the owner of the asset or a provider. #### Parameters -| Name | Type | Default value | Description | -| :------------- | :------------------------------------------------ | :------------ | :----------------------------------------- | -| `did` | `string` | `undefined` | The Decentralized Identifier of the asset. | -| `ownerAccount` | [`Account`](Account.md) | `undefined` | The receiver account owner | -| `resultPath?` | `string` | `undefined` | Path to be the files downloader | -| `fileIndex` | `number` | `-1` | The index of the file | -| `serviceType` | [`ServiceType`](../code-reference.md#servicetype) | `'access'` | Service type. 'access' by default | -| `buyer?` | `string` | `undefined` | Key which represent the buyer | -| `babysig?` | [`Babysig`](../interfaces/Babysig.md) | `undefined` | An elliptic curve signature | +| Name | Type | Default value | Description | +| :------------ | :------------------------------------------------ | :------------ | :----------------------------------------- | +| `did` | `string` | `undefined` | The Decentralized Identifier of the asset. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The account of the asset owner | +| `resultPath?` | `string` | `undefined` | Path to be the files downloader | +| `fileIndex` | `number` | `-1` | The index of the file | +| `serviceType` | [`ServiceType`](../code-reference.md#servicetype) | `'access'` | Service type. 'access' by default | +| `buyer?` | `string` | `undefined` | Key which represent the buyer | +| `babysig?` | [`Babysig`](../interfaces/Babysig.md) | `undefined` | An elliptic curve signature | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> Status, path destination if resultPath is provided #### Defined in -[src/nevermined/api/AssetsApi.ts:377](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L377) +[src/nevermined/api/AssetsApi.ts:390](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L390) --- @@ -448,13 +602,13 @@ DDOError - If the NFT contract address is not found in the DDO. #### Defined in -[src/nevermined/api/AssetsApi.ts:490](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L490) +[src/nevermined/api/AssetsApi.ts:509](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L509) --- ### getPermissions -▸ **getPermissions**(`did`, `address`): `Promise`<`boolean`\> +▸ **getPermissions**(`did`, `address`): `Promise`\<`boolean`\> Checks if an account with a specific address has permissions to a specific asset represented by a DID @@ -467,19 +621,19 @@ Checks if an account with a specific address has permissions to a specific asset #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> True if the address has permissions on the asset #### Defined in -[src/nevermined/api/AssetsApi.ts:472](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L472) +[src/nevermined/api/AssetsApi.ts:491](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L491) --- ### grantPermissions -▸ **grantPermissions**(`did`, `address`, `ownerAccount`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **grantPermissions**(`did`, `grantAddress`, `from`, `txParams?`): `Promise`\<`any`\> It grants permissions to an account for a specific asset represented by a DID. Only can be called by the asset owner. @@ -489,23 +643,23 @@ Only can be called by the asset owner. | Name | Type | Description | | :------------- | :---------------------------------------------- | :------------------------------------------------------------- | | `did` | `string` | The unique identifier of the assert | -| `address` | `string` | The account to grant the permissions | -| `ownerAccount` | [`Account`](Account.md) | Account sending the request. It must be the owner of the asset | +| `grantAddress` | `string` | The account address to grant the permissions | +| `from` | [`NvmAccount`](NvmAccount.md) | Account sending the request. It must be the owner of the asset | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/nevermined/api/AssetsApi.ts:430](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L430) +[src/nevermined/api/AssetsApi.ts:448](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L448) --- ### list -▸ **list**(`did`, `list`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **list**(`did`, `list`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset allowing to list or unlist it. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. In a Nevermined environment, when an asset is unlisted, it is not possible to be found and accessed by any user. @@ -516,13 +670,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be | :---------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `list` | `boolean` | `undefined` | Needs the asset to be listed or unlisted | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -532,13 +686,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:462](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L462) +[src/nevermined/api/RegistryBaseApi.ts:482](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L482) --- ### order -▸ **order**(`did`, `serviceReference?`, `consumerAccount`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **order**(`did`, `serviceReference?`, `from`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> Start the purchase/order of an access service. Starts by signing the service agreement then sends the request to the publisher via the service endpoint (Node http service). @@ -551,40 +705,40 @@ for that service. | :----------------- | :------------------------------------------------------------ | :------------ | :-------------------------------------------------------------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Unique identifier of the asset to order | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'access'` | The service to order. By default is the access service, but it can be specified the service.index to refer a different specific service | -| `consumerAccount` | [`Account`](Account.md) | `undefined` | The account of the user ordering the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The account of the user ordering the asset | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID identifying the order #### Defined in -[src/nevermined/api/AssetsApi.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L213) +[src/nevermined/api/AssetsApi.ts:194](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L194) --- ### orderAsset -▸ **orderAsset**(`did`, `serviceReference`, `consumer`, `params?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **orderAsset**(`did`, `serviceReference`, `from`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> Start the purchase/order of an asset's service. Starts by signing the service agreement then sends the request to the publisher via the service endpoint (Node http service). #### Parameters -| Name | Type | Description | -| :----------------- | :------------------------------------------------------------ | :---------------- | -| `did` | `string` | Decentralized ID. | -| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | -| `consumer` | [`Account`](Account.md) | Consumer account. | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :----------------- | :------------------------------------------------------------ | :--------------------- | +| `did` | `string` | Decentralized ID. | +| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | +| `from` | [`NvmAccount`](NvmAccount.md) | Consumer account. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID. @@ -594,13 +748,13 @@ The agreement ID. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:563](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L563) +[src/nevermined/api/RegistryBaseApi.ts:585](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L585) --- ### owner -▸ **owner**(`did`): `Promise`<`string`\> +▸ **owner**(`did`): `Promise`\<`string`\> Returns the owner of an asset. @@ -612,19 +766,19 @@ Returns the owner of an asset. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> The address of the owner of the asset #### Defined in -[src/nevermined/api/AssetsApi.ts:290](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L290) +[src/nevermined/api/AssetsApi.ts:276](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L276) --- ### ownerAssets -▸ **ownerAssets**(`owner`): `Promise`<`string`[]\> +▸ **ownerAssets**(`owner`): `Promise`\<`string`[]\> Returns the assets owned by an address @@ -636,21 +790,21 @@ Returns the assets owned by an address #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> List of DIDs owned by the address #### Defined in -[src/nevermined/api/AssetsApi.ts:319](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L319) +[src/nevermined/api/AssetsApi.ts:305](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L305) --- ### ownerSignature -▸ **ownerSignature**(`did`): `Promise`<`string`\> +▸ **ownerSignature**(`did`): `Promise`\<`string`\> -Returns the owner of an asset. +Returns the owner from the signature included in the DDO. #### Parameters @@ -660,19 +814,19 @@ Returns the owner of an asset. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> The address of the owner of the asset #### Defined in -[src/nevermined/api/AssetsApi.ts:299](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L299) +[src/nevermined/api/AssetsApi.ts:285](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L285) --- ### registerNeverminedAsset -▸ `Protected` **registerNeverminedAsset**(`assetAttributes`, `publisher`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **registerNeverminedAsset**(`assetAttributes`, `from`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> It registers a new asset in a Nevermined network. This method is protected and not exposed via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, and `nfts` APIs. @@ -682,14 +836,14 @@ via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | | `assetAttributes` | [`AssetAttributes`](AssetAttributes.md) | Attributes describing the asset | -| `publisher` | [`Account`](Account.md) | The account publishing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-721) associated to the asset | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The metadata of the asset created (DDO) @@ -703,13 +857,13 @@ The metadata of the asset created (DDO) #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L42) +[src/nevermined/api/RegistryBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L52) --- ### resolve -▸ **resolve**(`did`, `policy?`): `Promise`<[`DDO`](DDO.md)\> +▸ **resolve**(`did`, `policy?`): `Promise`\<[`DDO`](DDO.md)\> Returns a DDO by DID. Depending of the resolution policy it prioritize the Metadata API or Immutable urls. @@ -722,21 +876,22 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> [DDO](DDO.md) #### Defined in -[src/nevermined/api/AssetsApi.ts:134](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L134) +[src/nevermined/api/AssetsApi.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L100) --- ### resolveAsset -▸ `Protected` **resolveAsset**(`did`, `policy?`): `Promise`<[`DDO`](DDO.md)\> +▸ **resolveAsset**(`did`, `policy?`): `Promise`\<[`DDO`](DDO.md)\> -Returns a DDO by DID. Depending of the resolution policy it prioritize the Metadata API or Immutable urls. +Given an asset DID it returns the metadata of that asset represented by a DDO object. +Depending of the resolution policy it prioritize fetching that Metadata from the Marketplace API or Immutable urls (like IPFS). #### Parameters @@ -747,7 +902,7 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> [DDO](DDO.md) @@ -757,59 +912,63 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:310](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L310) +[src/nevermined/api/RegistryBaseApi.ts:324](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L324) --- ### retire -▸ **retire**(`did`): `Promise`<`Response`\> +▸ **retire**(`did`): `Promise`\<`Response`\> + +Retires the metadata of an asset from the Marketplace API. This allows the owner to unlist the asset from the marketplace. #### Parameters -| Name | Type | -| :---- | :------- | -| `did` | `string` | +| Name | Type | Description | +| :---- | :------- | :--------------------------------- | +| `did` | `string` | the unique identifier of the asset | #### Returns -`Promise`<`Response`\> +`Promise`\<`Response`\> + +the HTTP response #### Defined in -[src/nevermined/api/AssetsApi.ts:360](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L360) +[src/nevermined/api/AssetsApi.ts:373](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L373) --- ### revokePermissions -▸ **revokePermissions**(`did`, `address`, `ownerAccount`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **revokePermissions**(`did`, `revokeAddress`, `from`, `txParams?`): `Promise`\<`any`\> It revokes permissions to an account for a specific asset represented by a DID. Only can be called by the asset owner. #### Parameters -| Name | Type | Description | -| :------------- | :---------------------------------------------- | :------------------------------------------------------------- | -| `did` | `string` | The unique identifier of the assert | -| `address` | `string` | The account to revoke the permissions | -| `ownerAccount` | [`Account`](Account.md) | Account sending the request. It must be the owner of the asset | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | +| Name | Type | Description | +| :-------------- | :---------------------------------------------- | :------------------------------------------------------------- | +| `did` | `string` | The unique identifier of the assert | +| `revokeAddress` | `string` | The account address to revoke the permissions | +| `from` | [`NvmAccount`](NvmAccount.md) | Account sending the request. It must be the owner of the asset | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/nevermined/api/AssetsApi.ts:452](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L452) +[src/nevermined/api/AssetsApi.ts:471](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L471) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -827,56 +986,57 @@ Only can be called by the asset owner. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### transferOwnership -▸ **transferOwnership**(`did`, `newOwner`, `owner`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **transferOwnership**(`did`, `newOwner`, `from`, `newUserId?`, `txParams?`): `Promise`\<`any`\> Transfer ownership of an asset. #### Parameters -| Name | Type | Description | -| :---------- | :---------------------------------------------- | :--------------------------------------------------------- | -| `did` | `string` | Asset DID. | -| `newOwner` | `string` | Ethereum address of the new owner of the DID. | -| `owner` | `string` \| [`Account`](Account.md) | Account owning the DID and doing the transfer of ownership | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | +| Name | Type | Description | +| :----------- | :---------------------------------------------- | :--------------------------------------------------------- | +| `did` | `string` | Asset DID. | +| `newOwner` | `string` | Ethereum address of the new owner of the DID. | +| `from` | [`NvmAccount`](NvmAccount.md) | Account owning the DID and doing the transfer of ownership | +| `newUserId?` | `string` | User Id of the new user getting the ownership of the asset | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -Returns ethers transaction receipt. +Returns transaction receipt. #### Defined in -[src/nevermined/api/AssetsApi.ts:331](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L331) +[src/nevermined/api/AssetsApi.ts:318](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L318) --- ### update -▸ **update**(`did`, `metadata`, `publisherAccount`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **update**(`did`, `metadata`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. #### Parameters -| Name | Type | Default value | Description | -| :----------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | -| `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | -| `metadata` | [`MetaData`](../interfaces/MetaData.md) | `undefined` | Metadata describing the asset | -| `publisherAccount` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | -| `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | +| Name | Type | Default value | Description | +| :---------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | +| `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | +| `metadata` | [`MetaData`](../interfaces/MetaData.md) | `undefined` | Metadata describing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | +| `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -893,13 +1053,13 @@ const ddoUpdated = await nevermined.assets.update( #### Defined in -[src/nevermined/api/AssetsApi.ts:192](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L192) +[src/nevermined/api/AssetsApi.ts:172](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L172) --- ### updateAsset -▸ `Protected` **updateAsset**(`did`, `metadata`, `publisher`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **updateAsset**(`did`, `metadata`, `from`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. @@ -909,13 +1069,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th | :----------------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | `undefined` | Metadata describing the asset | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadataOptions` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -925,13 +1085,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:353](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L353) +[src/nevermined/api/RegistryBaseApi.ts:367](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L367) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -949,13 +1109,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### getServicePlugin -▸ `Static` `Protected` **getServicePlugin**(`config`): `Object` +▸ **getServicePlugin**(`config`): `Object` Initializes the default Nevermined service plugins and return that instance @@ -971,13 +1131,12 @@ Initializes the default Nevermined service plugins and return that instance The Nevermined Service Plugin instance -| Name | Type | -| :------------ | :------------------------------------------------------------------------------------------------------------ | -| `aave-credit` | [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceAaveCredit`](../interfaces/ServiceAaveCredit.md)\> | -| `access` | [`AccessService`](AccessService.md) | -| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | -| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | -| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | +| Name | Type | +| :----------- | :-------------------------------------------------------------------- | +| `access` | [`AccessService`](AccessService.md) | +| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | +| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | +| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | #### Inherited from @@ -985,13 +1144,13 @@ The Nevermined Service Plugin instance #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:618](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L618) +[src/nevermined/api/RegistryBaseApi.ts:640](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L640) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1016,4 +1175,4 @@ The Nevermined Service Plugin instance #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/BabyjubPublicKey.md b/docs/api-reference/classes/BabyjubPublicKey.md index b68bad051..cadacfe35 100644 --- a/docs/api-reference/classes/BabyjubPublicKey.md +++ b/docs/api-reference/classes/BabyjubPublicKey.md @@ -21,7 +21,7 @@ ### constructor -• **new BabyjubPublicKey**(`x`, `y`) +• **new BabyjubPublicKey**(`x`, `y`): [`BabyjubPublicKey`](BabyjubPublicKey.md) #### Parameters @@ -30,9 +30,13 @@ | `x` | `string` | | `y` | `string` | +#### Returns + +[`BabyjubPublicKey`](BabyjubPublicKey.md) + #### Defined in -[src/models/KeyTransfer.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/KeyTransfer.ts#L8) +[src/models/KeyTransfer.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/KeyTransfer.ts#L8) ## Properties @@ -42,7 +46,7 @@ #### Defined in -[src/models/KeyTransfer.ts:5](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/KeyTransfer.ts#L5) +[src/models/KeyTransfer.ts:5](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/KeyTransfer.ts#L5) --- @@ -52,7 +56,7 @@ #### Defined in -[src/models/KeyTransfer.ts:6](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/KeyTransfer.ts#L6) +[src/models/KeyTransfer.ts:6](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/KeyTransfer.ts#L6) ## Methods @@ -66,4 +70,4 @@ #### Defined in -[src/models/KeyTransfer.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/KeyTransfer.ts#L13) +[src/models/KeyTransfer.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/KeyTransfer.ts#L13) diff --git a/docs/api-reference/classes/BaseTemplate.md b/docs/api-reference/classes/BaseTemplate.md index 6899d74a8..ac9afed4d 100644 --- a/docs/api-reference/classes/BaseTemplate.md +++ b/docs/api-reference/classes/BaseTemplate.md @@ -1,6 +1,6 @@ [@nevermined-io/sdk](../code-reference.md) / BaseTemplate -# Class: BaseTemplate +# Class: BaseTemplate\ ## Type parameters @@ -11,29 +11,27 @@ ## Hierarchy -- [`AgreementTemplate`](AgreementTemplate.md)<`Params`\> +- [`AgreementTemplate`](AgreementTemplate.md)\<`Params`\> ↳ **`BaseTemplate`** - ↳↳ [`AaveCreditTemplate`](AaveCreditTemplate.md) - ↳↳ [`AccessTemplate`](AccessTemplate.md) - ↳↳ [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) - ↳↳ [`DIDSalesTemplate`](DIDSalesTemplate.md) - ↳↳ [`NFTAccessTemplate`](NFTAccessTemplate.md) + ↳↳ [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) ↳↳ [`NFT721AccessTemplate`](NFT721AccessTemplate.md) - ↳↳ [`NFTSalesTemplate`](NFTSalesTemplate.md) - ↳↳ [`NFT721SalesTemplate`](NFT721SalesTemplate.md) + ↳↳ [`NFTAccessTemplate`](NFTAccessTemplate.md) + + ↳↳ [`NFTSalesTemplate`](NFTSalesTemplate.md) + ## Implements -- [`ServicePlugin`](../interfaces/ServicePlugin.md)<`S`\> +- [`ServicePlugin`](../interfaces/ServicePlugin.md)\<`S`\> ## Table of contents @@ -53,12 +51,14 @@ - [artifactsFolder](BaseTemplate.md#artifactsfolder) - [circuitsFolder](BaseTemplate.md#circuitsfolder) +- [client](BaseTemplate.md#client) - [config](BaseTemplate.md#config) - [instanceConfig](BaseTemplate.md#instanceconfig) - [instantiableConfig](BaseTemplate.md#instantiableconfig) - [logger](BaseTemplate.md#logger) - [nevermined](BaseTemplate.md#nevermined) -- [web3](BaseTemplate.md#web3) +- [publicClient](BaseTemplate.md#publicclient) +- [walletClient](BaseTemplate.md#walletclient) ### Methods @@ -81,12 +81,11 @@ - [getConditionTypes](BaseTemplate.md#getconditiontypes) - [getConditions](BaseTemplate.md#getconditions) - [getFromAddress](BaseTemplate.md#getfromaddress) -- [getInputsOfMethod](BaseTemplate.md#getinputsofmethod) - [getServiceAgreementTemplate](BaseTemplate.md#getserviceagreementtemplate) - [getServiceAgreementTemplateConditionByRef](BaseTemplate.md#getserviceagreementtemplateconditionbyref) - [getServiceAgreementTemplateConditions](BaseTemplate.md#getserviceagreementtemplateconditions) - [getServiceAgreementTemplateDependencies](BaseTemplate.md#getserviceagreementtemplatedependencies) -- [getSignatureOfMethod](BaseTemplate.md#getsignatureofmethod) +- [getTransactionLogs](BaseTemplate.md#gettransactionlogs) - [init](BaseTemplate.md#init) - [instanceFromDDO](BaseTemplate.md#instancefromddo) - [lockConditionIndex](BaseTemplate.md#lockconditionindex) @@ -102,6 +101,7 @@ - [service](BaseTemplate.md#service) - [serviceEndpoint](BaseTemplate.md#serviceendpoint) - [setInstanceConfig](BaseTemplate.md#setinstanceconfig) +- [someLog](BaseTemplate.md#somelog) - [standardContext](BaseTemplate.md#standardcontext) - [track](BaseTemplate.md#track) - [validateAgreement](BaseTemplate.md#validateagreement) @@ -112,7 +112,7 @@ ### constructor -• `Protected` **new BaseTemplate**<`Params`, `S`\>(`contractName`) +• **new BaseTemplate**\<`Params`, `S`\>(`contractName`): [`BaseTemplate`](BaseTemplate.md)\<`Params`, `S`\> #### Type parameters @@ -127,19 +127,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`BaseTemplate`](BaseTemplate.md)\<`Params`, `S`\> + #### Inherited from [AgreementTemplate](AgreementTemplate.md).[constructor](AgreementTemplate.md#constructor) #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L68) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L51) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -147,13 +151,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -161,7 +165,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -175,13 +179,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -189,7 +193,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -203,17 +207,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -221,17 +225,17 @@ AgreementTemplate.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -239,13 +243,31 @@ AgreementTemplate.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +AgreementTemplate.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -257,13 +279,13 @@ AgreementTemplate.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -275,17 +297,17 @@ AgreementTemplate.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -293,13 +315,13 @@ AgreementTemplate.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -311,13 +333,13 @@ AgreementTemplate.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -329,31 +351,146 @@ AgreementTemplate.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +AgreementTemplate.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -AgreementTemplate.web3 +AgreementTemplate.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### accept -▸ **accept**(`_params`): `Promise`<`boolean`\> +▸ **accept**(`_params`): `Promise`\<`boolean`\> #### Parameters @@ -363,7 +500,7 @@ AgreementTemplate.web3 #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Implementation of @@ -371,13 +508,13 @@ AgreementTemplate.web3 #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L98) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:114](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L114) --- ### agreementId -▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`<`string`\> +▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`\<`string`\> #### Parameters @@ -388,7 +525,7 @@ AgreementTemplate.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -396,13 +533,13 @@ AgreementTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L213) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:202](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L202) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -412,15 +549,15 @@ AgreementTemplate.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -428,27 +565,27 @@ AgreementTemplate.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### conditions -▸ `Abstract` **conditions**(): [`Condition`](Condition.md)<`any`, `any`\>[] +▸ **conditions**(): `Condition`\<`any`, `any`\>[] #### Returns -[`Condition`](Condition.md)<`any`, `any`\>[] +`Condition`\<`any`, `any`\>[] #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L29) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L42) --- ### createAgreement -▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -460,12 +597,12 @@ AgreementTemplate.web3 | `timeLocks` | `number`[] | | `timeOuts` | `number`[] | | `extraArgs` | `any`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -473,13 +610,13 @@ AgreementTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L90) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L73) --- ### createAgreementAndPay -▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -496,12 +633,12 @@ AgreementTemplate.web3 | `tokenAddress` | `string` | | `amounts` | `bigint`[] | | `receivers` | `string`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -509,13 +646,13 @@ AgreementTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L115) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L98) --- ### createAgreementFromDDO -▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `from`, `timeOuts?`, `txParams?`): `Promise`<`string`\> +▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `timeOuts?`, `txParams?`): `Promise`\<`string`\> Create a new agreement using the data of a DDO. @@ -526,14 +663,13 @@ Create a new agreement using the data of a DDO. | `agreementIdSeed` | `string` | - | | `ddo` | [`DDO`](DDO.md) | DDO. | | `parameters` | `Params` | | -| `consumer` | [`Account`](Account.md) | - | -| `from` | [`Account`](Account.md) | - | +| `consumer` | [`NvmAccount`](NvmAccount.md) | - | | `timeOuts?` | `number`[] | - | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> true if the call was successful. @@ -543,13 +679,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:222](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L222) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:211](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L211) --- ### createAgreementWithPaymentFromDDO -▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`<`string`\> +▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`\<`string`\> #### Parameters @@ -559,14 +695,14 @@ true if the call was successful. | `ddo` | [`DDO`](DDO.md) | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | | `parameters` | `Params` | -| `consumer` | [`Account`](Account.md) | -| `from` | [`Account`](Account.md) | +| `consumer` | [`NvmAccount`](NvmAccount.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | | `observer?` | (`orderProgressStep`: [`OrderProgressStep`](../enums/OrderProgressStep.md)) => `void` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -574,7 +710,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L252) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:240](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L240) --- @@ -586,7 +722,7 @@ true if the call was successful. | Name | Type | | :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](Account.md) | +| `publisher` | [`NvmAccount`](NvmAccount.md) | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | | `serviceAttributes` | [`ServiceAttributes`](../interfaces/ServiceAttributes.md) | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | @@ -602,13 +738,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L35) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L48) --- ### description -▸ `Abstract` **description**(): `string` +▸ **description**(): `string` #### Returns @@ -616,13 +752,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L28) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L41) --- ### extraGen -▸ **extraGen**(`_params`): `Promise`<`any`\> +▸ **extraGen**(`_params`): `Promise`\<`any`\> #### Parameters @@ -632,17 +768,17 @@ true if the call was successful. #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:94](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L94) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) --- ### getAgreementCreatedEvent -▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`<`any`[]\> +▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`\<`any`[]\> Generates and returns the agreement creation event. @@ -654,7 +790,7 @@ Generates and returns the agreement creation event. #### Returns -`Promise`<`any`[]\> +`Promise`\<`any`[]\> Agreement created event. @@ -664,13 +800,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:459](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L459) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:450](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L450) --- ### getAgreementData -▸ **getAgreementData**(`agreementId`): `Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +▸ **getAgreementData**(`agreementId`): `Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Parameters @@ -680,17 +816,17 @@ Agreement created event. #### Returns -`Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +`Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L21) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L29) --- ### getAgreementIdsFromDDO -▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`<`string`[]\> +▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`\<`string`[]\> Get agreement conditions IDs. @@ -705,7 +841,7 @@ Get agreement conditions IDs. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> The condition IDs. @@ -715,13 +851,13 @@ The condition IDs. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:180](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L180) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:169](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L169) --- ### getAgreementStatus -▸ **getAgreementStatus**(`agreementId`): `Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +▸ **getAgreementStatus**(`agreementId`): `Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> Returns the status of the conditions. @@ -733,7 +869,7 @@ Returns the status of the conditions. #### Returns -`Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +`Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> The conditions status. @@ -743,13 +879,13 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:346](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L346) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:331](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L331) --- ### getAgreementsForDID -▸ **getAgreementsForDID**(`did`): `Promise`<`string`[]\> +▸ **getAgreementsForDID**(`did`): `Promise`\<`string`[]\> #### Parameters @@ -759,7 +895,7 @@ The conditions status. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> #### Inherited from @@ -767,19 +903,19 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:485](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L485) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:476](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L476) --- ### getConditionTypes -▸ **getConditionTypes**(): `Promise`<`string`[]\> +▸ **getConditionTypes**(): `Promise`\<`string`[]\> Conditions address list. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> A list of condition addresses. @@ -789,19 +925,19 @@ A list of condition addresses. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L154) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:137](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L137) --- ### getConditions -▸ **getConditions**(): `Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +▸ **getConditions**(): `Promise`\<`ConditionSmall`[]\> List of condition contracts. #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +`Promise`\<`ConditionSmall`[]\> A list of condition contracts. @@ -811,13 +947,13 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:165](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L165) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L148) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -827,7 +963,7 @@ A list of condition contracts. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -835,37 +971,13 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[AgreementTemplate](AgreementTemplate.md).[getInputsOfMethod](AgreementTemplate.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getServiceAgreementTemplate -▸ `Abstract` **getServiceAgreementTemplate**(): [`ServiceAgreementTemplate`](../interfaces/ServiceAgreementTemplate.md) +▸ **getServiceAgreementTemplate**(): [`ServiceAgreementTemplate`](../interfaces/ServiceAgreementTemplate.md) #### Returns @@ -877,13 +989,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:322](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L322) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:307](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L307) --- ### getServiceAgreementTemplateConditionByRef -▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`<[`ConditionSmall`](ConditionSmall.md)\> +▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`\<`undefined` \| `ConditionSmall`\> #### Parameters @@ -893,7 +1005,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)\> +`Promise`\<`undefined` \| `ConditionSmall`\> #### Inherited from @@ -901,7 +1013,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:329](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L329) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:314](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L314) --- @@ -919,17 +1031,17 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:324](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L324) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:309](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L309) --- ### getServiceAgreementTemplateDependencies -▸ **getServiceAgreementTemplateDependencies**(): `Promise`<{ `[condition: string]`: `string`[]; }\> +▸ **getServiceAgreementTemplateDependencies**(): `Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Returns -`Promise`<{ `[condition: string]`: `string`[]; }\> +`Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Inherited from @@ -937,49 +1049,50 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:336](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L336) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:321](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L321) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[AgreementTemplate](AgreementTemplate.md).[getSignatureOfMethod](AgreementTemplate.md#getsignatureofmethod) +[AgreementTemplate](AgreementTemplate.md).[getTransactionLogs](AgreementTemplate.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -987,13 +1100,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instanceFromDDO -▸ `Optional` `Abstract` **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`, `serviceIndex?`): `Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`Params`\>\> +▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`, `serviceIndex?`): `Promise`\<`AgreementInstance`\<`Params`\>\> #### Parameters @@ -1007,7 +1120,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`Params`\>\> +`Promise`\<`AgreementInstance`\<`Params`\>\> #### Inherited from @@ -1015,7 +1128,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:190](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L190) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:179](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L179) --- @@ -1033,13 +1146,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L74) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L57) --- ### lockTokens -▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams`): `Promise`<`void`\> +▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams?`): `Promise`\<`void`\> #### Parameters @@ -1047,12 +1160,12 @@ readonly `ParamType`[] | :------------- | :---------------------------------------------- | | `tokenAddress` | `any` | | `amounts` | `any` | -| `from` | [`Account`](Account.md) | -| `txParams` | [`TxParameters`](../interfaces/TxParameters.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1060,13 +1173,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:393](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L393) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:382](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L382) --- ### name -▸ `Abstract` **name**(): `string` +▸ **name**(): `string` #### Returns @@ -1074,13 +1187,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L27) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:40](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L40) --- ### params -▸ `Abstract` **params**(`...args`): `Params` +▸ **params**(`...args`): `Params` #### Parameters @@ -1098,13 +1211,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:72](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L72) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L55) --- ### paramsGen -▸ `Abstract` **paramsGen**(`params`): `Promise`<`Params`\> +▸ **paramsGen**(`params`): `Promise`\<`Params`\> Specialize params @@ -1116,17 +1229,17 @@ Specialize params #### Returns -`Promise`<`Params`\> +`Promise`\<`Params`\> #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L92) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L108) --- ### paymentData -▸ **paymentData**(`service`): `Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +▸ **paymentData**(`service`): `Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Parameters @@ -1136,7 +1249,7 @@ Specialize params #### Returns -`Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +`Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Inherited from @@ -1144,13 +1257,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L78) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L61) --- ### printAgreementStatus -▸ **printAgreementStatus**(`agreementId`): `Promise`<`void`\> +▸ **printAgreementStatus**(`agreementId`): `Promise`\<`void`\> Prints the agreement status. @@ -1162,7 +1275,7 @@ Prints the agreement status. #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1170,25 +1283,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:429](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L429) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:418](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L418) --- ### process -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> +▸ **process**(`params`, `from`, `txparams?`): `Promise`\<`void`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Implementation of @@ -1196,26 +1309,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:126](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L126) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1223,26 +1336,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1250,13 +1363,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### service -▸ `Abstract` **service**(): [`ServiceType`](../code-reference.md#servicetype) +▸ **service**(): [`ServiceType`](../code-reference.md#servicetype) #### Returns @@ -1268,7 +1381,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:198](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L198) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:187](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L187) --- @@ -1282,13 +1395,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L31) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L44) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1306,13 +1419,37 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[AgreementTemplate](AgreementTemplate.md).[someLog](AgreementTemplate.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### standardContext -▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): [`ConditionContext`](../interfaces/ConditionContext.md) +▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): `ConditionContext` #### Parameters @@ -1324,7 +1461,7 @@ Prints the agreement status. #### Returns -[`ConditionContext`](../interfaces/ConditionContext.md) +`ConditionContext` #### Inherited from @@ -1332,25 +1469,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L200) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:189](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L189) --- ### track -▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`<`boolean`\> +▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`\<`boolean`\> #### Parameters | Name | Type | | :----------- | :------------------------------------------------------ | | `_params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `_from` | [`Account`](Account.md) | +| `_from` | [`NvmAccount`](NvmAccount.md) | | `_txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Implementation of @@ -1358,13 +1495,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:102](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L102) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L118) --- ### validateAgreement -▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`<`void`\> +▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`\<`void`\> #### Parameters @@ -1373,23 +1510,23 @@ Prints the agreement status. | `agreement_id` | `string` | | `did` | `string` | | `params` | `Params` | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `extra` | `any` | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:125](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L125) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:141](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L141) --- ### getInstance -▸ `Static` **getInstance**<`Params`\>(`config`, `templateContractName`, `templateClass`, `optional?`): `Promise`<`any`\> +▸ **getInstance**\<`Params`\>(`config`, `templateContractName`, `templateClass`, `optional?`): `Promise`\<`any`\> #### Type parameters @@ -1408,7 +1545,7 @@ Prints the agreement status. #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Inherited from @@ -1416,13 +1553,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L55) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L38) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1447,4 +1584,4 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/BlockchainViemUtils.md b/docs/api-reference/classes/BlockchainViemUtils.md new file mode 100644 index 000000000..b7b3ef075 --- /dev/null +++ b/docs/api-reference/classes/BlockchainViemUtils.md @@ -0,0 +1,525 @@ +[@nevermined-io/sdk](../code-reference.md) / BlockchainViemUtils + +# Class: BlockchainViemUtils + +Utility class with methods that allow the interaction with the blockchain. +This class uses Viem library to interact with the blockchain. + +## Hierarchy + +- [`Instantiable`](Instantiable.md) + + ↳ **`BlockchainViemUtils`** + +## Table of contents + +### Constructors + +- [constructor](BlockchainViemUtils.md#constructor) + +### Accessors + +- [artifactsFolder](BlockchainViemUtils.md#artifactsfolder) +- [circuitsFolder](BlockchainViemUtils.md#circuitsfolder) +- [client](BlockchainViemUtils.md#client) +- [config](BlockchainViemUtils.md#config) +- [instanceConfig](BlockchainViemUtils.md#instanceconfig) +- [instantiableConfig](BlockchainViemUtils.md#instantiableconfig) +- [logger](BlockchainViemUtils.md#logger) +- [nevermined](BlockchainViemUtils.md#nevermined) +- [publicClient](BlockchainViemUtils.md#publicclient) +- [walletClient](BlockchainViemUtils.md#walletclient) + +### Methods + +- [checkExists](BlockchainViemUtils.md#checkexists) +- [deployAbi](BlockchainViemUtils.md#deployabi) +- [getTransactionReceipt](BlockchainViemUtils.md#gettransactionreceipt) +- [loadContract](BlockchainViemUtils.md#loadcontract) +- [setInstanceConfig](BlockchainViemUtils.md#setinstanceconfig) +- [getInstance](BlockchainViemUtils.md#getinstance) +- [setInstanceConfig](BlockchainViemUtils.md#setinstanceconfig-1) + +## Constructors + +### constructor + +• **new BlockchainViemUtils**(`config`): [`BlockchainViemUtils`](BlockchainViemUtils.md) + +#### Parameters + +| Name | Type | +| :------- | :---------------------------------------------------------- | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | + +#### Returns + +[`BlockchainViemUtils`](BlockchainViemUtils.md) + +#### Overrides + +[Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L60) + +## Accessors + +### artifactsFolder + +• `get` **artifactsFolder**(): `undefined` \| `string` + +#### Returns + +`undefined` \| `string` + +#### Inherited from + +Instantiable.artifactsFolder + +#### Defined in + +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) + +--- + +### circuitsFolder + +• `get` **circuitsFolder**(): `undefined` \| `string` + +#### Returns + +`undefined` \| `string` + +#### Inherited from + +Instantiable.circuitsFolder + +#### Defined in + +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) + +--- + +### config + +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) + +#### Returns + +[`NeverminedOptions`](NeverminedOptions.md) + +#### Inherited from + +Instantiable.config + +#### Defined in + +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) + +--- + +### instanceConfig + +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) + +#### Returns + +[`InstantiableConfig`](../interfaces/InstantiableConfig.md) + +#### Inherited from + +Instantiable.instanceConfig + +#### Defined in + +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) + +--- + +### instantiableConfig + +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) + +#### Returns + +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) + +#### Inherited from + +Instantiable.instantiableConfig + +#### Defined in + +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) + +--- + +### logger + +• `get` **logger**(): `Logger` + +#### Returns + +`Logger` + +#### Inherited from + +Instantiable.logger + +#### Defined in + +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) + +--- + +### nevermined + +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) + +#### Returns + +[`Nevermined`](Nevermined.md) + +#### Inherited from + +Instantiable.nevermined + +#### Defined in + +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +Instantiable.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) + +## Methods + +### checkExists + +▸ **checkExists**(`address`): `Promise`\<`boolean`\> + +Returns true of contract exists else it throws. + +#### Parameters + +| Name | Type | +| :-------- | :------- | +| `address` | `string` | + +#### Returns + +`Promise`\<`boolean`\> + +true if the contract exists. + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L131) + +--- + +### deployAbi + +▸ **deployAbi**(`artifact`, `from`, `args?`): `Promise`\<\{ `abi`: `Abi` ; `address`: \`0x$\{string}\` ; `createEventFilter`: {} ; `estimateGas`: {} & {} ; `getEvents`: {} ; `read`: {} ; `simulate`: {} ; `watchEvent`: {} ; `write`: {} }\> + +Given an artifact, it deploys the contract and returns the contract instance. + +#### Parameters + +| Name | Type | Default value | Description | +| :------------------ | :---------------------------- | :------------ | :---------------------------------------------------------------- | +| `artifact` | `Object` | `undefined` | the contract artifact | +| `artifact.abi` | `Abi` | `undefined` | - | +| `artifact.bytecode` | \`0x$\{string}\` | `undefined` | - | +| `artifact.name?` | `string` | `undefined` | - | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | the deployer account | +| `args` | `string`[] | `[]` | parameters to be passed to the contract during the initialization | + +#### Returns + +`Promise`\<\{ `abi`: `Abi` ; `address`: \`0x$\{string}\` ; `createEventFilter`: {} ; `estimateGas`: {} & {} ; `getEvents`: {} ; `read`: {} ; `simulate`: {} ; `watchEvent`: {} ; `write`: {} }\> + +a contract instance + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:72](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L72) + +--- + +### getTransactionReceipt + +▸ **getTransactionReceipt**(`txHash`, `iteration?`): `any` + +Given a transaction hash, it returns the transaction receipt. +If this function is called before the transaction is mined, it will iterate a few times in order to wait for the transaction to be mined. + +#### Parameters + +| Name | Type | Default value | Description | +| :---------- | :--------------- | :------------ | :------------------- | +| `txHash` | \`0x$\{string}\` | `undefined` | the transaction hash | +| `iteration` | `number` | `1` | the iteration number | + +#### Returns + +`any` + +the transaction receipt + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:103](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L103) + +--- + +### loadContract + +▸ **loadContract**(`contractAddress`, `abi`): `Promise`\<\{ `abi`: `Abi` ; `address`: \`0x$\{string}\` ; `createEventFilter`: {} ; `estimateGas`: {} & {} ; `getEvents`: {} ; `read`: {} ; `simulate`: {} ; `watchEvent`: {} ; `write`: {} }\> + +Given an already deployed contract address and the ABI, it returns the contract instance. + +#### Parameters + +| Name | Type | Description | +| :---------------- | :------- | :-------------------- | +| `contractAddress` | `string` | the contract address | +| `abi` | `Abi` | the contract artifact | + +#### Returns + +`Promise`\<\{ `abi`: `Abi` ; `address`: \`0x$\{string}\` ; `createEventFilter`: {} ; `estimateGas`: {} & {} ; `getEvents`: {} ; `read`: {} ; `simulate`: {} ; `watchEvent`: {} ; `write`: {} }\> + +a contract instance + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:86](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L86) + +--- + +### setInstanceConfig + +▸ **setInstanceConfig**(`config`): `void` + +#### Parameters + +| Name | Type | +| :------- | :---------------------------------------------------------- | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | + +#### Returns + +`void` + +#### Inherited from + +[Instantiable](Instantiable.md).[setInstanceConfig](Instantiable.md#setinstanceconfig) + +#### Defined in + +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### getInstance + +▸ **getInstance**(`..._args`): `any` + +#### Parameters + +| Name | Type | +| :--------- | :---- | +| `..._args` | `any` | + +#### Returns + +`any` + +#### Inherited from + +[Instantiable](Instantiable.md).[getInstance](Instantiable.md#getinstance) + +#### Defined in + +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) + +--- + +### setInstanceConfig + +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` + +#### Type parameters + +| Name | Type | +| :--- | :---------------------------------------- | +| `T` | extends [`Instantiable`](Instantiable.md) | + +#### Parameters + +| Name | Type | +| :------------------- | :---------------------------------------------------------- | +| `instance` | `T` | +| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | + +#### Returns + +`void` + +#### Inherited from + +[Instantiable](Instantiable.md).[setInstanceConfig](Instantiable.md#setinstanceconfig-1) + +#### Defined in + +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/Bookmarks.md b/docs/api-reference/classes/Bookmarks.md index a950ff443..b532bf789 100644 --- a/docs/api-reference/classes/Bookmarks.md +++ b/docs/api-reference/classes/Bookmarks.md @@ -18,13 +18,15 @@ - [artifactsFolder](Bookmarks.md#artifactsfolder) - [circuitsFolder](Bookmarks.md#circuitsfolder) +- [client](Bookmarks.md#client) - [config](Bookmarks.md#config) - [instanceConfig](Bookmarks.md#instanceconfig) - [instantiableConfig](Bookmarks.md#instantiableconfig) - [logger](Bookmarks.md#logger) - [nevermined](Bookmarks.md#nevermined) +- [publicClient](Bookmarks.md#publicclient) - [url](Bookmarks.md#url) -- [web3](Bookmarks.md#web3) +- [walletClient](Bookmarks.md#walletclient) ### Methods @@ -43,7 +45,7 @@ ### constructor -• **new Bookmarks**(`config`) +• **new Bookmarks**(`config`): [`Bookmarks`](Bookmarks.md) #### Parameters @@ -51,23 +53,27 @@ | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`Bookmarks`](Bookmarks.md) + #### Inherited from [MarketplaceApi](MarketplaceApi.md).[constructor](MarketplaceApi.md#constructor) #### Defined in -[src/services/metadata/MarketplaceAPI.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L7) +[src/services/metadata/MarketplaceAPI.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L7) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -75,17 +81,17 @@ MarketplaceApi.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -93,13 +99,31 @@ MarketplaceApi.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +MarketplaceApi.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -111,13 +135,13 @@ MarketplaceApi.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -129,17 +153,17 @@ MarketplaceApi.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -147,13 +171,13 @@ MarketplaceApi.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -165,13 +189,13 @@ MarketplaceApi.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -183,13 +207,95 @@ MarketplaceApi.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +MarketplaceApi.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- ### url -• `Protected` `get` **url**(): `string` +• `get` **url**(): `string` #### Returns @@ -201,31 +307,64 @@ MarketplaceApi.url #### Defined in -[src/services/metadata/MarketplaceAPI.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L12) +[src/services/metadata/MarketplaceAPI.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L12) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -MarketplaceApi.web3 +MarketplaceApi.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### addNewAddress -▸ **addNewAddress**(`clientAssertion`): `Promise`<`string`\> +▸ **addNewAddress**(`clientAssertion`): `Promise`\<`string`\> #### Parameters @@ -235,7 +374,7 @@ MarketplaceApi.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -243,13 +382,13 @@ MarketplaceApi.web3 #### Defined in -[src/services/metadata/MarketplaceAPI.ts:36](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L36) +[src/services/metadata/MarketplaceAPI.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L36) --- ### create -▸ **create**(`newBookmark`): `Promise`<[`Bookmark`](../interfaces/Bookmark.md)\> +▸ **create**(`newBookmark`): `Promise`\<[`Bookmark`](../interfaces/Bookmark.md)\> Create bookmark @@ -261,17 +400,17 @@ Create bookmark #### Returns -`Promise`<[`Bookmark`](../interfaces/Bookmark.md)\> +`Promise`\<[`Bookmark`](../interfaces/Bookmark.md)\> #### Defined in -[src/services/metadata/Bookmarks.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Bookmarks.ts#L14) +[src/services/metadata/Bookmarks.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Bookmarks.ts#L12) --- ### deleteOneById -▸ **deleteOneById**(`id`): `Promise`<`void`\> +▸ **deleteOneById**(`id`): `Promise`\<`void`\> Delele a bookmark by id @@ -283,17 +422,17 @@ Delele a bookmark by id #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Defined in -[src/services/metadata/Bookmarks.ts:112](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Bookmarks.ts#L112) +[src/services/metadata/Bookmarks.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Bookmarks.ts#L110) --- ### findManyByUserId -▸ **findManyByUserId**(`userId`, `query?`): `Promise`<[`MarketplaceResults`](../interfaces/MarketplaceResults.md)<[`Bookmark`](../interfaces/Bookmark.md)\>\> +▸ **findManyByUserId**(`userId`, `query?`): `Promise`\<[`MarketplaceResults`](../interfaces/MarketplaceResults.md)\<[`Bookmark`](../interfaces/Bookmark.md)\>\> Get bookmarks by userId @@ -306,17 +445,17 @@ Get bookmarks by userId #### Returns -`Promise`<[`MarketplaceResults`](../interfaces/MarketplaceResults.md)<[`Bookmark`](../interfaces/Bookmark.md)\>\> +`Promise`\<[`MarketplaceResults`](../interfaces/MarketplaceResults.md)\<[`Bookmark`](../interfaces/Bookmark.md)\>\> #### Defined in -[src/services/metadata/Bookmarks.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Bookmarks.ts#L63) +[src/services/metadata/Bookmarks.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Bookmarks.ts#L61) --- ### findOneById -▸ **findOneById**(`id`): `Promise`<[`Bookmark`](../interfaces/Bookmark.md)\> +▸ **findOneById**(`id`): `Promise`\<[`Bookmark`](../interfaces/Bookmark.md)\> Get a bookmark by Id @@ -328,17 +467,17 @@ Get a bookmark by Id #### Returns -`Promise`<[`Bookmark`](../interfaces/Bookmark.md)\> +`Promise`\<[`Bookmark`](../interfaces/Bookmark.md)\> #### Defined in -[src/services/metadata/Bookmarks.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Bookmarks.ts#L41) +[src/services/metadata/Bookmarks.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Bookmarks.ts#L39) --- ### login -▸ **login**(`clientAssertion`): `Promise`<`string`\> +▸ **login**(`clientAssertion`): `Promise`\<`string`\> #### Parameters @@ -348,7 +487,7 @@ Get a bookmark by Id #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -356,13 +495,13 @@ Get a bookmark by Id #### Defined in -[src/services/metadata/MarketplaceAPI.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L16) +[src/services/metadata/MarketplaceAPI.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L16) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -380,36 +519,36 @@ Get a bookmark by Id #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### updateOneById -▸ **updateOneById**(`id`, `bookmark`): `Promise`<[`Bookmark`](../interfaces/Bookmark.md)\> +▸ **updateOneById**(`id`, `bookmark`): `Promise`\<[`Bookmark`](../interfaces/Bookmark.md)\> Update a bookmark by id #### Parameters -| Name | Type | -| :--------- | :-------------------------------------------------- | -| `id` | `string` | -| `bookmark` | `Partial`<[`Bookmark`](../interfaces/Bookmark.md)\> | +| Name | Type | +| :--------- | :--------------------------------------------------- | +| `id` | `string` | +| `bookmark` | `Partial`\<[`Bookmark`](../interfaces/Bookmark.md)\> | #### Returns -`Promise`<[`Bookmark`](../interfaces/Bookmark.md)\> +`Promise`\<[`Bookmark`](../interfaces/Bookmark.md)\> #### Defined in -[src/services/metadata/Bookmarks.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Bookmarks.ts#L88) +[src/services/metadata/Bookmarks.ts:86](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Bookmarks.ts#L86) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -427,13 +566,13 @@ Update a bookmark by id #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -458,4 +597,4 @@ Update a bookmark by id #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/ComputeApi.md b/docs/api-reference/classes/ComputeApi.md index 1d30a572c..ab022d4a7 100644 --- a/docs/api-reference/classes/ComputeApi.md +++ b/docs/api-reference/classes/ComputeApi.md @@ -28,12 +28,14 @@ You can find more information about the Nevermined compute solution here: - [artifactsFolder](ComputeApi.md#artifactsfolder) - [circuitsFolder](ComputeApi.md#circuitsfolder) +- [client](ComputeApi.md#client) - [config](ComputeApi.md#config) - [instanceConfig](ComputeApi.md#instanceconfig) - [instantiableConfig](ComputeApi.md#instantiableconfig) - [logger](ComputeApi.md#logger) - [nevermined](ComputeApi.md#nevermined) -- [web3](ComputeApi.md#web3) +- [publicClient](ComputeApi.md#publicclient) +- [walletClient](ComputeApi.md#walletclient) ### Methods @@ -58,7 +60,7 @@ You can find more information about the Nevermined compute solution here: ### constructor -• **new ComputeApi**(`config`) +• **new ComputeApi**(`config`): [`ComputeApi`](ComputeApi.md) Creates a new ComputeApi @@ -68,13 +70,19 @@ Creates a new ComputeApi | :------- | :---------------------------------------------------------- | :--------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | Configuration of the Nevermined instance | +#### Returns + +[`ComputeApi`](ComputeApi.md) + +[ComputeApi](ComputeApi.md) + #### Overrides [RegistryBaseApi](RegistryBaseApi.md).[constructor](RegistryBaseApi.md#constructor) #### Defined in -[src/nevermined/api/ComputeApi.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ComputeApi.ts#L24) +[src/nevermined/api/ComputeApi.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ComputeApi.ts#L29) ## Properties @@ -84,7 +92,7 @@ Creates a new ComputeApi #### Index signature -▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`Service`](../code-reference.md#service)\> +▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`Service`](../code-reference.md#service)\> #### Inherited from @@ -92,17 +100,17 @@ Creates a new ComputeApi #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L29) +[src/nevermined/api/RegistryBaseApi.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L39) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -110,17 +118,17 @@ RegistryBaseApi.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -128,13 +136,31 @@ RegistryBaseApi.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +RegistryBaseApi.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -146,13 +172,13 @@ RegistryBaseApi.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -164,17 +190,17 @@ RegistryBaseApi.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -182,13 +208,13 @@ RegistryBaseApi.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -200,13 +226,13 @@ RegistryBaseApi.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -218,31 +244,146 @@ RegistryBaseApi.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +RegistryBaseApi.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -RegistryBaseApi.web3 +RegistryBaseApi.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### addRating -▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, it adds a vote to the asset curation information. @@ -253,13 +394,13 @@ Given a DID, it adds a vote to the asset curation information. | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `newRating` | `number` | `undefined` | New average rating of the asset | | `numVotesAdded` | `number` | `1` | Number of new votes added to the rating, typically just 1 | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -269,13 +410,13 @@ Given a DID, it adds a vote to the asset curation information. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:514](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L514) +[src/nevermined/api/RegistryBaseApi.ts:534](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L534) --- ### create -▸ **create**(`assetAttributes`, `publisherAccount`, `publicationOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **create**(`assetAttributes`, `publisherAccount`, `publicationOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> Registers a new asset in Nevermined. You can find more information about how different data is stored in Nevermined here: @@ -286,13 +427,13 @@ You can find more information about how different data is stored in Nevermined h | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | | `assetAttributes` | [`AssetAttributes`](AssetAttributes.md) | Attributes describing the asset | -| `publisherAccount` | [`Account`](Account.md) | The account publishing the asset | +| `publisherAccount` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The metadata of the asset created (DDO) @@ -304,39 +445,39 @@ The metadata of the asset created (DDO) #### Defined in -[src/nevermined/api/ComputeApi.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ComputeApi.ts#L43) +[src/nevermined/api/ComputeApi.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ComputeApi.ts#L48) --- ### execute -▸ **execute**(`agreementId`, `workflowDid`, `consumerAccount`): `Promise`<`string`\> +▸ **execute**(`agreementId`, `workflowDid`, `from`): `Promise`\<`string`\> It triggers the execution of a compute job #### Parameters -| Name | Type | Description | -| :---------------- | :---------------------- | :----------------------------------------------------------- | -| `agreementId` | `string` | The unique identifier of the order placed for a service | -| `workflowDid` | `string` | The unique identifier of the Asset representing the workflow | -| `consumerAccount` | [`Account`](Account.md) | The account of the user triggering the computation | +| Name | Type | Description | +| :------------ | :---------------------------- | :----------------------------------------------------------- | +| `agreementId` | `string` | The unique identifier of the order placed for a service | +| `workflowDid` | `string` | The unique identifier of the Asset representing the workflow | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the user triggering the computation | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> If the execution is correct it returns the response given by the Nevermined Node #### Defined in -[src/nevermined/api/ComputeApi.ts:120](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ComputeApi.ts#L120) +[src/nevermined/api/ComputeApi.ts:125](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ComputeApi.ts#L125) --- ### list -▸ **list**(`did`, `list`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **list**(`did`, `list`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset allowing to list or unlist it. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. In a Nevermined environment, when an asset is unlisted, it is not possible to be found and accessed by any user. @@ -347,13 +488,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be | :---------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `list` | `boolean` | `undefined` | Needs the asset to be listed or unlisted | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -363,82 +504,82 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:462](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L462) +[src/nevermined/api/RegistryBaseApi.ts:482](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L482) --- ### logs -▸ **logs**(`agreementId`, `executionId`, `consumerAccount`): `Promise`<`any`\> +▸ **logs**(`agreementId`, `executionId`, `from`): `Promise`\<`any`\> It returns the logs resulted by the execution of a Job #### Parameters -| Name | Type | Description | -| :---------------- | :---------------------- | :------------------------------------------------------ | -| `agreementId` | `string` | The unique identifier of the order placed for a service | -| `executionId` | `string` | The unique identifier of the job executed | -| `consumerAccount` | [`Account`](Account.md) | The account of the user triggering the computation | +| Name | Type | Description | +| :------------ | :---------------------------- | :------------------------------------------------------ | +| `agreementId` | `string` | The unique identifier of the order placed for a service | +| `executionId` | `string` | The unique identifier of the job executed | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the user triggering the computation | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> The logs resulted of the execution of the job #### Defined in -[src/nevermined/api/ComputeApi.ts:137](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ComputeApi.ts#L137) +[src/nevermined/api/ComputeApi.ts:142](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ComputeApi.ts#L142) --- ### order -▸ **order**(`did`, `consumerAccount`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **order**(`did`, `from`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> Start the purchase/order of a compute service. Starts by signing the service agreement then sends the request to the publisher via the service endpoint (Node http service). #### Parameters -| Name | Type | Description | -| :---------------- | :---------------------------------------------- | :----------------------------------------- | -| `did` | `string` | Unique identifier of the asset to order | -| `consumerAccount` | [`Account`](Account.md) | The account of the user ordering the asset | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | +| Name | Type | Description | +| :---------- | :---------------------------------------------- | :----------------------------------------- | +| `did` | `string` | Unique identifier of the asset to order | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the user ordering the asset | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID identifying the order #### Defined in -[src/nevermined/api/ComputeApi.ts:105](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ComputeApi.ts#L105) +[src/nevermined/api/ComputeApi.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ComputeApi.ts#L110) --- ### orderAsset -▸ **orderAsset**(`did`, `serviceReference`, `consumer`, `params?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **orderAsset**(`did`, `serviceReference`, `from`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> Start the purchase/order of an asset's service. Starts by signing the service agreement then sends the request to the publisher via the service endpoint (Node http service). #### Parameters -| Name | Type | Description | -| :----------------- | :------------------------------------------------------------ | :---------------- | -| `did` | `string` | Decentralized ID. | -| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | -| `consumer` | [`Account`](Account.md) | Consumer account. | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :----------------- | :------------------------------------------------------------ | :--------------------- | +| `did` | `string` | Decentralized ID. | +| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | +| `from` | [`NvmAccount`](NvmAccount.md) | Consumer account. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID. @@ -448,13 +589,13 @@ The agreement ID. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:563](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L563) +[src/nevermined/api/RegistryBaseApi.ts:585](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L585) --- ### registerNeverminedAsset -▸ `Protected` **registerNeverminedAsset**(`assetAttributes`, `publisher`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **registerNeverminedAsset**(`assetAttributes`, `from`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> It registers a new asset in a Nevermined network. This method is protected and not exposed via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, and `nfts` APIs. @@ -464,14 +605,14 @@ via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | | `assetAttributes` | [`AssetAttributes`](AssetAttributes.md) | Attributes describing the asset | -| `publisher` | [`Account`](Account.md) | The account publishing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-721) associated to the asset | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The metadata of the asset created (DDO) @@ -485,15 +626,16 @@ The metadata of the asset created (DDO) #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L42) +[src/nevermined/api/RegistryBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L52) --- ### resolveAsset -▸ `Protected` **resolveAsset**(`did`, `policy?`): `Promise`<[`DDO`](DDO.md)\> +▸ **resolveAsset**(`did`, `policy?`): `Promise`\<[`DDO`](DDO.md)\> -Returns a DDO by DID. Depending of the resolution policy it prioritize the Metadata API or Immutable urls. +Given an asset DID it returns the metadata of that asset represented by a DDO object. +Depending of the resolution policy it prioritize fetching that Metadata from the Marketplace API or Immutable urls (like IPFS). #### Parameters @@ -504,7 +646,7 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> [DDO](DDO.md) @@ -514,13 +656,13 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:310](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L310) +[src/nevermined/api/RegistryBaseApi.ts:324](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L324) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -538,55 +680,55 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### status -▸ **status**(`agreementId`, `executionId`, `consumerAccount`): `Promise`<`any`\> +▸ **status**(`agreementId`, `executionId`, `from`): `Promise`\<`any`\> It returns the status of a compute job #### Parameters -| Name | Type | Description | -| :---------------- | :---------------------- | :------------------------------------------------------ | -| `agreementId` | `string` | The unique identifier of the order placed for a service | -| `executionId` | `string` | The unique identifier of the job executed | -| `consumerAccount` | [`Account`](Account.md) | The account of the user triggering the computation | +| Name | Type | Description | +| :------------ | :---------------------------- | :------------------------------------------------------ | +| `agreementId` | `string` | The unique identifier of the order placed for a service | +| `executionId` | `string` | The unique identifier of the job executed | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the user triggering the computation | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> The status of the job #### Defined in -[src/nevermined/api/ComputeApi.ts:152](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ComputeApi.ts#L152) +[src/nevermined/api/ComputeApi.ts:153](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ComputeApi.ts#L153) --- ### update -▸ **update**(`did`, `metadata`, `publisherAccount`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **update**(`did`, `metadata`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. #### Parameters -| Name | Type | Default value | Description | -| :----------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | -| `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | -| `metadata` | [`MetaData`](../interfaces/MetaData.md) | `undefined` | Metadata describing the asset | -| `publisherAccount` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | -| `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | +| Name | Type | Default value | Description | +| :---------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | +| `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | +| `metadata` | [`MetaData`](../interfaces/MetaData.md) | `undefined` | Metadata describing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | +| `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -603,13 +745,13 @@ const ddoUpdated = await nevermined.compute.update( #### Defined in -[src/nevermined/api/ComputeApi.ts:87](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ComputeApi.ts#L87) +[src/nevermined/api/ComputeApi.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ComputeApi.ts#L92) --- ### updateAsset -▸ `Protected` **updateAsset**(`did`, `metadata`, `publisher`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **updateAsset**(`did`, `metadata`, `from`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. @@ -619,13 +761,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th | :----------------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | `undefined` | Metadata describing the asset | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadataOptions` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -635,13 +777,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:353](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L353) +[src/nevermined/api/RegistryBaseApi.ts:367](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L367) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -659,13 +801,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### getServicePlugin -▸ `Static` `Protected` **getServicePlugin**(`config`): `Object` +▸ **getServicePlugin**(`config`): `Object` Initializes the default Nevermined service plugins and return that instance @@ -681,13 +823,12 @@ Initializes the default Nevermined service plugins and return that instance The Nevermined Service Plugin instance -| Name | Type | -| :------------ | :------------------------------------------------------------------------------------------------------------ | -| `aave-credit` | [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceAaveCredit`](../interfaces/ServiceAaveCredit.md)\> | -| `access` | [`AccessService`](AccessService.md) | -| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | -| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | -| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | +| Name | Type | +| :----------- | :-------------------------------------------------------------------- | +| `access` | [`AccessService`](AccessService.md) | +| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | +| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | +| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | #### Inherited from @@ -695,13 +836,13 @@ The Nevermined Service Plugin instance #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:618](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L618) +[src/nevermined/api/RegistryBaseApi.ts:640](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L640) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -726,4 +867,4 @@ The Nevermined Service Plugin instance #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/ComputeExecutionCondition.md b/docs/api-reference/classes/ComputeExecutionCondition.md index 48b3c4de1..d4454b5cb 100644 --- a/docs/api-reference/classes/ComputeExecutionCondition.md +++ b/docs/api-reference/classes/ComputeExecutionCondition.md @@ -4,7 +4,7 @@ ## Hierarchy -- [`ProviderCondition`](ProviderCondition.md)<`ComputeExecutionConditionContext`\> +- `ProviderCondition`\<`ComputeExecutionConditionContext`\> ↳ **`ComputeExecutionCondition`** @@ -26,12 +26,14 @@ - [artifactsFolder](ComputeExecutionCondition.md#artifactsfolder) - [circuitsFolder](ComputeExecutionCondition.md#circuitsfolder) +- [client](ComputeExecutionCondition.md#client) - [config](ComputeExecutionCondition.md#config) - [instanceConfig](ComputeExecutionCondition.md#instanceconfig) - [instantiableConfig](ComputeExecutionCondition.md#instantiableconfig) - [logger](ComputeExecutionCondition.md#logger) - [nevermined](ComputeExecutionCondition.md#nevermined) -- [web3](ComputeExecutionCondition.md#web3) +- [publicClient](ComputeExecutionCondition.md#publicclient) +- [walletClient](ComputeExecutionCondition.md#walletclient) ### Methods @@ -46,8 +48,7 @@ - [generateIdWithSeed](ComputeExecutionCondition.md#generateidwithseed) - [getConditionFulfilledEvent](ComputeExecutionCondition.md#getconditionfulfilledevent) - [getFromAddress](ComputeExecutionCondition.md#getfromaddress) -- [getInputsOfMethod](ComputeExecutionCondition.md#getinputsofmethod) -- [getSignatureOfMethod](ComputeExecutionCondition.md#getsignatureofmethod) +- [getTransactionLogs](ComputeExecutionCondition.md#gettransactionlogs) - [hashValues](ComputeExecutionCondition.md#hashvalues) - [hashValuesPlain](ComputeExecutionCondition.md#hashvaluesplain) - [init](ComputeExecutionCondition.md#init) @@ -59,6 +60,7 @@ - [send](ComputeExecutionCondition.md#send) - [sendFrom](ComputeExecutionCondition.md#sendfrom) - [setInstanceConfig](ComputeExecutionCondition.md#setinstanceconfig) +- [someLog](ComputeExecutionCondition.md#somelog) - [wasComputeTriggered](ComputeExecutionCondition.md#wascomputetriggered) - [getInstance](ComputeExecutionCondition.md#getinstance) - [setInstanceConfig](ComputeExecutionCondition.md#setinstanceconfig-1) @@ -67,7 +69,7 @@ ### constructor -• **new ComputeExecutionCondition**(`contractName`) +• **new ComputeExecutionCondition**(`contractName`): [`ComputeExecutionCondition`](ComputeExecutionCondition.md) #### Parameters @@ -75,41 +77,45 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`ComputeExecutionCondition`](ComputeExecutionCondition.md) + #### Inherited from -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) +ProviderCondition\.constructor #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) +ProviderCondition.address #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) +ProviderCondition.contract #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -119,25 +125,25 @@ #### Inherited from -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) +ProviderCondition.contractName #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) +ProviderCondition.events #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -147,21 +153,21 @@ #### Inherited from -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) +ProviderCondition.version #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -169,17 +175,17 @@ ProviderCondition.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -187,13 +193,31 @@ ProviderCondition.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ProviderCondition.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -205,13 +229,13 @@ ProviderCondition.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -223,17 +247,17 @@ ProviderCondition.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -241,13 +265,13 @@ ProviderCondition.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -259,13 +283,13 @@ ProviderCondition.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -277,57 +301,172 @@ ProviderCondition.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ProviderCondition.web3 +ProviderCondition.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ProviderCondition.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### abortByTimeOut -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **abortByTimeOut**(`conditionId`, `from`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :------------ | :---------------------------------------------- | | `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) +ProviderCondition.abortByTimeOut #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) +[src/keeper/contracts/conditions/Condition.abstract.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L75) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -337,29 +476,29 @@ ProviderCondition.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) +ProviderCondition.call #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### fulfill -▸ **fulfill**(`agreementId`, `did`, `computeConsumer`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfill**(`agreementId`, `did`, `computeConsumer`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -368,54 +507,54 @@ ProviderCondition.web3 | `agreementId` | `string` | | `did` | `string` | | `computeConsumer` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Overrides -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) +ProviderCondition.fulfill #### Defined in -[src/keeper/contracts/conditions/ComputeExecutionCondition.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/ComputeExecutionCondition.ts#L24) +[src/keeper/contracts/conditions/ComputeExecutionCondition.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/ComputeExecutionCondition.ts#L28) --- ### fulfillInstance -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillInstance**(`cond`, `additionalParams`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | +| Name | Type | Default value | +| :----------------- | :-------------------------------------------------------- | :------------ | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | `undefined` | +| `additionalParams` | `Record`\<`string`, `unknown`\> | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | +| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) +ProviderCondition.fulfillInstance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) +[src/keeper/contracts/conditions/Condition.abstract.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L139) --- ### fulfillPlain -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillPlain**(`agreementId`, `args`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters @@ -423,54 +562,54 @@ ProviderCondition.web3 | :------------ | :-------------------------------------------------------- | :------------ | | `agreementId` | `string` | `undefined` | | `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | | `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) +ProviderCondition.fulfillPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) +[src/keeper/contracts/conditions/Condition.abstract.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L47) --- ### fulfillWithNode -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillWithNode**(`cond`, `additionalParams`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :----------------- | :----------------------------------------------------- | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | +| `additionalParams` | `Record`\<`string`, `unknown`\> | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) +ProviderCondition.fulfillWithNode #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) +[src/keeper/contracts/conditions/Condition.abstract.ts:183](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L183) --- ### generateId -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> +▸ **generateId**(`agreementId`, `valueHash`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -481,21 +620,21 @@ ProviderCondition.web3 #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) +ProviderCondition.generateId #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) +[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L61) --- ### generateIdHash -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> +▸ **generateIdHash**(`agreementId`, `...values`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -506,21 +645,21 @@ ProviderCondition.web3 #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) +ProviderCondition.generateIdHash #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) +[src/keeper/contracts/conditions/Condition.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L57) --- ### generateIdWithSeed -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> +▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`\<[`string`, `string`]\> #### Parameters @@ -531,15 +670,15 @@ ProviderCondition.web3 #### Returns -`Promise`<[`string`, `string`]\> +`Promise`\<[`string`, `string`]\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) +ProviderCondition.generateIdWithSeed #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) +[src/keeper/contracts/conditions/Condition.abstract.ts:65](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L65) --- @@ -559,17 +698,17 @@ ProviderCondition.web3 #### Inherited from -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) +ProviderCondition.getConditionFulfilledEvent #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) +[src/keeper/contracts/conditions/Condition.abstract.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L79) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -579,70 +718,46 @@ ProviderCondition.web3 #### Returns -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) +ProviderCondition.getFromAddress #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) +ProviderCondition.getTransactionLogs #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### hashValues -▸ **hashValues**(`...args`): `Promise`<`string`\> +▸ **hashValues**(`...args`): `Promise`\<`string`\> #### Parameters @@ -652,21 +767,21 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) +ProviderCondition.hashValues #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) +[src/keeper/contracts/conditions/Condition.abstract.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L116) --- ### hashValuesPlain -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> +▸ **hashValuesPlain**(`...args`): `Promise`\<`string`\> #### Parameters @@ -676,71 +791,72 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) +ProviderCondition.hashValuesPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) +[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L122) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) +ProviderCondition.init #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instance -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instance**(`agreementId`, `params`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | +| Name | Type | +| :------------ | :------------------------------------------------------- | +| `agreementId` | `string` | +| `params` | `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> | #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) +ProviderCondition.instance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) +[src/keeper/contracts/conditions/Condition.abstract.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L163) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -752,15 +868,15 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) +ProviderCondition.instanceFromDDO #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) +[src/keeper/contracts/conditions/Condition.abstract.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L131) --- @@ -774,17 +890,17 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) +ProviderCondition.nodeMethod #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L208) +[src/keeper/contracts/conditions/Condition.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L200) --- ### params -▸ **params**(`did`, `computeConsumer`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +▸ **params**(`did`, `computeConsumer`): `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> #### Parameters @@ -795,21 +911,21 @@ readonly `ParamType`[] #### Returns -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +`ConditionParameters`\<`Record`\<`string`, `unknown`\>\> #### Overrides -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) +ProviderCondition.params #### Defined in -[src/keeper/contracts/conditions/ComputeExecutionCondition.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/ComputeExecutionCondition.ts#L20) +[src/keeper/contracts/conditions/ComputeExecutionCondition.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/ComputeExecutionCondition.ts#L24) --- ### paramsFromDDO -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +▸ **paramsFromDDO**(`«destructured»`): `Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -819,75 +935,75 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Overrides -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) +ProviderCondition.paramsFromDDO #### Defined in -[src/keeper/contracts/conditions/ComputeExecutionCondition.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/ComputeExecutionCondition.ts#L12) +[src/keeper/contracts/conditions/ComputeExecutionCondition.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/ComputeExecutionCondition.ts#L16) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) +ProviderCondition.send #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) +ProviderCondition.sendFrom #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -901,39 +1017,63 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) +ProviderCondition.setInstanceConfig + +#### Defined in + +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +ProviderCondition.someLog #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### wasComputeTriggered -▸ **wasComputeTriggered**(`did`, `computeConsumer`, `from?`): `Promise`<`boolean`\> +▸ **wasComputeTriggered**(`did`, `computeConsumer`, `from?`): `Promise`\<`boolean`\> #### Parameters -| Name | Type | -| :---------------- | :---------------------- | -| `did` | `string` | -| `computeConsumer` | `string` | -| `from?` | [`Account`](Account.md) | +| Name | Type | +| :---------------- | :---------------------------- | +| `did` | `string` | +| `computeConsumer` | `string` | +| `from?` | [`NvmAccount`](NvmAccount.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Defined in -[src/keeper/contracts/conditions/ComputeExecutionCondition.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/ComputeExecutionCondition.ts#L39) +[src/keeper/contracts/conditions/ComputeExecutionCondition.ts:43](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/ComputeExecutionCondition.ts#L43) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`ComputeExecutionCondition`](ComputeExecutionCondition.md)\> +▸ **getInstance**(`config`): `Promise`\<[`ComputeExecutionCondition`](ComputeExecutionCondition.md)\> #### Parameters @@ -943,21 +1083,21 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ComputeExecutionCondition`](ComputeExecutionCondition.md)\> +`Promise`\<[`ComputeExecutionCondition`](ComputeExecutionCondition.md)\> #### Overrides -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) +ProviderCondition.getInstance #### Defined in -[src/keeper/contracts/conditions/ComputeExecutionCondition.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/ComputeExecutionCondition.ts#L16) +[src/keeper/contracts/conditions/ComputeExecutionCondition.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/ComputeExecutionCondition.ts#L20) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -978,8 +1118,8 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) +ProviderCondition.setInstanceConfig #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/Condition.md b/docs/api-reference/classes/Condition.md deleted file mode 100644 index 8acc4f9b3..000000000 --- a/docs/api-reference/classes/Condition.md +++ /dev/null @@ -1,940 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / Condition - -# Class: Condition - -## Type parameters - -| Name | Type | -| :------ | :-------------------------------------------------------------- | -| `Ctx` | extends [`ConditionContext`](../interfaces/ConditionContext.md) | -| `Extra` | `Record`<`string`, `unknown`\> | - -## Hierarchy - -- [`ConditionSmall`](ConditionSmall.md) - - ↳ **`Condition`** - - ↳↳ [`ProviderCondition`](ProviderCondition.md) - - ↳↳ [`ConsumerCondition`](ConsumerCondition.md) - -## Table of contents - -### Constructors - -- [constructor](Condition.md#constructor) - -### Properties - -- [address](Condition.md#address) -- [contract](Condition.md#contract) -- [contractName](Condition.md#contractname) -- [events](Condition.md#events) -- [version](Condition.md#version) - -### Accessors - -- [artifactsFolder](Condition.md#artifactsfolder) -- [circuitsFolder](Condition.md#circuitsfolder) -- [config](Condition.md#config) -- [instanceConfig](Condition.md#instanceconfig) -- [instantiableConfig](Condition.md#instantiableconfig) -- [logger](Condition.md#logger) -- [nevermined](Condition.md#nevermined) -- [web3](Condition.md#web3) - -### Methods - -- [abortByTimeOut](Condition.md#abortbytimeout) -- [call](Condition.md#call) -- [fulfill](Condition.md#fulfill) -- [fulfillInstance](Condition.md#fulfillinstance) -- [fulfillPlain](Condition.md#fulfillplain) -- [fulfillWithNode](Condition.md#fulfillwithnode) -- [generateId](Condition.md#generateid) -- [generateIdHash](Condition.md#generateidhash) -- [generateIdWithSeed](Condition.md#generateidwithseed) -- [getConditionFulfilledEvent](Condition.md#getconditionfulfilledevent) -- [getFromAddress](Condition.md#getfromaddress) -- [getInputsOfMethod](Condition.md#getinputsofmethod) -- [getSignatureOfMethod](Condition.md#getsignatureofmethod) -- [hashValues](Condition.md#hashvalues) -- [hashValuesPlain](Condition.md#hashvaluesplain) -- [init](Condition.md#init) -- [instance](Condition.md#instance) -- [instanceFromDDO](Condition.md#instancefromddo) -- [params](Condition.md#params) -- [paramsFromDDO](Condition.md#paramsfromddo) -- [send](Condition.md#send) -- [sendFrom](Condition.md#sendfrom) -- [setInstanceConfig](Condition.md#setinstanceconfig) -- [getInstance](Condition.md#getinstance) -- [setInstanceConfig](Condition.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new Condition**<`Ctx`, `Extra`\>(`contractName`) - -#### Type parameters - -| Name | Type | -| :------ | :-------------------------------------------------------------- | -| `Ctx` | extends [`ConditionContext`](../interfaces/ConditionContext.md) | -| `Extra` | `Record`<`string`, `unknown`\> | - -#### Parameters - -| Name | Type | -| :------------- | :------- | -| `contractName` | `string` | - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[constructor](ConditionSmall.md#constructor) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) - -## Properties - -### address - -• **address**: `string` - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[address](ConditionSmall.md#address) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) - ---- - -### contract - -• **contract**: `BaseContract` = `null` - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[contract](ConditionSmall.md#contract) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) - ---- - -### contractName - -• `Readonly` **contractName**: `string` - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[contractName](ConditionSmall.md#contractname) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) - ---- - -### events - -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[events](ConditionSmall.md#events) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) - ---- - -### version - -• **version**: `string` - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[version](ConditionSmall.md#version) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ConditionSmall.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ConditionSmall.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -ConditionSmall.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ConditionSmall.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ConditionSmall.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -ConditionSmall.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -ConditionSmall.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -ConditionSmall.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### abortByTimeOut - -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------- | -| `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[abortByTimeOut](ConditionSmall.md#abortbytimeout) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) - ---- - -### call - -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> - -#### Type parameters - -| Name | -| :--- | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | - -#### Returns - -`Promise`<`T`\> - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[call](ConditionSmall.md#call) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) - ---- - -### fulfill - -▸ `Abstract` **fulfill**(`agreementId`, `...args`): `any` - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...args` | `any`[] | - -#### Returns - -`any` - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[fulfill](ConditionSmall.md#fulfill) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L61) - ---- - -### fulfillInstance - -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :----------------- | :------------------------------------------------------------------ | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\> | `undefined` | -| `additionalParams` | `Extra` | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) - ---- - -### fulfillPlain - -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :------------ | :-------------------------------------------------------- | :------------ | -| `agreementId` | `string` | `undefined` | -| `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[fulfillPlain](ConditionSmall.md#fulfillplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) - ---- - -### fulfillWithNode - -▸ `Abstract` **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`void` \| `ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :----------------- | :------------------------------------------------------------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\> | -| `additionalParams` | `Extra` | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`void` \| `ContractTransactionReceipt`\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:167](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L167) - ---- - -### generateId - -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[generateId](ConditionSmall.md#generateid) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) - ---- - -### generateIdHash - -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...values` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[generateIdHash](ConditionSmall.md#generateidhash) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) - ---- - -### generateIdWithSeed - -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<[`string`, `string`]\> - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[generateIdWithSeed](ConditionSmall.md#generateidwithseed) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) - ---- - -### getConditionFulfilledEvent - -▸ **getConditionFulfilledEvent**(`agreementId`): [`EventResult`](../code-reference.md#eventresult) - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | - -#### Returns - -[`EventResult`](../code-reference.md#eventresult) - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[getConditionFulfilledEvent](ConditionSmall.md#getconditionfulfilledevent) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) - ---- - -### getFromAddress - -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `from?` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[getFromAddress](ConditionSmall.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[getInputsOfMethod](ConditionSmall.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[getSignatureOfMethod](ConditionSmall.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) - ---- - -### hashValues - -▸ **hashValues**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Overrides - -[ConditionSmall](ConditionSmall.md).[hashValues](ConditionSmall.md#hashvalues) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) - ---- - -### hashValuesPlain - -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) - ---- - -### init - -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[init](ConditionSmall.md#init) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) - ---- - -### instance - -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\>\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\> | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\>\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) - ---- - -### instanceFromDDO - -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\>\> - -#### Parameters - -| Name | Type | -| :------------ | :-------------------------------------------------------------------- | -| `agreementId` | `string` | -| `ctx` | `Ctx` | -| `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\>\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) - ---- - -### params - -▸ **params**(`...args`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L122) - ---- - -### paramsFromDDO - -▸ `Abstract` **paramsFromDDO**(`ctx`, `...args`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\>\> - -#### Parameters - -| Name | Type | -| :-------- | :-------------------------------------------------------------------- | -| `ctx` | `Ctx` | -| `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | - -#### Returns - -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\>\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:137](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L137) - ---- - -### send - -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[send](ConditionSmall.md#send) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) - ---- - -### sendFrom - -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[sendFrom](ConditionSmall.md#sendfrom) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[setInstanceConfig](ConditionSmall.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### getInstance - -▸ `Static` **getInstance**<`Ctx`, `Extra`\>(`config`, `conditionName`, `conditionsClass`, `optional?`): `Promise`<`any`\> - -#### Type parameters - -| Name | Type | -| :------ | :-------------------------------------------------------------- | -| `Ctx` | extends [`ConditionContext`](../interfaces/ConditionContext.md) | -| `Extra` | `Extra` | - -#### Parameters - -| Name | Type | Default value | -| :---------------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `conditionName` | `string` | `undefined` | -| `conditionsClass` | `any` | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`any`\> - -#### Overrides - -[ConditionSmall](ConditionSmall.md).[getInstance](ConditionSmall.md#getinstance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:111](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L111) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ConditionSmall](ConditionSmall.md).[setInstanceConfig](ConditionSmall.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/ConditionSmall.md b/docs/api-reference/classes/ConditionSmall.md deleted file mode 100644 index 23eebf87b..000000000 --- a/docs/api-reference/classes/ConditionSmall.md +++ /dev/null @@ -1,734 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / ConditionSmall - -# Class: ConditionSmall - -## Hierarchy - -- [`ContractBase`](ContractBase.md) - - ↳ **`ConditionSmall`** - - ↳↳ [`Condition`](Condition.md) - -## Table of contents - -### Constructors - -- [constructor](ConditionSmall.md#constructor) - -### Properties - -- [address](ConditionSmall.md#address) -- [contract](ConditionSmall.md#contract) -- [contractName](ConditionSmall.md#contractname) -- [events](ConditionSmall.md#events) -- [version](ConditionSmall.md#version) - -### Accessors - -- [artifactsFolder](ConditionSmall.md#artifactsfolder) -- [circuitsFolder](ConditionSmall.md#circuitsfolder) -- [config](ConditionSmall.md#config) -- [instanceConfig](ConditionSmall.md#instanceconfig) -- [instantiableConfig](ConditionSmall.md#instantiableconfig) -- [logger](ConditionSmall.md#logger) -- [nevermined](ConditionSmall.md#nevermined) -- [web3](ConditionSmall.md#web3) - -### Methods - -- [abortByTimeOut](ConditionSmall.md#abortbytimeout) -- [call](ConditionSmall.md#call) -- [fulfill](ConditionSmall.md#fulfill) -- [fulfillPlain](ConditionSmall.md#fulfillplain) -- [generateId](ConditionSmall.md#generateid) -- [generateIdHash](ConditionSmall.md#generateidhash) -- [generateIdWithSeed](ConditionSmall.md#generateidwithseed) -- [getConditionFulfilledEvent](ConditionSmall.md#getconditionfulfilledevent) -- [getFromAddress](ConditionSmall.md#getfromaddress) -- [getInputsOfMethod](ConditionSmall.md#getinputsofmethod) -- [getSignatureOfMethod](ConditionSmall.md#getsignatureofmethod) -- [hashValues](ConditionSmall.md#hashvalues) -- [init](ConditionSmall.md#init) -- [send](ConditionSmall.md#send) -- [sendFrom](ConditionSmall.md#sendfrom) -- [setInstanceConfig](ConditionSmall.md#setinstanceconfig) -- [getInstance](ConditionSmall.md#getinstance) -- [setInstanceConfig](ConditionSmall.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new ConditionSmall**(`contractName`) - -#### Parameters - -| Name | Type | -| :------------- | :------- | -| `contractName` | `string` | - -#### Inherited from - -[ContractBase](ContractBase.md).[constructor](ContractBase.md#constructor) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) - -## Properties - -### address - -• **address**: `string` - -#### Inherited from - -[ContractBase](ContractBase.md).[address](ContractBase.md#address) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) - ---- - -### contract - -• **contract**: `BaseContract` = `null` - -#### Inherited from - -[ContractBase](ContractBase.md).[contract](ContractBase.md#contract) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) - ---- - -### contractName - -• `Readonly` **contractName**: `string` - -#### Inherited from - -[ContractBase](ContractBase.md).[contractName](ContractBase.md#contractname) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) - ---- - -### events - -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` - -#### Inherited from - -[ContractBase](ContractBase.md).[events](ContractBase.md#events) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) - ---- - -### version - -• **version**: `string` - -#### Inherited from - -[ContractBase](ContractBase.md).[version](ContractBase.md#version) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ContractBase.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ContractBase.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -ContractBase.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ContractBase.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ContractBase.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -ContractBase.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -ContractBase.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -ContractBase.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### abortByTimeOut - -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------- | -| `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) - ---- - -### call - -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> - -#### Type parameters - -| Name | -| :--- | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | - -#### Returns - -`Promise`<`T`\> - -#### Inherited from - -[ContractBase](ContractBase.md).[call](ContractBase.md#call) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) - ---- - -### fulfill - -▸ `Abstract` **fulfill**(`agreementId`, `...args`): `any` - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...args` | `any`[] | - -#### Returns - -`any` - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L61) - ---- - -### fulfillPlain - -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :------------ | :-------------------------------------------------------- | :------------ | -| `agreementId` | `string` | `undefined` | -| `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) - ---- - -### generateId - -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) - ---- - -### generateIdHash - -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...values` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) - ---- - -### generateIdWithSeed - -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<[`string`, `string`]\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) - ---- - -### getConditionFulfilledEvent - -▸ **getConditionFulfilledEvent**(`agreementId`): [`EventResult`](../code-reference.md#eventresult) - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | - -#### Returns - -[`EventResult`](../code-reference.md#eventresult) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) - ---- - -### getFromAddress - -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `from?` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ContractBase](ContractBase.md).[getFromAddress](ContractBase.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ContractBase](ContractBase.md).[getInputsOfMethod](ContractBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[ContractBase](ContractBase.md).[getSignatureOfMethod](ContractBase.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) - ---- - -### hashValues - -▸ **hashValues**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L57) - ---- - -### init - -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[ContractBase](ContractBase.md).[init](ContractBase.md#init) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) - ---- - -### send - -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ContractBase](ContractBase.md).[send](ContractBase.md#send) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) - ---- - -### sendFrom - -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ContractBase](ContractBase.md).[sendFrom](ContractBase.md#sendfrom) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ContractBase](ContractBase.md).[setInstanceConfig](ContractBase.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### getInstance - -▸ `Static` **getInstance**<`Ctx`, `Extra`\>(`config`, `conditionName`, `conditionsClass`, `optional?`): `Promise`<`any`\> - -#### Type parameters - -| Name | Type | -| :------ | :-------------------------------------------------------------- | -| `Ctx` | extends [`ConditionContext`](../interfaces/ConditionContext.md) | -| `Extra` | `Extra` | - -#### Parameters - -| Name | Type | Default value | -| :---------------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `conditionName` | `string` | `undefined` | -| `conditionsClass` | `any` | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`any`\> - -#### Overrides - -[ContractBase](ContractBase.md).[getInstance](ContractBase.md#getinstance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:46](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L46) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ContractBase](ContractBase.md).[setInstanceConfig](ContractBase.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/ConditionStoreManager.md b/docs/api-reference/classes/ConditionStoreManager.md index 8c9197861..9c41405e4 100644 --- a/docs/api-reference/classes/ConditionStoreManager.md +++ b/docs/api-reference/classes/ConditionStoreManager.md @@ -26,12 +26,14 @@ - [artifactsFolder](ConditionStoreManager.md#artifactsfolder) - [circuitsFolder](ConditionStoreManager.md#circuitsfolder) +- [client](ConditionStoreManager.md#client) - [config](ConditionStoreManager.md#config) - [instanceConfig](ConditionStoreManager.md#instanceconfig) - [instantiableConfig](ConditionStoreManager.md#instantiableconfig) - [logger](ConditionStoreManager.md#logger) - [nevermined](ConditionStoreManager.md#nevermined) -- [web3](ConditionStoreManager.md#web3) +- [publicClient](ConditionStoreManager.md#publicclient) +- [walletClient](ConditionStoreManager.md#walletclient) ### Methods @@ -41,15 +43,15 @@ - [getCondition](ConditionStoreManager.md#getcondition) - [getCreateRole](ConditionStoreManager.md#getcreaterole) - [getFromAddress](ConditionStoreManager.md#getfromaddress) -- [getInputsOfMethod](ConditionStoreManager.md#getinputsofmethod) - [getOwner](ConditionStoreManager.md#getowner) -- [getSignatureOfMethod](ConditionStoreManager.md#getsignatureofmethod) +- [getTransactionLogs](ConditionStoreManager.md#gettransactionlogs) - [init](ConditionStoreManager.md#init) - [isConditionTimeLocked](ConditionStoreManager.md#isconditiontimelocked) - [isConditionTimedOut](ConditionStoreManager.md#isconditiontimedout) - [send](ConditionStoreManager.md#send) - [sendFrom](ConditionStoreManager.md#sendfrom) - [setInstanceConfig](ConditionStoreManager.md#setinstanceconfig) +- [someLog](ConditionStoreManager.md#somelog) - [getInstance](ConditionStoreManager.md#getinstance) - [setInstanceConfig](ConditionStoreManager.md#setinstanceconfig-1) @@ -57,7 +59,7 @@ ### constructor -• **new ConditionStoreManager**(`contractName`) +• **new ConditionStoreManager**(`contractName`): [`ConditionStoreManager`](ConditionStoreManager.md) #### Parameters @@ -65,19 +67,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`ConditionStoreManager`](ConditionStoreManager.md) + #### Inherited from [ContractBase](ContractBase.md).[constructor](ContractBase.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -85,13 +91,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -99,7 +105,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -113,13 +119,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -127,7 +133,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -141,17 +147,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -159,17 +165,17 @@ ContractBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -177,13 +183,31 @@ ContractBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ContractBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -195,13 +219,13 @@ ContractBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -213,17 +237,17 @@ ContractBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -231,13 +255,13 @@ ContractBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -249,13 +273,13 @@ ContractBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -267,31 +291,146 @@ ContractBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ContractBase.web3 +ContractBase.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ContractBase.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -301,15 +440,15 @@ ContractBase.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -317,13 +456,13 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### createCondition -▸ **createCondition**(`id`, `typeRef`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createCondition**(`id`, `typeRef`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -331,44 +470,44 @@ ContractBase.web3 | :---------- | :---------------------------------------------- | | `id` | `string` | | `typeRef` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L26) +[src/keeper/contracts/managers/ConditionStoreManager.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L27) --- ### delegateCreateRole -▸ **delegateCreateRole**(`delegatee`, `owner`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **delegateCreateRole**(`delegatee`, `owner`, `txParams?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :---------- | :---------------------------------------------- | | `delegatee` | `string` | -| `owner` | `string` | +| `owner` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L35) +[src/keeper/contracts/managers/ConditionStoreManager.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L36) --- ### getCondition -▸ **getCondition**(`conditionId`): `Promise`<[`ConditionData`](../interfaces/ConditionData.md)\> +▸ **getCondition**(`conditionId`): `Promise`\<[`ConditionData`](../interfaces/ConditionData.md)\> #### Parameters @@ -378,31 +517,31 @@ ContractBase.web3 #### Returns -`Promise`<[`ConditionData`](../interfaces/ConditionData.md)\> +`Promise`\<[`ConditionData`](../interfaces/ConditionData.md)\> #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L55) +[src/keeper/contracts/managers/ConditionStoreManager.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L56) --- ### getCreateRole -▸ **getCreateRole**(): `Promise`<`unknown`\> +▸ **getCreateRole**(): `Promise`\<`unknown`\> #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L39) +[src/keeper/contracts/managers/ConditionStoreManager.ts:40](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L40) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -412,7 +551,7 @@ ContractBase.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -420,87 +559,64 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ContractBase](ContractBase.md).[getInputsOfMethod](ContractBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getOwner -▸ **getOwner**(): `Promise`<`string`\> +▸ **getOwner**(): `Promise`\<`string`\> #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:51](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L51) +[src/keeper/contracts/managers/ConditionStoreManager.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L52) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ContractBase](ContractBase.md).[getSignatureOfMethod](ContractBase.md#getsignatureofmethod) +[ContractBase](ContractBase.md).[getTransactionLogs](ContractBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -508,13 +624,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### isConditionTimeLocked -▸ **isConditionTimeLocked**(`id`): `Promise`<`unknown`\> +▸ **isConditionTimeLocked**(`id`): `Promise`\<`unknown`\> #### Parameters @@ -524,17 +640,17 @@ readonly `ParamType`[] #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L43) +[src/keeper/contracts/managers/ConditionStoreManager.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L44) --- ### isConditionTimedOut -▸ **isConditionTimedOut**(`id`): `Promise`<`unknown`\> +▸ **isConditionTimedOut**(`id`): `Promise`\<`unknown`\> #### Parameters @@ -544,30 +660,30 @@ readonly `ParamType`[] #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L47) +[src/keeper/contracts/managers/ConditionStoreManager.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L48) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -575,26 +691,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -602,13 +718,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -626,13 +742,37 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[ContractBase](ContractBase.md).[someLog](ContractBase.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`ConditionStoreManager`](ConditionStoreManager.md)\> +▸ **getInstance**(`config`): `Promise`\<[`ConditionStoreManager`](ConditionStoreManager.md)\> #### Parameters @@ -642,7 +782,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionStoreManager`](ConditionStoreManager.md)\> +`Promise`\<[`ConditionStoreManager`](ConditionStoreManager.md)\> #### Overrides @@ -650,13 +790,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L18) +[src/keeper/contracts/managers/ConditionStoreManager.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L19) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -681,4 +821,4 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/ConsumerCondition.md b/docs/api-reference/classes/ConsumerCondition.md deleted file mode 100644 index 2ab52eb36..000000000 --- a/docs/api-reference/classes/ConsumerCondition.md +++ /dev/null @@ -1,972 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / ConsumerCondition - -# Class: ConsumerCondition - -## Type parameters - -| Name | Type | -| :------ | :-------------------------------------------------------------- | -| `Ctx` | extends [`ConditionContext`](../interfaces/ConditionContext.md) | -| `Extra` | `Record`<`string`, `unknown`\> | - -## Hierarchy - -- [`Condition`](Condition.md)<`Ctx`, `Extra`\> - - ↳ **`ConsumerCondition`** - - ↳↳ [`LockPaymentCondition`](LockPaymentCondition.md) - - ↳↳ [`NFTHolderCondition`](NFTHolderCondition.md) - - ↳↳ [`NFT721HolderCondition`](NFT721HolderCondition.md) - - ↳↳ [`NFTLockCondition`](NFTLockCondition.md) - -## Table of contents - -### Constructors - -- [constructor](ConsumerCondition.md#constructor) - -### Properties - -- [address](ConsumerCondition.md#address) -- [contract](ConsumerCondition.md#contract) -- [contractName](ConsumerCondition.md#contractname) -- [events](ConsumerCondition.md#events) -- [version](ConsumerCondition.md#version) - -### Accessors - -- [artifactsFolder](ConsumerCondition.md#artifactsfolder) -- [circuitsFolder](ConsumerCondition.md#circuitsfolder) -- [config](ConsumerCondition.md#config) -- [instanceConfig](ConsumerCondition.md#instanceconfig) -- [instantiableConfig](ConsumerCondition.md#instantiableconfig) -- [logger](ConsumerCondition.md#logger) -- [nevermined](ConsumerCondition.md#nevermined) -- [web3](ConsumerCondition.md#web3) - -### Methods - -- [abortByTimeOut](ConsumerCondition.md#abortbytimeout) -- [call](ConsumerCondition.md#call) -- [fulfill](ConsumerCondition.md#fulfill) -- [fulfillInstance](ConsumerCondition.md#fulfillinstance) -- [fulfillPlain](ConsumerCondition.md#fulfillplain) -- [fulfillWithNode](ConsumerCondition.md#fulfillwithnode) -- [generateId](ConsumerCondition.md#generateid) -- [generateIdHash](ConsumerCondition.md#generateidhash) -- [generateIdWithSeed](ConsumerCondition.md#generateidwithseed) -- [getConditionFulfilledEvent](ConsumerCondition.md#getconditionfulfilledevent) -- [getFromAddress](ConsumerCondition.md#getfromaddress) -- [getInputsOfMethod](ConsumerCondition.md#getinputsofmethod) -- [getSignatureOfMethod](ConsumerCondition.md#getsignatureofmethod) -- [hashValues](ConsumerCondition.md#hashvalues) -- [hashValuesPlain](ConsumerCondition.md#hashvaluesplain) -- [init](ConsumerCondition.md#init) -- [instance](ConsumerCondition.md#instance) -- [instanceFromDDO](ConsumerCondition.md#instancefromddo) -- [params](ConsumerCondition.md#params) -- [paramsFromDDO](ConsumerCondition.md#paramsfromddo) -- [send](ConsumerCondition.md#send) -- [sendFrom](ConsumerCondition.md#sendfrom) -- [setInstanceConfig](ConsumerCondition.md#setinstanceconfig) -- [getInstance](ConsumerCondition.md#getinstance) -- [setInstanceConfig](ConsumerCondition.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new ConsumerCondition**<`Ctx`, `Extra`\>(`contractName`) - -#### Type parameters - -| Name | Type | -| :------ | :-------------------------------------------------------------- | -| `Ctx` | extends [`ConditionContext`](../interfaces/ConditionContext.md) | -| `Extra` | `Record`<`string`, `unknown`\> | - -#### Parameters - -| Name | Type | -| :------------- | :------- | -| `contractName` | `string` | - -#### Inherited from - -[Condition](Condition.md).[constructor](Condition.md#constructor) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) - -## Properties - -### address - -• **address**: `string` - -#### Inherited from - -[Condition](Condition.md).[address](Condition.md#address) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) - ---- - -### contract - -• **contract**: `BaseContract` = `null` - -#### Inherited from - -[Condition](Condition.md).[contract](Condition.md#contract) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) - ---- - -### contractName - -• `Readonly` **contractName**: `string` - -#### Inherited from - -[Condition](Condition.md).[contractName](Condition.md#contractname) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) - ---- - -### events - -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` - -#### Inherited from - -[Condition](Condition.md).[events](Condition.md#events) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) - ---- - -### version - -• **version**: `string` - -#### Inherited from - -[Condition](Condition.md).[version](Condition.md#version) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -Condition.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -Condition.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -Condition.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -Condition.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -Condition.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -Condition.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -Condition.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -Condition.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### abortByTimeOut - -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------- | -| `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[Condition](Condition.md).[abortByTimeOut](Condition.md#abortbytimeout) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) - ---- - -### call - -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> - -#### Type parameters - -| Name | -| :--- | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | - -#### Returns - -`Promise`<`T`\> - -#### Inherited from - -[Condition](Condition.md).[call](Condition.md#call) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) - ---- - -### fulfill - -▸ `Abstract` **fulfill**(`agreementId`, `...args`): `any` - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...args` | `any`[] | - -#### Returns - -`any` - -#### Inherited from - -[Condition](Condition.md).[fulfill](Condition.md#fulfill) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L61) - ---- - -### fulfillInstance - -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :----------------- | :------------------------------------------------------------------ | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\> | `undefined` | -| `additionalParams` | `Extra` | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[Condition](Condition.md).[fulfillInstance](Condition.md#fulfillinstance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) - ---- - -### fulfillPlain - -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :------------ | :-------------------------------------------------------- | :------------ | -| `agreementId` | `string` | `undefined` | -| `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[Condition](Condition.md).[fulfillPlain](Condition.md#fulfillplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) - ---- - -### fulfillWithNode - -▸ **fulfillWithNode**(`_cond`, `_additionalParams`, `_from?`, `_txParams?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | -| :------------------ | :------------------------------------------------------------------ | -| `_cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\> | -| `_additionalParams` | `Extra` | -| `_from?` | [`Account`](Account.md) | -| `_txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`void`\> - -#### Overrides - -[Condition](Condition.md).[fulfillWithNode](Condition.md#fulfillwithnode) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:217](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L217) - ---- - -### generateId - -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[Condition](Condition.md).[generateId](Condition.md#generateid) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) - ---- - -### generateIdHash - -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...values` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[Condition](Condition.md).[generateIdHash](Condition.md#generateidhash) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) - ---- - -### generateIdWithSeed - -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<[`string`, `string`]\> - -#### Inherited from - -[Condition](Condition.md).[generateIdWithSeed](Condition.md#generateidwithseed) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) - ---- - -### getConditionFulfilledEvent - -▸ **getConditionFulfilledEvent**(`agreementId`): [`EventResult`](../code-reference.md#eventresult) - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | - -#### Returns - -[`EventResult`](../code-reference.md#eventresult) - -#### Inherited from - -[Condition](Condition.md).[getConditionFulfilledEvent](Condition.md#getconditionfulfilledevent) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) - ---- - -### getFromAddress - -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `from?` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[Condition](Condition.md).[getFromAddress](Condition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[Condition](Condition.md).[getInputsOfMethod](Condition.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[Condition](Condition.md).[getSignatureOfMethod](Condition.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) - ---- - -### hashValues - -▸ **hashValues**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[Condition](Condition.md).[hashValues](Condition.md#hashvalues) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) - ---- - -### hashValuesPlain - -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[Condition](Condition.md).[hashValuesPlain](Condition.md#hashvaluesplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) - ---- - -### init - -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[Condition](Condition.md).[init](Condition.md#init) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) - ---- - -### instance - -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\>\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\> | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\>\> - -#### Inherited from - -[Condition](Condition.md).[instance](Condition.md#instance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) - ---- - -### instanceFromDDO - -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\>\> - -#### Parameters - -| Name | Type | -| :------------ | :-------------------------------------------------------------------- | -| `agreementId` | `string` | -| `ctx` | `Ctx` | -| `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\>\> - -#### Inherited from - -[Condition](Condition.md).[instanceFromDDO](Condition.md#instancefromddo) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) - ---- - -### params - -▸ **params**(`...args`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\> - -#### Inherited from - -[Condition](Condition.md).[params](Condition.md#params) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L122) - ---- - -### paramsFromDDO - -▸ `Abstract` **paramsFromDDO**(`ctx`, `...args`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\>\> - -#### Parameters - -| Name | Type | -| :-------- | :-------------------------------------------------------------------- | -| `ctx` | `Ctx` | -| `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | - -#### Returns - -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\>\> - -#### Inherited from - -[Condition](Condition.md).[paramsFromDDO](Condition.md#paramsfromddo) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:137](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L137) - ---- - -### send - -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[Condition](Condition.md).[send](Condition.md#send) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) - ---- - -### sendFrom - -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[Condition](Condition.md).[sendFrom](Condition.md#sendfrom) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[Condition](Condition.md).[setInstanceConfig](Condition.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### getInstance - -▸ `Static` **getInstance**<`Ctx`, `Extra`\>(`config`, `conditionName`, `conditionsClass`, `optional?`): `Promise`<`any`\> - -#### Type parameters - -| Name | Type | -| :------ | :-------------------------------------------------------------- | -| `Ctx` | extends [`ConditionContext`](../interfaces/ConditionContext.md) | -| `Extra` | `Extra` | - -#### Parameters - -| Name | Type | Default value | -| :---------------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `conditionName` | `string` | `undefined` | -| `conditionsClass` | `any` | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`any`\> - -#### Inherited from - -[Condition](Condition.md).[getInstance](Condition.md#getinstance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:111](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L111) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[Condition](Condition.md).[setInstanceConfig](Condition.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/ContractBase.md b/docs/api-reference/classes/ContractBase.md index 5d720adc6..62576d0e1 100644 --- a/docs/api-reference/classes/ContractBase.md +++ b/docs/api-reference/classes/ContractBase.md @@ -8,20 +8,12 @@ ↳ **`ContractBase`** - ↳↳ [`ConditionSmall`](ConditionSmall.md) - ↳↳ [`AgreementStoreManager`](AgreementStoreManager.md) - ↳↳ [`ConditionStoreManager`](ConditionStoreManager.md) - - ↳↳ [`TemplateStoreManager`](TemplateStoreManager.md) - - ↳↳ [`RewardsDistributor`](RewardsDistributor.md) - - ↳↳ [`RoyaltyScheme`](RoyaltyScheme.md) - ↳↳ [`AgreementTemplate`](AgreementTemplate.md) + ↳↳ [`ConditionStoreManager`](ConditionStoreManager.md) + ↳↳ [`DIDRegistry`](DIDRegistry.md) ↳↳ [`Dispenser`](Dispenser.md) @@ -30,6 +22,12 @@ ↳↳ [`NFTContractsBase`](NFTContractsBase.md) + ↳↳ [`RewardsDistributor`](RewardsDistributor.md) + + ↳↳ [`RoyaltyScheme`](RoyaltyScheme.md) + + ↳↳ [`TemplateStoreManager`](TemplateStoreManager.md) + ↳↳ [`Token`](Token.md) ## Table of contents @@ -50,28 +48,28 @@ - [artifactsFolder](ContractBase.md#artifactsfolder) - [circuitsFolder](ContractBase.md#circuitsfolder) +- [client](ContractBase.md#client) - [config](ContractBase.md#config) - [instanceConfig](ContractBase.md#instanceconfig) - [instantiableConfig](ContractBase.md#instantiableconfig) - [logger](ContractBase.md#logger) - [nevermined](ContractBase.md#nevermined) -- [web3](ContractBase.md#web3) +- [publicClient](ContractBase.md#publicclient) +- [walletClient](ContractBase.md#walletclient) ### Methods - [call](ContractBase.md#call) -- [estimateGas](ContractBase.md#estimategas) - [getFromAddress](ContractBase.md#getfromaddress) -- [getInputsOfMethod](ContractBase.md#getinputsofmethod) -- [getSignatureOfMethod](ContractBase.md#getsignatureofmethod) +- [getTransactionLogs](ContractBase.md#gettransactionlogs) - [init](ContractBase.md#init) -- [internalSend](ContractBase.md#internalsend) +- [internalSendSessionKey](ContractBase.md#internalsendsessionkey) - [internalSendZeroDev](ContractBase.md#internalsendzerodev) -- [searchMethod](ContractBase.md#searchmethod) -- [searchMethodInputs](ContractBase.md#searchmethodinputs) +- [localAccountSend](ContractBase.md#localaccountsend) - [send](ContractBase.md#send) - [sendFrom](ContractBase.md#sendfrom) - [setInstanceConfig](ContractBase.md#setinstanceconfig) +- [someLog](ContractBase.md#somelog) - [getInstance](ContractBase.md#getinstance) - [setInstanceConfig](ContractBase.md#setinstanceconfig-1) @@ -79,7 +77,7 @@ ### constructor -• **new ContractBase**(`contractName`) +• **new ContractBase**(`contractName`): [`ContractBase`](ContractBase.md) #### Parameters @@ -87,33 +85,37 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`ContractBase`](ContractBase.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -123,17 +125,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -143,17 +145,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -161,17 +163,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -179,13 +181,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -197,13 +217,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -215,17 +235,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -233,13 +253,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -251,13 +271,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -269,84 +289,174 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -Instantiable.web3 +Instantiable.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) -## Methods +--- -### call +### walletClient -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +• `get` **walletClient**(): `Object` -#### Type parameters +#### Returns -| Name | -| :--- | -| `T` | +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | -#### Parameters +#### Inherited from -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +Instantiable.walletClient -#### Returns +#### Defined in -`Promise`<`T`\> +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) -#### Defined in +## Methods -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +### call ---- +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> -### estimateGas +#### Type parameters -▸ `Private` **estimateGas**(`contract`, `methodSignature`, `args`, `from`, `value`, `gasMultiplier?`): `Promise`<`bigint`\> +| Name | +| :--- | +| `T` | #### Parameters -| Name | Type | -| :---------------- | :------------- | -| `contract` | `BaseContract` | -| `methodSignature` | `string` | -| `args` | `any`[] | -| `from` | `string` | -| `value` | `string` | -| `gasMultiplier?` | `number` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`bigint`\> +`Promise`\<`T`\> #### Defined in -[src/keeper/contracts/ContractBase.ts:359](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L359) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -356,241 +466,222 @@ Instantiable.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getInputsOfMethod +### getTransactionLogs -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -readonly `ParamType`[] +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- -### internalSend +### internalSendSessionKey -▸ `Private` **internalSend**(`name`, `from`, `args`, `txparams`, `contract`, `progress`): `Promise`<`ContractTransactionReceipt`\> +▸ **internalSendSessionKey**(`name`, `from`, `args`, `txparams`, `progress`): `Promise`\<\{ `actualGasCost`: `bigint` ; `actualGasUsed`: `bigint` ; `entryPoint`: \`0x$\{string}\` ; `logs`: \{ `address`: \`0x$\{string}\` ; `blockHash`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `data`: \`0x$\{string}\` ; `logIndex`: `bigint` ; `topics`: \`0x$\{string}\`[] ; `transactionHash`: \`0x$\{string}\` ; `transactionIndex`: `bigint` }[] ; `nonce`: `bigint` ; `paymaster?`: \`0x$\{string}\` ; `reason?`: `string` ; `receipt`: \{ `blockHash`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `contractAddress`: `null` \| \`0x$\{string}\` ; `cumulativeGasUsed`: `bigint` ; `effectiveGasPrice`: `bigint` ; `from`: \`0x$\{string}\` ; `gasUsed`: `bigint` ; `logsBloom`: \`0x$\{string}\` ; `status`: `TStatus` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionHash`: \`0x$\{string}\` ; `transactionIndex`: `bigint` } ; `sender`: \`0x$\{string}\` ; `success`: `boolean` ; `userOpHash`: \`0x$\{string}\` }\> #### Parameters -| Name | Type | -| :--------- | :------------------------ | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `txparams` | `any` | -| `contract` | `BaseContract` | -| `progress` | (`data`: `any`) => `void` | +| Name | Type | +| :--------- | :--------------------------------------- | +| `name` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `txparams` | `any` | +| `progress` | `undefined` \| (`data`: `any`) => `void` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<\{ `actualGasCost`: `bigint` ; `actualGasUsed`: `bigint` ; `entryPoint`: \`0x$\{string}\` ; `logs`: \{ `address`: \`0x$\{string}\` ; `blockHash`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `data`: \`0x$\{string}\` ; `logIndex`: `bigint` ; `topics`: \`0x$\{string}\`[] ; `transactionHash`: \`0x$\{string}\` ; `transactionIndex`: `bigint` }[] ; `nonce`: `bigint` ; `paymaster?`: \`0x$\{string}\` ; `reason?`: `string` ; `receipt`: \{ `blockHash`: \`0x$\{string}\` ; `blockNumber`: `bigint` ; `contractAddress`: `null` \| \`0x$\{string}\` ; `cumulativeGasUsed`: `bigint` ; `effectiveGasPrice`: `bigint` ; `from`: \`0x$\{string}\` ; `gasUsed`: `bigint` ; `logsBloom`: \`0x$\{string}\` ; `status`: `TStatus` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionHash`: \`0x$\{string}\` ; `transactionIndex`: `bigint` } ; `sender`: \`0x$\{string}\` ; `success`: `boolean` ; `userOpHash`: \`0x$\{string}\` }\> #### Defined in -[src/keeper/contracts/ContractBase.ts:102](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L102) +[src/keeper/contracts/ContractBase.ts:165](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L165) --- ### internalSendZeroDev -▸ `Private` **internalSendZeroDev**(`name`, `from`, `args`, `txparams`, `contract`, `progress`): `Promise`<`ContractTransactionReceipt`\> +▸ **internalSendZeroDev**(`name`, `from`, `args`, `txparams`, `progress`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :--------- | :------------------------ | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `txparams` | `any` | -| `contract` | `BaseContract` | -| `progress` | (`data`: `any`) => `void` | +| Name | Type | +| :--------- | :--------------------------------------- | +| `name` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `txparams` | `any` | +| `progress` | `undefined` \| (`data`: `any`) => `void` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/ContractBase.ts:168](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L168) +[src/keeper/contracts/ContractBase.ts:237](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L237) --- -### searchMethod +### localAccountSend -▸ `Private` **searchMethod**(`methodName`, `args?`): `Fragment` +▸ **localAccountSend**(`name`, `from`, `args`, `txparams`, `progress`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :--------- | :--------------------------------------- | +| `name` | `string` | +| `from` | \`0x$\{string}\` \| `Account` | +| `args` | `any`[] | +| `txparams` | `any` | +| `progress` | `undefined` \| (`data`: `any`) => `void` | #### Returns -`Fragment` +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/ContractBase.ts:339](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L339) +[src/keeper/contracts/ContractBase.ts:302](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L302) --- -### searchMethodInputs +### send -▸ `Private` **searchMethodInputs**(`methodName`, `args?`): { `name`: `string` = input.name; `value`: `any` }[] +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -{ `name`: `string` = input.name; `value`: `any` }[] +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/ContractBase.ts:350](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L350) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- -### send +### sendFrom -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- -### sendFrom +### setInstanceConfig -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **setInstanceConfig**(`config`): `void` #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------- | :---------------------------------------------------------- | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`void` + +#### Inherited from + +[Instantiable](Instantiable.md).[setInstanceConfig](Instantiable.md#setinstanceconfig) #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- -### setInstanceConfig +### someLog -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **someLog**(`logs`): `undefined` #### Parameters -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | #### Returns -`void` - -#### Inherited from - -[Instantiable](Instantiable.md).[setInstanceConfig](Instantiable.md#setinstanceconfig) +`undefined` #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -608,13 +699,13 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -639,4 +730,4 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/ContractEvent.md b/docs/api-reference/classes/ContractEvent.md index 50e98e638..af74f6f2b 100644 --- a/docs/api-reference/classes/ContractEvent.md +++ b/docs/api-reference/classes/ContractEvent.md @@ -2,6 +2,8 @@ # Class: ContractEvent +Class to handle Smart Contract events directly connected to a blockchain node + ## Hierarchy - [`NeverminedEvent`](NeverminedEvent.md) @@ -23,12 +25,14 @@ - [artifactsFolder](ContractEvent.md#artifactsfolder) - [circuitsFolder](ContractEvent.md#circuitsfolder) +- [client](ContractEvent.md#client) - [config](ContractEvent.md#config) - [instanceConfig](ContractEvent.md#instanceconfig) - [instantiableConfig](ContractEvent.md#instantiableconfig) - [logger](ContractEvent.md#logger) - [nevermined](ContractEvent.md#nevermined) -- [web3](ContractEvent.md#web3) +- [publicClient](ContractEvent.md#publicclient) +- [walletClient](ContractEvent.md#walletclient) ### Methods @@ -47,14 +51,22 @@ ### constructor -• `Protected` **new ContractEvent**(`contract`, `eventEmitter`) +• **new ContractEvent**(`contract`, `eventEmitter`): [`ContractEvent`](ContractEvent.md) + +Initializes the NeverminedEvent instance #### Parameters -| Name | Type | -| :------------- | :---------------------------------------------- | -| `contract` | [`ContractBase`](ContractBase.md) | -| `eventEmitter` | [`EventEmitter`](../interfaces/EventEmitter.md) | +| Name | Type | Description | +| :------------- | :---------------------------------------------- | :---------------------------- | +| `contract` | [`ContractBase`](ContractBase.md) | contract instance | +| `eventEmitter` | [`EventEmitter`](../interfaces/EventEmitter.md) | events emitter implementation | + +#### Returns + +[`ContractEvent`](ContractEvent.md) + +the NeverminedEvent instance #### Inherited from @@ -62,13 +74,13 @@ #### Defined in -[src/events/NeverminedEvent.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L34) +[src/events/NeverminedEvent.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L26) ## Properties ### contract -• `Protected` **contract**: [`ContractBase`](ContractBase.md) = `null` +• `Protected` **contract**: [`ContractBase`](ContractBase.md) #### Inherited from @@ -76,7 +88,7 @@ #### Defined in -[src/events/NeverminedEvent.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L29) +[src/events/NeverminedEvent.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L15) --- @@ -90,17 +102,17 @@ #### Defined in -[src/events/NeverminedEvent.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L28) +[src/events/NeverminedEvent.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L14) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -108,17 +120,17 @@ NeverminedEvent.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -126,13 +138,31 @@ NeverminedEvent.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +NeverminedEvent.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -144,13 +174,13 @@ NeverminedEvent.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -162,17 +192,17 @@ NeverminedEvent.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -180,13 +210,13 @@ NeverminedEvent.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -198,13 +228,13 @@ NeverminedEvent.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -216,76 +246,203 @@ NeverminedEvent.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +NeverminedEvent.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -NeverminedEvent.web3 +NeverminedEvent.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### eventExists -▸ `Private` **eventExists**(`eventName`): `boolean` +▸ **eventExists**(`eventName`): `boolean` + +It checks if an event exists on the contract definition #### Parameters -| Name | Type | -| :---------- | :------- | -| `eventName` | `string` | +| Name | Type | Description | +| :---------- | :------- | :------------- | +| `eventName` | `string` | the event name | #### Returns `boolean` +true if the event exists, false otherwise + #### Defined in -[src/events/ContractEvent.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/ContractEvent.ts#L57) +[src/events/ContractEvent.ts:111](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/ContractEvent.ts#L111) --- ### filterToArgs -▸ `Private` **filterToArgs**(`eventName`, `filter`): `any`[] +▸ **filterToArgs**(`eventName`, `filter`): `any`[] + +It returns the indexed parameters of an event #### Parameters -| Name | Type | -| :---------- | :---------------------------------- | -| `eventName` | `string` | -| `filter` | [`Filter`](../interfaces/Filter.md) | +| Name | Type | Description | +| :---------- | :------------------------------------------------------------ | :-------------------- | +| `eventName` | `string` | the name of the event | +| `filter` | [`FilterContractEvent`](../interfaces/FilterContractEvent.md) | tge event filter | #### Returns `any`[] +the array of indexed parameters + #### Defined in -[src/events/ContractEvent.ts:61](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/ContractEvent.ts#L61) +[src/events/ContractEvent.ts:126](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/ContractEvent.ts#L126) --- ### getBlockNumber -▸ **getBlockNumber**(): `Promise`<`number`\> +▸ **getBlockNumber**(): `Promise`\<`bigint`\> + +It returns the current block chain block number #### Returns -`Promise`<`number`\> +`Promise`\<`bigint`\> + +the block number #### Overrides @@ -293,7 +450,7 @@ NeverminedEvent.web3 #### Defined in -[src/events/ContractEvent.ts:53](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/ContractEvent.ts#L53) +[src/events/ContractEvent.ts:102](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/ContractEvent.ts#L102) --- @@ -301,23 +458,27 @@ NeverminedEvent.web3 ▸ **getEventData**(`options`): [`EventResult`](../code-reference.md#eventresult) +It returns the events matching a given filter + #### Parameters -| Name | Type | -| :-------- | :---------------------------------------------- | -| `options` | [`EventOptions`](../interfaces/EventOptions.md) | +| Name | Type | Description | +| :-------- | :---------------------------------------------- | :------------------- | +| `options` | [`EventOptions`](../interfaces/EventOptions.md) | event filter options | #### Returns [`EventResult`](../code-reference.md#eventresult) +[EventResult](../code-reference.md#eventresult) + #### Overrides [NeverminedEvent](NeverminedEvent.md).[getEventData](NeverminedEvent.md#geteventdata) #### Defined in -[src/events/ContractEvent.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/ContractEvent.ts#L23) +[src/events/ContractEvent.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/ContractEvent.ts#L41) --- @@ -325,40 +486,50 @@ NeverminedEvent.web3 ▸ **getPastEvents**(`options`): [`EventResult`](../code-reference.md#eventresult) +It returns the events matching a given filter depending on the blockchain network connected +This necessary for some networks and/or web3 providers which limit the number of blocks to query + #### Parameters -| Name | Type | -| :-------- | :---------------------------------------------- | -| `options` | [`EventOptions`](../interfaces/EventOptions.md) | +| Name | Type | Description | +| :-------- | :---------------------------------------------- | :------------------- | +| `options` | [`EventOptions`](../interfaces/EventOptions.md) | event filter options | #### Returns [`EventResult`](../code-reference.md#eventresult) +[EventResult](../code-reference.md#eventresult) + #### Overrides [NeverminedEvent](NeverminedEvent.md).[getPastEvents](NeverminedEvent.md#getpastevents) #### Defined in -[src/events/ContractEvent.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/ContractEvent.ts#L35) +[src/events/ContractEvent.ts:72](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/ContractEvent.ts#L72) --- ### once -▸ **once**(`callback?`, `options?`): `Promise`<[`EventResult`](../code-reference.md#eventresult)\> +▸ **once**(`callback`, `options`, `timeout?`): `Promise`\<[`EventResult`](../code-reference.md#eventresult)\> + +Subscribes to a contract event and waits for the first event to happen #### Parameters -| Name | Type | -| :---------- | :------------------------------------------------------------------------ | -| `callback?` | (`events`: [`EventResult`](../code-reference.md#eventresult)[]) => `void` | -| `options?` | [`EventOptions`](../interfaces/EventOptions.md) | +| Name | Type | Default value | Description | +| :--------- | :------------------------------------------------------------------------ | :------------ | :------------------------------------------- | +| `callback` | (`events`: [`EventResult`](../code-reference.md#eventresult)[]) => `void` | `undefined` | function called when the event is triggered | +| `options` | [`EventOptions`](../interfaces/EventOptions.md) | `undefined` | event filter options | +| `timeout` | `number` | `15_000` | maximum time to wait for the event to happen | #### Returns -`Promise`<[`EventResult`](../code-reference.md#eventresult)\> +`Promise`\<[`EventResult`](../code-reference.md#eventresult)\> + +Promise with the event data #### Inherited from @@ -366,13 +537,13 @@ NeverminedEvent.web3 #### Defined in -[src/events/NeverminedEvent.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L54) +[src/events/NeverminedEvent.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L60) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -390,7 +561,7 @@ NeverminedEvent.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- @@ -398,57 +569,65 @@ NeverminedEvent.web3 ▸ **subscribe**(`callback`, `options`): [`ContractEventSubscription`](../interfaces/ContractEventSubscription.md) +Subscribes to a contract event + #### Parameters -| Name | Type | -| :--------- | :------------------------------------------------------------------------ | -| `callback` | (`events`: [`EventResult`](../code-reference.md#eventresult)[]) => `void` | -| `options` | [`EventOptions`](../interfaces/EventOptions.md) | +| Name | Type | Description | +| :--------- | :------------------------------------------------------------------------ | :------------------------------------------ | +| `callback` | (`events`: [`EventResult`](../code-reference.md#eventresult)[]) => `void` | function called when the event is triggered | +| `options` | [`EventOptions`](../interfaces/EventOptions.md) | event filter options | #### Returns [`ContractEventSubscription`](../interfaces/ContractEventSubscription.md) +[ContractEventSubscription](../interfaces/ContractEventSubscription.md) + #### Inherited from [NeverminedEvent](NeverminedEvent.md).[subscribe](NeverminedEvent.md#subscribe) #### Defined in -[src/events/NeverminedEvent.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L40) +[src/events/NeverminedEvent.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L38) --- ### getInstance -▸ `Static` **getInstance**(`contract`, `eventEmitter`, `nevermined`, `web3`): [`ContractEvent`](ContractEvent.md) +▸ **getInstance**(`contract`, `eventEmitter`, `nevermined`, `client`): [`ContractEvent`](ContractEvent.md) + +It gets a new instance of ContractEvent #### Parameters -| Name | Type | -| :------------- | :---------------------------------------------- | -| `contract` | [`ContractBase`](ContractBase.md) | -| `eventEmitter` | [`EventEmitter`](../interfaces/EventEmitter.md) | -| `nevermined` | [`Nevermined`](Nevermined.md) | -| `web3` | `JsonRpcProvider` \| `BrowserProvider` | +| Name | Type | Description | +| :------------- | :---------------------------------------------- | :---------------------------- | +| `contract` | [`ContractBase`](ContractBase.md) | contract instance | +| `eventEmitter` | [`EventEmitter`](../interfaces/EventEmitter.md) | events emitter implementation | +| `nevermined` | [`Nevermined`](Nevermined.md) | the Nevermined instance | +| `client` | [`Web3Clients`](../interfaces/Web3Clients.md) | the blockchain client | #### Returns [`ContractEvent`](ContractEvent.md) +the ContractEvent instance + #### Overrides [NeverminedEvent](NeverminedEvent.md).[getInstance](NeverminedEvent.md#getinstance) #### Defined in -[src/events/ContractEvent.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/ContractEvent.ts#L8) +[src/events/ContractEvent.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/ContractEvent.ts#L21) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -473,4 +652,4 @@ NeverminedEvent.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/ContractHandler.md b/docs/api-reference/classes/ContractHandler.md index 7dfd7cded..ff1f04d9a 100644 --- a/docs/api-reference/classes/ContractHandler.md +++ b/docs/api-reference/classes/ContractHandler.md @@ -17,35 +17,36 @@ ### Properties - [contracts](ContractHandler.md#contracts) +- [versions](ContractHandler.md#versions) ### Accessors - [artifactsFolder](ContractHandler.md#artifactsfolder) - [circuitsFolder](ContractHandler.md#circuitsfolder) +- [client](ContractHandler.md#client) - [config](ContractHandler.md#config) - [instanceConfig](ContractHandler.md#instanceconfig) - [instantiableConfig](ContractHandler.md#instantiableconfig) - [logger](ContractHandler.md#logger) - [nevermined](ContractHandler.md#nevermined) -- [web3](ContractHandler.md#web3) +- [publicClient](ContractHandler.md#publicclient) +- [walletClient](ContractHandler.md#walletclient) ### Methods - [checkExists](ContractHandler.md#checkexists) - [deployAbi](ContractHandler.md#deployabi) -- [get](ContractHandler.md#get) -- [getFeeData](ContractHandler.md#getfeedata) -- [getFeeDataArbitrum](ContractHandler.md#getfeedataarbitrum) -- [getFeeDataPolygon](ContractHandler.md#getfeedatapolygon) -- [getVersion](ContractHandler.md#getversion) -- [load](ContractHandler.md#load) +- [getContractArtifact](ContractHandler.md#getcontractartifact) +- [getContractFromArtifacts](ContractHandler.md#getcontractfromartifacts) +- [getVersionFromArtifact](ContractHandler.md#getversionfromartifact) +- [loadContractFromAbi](ContractHandler.md#loadcontractfromabi) - [setInstanceConfig](ContractHandler.md#setinstanceconfig) - [fetchJson](ContractHandler.md#fetchjson) -- [getABI](ContractHandler.md#getabi) +- [getABIArtifact](ContractHandler.md#getabiartifact) - [getContract](ContractHandler.md#getcontract) - [getHash](ContractHandler.md#gethash) - [getInstance](ContractHandler.md#getinstance) -- [getSignatureOfMethod](ContractHandler.md#getsignatureofmethod) +- [getVersion](ContractHandler.md#getversion) - [hasContract](ContractHandler.md#hascontract) - [setContract](ContractHandler.md#setcontract) - [setInstanceConfig](ContractHandler.md#setinstanceconfig-1) @@ -54,7 +55,7 @@ ### constructor -• **new ContractHandler**(`config`) +• **new ContractHandler**(`config`): [`ContractHandler`](ContractHandler.md) #### Parameters @@ -62,33 +63,47 @@ | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`ContractHandler`](ContractHandler.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/keeper/ContractHandler.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L47) +[src/keeper/ContractHandler.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L51) ## Properties ### contracts -▪ `Static` `Private` **contracts**: `Map`<`string`, `BaseContract`\> +▪ `Static` `Private` **contracts**: `Map`\<`string`, `any`\> + +#### Defined in + +[src/keeper/ContractHandler.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L15) + +--- + +### versions + +▪ `Static` `Private` **versions**: `Map`\<`string`, `any`\> #### Defined in -[src/keeper/ContractHandler.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L38) +[src/keeper/ContractHandler.ts:17](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L17) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -96,17 +111,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -114,13 +129,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -132,13 +165,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -150,17 +183,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -168,13 +201,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -186,13 +219,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -204,159 +237,236 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -Instantiable.web3 +Instantiable.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### checkExists - -▸ **checkExists**(`address`): `Promise`<`boolean`\> +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) -Returns true of contract exists else it throws. +--- -#### Parameters +### walletClient -| Name | Type | -| :-------- | :------- | -| `address` | `string` | +• `get` **walletClient**(): `Object` #### Returns -`Promise`<`boolean`\> +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | -true if the contract exists. +#### Inherited from + +Instantiable.walletClient #### Defined in -[src/keeper/ContractHandler.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L208) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ---- +## Methods -### deployAbi +### checkExists -▸ **deployAbi**(`artifact`, `from`, `args?`): `Promise`<`BaseContract`\> +▸ **checkExists**(`address`): `Promise`\<`boolean`\> #### Parameters -| Name | Type | Default value | -| :------------------ | :---------------------- | :------------ | -| `artifact` | `Object` | `undefined` | -| `artifact.abi` | `InterfaceAbi` | `undefined` | -| `artifact.bytecode` | `string` | `undefined` | -| `artifact.name?` | `string` | `undefined` | -| `from` | [`Account`](Account.md) | `undefined` | -| `args` | `string`[] | `[]` | +| Name | Type | +| :-------- | :------- | +| `address` | `string` | #### Returns -`Promise`<`BaseContract`\> +`Promise`\<`boolean`\> #### Defined in -[src/keeper/ContractHandler.ts:116](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L116) +[src/keeper/ContractHandler.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L75) --- -### get +### deployAbi -▸ **get**(`what`, `optional?`, `artifactsFolder`, `address?`): `Promise`<`BaseContract`\> +▸ **deployAbi**(`artifact`, `from`, `args?`): `Promise`\<\{ `abi`: `Abi` ; `address`: \`0x$\{string}\` ; `createEventFilter`: {} ; `estimateGas`: {} & {} ; `getEvents`: {} ; `read`: {} ; `simulate`: {} ; `watchEvent`: {} ; `write`: {} }\> #### Parameters -| Name | Type | Default value | -| :---------------- | :-------- | :------------ | -| `what` | `string` | `undefined` | -| `optional` | `boolean` | `false` | -| `artifactsFolder` | `string` | `undefined` | -| `address?` | `string` | `undefined` | +| Name | Type | Default value | +| :------------------ | :---------------------------- | :------------ | +| `artifact` | `Object` | `undefined` | +| `artifact.abi` | `Abi` | `undefined` | +| `artifact.bytecode` | \`0x$\{string}\` | `undefined` | +| `artifact.name?` | `string` | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `args` | `string`[] | `[]` | #### Returns -`Promise`<`BaseContract`\> +`Promise`\<\{ `abi`: `Abi` ; `address`: \`0x$\{string}\` ; `createEventFilter`: {} ; `estimateGas`: {} & {} ; `getEvents`: {} ; `read`: {} ; `simulate`: {} ; `watchEvent`: {} ; `write`: {} }\> #### Defined in -[src/keeper/ContractHandler.ts:52](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L52) +[src/keeper/ContractHandler.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L79) --- -### getFeeData +### getContractArtifact -▸ **getFeeData**(`gasPrice?`, `maxFeePerGas?`, `maxPriorityFeePerGas?`): `Promise`<{ `maxFeePerGas`: `bigint` = maxFeePerGas; `maxPriorityFeePerGas`: `bigint` = maxPriorityFeePerGas; `type`: `number` = 2 } \| { `gasPrice`: `bigint` = feeData.gasPrice }\> +▸ **getContractArtifact**(`contractName`, `networkName`, `artifactsFolder`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :---------------------- | :------- | -| `gasPrice?` | `bigint` | -| `maxFeePerGas?` | `bigint` | -| `maxPriorityFeePerGas?` | `bigint` | - -#### Returns - -`Promise`<{ `maxFeePerGas`: `bigint` = maxFeePerGas; `maxPriorityFeePerGas`: `bigint` = maxPriorityFeePerGas; `type`: `number` = 2 } \| { `gasPrice`: `bigint` = feeData.gasPrice }\> - -#### Defined in - -[src/keeper/ContractHandler.ts:258](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L258) - ---- - -### getFeeDataArbitrum - -▸ `Private` **getFeeDataArbitrum**(): `Promise`<{ `gasPrice`: `bigint` = feeData.gasPrice }\> +| Name | Type | +| :---------------- | :------- | +| `contractName` | `string` | +| `networkName` | `string` | +| `artifactsFolder` | `string` | #### Returns -`Promise`<{ `gasPrice`: `bigint` = feeData.gasPrice }\> +`Promise`\<`any`\> #### Defined in -[src/keeper/ContractHandler.ts:322](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L322) +[src/keeper/ContractHandler.ts:87](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L87) --- -### getFeeDataPolygon +### getContractFromArtifacts -▸ `Private` **getFeeDataPolygon**(`networkId`): `Promise`<{ `maxFeePerGas`: `bigint` = maxFeePerGas; `maxPriorityFeePerGas`: `bigint` = maxPriorityFeePerGas; `type`: `number` = 2 }\> +▸ **getContractFromArtifacts**(`what`, `optional?`, `artifactsFolder`, `address?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :---------- | :------- | -| `networkId` | `number` | +| Name | Type | Default value | +| :---------------- | :-------- | :------------ | +| `what` | `string` | `undefined` | +| `optional` | `boolean` | `false` | +| `artifactsFolder` | `string` | `undefined` | +| `address?` | `string` | `undefined` | #### Returns -`Promise`<{ `maxFeePerGas`: `bigint` = maxFeePerGas; `maxPriorityFeePerGas`: `bigint` = maxPriorityFeePerGas; `type`: `number` = 2 }\> +`Promise`\<`any`\> #### Defined in -[src/keeper/ContractHandler.ts:287](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L287) +[src/keeper/ContractHandler.ts:130](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L130) --- -### getVersion +### getVersionFromArtifact -▸ **getVersion**(`contractName`, `artifactsFolder`): `Promise`<`string`\> +▸ **getVersionFromArtifact**(`contractName`, `artifactsFolder`): `Promise`\<`string`\> #### Parameters @@ -367,17 +477,17 @@ true if the contract exists. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/ContractHandler.ts:100](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L100) +[src/keeper/ContractHandler.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L56) --- -### load +### loadContractFromAbi -▸ `Private` **load**(`what`, `where`, `networkId`, `artifactsFolder`, `address?`): `Promise`<`BaseContract`\> +▸ **loadContractFromAbi**(`what`, `where`, `networkId`, `artifactsFolder`, `address?`): `Promise`\<`any`\> #### Parameters @@ -391,17 +501,17 @@ true if the contract exists. #### Returns -`Promise`<`BaseContract`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/ContractHandler.ts:172](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L172) +[src/keeper/ContractHandler.ts:105](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L105) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -419,13 +529,13 @@ true if the contract exists. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### fetchJson -▸ `Static` **fetchJson**(`path`): `Promise`<`any`\> +▸ **fetchJson**(`path`): `Promise`\<`any`\> #### Parameters @@ -435,39 +545,39 @@ true if the contract exists. #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/ContractHandler.ts:239](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L239) +[src/keeper/ContractHandler.ts:181](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L181) --- -### getABI +### getABIArtifact -▸ `Static` **getABI**(`contractName`, `artifactsFolder?`, `networkName?`): `Promise`<`any`\> +▸ **getABIArtifact**(`contractName`, `artifactsFolder?`, `networkName?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :---------------- | :------- | :-------------- | -| `contractName` | `string` | `undefined` | -| `artifactsFolder` | `string` | `'./artifacts'` | -| `networkName?` | `string` | `undefined` | +| Name | Type | Default value | +| :---------------- | :------- | :--------------- | +| `contractName` | `string` | `undefined` | +| `artifactsFolder` | `string` | `'../artifacts'` | +| `networkName?` | `string` | `undefined` | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/ContractHandler.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L73) +[src/keeper/ContractHandler.ts:154](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L154) --- ### getContract -▸ `Static` `Protected` **getContract**(`what`, `networkId`, `address?`): `BaseContract` +▸ **getContract**(`what`, `networkId`, `address?`): `any` #### Parameters @@ -479,17 +589,17 @@ true if the contract exists. #### Returns -`BaseContract` +`any` #### Defined in -[src/keeper/ContractHandler.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L21) +[src/keeper/ContractHandler.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L19) --- ### getHash -▸ `Static` `Private` **getHash**(`what`, `networkId`, `address?`): `string` +▸ **getHash**(`what`, `networkId`, `address?`): `string` #### Parameters @@ -505,13 +615,13 @@ true if the contract exists. #### Defined in -[src/keeper/ContractHandler.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L43) +[src/keeper/ContractHandler.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L47) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -529,35 +639,35 @@ true if the contract exists. #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- -### getSignatureOfMethod +### getVersion -▸ `Static` **getSignatureOfMethod**(`baseContract`, `methodName`, `args`): `string` +▸ **getVersion**(`what`, `networkId`, `address?`): `any` #### Parameters -| Name | Type | -| :------------- | :------------- | -| `baseContract` | `BaseContract` | -| `methodName` | `string` | -| `args` | `any`[] | +| Name | Type | +| :---------- | :------- | +| `what` | `string` | +| `networkId` | `number` | +| `address?` | `string` | #### Returns -`string` +`any` #### Defined in -[src/keeper/ContractHandler.ts:224](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L224) +[src/keeper/ContractHandler.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L24) --- ### hasContract -▸ `Static` `Protected` **hasContract**(`what`, `networkId`, `address?`): `boolean` +▸ **hasContract**(`what`, `networkId`, `address?`): `boolean` #### Parameters @@ -573,22 +683,23 @@ true if the contract exists. #### Defined in -[src/keeper/ContractHandler.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L34) +[src/keeper/ContractHandler.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L41) --- ### setContract -▸ `Static` `Protected` **setContract**(`what`, `networkId`, `contractInstance`, `address?`): `void` +▸ **setContract**(`what`, `networkId`, `contractInstance`, `address?`, `version?`): `void` #### Parameters -| Name | Type | -| :----------------- | :------------- | -| `what` | `string` | -| `networkId` | `number` | -| `contractInstance` | `BaseContract` | -| `address?` | `string` | +| Name | Type | +| :----------------- | :------- | +| `what` | `string` | +| `networkId` | `number` | +| `contractInstance` | `any` | +| `address?` | `string` | +| `version?` | `string` | #### Returns @@ -596,13 +707,13 @@ true if the contract exists. #### Defined in -[src/keeper/ContractHandler.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/ContractHandler.ts#L25) +[src/keeper/ContractHandler.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/ContractHandler.ts#L29) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -627,4 +738,4 @@ true if the contract exists. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/CurveRoyalties.md b/docs/api-reference/classes/CurveRoyalties.md index bfe3cf699..7e1ffccde 100644 --- a/docs/api-reference/classes/CurveRoyalties.md +++ b/docs/api-reference/classes/CurveRoyalties.md @@ -26,25 +26,27 @@ - [artifactsFolder](CurveRoyalties.md#artifactsfolder) - [circuitsFolder](CurveRoyalties.md#circuitsfolder) +- [client](CurveRoyalties.md#client) - [config](CurveRoyalties.md#config) - [instanceConfig](CurveRoyalties.md#instanceconfig) - [instantiableConfig](CurveRoyalties.md#instantiableconfig) - [logger](CurveRoyalties.md#logger) - [nevermined](CurveRoyalties.md#nevermined) -- [web3](CurveRoyalties.md#web3) +- [publicClient](CurveRoyalties.md#publicclient) +- [walletClient](CurveRoyalties.md#walletclient) ### Methods - [call](CurveRoyalties.md#call) - [getFromAddress](CurveRoyalties.md#getfromaddress) -- [getInputsOfMethod](CurveRoyalties.md#getinputsofmethod) - [getRoyalty](CurveRoyalties.md#getroyalty) -- [getSignatureOfMethod](CurveRoyalties.md#getsignatureofmethod) +- [getTransactionLogs](CurveRoyalties.md#gettransactionlogs) - [init](CurveRoyalties.md#init) - [send](CurveRoyalties.md#send) - [sendFrom](CurveRoyalties.md#sendfrom) - [setInstanceConfig](CurveRoyalties.md#setinstanceconfig) - [setRoyalty](CurveRoyalties.md#setroyalty) +- [someLog](CurveRoyalties.md#somelog) - [getInstance](CurveRoyalties.md#getinstance) - [setInstanceConfig](CurveRoyalties.md#setinstanceconfig-1) @@ -52,7 +54,7 @@ ### constructor -• **new CurveRoyalties**(`contractName`) +• **new CurveRoyalties**(`contractName`): [`CurveRoyalties`](CurveRoyalties.md) #### Parameters @@ -60,19 +62,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`CurveRoyalties`](CurveRoyalties.md) + #### Inherited from [RoyaltyScheme](RoyaltyScheme.md).[constructor](RoyaltyScheme.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -80,13 +86,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -94,7 +100,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -108,13 +114,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -122,7 +128,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -136,17 +142,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -154,17 +160,17 @@ RoyaltyScheme.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -172,13 +178,31 @@ RoyaltyScheme.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +RoyaltyScheme.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -190,13 +214,13 @@ RoyaltyScheme.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -208,17 +232,17 @@ RoyaltyScheme.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -226,13 +250,13 @@ RoyaltyScheme.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -244,13 +268,13 @@ RoyaltyScheme.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -262,31 +286,146 @@ RoyaltyScheme.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -RoyaltyScheme.web3 +RoyaltyScheme.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +RoyaltyScheme.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -296,15 +435,15 @@ RoyaltyScheme.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -312,13 +451,13 @@ RoyaltyScheme.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -328,7 +467,7 @@ RoyaltyScheme.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -336,37 +475,13 @@ RoyaltyScheme.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[RoyaltyScheme](RoyaltyScheme.md).[getInputsOfMethod](RoyaltyScheme.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getRoyalty -▸ **getRoyalty**(`did`): `Promise`<`number`\> +▸ **getRoyalty**(`did`): `Promise`\<`number`\> #### Parameters @@ -376,7 +491,7 @@ readonly `ParamType`[] #### Returns -`Promise`<`number`\> +`Promise`\<`number`\> #### Inherited from @@ -384,49 +499,50 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L26) +[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L28) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[RoyaltyScheme](RoyaltyScheme.md).[getSignatureOfMethod](RoyaltyScheme.md#getsignatureofmethod) +[RoyaltyScheme](RoyaltyScheme.md).[getTransactionLogs](RoyaltyScheme.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -434,26 +550,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -461,26 +577,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -488,13 +604,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -512,13 +628,13 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### setRoyalty -▸ **setRoyalty**(`did`, `amount`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **setRoyalty**(`did`, `amount`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -526,12 +642,12 @@ readonly `ParamType`[] | :---------- | :---------------------------------------------- | | `did` | `string` | | `amount` | `number` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -539,13 +655,37 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L22) +[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L24) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[RoyaltyScheme](RoyaltyScheme.md).[someLog](RoyaltyScheme.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`CurveRoyalties`](CurveRoyalties.md)\> +▸ **getInstance**(`config`): `Promise`\<[`CurveRoyalties`](CurveRoyalties.md)\> #### Parameters @@ -555,7 +695,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`CurveRoyalties`](CurveRoyalties.md)\> +`Promise`\<[`CurveRoyalties`](CurveRoyalties.md)\> #### Overrides @@ -563,13 +703,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/royalties/CurveRoyalties.ts:5](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/royalties/CurveRoyalties.ts#L5) +[src/keeper/contracts/royalties/CurveRoyalties.ts:5](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/royalties/CurveRoyalties.ts#L5) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -594,4 +734,4 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/CustomToken.md b/docs/api-reference/classes/CustomToken.md index b2c8d3efb..64638357f 100644 --- a/docs/api-reference/classes/CustomToken.md +++ b/docs/api-reference/classes/CustomToken.md @@ -27,12 +27,14 @@ - [artifactsFolder](CustomToken.md#artifactsfolder) - [circuitsFolder](CustomToken.md#circuitsfolder) +- [client](CustomToken.md#client) - [config](CustomToken.md#config) - [instanceConfig](CustomToken.md#instanceconfig) - [instantiableConfig](CustomToken.md#instantiableconfig) - [logger](CustomToken.md#logger) - [nevermined](CustomToken.md#nevermined) -- [web3](CustomToken.md#web3) +- [publicClient](CustomToken.md#publicclient) +- [walletClient](CustomToken.md#walletclient) ### Methods @@ -42,13 +44,13 @@ - [call](CustomToken.md#call) - [decimals](CustomToken.md#decimals) - [getFromAddress](CustomToken.md#getfromaddress) -- [getInputsOfMethod](CustomToken.md#getinputsofmethod) -- [getSignatureOfMethod](CustomToken.md#getsignatureofmethod) +- [getTransactionLogs](CustomToken.md#gettransactionlogs) - [init](CustomToken.md#init) - [name](CustomToken.md#name) - [send](CustomToken.md#send) - [sendFrom](CustomToken.md#sendfrom) - [setInstanceConfig](CustomToken.md#setinstanceconfig) +- [someLog](CustomToken.md#somelog) - [strBalanceOf](CustomToken.md#strbalanceof) - [symbol](CustomToken.md#symbol) - [totalSupply](CustomToken.md#totalsupply) @@ -61,7 +63,7 @@ ### constructor -• **new CustomToken**(`contractName`) +• **new CustomToken**(`contractName`): [`CustomToken`](CustomToken.md) #### Parameters @@ -69,19 +71,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`CustomToken`](CustomToken.md) + #### Inherited from [Token](Token.md).[constructor](Token.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -89,13 +95,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -103,7 +109,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -117,13 +123,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -131,7 +137,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -145,7 +151,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) --- @@ -159,17 +165,17 @@ #### Defined in -[src/keeper/contracts/Token.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L7) +[src/keeper/contracts/Token.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L8) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -177,17 +183,17 @@ Token.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -195,13 +201,31 @@ Token.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Token.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -213,13 +237,13 @@ Token.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -231,17 +255,17 @@ Token.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -249,13 +273,13 @@ Token.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -267,13 +291,13 @@ Token.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -285,31 +309,146 @@ Token.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Token.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) -#### Inherited from +--- -Token.web3 +### walletClient -#### Defined in +• `get` **walletClient**(): `Object` + +#### Returns -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +Token.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### approve -▸ **approve**(`to`, `price`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **approve**(`to`, `price`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -317,12 +456,12 @@ Token.web3 | :---------- | :---------------------------------------------- | | `to` | `string` | | `price` | `bigint` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -330,13 +469,13 @@ Token.web3 #### Defined in -[src/keeper/contracts/Token.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L27) +[src/keeper/contracts/Token.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L28) --- ### balanceOf -▸ **balanceOf**(`address`): `Promise`<`bigint`\> +▸ **balanceOf**(`address`): `Promise`\<`bigint`\> #### Parameters @@ -346,7 +485,7 @@ Token.web3 #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> #### Inherited from @@ -354,13 +493,13 @@ Token.web3 #### Defined in -[src/keeper/contracts/Token.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L43) +[src/keeper/contracts/Token.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L44) --- ### balanceOfConverted -▸ **balanceOfConverted**(`address`): `Promise`<`bigint`\> +▸ **balanceOfConverted**(`address`): `Promise`\<`bigint`\> #### Parameters @@ -370,7 +509,7 @@ Token.web3 #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> #### Inherited from @@ -378,13 +517,13 @@ Token.web3 #### Defined in -[src/keeper/contracts/Token.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L35) +[src/keeper/contracts/Token.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L36) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -394,15 +533,15 @@ Token.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -410,17 +549,17 @@ Token.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### decimals -▸ **decimals**(): `Promise`<`number`\> +▸ **decimals**(): `Promise`\<`number`\> #### Returns -`Promise`<`number`\> +`Promise`\<`number`\> #### Inherited from @@ -428,13 +567,13 @@ Token.web3 #### Defined in -[src/keeper/contracts/Token.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L31) +[src/keeper/contracts/Token.ts:32](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L32) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -444,7 +583,7 @@ Token.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -452,73 +591,50 @@ Token.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getInputsOfMethod +### getTransactionLogs -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -readonly `ParamType`[] +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[Token](Token.md).[getInputsOfMethod](Token.md#getinputsofmethod) +[Token](Token.md).[getTransactionLogs](Token.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[Token](Token.md).[getSignatureOfMethod](Token.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -526,17 +642,17 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### name -▸ **name**(): `Promise`<`string`\> +▸ **name**(): `Promise`\<`string`\> #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -544,26 +660,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/Token.ts:51](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L51) +[src/keeper/contracts/Token.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L52) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -571,26 +687,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -598,13 +714,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -622,13 +738,37 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[Token](Token.md).[someLog](Token.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### strBalanceOf -▸ **strBalanceOf**(`address`): `Promise`<`string`\> +▸ **strBalanceOf**(`address`): `Promise`\<`string`\> #### Parameters @@ -638,7 +778,7 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -646,17 +786,17 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/Token.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L39) +[src/keeper/contracts/Token.ts:40](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L40) --- ### symbol -▸ **symbol**(): `Promise`<`string`\> +▸ **symbol**(): `Promise`\<`string`\> #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -664,17 +804,17 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/Token.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L47) +[src/keeper/contracts/Token.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L48) --- ### totalSupply -▸ **totalSupply**(): `Promise`<`bigint`\> +▸ **totalSupply**(): `Promise`\<`bigint`\> #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> #### Inherited from @@ -682,13 +822,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/Token.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L55) +[src/keeper/contracts/Token.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L56) --- ### transfer -▸ **transfer**(`to`, `amount`, `from`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **transfer**(`to`, `amount`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -696,12 +836,12 @@ readonly `ParamType`[] | :---------- | :---------------------------------------------- | | `to` | `string` | | `amount` | `bigint` | -| `from` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -709,13 +849,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/Token.ts:59](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L59) +[src/keeper/contracts/Token.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L60) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`Token`](Token.md)\> +▸ **getInstance**(`config`): `Promise`\<[`Token`](Token.md)\> #### Parameters @@ -725,7 +865,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`Token`](Token.md)\> +`Promise`\<[`Token`](Token.md)\> #### Inherited from @@ -733,13 +873,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/Token.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L21) +[src/keeper/contracts/Token.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L22) --- ### getInstanceByAddress -▸ `Static` **getInstanceByAddress**(`config`, `address`): `Promise`<[`CustomToken`](CustomToken.md)\> +▸ **getInstanceByAddress**(`config`, `address`): `Promise`\<[`CustomToken`](CustomToken.md)\> #### Parameters @@ -750,17 +890,17 @@ readonly `ParamType`[] #### Returns -`Promise`<[`CustomToken`](CustomToken.md)\> +`Promise`\<[`CustomToken`](CustomToken.md)\> #### Defined in -[src/keeper/contracts/CustomToken.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/CustomToken.ts#L7) +[src/keeper/contracts/CustomToken.ts:6](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/CustomToken.ts#L6) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -785,4 +925,4 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/DDO.md b/docs/api-reference/classes/DDO.md index 932d314e7..bcdabfb47 100644 --- a/docs/api-reference/classes/DDO.md +++ b/docs/api-reference/classes/DDO.md @@ -2,8 +2,8 @@ # Class: DDO -DID Descriptor Object. -Contains all the data related to an asset. +DID Descriptor Object (DDO). +Contains all the metadata related to an asset, including the description and the services available. ## Table of contents @@ -59,6 +59,7 @@ Contains all the data related to an asset. - [getDurationFromService](DDO.md#getdurationfromservice) - [getInstance](DDO.md#getinstance) - [getNFTTransferFromService](DDO.md#getnfttransferfromservice) +- [getNewDateFormatted](DDO.md#getnewdateformatted) - [getNftAmountFromService](DDO.md#getnftamountfromservice) - [getNftContractAddressFromService](DDO.md#getnftcontractaddressfromservice) - [getNftHolderFromService](DDO.md#getnftholderfromservice) @@ -70,17 +71,21 @@ Contains all the data related to an asset. ### constructor -• **new DDO**(`ddo?`) +• **new DDO**(`ddo?`): [`DDO`](DDO.md) #### Parameters -| Name | Type | -| :---- | :-------------------------- | -| `ddo` | `Partial`<[`DDO`](DDO.md)\> | +| Name | Type | +| :---- | :--------------------------- | +| `ddo` | `Partial`\<[`DDO`](DDO.md)\> | + +#### Returns + +[`DDO`](DDO.md) #### Defined in -[src/ddo/DDO.ts:100](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L100) +[src/ddo/DDO.ts:232](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L232) ## Properties @@ -90,7 +95,7 @@ Contains all the data related to an asset. #### Defined in -[src/ddo/DDO.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L77) +[src/ddo/DDO.ts:209](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L209) --- @@ -100,7 +105,7 @@ Contains all the data related to an asset. #### Defined in -[src/ddo/DDO.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L86) +[src/ddo/DDO.ts:218](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L218) --- @@ -110,7 +115,7 @@ Contains all the data related to an asset. #### Defined in -[src/ddo/DDO.ts:94](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L94) +[src/ddo/DDO.ts:226](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L226) --- @@ -120,29 +125,29 @@ Contains all the data related to an asset. #### Defined in -[src/ddo/DDO.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L88) +[src/ddo/DDO.ts:220](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L220) --- ### didSeed -• **didSeed**: `string` = `null` +• **didSeed**: `string` = `''` #### Defined in -[src/ddo/DDO.ts:84](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L84) +[src/ddo/DDO.ts:216](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L216) --- ### id -• **id**: `string` = `null` +• **id**: `string` = `''` DID, decentralizes ID. #### Defined in -[src/ddo/DDO.ts:82](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L82) +[src/ddo/DDO.ts:214](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L214) --- @@ -152,7 +157,7 @@ DID, decentralizes ID. #### Defined in -[src/ddo/DDO.ts:98](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L98) +[src/ddo/DDO.ts:230](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L230) --- @@ -162,7 +167,7 @@ DID, decentralizes ID. #### Defined in -[src/ddo/DDO.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L92) +[src/ddo/DDO.ts:224](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L224) --- @@ -172,7 +177,7 @@ DID, decentralizes ID. #### Defined in -[src/ddo/DDO.ts:96](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L96) +[src/ddo/DDO.ts:228](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L228) --- @@ -182,7 +187,7 @@ DID, decentralizes ID. #### Defined in -[src/ddo/DDO.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L90) +[src/ddo/DDO.ts:222](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L222) ## Methods @@ -207,13 +212,13 @@ main metadata attributes #### Defined in -[src/ddo/DDO.ts:322](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L322) +[src/ddo/DDO.ts:474](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L474) --- ### addProof -▸ **addProof**(`publicKey`): `Promise`<`void`\> +▸ **addProof**(`publicKey`): `Promise`\<`void`\> Generates and adds a proof using personal sign on the DDO. @@ -225,13 +230,13 @@ Generates and adds a proof using personal sign on the DDO. #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> void. #### Defined in -[src/ddo/DDO.ts:272](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L272) +[src/ddo/DDO.ts:424](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L424) --- @@ -253,13 +258,13 @@ Adds a service to the DDO. #### Defined in -[src/ddo/DDO.ts:294](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L294) +[src/ddo/DDO.ts:446](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L446) --- ### addSignature -▸ **addSignature**(`nevermined`, `publicKey`): `Promise`<`void`\> +▸ **addSignature**(`nevermined`, `publicKey`): `Promise`\<`void`\> It adds a signature to the the proof object of the DDO @@ -272,17 +277,17 @@ It adds a signature to the the proof object of the DDO #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Defined in -[src/ddo/DDO.ts:404](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L404) +[src/ddo/DDO.ts:556](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L556) --- ### assignDid -▸ **assignDid**(`didSeed`, `didRegistry`, `publisher`): `Promise`<`void`\> +▸ **assignDid**(`didSeed`, `didRegistry`, `publisher`): `Promise`\<`void`\> Assign a DID to the DDO @@ -292,15 +297,15 @@ Assign a DID to the DDO | :------------ | :------------------------------ | :-------------------------- | | `didSeed` | `string` | DID seed | | `didRegistry` | [`DIDRegistry`](DIDRegistry.md) | DIDRegistry contract | -| `publisher` | [`Account`](Account.md) | account registering the DID | +| `publisher` | [`NvmAccount`](NvmAccount.md) | account registering the DID | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Defined in -[src/ddo/DDO.ts:382](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L382) +[src/ddo/DDO.ts:534](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L534) --- @@ -320,15 +325,15 @@ Assign a DID to the DDO #### Defined in -[src/ddo/DDO.ts:234](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L234) +[src/ddo/DDO.ts:386](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L386) --- ### findServiceByIndex -▸ **findServiceByIndex**<`T`\>(`index`): [`Service`](../code-reference.md#service)<`T`\> +▸ **findServiceByIndex**\<`T`\>(`index`): [`Service`](../code-reference.md#service)\<`T`\> -Finds a service of a DDO by index. +Finds a service of a DDO by index number. #### Type parameters @@ -344,19 +349,19 @@ Finds a service of a DDO by index. #### Returns -[`Service`](../code-reference.md#service)<`T`\> +[`Service`](../code-reference.md#service)\<`T`\> -Service. +[Service](../code-reference.md#service). #### Defined in -[src/ddo/DDO.ts:139](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L139) +[src/ddo/DDO.ts:291](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L291) --- ### findServiceByReference -▸ **findServiceByReference**<`T`\>(`serviceReference`): [`Service`](../code-reference.md#service)<`T`\> +▸ **findServiceByReference**\<`T`\>(`serviceReference`): [`Service`](../code-reference.md#service)\<`T`\> Finds a service of a DDO by index. @@ -374,19 +379,19 @@ Finds a service of a DDO by index. #### Returns -[`Service`](../code-reference.md#service)<`T`\> +[`Service`](../code-reference.md#service)\<`T`\> Service. #### Defined in -[src/ddo/DDO.ts:173](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L173) +[src/ddo/DDO.ts:325](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L325) --- ### findServiceByType -▸ **findServiceByType**<`T`\>(`serviceType`): [`Service`](../code-reference.md#service)<`T`\> +▸ **findServiceByType**\<`T`\>(`serviceType`): [`Service`](../code-reference.md#service)\<`T`\> Finds the first service of a DDO by type. @@ -404,7 +409,7 @@ Finds the first service of a DDO by type. #### Returns -[`Service`](../code-reference.md#service)<`T`\> +[`Service`](../code-reference.md#service)\<`T`\> [Service](../code-reference.md#service). @@ -414,13 +419,13 @@ Finds the first service of a DDO by type. #### Defined in -[src/ddo/DDO.ts:159](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L159) +[src/ddo/DDO.ts:311](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L311) --- ### generateDidSeed -▸ **generateDidSeed**(`seed`): `Promise`<`string`\> +▸ **generateDidSeed**(`seed`): `Promise`\<\`0x$\{string}\`\> It generates a DID seed from a seed @@ -432,19 +437,19 @@ It generates a DID seed from a seed #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> the string represeing the DID seed #### Defined in -[src/ddo/DDO.ts:395](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L395) +[src/ddo/DDO.ts:547](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L547) --- ### generateProof -▸ **generateProof**(`publicKey`): `Promise`<[`Proof`](../interfaces/Proof.md)\> +▸ **generateProof**(`publicKey`): `Promise`\<[`Proof`](../interfaces/Proof.md)\> Generates proof using personal sign. @@ -456,13 +461,13 @@ Generates proof using personal sign. #### Returns -`Promise`<[`Proof`](../interfaces/Proof.md)\> +`Promise`\<[`Proof`](../interfaces/Proof.md)\> Proof object. #### Defined in -[src/ddo/DDO.ts:243](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L243) +[src/ddo/DDO.ts:395](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L395) --- @@ -486,7 +491,7 @@ the AssetPrice object #### Defined in -[src/ddo/DDO.ts:552](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L552) +[src/ddo/DDO.ts:711](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L711) --- @@ -520,7 +525,7 @@ const price = ddo.getPriceByService('nft-access') #### Defined in -[src/ddo/DDO.ts:224](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L224) +[src/ddo/DDO.ts:376](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L376) --- @@ -538,13 +543,13 @@ string containing the checksum of the proof. #### Defined in -[src/ddo/DDO.ts:263](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L263) +[src/ddo/DDO.ts:415](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L415) --- ### getServicesByType -▸ **getServicesByType**<`T`\>(`serviceType`): [`Service`](../code-reference.md#service)<`T`\>[] +▸ **getServicesByType**\<`T`\>(`serviceType`): [`Service`](../code-reference.md#service)\<`T`\>[] Gets all the services of a DDO with a specific type. @@ -562,13 +567,13 @@ Gets all the services of a DDO with a specific type. #### Returns -[`Service`](../code-reference.md#service)<`T`\>[] +[`Service`](../code-reference.md#service)\<`T`\>[] [Service](../code-reference.md#service). #### Defined in -[src/ddo/DDO.ts:189](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L189) +[src/ddo/DDO.ts:341](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L341) --- @@ -584,7 +589,7 @@ It reorders the services of the DDO using the service index #### Defined in -[src/ddo/DDO.ts:282](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L282) +[src/ddo/DDO.ts:434](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L434) --- @@ -607,13 +612,13 @@ Replaces a service in the DDO. #### Defined in -[src/ddo/DDO.ts:310](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L310) +[src/ddo/DDO.ts:462](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L462) --- ### serviceExists -▸ **serviceExists**<`T`\>(`serviceType`): `boolean` +▸ **serviceExists**\<`T`\>(`serviceType`): `boolean` Checks if a service exists in the DDO. @@ -637,7 +642,7 @@ true if service exists. #### Defined in -[src/ddo/DDO.ts:199](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L199) +[src/ddo/DDO.ts:351](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L351) --- @@ -661,7 +666,7 @@ true if service exists. #### Defined in -[src/ddo/DDO.ts:209](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L209) +[src/ddo/DDO.ts:361](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L361) --- @@ -684,13 +689,13 @@ Given a service type, it sets the AssetPrice in the escrowPayment condition #### Defined in -[src/ddo/DDO.ts:562](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L562) +[src/ddo/DDO.ts:721](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L721) --- ### setNFTRewardsFromService -▸ **setNFTRewardsFromService**(`serviceType`, `rewards`, `holderAddress`): `DDOConditionNotFoundError` +▸ **setNFTRewardsFromService**(`serviceType`, `rewards`, `holderAddress`): `undefined` \| [`DDOConditionNotFoundError`](DDOConditionNotFoundError.md) Given the service type it sets the AssetPrice and NFT holder @@ -704,11 +709,11 @@ Given the service type it sets the AssetPrice and NFT holder #### Returns -`DDOConditionNotFoundError` +`undefined` \| [`DDOConditionNotFoundError`](DDOConditionNotFoundError.md) #### Defined in -[src/ddo/DDO.ts:585](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L585) +[src/ddo/DDO.ts:748](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L748) --- @@ -716,13 +721,17 @@ Given the service type it sets the AssetPrice and NFT holder ▸ **shortId**(): `string` +It returns the DDO id without the prefix + #### Returns `string` +the DID without the prefix + #### Defined in -[src/ddo/DDO.ts:130](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L130) +[src/ddo/DDO.ts:282](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L282) --- @@ -744,7 +753,7 @@ Updates a service in the DDO #### Defined in -[src/ddo/DDO.ts:368](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L368) +[src/ddo/DDO.ts:520](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L520) --- @@ -770,35 +779,39 @@ Updates a service in the DDO #### Defined in -[src/ddo/DDO.ts:359](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L359) +[src/ddo/DDO.ts:511](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L511) --- ### createAuthorizationService -▸ `Static` **createAuthorizationService**(`neverminedNodeUri`, `publicKey`, `method`): [`ServiceCommon`](../interfaces/ServiceCommon.md) +▸ **createAuthorizationService**(`neverminedNodeUri`, `publicKey`, `method`): [`ServiceCommon`](../interfaces/ServiceCommon.md) + +It creates an authorization service that can be included later as part of a DDO #### Parameters -| Name | Type | -| :------------------ | :------- | -| `neverminedNodeUri` | `string` | -| `publicKey` | `string` | -| `method` | `string` | +| Name | Type | Description | +| :------------------ | :------- | :--------------------------------------------- | +| `neverminedNodeUri` | `string` | URL of the Nevermined Node managing this asset | +| `publicKey` | `string` | Public key of the user | +| `method` | `string` | Encryption method | #### Returns [`ServiceCommon`](../interfaces/ServiceCommon.md) +The authorization service + #### Defined in -[src/ddo/DDO.ts:58](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L58) +[src/ddo/DDO.ts:190](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L190) --- ### deserialize -▸ `Static` **deserialize**(`ddoString`): [`DDO`](DDO.md) +▸ **deserialize**(`ddoString`): [`DDO`](DDO.md) Deserializes the DDO object. @@ -816,13 +829,13 @@ The deserialized [DDO](DDO.md). #### Defined in -[src/ddo/DDO.ts:52](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L52) +[src/ddo/DDO.ts:177](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L177) --- ### findAndReplaceDDOAttribute -▸ `Static` **findAndReplaceDDOAttribute**(`ddo`, `paramName`, `value`): [`DDO`](DDO.md) +▸ **findAndReplaceDDOAttribute**(`ddo`, `paramName`, `value`): [`DDO`](DDO.md) Finds an attribute in the DDO and replace it with the given value @@ -842,13 +855,13 @@ the DDO with the replaced attribute #### Defined in -[src/ddo/DDO.ts:606](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L606) +[src/ddo/DDO.ts:771](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L771) --- ### findServiceConditionByName -▸ `Static` **findServiceConditionByName**(`service`, `name`): [`ServiceAgreementTemplateCondition`](../interfaces/ServiceAgreementTemplateCondition.md) +▸ **findServiceConditionByName**(`service`, `name`): [`ServiceAgreementTemplateCondition`](../interfaces/ServiceAgreementTemplateCondition.md) If fins a service condition by name @@ -867,13 +880,13 @@ ServiceAgreementTemplateCondition the condition #### Defined in -[src/ddo/DDO.ts:416](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L416) +[src/ddo/DDO.ts:568](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L568) --- ### getAssetPriceFromService -▸ `Static` **getAssetPriceFromService**(`service`): [`AssetPrice`](AssetPrice.md) +▸ **getAssetPriceFromService**(`service`): [`AssetPrice`](AssetPrice.md) It gets the AssetPrice from a service with escrowPayment condition @@ -891,13 +904,13 @@ the AssetPrice object #### Defined in -[src/ddo/DDO.ts:529](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L529) +[src/ddo/DDO.ts:686](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L686) --- ### getDIDFromService -▸ `Static` **getDIDFromService**(`service`): `string` +▸ **getDIDFromService**(`service`): `string` Gets the DID in the escrowPayment condition of the service @@ -915,13 +928,13 @@ the DID #### Defined in -[src/ddo/DDO.ts:432](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L432) +[src/ddo/DDO.ts:584](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L584) --- ### getDurationFromService -▸ `Static` **getDurationFromService**(`service`): `number` +▸ **getDurationFromService**(`service`): `number` Gets the duration parameter in the transferNFT condition of the service @@ -939,35 +952,39 @@ the duration of the subscription #### Defined in -[src/ddo/DDO.ts:486](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L486) +[src/ddo/DDO.ts:641](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L641) --- ### getInstance -▸ `Static` **getInstance**(`userId`, `publisherAddress`, `appId?`): [`DDO`](DDO.md) +▸ **getInstance**(`userId`, `publisherAddress`, `appId?`): [`DDO`](DDO.md) + +It gets an instance of a DDO with the basic structure #### Parameters -| Name | Type | -| :----------------- | :------- | -| `userId` | `string` | -| `publisherAddress` | `string` | -| `appId?` | `string` | +| Name | Type | Description | +| :----------------- | :------- | :-------------------------------- | +| `userId` | `string` | The unique identifier of the user | +| `publisherAddress` | `string` | The address of the publisher | +| `appId?` | `string` | The application id | #### Returns [`DDO`](DDO.md) +a [DDO](DDO.md) instance + #### Defined in -[src/ddo/DDO.ts:106](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L106) +[src/ddo/DDO.ts:245](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L245) --- ### getNFTTransferFromService -▸ `Static` **getNFTTransferFromService**(`service`): `boolean` +▸ **getNFTTransferFromService**(`service`): `boolean` Gets the nftTransfer parameter in the transferNFT condition of the service @@ -985,13 +1002,37 @@ if condition will do a nft transfer or a mint #### Defined in -[src/ddo/DDO.ts:475](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L475) +[src/ddo/DDO.ts:630](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L630) + +--- + +### getNewDateFormatted + +▸ **getNewDateFormatted**(`date?`): `string` + +It gets a new date formatted + +#### Parameters + +| Name | Type | Description | +| :----- | :----- | :----------------- | +| `date` | `Date` | the date to format | + +#### Returns + +`string` + +the date string formatted + +#### Defined in + +[src/ddo/DDO.ts:274](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L274) --- ### getNftAmountFromService -▸ `Static` **getNftAmountFromService**(`service`): `bigint` +▸ **getNftAmountFromService**(`service`): `bigint` Gets the number of NFTs in the transferNFT condition of the service @@ -1009,13 +1050,13 @@ the number of NFTs #### Defined in -[src/ddo/DDO.ts:463](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L463) +[src/ddo/DDO.ts:616](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L616) --- ### getNftContractAddressFromService -▸ `Static` **getNftContractAddressFromService**(`service`): `string` +▸ **getNftContractAddressFromService**(`service`): `string` Gets the NFT Contract address used in the NFT Access or NFT Sales service @@ -1033,13 +1074,13 @@ the NFT contract address #### Defined in -[src/ddo/DDO.ts:515](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L515) +[src/ddo/DDO.ts:670](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L670) --- ### getNftHolderFromService -▸ `Static` **getNftHolderFromService**(`service`): `string` +▸ **getNftHolderFromService**(`service`): `string` Gets the NFT Holder in the transferNFT condition of the service @@ -1057,13 +1098,13 @@ the NFT Holder address #### Defined in -[src/ddo/DDO.ts:442](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L442) +[src/ddo/DDO.ts:594](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L594) --- ### getParameterFromCondition -▸ `Static` **getParameterFromCondition**(`service`, `conditionType`, `paramName`): `string` \| `number` \| `string`[] +▸ **getParameterFromCondition**(`service`, `conditionType`, `paramName`): `string` \| `number` \| `string`[] Given a service, condition and param name it returns the value @@ -1083,13 +1124,13 @@ the value #### Defined in -[src/ddo/DDO.ts:497](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L497) +[src/ddo/DDO.ts:652](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L652) --- ### getTokenIdFromService -▸ `Static` **getTokenIdFromService**(`service`): `string` +▸ **getTokenIdFromService**(`service`): `string` Gets the NFT TokenId in the nftHolder condition of the service @@ -1107,13 +1148,13 @@ the NFT Token Id #### Defined in -[src/ddo/DDO.ts:451](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L451) +[src/ddo/DDO.ts:603](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L603) --- ### serialize -▸ `Static` **serialize**(`ddo`): `string` +▸ **serialize**(`ddo`): `string` Serializes the DDO object. @@ -1131,4 +1172,4 @@ DDO serialized. #### Defined in -[src/ddo/DDO.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L43) +[src/ddo/DDO.ts:168](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L168) diff --git a/docs/api-reference/classes/DDOConditionNotFoundError.md b/docs/api-reference/classes/DDOConditionNotFoundError.md new file mode 100644 index 000000000..c0e1a349b --- /dev/null +++ b/docs/api-reference/classes/DDOConditionNotFoundError.md @@ -0,0 +1,184 @@ +[@nevermined-io/sdk](../code-reference.md) / DDOConditionNotFoundError + +# Class: DDOConditionNotFoundError + +## Hierarchy + +- [`DDOError`](DDOError.md) + + ↳ **`DDOConditionNotFoundError`** + +## Table of contents + +### Constructors + +- [constructor](DDOConditionNotFoundError.md#constructor) + +### Properties + +- [cause](DDOConditionNotFoundError.md#cause) +- [message](DDOConditionNotFoundError.md#message) +- [name](DDOConditionNotFoundError.md#name) +- [stack](DDOConditionNotFoundError.md#stack) +- [prepareStackTrace](DDOConditionNotFoundError.md#preparestacktrace) +- [stackTraceLimit](DDOConditionNotFoundError.md#stacktracelimit) + +### Methods + +- [captureStackTrace](DDOConditionNotFoundError.md#capturestacktrace) + +## Constructors + +### constructor + +• **new DDOConditionNotFoundError**(`conditionName`): [`DDOConditionNotFoundError`](DDOConditionNotFoundError.md) + +#### Parameters + +| Name | Type | +| :-------------- | :------- | +| `conditionName` | `string` | + +#### Returns + +[`DDOConditionNotFoundError`](DDOConditionNotFoundError.md) + +#### Overrides + +[DDOError](DDOError.md).[constructor](DDOError.md#constructor) + +#### Defined in + +[src/errors/NeverminedErrors.ts:88](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L88) + +## Properties + +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +[DDOError](DDOError.md).[cause](DDOError.md#cause) + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + +### message + +• **message**: `string` + +#### Inherited from + +[DDOError](DDOError.md).[message](DDOError.md#message) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1077 + +--- + +### name + +• **name**: `string` + +#### Inherited from + +[DDOError](DDOError.md).[name](DDOError.md#name) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1076 + +--- + +### stack + +• `Optional` **stack**: `string` + +#### Inherited from + +[DDOError](DDOError.md).[stack](DDOError.md#stack) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1078 + +--- + +### prepareStackTrace + +▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` + +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Type declaration + +▸ (`err`, `stackTraces`): `any` + +##### Parameters + +| Name | Type | +| :------------ | :----------- | +| `err` | `Error` | +| `stackTraces` | `CallSite`[] | + +##### Returns + +`any` + +#### Inherited from + +[DDOError](DDOError.md).[prepareStackTrace](DDOError.md#preparestacktrace) + +#### Defined in + +node_modules/@types/node/globals.d.ts:28 + +--- + +### stackTraceLimit + +▪ `Static` **stackTraceLimit**: `number` + +#### Inherited from + +[DDOError](DDOError.md).[stackTraceLimit](DDOError.md#stacktracelimit) + +#### Defined in + +node_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace + +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Create .stack property on a target object + +#### Parameters + +| Name | Type | +| :---------------- | :--------- | +| `targetObject` | `object` | +| `constructorOpt?` | `Function` | + +#### Returns + +`void` + +#### Inherited from + +[DDOError](DDOError.md).[captureStackTrace](DDOError.md#capturestacktrace) + +#### Defined in + +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/DDOError.md b/docs/api-reference/classes/DDOError.md index 140f178cc..c35ab9fa3 100644 --- a/docs/api-reference/classes/DDOError.md +++ b/docs/api-reference/classes/DDOError.md @@ -8,10 +8,16 @@ ↳ **`DDOError`** - ↳↳ [`DDOPriceNotFoundError`](DDOPriceNotFoundError.md) - ↳↳ [`DDOServiceNotFoundError`](DDOServiceNotFoundError.md) + ↳↳ [`DDOServiceAlreadyExists`](DDOServiceAlreadyExists.md) + + ↳↳ [`DDOConditionNotFoundError`](DDOConditionNotFoundError.md) + + ↳↳ [`DDOParamNotFoundError`](DDOParamNotFoundError.md) + + ↳↳ [`DDOPriceNotFoundError`](DDOPriceNotFoundError.md) + ## Table of contents ### Constructors @@ -20,6 +26,7 @@ ### Properties +- [cause](DDOError.md#cause) - [message](DDOError.md#message) - [name](DDOError.md#name) - [stack](DDOError.md#stack) @@ -34,7 +41,7 @@ ### constructor -• **new DDOError**(`message`, `did?`) +• **new DDOError**(`message`, `did?`): [`DDOError`](DDOError.md) #### Parameters @@ -43,16 +50,34 @@ | `message` | `string` | | `did?` | `string` | +#### Returns + +[`DDOError`](DDOError.md) + #### Overrides Error.constructor #### Defined in -[src/errors/DDOError.ts:4](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/errors/DDOError.ts#L4) +[src/errors/NeverminedErrors.ts:62](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L62) ## Properties +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +Error.cause + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + ### message • **message**: `string` @@ -63,7 +88,7 @@ Error.message #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1068 +node_modules/typescript/lib/lib.es5.d.ts:1077 --- @@ -77,7 +102,7 @@ Error.name #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1067 +node_modules/typescript/lib/lib.es5.d.ts:1076 --- @@ -91,7 +116,7 @@ Error.stack #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1069 +node_modules/typescript/lib/lib.es5.d.ts:1078 --- @@ -99,12 +124,16 @@ node_modules/typescript/lib/lib.es5.d.ts:1069 ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Type declaration ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -116,17 +145,13 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from Error.prepareStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:11 +node_modules/@types/node/globals.d.ts:28 --- @@ -140,13 +165,13 @@ Error.stackTraceLimit #### Defined in -node_modules/@types/node/globals.d.ts:13 +node_modules/@types/node/globals.d.ts:30 ## Methods ### captureStackTrace -▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object @@ -167,4 +192,4 @@ Error.captureStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:4 +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/DDOParamNotFoundError.md b/docs/api-reference/classes/DDOParamNotFoundError.md new file mode 100644 index 000000000..5b8cf08b7 --- /dev/null +++ b/docs/api-reference/classes/DDOParamNotFoundError.md @@ -0,0 +1,185 @@ +[@nevermined-io/sdk](../code-reference.md) / DDOParamNotFoundError + +# Class: DDOParamNotFoundError + +## Hierarchy + +- [`DDOError`](DDOError.md) + + ↳ **`DDOParamNotFoundError`** + +## Table of contents + +### Constructors + +- [constructor](DDOParamNotFoundError.md#constructor) + +### Properties + +- [cause](DDOParamNotFoundError.md#cause) +- [message](DDOParamNotFoundError.md#message) +- [name](DDOParamNotFoundError.md#name) +- [stack](DDOParamNotFoundError.md#stack) +- [prepareStackTrace](DDOParamNotFoundError.md#preparestacktrace) +- [stackTraceLimit](DDOParamNotFoundError.md#stacktracelimit) + +### Methods + +- [captureStackTrace](DDOParamNotFoundError.md#capturestacktrace) + +## Constructors + +### constructor + +• **new DDOParamNotFoundError**(`conditionName`, `paramName?`): [`DDOParamNotFoundError`](DDOParamNotFoundError.md) + +#### Parameters + +| Name | Type | +| :-------------- | :------- | +| `conditionName` | `string` | +| `paramName?` | `string` | + +#### Returns + +[`DDOParamNotFoundError`](DDOParamNotFoundError.md) + +#### Overrides + +[DDOError](DDOError.md).[constructor](DDOError.md#constructor) + +#### Defined in + +[src/errors/NeverminedErrors.ts:94](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L94) + +## Properties + +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +[DDOError](DDOError.md).[cause](DDOError.md#cause) + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + +### message + +• **message**: `string` + +#### Inherited from + +[DDOError](DDOError.md).[message](DDOError.md#message) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1077 + +--- + +### name + +• **name**: `string` + +#### Inherited from + +[DDOError](DDOError.md).[name](DDOError.md#name) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1076 + +--- + +### stack + +• `Optional` **stack**: `string` + +#### Inherited from + +[DDOError](DDOError.md).[stack](DDOError.md#stack) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1078 + +--- + +### prepareStackTrace + +▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` + +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Type declaration + +▸ (`err`, `stackTraces`): `any` + +##### Parameters + +| Name | Type | +| :------------ | :----------- | +| `err` | `Error` | +| `stackTraces` | `CallSite`[] | + +##### Returns + +`any` + +#### Inherited from + +[DDOError](DDOError.md).[prepareStackTrace](DDOError.md#preparestacktrace) + +#### Defined in + +node_modules/@types/node/globals.d.ts:28 + +--- + +### stackTraceLimit + +▪ `Static` **stackTraceLimit**: `number` + +#### Inherited from + +[DDOError](DDOError.md).[stackTraceLimit](DDOError.md#stacktracelimit) + +#### Defined in + +node_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace + +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Create .stack property on a target object + +#### Parameters + +| Name | Type | +| :---------------- | :--------- | +| `targetObject` | `object` | +| `constructorOpt?` | `Function` | + +#### Returns + +`void` + +#### Inherited from + +[DDOError](DDOError.md).[captureStackTrace](DDOError.md#capturestacktrace) + +#### Defined in + +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/DDOPriceNotFoundError.md b/docs/api-reference/classes/DDOPriceNotFoundError.md index 558ccb6bb..60b371c17 100644 --- a/docs/api-reference/classes/DDOPriceNotFoundError.md +++ b/docs/api-reference/classes/DDOPriceNotFoundError.md @@ -16,6 +16,7 @@ ### Properties +- [cause](DDOPriceNotFoundError.md#cause) - [message](DDOPriceNotFoundError.md#message) - [name](DDOPriceNotFoundError.md#name) - [stack](DDOPriceNotFoundError.md#stack) @@ -30,14 +31,18 @@ ### constructor -• **new DDOPriceNotFoundError**(`serviceType`, `did?`) +• **new DDOPriceNotFoundError**(`serviceType`, `did?`): [`DDOPriceNotFoundError`](DDOPriceNotFoundError.md) #### Parameters -| Name | Type | -| :------------ | :------------------------------------------------ | -| `serviceType` | [`ServiceType`](../code-reference.md#servicetype) | -| `did?` | `string` | +| Name | Type | +| :------------ | :------- | +| `serviceType` | `string` | +| `did?` | `string` | + +#### Returns + +[`DDOPriceNotFoundError`](DDOPriceNotFoundError.md) #### Overrides @@ -45,10 +50,24 @@ #### Defined in -[src/errors/DDOError.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/errors/DDOError.ts#L42) +[src/errors/NeverminedErrors.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L100) ## Properties +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +[DDOError](DDOError.md).[cause](DDOError.md#cause) + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + ### message • **message**: `string` @@ -59,7 +78,7 @@ #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1068 +node_modules/typescript/lib/lib.es5.d.ts:1077 --- @@ -73,7 +92,7 @@ node_modules/typescript/lib/lib.es5.d.ts:1068 #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1067 +node_modules/typescript/lib/lib.es5.d.ts:1076 --- @@ -87,7 +106,7 @@ node_modules/typescript/lib/lib.es5.d.ts:1067 #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1069 +node_modules/typescript/lib/lib.es5.d.ts:1078 --- @@ -95,12 +114,16 @@ node_modules/typescript/lib/lib.es5.d.ts:1069 ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Type declaration ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -112,17 +135,13 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from [DDOError](DDOError.md).[prepareStackTrace](DDOError.md#preparestacktrace) #### Defined in -node_modules/@types/node/globals.d.ts:11 +node_modules/@types/node/globals.d.ts:28 --- @@ -136,13 +155,13 @@ node_modules/@types/node/globals.d.ts:11 #### Defined in -node_modules/@types/node/globals.d.ts:13 +node_modules/@types/node/globals.d.ts:30 ## Methods ### captureStackTrace -▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object @@ -163,4 +182,4 @@ Create .stack property on a target object #### Defined in -node_modules/@types/node/globals.d.ts:4 +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/DDOServiceAlreadyExists.md b/docs/api-reference/classes/DDOServiceAlreadyExists.md new file mode 100644 index 000000000..cbbc4e24e --- /dev/null +++ b/docs/api-reference/classes/DDOServiceAlreadyExists.md @@ -0,0 +1,185 @@ +[@nevermined-io/sdk](../code-reference.md) / DDOServiceAlreadyExists + +# Class: DDOServiceAlreadyExists + +## Hierarchy + +- [`DDOError`](DDOError.md) + + ↳ **`DDOServiceAlreadyExists`** + +## Table of contents + +### Constructors + +- [constructor](DDOServiceAlreadyExists.md#constructor) + +### Properties + +- [cause](DDOServiceAlreadyExists.md#cause) +- [message](DDOServiceAlreadyExists.md#message) +- [name](DDOServiceAlreadyExists.md#name) +- [stack](DDOServiceAlreadyExists.md#stack) +- [prepareStackTrace](DDOServiceAlreadyExists.md#preparestacktrace) +- [stackTraceLimit](DDOServiceAlreadyExists.md#stacktracelimit) + +### Methods + +- [captureStackTrace](DDOServiceAlreadyExists.md#capturestacktrace) + +## Constructors + +### constructor + +• **new DDOServiceAlreadyExists**(`serviceType`, `index`): [`DDOServiceAlreadyExists`](DDOServiceAlreadyExists.md) + +#### Parameters + +| Name | Type | +| :------------ | :------- | +| `serviceType` | `string` | +| `index` | `number` | + +#### Returns + +[`DDOServiceAlreadyExists`](DDOServiceAlreadyExists.md) + +#### Overrides + +[DDOError](DDOError.md).[constructor](DDOError.md#constructor) + +#### Defined in + +[src/errors/NeverminedErrors.ts:82](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L82) + +## Properties + +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +[DDOError](DDOError.md).[cause](DDOError.md#cause) + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + +### message + +• **message**: `string` + +#### Inherited from + +[DDOError](DDOError.md).[message](DDOError.md#message) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1077 + +--- + +### name + +• **name**: `string` + +#### Inherited from + +[DDOError](DDOError.md).[name](DDOError.md#name) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1076 + +--- + +### stack + +• `Optional` **stack**: `string` + +#### Inherited from + +[DDOError](DDOError.md).[stack](DDOError.md#stack) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1078 + +--- + +### prepareStackTrace + +▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` + +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Type declaration + +▸ (`err`, `stackTraces`): `any` + +##### Parameters + +| Name | Type | +| :------------ | :----------- | +| `err` | `Error` | +| `stackTraces` | `CallSite`[] | + +##### Returns + +`any` + +#### Inherited from + +[DDOError](DDOError.md).[prepareStackTrace](DDOError.md#preparestacktrace) + +#### Defined in + +node_modules/@types/node/globals.d.ts:28 + +--- + +### stackTraceLimit + +▪ `Static` **stackTraceLimit**: `number` + +#### Inherited from + +[DDOError](DDOError.md).[stackTraceLimit](DDOError.md#stacktracelimit) + +#### Defined in + +node_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace + +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Create .stack property on a target object + +#### Parameters + +| Name | Type | +| :---------------- | :--------- | +| `targetObject` | `object` | +| `constructorOpt?` | `Function` | + +#### Returns + +`void` + +#### Inherited from + +[DDOError](DDOError.md).[captureStackTrace](DDOError.md#capturestacktrace) + +#### Defined in + +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/DDOServiceNotFoundError.md b/docs/api-reference/classes/DDOServiceNotFoundError.md index a9c0f2040..01fa4f627 100644 --- a/docs/api-reference/classes/DDOServiceNotFoundError.md +++ b/docs/api-reference/classes/DDOServiceNotFoundError.md @@ -16,6 +16,7 @@ ### Properties +- [cause](DDOServiceNotFoundError.md#cause) - [message](DDOServiceNotFoundError.md#message) - [name](DDOServiceNotFoundError.md#name) - [stack](DDOServiceNotFoundError.md#stack) @@ -30,14 +31,18 @@ ### constructor -• **new DDOServiceNotFoundError**(`serviceType`, `did?`) +• **new DDOServiceNotFoundError**(`serviceType`, `did?`): [`DDOServiceNotFoundError`](DDOServiceNotFoundError.md) #### Parameters -| Name | Type | -| :------------ | :------------------------------------------------ | -| `serviceType` | [`ServiceType`](../code-reference.md#servicetype) | -| `did?` | `string` | +| Name | Type | +| :------------ | :------- | +| `serviceType` | `string` | +| `did?` | `string` | + +#### Returns + +[`DDOServiceNotFoundError`](DDOServiceNotFoundError.md) #### Overrides @@ -45,10 +50,24 @@ #### Defined in -[src/errors/DDOError.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/errors/DDOError.ts#L18) +[src/errors/NeverminedErrors.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L76) ## Properties +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +[DDOError](DDOError.md).[cause](DDOError.md#cause) + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + ### message • **message**: `string` @@ -59,7 +78,7 @@ #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1068 +node_modules/typescript/lib/lib.es5.d.ts:1077 --- @@ -73,7 +92,7 @@ node_modules/typescript/lib/lib.es5.d.ts:1068 #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1067 +node_modules/typescript/lib/lib.es5.d.ts:1076 --- @@ -87,7 +106,7 @@ node_modules/typescript/lib/lib.es5.d.ts:1067 #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1069 +node_modules/typescript/lib/lib.es5.d.ts:1078 --- @@ -95,12 +114,16 @@ node_modules/typescript/lib/lib.es5.d.ts:1069 ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Type declaration ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -112,17 +135,13 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from [DDOError](DDOError.md).[prepareStackTrace](DDOError.md#preparestacktrace) #### Defined in -node_modules/@types/node/globals.d.ts:11 +node_modules/@types/node/globals.d.ts:28 --- @@ -136,13 +155,13 @@ node_modules/@types/node/globals.d.ts:11 #### Defined in -node_modules/@types/node/globals.d.ts:13 +node_modules/@types/node/globals.d.ts:30 ## Methods ### captureStackTrace -▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object @@ -163,4 +182,4 @@ Create .stack property on a target object #### Defined in -node_modules/@types/node/globals.d.ts:4 +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/DID.md b/docs/api-reference/classes/DID.md index 290374bed..417a84790 100644 --- a/docs/api-reference/classes/DID.md +++ b/docs/api-reference/classes/DID.md @@ -28,7 +28,7 @@ Decentralized ID. ### constructor -• `Private` **new DID**(`id`) +• **new DID**(`id`): [`DID`](DID.md) #### Parameters @@ -36,9 +36,13 @@ Decentralized ID. | :--- | :------- | | `id` | `string` | +#### Returns + +[`DID`](DID.md) + #### Defined in -[src/nevermined/DID.ts:83](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/DID.ts#L83) +[src/nevermined/DID.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/DID.ts#L84) ## Properties @@ -50,7 +54,7 @@ Short ID. #### Defined in -[src/nevermined/DID.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/DID.ts#L81) +[src/nevermined/DID.ts:82](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/DID.ts#L82) ## Methods @@ -68,7 +72,7 @@ A string with the prefixed id. #### Defined in -[src/nevermined/DID.ts:91](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/DID.ts#L91) +[src/nevermined/DID.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/DID.ts#L92) --- @@ -86,7 +90,7 @@ A base36 encoded string. #### Defined in -[src/nevermined/DID.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/DID.ts#L74) +[src/nevermined/DID.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/DID.ts#L75) --- @@ -104,13 +108,13 @@ A string of the _id_ without the prefix. #### Defined in -[src/nevermined/DID.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/DID.ts#L99) +[src/nevermined/DID.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/DID.ts#L100) --- ### fromEncoded -▸ `Static` **fromEncoded**(`encoded`): [`DID`](DID.md) +▸ **fromEncoded**(`encoded`): [`DID`](DID.md) Returns a new DID from a base36 encoded string. @@ -128,13 +132,13 @@ Returns a new DID from a base36 encoded string. #### Defined in -[src/nevermined/DID.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/DID.ts#L64) +[src/nevermined/DID.ts:65](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/DID.ts#L65) --- ### generate -▸ `Static` **generate**(): [`DID`](DID.md) +▸ **generate**(): [`DID`](DID.md) Returns a new DID. @@ -146,13 +150,13 @@ Returns a new DID. #### Defined in -[src/nevermined/DID.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/DID.ts#L43) +[src/nevermined/DID.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/DID.ts#L44) --- ### parse -▸ `Static` **parse**(`didString`): [`DID`](DID.md) +▸ **parse**(`didString`): [`DID`](DID.md) Parses a DID from a string. @@ -170,13 +174,13 @@ Parses a DID from a string. #### Defined in -[src/nevermined/DID.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/DID.ts#L14) +[src/nevermined/DID.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/DID.ts#L14) --- ### parseBigInt -▸ `Static` **parseBigInt**(`value`, `radix?`): `any` +▸ **parseBigInt**(`value`, `radix?`): `any` #### Parameters @@ -191,4 +195,4 @@ Parses a DID from a string. #### Defined in -[src/nevermined/DID.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/DID.ts#L47) +[src/nevermined/DID.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/DID.ts#L48) diff --git a/docs/api-reference/classes/DIDRegistry.md b/docs/api-reference/classes/DIDRegistry.md index d36059491..b29f4c235 100644 --- a/docs/api-reference/classes/DIDRegistry.md +++ b/docs/api-reference/classes/DIDRegistry.md @@ -26,12 +26,14 @@ - [artifactsFolder](DIDRegistry.md#artifactsfolder) - [circuitsFolder](DIDRegistry.md#circuitsfolder) +- [client](DIDRegistry.md#client) - [config](DIDRegistry.md#config) - [instanceConfig](DIDRegistry.md#instanceconfig) - [instantiableConfig](DIDRegistry.md#instantiableconfig) - [logger](DIDRegistry.md#logger) - [nevermined](DIDRegistry.md#nevermined) -- [web3](DIDRegistry.md#web3) +- [publicClient](DIDRegistry.md#publicclient) +- [walletClient](DIDRegistry.md#walletclient) ### Methods @@ -51,13 +53,12 @@ - [getDIDRegister](DIDRegistry.md#getdidregister) - [getDIDRoyalties](DIDRegistry.md#getdidroyalties) - [getFromAddress](DIDRegistry.md#getfromaddress) -- [getInputsOfMethod](DIDRegistry.md#getinputsofmethod) - [getNFTInfo](DIDRegistry.md#getnftinfo) - [getPermission](DIDRegistry.md#getpermission) - [getProvenanceEntry](DIDRegistry.md#getprovenanceentry) - [getProvenanceOwner](DIDRegistry.md#getprovenanceowner) - [getProviders](DIDRegistry.md#getproviders) -- [getSignatureOfMethod](DIDRegistry.md#getsignatureofmethod) +- [getTransactionLogs](DIDRegistry.md#gettransactionlogs) - [grantPermission](DIDRegistry.md#grantpermission) - [grantRegistryOperatorRole](DIDRegistry.md#grantregistryoperatorrole) - [hashDID](DIDRegistry.md#hashdid) @@ -76,6 +77,7 @@ - [sendFrom](DIDRegistry.md#sendfrom) - [setDIDRoyalties](DIDRegistry.md#setdidroyalties) - [setInstanceConfig](DIDRegistry.md#setinstanceconfig) +- [someLog](DIDRegistry.md#somelog) - [transferDIDOwnership](DIDRegistry.md#transferdidownership) - [updateMetadataUrl](DIDRegistry.md#updatemetadataurl) - [used](DIDRegistry.md#used) @@ -88,7 +90,7 @@ ### constructor -• **new DIDRegistry**(`contractName`) +• **new DIDRegistry**(`contractName`): [`DIDRegistry`](DIDRegistry.md) #### Parameters @@ -96,19 +98,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`DIDRegistry`](DIDRegistry.md) + #### Inherited from [ContractBase](ContractBase.md).[constructor](ContractBase.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -116,13 +122,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -130,7 +136,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -144,13 +150,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -158,7 +164,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -172,17 +178,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -190,17 +196,17 @@ ContractBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -208,13 +214,31 @@ ContractBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ContractBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -226,13 +250,13 @@ ContractBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -244,17 +268,17 @@ ContractBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -262,13 +286,13 @@ ContractBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -280,13 +304,13 @@ ContractBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -298,31 +322,146 @@ ContractBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ContractBase.web3 +ContractBase.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ContractBase.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### actedOnBehalf -▸ **actedOnBehalf**(`provId`, `did`, `delegateAgentId`, `responsibleAgentId`, `activityId`, `signatureDelegate`, `attributes`, `ownerAddress`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **actedOnBehalf**(`provId`, `did`, `delegateAgentId`, `responsibleAgentId`, `activityId`, `signatureDelegate`, `attributes`, `owner`, `params?`): `Promise`\<`any`\> #### Parameters @@ -335,22 +474,22 @@ ContractBase.web3 | `activityId` | `string` | | `signatureDelegate` | `string` | | `attributes` | `string` | -| `ownerAddress` | `string` | +| `owner` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:533](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L533) +[src/keeper/contracts/DIDRegistry.ts:552](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L552) --- ### addDidProvenanceDelegate -▸ **addDidProvenanceDelegate**(`did`, `delegateAddress`, `ownerAddress`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **addDidProvenanceDelegate**(`did`, `delegateAddress`, `owner`, `params?`): `Promise`\<`any`\> #### Parameters @@ -358,22 +497,22 @@ ContractBase.web3 | :---------------- | :---------------------------------------------- | | `did` | `string` | | `delegateAddress` | `string` | -| `ownerAddress` | `string` | +| `owner` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:560](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L560) +[src/keeper/contracts/DIDRegistry.ts:579](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L579) --- ### addProvider -▸ **addProvider**(`did`, `provider`, `from`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **addProvider**(`did`, `provider`, `from`, `params?`): `Promise`\<`any`\> #### Parameters @@ -381,22 +520,22 @@ ContractBase.web3 | :--------- | :---------------------------------------------- | | `did` | `string` | | `provider` | `string` | -| `from` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:604](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L604) +[src/keeper/contracts/DIDRegistry.ts:623](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L623) --- ### burn -▸ **burn**(`did`, `amount`, `from`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **burn**(`did`, `amount`, `from`, `params?`): `Promise`\<`any`\> #### Parameters @@ -404,22 +543,22 @@ ContractBase.web3 | :-------- | :---------------------------------------------- | | `did` | `string` | | `amount` | `bigint` | -| `from` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:600](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L600) +[src/keeper/contracts/DIDRegistry.ts:619](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L619) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -429,15 +568,15 @@ ContractBase.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -445,13 +584,13 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### enableAndMintDidNft -▸ **enableAndMintDidNft**(`did`, `cap`, `royalties`, `preMint`, `ownerAddress`, `nftMetadata`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **enableAndMintDidNft**(`did`, `cap`, `royalties`, `preMint`, `owner`, `nftMetadata`, `txParams?`): `Promise`\<`any`\> It activates a NFT associated to a NFT (ERC-1155) and allows to pre-mint. This method only can be called once per DID, so if this was called or executed before internally the method will fail. @@ -459,31 +598,31 @@ Only use if the intention is to register a mintable asset and it was registered #### Parameters -| Name | Type | Description | -| :------------- | :---------------------------------------------- | :-------------------------------------- | -| `did` | `string` | The unique identifier of the asset | -| `cap` | `number` | Max number of editions | -| `royalties` | `number` | Asset royalties in the secondary market | -| `preMint` | `boolean` | If true pre-mints the editions of NFT | -| `ownerAddress` | `string` | Address of the user registering the DID | -| `nftMetadata` | `string` | URL to the metadata describing the NFT | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | +| Name | Type | Description | +| :------------ | :---------------------------------------------- | :-------------------------------------- | +| `did` | `string` | The unique identifier of the asset | +| `cap` | `number` | Max number of editions | +| `royalties` | `number` | Asset royalties in the secondary market | +| `preMint` | `boolean` | If true pre-mints the editions of NFT | +| `owner` | [`NvmAccount`](NvmAccount.md) | Account of the user registering the DID | +| `nftMetadata` | `string` | URL to the metadata describing the NFT | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/DIDRegistry.ts:215](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L215) +[src/keeper/contracts/DIDRegistry.ts:216](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L216) --- ### enableAndMintDidNft721 -▸ **enableAndMintDidNft721**(`did`, `royalties`, `preMint`, `ownerAddress`, `nftMetadata`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **enableAndMintDidNft721**(`did`, `royalties`, `preMint`, `owner`, `nftMetadata`, `txParams?`): `Promise`\<`any`\> It activates a NFT associated to a NFT (ERC-721) and allows to pre-mint. This method only can be called once per DID, so if this was called or executed before internally the method will fail. @@ -491,30 +630,30 @@ Only use if the intention is to register a mintable asset and it was registered #### Parameters -| Name | Type | Description | -| :------------- | :---------------------------------------------- | :-------------------------------------- | -| `did` | `string` | The unique identifier of the asset | -| `royalties` | `number` | Asset royalties in the secondary market | -| `preMint` | `boolean` | If true pre-mints the editions of NFT | -| `ownerAddress` | `string` | Address of the user registering the DID | -| `nftMetadata` | `string` | URL to the metadata describing the NFT | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | +| Name | Type | Description | +| :------------ | :---------------------------------------------- | :-------------------------------------- | +| `did` | `string` | The unique identifier of the asset | +| `royalties` | `number` | Asset royalties in the secondary market | +| `preMint` | `boolean` | If true pre-mints the editions of NFT | +| `owner` | [`NvmAccount`](NvmAccount.md) | Account of the user registering the DID | +| `nftMetadata` | `string` | URL to the metadata describing the NFT | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/DIDRegistry.ts:245](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L245) +[src/keeper/contracts/DIDRegistry.ts:246](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L246) --- ### getAttributesByDid -▸ **getAttributesByDid**(`did`): `Promise`<{ `checksum`: `string` ; `did`: `string` ; `immutableUrl`: `string` ; `nftInitialized`: `boolean` ; `owner`: `string` ; `providers`: `string`[] ; `royalties`: `bigint` ; `serviceEndpoint`: `string` }\> +▸ **getAttributesByDid**(`did`): `Promise`\<\{ `checksum`: `string` ; `did`: `string` ; `immutableUrl`: `string` ; `nftInitialized`: `boolean` ; `owner`: `string` ; `providers`: `string`[] ; `royalties`: `bigint` ; `serviceEndpoint`: `string` }\> #### Parameters @@ -524,17 +663,17 @@ Contract Receipt #### Returns -`Promise`<{ `checksum`: `string` ; `did`: `string` ; `immutableUrl`: `string` ; `nftInitialized`: `boolean` ; `owner`: `string` ; `providers`: `string`[] ; `royalties`: `bigint` ; `serviceEndpoint`: `string` }\> +`Promise`\<\{ `checksum`: `string` ; `did`: `string` ; `immutableUrl`: `string` ; `nftInitialized`: `boolean` ; `owner`: `string` ; `providers`: `string`[] ; `royalties`: `bigint` ; `serviceEndpoint`: `string` }\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:298](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L298) +[src/keeper/contracts/DIDRegistry.ts:300](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L300) --- ### getAttributesByOwner -▸ **getAttributesByOwner**(`owner`): `Promise`<`string`[]\> +▸ **getAttributesByOwner**(`owner`): `Promise`\<`string`[]\> #### Parameters @@ -544,17 +683,17 @@ Contract Receipt #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:273](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L273) +[src/keeper/contracts/DIDRegistry.ts:275](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L275) --- ### getBlockNumberUpdated -▸ **getBlockNumberUpdated**(`did`): `Promise`<`number`\> +▸ **getBlockNumberUpdated**(`did`): `Promise`\<`number`\> #### Parameters @@ -564,17 +703,17 @@ Contract Receipt #### Returns -`Promise`<`number`\> +`Promise`\<`number`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:265](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L265) +[src/keeper/contracts/DIDRegistry.ts:266](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L266) --- ### getDIDOwner -▸ **getDIDOwner**(`did`): `Promise`<`string`\> +▸ **getDIDOwner**(`did`): `Promise`\<`string`\> #### Parameters @@ -584,17 +723,17 @@ Contract Receipt #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:261](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L261) +[src/keeper/contracts/DIDRegistry.ts:262](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L262) --- ### getDIDProvenanceEvents -▸ **getDIDProvenanceEvents**(`did`): `Promise`<{ `activityId`: `string` ; `agentId`: `string` ; `agentInvolvedId`: `string` ; `attributes?`: `string` ; `blockNumberUpdated`: `number` ; `did`: `string` ; `id`: `string` ; `method`: `number` ; `provId`: `string` ; `relatedDid`: `string` }[]\> +▸ **getDIDProvenanceEvents**(`did`): `Promise`\<\{ `activityId`: `string` ; `agentId`: `string` ; `agentInvolvedId`: `string` ; `attributes?`: `string` ; `blockNumberUpdated`: `number` ; `did`: `string` ; `id`: `string` ; `method`: `number` ; `provId`: `string` ; `relatedDid`: `string` }[]\> #### Parameters @@ -604,17 +743,17 @@ Contract Receipt #### Returns -`Promise`<{ `activityId`: `string` ; `agentId`: `string` ; `agentInvolvedId`: `string` ; `attributes?`: `string` ; `blockNumberUpdated`: `number` ; `did`: `string` ; `id`: `string` ; `method`: `number` ; `provId`: `string` ; `relatedDid`: `string` }[]\> +`Promise`\<\{ `activityId`: `string` ; `agentId`: `string` ; `agentInvolvedId`: `string` ; `attributes?`: `string` ; `blockNumberUpdated`: `number` ; `did`: `string` ; `id`: `string` ; `method`: `number` ; `provId`: `string` ; `relatedDid`: `string` }[]\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:374](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L374) +[src/keeper/contracts/DIDRegistry.ts:371](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L371) --- ### getDIDProvenanceMethodEvents -▸ **getDIDProvenanceMethodEvents**<`T`\>(`did`, `method`): `Promise`<[`ProvenanceEvent`](../code-reference.md#provenanceevent)<`T`\>[]\> +▸ **getDIDProvenanceMethodEvents**\<`T`\>(`did`, `method`): `Promise`\<[`ProvenanceEvent`](../code-reference.md#provenanceevent)\<`T`\>[]\> #### Type parameters @@ -631,17 +770,17 @@ Contract Receipt #### Returns -`Promise`<[`ProvenanceEvent`](../code-reference.md#provenanceevent)<`T`\>[]\> +`Promise`\<[`ProvenanceEvent`](../code-reference.md#provenanceevent)\<`T`\>[]\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:409](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L409) +[src/keeper/contracts/DIDRegistry.ts:416](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L416) --- ### getDIDRegister -▸ **getDIDRegister**(`did`): `Promise`<`unknown`\> +▸ **getDIDRegister**(`did`): `Promise`\<`unknown`\> #### Parameters @@ -651,17 +790,17 @@ Contract Receipt #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:617](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L617) +[src/keeper/contracts/DIDRegistry.ts:636](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L636) --- ### getDIDRoyalties -▸ **getDIDRoyalties**(`did`): `Promise`<`unknown`\> +▸ **getDIDRoyalties**(`did`): `Promise`\<`unknown`\> #### Parameters @@ -671,17 +810,17 @@ Contract Receipt #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:351](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L351) +[src/keeper/contracts/DIDRegistry.ts:353](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L353) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -691,7 +830,7 @@ Contract Receipt #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -699,37 +838,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ContractBase](ContractBase.md).[getInputsOfMethod](ContractBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getNFTInfo -▸ **getNFTInfo**(`did`): `Promise`<`unknown`\> +▸ **getNFTInfo**(`did`): `Promise`\<`unknown`\> #### Parameters @@ -739,17 +854,17 @@ readonly `ParamType`[] #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:621](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L621) +[src/keeper/contracts/DIDRegistry.ts:640](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L640) --- ### getPermission -▸ **getPermission**(`did`, `grantee`): `Promise`<`boolean`\> +▸ **getPermission**(`did`, `grantee`): `Promise`\<`boolean`\> #### Parameters @@ -760,17 +875,17 @@ readonly `ParamType`[] #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:355](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L355) +[src/keeper/contracts/DIDRegistry.ts:357](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L357) --- ### getProvenanceEntry -▸ **getProvenanceEntry**(`provId`): `Promise`<[`ProvenanceRegistry`](../interfaces/ProvenanceRegistry.md)\> +▸ **getProvenanceEntry**(`provId`): `Promise`\<`undefined` \| \{ `activityId`: `any` ; `agentId`: `any` ; `agentInvolvedId`: `any` ; `blockNumberUpdated`: `any` ; `createdBy`: `any` ; `did`: `any` ; `method`: [`ProvenanceMethod`](../enums/ProvenanceMethod.md) ; `relatedDid`: `any` ; `signatureDelegate`: `any` }\> #### Parameters @@ -780,17 +895,17 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ProvenanceRegistry`](../interfaces/ProvenanceRegistry.md)\> +`Promise`\<`undefined` \| \{ `activityId`: `any` ; `agentId`: `any` ; `agentInvolvedId`: `any` ; `blockNumberUpdated`: `any` ; `createdBy`: `any` ; `did`: `any` ; `method`: [`ProvenanceMethod`](../enums/ProvenanceMethod.md) ; `relatedDid`: `any` ; `signatureDelegate`: `any` }\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:458](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L458) +[src/keeper/contracts/DIDRegistry.ts:465](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L465) --- ### getProvenanceOwner -▸ **getProvenanceOwner**(`did`): `Promise`<`unknown`\> +▸ **getProvenanceOwner**(`did`): `Promise`\<`unknown`\> #### Parameters @@ -800,17 +915,17 @@ readonly `ParamType`[] #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:592](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L592) +[src/keeper/contracts/DIDRegistry.ts:611](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L611) --- ### getProviders -▸ **getProviders**(`did`): `Promise`<`any`\> +▸ **getProviders**(`did`): `Promise`\<`any`\> #### Parameters @@ -820,87 +935,87 @@ readonly `ParamType`[] #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:612](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L612) +[src/keeper/contracts/DIDRegistry.ts:631](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L631) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ContractBase](ContractBase.md).[getSignatureOfMethod](ContractBase.md#getsignatureofmethod) +[ContractBase](ContractBase.md).[getTransactionLogs](ContractBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### grantPermission -▸ **grantPermission**(`did`, `grantee`, `ownerAddress`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **grantPermission**(`did`, `grantee`, `owner`, `txParams?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------------- | :---------------------------------------------- | -| `did` | `string` | -| `grantee` | `string` | -| `ownerAddress` | `string` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :---------- | :---------------------------------------------- | +| `did` | `string` | +| `grantee` | `string` | +| `owner` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:324](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L324) +[src/keeper/contracts/DIDRegistry.ts:326](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L326) --- ### grantRegistryOperatorRole -▸ **grantRegistryOperatorRole**(`manager`, `from`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **grantRegistryOperatorRole**(`manager`, `from`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :-------- | :---------------------------------------------- | | `manager` | `string` | -| `from` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:629](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L629) +[src/keeper/contracts/DIDRegistry.ts:648](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L648) --- ### hashDID -▸ **hashDID**(`didSeed`, `creator`): `Promise`<`string`\> +▸ **hashDID**(`didSeed`, `creator`): `Promise`\<`string`\> #### Parameters @@ -911,28 +1026,29 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:625](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L625) +[src/keeper/contracts/DIDRegistry.ts:644](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L644) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -940,13 +1056,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### isDIDProvider -▸ **isDIDProvider**(`did`, `provider`): `Promise`<`string`\> +▸ **isDIDProvider**(`did`, `provider`): `Promise`\<`string`\> #### Parameters @@ -957,17 +1073,17 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:269](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L269) +[src/keeper/contracts/DIDRegistry.ts:271](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L271) --- ### isProvenanceDelegate -▸ **isProvenanceDelegate**(`did`, `delegateAddress`): `Promise`<`unknown`\> +▸ **isProvenanceDelegate**(`did`, `delegateAddress`): `Promise`\<`unknown`\> #### Parameters @@ -978,17 +1094,17 @@ readonly `ParamType`[] #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:588](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L588) +[src/keeper/contracts/DIDRegistry.ts:607](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L607) --- ### mint -▸ **mint**(`did`, `amount`, `from`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **mint**(`did`, `amount`, `from`, `params?`): `Promise`\<`any`\> #### Parameters @@ -996,148 +1112,148 @@ readonly `ParamType`[] | :-------- | :---------------------------------------------- | | `did` | `string` | | `amount` | `bigint` | -| `from` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:596](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L596) +[src/keeper/contracts/DIDRegistry.ts:615](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L615) --- ### registerAttribute -▸ **registerAttribute**(`did`, `checksum`, `providers`, `url`, `ownerAddress`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **registerAttribute**(`did`, `checksum`, `providers`, `url`, `owner`, `txParams?`): `Promise`\<`any`\> It registers a decentralized identifier (aka DID) in the `DIDRegistry` smart contract #### Parameters -| Name | Type | Description | -| :------------- | :---------------------------------------------- | :----------------------------------------------------- | -| `did` | `string` | The unique identifier of the asset | -| `checksum` | `string` | Checksum resulted of hash the asset metadata | -| `providers` | `string`[] | List of addresses in charge of interact with the asset | -| `url` | `string` | URL to the metadata in the Metadata/Marketplace API | -| `ownerAddress` | `string` | Address of the user registering the DID | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | +| Name | Type | Description | +| :---------- | :---------------------------------------------- | :----------------------------------------------------- | +| `did` | `string` | The unique identifier of the asset | +| `checksum` | `string` | Checksum resulted of hash the asset metadata | +| `providers` | `string`[] | List of addresses in charge of interact with the asset | +| `url` | `string` | URL to the metadata in the Metadata/Marketplace API | +| `owner` | [`NvmAccount`](NvmAccount.md) | Account of the user registering the DID | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/DIDRegistry.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L33) +[src/keeper/contracts/DIDRegistry.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L38) --- ### registerDID -▸ **registerDID**(`did`, `checksum`, `providers`, `ownerAddress`, `url`, `immutableUrl?`, `activityId?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **registerDID**(`did`, `checksum`, `providers`, `owner`, `url`, `immutableUrl?`, `activityId?`, `txParams?`): `Promise`\<`any`\> It registers a decentralized identifier (aka DID) in the `DIDRegistry` smart contract #### Parameters -| Name | Type | Default value | Description | -| :------------- | :---------------------------------------------- | :--------------------------------- | :------------------------------------------------------------------------------------ | -| `did` | `string` | `undefined` | The unique identifier of the asset | -| `checksum` | `string` | `undefined` | Checksum resulted of hash the asset metadata | -| `providers` | `string`[] | `undefined` | List of addresses in charge of interact with the asset | -| `ownerAddress` | `string` | `undefined` | Address of the user registering the DID | -| `url` | `string` | `undefined` | URL to the metadata in the Metadata/Marketplace API | -| `immutableUrl` | `string` | `''` | Hash or URL to the metadata stored in a immutable data store like IPFS, Filecoin, etc | -| `activityId` | `string` | `DEFAULT_REGISTRATION_ACTIVITY_ID` | Provenance identifier about the asset registration action | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Transaction additional parameters | +| Name | Type | Default value | Description | +| :------------- | :---------------------------------------------- | :------------ | :------------------------------------------------------------------------------------ | +| `did` | `string` | `undefined` | The unique identifier of the asset | +| `checksum` | `string` | `undefined` | Checksum resulted of hash the asset metadata | +| `providers` | `string`[] | `undefined` | List of addresses in charge of interact with the asset | +| `owner` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user registering the DID | +| `url` | `string` | `undefined` | URL to the metadata in the Metadata/Marketplace API | +| `immutableUrl` | `string` | `''` | Hash or URL to the metadata stored in a immutable data store like IPFS, Filecoin, etc | +| `activityId` | `string` | `undefined` | Provenance identifier about the asset registration action | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/DIDRegistry.ts:62](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L62) +[src/keeper/contracts/DIDRegistry.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L67) --- ### registerMintableDID -▸ **registerMintableDID**(`did`, `nftContractAddress`, `checksum`, `providers`, `ownerAddress`, `nftAttributes`, `url`, `immutableUrl?`, `activityId?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **registerMintableDID**(`did`, `nftContractAddress`, `checksum`, `providers`, `owner`, `nftAttributes`, `url`, `immutableUrl?`, `activityId?`, `txParams?`): `Promise`\<`any`\> It registers a decentralized identifier (aka DID) in the `DIDRegistry` smart contract with a ERC-1155 NFT attached to it #### Parameters -| Name | Type | Default value | Description | -| :------------------- | :---------------------------------------------- | :--------------------------------- | :------------------------------------------------------------------------------------ | -| `did` | `string` | `undefined` | The unique identifier of the asset | -| `nftContractAddress` | `string` | `undefined` | - | -| `checksum` | `string` | `undefined` | Checksum resulted of hash the asset metadata | -| `providers` | `string`[] | `undefined` | List of addresses in charge of interact with the asset | -| `ownerAddress` | `string` | `undefined` | Address of the user registering the DID | -| `nftAttributes` | [`NFTAttributes`](NFTAttributes.md) | `undefined` | Attributes of the NFT associated to the NFT | -| `url` | `string` | `undefined` | URL to the metadata in the Metadata/Marketplace API | -| `immutableUrl` | `string` | `''` | Hash or URL to the metadata stored in a immutable data store like IPFS, Filecoin, etc | -| `activityId` | `string` | `DEFAULT_REGISTRATION_ACTIVITY_ID` | Provenance identifier about the asset registration action | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Transaction additional parameters | +| Name | Type | Default value | Description | +| :------------------- | :---------------------------------------------- | :------------ | :------------------------------------------------------------------------------------ | +| `did` | `string` | `undefined` | The unique identifier of the asset | +| `nftContractAddress` | `string` | `undefined` | - | +| `checksum` | `string` | `undefined` | Checksum resulted of hash the asset metadata | +| `providers` | `string`[] | `undefined` | List of addresses in charge of interact with the asset | +| `owner` | [`NvmAccount`](NvmAccount.md) | `undefined` | Address of the user registering the DID | +| `nftAttributes` | [`NFTAttributes`](NFTAttributes.md) | `undefined` | Attributes of the NFT associated to the NFT | +| `url` | `string` | `undefined` | URL to the metadata in the Metadata/Marketplace API | +| `immutableUrl` | `string` | `''` | Hash or URL to the metadata stored in a immutable data store like IPFS, Filecoin, etc | +| `activityId` | `string` | `undefined` | Provenance identifier about the asset registration action | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/DIDRegistry.ts:94](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L94) +[src/keeper/contracts/DIDRegistry.ts:99](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L99) --- ### registerMintableDID721 -▸ **registerMintableDID721**(`did`, `nftContractAddress`, `checksum`, `providers`, `ownerAddress`, `nftAttributes`, `url`, `immutableUrl?`, `activityId?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **registerMintableDID721**(`did`, `nftContractAddress`, `checksum`, `providers`, `owner`, `nftAttributes`, `url`, `immutableUrl?`, `activityId?`, `txParams?`): `Promise`\<`any`\> It registers a decentralized identifier (aka DID) in the `DIDRegistry` smart contract with a ERC-721 NFT attached to it #### Parameters -| Name | Type | Default value | Description | -| :------------------- | :---------------------------------------------- | :--------------------------------- | :------------------------------------------------------------------------------------ | -| `did` | `string` | `undefined` | The unique identifier of the asset | -| `nftContractAddress` | `string` | `undefined` | - | -| `checksum` | `string` | `undefined` | Checksum resulted of hash the asset metadata | -| `providers` | `string`[] | `undefined` | List of addresses in charge of interact with the asset | -| `ownerAddress` | `string` | `undefined` | Address of the user registering the DID | -| `nftAttributes` | [`NFTAttributes`](NFTAttributes.md) | `undefined` | Attributes of the NFT associated to the NFT | -| `url` | `string` | `undefined` | URL to the metadata in the Metadata/Marketplace API | -| `immutableUrl` | `string` | `''` | Hash or URL to the metadata stored in a immutable data store like IPFS, Filecoin, etc | -| `activityId` | `string` | `DEFAULT_REGISTRATION_ACTIVITY_ID` | Provenance identifier about the asset registration action | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Transaction additional parameters | +| Name | Type | Default value | Description | +| :------------------- | :---------------------------------------------- | :------------ | :------------------------------------------------------------------------------------ | +| `did` | `string` | `undefined` | The unique identifier of the asset | +| `nftContractAddress` | `string` | `undefined` | - | +| `checksum` | `string` | `undefined` | Checksum resulted of hash the asset metadata | +| `providers` | `string`[] | `undefined` | List of addresses in charge of interact with the asset | +| `owner` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user registering the DID | +| `nftAttributes` | [`NFTAttributes`](NFTAttributes.md) | `undefined` | Attributes of the NFT associated to the NFT | +| `url` | `string` | `undefined` | URL to the metadata in the Metadata/Marketplace API | +| `immutableUrl` | `string` | `''` | Hash or URL to the metadata stored in a immutable data store like IPFS, Filecoin, etc | +| `activityId` | `string` | `undefined` | Provenance identifier about the asset registration action | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/DIDRegistry.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L142) +[src/keeper/contracts/DIDRegistry.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L145) --- ### removeDidProvenanceDelegate -▸ **removeDidProvenanceDelegate**(`did`, `delegateAddress`, `ownerAddress`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **removeDidProvenanceDelegate**(`did`, `delegateAddress`, `owner`, `params?`): `Promise`\<`any`\> #### Parameters @@ -1145,22 +1261,22 @@ Contract Receipt | :---------------- | :---------------------------------------------- | | `did` | `string` | | `delegateAddress` | `string` | -| `ownerAddress` | `string` | +| `owner` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:574](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L574) +[src/keeper/contracts/DIDRegistry.ts:593](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L593) --- ### removeProvider -▸ **removeProvider**(`did`, `provider`, `from`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **removeProvider**(`did`, `provider`, `from`, `params?`): `Promise`\<`any`\> #### Parameters @@ -1168,58 +1284,58 @@ Contract Receipt | :--------- | :---------------------------------------------- | | `did` | `string` | | `provider` | `string` | -| `from` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:608](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L608) +[src/keeper/contracts/DIDRegistry.ts:627](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L627) --- ### revokePermission -▸ **revokePermission**(`did`, `grantee`, `ownerAddress`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **revokePermission**(`did`, `grantee`, `owner`, `txParams?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------------- | :---------------------------------------------- | -| `did` | `string` | -| `grantee` | `string` | -| `ownerAddress` | `string` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :---------- | :---------------------------------------------- | +| `did` | `string` | +| `grantee` | `string` | +| `owner` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:333](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L333) +[src/keeper/contracts/DIDRegistry.ts:335](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L335) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1227,26 +1343,26 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1254,36 +1370,36 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setDIDRoyalties -▸ **setDIDRoyalties**(`did`, `scheme`, `ownerAddress`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **setDIDRoyalties**(`did`, `scheme`, `owner`, `txParams?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------------- | :---------------------------------------------- | -| `did` | `string` | -| `scheme` | `string` | -| `ownerAddress` | `string` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :---------- | :---------------------------------------------- | +| `did` | `string` | +| `scheme` | `string` | +| `owner` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:342](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L342) +[src/keeper/contracts/DIDRegistry.ts:344](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L344) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1301,13 +1417,37 @@ Contract Receipt #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[ContractBase](ContractBase.md).[someLog](ContractBase.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### transferDIDOwnership -▸ **transferDIDOwnership**(`did`, `newOwnerAddress`, `ownerAddress`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **transferDIDOwnership**(`did`, `newOwnerAddress`, `owner`, `params?`): `Promise`\<`any`\> #### Parameters @@ -1315,22 +1455,22 @@ Contract Receipt | :---------------- | :---------------------------------------------- | | `did` | `string` | | `newOwnerAddress` | `string` | -| `ownerAddress` | `string` | +| `owner` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:359](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L359) +[src/keeper/contracts/DIDRegistry.ts:361](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L361) --- ### updateMetadataUrl -▸ **updateMetadataUrl**(`did`, `checksum`, `ownerAddress`, `url`, `immutableUrl?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **updateMetadataUrl**(`did`, `checksum`, `owner`, `url`, `immutableUrl?`, `txParams?`): `Promise`\<`any`\> It registers a decentralized identifier (aka DID) in the `DIDRegistry` smart contract with a ERC-721 NFT attached to it @@ -1340,26 +1480,26 @@ It registers a decentralized identifier (aka DID) in the `DIDRegistry` smart con | :------------- | :---------------------------------------------- | :------------ | :------------------------------------------------------------------------------------ | | `did` | `string` | `undefined` | The unique identifier of the asset | | `checksum` | `string` | `undefined` | Checksum resulted of hash the asset metadata | -| `ownerAddress` | `string` | `undefined` | Address of the user registering the DID | +| `owner` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user registering the DID | | `url` | `string` | `undefined` | URL to the metadata in the Metadata/Marketplace API | | `immutableUrl` | `string` | `''` | Hash or URL to the metadata stored in a immutable data store like IPFS, Filecoin, etc | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/DIDRegistry.ts:185](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L185) +[src/keeper/contracts/DIDRegistry.ts:186](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L186) --- ### used -▸ **used**(`provId`, `did`, `agentId`, `activityId`, `signatureUsing`, `attributes`, `ownerAddress`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **used**(`provId`, `did`, `agentId`, `activityId`, `signatureUsing`, `attributes`, `owner`, `params?`): `Promise`\<`any`\> #### Parameters @@ -1371,48 +1511,48 @@ Contract Receipt | `activityId` | `string` | | `signatureUsing` | `string` | | `attributes` | `string` | -| `ownerAddress` | `string` | +| `owner` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:466](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L466) +[src/keeper/contracts/DIDRegistry.ts:485](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L485) --- ### wasAssociatedWith -▸ **wasAssociatedWith**(`provId`, `did`, `agentId`, `activityId`, `attributes`, `ownerAddress`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **wasAssociatedWith**(`provId`, `did`, `agentId`, `activityId`, `attributes`, `owner`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------------- | :---------------------------------------------- | -| `provId` | `string` | -| `did` | `string` | -| `agentId` | `string` | -| `activityId` | `string` | -| `attributes` | `string` | -| `ownerAddress` | `string` | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :----------- | :---------------------------------------------- | +| `provId` | `string` | +| `did` | `string` | +| `agentId` | `string` | +| `activityId` | `string` | +| `attributes` | `string` | +| `owner` | [`NvmAccount`](NvmAccount.md) | +| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:516](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L516) +[src/keeper/contracts/DIDRegistry.ts:535](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L535) --- ### wasDerivedFrom -▸ **wasDerivedFrom**(`provId`, `newEntityDid`, `usedEntityDid`, `agentId`, `activityId`, `attributes`, `ownerAddress`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **wasDerivedFrom**(`provId`, `newEntityDid`, `usedEntityDid`, `agentId`, `activityId`, `attributes`, `owner`, `params?`): `Promise`\<`any`\> #### Parameters @@ -1424,22 +1564,22 @@ Contract Receipt | `agentId` | `string` | | `activityId` | `string` | | `attributes` | `string` | -| `ownerAddress` | `string` | +| `owner` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/DIDRegistry.ts:491](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L491) +[src/keeper/contracts/DIDRegistry.ts:510](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L510) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`DIDRegistry`](DIDRegistry.md)\> +▸ **getInstance**(`config`): `Promise`\<[`DIDRegistry`](DIDRegistry.md)\> #### Parameters @@ -1449,7 +1589,7 @@ Contract Receipt #### Returns -`Promise`<[`DIDRegistry`](DIDRegistry.md)\> +`Promise`\<[`DIDRegistry`](DIDRegistry.md)\> #### Overrides @@ -1457,13 +1597,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/DIDRegistry.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/DIDRegistry.ts#L16) +[src/keeper/contracts/DIDRegistry.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/DIDRegistry.ts#L21) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1488,4 +1628,4 @@ Contract Receipt #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/DIDSalesTemplate.md b/docs/api-reference/classes/DIDSalesTemplate.md index 590427462..848b95244 100644 --- a/docs/api-reference/classes/DIDSalesTemplate.md +++ b/docs/api-reference/classes/DIDSalesTemplate.md @@ -4,7 +4,7 @@ ## Hierarchy -- [`BaseTemplate`](BaseTemplate.md)<`DIDSalesTemplateParams`, `any`\> +- [`BaseTemplate`](BaseTemplate.md)\<`DIDSalesTemplateParams`, `any`\> ↳ **`DIDSalesTemplate`** @@ -26,12 +26,14 @@ - [artifactsFolder](DIDSalesTemplate.md#artifactsfolder) - [circuitsFolder](DIDSalesTemplate.md#circuitsfolder) +- [client](DIDSalesTemplate.md#client) - [config](DIDSalesTemplate.md#config) - [instanceConfig](DIDSalesTemplate.md#instanceconfig) - [instantiableConfig](DIDSalesTemplate.md#instantiableconfig) - [logger](DIDSalesTemplate.md#logger) - [nevermined](DIDSalesTemplate.md#nevermined) -- [web3](DIDSalesTemplate.md#web3) +- [publicClient](DIDSalesTemplate.md#publicclient) +- [walletClient](DIDSalesTemplate.md#walletclient) ### Methods @@ -54,12 +56,11 @@ - [getConditionTypes](DIDSalesTemplate.md#getconditiontypes) - [getConditions](DIDSalesTemplate.md#getconditions) - [getFromAddress](DIDSalesTemplate.md#getfromaddress) -- [getInputsOfMethod](DIDSalesTemplate.md#getinputsofmethod) - [getServiceAgreementTemplate](DIDSalesTemplate.md#getserviceagreementtemplate) - [getServiceAgreementTemplateConditionByRef](DIDSalesTemplate.md#getserviceagreementtemplateconditionbyref) - [getServiceAgreementTemplateConditions](DIDSalesTemplate.md#getserviceagreementtemplateconditions) - [getServiceAgreementTemplateDependencies](DIDSalesTemplate.md#getserviceagreementtemplatedependencies) -- [getSignatureOfMethod](DIDSalesTemplate.md#getsignatureofmethod) +- [getTransactionLogs](DIDSalesTemplate.md#gettransactionlogs) - [init](DIDSalesTemplate.md#init) - [instanceFromDDO](DIDSalesTemplate.md#instancefromddo) - [lockConditionIndex](DIDSalesTemplate.md#lockconditionindex) @@ -75,6 +76,7 @@ - [service](DIDSalesTemplate.md#service) - [serviceEndpoint](DIDSalesTemplate.md#serviceendpoint) - [setInstanceConfig](DIDSalesTemplate.md#setinstanceconfig) +- [someLog](DIDSalesTemplate.md#somelog) - [standardContext](DIDSalesTemplate.md#standardcontext) - [track](DIDSalesTemplate.md#track) - [validateAgreement](DIDSalesTemplate.md#validateagreement) @@ -85,7 +87,7 @@ ### constructor -• `Protected` **new DIDSalesTemplate**(`contractName`) +• **new DIDSalesTemplate**(`contractName`): [`DIDSalesTemplate`](DIDSalesTemplate.md) #### Parameters @@ -93,19 +95,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`DIDSalesTemplate`](DIDSalesTemplate.md) + #### Inherited from [BaseTemplate](BaseTemplate.md).[constructor](BaseTemplate.md#constructor) #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L68) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L51) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -113,13 +119,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -127,7 +133,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -141,13 +147,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -155,7 +161,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -169,17 +175,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -187,17 +193,17 @@ BaseTemplate.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -205,13 +211,31 @@ BaseTemplate.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +BaseTemplate.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -223,13 +247,13 @@ BaseTemplate.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -241,17 +265,17 @@ BaseTemplate.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -259,13 +283,13 @@ BaseTemplate.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -277,13 +301,13 @@ BaseTemplate.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -295,31 +319,146 @@ BaseTemplate.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -BaseTemplate.web3 +BaseTemplate.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +BaseTemplate.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### accept -▸ **accept**(`_params`): `Promise`<`boolean`\> +▸ **accept**(`_params`): `Promise`\<`boolean`\> #### Parameters @@ -329,7 +468,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Inherited from @@ -337,13 +476,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L98) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:114](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L114) --- ### agreementId -▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`<`string`\> +▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`\<`string`\> #### Parameters @@ -354,7 +493,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -362,13 +501,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L213) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:202](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L202) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -378,15 +517,15 @@ BaseTemplate.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -394,7 +533,7 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- @@ -412,13 +551,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/DIDSalesTemplate.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/DIDSalesTemplate.ts#L32) +[src/keeper/contracts/templates/DIDSalesTemplate.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/DIDSalesTemplate.ts#L31) --- ### createAgreement -▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -430,12 +569,12 @@ BaseTemplate.web3 | `timeLocks` | `number`[] | | `timeOuts` | `number`[] | | `extraArgs` | `any`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -443,13 +582,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L90) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L73) --- ### createAgreementAndPay -▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -466,12 +605,12 @@ BaseTemplate.web3 | `tokenAddress` | `string` | | `amounts` | `bigint`[] | | `receivers` | `string`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -479,13 +618,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L115) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L98) --- ### createAgreementFromDDO -▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `from`, `timeOuts?`, `txParams?`): `Promise`<`string`\> +▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `timeOuts?`, `txParams?`): `Promise`\<`string`\> Create a new agreement using the data of a DDO. @@ -496,14 +635,13 @@ Create a new agreement using the data of a DDO. | `agreementIdSeed` | `string` | - | | `ddo` | [`DDO`](DDO.md) | DDO. | | `parameters` | `DIDSalesTemplateParams` | | -| `consumer` | [`Account`](Account.md) | - | -| `from` | [`Account`](Account.md) | - | +| `consumer` | [`NvmAccount`](NvmAccount.md) | - | | `timeOuts?` | `number`[] | - | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> true if the call was successful. @@ -513,13 +651,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:222](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L222) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:211](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L211) --- ### createAgreementWithPaymentFromDDO -▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`<`string`\> +▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`\<`string`\> #### Parameters @@ -529,14 +667,14 @@ true if the call was successful. | `ddo` | [`DDO`](DDO.md) | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | | `parameters` | `DIDSalesTemplateParams` | -| `consumer` | [`Account`](Account.md) | -| `from` | [`Account`](Account.md) | +| `consumer` | [`NvmAccount`](NvmAccount.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | | `observer?` | (`orderProgressStep`: [`OrderProgressStep`](../enums/OrderProgressStep.md)) => `void` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -544,7 +682,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L252) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:240](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L240) --- @@ -556,7 +694,7 @@ true if the call was successful. | Name | Type | | :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](Account.md) | +| `publisher` | [`NvmAccount`](NvmAccount.md) | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | | `serviceAttributes` | [`ServiceAttributes`](../interfaces/ServiceAttributes.md) | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | @@ -572,7 +710,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L35) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L48) --- @@ -590,13 +728,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/DIDSalesTemplate.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/DIDSalesTemplate.ts#L28) +[src/keeper/contracts/templates/DIDSalesTemplate.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/DIDSalesTemplate.ts#L27) --- ### extraGen -▸ **extraGen**(`_params`): `Promise`<`any`\> +▸ **extraGen**(`_params`): `Promise`\<`any`\> #### Parameters @@ -606,7 +744,7 @@ true if the call was successful. #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Inherited from @@ -614,13 +752,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:94](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L94) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) --- ### getAgreementCreatedEvent -▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`<`any`[]\> +▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`\<`any`[]\> Generates and returns the agreement creation event. @@ -632,7 +770,7 @@ Generates and returns the agreement creation event. #### Returns -`Promise`<`any`[]\> +`Promise`\<`any`[]\> Agreement created event. @@ -642,13 +780,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:459](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L459) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:450](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L450) --- ### getAgreementData -▸ **getAgreementData**(`agreementId`): `Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +▸ **getAgreementData**(`agreementId`): `Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Parameters @@ -658,7 +796,7 @@ Agreement created event. #### Returns -`Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +`Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Inherited from @@ -666,13 +804,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L21) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L29) --- ### getAgreementIdsFromDDO -▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`<`string`[]\> +▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`\<`string`[]\> Get agreement conditions IDs. @@ -687,7 +825,7 @@ Get agreement conditions IDs. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> The condition IDs. @@ -697,13 +835,13 @@ The condition IDs. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:180](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L180) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:169](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L169) --- ### getAgreementStatus -▸ **getAgreementStatus**(`agreementId`): `Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +▸ **getAgreementStatus**(`agreementId`): `Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> Returns the status of the conditions. @@ -715,7 +853,7 @@ Returns the status of the conditions. #### Returns -`Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +`Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> The conditions status. @@ -725,13 +863,13 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:346](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L346) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:331](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L331) --- ### getAgreementsForDID -▸ **getAgreementsForDID**(`did`): `Promise`<`string`[]\> +▸ **getAgreementsForDID**(`did`): `Promise`\<`string`[]\> #### Parameters @@ -741,7 +879,7 @@ The conditions status. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> #### Inherited from @@ -749,19 +887,19 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:485](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L485) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:476](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L476) --- ### getConditionTypes -▸ **getConditionTypes**(): `Promise`<`string`[]\> +▸ **getConditionTypes**(): `Promise`\<`string`[]\> Conditions address list. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> A list of condition addresses. @@ -771,19 +909,19 @@ A list of condition addresses. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L154) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:137](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L137) --- ### getConditions -▸ **getConditions**(): `Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +▸ **getConditions**(): `Promise`\<`ConditionSmall`[]\> List of condition contracts. #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +`Promise`\<`ConditionSmall`[]\> A list of condition contracts. @@ -793,13 +931,13 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:165](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L165) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L148) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -809,7 +947,7 @@ A list of condition contracts. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -817,31 +955,7 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getInputsOfMethod](BaseTemplate.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- @@ -859,13 +973,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/DIDSalesTemplate.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/DIDSalesTemplate.ts#L90) +[src/keeper/contracts/templates/DIDSalesTemplate.ts:89](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/DIDSalesTemplate.ts#L89) --- ### getServiceAgreementTemplateConditionByRef -▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`<[`ConditionSmall`](ConditionSmall.md)\> +▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`\<`undefined` \| `ConditionSmall`\> #### Parameters @@ -875,7 +989,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)\> +`Promise`\<`undefined` \| `ConditionSmall`\> #### Inherited from @@ -883,7 +997,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:329](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L329) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:314](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L314) --- @@ -901,17 +1015,17 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:324](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L324) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:309](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L309) --- ### getServiceAgreementTemplateDependencies -▸ **getServiceAgreementTemplateDependencies**(): `Promise`<{ `[condition: string]`: `string`[]; }\> +▸ **getServiceAgreementTemplateDependencies**(): `Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Returns -`Promise`<{ `[condition: string]`: `string`[]; }\> +`Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Inherited from @@ -919,49 +1033,50 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:336](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L336) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:321](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L321) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[BaseTemplate](BaseTemplate.md).[getSignatureOfMethod](BaseTemplate.md#getsignatureofmethod) +[BaseTemplate](BaseTemplate.md).[getTransactionLogs](BaseTemplate.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -969,13 +1084,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`): `Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`DIDSalesTemplateParams`\>\> +▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`): `Promise`\<`AgreementInstance`\<`DIDSalesTemplateParams`\>\> #### Parameters @@ -988,7 +1103,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`DIDSalesTemplateParams`\>\> +`Promise`\<`AgreementInstance`\<`DIDSalesTemplateParams`\>\> #### Overrides @@ -996,7 +1111,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/DIDSalesTemplate.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/DIDSalesTemplate.ts#L42) +[src/keeper/contracts/templates/DIDSalesTemplate.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/DIDSalesTemplate.ts#L41) --- @@ -1014,13 +1129,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L74) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L57) --- ### lockTokens -▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams`): `Promise`<`void`\> +▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams?`): `Promise`\<`void`\> #### Parameters @@ -1028,12 +1143,12 @@ readonly `ParamType`[] | :------------- | :---------------------------------------------- | | `tokenAddress` | `any` | | `amounts` | `any` | -| `from` | [`Account`](Account.md) | -| `txParams` | [`TxParameters`](../interfaces/TxParameters.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1041,7 +1156,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:393](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L393) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:382](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L382) --- @@ -1059,7 +1174,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/DIDSalesTemplate.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/DIDSalesTemplate.ts#L25) +[src/keeper/contracts/templates/DIDSalesTemplate.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/DIDSalesTemplate.ts#L24) --- @@ -1083,13 +1198,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/DIDSalesTemplate.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/DIDSalesTemplate.ts#L22) +[src/keeper/contracts/templates/DIDSalesTemplate.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/DIDSalesTemplate.ts#L21) --- ### paramsGen -▸ **paramsGen**(`params`): `Promise`<`DIDSalesTemplateParams`\> +▸ **paramsGen**(`params`): `Promise`\<`DIDSalesTemplateParams`\> Specialize params @@ -1101,7 +1216,7 @@ Specialize params #### Returns -`Promise`<`DIDSalesTemplateParams`\> +`Promise`\<`DIDSalesTemplateParams`\> #### Overrides @@ -1109,13 +1224,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/DIDSalesTemplate.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/DIDSalesTemplate.ts#L19) +[src/keeper/contracts/templates/DIDSalesTemplate.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/DIDSalesTemplate.ts#L18) --- ### paymentData -▸ **paymentData**(`service`): `Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +▸ **paymentData**(`service`): `Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Parameters @@ -1125,7 +1240,7 @@ Specialize params #### Returns -`Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +`Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Inherited from @@ -1133,13 +1248,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L78) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L61) --- ### printAgreementStatus -▸ **printAgreementStatus**(`agreementId`): `Promise`<`void`\> +▸ **printAgreementStatus**(`agreementId`): `Promise`\<`void`\> Prints the agreement status. @@ -1151,7 +1266,7 @@ Prints the agreement status. #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1159,25 +1274,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:429](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L429) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:418](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L418) --- ### process -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> +▸ **process**(`params`, `from`, `txparams?`): `Promise`\<`void`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1185,26 +1300,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:126](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L126) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1212,26 +1327,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1239,7 +1354,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- @@ -1257,7 +1372,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/DIDSalesTemplate.ts:83](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/DIDSalesTemplate.ts#L83) +[src/keeper/contracts/templates/DIDSalesTemplate.ts:82](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/DIDSalesTemplate.ts#L82) --- @@ -1275,13 +1390,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L31) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L44) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1299,13 +1414,37 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[BaseTemplate](BaseTemplate.md).[someLog](BaseTemplate.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### standardContext -▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): [`ConditionContext`](../interfaces/ConditionContext.md) +▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): `ConditionContext` #### Parameters @@ -1317,7 +1456,7 @@ Prints the agreement status. #### Returns -[`ConditionContext`](../interfaces/ConditionContext.md) +`ConditionContext` #### Inherited from @@ -1325,25 +1464,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L200) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:189](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L189) --- ### track -▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`<`boolean`\> +▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`\<`boolean`\> #### Parameters | Name | Type | | :----------- | :------------------------------------------------------ | | `_params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `_from` | [`Account`](Account.md) | +| `_from` | [`NvmAccount`](NvmAccount.md) | | `_txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Inherited from @@ -1351,13 +1490,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:102](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L102) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L118) --- ### validateAgreement -▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`<`void`\> +▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`\<`void`\> #### Parameters @@ -1366,13 +1505,13 @@ Prints the agreement status. | `agreement_id` | `string` | | `did` | `string` | | `params` | `DIDSalesTemplateParams` | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `extra` | `any` | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1380,13 +1519,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:125](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L125) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:141](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L141) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`DIDSalesTemplate`](DIDSalesTemplate.md)\> +▸ **getInstance**(`config`): `Promise`\<[`DIDSalesTemplate`](DIDSalesTemplate.md)\> #### Parameters @@ -1396,7 +1535,7 @@ Prints the agreement status. #### Returns -`Promise`<[`DIDSalesTemplate`](DIDSalesTemplate.md)\> +`Promise`\<[`DIDSalesTemplate`](DIDSalesTemplate.md)\> #### Overrides @@ -1404,13 +1543,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/DIDSalesTemplate.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/DIDSalesTemplate.ts#L86) +[src/keeper/contracts/templates/DIDSalesTemplate.ts:85](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/DIDSalesTemplate.ts#L85) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1435,4 +1574,4 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/Dispenser.md b/docs/api-reference/classes/Dispenser.md index deccf4c6d..b0d56af7c 100644 --- a/docs/api-reference/classes/Dispenser.md +++ b/docs/api-reference/classes/Dispenser.md @@ -26,24 +26,26 @@ - [artifactsFolder](Dispenser.md#artifactsfolder) - [circuitsFolder](Dispenser.md#circuitsfolder) +- [client](Dispenser.md#client) - [config](Dispenser.md#config) - [instanceConfig](Dispenser.md#instanceconfig) - [instantiableConfig](Dispenser.md#instantiableconfig) - [logger](Dispenser.md#logger) - [nevermined](Dispenser.md#nevermined) -- [web3](Dispenser.md#web3) +- [publicClient](Dispenser.md#publicclient) +- [walletClient](Dispenser.md#walletclient) ### Methods - [call](Dispenser.md#call) - [getFromAddress](Dispenser.md#getfromaddress) -- [getInputsOfMethod](Dispenser.md#getinputsofmethod) -- [getSignatureOfMethod](Dispenser.md#getsignatureofmethod) +- [getTransactionLogs](Dispenser.md#gettransactionlogs) - [init](Dispenser.md#init) - [requestTokens](Dispenser.md#requesttokens) - [send](Dispenser.md#send) - [sendFrom](Dispenser.md#sendfrom) - [setInstanceConfig](Dispenser.md#setinstanceconfig) +- [someLog](Dispenser.md#somelog) - [getInstance](Dispenser.md#getinstance) - [setInstanceConfig](Dispenser.md#setinstanceconfig-1) @@ -51,7 +53,7 @@ ### constructor -• **new Dispenser**(`contractName`) +• **new Dispenser**(`contractName`): [`Dispenser`](Dispenser.md) #### Parameters @@ -59,19 +61,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`Dispenser`](Dispenser.md) + #### Inherited from [ContractBase](ContractBase.md).[constructor](ContractBase.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -79,13 +85,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -93,7 +99,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -107,13 +113,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -121,7 +127,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -135,17 +141,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -153,17 +159,17 @@ ContractBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -171,13 +177,31 @@ ContractBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ContractBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -189,13 +213,13 @@ ContractBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -207,17 +231,17 @@ ContractBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -225,13 +249,13 @@ ContractBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -243,13 +267,13 @@ ContractBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -261,31 +285,146 @@ ContractBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ContractBase.web3 +ContractBase.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ContractBase.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -295,15 +434,15 @@ ContractBase.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -311,13 +450,13 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -327,7 +466,7 @@ ContractBase.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -335,73 +474,50 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ContractBase](ContractBase.md).[getInputsOfMethod](ContractBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ContractBase](ContractBase.md).[getSignatureOfMethod](ContractBase.md#getsignatureofmethod) +[ContractBase](ContractBase.md).[getTransactionLogs](ContractBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -409,48 +525,48 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### requestTokens -▸ **requestTokens**(`amount`, `receiverAddress`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **requestTokens**(`amount`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :---------------- | :---------------------------------------------- | -| `amount` | `string` \| `number` \| `bigint` | -| `receiverAddress` | `string` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :---------- | :---------------------------------------------- | +| `amount` | `string` \| `number` \| `bigint` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/Dispenser.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Dispenser.ts#L11) +[src/keeper/contracts/Dispenser.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Dispenser.ts#L14) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -458,26 +574,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -485,13 +601,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -509,13 +625,37 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[ContractBase](ContractBase.md).[someLog](ContractBase.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`Dispenser`](Dispenser.md)\> +▸ **getInstance**(`config`): `Promise`\<[`Dispenser`](Dispenser.md)\> #### Parameters @@ -525,7 +665,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`Dispenser`](Dispenser.md)\> +`Promise`\<[`Dispenser`](Dispenser.md)\> #### Overrides @@ -533,13 +673,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/Dispenser.ts:5](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Dispenser.ts#L5) +[src/keeper/contracts/Dispenser.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Dispenser.ts#L8) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -564,4 +704,4 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/DistributeNFTCollateralCondition.md b/docs/api-reference/classes/DistributeNFTCollateralCondition.md deleted file mode 100644 index 4cd7ceb03..000000000 --- a/docs/api-reference/classes/DistributeNFTCollateralCondition.md +++ /dev/null @@ -1,976 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / DistributeNFTCollateralCondition - -# Class: DistributeNFTCollateralCondition - -Condition allowing to transfer an NFT either to the original owner or a lender -depending on the loan status. - -## Hierarchy - -- [`ProviderCondition`](ProviderCondition.md)<`DistributeNFTCollateralConditionContext`\> - - ↳ **`DistributeNFTCollateralCondition`** - -## Table of contents - -### Constructors - -- [constructor](DistributeNFTCollateralCondition.md#constructor) - -### Properties - -- [address](DistributeNFTCollateralCondition.md#address) -- [contract](DistributeNFTCollateralCondition.md#contract) -- [contractName](DistributeNFTCollateralCondition.md#contractname) -- [events](DistributeNFTCollateralCondition.md#events) -- [version](DistributeNFTCollateralCondition.md#version) - -### Accessors - -- [artifactsFolder](DistributeNFTCollateralCondition.md#artifactsfolder) -- [circuitsFolder](DistributeNFTCollateralCondition.md#circuitsfolder) -- [config](DistributeNFTCollateralCondition.md#config) -- [instanceConfig](DistributeNFTCollateralCondition.md#instanceconfig) -- [instantiableConfig](DistributeNFTCollateralCondition.md#instantiableconfig) -- [logger](DistributeNFTCollateralCondition.md#logger) -- [nevermined](DistributeNFTCollateralCondition.md#nevermined) -- [web3](DistributeNFTCollateralCondition.md#web3) - -### Methods - -- [abortByTimeOut](DistributeNFTCollateralCondition.md#abortbytimeout) -- [call](DistributeNFTCollateralCondition.md#call) -- [fulfill](DistributeNFTCollateralCondition.md#fulfill) -- [fulfillInstance](DistributeNFTCollateralCondition.md#fulfillinstance) -- [fulfillPlain](DistributeNFTCollateralCondition.md#fulfillplain) -- [fulfillWithNode](DistributeNFTCollateralCondition.md#fulfillwithnode) -- [generateId](DistributeNFTCollateralCondition.md#generateid) -- [generateIdHash](DistributeNFTCollateralCondition.md#generateidhash) -- [generateIdWithSeed](DistributeNFTCollateralCondition.md#generateidwithseed) -- [getConditionFulfilledEvent](DistributeNFTCollateralCondition.md#getconditionfulfilledevent) -- [getFromAddress](DistributeNFTCollateralCondition.md#getfromaddress) -- [getInputsOfMethod](DistributeNFTCollateralCondition.md#getinputsofmethod) -- [getSignatureOfMethod](DistributeNFTCollateralCondition.md#getsignatureofmethod) -- [hashValues](DistributeNFTCollateralCondition.md#hashvalues) -- [hashValuesPlain](DistributeNFTCollateralCondition.md#hashvaluesplain) -- [init](DistributeNFTCollateralCondition.md#init) -- [instance](DistributeNFTCollateralCondition.md#instance) -- [instanceFromDDO](DistributeNFTCollateralCondition.md#instancefromddo) -- [nodeMethod](DistributeNFTCollateralCondition.md#nodemethod) -- [params](DistributeNFTCollateralCondition.md#params) -- [paramsFromDDO](DistributeNFTCollateralCondition.md#paramsfromddo) -- [send](DistributeNFTCollateralCondition.md#send) -- [sendFrom](DistributeNFTCollateralCondition.md#sendfrom) -- [setInstanceConfig](DistributeNFTCollateralCondition.md#setinstanceconfig) -- [getInstance](DistributeNFTCollateralCondition.md#getinstance) -- [setInstanceConfig](DistributeNFTCollateralCondition.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new DistributeNFTCollateralCondition**(`contractName`) - -#### Parameters - -| Name | Type | -| :------------- | :------- | -| `contractName` | `string` | - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) - -## Properties - -### address - -• **address**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) - ---- - -### contract - -• **contract**: `BaseContract` = `null` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) - ---- - -### contractName - -• `Readonly` **contractName**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) - ---- - -### events - -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) - ---- - -### version - -• **version**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ProviderCondition.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ProviderCondition.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -ProviderCondition.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ProviderCondition.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ProviderCondition.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -ProviderCondition.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -ProviderCondition.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -ProviderCondition.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### abortByTimeOut - -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------- | -| `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) - ---- - -### call - -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> - -#### Type parameters - -| Name | -| :--- | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | - -#### Returns - -`Promise`<`T`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) - ---- - -### fulfill - -▸ **fulfill**(`agreementId`, `did`, `vaultAddress`, `nftContractAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -Fulfill the distribute NFT collateral condition. -Only the borrower or the lender can call this method. - -#### Parameters - -| Name | Type | Description | -| :------------------- | :---------------------------------------------- | :--------------------------------------------------------- | -| `agreementId` | `string` | The agreement identifier. | -| `did` | `string` | The DID of the asset with NFTs. | -| `vaultAddress` | `string` | The address of the vault contract where the NFT is locked. | -| `nftContractAddress` | `string` | The address of the NFT721 contract | -| `from?` | [`Account`](Account.md) | | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -Condition state. - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) - -#### Defined in - -[src/keeper/contracts/defi/DistributeNFT721CollateralCondition.ts:58](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/DistributeNFT721CollateralCondition.ts#L58) - ---- - -### fulfillInstance - -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) - ---- - -### fulfillPlain - -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :------------ | :-------------------------------------------------------- | :------------ | -| `agreementId` | `string` | `undefined` | -| `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) - ---- - -### fulfillWithNode - -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) - ---- - -### generateId - -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) - ---- - -### generateIdHash - -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...values` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) - ---- - -### generateIdWithSeed - -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<[`string`, `string`]\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) - ---- - -### getConditionFulfilledEvent - -▸ **getConditionFulfilledEvent**(`agreementId`): [`EventResult`](../code-reference.md#eventresult) - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | - -#### Returns - -[`EventResult`](../code-reference.md#eventresult) - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) - ---- - -### getFromAddress - -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `from?` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) - ---- - -### hashValues - -▸ **hashValues**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) - ---- - -### hashValuesPlain - -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) - ---- - -### init - -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) - ---- - -### instance - -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) - ---- - -### instanceFromDDO - -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :------------ | :-------------------------------------------------------------------- | -| `agreementId` | `string` | -| `ctx` | `DistributeNFTCollateralConditionContext` | -| `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) - ---- - -### nodeMethod - -▸ **nodeMethod**(): [`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Returns - -[`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L208) - ---- - -### params - -▸ **params**(`did`, `vaultAddress`, `nftContractAddress`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> - -Generates the ash of condition inputs. - -#### Parameters - -| Name | Type | Description | -| :------------------- | :------- | :--------------------------------------------------------- | -| `did` | `string` | The DID of the asset with NFTs. | -| `vaultAddress` | `string` | The address of the vault contract where the NFT is locked. | -| `nftContractAddress` | `string` | The address of the NFT721 contract | - -#### Returns - -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> - -Hash of all the values - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) - -#### Defined in - -[src/keeper/contracts/defi/DistributeNFT721CollateralCondition.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/DistributeNFT721CollateralCondition.ts#L35) - ---- - -### paramsFromDDO - -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :--------------- | :---------------------------------------- | -| `«destructured»` | `DistributeNFTCollateralConditionContext` | - -#### Returns - -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) - -#### Defined in - -[src/keeper/contracts/defi/DistributeNFT721CollateralCondition.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/DistributeNFT721CollateralCondition.ts#L39) - ---- - -### send - -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) - ---- - -### sendFrom - -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### getInstance - -▸ `Static` **getInstance**(`config`): `Promise`<[`DistributeNFTCollateralCondition`](DistributeNFTCollateralCondition.md)\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`Promise`<[`DistributeNFTCollateralCondition`](DistributeNFTCollateralCondition.md)\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) - -#### Defined in - -[src/keeper/contracts/defi/DistributeNFT721CollateralCondition.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/DistributeNFT721CollateralCondition.ts#L17) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/DynamicCreditsOverLimit.md b/docs/api-reference/classes/DynamicCreditsOverLimit.md new file mode 100644 index 000000000..d7978ebd8 --- /dev/null +++ b/docs/api-reference/classes/DynamicCreditsOverLimit.md @@ -0,0 +1,184 @@ +[@nevermined-io/sdk](../code-reference.md) / DynamicCreditsOverLimit + +# Class: DynamicCreditsOverLimit + +## Hierarchy + +- [`NFTError`](NFTError.md) + + ↳ **`DynamicCreditsOverLimit`** + +## Table of contents + +### Constructors + +- [constructor](DynamicCreditsOverLimit.md#constructor) + +### Properties + +- [cause](DynamicCreditsOverLimit.md#cause) +- [message](DynamicCreditsOverLimit.md#message) +- [name](DynamicCreditsOverLimit.md#name) +- [stack](DynamicCreditsOverLimit.md#stack) +- [prepareStackTrace](DynamicCreditsOverLimit.md#preparestacktrace) +- [stackTraceLimit](DynamicCreditsOverLimit.md#stacktracelimit) + +### Methods + +- [captureStackTrace](DynamicCreditsOverLimit.md#capturestacktrace) + +## Constructors + +### constructor + +• **new DynamicCreditsOverLimit**(`message`): [`DynamicCreditsOverLimit`](DynamicCreditsOverLimit.md) + +#### Parameters + +| Name | Type | +| :-------- | :------- | +| `message` | `string` | + +#### Returns + +[`DynamicCreditsOverLimit`](DynamicCreditsOverLimit.md) + +#### Overrides + +[NFTError](NFTError.md).[constructor](NFTError.md#constructor) + +#### Defined in + +[src/errors/NeverminedErrors.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L44) + +## Properties + +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +[NFTError](NFTError.md).[cause](NFTError.md#cause) + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + +### message + +• **message**: `string` + +#### Inherited from + +[NFTError](NFTError.md).[message](NFTError.md#message) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1077 + +--- + +### name + +• **name**: `string` + +#### Inherited from + +[NFTError](NFTError.md).[name](NFTError.md#name) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1076 + +--- + +### stack + +• `Optional` **stack**: `string` + +#### Inherited from + +[NFTError](NFTError.md).[stack](NFTError.md#stack) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1078 + +--- + +### prepareStackTrace + +▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` + +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Type declaration + +▸ (`err`, `stackTraces`): `any` + +##### Parameters + +| Name | Type | +| :------------ | :----------- | +| `err` | `Error` | +| `stackTraces` | `CallSite`[] | + +##### Returns + +`any` + +#### Inherited from + +[NFTError](NFTError.md).[prepareStackTrace](NFTError.md#preparestacktrace) + +#### Defined in + +node_modules/@types/node/globals.d.ts:28 + +--- + +### stackTraceLimit + +▪ `Static` **stackTraceLimit**: `number` + +#### Inherited from + +[NFTError](NFTError.md).[stackTraceLimit](NFTError.md#stacktracelimit) + +#### Defined in + +node_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace + +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Create .stack property on a target object + +#### Parameters + +| Name | Type | +| :---------------- | :--------- | +| `targetObject` | `object` | +| `constructorOpt?` | `Function` | + +#### Returns + +`void` + +#### Inherited from + +[NFTError](NFTError.md).[captureStackTrace](NFTError.md#capturestacktrace) + +#### Defined in + +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/DynamicCreditsUnderLimit.md b/docs/api-reference/classes/DynamicCreditsUnderLimit.md new file mode 100644 index 000000000..85c366189 --- /dev/null +++ b/docs/api-reference/classes/DynamicCreditsUnderLimit.md @@ -0,0 +1,184 @@ +[@nevermined-io/sdk](../code-reference.md) / DynamicCreditsUnderLimit + +# Class: DynamicCreditsUnderLimit + +## Hierarchy + +- [`NFTError`](NFTError.md) + + ↳ **`DynamicCreditsUnderLimit`** + +## Table of contents + +### Constructors + +- [constructor](DynamicCreditsUnderLimit.md#constructor) + +### Properties + +- [cause](DynamicCreditsUnderLimit.md#cause) +- [message](DynamicCreditsUnderLimit.md#message) +- [name](DynamicCreditsUnderLimit.md#name) +- [stack](DynamicCreditsUnderLimit.md#stack) +- [prepareStackTrace](DynamicCreditsUnderLimit.md#preparestacktrace) +- [stackTraceLimit](DynamicCreditsUnderLimit.md#stacktracelimit) + +### Methods + +- [captureStackTrace](DynamicCreditsUnderLimit.md#capturestacktrace) + +## Constructors + +### constructor + +• **new DynamicCreditsUnderLimit**(`message`): [`DynamicCreditsUnderLimit`](DynamicCreditsUnderLimit.md) + +#### Parameters + +| Name | Type | +| :-------- | :------- | +| `message` | `string` | + +#### Returns + +[`DynamicCreditsUnderLimit`](DynamicCreditsUnderLimit.md) + +#### Overrides + +[NFTError](NFTError.md).[constructor](NFTError.md#constructor) + +#### Defined in + +[src/errors/NeverminedErrors.ts:50](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L50) + +## Properties + +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +[NFTError](NFTError.md).[cause](NFTError.md#cause) + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + +### message + +• **message**: `string` + +#### Inherited from + +[NFTError](NFTError.md).[message](NFTError.md#message) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1077 + +--- + +### name + +• **name**: `string` + +#### Inherited from + +[NFTError](NFTError.md).[name](NFTError.md#name) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1076 + +--- + +### stack + +• `Optional` **stack**: `string` + +#### Inherited from + +[NFTError](NFTError.md).[stack](NFTError.md#stack) + +#### Defined in + +node_modules/typescript/lib/lib.es5.d.ts:1078 + +--- + +### prepareStackTrace + +▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` + +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Type declaration + +▸ (`err`, `stackTraces`): `any` + +##### Parameters + +| Name | Type | +| :------------ | :----------- | +| `err` | `Error` | +| `stackTraces` | `CallSite`[] | + +##### Returns + +`any` + +#### Inherited from + +[NFTError](NFTError.md).[prepareStackTrace](NFTError.md#preparestacktrace) + +#### Defined in + +node_modules/@types/node/globals.d.ts:28 + +--- + +### stackTraceLimit + +▪ `Static` **stackTraceLimit**: `number` + +#### Inherited from + +[NFTError](NFTError.md).[stackTraceLimit](NFTError.md#stacktracelimit) + +#### Defined in + +node_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace + +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Create .stack property on a target object + +#### Parameters + +| Name | Type | +| :---------------- | :--------- | +| `targetObject` | `object` | +| `constructorOpt?` | `Function` | + +#### Returns + +`void` + +#### Inherited from + +[NFTError](NFTError.md).[captureStackTrace](NFTError.md#capturestacktrace) + +#### Defined in + +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/EscrowComputeExecutionTemplate.md b/docs/api-reference/classes/EscrowComputeExecutionTemplate.md index 1b845d9e5..606452c1d 100644 --- a/docs/api-reference/classes/EscrowComputeExecutionTemplate.md +++ b/docs/api-reference/classes/EscrowComputeExecutionTemplate.md @@ -4,7 +4,7 @@ ## Hierarchy -- [`BaseTemplate`](BaseTemplate.md)<`EscrowComputeExecutionParams`, [`ServiceCompute`](../interfaces/ServiceCompute.md)\> +- [`BaseTemplate`](BaseTemplate.md)\<`EscrowComputeExecutionParams`, [`ServiceCompute`](../interfaces/ServiceCompute.md)\> ↳ **`EscrowComputeExecutionTemplate`** @@ -26,12 +26,14 @@ - [artifactsFolder](EscrowComputeExecutionTemplate.md#artifactsfolder) - [circuitsFolder](EscrowComputeExecutionTemplate.md#circuitsfolder) +- [client](EscrowComputeExecutionTemplate.md#client) - [config](EscrowComputeExecutionTemplate.md#config) - [instanceConfig](EscrowComputeExecutionTemplate.md#instanceconfig) - [instantiableConfig](EscrowComputeExecutionTemplate.md#instantiableconfig) - [logger](EscrowComputeExecutionTemplate.md#logger) - [nevermined](EscrowComputeExecutionTemplate.md#nevermined) -- [web3](EscrowComputeExecutionTemplate.md#web3) +- [publicClient](EscrowComputeExecutionTemplate.md#publicclient) +- [walletClient](EscrowComputeExecutionTemplate.md#walletclient) ### Methods @@ -54,12 +56,11 @@ - [getConditionTypes](EscrowComputeExecutionTemplate.md#getconditiontypes) - [getConditions](EscrowComputeExecutionTemplate.md#getconditions) - [getFromAddress](EscrowComputeExecutionTemplate.md#getfromaddress) -- [getInputsOfMethod](EscrowComputeExecutionTemplate.md#getinputsofmethod) - [getServiceAgreementTemplate](EscrowComputeExecutionTemplate.md#getserviceagreementtemplate) - [getServiceAgreementTemplateConditionByRef](EscrowComputeExecutionTemplate.md#getserviceagreementtemplateconditionbyref) - [getServiceAgreementTemplateConditions](EscrowComputeExecutionTemplate.md#getserviceagreementtemplateconditions) - [getServiceAgreementTemplateDependencies](EscrowComputeExecutionTemplate.md#getserviceagreementtemplatedependencies) -- [getSignatureOfMethod](EscrowComputeExecutionTemplate.md#getsignatureofmethod) +- [getTransactionLogs](EscrowComputeExecutionTemplate.md#gettransactionlogs) - [init](EscrowComputeExecutionTemplate.md#init) - [instanceFromDDO](EscrowComputeExecutionTemplate.md#instancefromddo) - [lockConditionIndex](EscrowComputeExecutionTemplate.md#lockconditionindex) @@ -76,6 +77,7 @@ - [service](EscrowComputeExecutionTemplate.md#service) - [serviceEndpoint](EscrowComputeExecutionTemplate.md#serviceendpoint) - [setInstanceConfig](EscrowComputeExecutionTemplate.md#setinstanceconfig) +- [someLog](EscrowComputeExecutionTemplate.md#somelog) - [standardContext](EscrowComputeExecutionTemplate.md#standardcontext) - [track](EscrowComputeExecutionTemplate.md#track) - [validateAgreement](EscrowComputeExecutionTemplate.md#validateagreement) @@ -86,7 +88,7 @@ ### constructor -• `Protected` **new EscrowComputeExecutionTemplate**(`contractName`) +• **new EscrowComputeExecutionTemplate**(`contractName`): [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) #### Parameters @@ -94,19 +96,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) + #### Inherited from [BaseTemplate](BaseTemplate.md).[constructor](BaseTemplate.md#constructor) #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L68) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L51) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -114,13 +120,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -128,7 +134,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -142,13 +148,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -156,7 +162,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -170,17 +176,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -188,17 +194,17 @@ BaseTemplate.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -206,13 +212,31 @@ BaseTemplate.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +BaseTemplate.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -224,13 +248,13 @@ BaseTemplate.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -242,17 +266,17 @@ BaseTemplate.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -260,13 +284,13 @@ BaseTemplate.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -278,13 +302,13 @@ BaseTemplate.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -296,31 +320,146 @@ BaseTemplate.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +BaseTemplate.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -BaseTemplate.web3 +BaseTemplate.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### accept -▸ **accept**(`_params`): `Promise`<`boolean`\> +▸ **accept**(`_params`): `Promise`\<`boolean`\> #### Parameters @@ -330,7 +469,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Inherited from @@ -338,13 +477,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L98) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:114](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L114) --- ### agreementId -▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`<`string`\> +▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`\<`string`\> #### Parameters @@ -355,7 +494,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -363,13 +502,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L213) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:202](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L202) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -379,15 +518,15 @@ BaseTemplate.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -395,7 +534,7 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- @@ -413,13 +552,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:102](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L102) +[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:125](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L125) --- ### createAgreement -▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -431,12 +570,12 @@ BaseTemplate.web3 | `timeLocks` | `number`[] | | `timeOuts` | `number`[] | | `extraArgs` | `any`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -444,13 +583,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L90) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L73) --- ### createAgreementAndPay -▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -467,12 +606,12 @@ BaseTemplate.web3 | `tokenAddress` | `string` | | `amounts` | `bigint`[] | | `receivers` | `string`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -480,13 +619,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L115) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L98) --- ### createAgreementFromDDO -▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `from`, `timeOuts?`, `txParams?`): `Promise`<`string`\> +▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `timeOuts?`, `txParams?`): `Promise`\<`string`\> Create a new agreement using the data of a DDO. @@ -497,14 +636,13 @@ Create a new agreement using the data of a DDO. | `agreementIdSeed` | `string` | - | | `ddo` | [`DDO`](DDO.md) | DDO. | | `parameters` | `EscrowComputeExecutionParams` | | -| `consumer` | [`Account`](Account.md) | - | -| `from` | [`Account`](Account.md) | - | +| `consumer` | [`NvmAccount`](NvmAccount.md) | - | | `timeOuts?` | `number`[] | - | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> true if the call was successful. @@ -514,13 +652,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:222](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L222) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:211](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L211) --- ### createAgreementWithPaymentFromDDO -▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`<`string`\> +▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`\<`string`\> #### Parameters @@ -530,14 +668,14 @@ true if the call was successful. | `ddo` | [`DDO`](DDO.md) | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | | `parameters` | `EscrowComputeExecutionParams` | -| `consumer` | [`Account`](Account.md) | -| `from` | [`Account`](Account.md) | +| `consumer` | [`NvmAccount`](NvmAccount.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | | `observer?` | (`orderProgressStep`: [`OrderProgressStep`](../enums/OrderProgressStep.md)) => `void` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -545,7 +683,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L252) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:240](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L240) --- @@ -557,7 +695,7 @@ true if the call was successful. | Name | Type | | :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](Account.md) | +| `publisher` | [`NvmAccount`](NvmAccount.md) | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | | `serviceAttributes` | [`ServiceAttributes`](../interfaces/ServiceAttributes.md) | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | @@ -573,7 +711,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L35) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L48) --- @@ -591,13 +729,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L39) +[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L38) --- ### extraGen -▸ **extraGen**(`_params`): `Promise`<`any`\> +▸ **extraGen**(`_params`): `Promise`\<`any`\> #### Parameters @@ -607,7 +745,7 @@ true if the call was successful. #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Inherited from @@ -615,13 +753,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:94](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L94) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) --- ### getAgreementCreatedEvent -▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`<`any`[]\> +▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`\<`any`[]\> Generates and returns the agreement creation event. @@ -633,7 +771,7 @@ Generates and returns the agreement creation event. #### Returns -`Promise`<`any`[]\> +`Promise`\<`any`[]\> Agreement created event. @@ -643,13 +781,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:459](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L459) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:450](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L450) --- ### getAgreementData -▸ **getAgreementData**(`agreementId`): `Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +▸ **getAgreementData**(`agreementId`): `Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Parameters @@ -659,7 +797,7 @@ Agreement created event. #### Returns -`Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +`Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Inherited from @@ -667,13 +805,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L21) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L29) --- ### getAgreementIdsFromDDO -▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`<`string`[]\> +▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`\<`string`[]\> Get agreement conditions IDs. @@ -688,7 +826,7 @@ Get agreement conditions IDs. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> The condition IDs. @@ -698,13 +836,13 @@ The condition IDs. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:180](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L180) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:169](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L169) --- ### getAgreementStatus -▸ **getAgreementStatus**(`agreementId`): `Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +▸ **getAgreementStatus**(`agreementId`): `Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> Returns the status of the conditions. @@ -716,7 +854,7 @@ Returns the status of the conditions. #### Returns -`Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +`Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> The conditions status. @@ -726,13 +864,13 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:346](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L346) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:331](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L331) --- ### getAgreementsForDID -▸ **getAgreementsForDID**(`did`): `Promise`<`string`[]\> +▸ **getAgreementsForDID**(`did`): `Promise`\<`string`[]\> #### Parameters @@ -742,7 +880,7 @@ The conditions status. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> #### Inherited from @@ -750,19 +888,19 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:485](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L485) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:476](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L476) --- ### getConditionTypes -▸ **getConditionTypes**(): `Promise`<`string`[]\> +▸ **getConditionTypes**(): `Promise`\<`string`[]\> Conditions address list. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> A list of condition addresses. @@ -772,19 +910,19 @@ A list of condition addresses. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L154) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:137](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L137) --- ### getConditions -▸ **getConditions**(): `Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +▸ **getConditions**(): `Promise`\<`ConditionSmall`[]\> List of condition contracts. #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +`Promise`\<`ConditionSmall`[]\> A list of condition contracts. @@ -794,13 +932,13 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:165](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L165) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L148) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -810,7 +948,7 @@ A list of condition contracts. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -818,31 +956,7 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getInputsOfMethod](BaseTemplate.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- @@ -854,13 +968,16 @@ readonly `ParamType`[] `Object` -| Name | Type | -| :-------------------- | :------------------------------------------------------------------------------------------ | -| `conditionDependency` | { `[condition: string]`: `string`[]; } | -| `conditions` | [`ServiceAgreementTemplateCondition`](../interfaces/ServiceAgreementTemplateCondition.md)[] | -| `contractName` | `string` | -| `events` | [`ServiceAgreementTemplateEvent`](../interfaces/ServiceAgreementTemplateEvent.md)[] | -| `fulfillmentOrder` | `string`[] | +| Name | Type | +| :------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `conditionDependency` | \{ `escrowPaymentCondition`: `string`[] ; `lockPayment`: `never`[] = []; `serviceExecution`: `never`[] = [] } | +| `conditionDependency.escrowPaymentCondition` | `string`[] | +| `conditionDependency.lockPayment` | `never`[] | +| `conditionDependency.serviceExecution` | `never`[] | +| `conditions` | \{ `contractName`: `string` = 'LockPaymentCondition'; `events`: \{ `actorType`: `string` = 'publisher'; `handler`: \{ `functionName`: `string` = 'fulfillAccessCondition'; `moduleName`: `string` = 'lockPaymentCondition'; `version`: `string` = '0.1' } ; `name`: `string` = 'Fulfilled' }[] ; `functionName`: `string` = 'fulfill'; `name`: `string` = 'lockPayment'; `parameters`: (\{ `name`: `string` = '\_did'; `type`: `string` = 'bytes32'; `value`: `string` = '' } \| \{ `name`: `string` = '\_amounts'; `type`: `string` = 'uint256[]'; `value`: `never`[] = [] })[] ; `timelock`: `number` = 0; `timeout`: `number` = 0 }[] | +| `contractName` | `string` | +| `events` | \{ `actorType`: `string` = 'consumer'; `handler`: \{ `functionName`: `string` = 'fulfillLockPaymentCondition'; `moduleName`: `string` = 'serviceExecutionTemplate'; `version`: `string` = '0.1' } ; `name`: `string` = 'AgreementCreated' }[] | +| `fulfillmentOrder` | `string`[] | #### Overrides @@ -868,13 +985,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L90) +[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:89](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L89) --- ### getServiceAgreementTemplateConditionByRef -▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`<[`ConditionSmall`](ConditionSmall.md)\> +▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`\<`undefined` \| `ConditionSmall`\> #### Parameters @@ -884,7 +1001,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)\> +`Promise`\<`undefined` \| `ConditionSmall`\> #### Inherited from @@ -892,7 +1009,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:329](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L329) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:314](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L314) --- @@ -910,17 +1027,17 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:324](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L324) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:309](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L309) --- ### getServiceAgreementTemplateDependencies -▸ **getServiceAgreementTemplateDependencies**(): `Promise`<{ `[condition: string]`: `string`[]; }\> +▸ **getServiceAgreementTemplateDependencies**(): `Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Returns -`Promise`<{ `[condition: string]`: `string`[]; }\> +`Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Inherited from @@ -928,49 +1045,50 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:336](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L336) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:321](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L321) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[BaseTemplate](BaseTemplate.md).[getSignatureOfMethod](BaseTemplate.md#getsignatureofmethod) +[BaseTemplate](BaseTemplate.md).[getTransactionLogs](BaseTemplate.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -978,13 +1096,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`): `Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`EscrowComputeExecutionParams`\>\> +▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`): `Promise`\<`AgreementInstance`\<`EscrowComputeExecutionParams`\>\> #### Parameters @@ -997,7 +1115,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`EscrowComputeExecutionParams`\>\> +`Promise`\<`AgreementInstance`\<`EscrowComputeExecutionParams`\>\> #### Overrides @@ -1005,7 +1123,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:108](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L108) +[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L131) --- @@ -1023,13 +1141,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L74) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L57) --- ### lockTokens -▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams`): `Promise`<`void`\> +▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams?`): `Promise`\<`void`\> #### Parameters @@ -1037,12 +1155,12 @@ readonly `ParamType`[] | :------------- | :---------------------------------------------- | | `tokenAddress` | `any` | | `amounts` | `any` | -| `from` | [`Account`](Account.md) | -| `txParams` | [`TxParameters`](../interfaces/TxParameters.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1050,7 +1168,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:393](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L393) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:382](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L382) --- @@ -1068,7 +1186,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:36](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L36) +[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L35) --- @@ -1078,9 +1196,9 @@ readonly `ParamType`[] #### Parameters -| Name | Type | -| :--------- | :---------------------- | -| `consumer` | [`Account`](Account.md) | +| Name | Type | +| :--------- | :---------------------------- | +| `consumer` | [`NvmAccount`](NvmAccount.md) | #### Returns @@ -1092,13 +1210,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:98](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L98) +[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:121](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L121) --- ### paramsGen -▸ **paramsGen**(`params`): `Promise`<`EscrowComputeExecutionParams`\> +▸ **paramsGen**(`params`): `Promise`\<`EscrowComputeExecutionParams`\> Specialize params @@ -1110,7 +1228,7 @@ Specialize params #### Returns -`Promise`<`EscrowComputeExecutionParams`\> +`Promise`\<`EscrowComputeExecutionParams`\> #### Overrides @@ -1118,13 +1236,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L22) +[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L21) --- ### paymentData -▸ **paymentData**(`service`): `Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +▸ **paymentData**(`service`): `Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Parameters @@ -1134,7 +1252,7 @@ Specialize params #### Returns -`Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +`Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Inherited from @@ -1142,13 +1260,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L78) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L61) --- ### printAgreementStatus -▸ **printAgreementStatus**(`agreementId`): `Promise`<`void`\> +▸ **printAgreementStatus**(`agreementId`): `Promise`\<`void`\> Prints the agreement status. @@ -1160,7 +1278,7 @@ Prints the agreement status. #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1168,25 +1286,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:429](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L429) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:418](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L418) --- ### process -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> +▸ **process**(`params`, `from`, `txparams?`): `Promise`\<`void`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1194,40 +1312,40 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:126](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L126) --- ### providerConfig -▸ **providerConfig**(): `Promise`<{ `description`: `string` = ''; `environment`: { `cluster`: { `type`: `string` = 'Kubernetes'; `url`: `string` = 'http://10.0.0.17/xxx' } ; `supportedContainers`: { `checksum`: `string` = 'sha256:cb57ecfa6ebbefd8ffc7f75c0f00e57a7fa739578a429b6f72a0df19315deadc'; `image`: `string` = 'tensorflow/tensorflow'; `tag`: `string` = 'latest' }[] ; `supportedServers`: { `cpu`: `string` = '16'; `disk`: `string` = '160gb'; `gpu`: `string` = '0'; `maxExecutionTime`: `number` = 86400; `memory`: `string` = '128gb'; `price`: `string` = '50'; `serverId`: `string` = '1'; `serverType`: `string` = 'xlsize' }[] } ; `type`: `string` = 'Azure' }\> +▸ **providerConfig**(): `Promise`\<\{ `description`: `string` = ''; `environment`: \{ `cluster`: \{ `type`: `string` = 'Kubernetes'; `url`: `string` = 'http://10.0.0.17/xxx' } ; `supportedContainers`: \{ `checksum`: `string` = 'sha256:cb57ecfa6ebbefd8ffc7f75c0f00e57a7fa739578a429b6f72a0df19315deadc'; `image`: `string` = 'tensorflow/tensorflow'; `tag`: `string` = 'latest' }[] ; `supportedServers`: \{ `cpu`: `string` = '16'; `disk`: `string` = '160gb'; `gpu`: `string` = '0'; `maxExecutionTime`: `number` = 86400; `memory`: `string` = '128gb'; `price`: `string` = '50'; `serverId`: `string` = '1'; `serverType`: `string` = 'xlsize' }[] } ; `type`: `string` = 'Azure' }\> #### Returns -`Promise`<{ `description`: `string` = ''; `environment`: { `cluster`: { `type`: `string` = 'Kubernetes'; `url`: `string` = 'http://10.0.0.17/xxx' } ; `supportedContainers`: { `checksum`: `string` = 'sha256:cb57ecfa6ebbefd8ffc7f75c0f00e57a7fa739578a429b6f72a0df19315deadc'; `image`: `string` = 'tensorflow/tensorflow'; `tag`: `string` = 'latest' }[] ; `supportedServers`: { `cpu`: `string` = '16'; `disk`: `string` = '160gb'; `gpu`: `string` = '0'; `maxExecutionTime`: `number` = 86400; `memory`: `string` = '128gb'; `price`: `string` = '50'; `serverId`: `string` = '1'; `serverType`: `string` = 'xlsize' }[] } ; `type`: `string` = 'Azure' }\> +`Promise`\<\{ `description`: `string` = ''; `environment`: \{ `cluster`: \{ `type`: `string` = 'Kubernetes'; `url`: `string` = 'http://10.0.0.17/xxx' } ; `supportedContainers`: \{ `checksum`: `string` = 'sha256:cb57ecfa6ebbefd8ffc7f75c0f00e57a7fa739578a429b6f72a0df19315deadc'; `image`: `string` = 'tensorflow/tensorflow'; `tag`: `string` = 'latest' }[] ; `supportedServers`: \{ `cpu`: `string` = '16'; `disk`: `string` = '160gb'; `gpu`: `string` = '0'; `maxExecutionTime`: `number` = 86400; `memory`: `string` = '128gb'; `price`: `string` = '50'; `serverId`: `string` = '1'; `serverType`: `string` = 'xlsize' }[] } ; `type`: `string` = 'Azure' }\> #### Defined in -[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L43) +[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:42](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L42) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1235,26 +1353,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1262,7 +1380,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- @@ -1280,7 +1398,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:94](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L94) +[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:117](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L117) --- @@ -1298,13 +1416,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L31) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L44) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1322,13 +1440,37 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[BaseTemplate](BaseTemplate.md).[someLog](BaseTemplate.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### standardContext -▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): [`ConditionContext`](../interfaces/ConditionContext.md) +▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): `ConditionContext` #### Parameters @@ -1340,7 +1482,7 @@ Prints the agreement status. #### Returns -[`ConditionContext`](../interfaces/ConditionContext.md) +`ConditionContext` #### Inherited from @@ -1348,25 +1490,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L200) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:189](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L189) --- ### track -▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`<`boolean`\> +▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`\<`boolean`\> #### Parameters | Name | Type | | :----------- | :------------------------------------------------------ | | `_params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `_from` | [`Account`](Account.md) | +| `_from` | [`NvmAccount`](NvmAccount.md) | | `_txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Inherited from @@ -1374,13 +1516,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:102](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L102) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L118) --- ### validateAgreement -▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`<`void`\> +▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`\<`void`\> #### Parameters @@ -1389,13 +1531,13 @@ Prints the agreement status. | `agreement_id` | `string` | | `did` | `string` | | `params` | `EscrowComputeExecutionParams` | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `extra` | `any` | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1403,13 +1545,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:125](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L125) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:141](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L141) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md)\> +▸ **getInstance**(`config`): `Promise`\<[`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md)\> #### Parameters @@ -1419,7 +1561,7 @@ Prints the agreement status. #### Returns -`Promise`<[`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md)\> +`Promise`\<[`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md)\> #### Overrides @@ -1427,13 +1569,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L27) +[src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/EscrowComputeExecutionTemplate.ts#L26) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1458,4 +1600,4 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/EscrowPaymentCondition.md b/docs/api-reference/classes/EscrowPaymentCondition.md index 21d607b15..e56b18c7f 100644 --- a/docs/api-reference/classes/EscrowPaymentCondition.md +++ b/docs/api-reference/classes/EscrowPaymentCondition.md @@ -4,7 +4,7 @@ ## Hierarchy -- [`ProviderCondition`](ProviderCondition.md)<`EscrowPaymentConditionContext`\> +- `ProviderCondition`\<`EscrowPaymentConditionContext`\> ↳ **`EscrowPaymentCondition`** @@ -26,12 +26,14 @@ - [artifactsFolder](EscrowPaymentCondition.md#artifactsfolder) - [circuitsFolder](EscrowPaymentCondition.md#circuitsfolder) +- [client](EscrowPaymentCondition.md#client) - [config](EscrowPaymentCondition.md#config) - [instanceConfig](EscrowPaymentCondition.md#instanceconfig) - [instantiableConfig](EscrowPaymentCondition.md#instantiableconfig) - [logger](EscrowPaymentCondition.md#logger) - [nevermined](EscrowPaymentCondition.md#nevermined) -- [web3](EscrowPaymentCondition.md#web3) +- [publicClient](EscrowPaymentCondition.md#publicclient) +- [walletClient](EscrowPaymentCondition.md#walletclient) ### Methods @@ -46,8 +48,7 @@ - [generateIdWithSeed](EscrowPaymentCondition.md#generateidwithseed) - [getConditionFulfilledEvent](EscrowPaymentCondition.md#getconditionfulfilledevent) - [getFromAddress](EscrowPaymentCondition.md#getfromaddress) -- [getInputsOfMethod](EscrowPaymentCondition.md#getinputsofmethod) -- [getSignatureOfMethod](EscrowPaymentCondition.md#getsignatureofmethod) +- [getTransactionLogs](EscrowPaymentCondition.md#gettransactionlogs) - [hashValues](EscrowPaymentCondition.md#hashvalues) - [hashValuesPlain](EscrowPaymentCondition.md#hashvaluesplain) - [init](EscrowPaymentCondition.md#init) @@ -59,6 +60,7 @@ - [send](EscrowPaymentCondition.md#send) - [sendFrom](EscrowPaymentCondition.md#sendfrom) - [setInstanceConfig](EscrowPaymentCondition.md#setinstanceconfig) +- [someLog](EscrowPaymentCondition.md#somelog) - [getInstance](EscrowPaymentCondition.md#getinstance) - [setInstanceConfig](EscrowPaymentCondition.md#setinstanceconfig-1) @@ -66,7 +68,7 @@ ### constructor -• **new EscrowPaymentCondition**(`contractName`) +• **new EscrowPaymentCondition**(`contractName`): [`EscrowPaymentCondition`](EscrowPaymentCondition.md) #### Parameters @@ -74,41 +76,45 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`EscrowPaymentCondition`](EscrowPaymentCondition.md) + #### Inherited from -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) +ProviderCondition\.constructor #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) +ProviderCondition.address #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) +ProviderCondition.contract #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -118,25 +124,25 @@ #### Inherited from -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) +ProviderCondition.contractName #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) +ProviderCondition.events #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -146,21 +152,21 @@ #### Inherited from -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) +ProviderCondition.version #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -168,17 +174,17 @@ ProviderCondition.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -186,13 +192,31 @@ ProviderCondition.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ProviderCondition.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -204,13 +228,13 @@ ProviderCondition.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -222,17 +246,17 @@ ProviderCondition.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -240,13 +264,13 @@ ProviderCondition.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -258,13 +282,13 @@ ProviderCondition.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -276,57 +300,172 @@ ProviderCondition.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ProviderCondition.web3 +ProviderCondition.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ProviderCondition.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### abortByTimeOut -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **abortByTimeOut**(`conditionId`, `from`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :------------ | :---------------------------------------------- | | `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) +ProviderCondition.abortByTimeOut #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) +[src/keeper/contracts/conditions/Condition.abstract.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L75) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -336,29 +475,29 @@ ProviderCondition.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) +ProviderCondition.call #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### fulfill -▸ **fulfill**(`agreementId`, `did`, `amounts`, `receivers`, `returnAddress`, `lockPaymentAddress`, `tokenAddress`, `lockCondition`, `releaseCondition`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfill**(`agreementId`, `did`, `amounts`, `receivers`, `returnAddress`, `lockPaymentAddress`, `tokenAddress`, `lockCondition`, `releaseCondition`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -373,54 +512,54 @@ ProviderCondition.web3 | `tokenAddress` | `string` | | `lockCondition` | `string` | | `releaseCondition` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Overrides -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) +ProviderCondition.fulfill #### Defined in -[src/keeper/contracts/conditions/EscrowPaymentCondition.ts:60](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/EscrowPaymentCondition.ts#L60) +[src/keeper/contracts/conditions/EscrowPaymentCondition.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/EscrowPaymentCondition.ts#L57) --- ### fulfillInstance -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillInstance**(`cond`, `additionalParams`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | +| Name | Type | Default value | +| :----------------- | :-------------------------------------------------------- | :------------ | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | `undefined` | +| `additionalParams` | `Record`\<`string`, `unknown`\> | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | +| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) +ProviderCondition.fulfillInstance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) +[src/keeper/contracts/conditions/Condition.abstract.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L139) --- ### fulfillPlain -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillPlain**(`agreementId`, `args`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters @@ -428,54 +567,54 @@ ProviderCondition.web3 | :------------ | :-------------------------------------------------------- | :------------ | | `agreementId` | `string` | `undefined` | | `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | | `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) +ProviderCondition.fulfillPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) +[src/keeper/contracts/conditions/Condition.abstract.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L47) --- ### fulfillWithNode -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillWithNode**(`cond`, `additionalParams`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :----------------- | :----------------------------------------------------- | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | +| `additionalParams` | `Record`\<`string`, `unknown`\> | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) +ProviderCondition.fulfillWithNode #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) +[src/keeper/contracts/conditions/Condition.abstract.ts:183](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L183) --- ### generateId -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> +▸ **generateId**(`agreementId`, `valueHash`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -486,21 +625,21 @@ ProviderCondition.web3 #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) +ProviderCondition.generateId #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) +[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L61) --- ### generateIdHash -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> +▸ **generateIdHash**(`agreementId`, `...values`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -511,21 +650,21 @@ ProviderCondition.web3 #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) +ProviderCondition.generateIdHash #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) +[src/keeper/contracts/conditions/Condition.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L57) --- ### generateIdWithSeed -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> +▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`\<[`string`, `string`]\> #### Parameters @@ -536,15 +675,15 @@ ProviderCondition.web3 #### Returns -`Promise`<[`string`, `string`]\> +`Promise`\<[`string`, `string`]\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) +ProviderCondition.generateIdWithSeed #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) +[src/keeper/contracts/conditions/Condition.abstract.ts:65](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L65) --- @@ -564,17 +703,17 @@ ProviderCondition.web3 #### Inherited from -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) +ProviderCondition.getConditionFulfilledEvent #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) +[src/keeper/contracts/conditions/Condition.abstract.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L79) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -584,70 +723,46 @@ ProviderCondition.web3 #### Returns -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) +ProviderCondition.getFromAddress #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) +ProviderCondition.getTransactionLogs #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### hashValues -▸ **hashValues**(`...args`): `Promise`<`string`\> +▸ **hashValues**(`...args`): `Promise`\<`string`\> #### Parameters @@ -657,21 +772,21 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) +ProviderCondition.hashValues #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) +[src/keeper/contracts/conditions/Condition.abstract.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L116) --- ### hashValuesPlain -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> +▸ **hashValuesPlain**(`...args`): `Promise`\<`string`\> #### Parameters @@ -681,71 +796,72 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) +ProviderCondition.hashValuesPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) +[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L122) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) +ProviderCondition.init #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instance -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instance**(`agreementId`, `params`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | +| Name | Type | +| :------------ | :------------------------------------------------------- | +| `agreementId` | `string` | +| `params` | `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> | #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) +ProviderCondition.instance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) +[src/keeper/contracts/conditions/Condition.abstract.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L163) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -757,15 +873,15 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) +ProviderCondition.instanceFromDDO #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) +[src/keeper/contracts/conditions/Condition.abstract.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L131) --- @@ -779,17 +895,17 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) +ProviderCondition.nodeMethod #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L208) +[src/keeper/contracts/conditions/Condition.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L200) --- ### params -▸ **params**(`did`, `amounts`, `receivers`, `returnAddress`, `sender`, `tokenAddress`, `lockCondition`, `releaseCondition`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +▸ **params**(`did`, `amounts`, `receivers`, `returnAddress`, `sender`, `tokenAddress`, `lockCondition`, `releaseCondition`): `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> #### Parameters @@ -806,21 +922,21 @@ readonly `ParamType`[] #### Returns -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +`ConditionParameters`\<`Record`\<`string`, `unknown`\>\> #### Overrides -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) +ProviderCondition.params #### Defined in -[src/keeper/contracts/conditions/EscrowPaymentCondition.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/EscrowPaymentCondition.ts#L22) +[src/keeper/contracts/conditions/EscrowPaymentCondition.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/EscrowPaymentCondition.ts#L18) --- ### paramsFromDDO -▸ **paramsFromDDO**(`«destructured»`, `access`, `lock`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +▸ **paramsFromDDO**(`«destructured»`, `access`, `lock`): `Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -832,75 +948,75 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Overrides -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) +ProviderCondition.paramsFromDDO #### Defined in -[src/keeper/contracts/conditions/EscrowPaymentCondition.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/EscrowPaymentCondition.ts#L41) +[src/keeper/contracts/conditions/EscrowPaymentCondition.ts:37](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/EscrowPaymentCondition.ts#L37) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) +ProviderCondition.send #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) +ProviderCondition.sendFrom #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -914,17 +1030,41 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) +ProviderCondition.setInstanceConfig + +#### Defined in + +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +ProviderCondition.someLog #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`EscrowPaymentCondition`](EscrowPaymentCondition.md)\> +▸ **getInstance**(`config`): `Promise`\<[`EscrowPaymentCondition`](EscrowPaymentCondition.md)\> #### Parameters @@ -934,21 +1074,21 @@ readonly `ParamType`[] #### Returns -`Promise`<[`EscrowPaymentCondition`](EscrowPaymentCondition.md)\> +`Promise`\<[`EscrowPaymentCondition`](EscrowPaymentCondition.md)\> #### Overrides -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) +ProviderCondition.getInstance #### Defined in -[src/keeper/contracts/conditions/EscrowPaymentCondition.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/EscrowPaymentCondition.ts#L18) +[src/keeper/contracts/conditions/EscrowPaymentCondition.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/EscrowPaymentCondition.ts#L14) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -969,8 +1109,8 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) +ProviderCondition.setInstanceConfig #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/EthSignJWT.md b/docs/api-reference/classes/EthSignJWT.md index 5e8aa9632..5aed4378c 100644 --- a/docs/api-reference/classes/EthSignJWT.md +++ b/docs/api-reference/classes/EthSignJWT.md @@ -33,15 +33,13 @@ - [setProtectedHeader](EthSignJWT.md#setprotectedheader) - [setSubject](EthSignJWT.md#setsubject) - [sign](EthSignJWT.md#sign) -- [signMessage](EthSignJWT.md#signmessage) - [signText](EthSignJWT.md#signtext) -- [signTypedMessage](EthSignJWT.md#signtypedmessage) ## Constructors ### constructor -• **new EthSignJWT**(`payload`) +• **new EthSignJWT**(`payload`): [`EthSignJWT`](EthSignJWT.md) #### Parameters @@ -49,6 +47,10 @@ | :-------- | :----------- | :------------------------- | | `payload` | `JWTPayload` | The JWT Claims Set object. | +#### Returns + +[`EthSignJWT`](EthSignJWT.md) + #### Inherited from SignJWT.constructor @@ -79,13 +81,13 @@ node_modules/jose/dist/types/jwt/produce.d.ts:4 #### Defined in -[src/nevermined/utils/JwtUtils.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L27) +[src/nevermined/utils/JwtUtils.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L12) ## Methods ### base64url -▸ `Private` **base64url**(`input`): `string` +▸ **base64url**(`input`): `string` #### Parameters @@ -99,13 +101,13 @@ node_modules/jose/dist/types/jwt/produce.d.ts:4 #### Defined in -[src/nevermined/utils/JwtUtils.ts:128](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L128) +[src/nevermined/utils/JwtUtils.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L91) --- ### concat -▸ `Private` **concat**(`...buffers`): `Uint8Array` +▸ **concat**(`...buffers`): `Uint8Array` #### Parameters @@ -119,34 +121,35 @@ node_modules/jose/dist/types/jwt/produce.d.ts:4 #### Defined in -[src/nevermined/utils/JwtUtils.ts:136](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L136) +[src/nevermined/utils/JwtUtils.ts:99](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L99) --- ### ethSign -▸ **ethSign**(`signer`, `eip712Data?`): `Promise`<`string`\> +▸ **ethSign**(`signatureUtils`, `account`, `eip712Data?`): `Promise`\<`string`\> #### Parameters -| Name | Type | -| :------------ | :--------------------------------------------- | -| `signer` | `Signer` \| `ZeroDevAccountSigner`<`"ECDSA"`\> | -| `eip712Data?` | [`Eip712Data`](../interfaces/Eip712Data.md) | +| Name | Type | +| :--------------- | :------------------------------------------ | +| `signatureUtils` | [`SignatureUtils`](SignatureUtils.md) | +| `account` | [`NvmAccount`](NvmAccount.md) | +| `eip712Data?` | [`Eip712Data`](../interfaces/Eip712Data.md) | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L34) +[src/nevermined/utils/JwtUtils.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L19) --- ### setAudience -▸ **setAudience**(`audience`): [`EthSignJWT`](EthSignJWT.md) +▸ **setAudience**(`audience`): `this` Set "aud" (Audience) Claim. @@ -158,7 +161,7 @@ Set "aud" (Audience) Claim. #### Returns -[`EthSignJWT`](EthSignJWT.md) +`this` #### Inherited from @@ -172,7 +175,7 @@ node_modules/jose/dist/types/jwt/produce.d.ts:24 ### setExpirationTime -▸ **setExpirationTime**(`input`): [`EthSignJWT`](EthSignJWT.md) +▸ **setExpirationTime**(`input`): `this` Set "exp" (Expiration Time) Claim. @@ -184,7 +187,7 @@ Set "exp" (Expiration Time) Claim. #### Returns -[`EthSignJWT`](EthSignJWT.md) +`this` #### Inherited from @@ -198,7 +201,7 @@ node_modules/jose/dist/types/jwt/produce.d.ts:46 ### setIssuedAt -▸ **setIssuedAt**(`input?`): [`EthSignJWT`](EthSignJWT.md) +▸ **setIssuedAt**(`input?`): `this` Set "iat" (Issued At) Claim. @@ -210,7 +213,7 @@ Set "iat" (Issued At) Claim. #### Returns -[`EthSignJWT`](EthSignJWT.md) +`this` #### Inherited from @@ -218,13 +221,13 @@ SignJWT.setIssuedAt #### Defined in -node_modules/jose/dist/types/jwt/produce.d.ts:52 +node_modules/jose/dist/types/jwt/produce.d.ts:53 --- ### setIssuer -▸ **setIssuer**(`issuer`): [`EthSignJWT`](EthSignJWT.md) +▸ **setIssuer**(`issuer`): `this` Set "iss" (Issuer) Claim. @@ -236,7 +239,7 @@ Set "iss" (Issuer) Claim. #### Returns -[`EthSignJWT`](EthSignJWT.md) +`this` #### Inherited from @@ -250,7 +253,7 @@ node_modules/jose/dist/types/jwt/produce.d.ts:12 ### setJti -▸ **setJti**(`jwtId`): [`EthSignJWT`](EthSignJWT.md) +▸ **setJti**(`jwtId`): `this` Set "jti" (JWT ID) Claim. @@ -262,7 +265,7 @@ Set "jti" (JWT ID) Claim. #### Returns -[`EthSignJWT`](EthSignJWT.md) +`this` #### Inherited from @@ -276,7 +279,7 @@ node_modules/jose/dist/types/jwt/produce.d.ts:30 ### setNotBefore -▸ **setNotBefore**(`input`): [`EthSignJWT`](EthSignJWT.md) +▸ **setNotBefore**(`input`): `this` Set "nbf" (Not Before) Claim. @@ -288,7 +291,7 @@ Set "nbf" (Not Before) Claim. #### Returns -[`EthSignJWT`](EthSignJWT.md) +`this` #### Inherited from @@ -320,13 +323,13 @@ SignJWT.setProtectedHeader #### Defined in -[src/nevermined/utils/JwtUtils.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L29) +[src/nevermined/utils/JwtUtils.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L14) --- ### setSubject -▸ **setSubject**(`subject`): [`EthSignJWT`](EthSignJWT.md) +▸ **setSubject**(`subject`): `this` Set "sub" (Subject) Claim. @@ -338,7 +341,7 @@ Set "sub" (Subject) Claim. #### Returns -[`EthSignJWT`](EthSignJWT.md) +`this` #### Inherited from @@ -352,20 +355,20 @@ node_modules/jose/dist/types/jwt/produce.d.ts:18 ### sign -▸ **sign**(`key`, `options?`): `Promise`<`string`\> +▸ **sign**(`key`, `options?`): `Promise`\<`string`\> Signs and returns the JWT. #### Parameters -| Name | Type | Description | -| :--------- | :------------------------ | :------------------------------------------ | -| `key` | `Uint8Array` \| `KeyLike` | Private Key or Secret to sign the JWT with. | -| `options?` | `SignOptions` | JWT Sign options. | +| Name | Type | Description | +| :--------- | :------------------------ | :------------------------------------------------------------------------------------------------------------------------------ | +| `key` | `Uint8Array` \| `KeyLike` | Private Key or Secret to sign the JWT with. See [Algorithm Key Requirements](https://github.com/panva/jose/issues/210#jws-alg). | +| `options?` | `SignOptions` | JWT Sign options. | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -373,69 +376,25 @@ SignJWT.sign #### Defined in -node_modules/jose/dist/types/jwt/sign.d.ts:34 - ---- - -### signMessage - -▸ `Static` `Private` **signMessage**(`message`, `signer`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :--------------------------------------------- | -| `message` | `string` \| `Uint8Array` | -| `signer` | `Signer` \| `ZeroDevAccountSigner`<`"ECDSA"`\> | - -#### Returns - -`Promise`<`string`\> - -#### Defined in - -[src/nevermined/utils/JwtUtils.ts:100](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L100) +node_modules/jose/dist/types/jwt/sign.d.ts:22 --- ### signText -▸ `Static` **signText**(`text`, `signer`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------- | :----------------------- | -| `text` | `string` \| `Uint8Array` | -| `signer` | `Signer` | - -#### Returns - -`Promise`<`string`\> - -#### Defined in - -[src/nevermined/utils/JwtUtils.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L90) - ---- - -### signTypedMessage - -▸ `Static` `Private` **signTypedMessage**(`domain`, `types`, `value`, `signer`): `Promise`<`string`\> +▸ **signText**(`text`, `account`): `Promise`\<`undefined` \| `string`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------------- | -| `domain` | [`TypedDataDomain`](../interfaces/TypedDataDomain.md) | -| `types` | [`TypedDataTypes`](../interfaces/TypedDataTypes.md) | -| `value` | `Record`<`string`, `any`\> | -| `signer` | `Signer` \| `ZeroDevAccountSigner`<`"ECDSA"`\> | +| Name | Type | +| :-------- | :----------------------- | +| `text` | `string` \| `Uint8Array` | +| `account` | `Account` | #### Returns -`Promise`<`string`\> +`Promise`\<`undefined` \| `string`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:111](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L111) +[src/nevermined/utils/JwtUtils.ts:77](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L77) diff --git a/docs/api-reference/classes/EventHandler.md b/docs/api-reference/classes/EventHandler.md index 43f24b89d..afa250dec 100644 --- a/docs/api-reference/classes/EventHandler.md +++ b/docs/api-reference/classes/EventHandler.md @@ -31,35 +31,39 @@ ### constructor -• **new EventHandler**() +• **new EventHandler**(): [`EventHandler`](EventHandler.md) + +#### Returns + +[`EventHandler`](EventHandler.md) ## Properties ### events -• `Private` **events**: `Set`<(`blockNumber`: `any`) => `void`\> +• `Private` **events**: `Set`\<(`blockNumber`: `bigint`) => `void`\> #### Defined in -[src/events/EventHandler.ts:6](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/EventHandler.ts#L6) +[src/events/EventHandler.ts:6](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/EventHandler.ts#L6) --- ### getBlockNumber -• `Private` **getBlockNumber**: () => `Promise`<`number`\> +• `Private` **getBlockNumber**: () => `Promise`\<`bigint`\> #### Type declaration -▸ (): `Promise`<`number`\> +▸ (): `Promise`\<`bigint`\> ##### Returns -`Promise`<`number`\> +`Promise`\<`bigint`\> #### Defined in -[src/events/EventHandler.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/EventHandler.ts#L16) +[src/events/EventHandler.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/EventHandler.ts#L16) --- @@ -69,17 +73,17 @@ #### Defined in -[src/events/EventHandler.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/EventHandler.ts#L10) +[src/events/EventHandler.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/EventHandler.ts#L10) --- ### lastBlock -• `Private` **lastBlock**: `number` +• `Private` **lastBlock**: `bigint` #### Defined in -[src/events/EventHandler.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/EventHandler.ts#L8) +[src/events/EventHandler.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/EventHandler.ts#L8) --- @@ -89,7 +93,7 @@ #### Defined in -[src/events/EventHandler.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/EventHandler.ts#L14) +[src/events/EventHandler.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/EventHandler.ts#L14) --- @@ -99,7 +103,7 @@ #### Defined in -[src/events/EventHandler.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/EventHandler.ts#L12) +[src/events/EventHandler.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/EventHandler.ts#L12) ## Accessors @@ -113,13 +117,13 @@ #### Defined in -[src/events/EventHandler.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/EventHandler.ts#L2) +[src/events/EventHandler.ts:2](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/EventHandler.ts#L2) ## Methods ### checkBlock -▸ `Private` **checkBlock**(`isInterval?`): `Promise`<`void`\> +▸ **checkBlock**(`isInterval?`): `Promise`\<`void`\> #### Parameters @@ -129,11 +133,11 @@ #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Defined in -[src/events/EventHandler.ts:37](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/EventHandler.ts#L37) +[src/events/EventHandler.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/EventHandler.ts#L38) --- @@ -145,8 +149,8 @@ | Name | Type | | :--------------- | :---------------------------------- | -| `callback` | (`blockNumber`: `number`) => `void` | -| `getBlockNumber` | () => `Promise`<`number`\> | +| `callback` | (`blockNumber`: `bigint`) => `void` | +| `getBlockNumber` | () => `Promise`\<`bigint`\> | #### Returns @@ -158,7 +162,7 @@ #### Defined in -[src/events/EventHandler.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/EventHandler.ts#L18) +[src/events/EventHandler.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/EventHandler.ts#L18) --- @@ -170,7 +174,7 @@ | Name | Type | | :--------- | :---------------------------------- | -| `callback` | (`blockNumber`: `number`) => `void` | +| `callback` | (`blockNumber`: `bigint`) => `void` | #### Returns @@ -178,4 +182,4 @@ #### Defined in -[src/events/EventHandler.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/EventHandler.ts#L28) +[src/events/EventHandler.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/EventHandler.ts#L28) diff --git a/docs/api-reference/classes/Files.md b/docs/api-reference/classes/Files.md deleted file mode 100644 index d71efe915..000000000 --- a/docs/api-reference/classes/Files.md +++ /dev/null @@ -1,297 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / Files - -# Class: Files - -## Hierarchy - -- [`Instantiable`](Instantiable.md) - - ↳ **`Files`** - -## Table of contents - -### Constructors - -- [constructor](Files.md#constructor) - -### Accessors - -- [artifactsFolder](Files.md#artifactsfolder) -- [circuitsFolder](Files.md#circuitsfolder) -- [config](Files.md#config) -- [instanceConfig](Files.md#instanceconfig) -- [instantiableConfig](Files.md#instantiableconfig) -- [logger](Files.md#logger) -- [nevermined](Files.md#nevermined) -- [web3](Files.md#web3) - -### Methods - -- [setInstanceConfig](Files.md#setinstanceconfig) -- [uploadFilecoin](Files.md#uploadfilecoin) -- [getInstance](Files.md#getinstance) -- [setInstanceConfig](Files.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new Files**(`config`) - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Overrides - -[Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) - -#### Defined in - -[src/nevermined/Files.ts:5](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Files.ts#L5) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -Instantiable.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -Instantiable.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -Instantiable.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -Instantiable.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -Instantiable.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -Instantiable.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -Instantiable.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -Instantiable.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[Instantiable](Instantiable.md).[setInstanceConfig](Instantiable.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### uploadFilecoin - -▸ **uploadFilecoin**(`data`, `encrypt?`): `Promise`<`any`\> - -#### Parameters - -| Name | Type | -| :--------- | :----------------------- | -| `data` | `string` \| `ReadStream` | -| `encrypt?` | `boolean` | - -#### Returns - -`Promise`<`any`\> - -#### Defined in - -[src/nevermined/Files.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Files.ts#L10) - ---- - -### getInstance - -▸ `Static` **getInstance**(`..._args`): `any` - -#### Parameters - -| Name | Type | -| :--------- | :---- | -| `..._args` | `any` | - -#### Returns - -`any` - -#### Inherited from - -[Instantiable](Instantiable.md).[getInstance](Instantiable.md#getinstance) - -#### Defined in - -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[Instantiable](Instantiable.md).[setInstanceConfig](Instantiable.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/GenericContract.md b/docs/api-reference/classes/GenericContract.md index 35af32a50..53fc000e7 100644 --- a/docs/api-reference/classes/GenericContract.md +++ b/docs/api-reference/classes/GenericContract.md @@ -27,24 +27,26 @@ - [artifactsFolder](GenericContract.md#artifactsfolder) - [circuitsFolder](GenericContract.md#circuitsfolder) +- [client](GenericContract.md#client) - [config](GenericContract.md#config) - [instanceConfig](GenericContract.md#instanceconfig) - [instantiableConfig](GenericContract.md#instantiableconfig) - [logger](GenericContract.md#logger) - [nevermined](GenericContract.md#nevermined) -- [web3](GenericContract.md#web3) +- [publicClient](GenericContract.md#publicclient) +- [walletClient](GenericContract.md#walletclient) ### Methods - [call](GenericContract.md#call) - [getContract](GenericContract.md#getcontract) - [getFromAddress](GenericContract.md#getfromaddress) -- [getInputsOfMethod](GenericContract.md#getinputsofmethod) -- [getSignatureOfMethod](GenericContract.md#getsignatureofmethod) +- [getTransactionLogs](GenericContract.md#gettransactionlogs) - [init](GenericContract.md#init) - [send](GenericContract.md#send) - [sendFrom](GenericContract.md#sendfrom) - [setInstanceConfig](GenericContract.md#setinstanceconfig) +- [someLog](GenericContract.md#somelog) - [getInstance](GenericContract.md#getinstance) - [setInstanceConfig](GenericContract.md#setinstanceconfig-1) @@ -52,14 +54,18 @@ ### constructor -• `Private` **new GenericContract**(`contractName`, `address?`) +• **new GenericContract**(`contractName`, `address`): [`GenericContract`](GenericContract.md) #### Parameters | Name | Type | | :------------- | :------- | | `contractName` | `string` | -| `address?` | `string` | +| `address` | `string` | + +#### Returns + +[`GenericContract`](GenericContract.md) #### Overrides @@ -67,13 +73,13 @@ #### Defined in -[src/keeper/contracts/GenericContract.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/GenericContract.ts#L18) +[src/keeper/contracts/GenericContract.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/GenericContract.ts#L19) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -81,13 +87,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -95,7 +101,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -109,13 +115,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -123,7 +129,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -133,7 +139,7 @@ #### Defined in -[src/keeper/contracts/GenericContract.ts:6](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/GenericContract.ts#L6) +[src/keeper/contracts/GenericContract.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/GenericContract.ts#L7) --- @@ -147,17 +153,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -165,17 +171,17 @@ ContractBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -183,13 +189,31 @@ ContractBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ContractBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -201,13 +225,13 @@ ContractBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -219,17 +243,17 @@ ContractBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -237,13 +261,13 @@ ContractBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -255,13 +279,13 @@ ContractBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -273,31 +297,146 @@ ContractBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ContractBase.web3 +ContractBase.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ContractBase.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`name`, `args`, `from`): `Promise`\<`T`\> #### Type parameters @@ -307,15 +446,15 @@ ContractBase.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :----- | :------- | +| `name` | `string` | +| `args` | `any`[] | +| `from` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Overrides @@ -323,27 +462,27 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/GenericContract.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/GenericContract.ts#L34) +[src/keeper/contracts/GenericContract.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/GenericContract.ts#L35) --- ### getContract -▸ **getContract**(): `BaseContract` +▸ **getContract**(): `any` #### Returns -`BaseContract` +`any` #### Defined in -[src/keeper/contracts/GenericContract.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/GenericContract.ts#L47) +[src/keeper/contracts/GenericContract.ts:43](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/GenericContract.ts#L43) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -353,7 +492,7 @@ ContractBase.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -361,62 +500,38 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getInputsOfMethod +### getTransactionLogs -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -readonly `ParamType`[] +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ContractBase](ContractBase.md).[getInputsOfMethod](ContractBase.md#getinputsofmethod) +[ContractBase](ContractBase.md).[getTransactionLogs](ContractBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[ContractBase](ContractBase.md).[getSignatureOfMethod](ContractBase.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`): `Promise`\<`void`\> #### Parameters @@ -427,7 +542,7 @@ readonly `ParamType`[] #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Overrides @@ -435,26 +550,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/GenericContract.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/GenericContract.ts#L23) +[src/keeper/contracts/GenericContract.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/GenericContract.ts#L24) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`name`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :------- | :---------------------------------------------- | | `name` | `string` | -| `from` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | | `args` | `any`[] | | `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Overrides @@ -462,26 +577,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/GenericContract.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/GenericContract.ts#L38) +[src/keeper/contracts/GenericContract.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/GenericContract.ts#L39) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -489,13 +604,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -513,13 +628,37 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[ContractBase](ContractBase.md).[someLog](ContractBase.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`, `contractName`, `address?`): `Promise`<[`GenericContract`](GenericContract.md)\> +▸ **getInstance**(`config`, `contractName`, `address`): `Promise`\<[`GenericContract`](GenericContract.md)\> #### Parameters @@ -527,11 +666,11 @@ readonly `ParamType`[] | :------------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | | `contractName` | `string` | -| `address?` | `string` | +| `address` | `string` | #### Returns -`Promise`<[`GenericContract`](GenericContract.md)\> +`Promise`\<[`GenericContract`](GenericContract.md)\> #### Overrides @@ -539,13 +678,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/GenericContract.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/GenericContract.ts#L8) +[src/keeper/contracts/GenericContract.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/GenericContract.ts#L9) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -570,4 +709,4 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/GraphError.md b/docs/api-reference/classes/GraphError.md index 7be6b54bf..663eafb98 100644 --- a/docs/api-reference/classes/GraphError.md +++ b/docs/api-reference/classes/GraphError.md @@ -16,6 +16,7 @@ ### Properties +- [cause](GraphError.md#cause) - [message](GraphError.md#message) - [name](GraphError.md#name) - [stack](GraphError.md#stack) @@ -30,7 +31,7 @@ ### constructor -• **new GraphError**(`message`) +• **new GraphError**(`message`): [`GraphError`](GraphError.md) #### Parameters @@ -38,16 +39,34 @@ | :-------- | :------- | | `message` | `string` | +#### Returns + +[`GraphError`](GraphError.md) + #### Overrides Error.constructor #### Defined in -[src/errors/GraphError.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/errors/GraphError.ts#L2) +[src/errors/NeverminedErrors.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L8) ## Properties +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +Error.cause + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + ### message • **message**: `string` @@ -58,7 +77,7 @@ Error.message #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1068 +node_modules/typescript/lib/lib.es5.d.ts:1077 --- @@ -72,7 +91,7 @@ Error.name #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1067 +node_modules/typescript/lib/lib.es5.d.ts:1076 --- @@ -86,7 +105,7 @@ Error.stack #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1069 +node_modules/typescript/lib/lib.es5.d.ts:1078 --- @@ -94,12 +113,16 @@ node_modules/typescript/lib/lib.es5.d.ts:1069 ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Type declaration ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -111,17 +134,13 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from Error.prepareStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:11 +node_modules/@types/node/globals.d.ts:28 --- @@ -135,13 +154,13 @@ Error.stackTraceLimit #### Defined in -node_modules/@types/node/globals.d.ts:13 +node_modules/@types/node/globals.d.ts:30 ## Methods ### captureStackTrace -▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object @@ -162,4 +181,4 @@ Error.captureStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:4 +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/HttpError.md b/docs/api-reference/classes/HttpError.md index 8ba3ad647..59196422b 100644 --- a/docs/api-reference/classes/HttpError.md +++ b/docs/api-reference/classes/HttpError.md @@ -16,6 +16,7 @@ ### Properties +- [cause](HttpError.md#cause) - [message](HttpError.md#message) - [name](HttpError.md#name) - [stack](HttpError.md#stack) @@ -30,7 +31,7 @@ ### constructor -• **new HttpError**(`message`, `code`) +• **new HttpError**(`message`, `code`): [`HttpError`](HttpError.md) #### Parameters @@ -39,16 +40,34 @@ | `message` | `string` | | `code` | `number` | +#### Returns + +[`HttpError`](HttpError.md) + #### Overrides Error.constructor #### Defined in -[src/errors/HttpError.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/errors/HttpError.ts#L2) +[src/errors/NeverminedErrors.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L14) ## Properties +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +Error.cause + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + ### message • **message**: `string` @@ -59,7 +78,7 @@ Error.message #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1068 +node_modules/typescript/lib/lib.es5.d.ts:1077 --- @@ -73,7 +92,7 @@ Error.name #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1067 +node_modules/typescript/lib/lib.es5.d.ts:1076 --- @@ -87,7 +106,7 @@ Error.stack #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1069 +node_modules/typescript/lib/lib.es5.d.ts:1078 --- @@ -95,12 +114,16 @@ node_modules/typescript/lib/lib.es5.d.ts:1069 ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Type declaration ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -112,17 +135,13 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from Error.prepareStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:11 +node_modules/@types/node/globals.d.ts:28 --- @@ -136,13 +155,13 @@ Error.stackTraceLimit #### Defined in -node_modules/@types/node/globals.d.ts:13 +node_modules/@types/node/globals.d.ts:30 ## Methods ### captureStackTrace -▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object @@ -163,4 +182,4 @@ Error.captureStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:4 +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/Instantiable.md b/docs/api-reference/classes/Instantiable.md index 55ec73553..aa0473c5b 100644 --- a/docs/api-reference/classes/Instantiable.md +++ b/docs/api-reference/classes/Instantiable.md @@ -6,7 +6,19 @@ - **`Instantiable`** - ↳ [`NeverminedEvent`](NeverminedEvent.md) + ↳ [`AccessService`](AccessService.md) + + ↳ [`NFTAccessService`](NFTAccessService.md) + + ↳ [`NFTSalesService`](NFTSalesService.md) + + ↳ [`Nevermined`](Nevermined.md) + + ↳ [`Providers`](Providers.md) + + ↳ [`TokenUtils`](TokenUtils.md) + + ↳ [`Versions`](Versions.md) ↳ [`AccountsApi`](AccountsApi.md) @@ -22,44 +34,26 @@ ↳ [`UtilsApi`](UtilsApi.md) + ↳ [`BlockchainViemUtils`](BlockchainViemUtils.md) + ↳ [`JwtUtils`](JwtUtils.md) ↳ [`ServiceAgreement`](ServiceAgreement.md) ↳ [`SignatureUtils`](SignatureUtils.md) - ↳ [`WebServiceConnector`](WebServiceConnector.md) - - ↳ [`AccessService`](AccessService.md) - - ↳ [`NFTAccessService`](NFTAccessService.md) - - ↳ [`NFTSalesService`](NFTSalesService.md) - - ↳ [`Account`](Account.md) - - ↳ [`Files`](Files.md) - - ↳ [`Nevermined`](Nevermined.md) - - ↳ [`Providers`](Providers.md) + ↳ [`ContractHandler`](ContractHandler.md) - ↳ [`TokenUtils`](TokenUtils.md) + ↳ [`Keeper`](Keeper.md) - ↳ [`Versions`](Versions.md) + ↳ [`ContractBase`](ContractBase.md) - ↳ [`AaveCredit`](AaveCredit.md) + ↳ [`NeverminedEvent`](NeverminedEvent.md) ↳ [`MarketplaceApi`](MarketplaceApi.md) ↳ [`NeverminedNode`](NeverminedNode.md) - ↳ [`ContractBase`](ContractBase.md) - - ↳ [`ContractHandler`](ContractHandler.md) - - ↳ [`Keeper`](Keeper.md) - ## Table of contents ### Constructors @@ -74,12 +68,14 @@ - [artifactsFolder](Instantiable.md#artifactsfolder) - [circuitsFolder](Instantiable.md#circuitsfolder) +- [client](Instantiable.md#client) - [config](Instantiable.md#config) - [instanceConfig](Instantiable.md#instanceconfig) - [instantiableConfig](Instantiable.md#instantiableconfig) - [logger](Instantiable.md#logger) - [nevermined](Instantiable.md#nevermined) -- [web3](Instantiable.md#web3) +- [publicClient](Instantiable.md#publicclient) +- [walletClient](Instantiable.md#walletclient) ### Methods @@ -91,7 +87,11 @@ ### constructor -• **new Instantiable**() +• **new Instantiable**(): [`Instantiable`](Instantiable.md) + +#### Returns + +[`Instantiable`](Instantiable.md) ## Properties @@ -101,41 +101,55 @@ #### Defined in -[src/Instantiable.abstract.ts:97](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L97) +[src/Instantiable.abstract.ts:156](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L156) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -143,13 +157,13 @@ #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -157,27 +171,27 @@ #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -185,13 +199,13 @@ #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -199,27 +213,138 @@ #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -233,13 +358,13 @@ #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -253,13 +378,13 @@ #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -280,4 +405,4 @@ #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/JwtUtils.md b/docs/api-reference/classes/JwtUtils.md index 4e20967ca..6d6c984d8 100644 --- a/docs/api-reference/classes/JwtUtils.md +++ b/docs/api-reference/classes/JwtUtils.md @@ -17,19 +17,21 @@ ### Properties - [BASE_AUD](JwtUtils.md#base_aud) -- [CLIENT_ASSERTION_TYPE](JwtUtils.md#client_assertion_type) - [tokenCache](JwtUtils.md#tokencache) +- [CLIENT_ASSERTION_TYPE](JwtUtils.md#client_assertion_type) ### Accessors - [artifactsFolder](JwtUtils.md#artifactsfolder) - [circuitsFolder](JwtUtils.md#circuitsfolder) +- [client](JwtUtils.md#client) - [config](JwtUtils.md#config) - [instanceConfig](JwtUtils.md#instanceconfig) - [instantiableConfig](JwtUtils.md#instantiableconfig) - [logger](JwtUtils.md#logger) - [nevermined](JwtUtils.md#nevermined) -- [web3](JwtUtils.md#web3) +- [publicClient](JwtUtils.md#publicclient) +- [walletClient](JwtUtils.md#walletclient) ### Methods @@ -44,8 +46,10 @@ - [generateToken](JwtUtils.md#generatetoken) - [getDownloadGrantToken](JwtUtils.md#getdownloadgranttoken) - [getNftAccessGrantToken](JwtUtils.md#getnftaccessgranttoken) -- [getSigner](JwtUtils.md#getsigner) +- [isTokenValid](JwtUtils.md#istokenvalid) - [setInstanceConfig](JwtUtils.md#setinstanceconfig) +- [createCompressedJwt](JwtUtils.md#createcompressedjwt) +- [decompressJwt](JwtUtils.md#decompressjwt) - [getInstance](JwtUtils.md#getinstance) - [setInstanceConfig](JwtUtils.md#setinstanceconfig-1) @@ -53,7 +57,7 @@ ### constructor -• **new JwtUtils**(`config`) +• **new JwtUtils**(`config`): [`JwtUtils`](JwtUtils.md) #### Parameters @@ -61,13 +65,17 @@ | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`JwtUtils`](JwtUtils.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/utils/JwtUtils.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L154) +[src/nevermined/utils/JwtUtils.ts:117](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L117) ## Properties @@ -77,37 +85,37 @@ #### Defined in -[src/nevermined/utils/JwtUtils.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L150) +[src/nevermined/utils/JwtUtils.ts:113](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L113) --- -### CLIENT_ASSERTION_TYPE +### tokenCache -• **CLIENT_ASSERTION_TYPE**: `string` = `'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'` +• **tokenCache**: `Map`\<`string`, `string`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:149](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L149) +[src/nevermined/utils/JwtUtils.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L115) --- -### tokenCache +### CLIENT_ASSERTION_TYPE -• **tokenCache**: `Map`<`string`, `string`\> +▪ `Static` **CLIENT_ASSERTION_TYPE**: `string` = `'urn:ietf:params:oauth:client-assertion-type:jwt-bearer'` #### Defined in -[src/nevermined/utils/JwtUtils.ts:152](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L152) +[src/nevermined/utils/JwtUtils.ts:112](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L112) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -115,17 +123,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -133,13 +141,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -151,13 +177,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -169,17 +195,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -187,13 +213,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -205,13 +231,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -223,57 +249,172 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### accountToJwk -▸ **accountToJwk**(`account`): `Promise`<`any`\> +▸ **accountToJwk**(`account`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :-------- | :---------------------- | -| `account` | [`Account`](Account.md) | +| Name | Type | +| :-------- | :---------------------------- | +| `account` | [`NvmAccount`](NvmAccount.md) | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:171](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L171) +[src/nevermined/utils/JwtUtils.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L127) --- ### generateAccessGrantToken -▸ **generateAccessGrantToken**(`account`, `serviceAgreementId`, `did`, `buyer?`, `babysig?`): `Promise`<`string`\> +▸ **generateAccessGrantToken**(`account`, `serviceAgreementId`, `did`, `buyer?`, `babysig?`): `Promise`\<`string`\> #### Parameters | Name | Type | | :------------------- | :------------------------------------ | -| `account` | [`Account`](Account.md) | +| `account` | [`NvmAccount`](NvmAccount.md) | | `serviceAgreementId` | `string` | | `did` | `string` | | `buyer?` | `string` | @@ -281,11 +422,11 @@ Instantiable.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:212](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L212) +[src/nevermined/utils/JwtUtils.ts:169](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L169) --- @@ -305,101 +446,101 @@ Instantiable.web3 #### Defined in -[src/nevermined/utils/JwtUtils.ts:167](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L167) +[src/nevermined/utils/JwtUtils.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L123) --- ### generateClientAssertion -▸ **generateClientAssertion**(`account`, `message?`): `Promise`<`string`\> +▸ **generateClientAssertion**(`account`, `message?`): `Promise`\<`string`\> #### Parameters -| Name | Type | -| :--------- | :---------------------- | -| `account` | [`Account`](Account.md) | -| `message?` | `string` | +| Name | Type | +| :--------- | :---------------------------- | +| `account` | [`NvmAccount`](NvmAccount.md) | +| `message?` | `string` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:192](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L192) +[src/nevermined/utils/JwtUtils.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L148) --- ### generateComputeGrantToken -▸ **generateComputeGrantToken**(`account`, `serviceAgreementId`, `executionId`): `Promise`<`string`\> +▸ **generateComputeGrantToken**(`account`, `serviceAgreementId`, `executionId`): `Promise`\<`string`\> #### Parameters -| Name | Type | -| :------------------- | :---------------------- | -| `account` | [`Account`](Account.md) | -| `serviceAgreementId` | `string` | -| `executionId` | `string` | +| Name | Type | +| :------------------- | :---------------------------- | +| `account` | [`NvmAccount`](NvmAccount.md) | +| `serviceAgreementId` | `string` | +| `executionId` | `string` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:323](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L323) +[src/nevermined/utils/JwtUtils.ts:277](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L277) --- ### generateDownloadGrantToken -▸ **generateDownloadGrantToken**(`account`, `did`, `buyer?`, `babysig?`): `Promise`<`string`\> +▸ **generateDownloadGrantToken**(`account`, `did`, `buyer?`, `babysig?`): `Promise`\<`string`\> #### Parameters | Name | Type | | :--------- | :------------------------------------ | -| `account` | [`Account`](Account.md) | +| `account` | [`NvmAccount`](NvmAccount.md) | | `did` | `string` | | `buyer?` | `string` | | `babysig?` | [`Babysig`](../interfaces/Babysig.md) | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:261](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L261) +[src/nevermined/utils/JwtUtils.ts:216](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L216) --- ### generateExecuteGrantToken -▸ **generateExecuteGrantToken**(`account`, `serviceAgreementId`, `workflowId`): `Promise`<`string`\> +▸ **generateExecuteGrantToken**(`account`, `serviceAgreementId`, `workflowId`): `Promise`\<`string`\> #### Parameters -| Name | Type | -| :------------------- | :---------------------- | -| `account` | [`Account`](Account.md) | -| `serviceAgreementId` | `string` | -| `workflowId` | `string` | +| Name | Type | +| :------------------- | :---------------------------- | +| `account` | [`NvmAccount`](NvmAccount.md) | +| `serviceAgreementId` | `string` | +| `workflowId` | `string` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:302](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L302) +[src/nevermined/utils/JwtUtils.ts:257](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L257) --- ### generateNftAccessGrantToken -▸ **generateNftAccessGrantToken**(`agreementId`, `did`, `serviceIndex`, `account`, `buyer?`, `babysig?`): `Promise`<`string`\> +▸ **generateNftAccessGrantToken**(`agreementId`, `did`, `serviceIndex`, `account`, `buyer?`, `babysig?`): `Promise`\<`string`\> #### Parameters @@ -408,70 +549,70 @@ Instantiable.web3 | `agreementId` | `string` | | `did` | `string` | | `serviceIndex` | `number` | -| `account` | [`Account`](Account.md) | +| `account` | [`NvmAccount`](NvmAccount.md) | | `buyer?` | `string` | | `babysig?` | [`Babysig`](../interfaces/Babysig.md) | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:344](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L344) +[src/nevermined/utils/JwtUtils.ts:297](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L297) --- ### generateToken -▸ **generateToken**(`account`, `serviceAgreementId`, `did`, `aud`, `obj`): `Promise`<`string`\> +▸ **generateToken**(`account`, `serviceAgreementId`, `did`, `aud`, `obj`): `Promise`\<`string`\> #### Parameters -| Name | Type | -| :------------------- | :---------------------- | -| `account` | [`Account`](Account.md) | -| `serviceAgreementId` | `string` | -| `did` | `string` | -| `aud` | `string` | -| `obj` | `any` | +| Name | Type | +| :------------------- | :---------------------------- | +| `account` | [`NvmAccount`](NvmAccount.md) | +| `serviceAgreementId` | `string` | +| `did` | `string` | +| `aud` | `string` | +| `obj` | `any` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:237](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L237) +[src/nevermined/utils/JwtUtils.ts:193](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L193) --- ### getDownloadGrantToken -▸ **getDownloadGrantToken**(`did`, `account`, `buyer?`, `babysig?`): `Promise`<`string`\> +▸ **getDownloadGrantToken**(`did`, `account`, `buyer?`, `babysig?`): `Promise`\<`string`\> #### Parameters | Name | Type | | :--------- | :------------------------------------ | | `did` | `string` | -| `account` | [`Account`](Account.md) | +| `account` | [`NvmAccount`](NvmAccount.md) | | `buyer?` | `string` | | `babysig?` | [`Babysig`](../interfaces/Babysig.md) | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:283](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L283) +[src/nevermined/utils/JwtUtils.ts:238](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L238) --- ### getNftAccessGrantToken -▸ **getNftAccessGrantToken**(`agreementId`, `did`, `serviceIndex`, `account`, `buyer?`, `babysig?`): `Promise`<`string`\> +▸ **getNftAccessGrantToken**(`agreementId`, `did`, `serviceIndex`, `account`, `buyer?`, `babysig?`): `Promise`\<`string`\> #### Parameters @@ -480,43 +621,43 @@ Instantiable.web3 | `agreementId` | `string` | | `did` | `string` | | `serviceIndex` | `number` | -| `account` | [`Account`](Account.md) | +| `account` | [`NvmAccount`](NvmAccount.md) | | `buyer?` | `string` | | `babysig?` | [`Babysig`](../interfaces/Babysig.md) | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/JwtUtils.ts:372](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L372) +[src/nevermined/utils/JwtUtils.ts:325](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L325) --- -### getSigner +### isTokenValid -▸ **getSigner**(`account`): `Promise`<`Signer` \| `ZeroDevAccountSigner`<`"ECDSA"`\>\> +▸ **isTokenValid**(`token`): `boolean` #### Parameters -| Name | Type | -| :-------- | :---------------------- | -| `account` | [`Account`](Account.md) | +| Name | Type | +| :------ | :------- | +| `token` | `string` | #### Returns -`Promise`<`Signer` \| `ZeroDevAccountSigner`<`"ECDSA"`\>\> +`boolean` #### Defined in -[src/nevermined/utils/JwtUtils.ts:160](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L160) +[src/nevermined/utils/JwtUtils.ts:354](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L354) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -534,13 +675,53 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### createCompressedJwt + +▸ **createCompressedJwt**(`token`): `string` + +#### Parameters + +| Name | Type | +| :------ | :------- | +| `token` | `string` | + +#### Returns + +`string` + +#### Defined in + +[src/nevermined/utils/JwtUtils.ts:368](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L368) + +--- + +### decompressJwt + +▸ **decompressJwt**(`compressedJwt`): `string` + +#### Parameters + +| Name | Type | +| :-------------- | :------- | +| `compressedJwt` | `string` | + +#### Returns + +`string` + +#### Defined in + +[src/nevermined/utils/JwtUtils.ts:373](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/JwtUtils.ts#L373) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -558,13 +739,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -589,4 +770,4 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/Keeper.md b/docs/api-reference/classes/Keeper.md index e1b9b7853..fe8506215 100644 --- a/docs/api-reference/classes/Keeper.md +++ b/docs/api-reference/classes/Keeper.md @@ -46,12 +46,14 @@ Nevermined Keeper implementation where we put the following modules together: - [artifactsFolder](Keeper.md#artifactsfolder) - [circuitsFolder](Keeper.md#circuitsfolder) +- [client](Keeper.md#client) - [config](Keeper.md#config) - [instanceConfig](Keeper.md#instanceconfig) - [instantiableConfig](Keeper.md#instantiableconfig) - [logger](Keeper.md#logger) - [nevermined](Keeper.md#nevermined) -- [web3](Keeper.md#web3) +- [publicClient](Keeper.md#publicclient) +- [walletClient](Keeper.md#walletclient) ### Methods @@ -64,7 +66,6 @@ Nevermined Keeper implementation where we put the following modules together: - [getTemplateByAddress](Keeper.md#gettemplatebyaddress) - [getTemplateByName](Keeper.md#gettemplatebyname) - [init](Keeper.md#init) -- [loadAaveInstances](Keeper.md#loadaaveinstances) - [loadCurveRoyaltiesInstance](Keeper.md#loadcurveroyaltiesinstance) - [setInstanceConfig](Keeper.md#setinstanceconfig) - [getInstance](Keeper.md#getinstance) @@ -74,7 +75,11 @@ Nevermined Keeper implementation where we put the following modules together: ### constructor -• **new Keeper**() +• **new Keeper**(): [`Keeper`](Keeper.md) + +#### Returns + +[`Keeper`](Keeper.md) #### Inherited from @@ -90,7 +95,7 @@ Template store manager smart contract instance. #### Defined in -[src/keeper/Keeper.ts:268](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L268) +[src/keeper/Keeper.ts:303](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L303) --- @@ -102,7 +107,7 @@ Template store manager smart contract instance. #### Defined in -[src/keeper/Keeper.ts:273](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L273) +[src/keeper/Keeper.ts:308](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L308) --- @@ -114,39 +119,34 @@ Conditions instances. #### Type declaration -| Name | Type | -| :--------------------------------- | :------------------------------------------------------------------------ | -| `aaveBorrowCondition` | [`AaveBorrowCondition`](AaveBorrowCondition.md) | -| `aaveCollateralDepositCondition` | [`AaveCollateralDepositCondition`](AaveCollateralDepositCondition.md) | -| `aaveCollateralWithdrawCondition` | [`AaveCollateralWithdrawCondition`](AaveCollateralWithdrawCondition.md) | -| `aaveRepayCondition` | [`AaveRepayCondition`](AaveRepayCondition.md) | -| `accessCondition` | [`AccessCondition`](AccessCondition.md) | -| `computeExecutionCondition` | [`ComputeExecutionCondition`](ComputeExecutionCondition.md) | -| `distributeNftCollateralCondition` | [`DistributeNFTCollateralCondition`](DistributeNFTCollateralCondition.md) | -| `escrowPaymentCondition` | [`EscrowPaymentCondition`](EscrowPaymentCondition.md) | -| `lockPaymentCondition` | [`LockPaymentCondition`](LockPaymentCondition.md) | -| `nft721HolderCondition` | [`NFT721HolderCondition`](NFT721HolderCondition.md) | -| `nft721LockCondition` | [`NFT721LockCondition`](NFT721LockCondition.md) | -| `nftAccessCondition` | [`NFTAccessCondition`](NFTAccessCondition.md) | -| `nftHolderCondition` | [`NFTHolderCondition`](NFTHolderCondition.md) | -| `nftLockCondition` | [`NFTLockCondition`](NFTLockCondition.md) | -| `transferDidOwnershipCondition` | [`TransferDIDOwnershipCondition`](TransferDIDOwnershipCondition.md) | -| `transferNft721Condition` | [`TransferNFT721Condition`](TransferNFT721Condition.md) | -| `transferNftCondition` | [`TransferNFTCondition`](TransferNFTCondition.md) | +| Name | Type | +| :------------------------------ | :------------------------------------------------------------------ | +| `accessCondition` | [`AccessCondition`](AccessCondition.md) | +| `computeExecutionCondition` | [`ComputeExecutionCondition`](ComputeExecutionCondition.md) | +| `escrowPaymentCondition` | [`EscrowPaymentCondition`](EscrowPaymentCondition.md) | +| `lockPaymentCondition` | [`LockPaymentCondition`](LockPaymentCondition.md) | +| `nft721HolderCondition` | [`NFT721HolderCondition`](NFT721HolderCondition.md) | +| `nft721LockCondition` | `NFT721LockCondition` | +| `nftAccessCondition` | [`NFTAccessCondition`](NFTAccessCondition.md) | +| `nftHolderCondition` | [`NFTHolderCondition`](NFTHolderCondition.md) | +| `nftLockCondition` | [`NFTLockCondition`](NFTLockCondition.md) | +| `transferDidOwnershipCondition` | [`TransferDIDOwnershipCondition`](TransferDIDOwnershipCondition.md) | +| `transferNft721Condition` | [`TransferNFT721Condition`](TransferNFT721Condition.md) | +| `transferNftCondition` | [`TransferNFTCondition`](TransferNFTCondition.md) | #### Defined in -[src/keeper/Keeper.ts:278](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L278) +[src/keeper/Keeper.ts:313](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L313) --- ### conditionsList -• **conditionsList**: [`ConditionSmall`](ConditionSmall.md)[] +• **conditionsList**: `ConditionSmall`[] #### Defined in -[src/keeper/Keeper.ts:298](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L298) +[src/keeper/Keeper.ts:328](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L328) --- @@ -158,7 +158,7 @@ Is connected to the correct network or not. #### Defined in -[src/keeper/Keeper.ts:233](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L233) +[src/keeper/Keeper.ts:268](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L268) --- @@ -170,7 +170,7 @@ DID registry smart contract instance. #### Defined in -[src/keeper/Keeper.ts:253](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L253) +[src/keeper/Keeper.ts:288](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L288) --- @@ -182,7 +182,7 @@ Market smart contract instance. #### Defined in -[src/keeper/Keeper.ts:243](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L243) +[src/keeper/Keeper.ts:278](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L278) --- @@ -196,7 +196,7 @@ Market smart contract instance. #### Defined in -[src/keeper/Keeper.ts:353](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L353) +[src/keeper/Keeper.ts:382](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L382) --- @@ -217,7 +217,7 @@ Network id loaded from web3 #### Defined in -[src/keeper/Keeper.ts:332](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L332) +[src/keeper/Keeper.ts:361](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L361) --- @@ -229,19 +229,19 @@ NFT upgradeable smart contract instance. #### Defined in -[src/keeper/Keeper.ts:258](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L258) +[src/keeper/Keeper.ts:293](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L293) --- ### nvmConfig -• **nvmConfig**: `default` +• **nvmConfig**: `NeverminedConfig` Nevermined Config smart contract instance. #### Defined in -[src/keeper/Keeper.ts:248](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L248) +[src/keeper/Keeper.ts:283](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L283) --- @@ -251,7 +251,7 @@ Nevermined Config smart contract instance. #### Defined in -[src/keeper/Keeper.ts:320](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L320) +[src/keeper/Keeper.ts:349](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L349) --- @@ -268,7 +268,7 @@ Nevermined Config smart contract instance. #### Defined in -[src/keeper/Keeper.ts:315](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L315) +[src/keeper/Keeper.ts:344](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L344) --- @@ -278,7 +278,7 @@ Nevermined Config smart contract instance. #### Defined in -[src/keeper/Keeper.ts:299](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L299) +[src/keeper/Keeper.ts:329](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L329) --- @@ -290,7 +290,7 @@ Template store manager smart contract instance. #### Defined in -[src/keeper/Keeper.ts:263](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L263) +[src/keeper/Keeper.ts:298](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L298) --- @@ -304,7 +304,6 @@ Templates instances. | Name | Type | | :------------------------------- | :-------------------------------------------------------------------- | -| `aaveCreditTemplate` | [`AaveCreditTemplate`](AaveCreditTemplate.md) | | `accessTemplate` | [`AccessTemplate`](AccessTemplate.md) | | `didSalesTemplate` | [`DIDSalesTemplate`](DIDSalesTemplate.md) | | `escrowComputeExecutionTemplate` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | @@ -315,7 +314,7 @@ Templates instances. #### Defined in -[src/keeper/Keeper.ts:304](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L304) +[src/keeper/Keeper.ts:334](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L334) --- @@ -327,7 +326,7 @@ Nevermined Token smart contract instance. #### Defined in -[src/keeper/Keeper.ts:238](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L238) +[src/keeper/Keeper.ts:273](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L273) --- @@ -345,17 +344,17 @@ Helpers for contracts. #### Defined in -[src/keeper/Keeper.ts:325](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L325) +[src/keeper/Keeper.ts:354](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L354) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -363,17 +362,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -381,13 +380,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -399,13 +416,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -417,17 +434,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -435,13 +452,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -453,13 +470,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -471,25 +488,140 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -Instantiable.web3 +Instantiable.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +Instantiable.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods @@ -513,7 +645,7 @@ Agreement template instance. #### Defined in -[src/keeper/Keeper.ts:417](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L417) +[src/keeper/Keeper.ts:448](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L448) --- @@ -527,13 +659,13 @@ Agreement template instance. #### Defined in -[src/keeper/Keeper.ts:430](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L430) +[src/keeper/Keeper.ts:461](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L461) --- ### getConditionByAddress -▸ **getConditionByAddress**(`address`): [`ConditionSmall`](ConditionSmall.md) +▸ **getConditionByAddress**(`address`): `ConditionSmall` Returns a condition by address. @@ -545,49 +677,49 @@ Returns a condition by address. #### Returns -[`ConditionSmall`](ConditionSmall.md) +`ConditionSmall` Condition instance. #### Defined in -[src/keeper/Keeper.ts:360](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L360) +[src/keeper/Keeper.ts:389](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L389) --- ### getNetworkId -▸ **getNetworkId**(): `Promise`<`number`\> +▸ **getNetworkId**(): `Promise`\<`number`\> Returns the id of the network. #### Returns -`Promise`<`number`\> +`Promise`\<`number`\> Network ID. #### Defined in -[src/keeper/Keeper.ts:388](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L388) +[src/keeper/Keeper.ts:419](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L419) --- ### getNetworkName -▸ **getNetworkName**(): `Promise`<`string`\> +▸ **getNetworkName**(): `Promise`\<`string`\> Returns the network by name. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> Network name. #### Defined in -[src/keeper/Keeper.ts:377](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L377) +[src/keeper/Keeper.ts:408](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L408) --- @@ -605,13 +737,13 @@ Network version. #### Defined in -[src/keeper/Keeper.ts:405](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L405) +[src/keeper/Keeper.ts:436](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L436) --- ### getTemplateByAddress -▸ **getTemplateByAddress**(`address`): [`AccessTemplate`](AccessTemplate.md) \| [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) \| [`DIDSalesTemplate`](DIDSalesTemplate.md) \| [`NFTAccessTemplate`](NFTAccessTemplate.md) \| [`NFT721AccessTemplate`](NFT721AccessTemplate.md) \| [`NFTSalesTemplate`](NFTSalesTemplate.md) \| [`NFT721SalesTemplate`](NFT721SalesTemplate.md) \| [`AaveCreditTemplate`](AaveCreditTemplate.md) +▸ **getTemplateByAddress**(`address`): `undefined` \| [`AccessTemplate`](AccessTemplate.md) \| [`NFT721AccessTemplate`](NFT721AccessTemplate.md) \| [`NFT721SalesTemplate`](NFT721SalesTemplate.md) \| [`NFTAccessTemplate`](NFTAccessTemplate.md) \| [`NFTSalesTemplate`](NFTSalesTemplate.md) \| [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) \| [`DIDSalesTemplate`](DIDSalesTemplate.md) Returns a template by address. @@ -623,19 +755,19 @@ Returns a template by address. #### Returns -[`AccessTemplate`](AccessTemplate.md) \| [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) \| [`DIDSalesTemplate`](DIDSalesTemplate.md) \| [`NFTAccessTemplate`](NFTAccessTemplate.md) \| [`NFT721AccessTemplate`](NFT721AccessTemplate.md) \| [`NFTSalesTemplate`](NFTSalesTemplate.md) \| [`NFT721SalesTemplate`](NFT721SalesTemplate.md) \| [`AaveCreditTemplate`](AaveCreditTemplate.md) +`undefined` \| [`AccessTemplate`](AccessTemplate.md) \| [`NFT721AccessTemplate`](NFT721AccessTemplate.md) \| [`NFT721SalesTemplate`](NFT721SalesTemplate.md) \| [`NFTAccessTemplate`](NFTAccessTemplate.md) \| [`NFTSalesTemplate`](NFTSalesTemplate.md) \| [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) \| [`DIDSalesTemplate`](DIDSalesTemplate.md) Agreement template instance. #### Defined in -[src/keeper/Keeper.ts:426](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L426) +[src/keeper/Keeper.ts:457](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L457) --- ### getTemplateByName -▸ **getTemplateByName**(`name`): [`AccessTemplate`](AccessTemplate.md) \| [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) \| [`DIDSalesTemplate`](DIDSalesTemplate.md) \| [`NFTAccessTemplate`](NFTAccessTemplate.md) \| [`NFT721AccessTemplate`](NFT721AccessTemplate.md) \| [`NFTSalesTemplate`](NFTSalesTemplate.md) \| [`NFT721SalesTemplate`](NFT721SalesTemplate.md) \| [`AaveCreditTemplate`](AaveCreditTemplate.md) +▸ **getTemplateByName**(`name`): `undefined` \| [`AccessTemplate`](AccessTemplate.md) \| [`NFT721AccessTemplate`](NFT721AccessTemplate.md) \| [`NFT721SalesTemplate`](NFT721SalesTemplate.md) \| [`NFTAccessTemplate`](NFTAccessTemplate.md) \| [`NFTSalesTemplate`](NFTSalesTemplate.md) \| [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) \| [`DIDSalesTemplate`](DIDSalesTemplate.md) Returns a template by name. @@ -647,61 +779,53 @@ Returns a template by name. #### Returns -[`AccessTemplate`](AccessTemplate.md) \| [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) \| [`DIDSalesTemplate`](DIDSalesTemplate.md) \| [`NFTAccessTemplate`](NFTAccessTemplate.md) \| [`NFT721AccessTemplate`](NFT721AccessTemplate.md) \| [`NFTSalesTemplate`](NFTSalesTemplate.md) \| [`NFT721SalesTemplate`](NFT721SalesTemplate.md) \| [`AaveCreditTemplate`](AaveCreditTemplate.md) +`undefined` \| [`AccessTemplate`](AccessTemplate.md) \| [`NFT721AccessTemplate`](NFT721AccessTemplate.md) \| [`NFT721SalesTemplate`](NFT721SalesTemplate.md) \| [`NFTAccessTemplate`](NFTAccessTemplate.md) \| [`NFTSalesTemplate`](NFTSalesTemplate.md) \| [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) \| [`DIDSalesTemplate`](DIDSalesTemplate.md) Agreement template instance. #### Defined in -[src/keeper/Keeper.ts:369](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L369) +[src/keeper/Keeper.ts:400](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L400) --- ### init -▸ **init**(): `Promise`<`void`\> - -#### Returns - -`Promise`<`void`\> +▸ **init**(`initOptions`): `Promise`\<`void`\> -#### Defined in - -[src/keeper/Keeper.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L68) - ---- - -### loadAaveInstances +#### Parameters -▸ **loadAaveInstances**(): `Promise`<[`Keeper`](Keeper.md)\> +| Name | Type | +| :------------ | :------------------------------------------------------------------------------------ | +| `initOptions` | [`NeverminedInitializationOptions`](../interfaces/NeverminedInitializationOptions.md) | #### Returns -`Promise`<[`Keeper`](Keeper.md)\> +`Promise`\<`void`\> #### Defined in -[src/keeper/Keeper.ts:434](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L434) +[src/keeper/Keeper.ts:63](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L63) --- ### loadCurveRoyaltiesInstance -▸ **loadCurveRoyaltiesInstance**(): `Promise`<[`CurveRoyalties`](CurveRoyalties.md)\> +▸ **loadCurveRoyaltiesInstance**(): `Promise`\<[`CurveRoyalties`](CurveRoyalties.md)\> #### Returns -`Promise`<[`CurveRoyalties`](CurveRoyalties.md)\> +`Promise`\<[`CurveRoyalties`](CurveRoyalties.md)\> #### Defined in -[src/keeper/Keeper.ts:457](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L457) +[src/keeper/Keeper.ts:465](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L465) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -719,13 +843,13 @@ Agreement template instance. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`Keeper`](Keeper.md)\> +▸ **getInstance**(`config`): `Promise`\<[`Keeper`](Keeper.md)\> Returns Keeper instance. @@ -737,7 +861,7 @@ Returns Keeper instance. #### Returns -`Promise`<[`Keeper`](Keeper.md)\> +`Promise`\<[`Keeper`](Keeper.md)\> [Keeper](Keeper.md) @@ -747,13 +871,13 @@ Returns Keeper instance. #### Defined in -[src/keeper/Keeper.ts:62](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Keeper.ts#L62) +[src/keeper/Keeper.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/Keeper.ts#L57) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -778,4 +902,4 @@ Returns Keeper instance. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/KeeperError.md b/docs/api-reference/classes/KeeperError.md index 0379a410a..d931a6f54 100644 --- a/docs/api-reference/classes/KeeperError.md +++ b/docs/api-reference/classes/KeeperError.md @@ -16,6 +16,7 @@ ### Properties +- [cause](KeeperError.md#cause) - [message](KeeperError.md#message) - [name](KeeperError.md#name) - [stack](KeeperError.md#stack) @@ -30,7 +31,7 @@ ### constructor -• **new KeeperError**(`message`) +• **new KeeperError**(`message`): [`KeeperError`](KeeperError.md) #### Parameters @@ -38,16 +39,34 @@ | :-------- | :------- | | `message` | `string` | +#### Returns + +[`KeeperError`](KeeperError.md) + #### Overrides Error.constructor #### Defined in -[src/errors/KeeperError.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/errors/KeeperError.ts#L2) +[src/errors/NeverminedErrors.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L20) ## Properties +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +Error.cause + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + ### message • **message**: `string` @@ -58,7 +77,7 @@ Error.message #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1068 +node_modules/typescript/lib/lib.es5.d.ts:1077 --- @@ -72,7 +91,7 @@ Error.name #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1067 +node_modules/typescript/lib/lib.es5.d.ts:1076 --- @@ -86,7 +105,7 @@ Error.stack #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1069 +node_modules/typescript/lib/lib.es5.d.ts:1078 --- @@ -94,12 +113,16 @@ node_modules/typescript/lib/lib.es5.d.ts:1069 ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Type declaration ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -111,17 +134,13 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from Error.prepareStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:11 +node_modules/@types/node/globals.d.ts:28 --- @@ -135,13 +154,13 @@ Error.stackTraceLimit #### Defined in -node_modules/@types/node/globals.d.ts:13 +node_modules/@types/node/globals.d.ts:30 ## Methods ### captureStackTrace -▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object @@ -162,4 +181,4 @@ Error.captureStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:4 +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/LockPaymentCondition.md b/docs/api-reference/classes/LockPaymentCondition.md index 2211f9d76..e3dc0ca36 100644 --- a/docs/api-reference/classes/LockPaymentCondition.md +++ b/docs/api-reference/classes/LockPaymentCondition.md @@ -4,7 +4,7 @@ ## Hierarchy -- [`ConsumerCondition`](ConsumerCondition.md)<[`ConditionContext`](../interfaces/ConditionContext.md)\> +- `ConsumerCondition`\<`ConditionContext`\> ↳ **`LockPaymentCondition`** @@ -26,12 +26,14 @@ - [artifactsFolder](LockPaymentCondition.md#artifactsfolder) - [circuitsFolder](LockPaymentCondition.md#circuitsfolder) +- [client](LockPaymentCondition.md#client) - [config](LockPaymentCondition.md#config) - [instanceConfig](LockPaymentCondition.md#instanceconfig) - [instantiableConfig](LockPaymentCondition.md#instantiableconfig) - [logger](LockPaymentCondition.md#logger) - [nevermined](LockPaymentCondition.md#nevermined) -- [web3](LockPaymentCondition.md#web3) +- [publicClient](LockPaymentCondition.md#publicclient) +- [walletClient](LockPaymentCondition.md#walletclient) ### Methods @@ -46,8 +48,7 @@ - [generateIdWithSeed](LockPaymentCondition.md#generateidwithseed) - [getConditionFulfilledEvent](LockPaymentCondition.md#getconditionfulfilledevent) - [getFromAddress](LockPaymentCondition.md#getfromaddress) -- [getInputsOfMethod](LockPaymentCondition.md#getinputsofmethod) -- [getSignatureOfMethod](LockPaymentCondition.md#getsignatureofmethod) +- [getTransactionLogs](LockPaymentCondition.md#gettransactionlogs) - [hashValues](LockPaymentCondition.md#hashvalues) - [hashValuesPlain](LockPaymentCondition.md#hashvaluesplain) - [init](LockPaymentCondition.md#init) @@ -58,6 +59,7 @@ - [send](LockPaymentCondition.md#send) - [sendFrom](LockPaymentCondition.md#sendfrom) - [setInstanceConfig](LockPaymentCondition.md#setinstanceconfig) +- [someLog](LockPaymentCondition.md#somelog) - [getInstance](LockPaymentCondition.md#getinstance) - [setInstanceConfig](LockPaymentCondition.md#setinstanceconfig-1) @@ -65,7 +67,7 @@ ### constructor -• **new LockPaymentCondition**(`contractName`) +• **new LockPaymentCondition**(`contractName`): [`LockPaymentCondition`](LockPaymentCondition.md) #### Parameters @@ -73,41 +75,45 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`LockPaymentCondition`](LockPaymentCondition.md) + #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[constructor](ConsumerCondition.md#constructor) +ConsumerCondition\.constructor #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[address](ConsumerCondition.md#address) +ConsumerCondition.address #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[contract](ConsumerCondition.md#contract) +ConsumerCondition.contract #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -117,25 +123,25 @@ #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[contractName](ConsumerCondition.md#contractname) +ConsumerCondition.contractName #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[events](ConsumerCondition.md#events) +ConsumerCondition.events #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -145,21 +151,21 @@ #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[version](ConsumerCondition.md#version) +ConsumerCondition.version #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -167,17 +173,17 @@ ConsumerCondition.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -185,13 +191,31 @@ ConsumerCondition.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ConsumerCondition.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -203,13 +227,13 @@ ConsumerCondition.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -221,17 +245,17 @@ ConsumerCondition.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -239,13 +263,13 @@ ConsumerCondition.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -257,13 +281,13 @@ ConsumerCondition.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -275,57 +299,172 @@ ConsumerCondition.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ConsumerCondition.web3 +ConsumerCondition.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ConsumerCondition.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### abortByTimeOut -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **abortByTimeOut**(`conditionId`, `from`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :------------ | :---------------------------------------------- | | `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[abortByTimeOut](ConsumerCondition.md#abortbytimeout) +ConsumerCondition.abortByTimeOut #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) +[src/keeper/contracts/conditions/Condition.abstract.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L75) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -335,29 +474,29 @@ ConsumerCondition.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[call](ConsumerCondition.md#call) +ConsumerCondition.call #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### fulfill -▸ **fulfill**(`agreementId`, `did`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfill**(`agreementId`, `did`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -369,54 +508,54 @@ ConsumerCondition.web3 | `tokenAddress` | `string` | | `amounts` | `bigint`[] | | `receivers` | `string`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Overrides -[ConsumerCondition](ConsumerCondition.md).[fulfill](ConsumerCondition.md#fulfill) +ConsumerCondition.fulfill #### Defined in -[src/keeper/contracts/conditions/LockPaymentCondition.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/LockPaymentCondition.ts#L42) +[src/keeper/contracts/conditions/LockPaymentCondition.ts:42](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/LockPaymentCondition.ts#L42) --- ### fulfillInstance -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillInstance**(`cond`, `additionalParams`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | +| Name | Type | Default value | +| :----------------- | :-------------------------------------------------------- | :------------ | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | `undefined` | +| `additionalParams` | `Record`\<`string`, `unknown`\> | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | +| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[fulfillInstance](ConsumerCondition.md#fulfillinstance) +ConsumerCondition.fulfillInstance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) +[src/keeper/contracts/conditions/Condition.abstract.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L139) --- ### fulfillPlain -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillPlain**(`agreementId`, `args`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters @@ -424,54 +563,54 @@ ConsumerCondition.web3 | :------------ | :-------------------------------------------------------- | :------------ | | `agreementId` | `string` | `undefined` | | `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | | `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[fulfillPlain](ConsumerCondition.md#fulfillplain) +ConsumerCondition.fulfillPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) +[src/keeper/contracts/conditions/Condition.abstract.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L47) --- ### fulfillWithNode -▸ **fulfillWithNode**(`_cond`, `_additionalParams`, `_from?`, `_txParams?`): `Promise`<`void`\> +▸ **fulfillWithNode**(`_cond`, `_additionalParams`, `_from`, `_txParams?`): `Promise`\<`void`\> #### Parameters -| Name | Type | -| :------------------ | :----------------------------------------------------------------------------------------- | -| `_cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `_additionalParams` | `Record`<`string`, `unknown`\> | -| `_from?` | [`Account`](Account.md) | -| `_txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------------ | :----------------------------------------------------- | +| `_cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | +| `_additionalParams` | `Record`\<`string`, `unknown`\> | +| `_from` | [`NvmAccount`](NvmAccount.md) | +| `_txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[fulfillWithNode](ConsumerCondition.md#fulfillwithnode) +ConsumerCondition.fulfillWithNode #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:217](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L217) +[src/keeper/contracts/conditions/Condition.abstract.ts:209](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L209) --- ### generateId -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> +▸ **generateId**(`agreementId`, `valueHash`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -482,21 +621,21 @@ ConsumerCondition.web3 #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[generateId](ConsumerCondition.md#generateid) +ConsumerCondition.generateId #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) +[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L61) --- ### generateIdHash -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> +▸ **generateIdHash**(`agreementId`, `...values`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -507,21 +646,21 @@ ConsumerCondition.web3 #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[generateIdHash](ConsumerCondition.md#generateidhash) +ConsumerCondition.generateIdHash #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) +[src/keeper/contracts/conditions/Condition.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L57) --- ### generateIdWithSeed -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> +▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`\<[`string`, `string`]\> #### Parameters @@ -532,15 +671,15 @@ ConsumerCondition.web3 #### Returns -`Promise`<[`string`, `string`]\> +`Promise`\<[`string`, `string`]\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[generateIdWithSeed](ConsumerCondition.md#generateidwithseed) +ConsumerCondition.generateIdWithSeed #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) +[src/keeper/contracts/conditions/Condition.abstract.ts:65](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L65) --- @@ -560,17 +699,17 @@ ConsumerCondition.web3 #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[getConditionFulfilledEvent](ConsumerCondition.md#getconditionfulfilledevent) +ConsumerCondition.getConditionFulfilledEvent #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) +[src/keeper/contracts/conditions/Condition.abstract.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L79) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -580,70 +719,46 @@ ConsumerCondition.web3 #### Returns -`Promise`<`string`\> - -#### Inherited from - -[ConsumerCondition](ConsumerCondition.md).[getFromAddress](ConsumerCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] +`Promise`\<`string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[getInputsOfMethod](ConsumerCondition.md#getinputsofmethod) +ConsumerCondition.getFromAddress #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[getSignatureOfMethod](ConsumerCondition.md#getsignatureofmethod) +ConsumerCondition.getTransactionLogs #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### hashValues -▸ **hashValues**(`...args`): `Promise`<`string`\> +▸ **hashValues**(`...args`): `Promise`\<`string`\> #### Parameters @@ -653,21 +768,21 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[hashValues](ConsumerCondition.md#hashvalues) +ConsumerCondition.hashValues #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) +[src/keeper/contracts/conditions/Condition.abstract.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L116) --- ### hashValuesPlain -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> +▸ **hashValuesPlain**(`...args`): `Promise`\<`string`\> #### Parameters @@ -677,97 +792,98 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[hashValuesPlain](ConsumerCondition.md#hashvaluesplain) +ConsumerCondition.hashValuesPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) +[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L122) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[init](ConsumerCondition.md#init) +ConsumerCondition.init #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instance -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instance**(`agreementId`, `params`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | +| Name | Type | +| :------------ | :------------------------------------------------------- | +| `agreementId` | `string` | +| `params` | `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> | #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[instance](ConsumerCondition.md#instance) +ConsumerCondition.instance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) +[src/keeper/contracts/conditions/Condition.abstract.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L163) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters | Name | Type | | :------------ | :-------------------------------------------------------------------- | | `agreementId` | `string` | -| `ctx` | [`ConditionContext`](../interfaces/ConditionContext.md) | +| `ctx` | `ConditionContext` | | `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[instanceFromDDO](ConsumerCondition.md#instancefromddo) +ConsumerCondition.instanceFromDDO #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) +[src/keeper/contracts/conditions/Condition.abstract.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L131) --- ### params -▸ **params**(`did`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +▸ **params**(`did`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`): `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> #### Parameters @@ -781,99 +897,99 @@ readonly `ParamType`[] #### Returns -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +`ConditionParameters`\<`Record`\<`string`, `unknown`\>\> #### Overrides -[ConsumerCondition](ConsumerCondition.md).[params](ConsumerCondition.md#params) +ConsumerCondition.params #### Defined in -[src/keeper/contracts/conditions/LockPaymentCondition.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/LockPaymentCondition.ts#L13) +[src/keeper/contracts/conditions/LockPaymentCondition.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/LockPaymentCondition.ts#L13) --- ### paramsFromDDO -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +▸ **paramsFromDDO**(`«destructured»`): `Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters -| Name | Type | -| :--------------- | :------------------------------------------------------ | -| `«destructured»` | [`ConditionContext`](../interfaces/ConditionContext.md) | +| Name | Type | +| :--------------- | :----------------- | +| `«destructured»` | `ConditionContext` | #### Returns -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Overrides -[ConsumerCondition](ConsumerCondition.md).[paramsFromDDO](ConsumerCondition.md#paramsfromddo) +ConsumerCondition.paramsFromDDO #### Defined in -[src/keeper/contracts/conditions/LockPaymentCondition.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/LockPaymentCondition.ts#L31) +[src/keeper/contracts/conditions/LockPaymentCondition.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/LockPaymentCondition.ts#L31) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[send](ConsumerCondition.md#send) +ConsumerCondition.send #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[sendFrom](ConsumerCondition.md#sendfrom) +ConsumerCondition.sendFrom #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -887,17 +1003,41 @@ readonly `ParamType`[] #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[setInstanceConfig](ConsumerCondition.md#setinstanceconfig) +ConsumerCondition.setInstanceConfig + +#### Defined in + +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +ConsumerCondition.someLog #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`LockPaymentCondition`](LockPaymentCondition.md)\> +▸ **getInstance**(`config`): `Promise`\<[`LockPaymentCondition`](LockPaymentCondition.md)\> #### Parameters @@ -907,21 +1047,21 @@ readonly `ParamType`[] #### Returns -`Promise`<[`LockPaymentCondition`](LockPaymentCondition.md)\> +`Promise`\<[`LockPaymentCondition`](LockPaymentCondition.md)\> #### Overrides -[ConsumerCondition](ConsumerCondition.md).[getInstance](ConsumerCondition.md#getinstance) +ConsumerCondition.getInstance #### Defined in -[src/keeper/contracts/conditions/LockPaymentCondition.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/LockPaymentCondition.ts#L9) +[src/keeper/contracts/conditions/LockPaymentCondition.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/LockPaymentCondition.ts#L9) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -942,8 +1082,8 @@ readonly `ParamType`[] #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[setInstanceConfig](ConsumerCondition.md#setinstanceconfig-1) +ConsumerCondition.setInstanceConfig #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/MarketplaceApi.md b/docs/api-reference/classes/MarketplaceApi.md index 0f0c40a1f..b47bfa830 100644 --- a/docs/api-reference/classes/MarketplaceApi.md +++ b/docs/api-reference/classes/MarketplaceApi.md @@ -26,13 +26,15 @@ - [artifactsFolder](MarketplaceApi.md#artifactsfolder) - [circuitsFolder](MarketplaceApi.md#circuitsfolder) +- [client](MarketplaceApi.md#client) - [config](MarketplaceApi.md#config) - [instanceConfig](MarketplaceApi.md#instanceconfig) - [instantiableConfig](MarketplaceApi.md#instantiableconfig) - [logger](MarketplaceApi.md#logger) - [nevermined](MarketplaceApi.md#nevermined) +- [publicClient](MarketplaceApi.md#publicclient) - [url](MarketplaceApi.md#url) -- [web3](MarketplaceApi.md#web3) +- [walletClient](MarketplaceApi.md#walletclient) ### Methods @@ -46,7 +48,7 @@ ### constructor -• **new MarketplaceApi**(`config`) +• **new MarketplaceApi**(`config`): [`MarketplaceApi`](MarketplaceApi.md) #### Parameters @@ -54,23 +56,27 @@ | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`MarketplaceApi`](MarketplaceApi.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/services/metadata/MarketplaceAPI.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L7) +[src/services/metadata/MarketplaceAPI.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L7) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -78,17 +84,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -96,13 +102,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -114,13 +138,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -132,17 +156,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -150,13 +174,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -168,13 +192,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -186,13 +210,95 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- ### url -• `Protected` `get` **url**(): `string` +• `get` **url**(): `string` #### Returns @@ -200,31 +306,64 @@ Instantiable.nevermined #### Defined in -[src/services/metadata/MarketplaceAPI.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L12) +[src/services/metadata/MarketplaceAPI.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L12) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### addNewAddress -▸ **addNewAddress**(`clientAssertion`): `Promise`<`string`\> +▸ **addNewAddress**(`clientAssertion`): `Promise`\<`string`\> #### Parameters @@ -234,17 +373,17 @@ Instantiable.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/services/metadata/MarketplaceAPI.ts:36](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L36) +[src/services/metadata/MarketplaceAPI.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L36) --- ### login -▸ **login**(`clientAssertion`): `Promise`<`string`\> +▸ **login**(`clientAssertion`): `Promise`\<`string`\> #### Parameters @@ -254,17 +393,17 @@ Instantiable.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/services/metadata/MarketplaceAPI.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L16) +[src/services/metadata/MarketplaceAPI.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L16) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -282,13 +421,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -306,13 +445,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -337,4 +476,4 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/MetadataService.md b/docs/api-reference/classes/MetadataService.md index 04af128dd..f6c2afa6c 100644 --- a/docs/api-reference/classes/MetadataService.md +++ b/docs/api-reference/classes/MetadataService.md @@ -21,13 +21,15 @@ Metadata provides an off-chain database store for metadata about data assets. - [artifactsFolder](MetadataService.md#artifactsfolder) - [circuitsFolder](MetadataService.md#circuitsfolder) +- [client](MetadataService.md#client) - [config](MetadataService.md#config) - [instanceConfig](MetadataService.md#instanceconfig) - [instantiableConfig](MetadataService.md#instantiableconfig) - [logger](MetadataService.md#logger) - [nevermined](MetadataService.md#nevermined) +- [publicClient](MetadataService.md#publicclient) - [url](MetadataService.md#url) -- [web3](MetadataService.md#web3) +- [walletClient](MetadataService.md#walletclient) ### Methods @@ -55,7 +57,7 @@ Metadata provides an off-chain database store for metadata about data assets. ### constructor -• **new MetadataService**(`config`) +• **new MetadataService**(`config`): [`MetadataService`](MetadataService.md) #### Parameters @@ -63,23 +65,27 @@ Metadata provides an off-chain database store for metadata about data assets. | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`MetadataService`](MetadataService.md) + #### Inherited from [MarketplaceApi](MarketplaceApi.md).[constructor](MarketplaceApi.md#constructor) #### Defined in -[src/services/metadata/MarketplaceAPI.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L7) +[src/services/metadata/MarketplaceAPI.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L7) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -87,17 +93,17 @@ MarketplaceApi.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -105,13 +111,31 @@ MarketplaceApi.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +MarketplaceApi.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -123,13 +147,13 @@ MarketplaceApi.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -141,17 +165,17 @@ MarketplaceApi.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -159,13 +183,13 @@ MarketplaceApi.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -177,13 +201,13 @@ MarketplaceApi.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -195,13 +219,95 @@ MarketplaceApi.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +MarketplaceApi.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- ### url -• `Protected` `get` **url**(): `string` +• `get` **url**(): `string` #### Returns @@ -213,31 +319,64 @@ MarketplaceApi.url #### Defined in -[src/services/metadata/MarketplaceAPI.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L12) +[src/services/metadata/MarketplaceAPI.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L12) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -MarketplaceApi.web3 +MarketplaceApi.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### addNewAddress -▸ **addNewAddress**(`clientAssertion`): `Promise`<`string`\> +▸ **addNewAddress**(`clientAssertion`): `Promise`\<`string`\> #### Parameters @@ -247,7 +386,7 @@ MarketplaceApi.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -255,13 +394,13 @@ MarketplaceApi.web3 #### Defined in -[src/services/metadata/MarketplaceAPI.ts:36](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L36) +[src/services/metadata/MarketplaceAPI.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L36) --- ### delete -▸ **delete**(`did`): `Promise`<`Response`\> +▸ **delete**(`did`): `Promise`\<`Response`\> #### Parameters @@ -271,17 +410,17 @@ MarketplaceApi.web3 #### Returns -`Promise`<`Response`\> +`Promise`\<`Response`\> #### Defined in -[src/services/metadata/MetadataService.ts:240](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L240) +[src/services/metadata/MetadataService.ts:238](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L238) --- ### getAccessUrl -▸ **getAccessUrl**(`accessToken`, `payload`): `Promise`<`string`\> +▸ **getAccessUrl**(`accessToken`, `payload`): `Promise`\<`string`\> #### Parameters @@ -292,11 +431,11 @@ MarketplaceApi.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/services/metadata/MetadataService.ts:46](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L46) +[src/services/metadata/MetadataService.ts:46](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L46) --- @@ -316,27 +455,27 @@ MarketplaceApi.web3 #### Defined in -[src/services/metadata/MetadataService.ts:356](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L356) +[src/services/metadata/MetadataService.ts:353](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L353) --- ### getVersionInfo -▸ **getVersionInfo**(): `Promise`<`any`\> +▸ **getVersionInfo**(): `Promise`\<`any`\> #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/metadata/MetadataService.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L42) +[src/services/metadata/MetadataService.ts:42](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L42) --- ### login -▸ **login**(`clientAssertion`): `Promise`<`string`\> +▸ **login**(`clientAssertion`): `Promise`\<`string`\> #### Parameters @@ -346,7 +485,7 @@ MarketplaceApi.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -354,13 +493,13 @@ MarketplaceApi.web3 #### Defined in -[src/services/metadata/MarketplaceAPI.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L16) +[src/services/metadata/MarketplaceAPI.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L16) --- ### queryMetadata -▸ **queryMetadata**(`query`): `Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +▸ **queryMetadata**(`query`): `Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Search over the DDOs using a query. @@ -372,19 +511,19 @@ Search over the DDOs using a query. #### Returns -`Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +`Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> A list of [QueryResult](../interfaces/QueryResult.md)s. #### Defined in -[src/services/metadata/MetadataService.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L74) +[src/services/metadata/MetadataService.ts:74](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L74) --- ### queryServiceMetadata -▸ **queryServiceMetadata**(`query`): `Promise`<[`ServiceSecondary`](../interfaces/ServiceSecondary.md)[]\> +▸ **queryServiceMetadata**(`query`): `Promise`\<[`ServiceSecondary`](../interfaces/ServiceSecondary.md)[]\> Search over the Services using a query. @@ -396,19 +535,19 @@ Search over the Services using a query. #### Returns -`Promise`<[`ServiceSecondary`](../interfaces/ServiceSecondary.md)[]\> +`Promise`\<[`ServiceSecondary`](../interfaces/ServiceSecondary.md)[]\> A list of [ServiceSecondary](../interfaces/ServiceSecondary.md). #### Defined in -[src/services/metadata/MetadataService.ts:106](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L106) +[src/services/metadata/MetadataService.ts:106](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L106) --- ### retrieveDDO -▸ **retrieveDDO**(`did?`, `metadataServiceEndpoint?`): `Promise`<[`DDO`](DDO.md)\> +▸ **retrieveDDO**(`did?`, `metadataServiceEndpoint?`): `Promise`\<[`DDO`](DDO.md)\> Retrieves a DDO by DID. @@ -421,19 +560,19 @@ Retrieves a DDO by DID. #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> DDO of the asset. #### Defined in -[src/services/metadata/MetadataService.ts:196](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L196) +[src/services/metadata/MetadataService.ts:195](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L195) --- ### retrieveDDOByUrl -▸ **retrieveDDOByUrl**(`metadataServiceEndpoint?`): `Promise`<[`DDO`](DDO.md)\> +▸ **retrieveDDOByUrl**(`metadataServiceEndpoint?`): `Promise`\<[`DDO`](DDO.md)\> #### Parameters @@ -443,17 +582,17 @@ DDO of the asset. #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> #### Defined in -[src/services/metadata/MetadataService.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L252) +[src/services/metadata/MetadataService.ts:249](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L249) --- ### retrieveDDOFromImmutableBackend -▸ **retrieveDDOFromImmutableBackend**(`immutableUrl`): `Promise`<[`DDO`](DDO.md)\> +▸ **retrieveDDOFromImmutableBackend**(`immutableUrl`): `Promise`\<[`DDO`](DDO.md)\> #### Parameters @@ -463,17 +602,17 @@ DDO of the asset. #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> #### Defined in -[src/services/metadata/MetadataService.ts:229](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L229) +[src/services/metadata/MetadataService.ts:227](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L227) --- ### retrieveService -▸ **retrieveService**(`agreementId`, `metadataServiceEndpoint?`): `Promise`<[`ServiceSecondary`](../interfaces/ServiceSecondary.md)\> +▸ **retrieveService**(`agreementId`, `metadataServiceEndpoint?`): `Promise`\<[`ServiceSecondary`](../interfaces/ServiceSecondary.md)\> Retrieves a service by its agreementId. @@ -486,19 +625,19 @@ Retrieves a service by its agreementId. #### Returns -`Promise`<[`ServiceSecondary`](../interfaces/ServiceSecondary.md)\> +`Promise`\<[`ServiceSecondary`](../interfaces/ServiceSecondary.md)\> Service object. #### Defined in -[src/services/metadata/MetadataService.ts:291](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L291) +[src/services/metadata/MetadataService.ts:288](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L288) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -516,13 +655,13 @@ Service object. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### status -▸ **status**(`did`, `metadataServiceEndpoint?`): `Promise`<[`DDOStatus`](../interfaces/DDOStatus.md)\> +▸ **status**(`did`, `metadataServiceEndpoint?`): `Promise`\<[`DDOStatus`](../interfaces/DDOStatus.md)\> Retrieves a DDO by DID. @@ -535,19 +674,19 @@ Retrieves a DDO by DID. #### Returns -`Promise`<[`DDOStatus`](../interfaces/DDOStatus.md)\> +`Promise`\<[`DDOStatus`](../interfaces/DDOStatus.md)\> DDO of the asset. #### Defined in -[src/services/metadata/MetadataService.ts:261](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L261) +[src/services/metadata/MetadataService.ts:258](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L258) --- ### storeDDO -▸ **storeDDO**(`ddo`): `Promise`<[`DDO`](DDO.md)\> +▸ **storeDDO**(`ddo`): `Promise`\<[`DDO`](DDO.md)\> Stores a DDO in Metadata. @@ -559,19 +698,19 @@ Stores a DDO in Metadata. #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> Final DDO. #### Defined in -[src/services/metadata/MetadataService.ts:164](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L164) +[src/services/metadata/MetadataService.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L163) --- ### storeService -▸ **storeService**(`agreementId`, `agreement`): `Promise`<[`ServiceSecondary`](../interfaces/ServiceSecondary.md)\> +▸ **storeService**(`agreementId`, `agreement`): `Promise`\<[`ServiceSecondary`](../interfaces/ServiceSecondary.md)\> #### Parameters @@ -582,19 +721,19 @@ Final DDO. #### Returns -`Promise`<[`ServiceSecondary`](../interfaces/ServiceSecondary.md)\> +`Promise`\<[`ServiceSecondary`](../interfaces/ServiceSecondary.md)\> the newly stored service object #### Defined in -[src/services/metadata/MetadataService.ts:324](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L324) +[src/services/metadata/MetadataService.ts:321](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L321) --- ### updateDDO -▸ **updateDDO**(`did`, `ddo`): `Promise`<[`DDO`](DDO.md)\> +▸ **updateDDO**(`did`, `ddo`): `Promise`\<[`DDO`](DDO.md)\> Update a DDO in Metadata. @@ -607,19 +746,19 @@ Update a DDO in Metadata. #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> Final DDO. #### Defined in -[src/services/metadata/MetadataService.ts:132](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L132) +[src/services/metadata/MetadataService.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L132) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -637,13 +776,13 @@ Final DDO. #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -668,4 +807,4 @@ Final DDO. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/MimcCipher.md b/docs/api-reference/classes/MimcCipher.md index 328b4a152..d6381f21f 100644 --- a/docs/api-reference/classes/MimcCipher.md +++ b/docs/api-reference/classes/MimcCipher.md @@ -21,7 +21,7 @@ ### constructor -• **new MimcCipher**(`x`, `y`) +• **new MimcCipher**(`x`, `y`): [`MimcCipher`](MimcCipher.md) #### Parameters @@ -30,9 +30,13 @@ | `x` | `string` | | `y` | `string` | +#### Returns + +[`MimcCipher`](MimcCipher.md) + #### Defined in -[src/models/KeyTransfer.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/KeyTransfer.ts#L23) +[src/models/KeyTransfer.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/KeyTransfer.ts#L23) ## Properties @@ -42,7 +46,7 @@ #### Defined in -[src/models/KeyTransfer.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/KeyTransfer.ts#L20) +[src/models/KeyTransfer.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/KeyTransfer.ts#L20) --- @@ -52,7 +56,7 @@ #### Defined in -[src/models/KeyTransfer.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/KeyTransfer.ts#L21) +[src/models/KeyTransfer.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/KeyTransfer.ts#L21) ## Methods @@ -66,4 +70,4 @@ #### Defined in -[src/models/KeyTransfer.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/KeyTransfer.ts#L28) +[src/models/KeyTransfer.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/KeyTransfer.ts#L28) diff --git a/docs/api-reference/classes/NFT1155Api.md b/docs/api-reference/classes/NFT1155Api.md index 918cb9965..f39091237 100644 --- a/docs/api-reference/classes/NFT1155Api.md +++ b/docs/api-reference/classes/NFT1155Api.md @@ -28,13 +28,15 @@ Allows the interaction with external ERC-1155 NFT contracts built on top of the - [address](NFT1155Api.md#address) - [artifactsFolder](NFT1155Api.md#artifactsfolder) - [circuitsFolder](NFT1155Api.md#circuitsfolder) +- [client](NFT1155Api.md#client) - [config](NFT1155Api.md#config) - [getContract](NFT1155Api.md#getcontract) - [instanceConfig](NFT1155Api.md#instanceconfig) - [instantiableConfig](NFT1155Api.md#instantiableconfig) - [logger](NFT1155Api.md#logger) - [nevermined](NFT1155Api.md#nevermined) -- [web3](NFT1155Api.md#web3) +- [publicClient](NFT1155Api.md#publicclient) +- [walletClient](NFT1155Api.md#walletclient) ### Methods @@ -78,7 +80,11 @@ Allows the interaction with external ERC-1155 NFT contracts built on top of the ### constructor -• **new NFT1155Api**() +• **new NFT1155Api**(): [`NFT1155Api`](NFT1155Api.md) + +#### Returns + +[`NFT1155Api`](NFT1155Api.md) #### Inherited from @@ -92,7 +98,7 @@ Allows the interaction with external ERC-1155 NFT contracts built on top of the #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L22) +[src/nevermined/api/nfts/NFT1155Api.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L26) --- @@ -102,7 +108,7 @@ Allows the interaction with external ERC-1155 NFT contracts built on top of the #### Index signature -▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`Service`](../code-reference.md#service)\> +▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`Service`](../code-reference.md#service)\> #### Inherited from @@ -110,7 +116,7 @@ Allows the interaction with external ERC-1155 NFT contracts built on top of the #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L29) +[src/nevermined/api/RegistryBaseApi.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L39) ## Accessors @@ -118,7 +124,7 @@ Allows the interaction with external ERC-1155 NFT contracts built on top of the • `get` **address**(): `string` -Gets the ERC-721 NFT Contract address +Gets the ERC-1155 NFT Contract address #### Returns @@ -128,17 +134,17 @@ The NFT contract address #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:60](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L60) +[src/nevermined/api/nfts/NFT1155Api.ts:64](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L64) --- ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -146,17 +152,17 @@ NFTsBaseApi.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -164,13 +170,31 @@ NFTsBaseApi.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +NFTsBaseApi.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -182,7 +206,7 @@ NFTsBaseApi.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- @@ -200,13 +224,13 @@ The `Nft1155Contract` instance #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L68) +[src/nevermined/api/nfts/NFT1155Api.ts:72](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L72) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -218,17 +242,17 @@ NFTsBaseApi.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -236,13 +260,13 @@ NFTsBaseApi.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -254,13 +278,13 @@ NFTsBaseApi.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -272,31 +296,146 @@ NFTsBaseApi.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -NFTsBaseApi.web3 +NFTsBaseApi.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +NFTsBaseApi.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### \_details -▸ `Protected` **\_details**(`did`, `ercType`): `Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +▸ **\_details**(`did`, `ercType`): `Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> Get the details of an NFT @@ -309,7 +448,7 @@ Get the details of an NFT #### Returns -`Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +`Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> The details of the NFT. @@ -333,13 +472,13 @@ assert.equal(details.owner, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L150) +[src/nevermined/api/nfts/NFTsBaseApi.ts:152](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L152) --- ### access -▸ **access**(`did`, `consumer`, `destination?`, `fileIndex?`, `agreementId?`, `buyer?`, `babysig?`, `serviceReference?`): `Promise`<`boolean`\> +▸ **access**(`did`, `from`, `destination?`, `fileIndex?`, `agreementId?`, `buyer?`, `babysig?`, `serviceReference?`): `Promise`\<`boolean`\> Access the files associated with an NFT. @@ -348,7 +487,7 @@ Access the files associated with an NFT. | Name | Type | Default value | Description | | :----------------- | :------------------------------------------------------------ | :------------- | :------------------------------------------------------------------------ | | `did` | `string` | `undefined` | The Decentralized Identifier of the NFT asset. | -| `consumer` | [`Account`](Account.md) | `undefined` | The NFT holder account. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The user account holding NFTs (after purchase) requesting the access | | `destination?` | `string` | `undefined` | The download destination for the files. | | `fileIndex?` | `number` | `undefined` | The index of the file. If unset will download all the files in the asset. | | `agreementId` | `string` | `'0x'` | The NFT sales agreement id. | @@ -358,7 +497,7 @@ Access the files associated with an NFT. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the access was successful or file if isToDownload is false. @@ -379,13 +518,13 @@ const result = await nevermined.nfts1155.access(ddo.id, collector, '/tmp/') #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:419](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L419) +[src/nevermined/api/nfts/NFTsBaseApi.ts:427](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L427) --- ### addRating -▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, it adds a vote to the asset curation information. @@ -396,13 +535,13 @@ Given a DID, it adds a vote to the asset curation information. | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `newRating` | `number` | `undefined` | New average rating of the asset | | `numVotesAdded` | `number` | `1` | Number of new votes added to the rating, typically just 1 | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -412,26 +551,26 @@ Given a DID, it adds a vote to the asset curation information. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:514](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L514) +[src/nevermined/api/RegistryBaseApi.ts:534](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L534) --- ### balance -▸ **balance**(`did`, `account`): `Promise`<`bigint`\> +▸ **balance**(`did`, `account`): `Promise`\<`bigint`\> Get the NFT balance for a particular did associated to an account/address #### Parameters -| Name | Type | Description | -| :-------- | :---------------------------------- | :--------------------------------------------- | -| `did` | `string` | The Decentralized Identifier of the NFT asset. | -| `account` | `string` \| [`Account`](Account.md) | The account/address to check the balance of. | +| Name | Type | Description | +| :-------- | :---------------------------------------- | :--------------------------------------------- | +| `did` | `string` | The Decentralized Identifier of the NFT asset. | +| `account` | `string` \| [`NvmAccount`](NvmAccount.md) | The account/address to check the balance of. | #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> The number of editions of a NFT owned by the account/address. @@ -443,30 +582,30 @@ const balance = await nevermined.nfts1155.balance(ddo.id, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:466](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L466) +[src/nevermined/api/nfts/NFT1155Api.ts:464](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L464) --- ### burn -▸ **burn**(`tokenId`, `nftAmount`, `account`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **burn**(`tokenId`, `nftAmount`, `from`, `txParams?`): `Promise`\<`any`\> -Burn NFTs associated with an asset. +It burns NFTs associated with an asset. #### Parameters -| Name | Type | Description | -| :---------- | :---------------------------------------------- | :--------------------------------------------- | -| `tokenId` | `string` | The Decentralized Identifier of the NFT asset. | -| `nftAmount` | `bigint` | The amount of NFTs to burn. | -| `account` | [`Account`](Account.md) | The account of the publisher of the NFT. | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | +| Name | Type | Description | +| :---------- | :---------------------------------------------- | :---------------------------------------------------------------- | +| `tokenId` | `string` | The Decentralized Identifier of the NFT asset. | +| `nftAmount` | `bigint` | The amount of NFTs to burn. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the publisher of the NFT with permissions to burn. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Remarks`** @@ -480,15 +619,15 @@ await nevermined.nfts1155.burn(did, 2n, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:185](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L185) +[src/nevermined/api/nfts/NFT1155Api.ts:189](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L189) --- ### burnFromHolder -▸ **burnFromHolder**(`holder`, `tokenId`, `nftAmount`, `account`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **burnFromHolder**(`holder`, `tokenId`, `nftAmount`, `from`, `txParams?`): `Promise`\<`any`\> -Burn NFTs associated with an asset of a specific account. +Burns NFTs associated with an asset of a specific account. #### Parameters @@ -497,14 +636,14 @@ Burn NFTs associated with an asset of a specific account. | `holder` | `string` | The address of the account that holds the NFTs. | | `tokenId` | `string` | The TokenId of the NFT | | `nftAmount` | `bigint` | The amount of NFTs to burn. | -| `account` | `string` \| [`Account`](Account.md) | The account of the publisher of the NFT. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the publisher of the NFT. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Remarks`** @@ -518,29 +657,29 @@ await nevermined.nfts1155.burnTo(holder, tokenId, 2n, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L213) +[src/nevermined/api/nfts/NFT1155Api.ts:217](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L217) --- ### buySecondaryMarketNft -▸ **buySecondaryMarketNft**(`consumer`, `nftAmount?`, `agreementIdSeed`, `conditionsTimeout?`, `txParams?`): `Promise`<`boolean`\> +▸ **buySecondaryMarketNft**(`from`, `nftAmount?`, `agreementIdSeed`, `conditionsTimeout?`, `txParams?`): `Promise`\<`boolean`\> Buys a number of listed NFTs on secondary markets. #### Parameters -| Name | Type | Description | -| :------------------ | :---------------------------------------------- | :----------------------------------------- | -| `consumer` | [`Account`](Account.md) | The account of the buyer/consumer. | -| `nftAmount` | `bigint` | The number of assets to buy. 1 by default. | -| `agreementIdSeed` | `string` | - | -| `conditionsTimeout` | `number`[] | - | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :------------------ | :---------------------------------------------- | :--------------------------------------------------------- | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the buyer/consumer. | +| `nftAmount` | `bigint` | The number of assets to buy. 1 by default. | +| `agreementIdSeed` | `string` | The seed of the initial sales agreement created off-chain. | +| `conditionsTimeout` | `number`[] | The timeout for the conditions. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the buy was successful. @@ -561,30 +700,30 @@ Thrown if there is an error buying the NFT. #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:341](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L341) +[src/nevermined/api/nfts/NFTsBaseApi.ts:345](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L345) --- ### claim -▸ **claim**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `did?`, `serviceIndex?`): `Promise`<`boolean`\> +▸ **claim**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `did?`, `serviceIndex?`): `Promise`\<`boolean`\> Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. #### Parameters -| Name | Type | Description | -| :--------------- | :------- | :--------------------------------------------------------------------------- | -| `agreementId` | `string` | The NFT sales agreement id. | -| `nftHolder` | `string` | The address of the current owner of the NFT. | -| `nftReceiver` | `string` | The address where the NFT should be transferred. | -| `numberEditions` | `bigint` | The number of NFT editions to transfer. If the NFT is ERC-721 it should be 1 | -| `did?` | `string` | The Decentralized Identifier of the asset. | -| `serviceIndex?` | `number` | The index of the service in the DDO that will be claimed | +| Name | Type | Description | +| :--------------- | :------- | :---------------------------------------------------------------------------- | +| `agreementId` | `string` | The NFT sales agreement id. | +| `nftHolder` | `string` | The address of the current owner of the NFT. | +| `nftReceiver` | `string` | The address where the NFT should be transferred. | +| `numberEditions` | `bigint` | The number of NFT editions to transfer. If the NFT is ERC-1155 it should be 1 | +| `did?` | `string` | The Decentralized Identifier of the asset. | +| `serviceIndex?` | `number` | The index of the service in the DDO that will be claimed | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -600,18 +739,24 @@ as soon as the payment is made **`Example`** ```ts -const receipt = await nevermined.nfts721.claim(agreementId, editor.getId(), subscriber.getId(), 1n) +const receipt = await nevermined.nfts1155.claim( + agreementId, + publisherAddress, + subscriberAddress, + 1n, + did, +) ``` #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:321](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L321) +[src/nevermined/api/nfts/NFT1155Api.ts:320](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L320) --- ### claimNFT -▸ `Protected` **claimNFT**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `ercType?`, `did?`, `serviceIndex?`): `Promise`<`boolean`\> +▸ **claimNFT**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `ercType?`, `did?`, `serviceIndex?`): `Promise`\<`boolean`\> Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. @@ -629,7 +774,7 @@ Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -664,13 +809,13 @@ const receipt = await nevermined.nfts721.claim( #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L50) +[src/nevermined/api/nfts/NFTsBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L52) --- ### create -▸ **create**(`nftAttributes`, `publisher`, `publicationOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **create**(`nftAttributes`, `from`, `publicationOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> Creates a new Nevermined asset associated to a NFT (ERC-1155). @@ -678,14 +823,14 @@ Creates a new Nevermined asset associated to a NFT (ERC-1155). | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | -| `nftAttributes` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-721) associated to the asset | -| `publisher` | [`Account`](Account.md) | The account publishing the asset | +| `nftAttributes` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-1155) associated to the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The newly registered [DDO](DDO.md). @@ -714,15 +859,15 @@ const ddo = await nevermined.nfts1155.create(nftAttributes, publisher) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:103](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L103) +[src/nevermined/api/nfts/NFT1155Api.ts:107](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L107) --- ### details -▸ **details**(`did`): `Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +▸ **details**(`did`): `Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> -Get the details of an NFT +Get the details of a NFT #### Parameters @@ -732,7 +877,7 @@ Get the details of an NFT #### Returns -`Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +`Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> The details of the NFT. @@ -752,26 +897,26 @@ assert.equal(details.owner, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:679](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L679) +[src/nevermined/api/nfts/NFT1155Api.ts:676](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L676) --- ### getSubscriptionToken -▸ **getSubscriptionToken**(`did`, `account`): `Promise`<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> +▸ **getSubscriptionToken**(`did`, `from`): `Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> Get a JWT token for an asset associated with a webService #### Parameters -| Name | Type | Description | -| :-------- | :---------------------- | :----------------------------------------------------------------------------- | -| `did` | `string` | The did of the asset with a webService resource and an associated subscription | -| `account` | [`Account`](Account.md) | Account of the user requesting the token | +| Name | Type | Description | +| :----- | :---------------------------- | :----------------------------------------------------------------------------- | +| `did` | `string` | The did of the asset with a webService resource and an associated subscription | +| `from` | [`NvmAccount`](NvmAccount.md) | Account of the user requesting the token | #### Returns -`Promise`<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> +`Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> [SubscriptionToken](../interfaces/SubscriptionToken.md) @@ -790,13 +935,13 @@ assert.isDefined(response.neverminedProxyUri) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:478](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L478) +[src/nevermined/api/nfts/NFTsBaseApi.ts:490](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L490) --- ### grantOperatorRole -▸ **grantOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **grantOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Adds a minter (`minterAddress`) to the NFT Contract. Granting and revoking minting permissions only can be done by the NFT Contract owner @@ -806,14 +951,14 @@ Granting and revoking minting permissions only can be done by the NFT Contract o | Name | Type | Description | | :---------------- | :---------------------------------------------- | :--------------------------------------------------------------------- | | `operatorAddress` | `string` | The address of the account to be added as operator in the NFT Contract | -| `from?` | [`Account`](Account.md) | The account giving operator permissions | +| `from` | [`NvmAccount`](NvmAccount.md) | The account giving operator permissions | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -823,13 +968,13 @@ await nevermined.nfts1155.grantOperatorRole(someoneElse, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:625](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L625) +[src/nevermined/api/nfts/NFT1155Api.ts:622](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L622) --- ### isApprovedForAll -▸ **isApprovedForAll**(`operatorAddress`, `from`): `Promise`<`unknown`\> +▸ **isApprovedForAll**(`operatorAddress`, `from`): `Promise`\<`unknown`\> Returns if the `operatorAddress` is approved @@ -842,7 +987,7 @@ Returns if the `operatorAddress` is approved #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> Boolean saying if the `operatorAddress` is approved @@ -858,13 +1003,13 @@ await nevermined.nfts1155.isApprovedForAll(someoneElse, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:540](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L540) +[src/nevermined/api/nfts/NFT1155Api.ts:538](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L538) --- ### isOperator -▸ **isOperator**(`nftContractAddress`, `operatorAddress`, `ercType?`): `Promise`<`boolean`\> +▸ **isOperator**(`nftContractAddress`, `operatorAddress`, `ercType?`): `Promise`\<`boolean`\> Check if a particular address is the operator of given a NFT address. @@ -878,7 +1023,7 @@ Check if a particular address is the operator of given a NFT address. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> operator status of address as a boolean @@ -888,13 +1033,13 @@ operator status of address as a boolean #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:116](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L116) +[src/nevermined/api/nfts/NFTsBaseApi.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L118) --- ### isOperatorOfDID -▸ **isOperatorOfDID**(`did`, `address`, `ercType?`): `Promise`<`boolean`\> +▸ **isOperatorOfDID**(`did`, `address`, `ercType?`): `Promise`\<`boolean`\> Check if a particular address is the operator of a DID. @@ -908,7 +1053,7 @@ Check if a particular address is the operator of a DID. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> operator status of address as a boolean @@ -918,13 +1063,13 @@ operator status of address as a boolean #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:91](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L91) +[src/nevermined/api/nfts/NFTsBaseApi.ts:93](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L93) --- ### list -▸ **list**(`did`, `list`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **list**(`did`, `list`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset allowing to list or unlist it. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. In a Nevermined environment, when an asset is unlisted, it is not possible to be found and accessed by any user. @@ -935,13 +1080,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be | :---------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `list` | `boolean` | `undefined` | Needs the asset to be listed or unlisted | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -951,13 +1096,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:462](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L462) +[src/nevermined/api/RegistryBaseApi.ts:482](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L482) --- ### listOnSecondaryMarkets -▸ **listOnSecondaryMarkets**(`ddo`, `assetPrice`, `nftAmount`, `nftTransfer`, `provider`, `token`, `owner`): `Promise`<`string`\> +▸ **listOnSecondaryMarkets**(`ddo`, `assetPrice`, `nftAmount`, `nftTransfer`, `provider`, `token`, `from`): `Promise`\<`string`\> After purchase re-list an NFT to enable secondary market sales. @@ -971,11 +1116,11 @@ After purchase re-list an NFT to enable secondary market sales. | `nftTransfer` | `boolean` | - | | `provider` | `string` | The address that will be the provider of the secondary sale. | | `token` | [`Token`](Token.md) | - | -| `owner` | [`Account`](Account.md) | The account of the current owner. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the current owner. | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> the agreementId of the secondary sale. @@ -1003,15 +1148,15 @@ Thrown if there is an error listing the NFT. #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:260](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L260) +[src/nevermined/api/nfts/NFTsBaseApi.ts:262](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L262) --- ### mint -▸ **mint**(`did`, `nftAmount`, `receiver`, `account`, `data?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **mint**(`did`, `nftAmount`, `receiver`, `from`, `data?`, `txParams?`): `Promise`\<`any`\> -Mint NFTs associated with an asset. +It mints the NFTs associated with an asset. #### Parameters @@ -1019,16 +1164,16 @@ Mint NFTs associated with an asset. | :---------- | :---------------------------------------------- | :-------------------------------------------------------------------------------------------- | | `did` | `string` | The Decentralized Identifier of the NFT asset. | | `nftAmount` | `bigint` | The amount of NFTs to mint. | -| `receiver` | `string` | Account address of the NFT receiver, if `undefined` the minter account will receive the NFT/s | -| `account` | [`Account`](Account.md) | The account to mint the NFT. \* | +| `receiver` | `undefined` \| `string` | Account address of the NFT receiver, if `undefined` the minter account will receive the NFT/s | +| `from` | [`NvmAccount`](NvmAccount.md) | The account minting the NFT. \* | | `data?` | `string` | Data | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Remarks`** @@ -1042,15 +1187,15 @@ await nevermined.nfts1155.mint(did, 10n, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:145](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L145) +[src/nevermined/api/nfts/NFT1155Api.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L149) --- ### order -▸ **order**(`did`, `numberEditions`, `consumer`, `serviceReference?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **order**(`did`, `numberEditions`, `from`, `serviceReference?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> -Buy NFTs. +It orders NFTs. #### Parameters @@ -1058,13 +1203,13 @@ Buy NFTs. | :----------------- | :------------------------------------------------------------ | :------------ | :------------------------------------------------------------- | | `did` | `string` | `undefined` | The Decentralized Identifier of the NFT asset. | | `numberEditions` | `bigint` | `undefined` | The amount of NFTs to buy. | -| `consumer` | [`Account`](Account.md) | `undefined` | The account of the NFT buyer. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The account of the NFT buyer. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to order | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID. @@ -1081,29 +1226,29 @@ agreementId = await nevermined.nfts1155.order(ddo.id, numberNFTs, collector) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L252) +[src/nevermined/api/nfts/NFT1155Api.ts:250](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L250) --- ### orderAsset -▸ **orderAsset**(`did`, `serviceReference`, `consumer`, `params?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **orderAsset**(`did`, `serviceReference`, `from`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> Start the purchase/order of an asset's service. Starts by signing the service agreement then sends the request to the publisher via the service endpoint (Node http service). #### Parameters -| Name | Type | Description | -| :----------------- | :------------------------------------------------------------ | :---------------- | -| `did` | `string` | Decentralized ID. | -| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | -| `consumer` | [`Account`](Account.md) | Consumer account. | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :----------------- | :------------------------------------------------------------ | :--------------------- | +| `did` | `string` | Decentralized ID. | +| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | +| `from` | [`NvmAccount`](NvmAccount.md) | Consumer account. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID. @@ -1113,37 +1258,37 @@ The agreement ID. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:563](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L563) +[src/nevermined/api/RegistryBaseApi.ts:585](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L585) --- ### owner -▸ **owner**(): `Promise`<`string`\> +▸ **owner**(): `Promise`\<`string`\> Gets the contract owner #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> Address of the contract owner **`Example`** ```ts -const nftContractOwner = new Account(await nevermined.nfts1155.owner()) +const nftContractOwner = new NvmAccount(await nevermined.nfts1155.owner()) ``` #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:485](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L485) +[src/nevermined/api/nfts/NFT1155Api.ts:483](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L483) --- ### registerNeverminedAsset -▸ `Protected` **registerNeverminedAsset**(`assetAttributes`, `publisher`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **registerNeverminedAsset**(`assetAttributes`, `from`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> It registers a new asset in a Nevermined network. This method is protected and not exposed via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, and `nfts` APIs. @@ -1153,14 +1298,14 @@ via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | | `assetAttributes` | [`AssetAttributes`](AssetAttributes.md) | Attributes describing the asset | -| `publisher` | [`Account`](Account.md) | The account publishing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-721) associated to the asset | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The metadata of the asset created (DDO) @@ -1174,13 +1319,13 @@ The metadata of the asset created (DDO) #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L42) +[src/nevermined/api/RegistryBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L52) --- ### releaseRewards -▸ **releaseRewards**(`agreementId`, `did`, `serviceReference?`, `nftAmount`, `publisher`, `txParams?`): `Promise`<`boolean`\> +▸ **releaseRewards**(`agreementId`, `did`, `serviceReference?`, `nftAmount`, `from`, `txParams?`): `Promise`\<`boolean`\> Release the funds from escrow. @@ -1192,12 +1337,12 @@ Release the funds from escrow. | `did` | `string` | `undefined` | The Decentralized identifier of the NFT asset. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to release rewards | | `nftAmount` | `bigint` | `undefined` | The amount of NFTs to transfer. | -| `publisher` | [`Account`](Account.md) | `undefined` | The current owner of the NFTs. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The current owner of the NFTs. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the funds release was successful. @@ -1218,13 +1363,13 @@ Thrown if there is an error releasing the rewards #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:424](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L424) +[src/nevermined/api/nfts/NFT1155Api.ts:423](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L423) --- ### releaseSecondaryMarketRewards -▸ **releaseSecondaryMarketRewards**(`owner`, `consumer`, `agreementIdSeed`, `serviceReference?`, `txParams?`): `Promise`<`boolean`\> +▸ **releaseSecondaryMarketRewards**(`owner`, `consumer`, `agreementIdSeed`, `serviceReference?`, `txParams?`): `Promise`\<`boolean`\> Used to release the secondary market NFT & the locked rewards. @@ -1232,15 +1377,15 @@ Used to release the secondary market NFT & the locked rewards. | Name | Type | Default value | Description | | :----------------- | :------------------------------------------------------------ | :------------ | :----------------------------------------------------------------------- | -| `owner` | [`Account`](Account.md) | `undefined` | The owner account. | -| `consumer` | [`Account`](Account.md) | `undefined` | The consumer account. | +| `owner` | [`NvmAccount`](NvmAccount.md) | `undefined` | The owner account. | +| `consumer` | [`NvmAccount`](NvmAccount.md) | `undefined` | The consumer account. | | `agreementIdSeed` | `string` | `undefined` | the Id of the underlying service agreement seed. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to release rewards | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transaction was successful. @@ -1257,15 +1402,16 @@ Thrown if there is an error releasing the rewards. #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:562](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L562) +[src/nevermined/api/nfts/NFT1155Api.ts:560](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L560) --- ### resolveAsset -▸ `Protected` **resolveAsset**(`did`, `policy?`): `Promise`<[`DDO`](DDO.md)\> +▸ **resolveAsset**(`did`, `policy?`): `Promise`\<[`DDO`](DDO.md)\> -Returns a DDO by DID. Depending of the resolution policy it prioritize the Metadata API or Immutable urls. +Given an asset DID it returns the metadata of that asset represented by a DDO object. +Depending of the resolution policy it prioritize fetching that Metadata from the Marketplace API or Immutable urls (like IPFS). #### Parameters @@ -1276,7 +1422,7 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> [DDO](DDO.md) @@ -1286,13 +1432,13 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:310](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L310) +[src/nevermined/api/RegistryBaseApi.ts:324](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L324) --- ### revokeOperatorRole -▸ **revokeOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **revokeOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Revokes an address (`operatorAddress`) of the NFT Contract as operator. Granting and revoking minting permissions only can be done by the NFT Contract owner @@ -1302,14 +1448,14 @@ Granting and revoking minting permissions only can be done by the NFT Contract o | Name | Type | Description | | :---------------- | :---------------------------------------------- | :----------------------------------------------------------------------- | | `operatorAddress` | `string` | The address of the account to be revoked as operator in the NFT Contract | -| `from?` | [`Account`](Account.md) | The account revoking operator permissions | +| `from` | [`NvmAccount`](NvmAccount.md) | The account revoking operator permissions | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -1319,13 +1465,13 @@ await nevermined.nfts1155.revokeOperatorRole(someoneElse, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:651](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L651) +[src/nevermined/api/nfts/NFT1155Api.ts:648](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L648) --- ### setApprovalForAll -▸ **setApprovalForAll**(`operatorAddress`, `approved`, `from`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **setApprovalForAll**(`operatorAddress`, `approved`, `from`, `txParams?`): `Promise`\<`any`\> Enable or disable NFT permissions for an operator. @@ -1335,14 +1481,14 @@ Enable or disable NFT permissions for an operator. | :---------------- | :---------------------------------------------- | :------------------------------------------------------------------- | | `operatorAddress` | `string` | The address that of the operator we want to give transfer rights to. | | `approved` | `boolean` | Give or remove transfer rights from the operator. | -| `from` | [`Account`](Account.md) | The account that wants to give transfer rights to the operator. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account that wants to give transfer rights to the operator. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceiptnReceiptnReceipt +The TransactionReceipt **`See`** @@ -1356,13 +1502,13 @@ await nevermined.nfts1155.setApprovalForAll(someoneElse, true, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:510](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L510) +[src/nevermined/api/nfts/NFT1155Api.ts:508](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L508) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1380,13 +1526,13 @@ await nevermined.nfts1155.setApprovalForAll(someoneElse, true, artist) #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### transfer -▸ **transfer**(`agreementId`, `did`, `nftAmount`, `publisher`, `serviceReference?`, `txParams?`): `Promise`<`boolean`\> +▸ **transfer**(`agreementId`, `did`, `nftAmount`, `from`, `serviceReference?`, `txParams?`): `Promise`\<`boolean`\> Transfer NFTs to the consumer. @@ -1397,13 +1543,13 @@ Transfer NFTs to the consumer. | `agreementId` | `string` | `undefined` | The NFT sales agreement id. | | `did` | `string` | `undefined` | The Decentralized identifier of the NFT asset. | | `nftAmount` | `bigint` | `undefined` | The number of NFTs to transfer. | -| `publisher` | [`Account`](Account.md) | `undefined` | The current owner of the NFTs. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The current owner of the NFTs. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to transfer | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -1425,13 +1571,13 @@ Thrown if there is an error transferring the NFT #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:368](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L368) +[src/nevermined/api/nfts/NFT1155Api.ts:367](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L367) --- ### updateAsset -▸ `Protected` **updateAsset**(`did`, `metadata`, `publisher`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **updateAsset**(`did`, `metadata`, `from`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. @@ -1441,13 +1587,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th | :----------------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | `undefined` | Metadata describing the asset | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadataOptions` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -1457,13 +1603,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:353](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L353) +[src/nevermined/api/RegistryBaseApi.ts:367](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L367) --- ### getInstance -▸ `Static` **getInstance**(`config`, `nftContractInstance?`, `nftContractAddress?`): `Promise`<[`NFT1155Api`](NFT1155Api.md)\> +▸ **getInstance**(`config`, `nftContractInstance?`, `nftContractAddress?`): `Promise`\<[`NFT1155Api`](NFT1155Api.md)\> Create a new Nevermined NFTs (ERC-1155) instance allowing to interact with that kind of NFTs. @@ -1471,13 +1617,13 @@ Create a new Nevermined NFTs (ERC-1155) instance allowing to interact with that | Name | Type | Description | | :--------------------- | :---------------------------------------------------------- | :---------------------------------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | The Nevermined config | | `nftContractInstance?` | [`Nft1155Contract`](Nft1155Contract.md) | If there is already deployed an instance of `Nft1155Contract` | | `nftContractAddress?` | `string` | If the `Nft1155Contract` is deployed in an address it will connect to that contract | #### Returns -`Promise`<[`NFT1155Api`](NFT1155Api.md)\> +`Promise`\<[`NFT1155Api`](NFT1155Api.md)\> The NFTs 1155 API instance [NFT1155Api](NFT1155Api.md). @@ -1493,13 +1639,13 @@ nfts1155 = await Nft1155Api.getInstance(instanceConfig, nft1155Contract) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L40) +[src/nevermined/api/nfts/NFT1155Api.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L44) --- ### getNFTContractAddress -▸ `Static` **getNFTContractAddress**(`ddo`, `serviceReference?`): `any` +▸ **getNFTContractAddress**(`ddo`, `serviceReference?`): `any` Gets the NFT contract address associated with a Nevermined asset from the DDO. @@ -1528,13 +1674,13 @@ const nftContractAddress = NFT1155Api.getNFTContractAddress(ddo) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:219](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L219) +[src/nevermined/api/nfts/NFTsBaseApi.ts:221](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L221) --- ### getServicePlugin -▸ `Static` `Protected` **getServicePlugin**(`config`): `Object` +▸ **getServicePlugin**(`config`): `Object` Initializes the default Nevermined service plugins and return that instance @@ -1550,13 +1696,12 @@ Initializes the default Nevermined service plugins and return that instance The Nevermined Service Plugin instance -| Name | Type | -| :------------ | :------------------------------------------------------------------------------------------------------------ | -| `aave-credit` | [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceAaveCredit`](../interfaces/ServiceAaveCredit.md)\> | -| `access` | [`AccessService`](AccessService.md) | -| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | -| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | -| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | +| Name | Type | +| :----------- | :-------------------------------------------------------------------- | +| `access` | [`AccessService`](AccessService.md) | +| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | +| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | +| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | #### Inherited from @@ -1564,13 +1709,13 @@ The Nevermined Service Plugin instance #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:618](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L618) +[src/nevermined/api/RegistryBaseApi.ts:640](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L640) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1595,4 +1740,4 @@ The Nevermined Service Plugin instance #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFT721AccessTemplate.md b/docs/api-reference/classes/NFT721AccessTemplate.md index ad642e226..650f27948 100644 --- a/docs/api-reference/classes/NFT721AccessTemplate.md +++ b/docs/api-reference/classes/NFT721AccessTemplate.md @@ -4,7 +4,7 @@ ## Hierarchy -- [`BaseTemplate`](BaseTemplate.md)<`NFT721AccessTemplateParams`, [`ServiceNFTAccess`](../interfaces/ServiceNFTAccess.md)\> +- [`BaseTemplate`](BaseTemplate.md)\<`NFT721AccessTemplateParams`, [`ServiceNFTAccess`](../interfaces/ServiceNFTAccess.md)\> ↳ **`NFT721AccessTemplate`** @@ -26,12 +26,14 @@ - [artifactsFolder](NFT721AccessTemplate.md#artifactsfolder) - [circuitsFolder](NFT721AccessTemplate.md#circuitsfolder) +- [client](NFT721AccessTemplate.md#client) - [config](NFT721AccessTemplate.md#config) - [instanceConfig](NFT721AccessTemplate.md#instanceconfig) - [instantiableConfig](NFT721AccessTemplate.md#instantiableconfig) - [logger](NFT721AccessTemplate.md#logger) - [nevermined](NFT721AccessTemplate.md#nevermined) -- [web3](NFT721AccessTemplate.md#web3) +- [publicClient](NFT721AccessTemplate.md#publicclient) +- [walletClient](NFT721AccessTemplate.md#walletclient) ### Methods @@ -54,12 +56,11 @@ - [getConditionTypes](NFT721AccessTemplate.md#getconditiontypes) - [getConditions](NFT721AccessTemplate.md#getconditions) - [getFromAddress](NFT721AccessTemplate.md#getfromaddress) -- [getInputsOfMethod](NFT721AccessTemplate.md#getinputsofmethod) - [getServiceAgreementTemplate](NFT721AccessTemplate.md#getserviceagreementtemplate) - [getServiceAgreementTemplateConditionByRef](NFT721AccessTemplate.md#getserviceagreementtemplateconditionbyref) - [getServiceAgreementTemplateConditions](NFT721AccessTemplate.md#getserviceagreementtemplateconditions) - [getServiceAgreementTemplateDependencies](NFT721AccessTemplate.md#getserviceagreementtemplatedependencies) -- [getSignatureOfMethod](NFT721AccessTemplate.md#getsignatureofmethod) +- [getTransactionLogs](NFT721AccessTemplate.md#gettransactionlogs) - [init](NFT721AccessTemplate.md#init) - [instanceFromDDO](NFT721AccessTemplate.md#instancefromddo) - [lockConditionIndex](NFT721AccessTemplate.md#lockconditionindex) @@ -75,6 +76,7 @@ - [service](NFT721AccessTemplate.md#service) - [serviceEndpoint](NFT721AccessTemplate.md#serviceendpoint) - [setInstanceConfig](NFT721AccessTemplate.md#setinstanceconfig) +- [someLog](NFT721AccessTemplate.md#somelog) - [standardContext](NFT721AccessTemplate.md#standardcontext) - [track](NFT721AccessTemplate.md#track) - [validateAgreement](NFT721AccessTemplate.md#validateagreement) @@ -85,7 +87,7 @@ ### constructor -• `Protected` **new NFT721AccessTemplate**(`contractName`) +• **new NFT721AccessTemplate**(`contractName`): [`NFT721AccessTemplate`](NFT721AccessTemplate.md) #### Parameters @@ -93,19 +95,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`NFT721AccessTemplate`](NFT721AccessTemplate.md) + #### Inherited from [BaseTemplate](BaseTemplate.md).[constructor](BaseTemplate.md#constructor) #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L68) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L51) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -113,13 +119,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -127,7 +133,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -141,13 +147,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -155,7 +161,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -169,17 +175,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -187,17 +193,17 @@ BaseTemplate.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -205,13 +211,31 @@ BaseTemplate.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +BaseTemplate.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -223,13 +247,13 @@ BaseTemplate.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -241,17 +265,17 @@ BaseTemplate.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -259,13 +283,13 @@ BaseTemplate.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -277,13 +301,13 @@ BaseTemplate.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -295,31 +319,146 @@ BaseTemplate.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -BaseTemplate.web3 +BaseTemplate.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +BaseTemplate.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### accept -▸ **accept**(`params`): `Promise`<`boolean`\> +▸ **accept**(`params`): `Promise`\<`boolean`\> #### Parameters @@ -329,7 +468,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Overrides @@ -337,13 +476,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/NFT721AccessTemplate.ts:82](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L82) +[src/keeper/contracts/templates/NFT721AccessTemplate.ts:106](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L106) --- ### agreementId -▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`<`string`\> +▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`\<`string`\> #### Parameters @@ -354,7 +493,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -362,13 +501,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L213) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:202](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L202) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -378,15 +517,15 @@ BaseTemplate.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -394,7 +533,7 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- @@ -412,13 +551,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/NFT721AccessTemplate.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L49) +[src/keeper/contracts/templates/NFT721AccessTemplate.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L54) --- ### createAgreement -▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -430,12 +569,12 @@ BaseTemplate.web3 | `timeLocks` | `number`[] | | `timeOuts` | `number`[] | | `extraArgs` | `any`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -443,13 +582,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L90) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L73) --- ### createAgreementAndPay -▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -466,12 +605,12 @@ BaseTemplate.web3 | `tokenAddress` | `string` | | `amounts` | `bigint`[] | | `receivers` | `string`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -479,13 +618,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L115) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L98) --- ### createAgreementFromDDO -▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `from`, `timeOuts?`, `txParams?`): `Promise`<`string`\> +▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `timeOuts?`, `txParams?`): `Promise`\<`string`\> Create a new agreement using the data of a DDO. @@ -496,14 +635,13 @@ Create a new agreement using the data of a DDO. | `agreementIdSeed` | `string` | - | | `ddo` | [`DDO`](DDO.md) | DDO. | | `parameters` | `NFT721AccessTemplateParams` | | -| `consumer` | [`Account`](Account.md) | - | -| `from` | [`Account`](Account.md) | - | +| `consumer` | [`NvmAccount`](NvmAccount.md) | - | | `timeOuts?` | `number`[] | - | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> true if the call was successful. @@ -513,13 +651,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:222](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L222) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:211](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L211) --- ### createAgreementWithPaymentFromDDO -▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`<`string`\> +▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`\<`string`\> #### Parameters @@ -529,14 +667,14 @@ true if the call was successful. | `ddo` | [`DDO`](DDO.md) | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | | `parameters` | `NFT721AccessTemplateParams` | -| `consumer` | [`Account`](Account.md) | -| `from` | [`Account`](Account.md) | +| `consumer` | [`NvmAccount`](NvmAccount.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | | `observer?` | (`orderProgressStep`: [`OrderProgressStep`](../enums/OrderProgressStep.md)) => `void` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -544,7 +682,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L252) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:240](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L240) --- @@ -556,7 +694,7 @@ true if the call was successful. | Name | Type | | :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](Account.md) | +| `publisher` | [`NvmAccount`](NvmAccount.md) | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | | `serviceAttributes` | [`ServiceAttributes`](../interfaces/ServiceAttributes.md) | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | @@ -572,7 +710,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L35) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L48) --- @@ -590,13 +728,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/NFT721AccessTemplate.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L34) +[src/keeper/contracts/templates/NFT721AccessTemplate.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L39) --- ### extraGen -▸ **extraGen**(`_params`): `Promise`<`any`\> +▸ **extraGen**(`_params`): `Promise`\<`any`\> #### Parameters @@ -606,7 +744,7 @@ true if the call was successful. #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Inherited from @@ -614,13 +752,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:94](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L94) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) --- ### getAgreementCreatedEvent -▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`<`any`[]\> +▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`\<`any`[]\> Generates and returns the agreement creation event. @@ -632,7 +770,7 @@ Generates and returns the agreement creation event. #### Returns -`Promise`<`any`[]\> +`Promise`\<`any`[]\> Agreement created event. @@ -642,13 +780,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:459](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L459) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:450](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L450) --- ### getAgreementData -▸ **getAgreementData**(`agreementId`): `Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +▸ **getAgreementData**(`agreementId`): `Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Parameters @@ -658,7 +796,7 @@ Agreement created event. #### Returns -`Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +`Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Inherited from @@ -666,13 +804,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L21) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L29) --- ### getAgreementIdsFromDDO -▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`<`string`[]\> +▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`\<`string`[]\> Get agreement conditions IDs. @@ -687,7 +825,7 @@ Get agreement conditions IDs. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> The condition IDs. @@ -697,13 +835,13 @@ The condition IDs. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:180](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L180) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:169](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L169) --- ### getAgreementStatus -▸ **getAgreementStatus**(`agreementId`): `Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +▸ **getAgreementStatus**(`agreementId`): `Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> Returns the status of the conditions. @@ -715,7 +853,7 @@ Returns the status of the conditions. #### Returns -`Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +`Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> The conditions status. @@ -725,13 +863,13 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:346](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L346) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:331](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L331) --- ### getAgreementsForDID -▸ **getAgreementsForDID**(`did`): `Promise`<`string`[]\> +▸ **getAgreementsForDID**(`did`): `Promise`\<`string`[]\> #### Parameters @@ -741,7 +879,7 @@ The conditions status. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> #### Inherited from @@ -749,19 +887,19 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:485](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L485) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:476](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L476) --- ### getConditionTypes -▸ **getConditionTypes**(): `Promise`<`string`[]\> +▸ **getConditionTypes**(): `Promise`\<`string`[]\> Conditions address list. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> A list of condition addresses. @@ -771,19 +909,19 @@ A list of condition addresses. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L154) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:137](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L137) --- ### getConditions -▸ **getConditions**(): `Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +▸ **getConditions**(): `Promise`\<`ConditionSmall`[]\> List of condition contracts. #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +`Promise`\<`ConditionSmall`[]\> A list of condition contracts. @@ -793,13 +931,13 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:165](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L165) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L148) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -809,7 +947,7 @@ A list of condition contracts. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -817,31 +955,7 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getInputsOfMethod](BaseTemplate.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- @@ -859,13 +973,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFT721AccessTemplate.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L78) +[src/keeper/contracts/templates/NFT721AccessTemplate.ts:83](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L83) --- ### getServiceAgreementTemplateConditionByRef -▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`<[`ConditionSmall`](ConditionSmall.md)\> +▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`\<`undefined` \| `ConditionSmall`\> #### Parameters @@ -875,7 +989,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)\> +`Promise`\<`undefined` \| `ConditionSmall`\> #### Inherited from @@ -883,7 +997,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:329](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L329) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:314](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L314) --- @@ -901,17 +1015,17 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:324](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L324) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:309](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L309) --- ### getServiceAgreementTemplateDependencies -▸ **getServiceAgreementTemplateDependencies**(): `Promise`<{ `[condition: string]`: `string`[]; }\> +▸ **getServiceAgreementTemplateDependencies**(): `Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Returns -`Promise`<{ `[condition: string]`: `string`[]; }\> +`Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Inherited from @@ -919,49 +1033,50 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:336](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L336) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:321](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L321) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[BaseTemplate](BaseTemplate.md).[getSignatureOfMethod](BaseTemplate.md#getsignatureofmethod) +[BaseTemplate](BaseTemplate.md).[getTransactionLogs](BaseTemplate.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -969,13 +1084,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`): `Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`NFT721AccessTemplateParams`\>\> +▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`): `Promise`\<`AgreementInstance`\<`NFT721AccessTemplateParams`\>\> #### Parameters @@ -988,7 +1103,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`NFT721AccessTemplateParams`\>\> +`Promise`\<`AgreementInstance`\<`NFT721AccessTemplateParams`\>\> #### Overrides @@ -996,7 +1111,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFT721AccessTemplate.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L54) +[src/keeper/contracts/templates/NFT721AccessTemplate.ts:59](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L59) --- @@ -1014,13 +1129,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L74) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L57) --- ### lockTokens -▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams`): `Promise`<`void`\> +▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams?`): `Promise`\<`void`\> #### Parameters @@ -1028,12 +1143,12 @@ readonly `ParamType`[] | :------------- | :---------------------------------------------- | | `tokenAddress` | `any` | | `amounts` | `any` | -| `from` | [`Account`](Account.md) | -| `txParams` | [`TxParameters`](../interfaces/TxParameters.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1041,7 +1156,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:393](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L393) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:382](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L382) --- @@ -1059,7 +1174,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFT721AccessTemplate.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L31) +[src/keeper/contracts/templates/NFT721AccessTemplate.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L36) --- @@ -1083,13 +1198,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFT721AccessTemplate.ts:45](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L45) +[src/keeper/contracts/templates/NFT721AccessTemplate.ts:50](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L50) --- ### paramsGen -▸ **paramsGen**(`«destructured»`): `Promise`<`NFT721AccessTemplateParams`\> +▸ **paramsGen**(`«destructured»`): `Promise`\<`NFT721AccessTemplateParams`\> Specialize params @@ -1101,7 +1216,7 @@ Specialize params #### Returns -`Promise`<`NFT721AccessTemplateParams`\> +`Promise`\<`NFT721AccessTemplateParams`\> #### Overrides @@ -1109,13 +1224,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/NFT721AccessTemplate.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L23) +[src/keeper/contracts/templates/NFT721AccessTemplate.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L28) --- ### paymentData -▸ **paymentData**(`service`): `Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +▸ **paymentData**(`service`): `Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Parameters @@ -1125,7 +1240,7 @@ Specialize params #### Returns -`Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +`Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Inherited from @@ -1133,13 +1248,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L78) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L61) --- ### printAgreementStatus -▸ **printAgreementStatus**(`agreementId`): `Promise`<`void`\> +▸ **printAgreementStatus**(`agreementId`): `Promise`\<`void`\> Prints the agreement status. @@ -1151,7 +1266,7 @@ Prints the agreement status. #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1159,25 +1274,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:429](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L429) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:418](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L418) --- ### process -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> +▸ **process**(`params`, `from`, `txparams?`): `Promise`\<`void`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1185,26 +1300,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:126](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L126) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1212,26 +1327,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1239,7 +1354,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- @@ -1257,7 +1372,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFT721AccessTemplate.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L38) +[src/keeper/contracts/templates/NFT721AccessTemplate.ts:43](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L43) --- @@ -1275,13 +1390,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFT721AccessTemplate.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L41) +[src/keeper/contracts/templates/NFT721AccessTemplate.ts:46](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L46) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1299,13 +1414,37 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[BaseTemplate](BaseTemplate.md).[someLog](BaseTemplate.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### standardContext -▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): [`ConditionContext`](../interfaces/ConditionContext.md) +▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): `ConditionContext` #### Parameters @@ -1317,7 +1456,7 @@ Prints the agreement status. #### Returns -[`ConditionContext`](../interfaces/ConditionContext.md) +`ConditionContext` #### Inherited from @@ -1325,25 +1464,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L200) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:189](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L189) --- ### track -▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`<`boolean`\> +▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`\<`boolean`\> #### Parameters | Name | Type | | :----------- | :------------------------------------------------------ | | `_params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `_from` | [`Account`](Account.md) | +| `_from` | [`NvmAccount`](NvmAccount.md) | | `_txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Inherited from @@ -1351,13 +1490,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:102](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L102) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L118) --- ### validateAgreement -▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`<`void`\> +▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`\<`void`\> #### Parameters @@ -1366,13 +1505,13 @@ Prints the agreement status. | `agreement_id` | `string` | | `did` | `string` | | `params` | `NFT721AccessTemplateParams` | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `extra` | `any` | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1380,13 +1519,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:125](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L125) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:141](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L141) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`NFT721AccessTemplate`](NFT721AccessTemplate.md)\> +▸ **getInstance**(`config`): `Promise`\<[`NFT721AccessTemplate`](NFT721AccessTemplate.md)\> #### Parameters @@ -1396,7 +1535,7 @@ Prints the agreement status. #### Returns -`Promise`<[`NFT721AccessTemplate`](NFT721AccessTemplate.md)\> +`Promise`\<[`NFT721AccessTemplate`](NFT721AccessTemplate.md)\> #### Overrides @@ -1404,13 +1543,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFT721AccessTemplate.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L28) +[src/keeper/contracts/templates/NFT721AccessTemplate.ts:33](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721AccessTemplate.ts#L33) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1435,4 +1574,4 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFT721Api.md b/docs/api-reference/classes/NFT721Api.md index ffc3cfc32..aa912c9d9 100644 --- a/docs/api-reference/classes/NFT721Api.md +++ b/docs/api-reference/classes/NFT721Api.md @@ -28,13 +28,15 @@ Allows the interaction with external ERC-721 NFT contracts built on top of the N - [address](NFT721Api.md#address) - [artifactsFolder](NFT721Api.md#artifactsfolder) - [circuitsFolder](NFT721Api.md#circuitsfolder) +- [client](NFT721Api.md#client) - [config](NFT721Api.md#config) - [getContract](NFT721Api.md#getcontract) - [instanceConfig](NFT721Api.md#instanceconfig) - [instantiableConfig](NFT721Api.md#instantiableconfig) - [logger](NFT721Api.md#logger) - [nevermined](NFT721Api.md#nevermined) -- [web3](NFT721Api.md#web3) +- [publicClient](NFT721Api.md#publicclient) +- [walletClient](NFT721Api.md#walletclient) ### Methods @@ -81,7 +83,11 @@ Allows the interaction with external ERC-721 NFT contracts built on top of the N ### constructor -• **new NFT721Api**() +• **new NFT721Api**(): [`NFT721Api`](NFT721Api.md) + +#### Returns + +[`NFT721Api`](NFT721Api.md) #### Inherited from @@ -95,7 +101,7 @@ Allows the interaction with external ERC-721 NFT contracts built on top of the N #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L22) +[src/nevermined/api/nfts/NFT721Api.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L27) --- @@ -105,7 +111,7 @@ Allows the interaction with external ERC-721 NFT contracts built on top of the N #### Index signature -▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`Service`](../code-reference.md#service)\> +▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`Service`](../code-reference.md#service)\> #### Inherited from @@ -113,7 +119,7 @@ Allows the interaction with external ERC-721 NFT contracts built on top of the N #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L29) +[src/nevermined/api/RegistryBaseApi.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L39) ## Accessors @@ -131,17 +137,17 @@ The NFT contract address #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L55) +[src/nevermined/api/nfts/NFT721Api.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L60) --- ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -149,17 +155,17 @@ NFTsBaseApi.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -167,13 +173,31 @@ NFTsBaseApi.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +NFTsBaseApi.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -185,7 +209,7 @@ NFTsBaseApi.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- @@ -203,13 +227,13 @@ The `Nft721Contract` instance #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L63) +[src/nevermined/api/nfts/NFT721Api.ts:68](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L68) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -221,17 +245,17 @@ NFTsBaseApi.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -239,13 +263,13 @@ NFTsBaseApi.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -257,13 +281,13 @@ NFTsBaseApi.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -275,31 +299,146 @@ NFTsBaseApi.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +NFTsBaseApi.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -NFTsBaseApi.web3 +NFTsBaseApi.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### \_details -▸ `Protected` **\_details**(`did`, `ercType`): `Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +▸ **\_details**(`did`, `ercType`): `Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> Get the details of an NFT @@ -312,7 +451,7 @@ Get the details of an NFT #### Returns -`Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +`Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> The details of the NFT. @@ -336,13 +475,13 @@ assert.equal(details.owner, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L150) +[src/nevermined/api/nfts/NFTsBaseApi.ts:152](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L152) --- ### access -▸ **access**(`did`, `consumer`, `destination?`, `fileIndex?`, `agreementId?`, `buyer?`, `babysig?`, `serviceReference?`): `Promise`<`boolean`\> +▸ **access**(`did`, `from`, `destination?`, `fileIndex?`, `agreementId?`, `buyer?`, `babysig?`, `serviceReference?`): `Promise`\<`boolean`\> Access the files associated with an NFT. @@ -351,7 +490,7 @@ Access the files associated with an NFT. | Name | Type | Default value | Description | | :----------------- | :------------------------------------------------------------ | :------------- | :------------------------------------------------------------------------ | | `did` | `string` | `undefined` | The Decentralized Identifier of the NFT asset. | -| `consumer` | [`Account`](Account.md) | `undefined` | The NFT holder account. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The user account holding NFTs (after purchase) requesting the access | | `destination?` | `string` | `undefined` | The download destination for the files. | | `fileIndex?` | `number` | `undefined` | The index of the file. If unset will download all the files in the asset. | | `agreementId` | `string` | `'0x'` | The NFT sales agreement id. | @@ -361,7 +500,7 @@ Access the files associated with an NFT. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the access was successful or file if isToDownload is false. @@ -382,13 +521,13 @@ const result = await nevermined.nfts1155.access(ddo.id, collector, '/tmp/') #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:419](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L419) +[src/nevermined/api/nfts/NFTsBaseApi.ts:427](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L427) --- ### addRating -▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, it adds a vote to the asset curation information. @@ -399,13 +538,13 @@ Given a DID, it adds a vote to the asset curation information. | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `newRating` | `number` | `undefined` | New average rating of the asset | | `numVotesAdded` | `number` | `1` | Number of new votes added to the rating, typically just 1 | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -415,25 +554,25 @@ Given a DID, it adds a vote to the asset curation information. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:514](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L514) +[src/nevermined/api/RegistryBaseApi.ts:534](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L534) --- ### balanceOf -▸ **balanceOf**(`account`): `Promise`<`bigint`\> +▸ **balanceOf**(`account`): `Promise`\<`bigint`\> Get the NFT balance for a particular account/address #### Parameters -| Name | Type | Description | -| :-------- | :---------------------------------- | :------------------------------------------- | -| `account` | `string` \| [`Account`](Account.md) | The account/address to check the balance of. | +| Name | Type | Description | +| :-------- | :---------------------------------------- | :------------------------------------------- | +| `account` | `string` \| [`NvmAccount`](NvmAccount.md) | The account/address to check the balance of. | #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> The balance of NFTs owned by the account. @@ -445,13 +584,13 @@ const balance = await nevermined.nfts721.balance(artist) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:506](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L506) +[src/nevermined/api/nfts/NFT721Api.ts:506](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L506) --- ### burn -▸ **burn**(`tokenId`, `account`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **burn**(`tokenId`, `from`, `txParams?`): `Promise`\<`any`\> Burn NFTs associated with an asset. @@ -460,14 +599,14 @@ Burn NFTs associated with an asset. | Name | Type | Description | | :---------- | :---------------------------------------------- | :--------------------------------------- | | `tokenId` | `string` | The identifier of the token to burn | -| `account` | [`Account`](Account.md) | The account of the publisher of the NFT. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the publisher of the NFT. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Remarks`** @@ -481,29 +620,29 @@ await nevermined.nfts721.burn(tokenId, artist) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:347](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L347) +[src/nevermined/api/nfts/NFT721Api.ts:348](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L348) --- ### buySecondaryMarketNft -▸ **buySecondaryMarketNft**(`consumer`, `nftAmount?`, `agreementIdSeed`, `conditionsTimeout?`, `txParams?`): `Promise`<`boolean`\> +▸ **buySecondaryMarketNft**(`from`, `nftAmount?`, `agreementIdSeed`, `conditionsTimeout?`, `txParams?`): `Promise`\<`boolean`\> Buys a number of listed NFTs on secondary markets. #### Parameters -| Name | Type | Description | -| :------------------ | :---------------------------------------------- | :----------------------------------------- | -| `consumer` | [`Account`](Account.md) | The account of the buyer/consumer. | -| `nftAmount` | `bigint` | The number of assets to buy. 1 by default. | -| `agreementIdSeed` | `string` | - | -| `conditionsTimeout` | `number`[] | - | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :------------------ | :---------------------------------------------- | :--------------------------------------------------------- | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the buyer/consumer. | +| `nftAmount` | `bigint` | The number of assets to buy. 1 by default. | +| `agreementIdSeed` | `string` | The seed of the initial sales agreement created off-chain. | +| `conditionsTimeout` | `number`[] | The timeout for the conditions. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the buy was successful. @@ -524,13 +663,13 @@ Thrown if there is an error buying the NFT. #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:341](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L341) +[src/nevermined/api/nfts/NFTsBaseApi.ts:345](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L345) --- ### claim -▸ **claim**(`agreementId`, `nftHolder`, `nftReceiver`, `did?`, `serviceIndex?`): `Promise`<`boolean`\> +▸ **claim**(`agreementId`, `nftHolder`, `nftReceiver`, `did?`, `serviceIndex?`): `Promise`\<`boolean`\> Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. @@ -546,7 +685,7 @@ Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -567,13 +706,13 @@ const receipt = await nevermined.nfts721.claim(agreementId, editor.getId(), subs #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:193](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L193) +[src/nevermined/api/nfts/NFT721Api.ts:198](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L198) --- ### claimNFT -▸ `Protected` **claimNFT**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `ercType?`, `did?`, `serviceIndex?`): `Promise`<`boolean`\> +▸ **claimNFT**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `ercType?`, `did?`, `serviceIndex?`): `Promise`\<`boolean`\> Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. @@ -591,7 +730,7 @@ Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -626,13 +765,13 @@ const receipt = await nevermined.nfts721.claim( #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L50) +[src/nevermined/api/nfts/NFTsBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L52) --- ### create -▸ **create**(`nftAttributes`, `publisher`, `publicationOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **create**(`nftAttributes`, `from`, `publicationOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> Creates a new Nevermined asset associated to a NFT (ERC-721). @@ -641,13 +780,13 @@ Creates a new Nevermined asset associated to a NFT (ERC-721). | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | | `nftAttributes` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-721) associated to the asset | -| `publisher` | [`Account`](Account.md) | The account publishing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The newly registered [DDO](DDO.md). @@ -678,13 +817,13 @@ ddo = await nevermined.nfts721.create( #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:97](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L97) +[src/nevermined/api/nfts/NFT721Api.ts:102](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L102) --- ### details -▸ **details**(`did`): `Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +▸ **details**(`did`): `Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> Get the details of an NFT @@ -696,7 +835,7 @@ Get the details of an NFT #### Returns -`Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +`Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> The details of the NFT. @@ -716,26 +855,26 @@ assert.equal(details.owner, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:639](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L639) +[src/nevermined/api/nfts/NFT721Api.ts:638](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L638) --- ### getSubscriptionToken -▸ **getSubscriptionToken**(`did`, `account`): `Promise`<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> +▸ **getSubscriptionToken**(`did`, `from`): `Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> Get a JWT token for an asset associated with a webService #### Parameters -| Name | Type | Description | -| :-------- | :---------------------- | :----------------------------------------------------------------------------- | -| `did` | `string` | The did of the asset with a webService resource and an associated subscription | -| `account` | [`Account`](Account.md) | Account of the user requesting the token | +| Name | Type | Description | +| :----- | :---------------------------- | :----------------------------------------------------------------------------- | +| `did` | `string` | The did of the asset with a webService resource and an associated subscription | +| `from` | [`NvmAccount`](NvmAccount.md) | Account of the user requesting the token | #### Returns -`Promise`<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> +`Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> [SubscriptionToken](../interfaces/SubscriptionToken.md) @@ -754,13 +893,13 @@ assert.isDefined(response.neverminedProxyUri) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:478](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L478) +[src/nevermined/api/nfts/NFTsBaseApi.ts:490](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L490) --- ### grantOperatorRole -▸ **grantOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **grantOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Adds a operator (`operatorAddress`) to the NFT Contract. Granting and revoking operator permissions only can be done by the NFT Contract owner @@ -770,14 +909,14 @@ Granting and revoking operator permissions only can be done by the NFT Contract | Name | Type | Description | | :---------------- | :---------------------------------------------- | :--------------------------------------------------------------------- | | `operatorAddress` | `string` | The address of the account to be added as operator in the NFT Contract | -| `from?` | [`Account`](Account.md) | The account giving operator permissions | +| `from` | [`NvmAccount`](NvmAccount.md) | The account giving operator permissions | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -787,13 +926,13 @@ await nevermined.nfts721.grantOperatorRole(someoneElse, artist) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:585](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L585) +[src/nevermined/api/nfts/NFT721Api.ts:584](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L584) --- ### isApprovedForAll -▸ **isApprovedForAll**(`operatorAddress`, `from`): `Promise`<`unknown`\> +▸ **isApprovedForAll**(`operatorAddress`, `from`): `Promise`\<`unknown`\> Returns if the `operatorAddress` is approved @@ -806,7 +945,7 @@ Returns if the `operatorAddress` is approved #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> Boolean saying if the `operatorAddress` is approved @@ -818,13 +957,13 @@ await nevermined.nfts721.isApprovedForAll(someoneElse, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:490](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L490) +[src/nevermined/api/nfts/NFT721Api.ts:490](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L490) --- ### isOperator -▸ **isOperator**(`nftContractAddress`, `operatorAddress`, `ercType?`): `Promise`<`boolean`\> +▸ **isOperator**(`nftContractAddress`, `operatorAddress`, `ercType?`): `Promise`\<`boolean`\> Check if a particular address is the operator of given a NFT address. @@ -838,7 +977,7 @@ Check if a particular address is the operator of given a NFT address. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> operator status of address as a boolean @@ -848,28 +987,28 @@ operator status of address as a boolean #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:116](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L116) +[src/nevermined/api/nfts/NFTsBaseApi.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L118) --- ### isOperatorOfDID -▸ **isOperatorOfDID**(`did`, `address`): `Promise`<`boolean`\> +▸ **isOperatorOfDID**(`did`, `address`): `Promise`\<`boolean`\> -Check if a particular address is the operator of a DID. +It checks if an address is an operator of the NFT associated to the asset #### Parameters -| Name | Type | Description | -| :-------- | :------- | :-------------------------------------- | -| `did` | `string` | The DID of the NFT to check | -| `address` | `string` | The address to check if operator status | +| Name | Type | Description | +| :-------- | :------- | :--------------------------------------------- | +| `did` | `string` | The Decentralized identifier of the NFT asset. | +| `address` | `string` | The address to check if operator status | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> -operator status of address as a boolean +true if the address is an operator of the NFT #### Overrides @@ -877,13 +1016,13 @@ operator status of address as a boolean #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:643](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L643) +[src/nevermined/api/nfts/NFT721Api.ts:648](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L648) --- ### list -▸ **list**(`did`, `list`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **list**(`did`, `list`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset allowing to list or unlist it. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. In a Nevermined environment, when an asset is unlisted, it is not possible to be found and accessed by any user. @@ -894,13 +1033,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be | :---------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `list` | `boolean` | `undefined` | Needs the asset to be listed or unlisted | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -910,13 +1049,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:462](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L462) +[src/nevermined/api/RegistryBaseApi.ts:482](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L482) --- ### listOnSecondaryMarkets -▸ **listOnSecondaryMarkets**(`ddo`, `assetPrice`, `nftAmount`, `nftTransfer`, `provider`, `token`, `owner`): `Promise`<`string`\> +▸ **listOnSecondaryMarkets**(`ddo`, `assetPrice`, `nftAmount`, `nftTransfer`, `provider`, `token`, `from`): `Promise`\<`string`\> After purchase re-list an NFT to enable secondary market sales. @@ -930,11 +1069,11 @@ After purchase re-list an NFT to enable secondary market sales. | `nftTransfer` | `boolean` | - | | `provider` | `string` | The address that will be the provider of the secondary sale. | | `token` | [`Token`](Token.md) | - | -| `owner` | [`Account`](Account.md) | The account of the current owner. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the current owner. | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> the agreementId of the secondary sale. @@ -962,15 +1101,15 @@ Thrown if there is an error listing the NFT. #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:260](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L260) +[src/nevermined/api/nfts/NFTsBaseApi.ts:262](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L262) --- ### mint -▸ **mint**(`did`, `publisher`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **mint**(`did`, `from`, `txParams?`): `Promise`\<`any`\> -Mint NFTs associated with an asset. +It mints NFTs associated with an asset. This function can be called multiple times as long as the minting does not exceed the maximum cap set during creation. @@ -979,14 +1118,14 @@ This function can be called multiple times as long as the minting does not excee | Name | Type | Description | | :---------- | :---------------------------------------------- | :--------------------------------------------- | | `did` | `string` | The Decentralized Identifier of the NFT asset. | -| `publisher` | [`Account`](Account.md) | The account of the minter | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the minter | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -996,13 +1135,13 @@ await nevermined.nfts721.mint(ddo.id, artist) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:319](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L319) +[src/nevermined/api/nfts/NFT721Api.ts:324](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L324) --- ### mintWithURL -▸ **mintWithURL**(`to`, `did`, `url`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **mintWithURL**(`to`, `did`, `url`, `from`, `txParams?`): `Promise`\<`any`\> Mint NFTs associated with an asset allowing to specify some metadata @@ -1015,14 +1154,14 @@ This function can be called multiple times as long as the minting does not excee | `to` | `string` | The address receiving the NFT minted | | `did` | `string` | The Decentralized Identifier of the NFT asset. | | `url` | `string` | The URL with NFT metadata | -| `from?` | [`Account`](Account.md) | The account of the minter | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the minter | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -1032,13 +1171,13 @@ await nevermined.nfts721.mintWithURL(receiverAddress, ddo.id, nftMetadata, artis #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:367](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L367) +[src/nevermined/api/nfts/NFT721Api.ts:368](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L368) --- ### order -▸ **order**(`did`, `consumer`, `serviceReference?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **order**(`did`, `from`, `serviceReference?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> Order a NFT-721. @@ -1047,13 +1186,13 @@ Order a NFT-721. | Name | Type | Default value | Description | | :----------------- | :------------------------------------------------------------ | :------------ | :------------------------------------------------------------- | | `did` | `string` | `undefined` | The Decentralized Identifier of the NFT asset. | -| `consumer` | [`Account`](Account.md) | `undefined` | The account of the NFT buyer. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The account of the NFT buyer. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to order | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID. @@ -1070,29 +1209,29 @@ const agreementId = await nevermined.nfts721.order(ddo.id, collector) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:134](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L134) +[src/nevermined/api/nfts/NFT721Api.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L139) --- ### orderAsset -▸ **orderAsset**(`did`, `serviceReference`, `consumer`, `params?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **orderAsset**(`did`, `serviceReference`, `from`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> Start the purchase/order of an asset's service. Starts by signing the service agreement then sends the request to the publisher via the service endpoint (Node http service). #### Parameters -| Name | Type | Description | -| :----------------- | :------------------------------------------------------------ | :---------------- | -| `did` | `string` | Decentralized ID. | -| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | -| `consumer` | [`Account`](Account.md) | Consumer account. | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :----------------- | :------------------------------------------------------------ | :--------------------- | +| `did` | `string` | Decentralized ID. | +| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | +| `from` | [`NvmAccount`](NvmAccount.md) | Consumer account. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID. @@ -1102,13 +1241,13 @@ The agreement ID. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:563](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L563) +[src/nevermined/api/RegistryBaseApi.ts:585](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L585) --- ### ownerOf -▸ **ownerOf**(`did`): `Promise`<`string`\> +▸ **ownerOf**(`did`): `Promise`\<`string`\> Gets the contract owner @@ -1120,25 +1259,25 @@ Gets the contract owner #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> Address of the contract owner **`Example`** ```ts -const nftContractOwner = new Account(await nevermined.nfts721.ownerOf()) +const nftContractOwner = new NvmAccount(await nevermined.nfts721.ownerOf()) ``` #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:416](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L416) +[src/nevermined/api/nfts/NFT721Api.ts:417](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L417) --- ### ownerOfAsset -▸ **ownerOfAsset**(`did`): `Promise`<`string`\> +▸ **ownerOfAsset**(`did`): `Promise`\<`string`\> Given a DID it gets the owner of the NFT if that DID is used as tokenId @@ -1150,7 +1289,7 @@ Given a DID it gets the owner of the NFT if that DID is used as tokenId #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> The address of the NFT owner. @@ -1162,13 +1301,13 @@ const owner = await nevermined.nfts721.ownerOfAsset(ddo.id, nftTokenAddress) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:450](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L450) +[src/nevermined/api/nfts/NFT721Api.ts:451](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L451) --- ### ownerOfAssetByAgreement -▸ **ownerOfAssetByAgreement**(`did`, `agreementId`): `Promise`<`string`\> +▸ **ownerOfAssetByAgreement**(`did`, `agreementId`): `Promise`\<`string`\> Given a DID and an agreement id it gets the owner of the NFT @@ -1181,7 +1320,7 @@ Given a DID and an agreement id it gets the owner of the NFT #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> The address of the NFT owner. @@ -1193,15 +1332,15 @@ const owner = await nevermined.nfts721.ownerOfAssetByAgreement(ddo.id, agreement #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:468](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L468) +[src/nevermined/api/nfts/NFT721Api.ts:468](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L468) --- ### ownerOfTokenId -▸ **ownerOfTokenId**(`tokenId`): `Promise`<`string`\> +▸ **ownerOfTokenId**(`tokenId`): `Promise`\<`string`\> -Given some information, it gets the owner of the NFT +Given some information, it gets the public address of the asset owner #### Parameters @@ -1211,7 +1350,7 @@ Given some information, it gets the owner of the NFT #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> The address of the NFT owner. @@ -1223,13 +1362,13 @@ const owner = await nevermined.nfts721.ownerOfTokenId(tokenId) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:433](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L433) +[src/nevermined/api/nfts/NFT721Api.ts:434](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L434) --- ### registerNeverminedAsset -▸ `Protected` **registerNeverminedAsset**(`assetAttributes`, `publisher`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **registerNeverminedAsset**(`assetAttributes`, `from`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> It registers a new asset in a Nevermined network. This method is protected and not exposed via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, and `nfts` APIs. @@ -1239,14 +1378,14 @@ via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | | `assetAttributes` | [`AssetAttributes`](AssetAttributes.md) | Attributes describing the asset | -| `publisher` | [`Account`](Account.md) | The account publishing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-721) associated to the asset | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The metadata of the asset created (DDO) @@ -1260,13 +1399,13 @@ The metadata of the asset created (DDO) #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L42) +[src/nevermined/api/RegistryBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L52) --- ### releaseRewards -▸ **releaseRewards**(`agreementId`, `did`, `publisher`, `serviceReference?`, `txParams?`): `Promise`<`boolean`\> +▸ **releaseRewards**(`agreementId`, `did`, `from`, `serviceReference?`, `txParams?`): `Promise`\<`boolean`\> Release the funds from escrow. @@ -1276,13 +1415,13 @@ Release the funds from escrow. | :----------------- | :------------------------------------------------------------ | :------------ | :----------------------------------------------------------------------- | | `agreementId` | `string` | `undefined` | The NFT sales agreement id. | | `did` | `string` | `undefined` | The Decentralized identifier of the NFT asset. | -| `publisher` | [`Account`](Account.md) | `undefined` | The current owner of the NFTs. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The current owner of the NFTs. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to release rewards | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the funds release was successful. @@ -1303,13 +1442,13 @@ Thrown if there is an error releasing the rewards. #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:277](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L277) +[src/nevermined/api/nfts/NFT721Api.ts:283](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L283) --- ### releaseSecondaryMarketRewards -▸ **releaseSecondaryMarketRewards**(`owner`, `account`, `agreementIdSeed`, `txParams?`): `Promise`<`boolean`\> +▸ **releaseSecondaryMarketRewards**(`owner`, `account`, `agreementIdSeed`, `txParams?`): `Promise`\<`boolean`\> Used to release the secondary market NFT & the locked rewards. @@ -1317,14 +1456,14 @@ Used to release the secondary market NFT & the locked rewards. | Name | Type | Description | | :---------------- | :---------------------------------------------- | :---------------------------------------------------------------- | -| `owner` | [`Account`](Account.md) | The owner account. | -| `account` | [`Account`](Account.md) | Account of the user sending the transaction | +| `owner` | [`NvmAccount`](NvmAccount.md) | The owner account. | +| `account` | [`NvmAccount`](NvmAccount.md) | Account of the user sending the transaction | | `agreementIdSeed` | `string` | the seed of the Agreement Id of the underlying service agreement. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transaction was successful. @@ -1341,15 +1480,16 @@ Thrown if there is an error releasing the rewards. #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:529](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L529) +[src/nevermined/api/nfts/NFT721Api.ts:529](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L529) --- ### resolveAsset -▸ `Protected` **resolveAsset**(`did`, `policy?`): `Promise`<[`DDO`](DDO.md)\> +▸ **resolveAsset**(`did`, `policy?`): `Promise`\<[`DDO`](DDO.md)\> -Returns a DDO by DID. Depending of the resolution policy it prioritize the Metadata API or Immutable urls. +Given an asset DID it returns the metadata of that asset represented by a DDO object. +Depending of the resolution policy it prioritize fetching that Metadata from the Marketplace API or Immutable urls (like IPFS). #### Parameters @@ -1360,7 +1500,7 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> [DDO](DDO.md) @@ -1370,13 +1510,13 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:310](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L310) +[src/nevermined/api/RegistryBaseApi.ts:324](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L324) --- ### revokeOperatorRole -▸ **revokeOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **revokeOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Revokes a minter (`operatorAddress`) of the NFT Contract. Granting and revoking minting permissions only can be done by the NFT Contract owner @@ -1386,14 +1526,14 @@ Granting and revoking minting permissions only can be done by the NFT Contract o | Name | Type | Description | | :---------------- | :---------------------------------------------- | :----------------------------------------------------------------------- | | `operatorAddress` | `string` | The address of the account to be revoked as operator in the NFT Contract | -| `from?` | [`Account`](Account.md) | The account revoking operator permissions | +| `from` | [`NvmAccount`](NvmAccount.md) | The account revoking operator permissions | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -1403,13 +1543,13 @@ await nevermined.nfts721.revokeOperatorRole(someoneElse, artist) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:611](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L611) +[src/nevermined/api/nfts/NFT721Api.ts:610](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L610) --- ### setApprovalForAll -▸ **setApprovalForAll**(`target`, `approved`, `from`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **setApprovalForAll**(`target`, `approved`, `from`, `txParams?`): `Promise`\<`any`\> Enable or disable NFT permissions for an operator. @@ -1419,14 +1559,14 @@ Enable or disable NFT permissions for an operator. | :---------- | :---------------------------------------------- | :------------------------------------------------------------------- | | `target` | `string` | The address that of the operator we want to give transfer rights to. | | `approved` | `boolean` | Give or remove transfer rights from the operator. | -| `from` | [`Account`](Account.md) | The account that wants to give transfer rights to the operator. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account that wants to give transfer rights to the operator. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -1436,13 +1576,13 @@ await nevermined.nfts721.setApprovalForAll(someoneElse, true, artist) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:395](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L395) +[src/nevermined/api/nfts/NFT721Api.ts:396](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L396) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1460,15 +1600,16 @@ await nevermined.nfts721.setApprovalForAll(someoneElse, true, artist) #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### transfer -▸ **transfer**(`agreementId`, `did`, `publisher`, `serviceReference?`, `txParams?`): `Promise`<`boolean`\> +▸ **transfer**(`agreementId`, `did`, `from`, `serviceReference?`, `txParams?`): `Promise`\<`boolean`\> -Transfer NFT-721 to the consumer. +It transfers NFT-721 to the consumer. +This method only will work if called by the owner of the asset or a provider. #### Parameters @@ -1476,13 +1617,13 @@ Transfer NFT-721 to the consumer. | :----------------- | :------------------------------------------------------------ | :------------ | :---------------------------------------------------------------- | | `agreementId` | `string` | `undefined` | The NFT sales agreement id. | | `did` | `string` | `undefined` | The Decentralized identifier of the NFT asset. | -| `publisher` | [`Account`](Account.md) | `undefined` | The current owner of the NFTs. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The current owner of the NFTs. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to transfer | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -1504,13 +1645,13 @@ Thrown if there is an error transferring the NFT #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:226](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L226) +[src/nevermined/api/nfts/NFT721Api.ts:232](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L232) --- ### updateAsset -▸ `Protected` **updateAsset**(`did`, `metadata`, `publisher`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **updateAsset**(`did`, `metadata`, `from`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. @@ -1520,13 +1661,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th | :----------------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | `undefined` | Metadata describing the asset | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadataOptions` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -1536,13 +1677,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:353](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L353) +[src/nevermined/api/RegistryBaseApi.ts:367](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L367) --- ### getInstance -▸ `Static` **getInstance**(`config`, `nftContractAddress`): `Promise`<[`NFT721Api`](NFT721Api.md)\> +▸ **getInstance**(`config`, `nftContractAddress`): `Promise`\<[`NFT721Api`](NFT721Api.md)\> Create a new Nevermined NFTs (ERC-721) instance allowing to interact with that kind of NFTs. @@ -1555,7 +1696,7 @@ Create a new Nevermined NFTs (ERC-721) instance allowing to interact with that k #### Returns -`Promise`<[`NFT721Api`](NFT721Api.md)\> +`Promise`\<[`NFT721Api`](NFT721Api.md)\> The NFTs 721 API instance [NFT721Api](NFT721Api.md). @@ -1571,13 +1712,13 @@ nfts721 = await Nft721Api.getInstance(instanceConfig, nftContractAddress) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L39) +[src/nevermined/api/nfts/NFT721Api.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L44) --- ### getNFTContractAddress -▸ `Static` **getNFTContractAddress**(`ddo`, `serviceReference?`): `any` +▸ **getNFTContractAddress**(`ddo`, `serviceReference?`): `any` Gets the NFT contract address associated with a Nevermined asset from the DDO. @@ -1606,13 +1747,13 @@ const nftContractAddress = NFT1155Api.getNFTContractAddress(ddo) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:219](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L219) +[src/nevermined/api/nfts/NFTsBaseApi.ts:221](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L221) --- ### getServicePlugin -▸ `Static` `Protected` **getServicePlugin**(`config`): `Object` +▸ **getServicePlugin**(`config`): `Object` Initializes the default Nevermined service plugins and return that instance @@ -1628,13 +1769,12 @@ Initializes the default Nevermined service plugins and return that instance The Nevermined Service Plugin instance -| Name | Type | -| :------------ | :------------------------------------------------------------------------------------------------------------ | -| `aave-credit` | [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceAaveCredit`](../interfaces/ServiceAaveCredit.md)\> | -| `access` | [`AccessService`](AccessService.md) | -| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | -| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | -| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | +| Name | Type | +| :----------- | :-------------------------------------------------------------------- | +| `access` | [`AccessService`](AccessService.md) | +| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | +| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | +| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | #### Inherited from @@ -1642,13 +1782,13 @@ The Nevermined Service Plugin instance #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:618](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L618) +[src/nevermined/api/RegistryBaseApi.ts:640](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L640) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1673,4 +1813,4 @@ The Nevermined Service Plugin instance #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFT721HolderCondition.md b/docs/api-reference/classes/NFT721HolderCondition.md index cc33fc9df..209fc41c0 100644 --- a/docs/api-reference/classes/NFT721HolderCondition.md +++ b/docs/api-reference/classes/NFT721HolderCondition.md @@ -6,7 +6,7 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi ## Hierarchy -- [`ConsumerCondition`](ConsumerCondition.md)<`NFT721HolderConditionContext`\> +- `ConsumerCondition`\<`NFT721HolderConditionContext`\> ↳ **`NFT721HolderCondition`** @@ -28,12 +28,14 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi - [artifactsFolder](NFT721HolderCondition.md#artifactsfolder) - [circuitsFolder](NFT721HolderCondition.md#circuitsfolder) +- [client](NFT721HolderCondition.md#client) - [config](NFT721HolderCondition.md#config) - [instanceConfig](NFT721HolderCondition.md#instanceconfig) - [instantiableConfig](NFT721HolderCondition.md#instantiableconfig) - [logger](NFT721HolderCondition.md#logger) - [nevermined](NFT721HolderCondition.md#nevermined) -- [web3](NFT721HolderCondition.md#web3) +- [publicClient](NFT721HolderCondition.md#publicclient) +- [walletClient](NFT721HolderCondition.md#walletclient) ### Methods @@ -48,8 +50,7 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi - [generateIdWithSeed](NFT721HolderCondition.md#generateidwithseed) - [getConditionFulfilledEvent](NFT721HolderCondition.md#getconditionfulfilledevent) - [getFromAddress](NFT721HolderCondition.md#getfromaddress) -- [getInputsOfMethod](NFT721HolderCondition.md#getinputsofmethod) -- [getSignatureOfMethod](NFT721HolderCondition.md#getsignatureofmethod) +- [getTransactionLogs](NFT721HolderCondition.md#gettransactionlogs) - [hashValues](NFT721HolderCondition.md#hashvalues) - [hashValuesPlain](NFT721HolderCondition.md#hashvaluesplain) - [init](NFT721HolderCondition.md#init) @@ -61,6 +62,7 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi - [send](NFT721HolderCondition.md#send) - [sendFrom](NFT721HolderCondition.md#sendfrom) - [setInstanceConfig](NFT721HolderCondition.md#setinstanceconfig) +- [someLog](NFT721HolderCondition.md#somelog) - [getInstance](NFT721HolderCondition.md#getinstance) - [setInstanceConfig](NFT721HolderCondition.md#setinstanceconfig-1) @@ -68,7 +70,7 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi ### constructor -• **new NFT721HolderCondition**(`contractName`) +• **new NFT721HolderCondition**(`contractName`): [`NFT721HolderCondition`](NFT721HolderCondition.md) #### Parameters @@ -76,41 +78,45 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`NFT721HolderCondition`](NFT721HolderCondition.md) + #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[constructor](ConsumerCondition.md#constructor) +ConsumerCondition\.constructor #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[address](ConsumerCondition.md#address) +ConsumerCondition.address #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[contract](ConsumerCondition.md#contract) +ConsumerCondition.contract #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -120,25 +126,25 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[contractName](ConsumerCondition.md#contractname) +ConsumerCondition.contractName #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[events](ConsumerCondition.md#events) +ConsumerCondition.events #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -148,21 +154,21 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[version](ConsumerCondition.md#version) +ConsumerCondition.version #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -170,17 +176,17 @@ ConsumerCondition.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -188,13 +194,31 @@ ConsumerCondition.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ConsumerCondition.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -206,13 +230,13 @@ ConsumerCondition.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -224,17 +248,17 @@ ConsumerCondition.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -242,13 +266,13 @@ ConsumerCondition.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -260,13 +284,13 @@ ConsumerCondition.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -278,57 +302,172 @@ ConsumerCondition.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ConsumerCondition.web3 +ConsumerCondition.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ConsumerCondition.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### abortByTimeOut -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **abortByTimeOut**(`conditionId`, `from`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :------------ | :---------------------------------------------- | | `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[abortByTimeOut](ConsumerCondition.md#abortbytimeout) +ConsumerCondition.abortByTimeOut #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) +[src/keeper/contracts/conditions/Condition.abstract.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L75) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -338,29 +477,29 @@ ConsumerCondition.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[call](ConsumerCondition.md#call) +ConsumerCondition.call #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### fulfill -▸ **fulfill**(`agreementId`, `did`, `holderAddress`, `nftTokenAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfill**(`agreementId`, `did`, `holderAddress`, `nftTokenAddress`, `from`, `txParams?`): `Promise`\<`any`\> Fulfill requires a validation that holder as enough NFTs for a specific DID. @@ -372,56 +511,56 @@ Fulfill requires a validation that holder as enough NFTs for a specific DID. | `did` | `string` | The Decentralized Identifier of the asset. | | `holderAddress` | `string` | The contract address where the reward is locked. | | `nftTokenAddress` | `string` | The contract address of the nft to use. | -| `from?` | [`Account`](Account.md) | Account sending the transaction | +| `from` | [`NvmAccount`](NvmAccount.md) | Account sending the transaction | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transacion parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> condition state #### Overrides -[ConsumerCondition](ConsumerCondition.md).[fulfill](ConsumerCondition.md#fulfill) +ConsumerCondition.fulfill #### Defined in -[src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts:52](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts#L52) +[src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts#L57) --- ### fulfillInstance -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillInstance**(`cond`, `additionalParams`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | +| Name | Type | Default value | +| :----------------- | :-------------------------------------------------------- | :------------ | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | `undefined` | +| `additionalParams` | `Record`\<`string`, `unknown`\> | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | +| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[fulfillInstance](ConsumerCondition.md#fulfillinstance) +ConsumerCondition.fulfillInstance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) +[src/keeper/contracts/conditions/Condition.abstract.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L139) --- ### fulfillPlain -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillPlain**(`agreementId`, `args`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters @@ -429,54 +568,54 @@ condition state | :------------ | :-------------------------------------------------------- | :------------ | | `agreementId` | `string` | `undefined` | | `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | | `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[fulfillPlain](ConsumerCondition.md#fulfillplain) +ConsumerCondition.fulfillPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) +[src/keeper/contracts/conditions/Condition.abstract.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L47) --- ### fulfillWithNode -▸ **fulfillWithNode**(`_cond`, `_additionalParams`, `_from?`, `_txParams?`): `Promise`<`void`\> +▸ **fulfillWithNode**(`_cond`, `_additionalParams`, `_from`, `_txParams?`): `Promise`\<`void`\> #### Parameters -| Name | Type | -| :------------------ | :----------------------------------------------------------------------------------------- | -| `_cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `_additionalParams` | `Record`<`string`, `unknown`\> | -| `_from?` | [`Account`](Account.md) | -| `_txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------------ | :----------------------------------------------------- | +| `_cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | +| `_additionalParams` | `Record`\<`string`, `unknown`\> | +| `_from` | [`NvmAccount`](NvmAccount.md) | +| `_txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[fulfillWithNode](ConsumerCondition.md#fulfillwithnode) +ConsumerCondition.fulfillWithNode #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:217](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L217) +[src/keeper/contracts/conditions/Condition.abstract.ts:209](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L209) --- ### generateId -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> +▸ **generateId**(`agreementId`, `valueHash`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -487,21 +626,21 @@ condition state #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[generateId](ConsumerCondition.md#generateid) +ConsumerCondition.generateId #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) +[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L61) --- ### generateIdHash -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> +▸ **generateIdHash**(`agreementId`, `...values`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -512,21 +651,21 @@ condition state #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[generateIdHash](ConsumerCondition.md#generateidhash) +ConsumerCondition.generateIdHash #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) +[src/keeper/contracts/conditions/Condition.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L57) --- ### generateIdWithSeed -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> +▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`\<[`string`, `string`]\> #### Parameters @@ -537,15 +676,15 @@ condition state #### Returns -`Promise`<[`string`, `string`]\> +`Promise`\<[`string`, `string`]\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[generateIdWithSeed](ConsumerCondition.md#generateidwithseed) +ConsumerCondition.generateIdWithSeed #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) +[src/keeper/contracts/conditions/Condition.abstract.ts:65](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L65) --- @@ -565,17 +704,17 @@ condition state #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[getConditionFulfilledEvent](ConsumerCondition.md#getconditionfulfilledevent) +ConsumerCondition.getConditionFulfilledEvent #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) +[src/keeper/contracts/conditions/Condition.abstract.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L79) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -585,70 +724,46 @@ condition state #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[getFromAddress](ConsumerCondition.md#getfromaddress) +ConsumerCondition.getFromAddress #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getInputsOfMethod +### getTransactionLogs -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -readonly `ParamType`[] +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[getInputsOfMethod](ConsumerCondition.md#getinputsofmethod) +ConsumerCondition.getTransactionLogs #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[ConsumerCondition](ConsumerCondition.md).[getSignatureOfMethod](ConsumerCondition.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### hashValues -▸ **hashValues**(`...args`): `Promise`<`string`\> +▸ **hashValues**(`...args`): `Promise`\<`string`\> #### Parameters @@ -658,21 +773,21 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[hashValues](ConsumerCondition.md#hashvalues) +ConsumerCondition.hashValues #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) +[src/keeper/contracts/conditions/Condition.abstract.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L116) --- ### hashValuesPlain -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> +▸ **hashValuesPlain**(`...args`): `Promise`\<`string`\> #### Parameters @@ -682,71 +797,72 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[hashValuesPlain](ConsumerCondition.md#hashvaluesplain) +ConsumerCondition.hashValuesPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) +[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L122) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[init](ConsumerCondition.md#init) +ConsumerCondition.init #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instance -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instance**(`agreementId`, `params`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | +| Name | Type | +| :------------ | :------------------------------------------------------- | +| `agreementId` | `string` | +| `params` | `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> | #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[instance](ConsumerCondition.md#instance) +ConsumerCondition.instance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) +[src/keeper/contracts/conditions/Condition.abstract.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L163) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -758,15 +874,15 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[instanceFromDDO](ConsumerCondition.md#instancefromddo) +ConsumerCondition.instanceFromDDO #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) +[src/keeper/contracts/conditions/Condition.abstract.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L131) --- @@ -786,13 +902,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts#L32) +[src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts:37](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts#L37) --- ### params -▸ **params**(`did`, `holderAddress`, `nftTokenAddress`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +▸ **params**(`did`, `holderAddress`, `nftTokenAddress`): `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> Generate the hash of condition inputs with the following parameters. @@ -806,23 +922,23 @@ Generate the hash of condition inputs with the following parameters. #### Returns -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +`ConditionParameters`\<`Record`\<`string`, `unknown`\>\> hash of all the values #### Overrides -[ConsumerCondition](ConsumerCondition.md).[params](ConsumerCondition.md#params) +ConsumerCondition.params #### Defined in -[src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts#L28) +[src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts:33](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts#L33) --- ### paramsFromDDO -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +▸ **paramsFromDDO**(`«destructured»`): `Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -832,75 +948,75 @@ hash of all the values #### Returns -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Overrides -[ConsumerCondition](ConsumerCondition.md).[paramsFromDDO](ConsumerCondition.md#paramsfromddo) +ConsumerCondition.paramsFromDDO #### Defined in -[src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts#L38) +[src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts:43](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts#L43) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[send](ConsumerCondition.md#send) +ConsumerCondition.send #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[sendFrom](ConsumerCondition.md#sendfrom) +ConsumerCondition.sendFrom #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -914,17 +1030,41 @@ hash of all the values #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[setInstanceConfig](ConsumerCondition.md#setinstanceconfig) +ConsumerCondition.setInstanceConfig + +#### Defined in + +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +ConsumerCondition.someLog #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`NFT721HolderCondition`](NFT721HolderCondition.md)\> +▸ **getInstance**(`config`): `Promise`\<[`NFT721HolderCondition`](NFT721HolderCondition.md)\> #### Parameters @@ -934,21 +1074,21 @@ hash of all the values #### Returns -`Promise`<[`NFT721HolderCondition`](NFT721HolderCondition.md)\> +`Promise`\<[`NFT721HolderCondition`](NFT721HolderCondition.md)\> #### Overrides -[ConsumerCondition](ConsumerCondition.md).[getInstance](ConsumerCondition.md#getinstance) +ConsumerCondition.getInstance #### Defined in -[src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts#L16) +[src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFT721HolderCondition.ts#L21) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -969,8 +1109,8 @@ hash of all the values #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[setInstanceConfig](ConsumerCondition.md#setinstanceconfig-1) +ConsumerCondition.setInstanceConfig #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFT721LockCondition.md b/docs/api-reference/classes/NFT721LockCondition.md deleted file mode 100644 index 5f9716f03..000000000 --- a/docs/api-reference/classes/NFT721LockCondition.md +++ /dev/null @@ -1,975 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / NFT721LockCondition - -# Class: NFT721LockCondition - -Implementation of the NFT Lock Condition - -## Hierarchy - -- [`ProviderCondition`](ProviderCondition.md)<`NFT721LockConditionContext`\> - - ↳ **`NFT721LockCondition`** - -## Table of contents - -### Constructors - -- [constructor](NFT721LockCondition.md#constructor) - -### Properties - -- [address](NFT721LockCondition.md#address) -- [contract](NFT721LockCondition.md#contract) -- [contractName](NFT721LockCondition.md#contractname) -- [events](NFT721LockCondition.md#events) -- [version](NFT721LockCondition.md#version) - -### Accessors - -- [artifactsFolder](NFT721LockCondition.md#artifactsfolder) -- [circuitsFolder](NFT721LockCondition.md#circuitsfolder) -- [config](NFT721LockCondition.md#config) -- [instanceConfig](NFT721LockCondition.md#instanceconfig) -- [instantiableConfig](NFT721LockCondition.md#instantiableconfig) -- [logger](NFT721LockCondition.md#logger) -- [nevermined](NFT721LockCondition.md#nevermined) -- [web3](NFT721LockCondition.md#web3) - -### Methods - -- [abortByTimeOut](NFT721LockCondition.md#abortbytimeout) -- [call](NFT721LockCondition.md#call) -- [fulfill](NFT721LockCondition.md#fulfill) -- [fulfillInstance](NFT721LockCondition.md#fulfillinstance) -- [fulfillPlain](NFT721LockCondition.md#fulfillplain) -- [fulfillWithNode](NFT721LockCondition.md#fulfillwithnode) -- [generateId](NFT721LockCondition.md#generateid) -- [generateIdHash](NFT721LockCondition.md#generateidhash) -- [generateIdWithSeed](NFT721LockCondition.md#generateidwithseed) -- [getConditionFulfilledEvent](NFT721LockCondition.md#getconditionfulfilledevent) -- [getFromAddress](NFT721LockCondition.md#getfromaddress) -- [getInputsOfMethod](NFT721LockCondition.md#getinputsofmethod) -- [getSignatureOfMethod](NFT721LockCondition.md#getsignatureofmethod) -- [hashValues](NFT721LockCondition.md#hashvalues) -- [hashValuesPlain](NFT721LockCondition.md#hashvaluesplain) -- [init](NFT721LockCondition.md#init) -- [instance](NFT721LockCondition.md#instance) -- [instanceFromDDO](NFT721LockCondition.md#instancefromddo) -- [nodeMethod](NFT721LockCondition.md#nodemethod) -- [params](NFT721LockCondition.md#params) -- [paramsFromDDO](NFT721LockCondition.md#paramsfromddo) -- [send](NFT721LockCondition.md#send) -- [sendFrom](NFT721LockCondition.md#sendfrom) -- [setInstanceConfig](NFT721LockCondition.md#setinstanceconfig) -- [getInstance](NFT721LockCondition.md#getinstance) -- [setInstanceConfig](NFT721LockCondition.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new NFT721LockCondition**(`contractName`) - -#### Parameters - -| Name | Type | -| :------------- | :------- | -| `contractName` | `string` | - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) - -## Properties - -### address - -• **address**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) - ---- - -### contract - -• **contract**: `BaseContract` = `null` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) - ---- - -### contractName - -• `Readonly` **contractName**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) - ---- - -### events - -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) - ---- - -### version - -• **version**: `string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ProviderCondition.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -ProviderCondition.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -ProviderCondition.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ProviderCondition.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -ProviderCondition.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -ProviderCondition.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -ProviderCondition.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -ProviderCondition.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### abortByTimeOut - -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------- | -| `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) - ---- - -### call - -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> - -#### Type parameters - -| Name | -| :--- | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | - -#### Returns - -`Promise`<`T`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) - ---- - -### fulfill - -▸ **fulfill**(`agreementId`, `did`, `lockAddress`, `amount`, `nftContractAddress`, `from?`): `Promise`<`ContractTransactionReceipt`\> - -Fulfill requires valid NFT transfer in order to lock the amount of DID NFTs based on SEA. - -#### Parameters - -| Name | Type | Description | -| :------------------- | :---------------------- | :-------------------------------------------- | -| `agreementId` | `string` | SEA agreement identifier. | -| `did` | `string` | Asset Decentralized identifier. | -| `lockAddress` | `string` | The contract address where the NFT is locked. | -| `amount` | `number` | The amount of tokens to be locked. | -| `nftContractAddress` | `string` | The NFT721 contract address | -| `from?` | [`Account`](Account.md) | | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -Condition state. - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) - -#### Defined in - -[src/keeper/contracts/defi/NFT721LockCondition.ts:56](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/NFT721LockCondition.ts#L56) - ---- - -### fulfillInstance - -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) - ---- - -### fulfillPlain - -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :------------ | :-------------------------------------------------------- | :------------ | -| `agreementId` | `string` | `undefined` | -| `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) - ---- - -### fulfillWithNode - -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) - ---- - -### generateId - -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) - ---- - -### generateIdHash - -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...values` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) - ---- - -### generateIdWithSeed - -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<[`string`, `string`]\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) - ---- - -### getConditionFulfilledEvent - -▸ **getConditionFulfilledEvent**(`agreementId`): [`EventResult`](../code-reference.md#eventresult) - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | - -#### Returns - -[`EventResult`](../code-reference.md#eventresult) - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) - ---- - -### getFromAddress - -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `from?` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) - ---- - -### hashValues - -▸ **hashValues**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) - ---- - -### hashValuesPlain - -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) - ---- - -### init - -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) - ---- - -### instance - -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) - ---- - -### instanceFromDDO - -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :------------ | :-------------------------------------------------------------------- | -| `agreementId` | `string` | -| `ctx` | `NFT721LockConditionContext` | -| `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) - ---- - -### nodeMethod - -▸ **nodeMethod**(): [`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Returns - -[`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L208) - ---- - -### params - -▸ **params**(`did`, `lockAddress`, `amount`, `nftContractAddress`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> - -Generates the hash of condition inputs. - -#### Parameters - -| Name | Type | Description | -| :------------------- | :------- | :----------------------------------------------- | -| `did` | `string` | The DID of the asset with NFTs attached to lock. | -| `lockAddress` | `string` | the address to lock the NFT to (vault address) | -| `amount` | `number` | The amount of locked tokens. | -| `nftContractAddress` | `string` | The NFT721 contract address | - -#### Returns - -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> - -Hash of all the values. - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) - -#### Defined in - -[src/keeper/contracts/defi/NFT721LockCondition.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/NFT721LockCondition.ts#L28) - ---- - -### paramsFromDDO - -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> - -#### Parameters - -| Name | Type | -| :--------------- | :--------------------------- | -| `«destructured»` | `NFT721LockConditionContext` | - -#### Returns - -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) - -#### Defined in - -[src/keeper/contracts/defi/NFT721LockCondition.ts:37](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/NFT721LockCondition.ts#L37) - ---- - -### send - -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) - ---- - -### sendFrom - -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### getInstance - -▸ `Static` **getInstance**(`config`): `Promise`<[`NFT721LockCondition`](NFT721LockCondition.md)\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`Promise`<[`NFT721LockCondition`](NFT721LockCondition.md)\> - -#### Overrides - -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) - -#### Defined in - -[src/keeper/contracts/defi/NFT721LockCondition.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/NFT721LockCondition.ts#L16) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/NFT721SalesTemplate.md b/docs/api-reference/classes/NFT721SalesTemplate.md index 1e8089f31..cbef1ac04 100644 --- a/docs/api-reference/classes/NFT721SalesTemplate.md +++ b/docs/api-reference/classes/NFT721SalesTemplate.md @@ -4,7 +4,7 @@ ## Hierarchy -- [`BaseTemplate`](BaseTemplate.md)<`NFT721SalesTemplateParams`, [`ServiceNFTSales`](../interfaces/ServiceNFTSales.md)\> +- [`BaseTemplate`](BaseTemplate.md)\<`NFT721SalesTemplateParams`, [`ServiceNFTSales`](../interfaces/ServiceNFTSales.md)\> ↳ **`NFT721SalesTemplate`** @@ -26,12 +26,14 @@ - [artifactsFolder](NFT721SalesTemplate.md#artifactsfolder) - [circuitsFolder](NFT721SalesTemplate.md#circuitsfolder) +- [client](NFT721SalesTemplate.md#client) - [config](NFT721SalesTemplate.md#config) - [instanceConfig](NFT721SalesTemplate.md#instanceconfig) - [instantiableConfig](NFT721SalesTemplate.md#instantiableconfig) - [logger](NFT721SalesTemplate.md#logger) - [nevermined](NFT721SalesTemplate.md#nevermined) -- [web3](NFT721SalesTemplate.md#web3) +- [publicClient](NFT721SalesTemplate.md#publicclient) +- [walletClient](NFT721SalesTemplate.md#walletclient) ### Methods @@ -54,12 +56,11 @@ - [getConditionTypes](NFT721SalesTemplate.md#getconditiontypes) - [getConditions](NFT721SalesTemplate.md#getconditions) - [getFromAddress](NFT721SalesTemplate.md#getfromaddress) -- [getInputsOfMethod](NFT721SalesTemplate.md#getinputsofmethod) - [getServiceAgreementTemplate](NFT721SalesTemplate.md#getserviceagreementtemplate) - [getServiceAgreementTemplateConditionByRef](NFT721SalesTemplate.md#getserviceagreementtemplateconditionbyref) - [getServiceAgreementTemplateConditions](NFT721SalesTemplate.md#getserviceagreementtemplateconditions) - [getServiceAgreementTemplateDependencies](NFT721SalesTemplate.md#getserviceagreementtemplatedependencies) -- [getSignatureOfMethod](NFT721SalesTemplate.md#getsignatureofmethod) +- [getTransactionLogs](NFT721SalesTemplate.md#gettransactionlogs) - [init](NFT721SalesTemplate.md#init) - [instanceFromDDO](NFT721SalesTemplate.md#instancefromddo) - [lockConditionIndex](NFT721SalesTemplate.md#lockconditionindex) @@ -75,6 +76,7 @@ - [service](NFT721SalesTemplate.md#service) - [serviceEndpoint](NFT721SalesTemplate.md#serviceendpoint) - [setInstanceConfig](NFT721SalesTemplate.md#setinstanceconfig) +- [someLog](NFT721SalesTemplate.md#somelog) - [standardContext](NFT721SalesTemplate.md#standardcontext) - [track](NFT721SalesTemplate.md#track) - [validateAgreement](NFT721SalesTemplate.md#validateagreement) @@ -85,7 +87,7 @@ ### constructor -• `Protected` **new NFT721SalesTemplate**(`contractName`) +• **new NFT721SalesTemplate**(`contractName`): [`NFT721SalesTemplate`](NFT721SalesTemplate.md) #### Parameters @@ -93,19 +95,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`NFT721SalesTemplate`](NFT721SalesTemplate.md) + #### Inherited from [BaseTemplate](BaseTemplate.md).[constructor](BaseTemplate.md#constructor) #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L68) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L51) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -113,13 +119,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -127,7 +133,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -141,13 +147,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -155,7 +161,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -169,17 +175,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -187,17 +193,17 @@ BaseTemplate.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -205,13 +211,31 @@ BaseTemplate.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +BaseTemplate.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -223,13 +247,13 @@ BaseTemplate.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -241,17 +265,17 @@ BaseTemplate.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -259,13 +283,13 @@ BaseTemplate.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -277,13 +301,13 @@ BaseTemplate.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -295,31 +319,146 @@ BaseTemplate.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -BaseTemplate.web3 +BaseTemplate.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +BaseTemplate.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### accept -▸ **accept**(`_params`): `Promise`<`boolean`\> +▸ **accept**(`_params`): `Promise`\<`boolean`\> #### Parameters @@ -329,7 +468,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Inherited from @@ -337,13 +476,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L98) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:114](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L114) --- ### agreementId -▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`<`string`\> +▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`\<`string`\> #### Parameters @@ -354,7 +493,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -362,13 +501,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L213) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:202](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L202) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -378,15 +517,15 @@ BaseTemplate.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -394,7 +533,7 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- @@ -412,13 +551,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/NFT721SalesTemplate.ts:56](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L56) +[src/keeper/contracts/templates/NFT721SalesTemplate.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L55) --- ### createAgreement -▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -430,12 +569,12 @@ BaseTemplate.web3 | `timeLocks` | `number`[] | | `timeOuts` | `number`[] | | `extraArgs` | `any`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -443,13 +582,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L90) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L73) --- ### createAgreementAndPay -▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -466,12 +605,12 @@ BaseTemplate.web3 | `tokenAddress` | `string` | | `amounts` | `bigint`[] | | `receivers` | `string`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -479,13 +618,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L115) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L98) --- ### createAgreementFromDDO -▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `from`, `timeOuts?`, `txParams?`): `Promise`<`string`\> +▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `timeOuts?`, `txParams?`): `Promise`\<`string`\> Create a new agreement using the data of a DDO. @@ -496,14 +635,13 @@ Create a new agreement using the data of a DDO. | `agreementIdSeed` | `string` | - | | `ddo` | [`DDO`](DDO.md) | DDO. | | `parameters` | `NFT721SalesTemplateParams` | | -| `consumer` | [`Account`](Account.md) | - | -| `from` | [`Account`](Account.md) | - | +| `consumer` | [`NvmAccount`](NvmAccount.md) | - | | `timeOuts?` | `number`[] | - | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> true if the call was successful. @@ -513,13 +651,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:222](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L222) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:211](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L211) --- ### createAgreementWithPaymentFromDDO -▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`<`string`\> +▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`\<`string`\> #### Parameters @@ -529,14 +667,14 @@ true if the call was successful. | `ddo` | [`DDO`](DDO.md) | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | | `parameters` | `NFT721SalesTemplateParams` | -| `consumer` | [`Account`](Account.md) | -| `from` | [`Account`](Account.md) | +| `consumer` | [`NvmAccount`](NvmAccount.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | | `observer?` | (`orderProgressStep`: [`OrderProgressStep`](../enums/OrderProgressStep.md)) => `void` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -544,7 +682,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L252) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:240](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L240) --- @@ -556,7 +694,7 @@ true if the call was successful. | Name | Type | | :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](Account.md) | +| `publisher` | [`NvmAccount`](NvmAccount.md) | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | | `serviceAttributes` | [`ServiceAttributes`](../interfaces/ServiceAttributes.md) | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | @@ -572,7 +710,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L35) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L48) --- @@ -590,13 +728,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/NFT721SalesTemplate.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L38) +[src/keeper/contracts/templates/NFT721SalesTemplate.ts:37](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L37) --- ### extraGen -▸ **extraGen**(`_params`): `Promise`<`any`\> +▸ **extraGen**(`_params`): `Promise`\<`any`\> #### Parameters @@ -606,7 +744,7 @@ true if the call was successful. #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Inherited from @@ -614,13 +752,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:94](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L94) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) --- ### getAgreementCreatedEvent -▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`<`any`[]\> +▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`\<`any`[]\> Generates and returns the agreement creation event. @@ -632,7 +770,7 @@ Generates and returns the agreement creation event. #### Returns -`Promise`<`any`[]\> +`Promise`\<`any`[]\> Agreement created event. @@ -642,13 +780,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:459](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L459) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:450](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L450) --- ### getAgreementData -▸ **getAgreementData**(`agreementId`): `Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +▸ **getAgreementData**(`agreementId`): `Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Parameters @@ -658,7 +796,7 @@ Agreement created event. #### Returns -`Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +`Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Inherited from @@ -666,13 +804,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L21) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L29) --- ### getAgreementIdsFromDDO -▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`<`string`[]\> +▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`\<`string`[]\> Get agreement conditions IDs. @@ -687,7 +825,7 @@ Get agreement conditions IDs. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> The condition IDs. @@ -697,13 +835,13 @@ The condition IDs. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:180](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L180) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:169](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L169) --- ### getAgreementStatus -▸ **getAgreementStatus**(`agreementId`): `Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +▸ **getAgreementStatus**(`agreementId`): `Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> Returns the status of the conditions. @@ -715,7 +853,7 @@ Returns the status of the conditions. #### Returns -`Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +`Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> The conditions status. @@ -725,13 +863,13 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:346](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L346) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:331](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L331) --- ### getAgreementsForDID -▸ **getAgreementsForDID**(`did`): `Promise`<`string`[]\> +▸ **getAgreementsForDID**(`did`): `Promise`\<`string`[]\> #### Parameters @@ -741,7 +879,7 @@ The conditions status. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> #### Inherited from @@ -749,19 +887,19 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:485](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L485) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:476](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L476) --- ### getConditionTypes -▸ **getConditionTypes**(): `Promise`<`string`[]\> +▸ **getConditionTypes**(): `Promise`\<`string`[]\> Conditions address list. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> A list of condition addresses. @@ -771,19 +909,19 @@ A list of condition addresses. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L154) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:137](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L137) --- ### getConditions -▸ **getConditions**(): `Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +▸ **getConditions**(): `Promise`\<`ConditionSmall`[]\> List of condition contracts. #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +`Promise`\<`ConditionSmall`[]\> A list of condition contracts. @@ -793,13 +931,13 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:165](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L165) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L148) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -809,7 +947,7 @@ A list of condition contracts. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -817,31 +955,7 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getInputsOfMethod](BaseTemplate.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- @@ -859,13 +973,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFT721SalesTemplate.ts:105](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L105) +[src/keeper/contracts/templates/NFT721SalesTemplate.ts:104](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L104) --- ### getServiceAgreementTemplateConditionByRef -▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`<[`ConditionSmall`](ConditionSmall.md)\> +▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`\<`undefined` \| `ConditionSmall`\> #### Parameters @@ -875,7 +989,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)\> +`Promise`\<`undefined` \| `ConditionSmall`\> #### Inherited from @@ -883,7 +997,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:329](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L329) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:314](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L314) --- @@ -901,17 +1015,17 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:324](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L324) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:309](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L309) --- ### getServiceAgreementTemplateDependencies -▸ **getServiceAgreementTemplateDependencies**(): `Promise`<{ `[condition: string]`: `string`[]; }\> +▸ **getServiceAgreementTemplateDependencies**(): `Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Returns -`Promise`<{ `[condition: string]`: `string`[]; }\> +`Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Inherited from @@ -919,49 +1033,50 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:336](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L336) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:321](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L321) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[BaseTemplate](BaseTemplate.md).[getSignatureOfMethod](BaseTemplate.md#getsignatureofmethod) +[BaseTemplate](BaseTemplate.md).[getTransactionLogs](BaseTemplate.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -969,13 +1084,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`, `serviceReference?`): `Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`NFT721SalesTemplateParams`\>\> +▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`, `serviceReference?`): `Promise`\<`AgreementInstance`\<`NFT721SalesTemplateParams`\>\> #### Parameters @@ -989,7 +1104,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`NFT721SalesTemplateParams`\>\> +`Promise`\<`AgreementInstance`\<`NFT721SalesTemplateParams`\>\> #### Overrides @@ -997,7 +1112,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFT721SalesTemplate.ts:62](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L62) +[src/keeper/contracts/templates/NFT721SalesTemplate.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L61) --- @@ -1015,13 +1130,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFT721SalesTemplate.ts:52](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L52) +[src/keeper/contracts/templates/NFT721SalesTemplate.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L51) --- ### lockTokens -▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams`): `Promise`<`void`\> +▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams?`): `Promise`\<`void`\> #### Parameters @@ -1029,12 +1144,12 @@ readonly `ParamType`[] | :------------- | :---------------------------------------------- | | `tokenAddress` | `any` | | `amounts` | `any` | -| `from` | [`Account`](Account.md) | -| `txParams` | [`TxParameters`](../interfaces/TxParameters.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1042,7 +1157,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:393](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L393) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:382](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L382) --- @@ -1060,7 +1175,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFT721SalesTemplate.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L35) +[src/keeper/contracts/templates/NFT721SalesTemplate.ts:34](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L34) --- @@ -1085,13 +1200,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFT721SalesTemplate.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L42) +[src/keeper/contracts/templates/NFT721SalesTemplate.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L41) --- ### paramsGen -▸ **paramsGen**(`«destructured»`): `Promise`<`NFT721SalesTemplateParams`\> +▸ **paramsGen**(`«destructured»`): `Promise`\<`NFT721SalesTemplateParams`\> Specialize params @@ -1103,7 +1218,7 @@ Specialize params #### Returns -`Promise`<`NFT721SalesTemplateParams`\> +`Promise`\<`NFT721SalesTemplateParams`\> #### Overrides @@ -1111,13 +1226,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/NFT721SalesTemplate.ts:45](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L45) +[src/keeper/contracts/templates/NFT721SalesTemplate.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L44) --- ### paymentData -▸ **paymentData**(`service`): `Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +▸ **paymentData**(`service`): `Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Parameters @@ -1127,7 +1242,7 @@ Specialize params #### Returns -`Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +`Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Inherited from @@ -1135,13 +1250,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L78) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L61) --- ### printAgreementStatus -▸ **printAgreementStatus**(`agreementId`): `Promise`<`void`\> +▸ **printAgreementStatus**(`agreementId`): `Promise`\<`void`\> Prints the agreement status. @@ -1153,7 +1268,7 @@ Prints the agreement status. #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1161,25 +1276,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:429](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L429) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:418](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L418) --- ### process -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> +▸ **process**(`params`, `from`, `txparams?`): `Promise`\<`void`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1187,26 +1302,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:126](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L126) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1214,26 +1329,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1241,7 +1356,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- @@ -1259,7 +1374,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFT721SalesTemplate.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L28) +[src/keeper/contracts/templates/NFT721SalesTemplate.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L27) --- @@ -1277,13 +1392,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFT721SalesTemplate.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L31) +[src/keeper/contracts/templates/NFT721SalesTemplate.ts:30](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L30) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1301,13 +1416,37 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[BaseTemplate](BaseTemplate.md).[someLog](BaseTemplate.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### standardContext -▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): [`ConditionContext`](../interfaces/ConditionContext.md) +▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): `ConditionContext` #### Parameters @@ -1319,7 +1458,7 @@ Prints the agreement status. #### Returns -[`ConditionContext`](../interfaces/ConditionContext.md) +`ConditionContext` #### Inherited from @@ -1327,25 +1466,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L200) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:189](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L189) --- ### track -▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`<`boolean`\> +▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`\<`boolean`\> #### Parameters | Name | Type | | :----------- | :------------------------------------------------------ | | `_params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `_from` | [`Account`](Account.md) | +| `_from` | [`NvmAccount`](NvmAccount.md) | | `_txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Inherited from @@ -1353,13 +1492,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:102](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L102) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L118) --- ### validateAgreement -▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`<`void`\> +▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`\<`void`\> #### Parameters @@ -1368,13 +1507,13 @@ Prints the agreement status. | `agreement_id` | `string` | | `did` | `string` | | `params` | `NFT721SalesTemplateParams` | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `extra` | `any` | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1382,13 +1521,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:125](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L125) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:141](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L141) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`NFT721SalesTemplate`](NFT721SalesTemplate.md)\> +▸ **getInstance**(`config`): `Promise`\<[`NFT721SalesTemplate`](NFT721SalesTemplate.md)\> #### Parameters @@ -1398,7 +1537,7 @@ Prints the agreement status. #### Returns -`Promise`<[`NFT721SalesTemplate`](NFT721SalesTemplate.md)\> +`Promise`\<[`NFT721SalesTemplate`](NFT721SalesTemplate.md)\> #### Overrides @@ -1406,13 +1545,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFT721SalesTemplate.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L24) +[src/keeper/contracts/templates/NFT721SalesTemplate.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFT721SalesTemplate.ts#L23) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1437,4 +1576,4 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFTAccessCondition.md b/docs/api-reference/classes/NFTAccessCondition.md index 4e014989b..d5c1452e6 100644 --- a/docs/api-reference/classes/NFTAccessCondition.md +++ b/docs/api-reference/classes/NFTAccessCondition.md @@ -4,7 +4,7 @@ ## Hierarchy -- [`ProviderCondition`](ProviderCondition.md)<`NFTAccessConditionContext`\> +- `ProviderCondition`\<`NFTAccessConditionContext`\> ↳ **`NFTAccessCondition`** @@ -26,12 +26,14 @@ - [artifactsFolder](NFTAccessCondition.md#artifactsfolder) - [circuitsFolder](NFTAccessCondition.md#circuitsfolder) +- [client](NFTAccessCondition.md#client) - [config](NFTAccessCondition.md#config) - [instanceConfig](NFTAccessCondition.md#instanceconfig) - [instantiableConfig](NFTAccessCondition.md#instantiableconfig) - [logger](NFTAccessCondition.md#logger) - [nevermined](NFTAccessCondition.md#nevermined) -- [web3](NFTAccessCondition.md#web3) +- [publicClient](NFTAccessCondition.md#publicclient) +- [walletClient](NFTAccessCondition.md#walletclient) ### Methods @@ -47,8 +49,7 @@ - [generateIdWithSeed](NFTAccessCondition.md#generateidwithseed) - [getConditionFulfilledEvent](NFTAccessCondition.md#getconditionfulfilledevent) - [getFromAddress](NFTAccessCondition.md#getfromaddress) -- [getInputsOfMethod](NFTAccessCondition.md#getinputsofmethod) -- [getSignatureOfMethod](NFTAccessCondition.md#getsignatureofmethod) +- [getTransactionLogs](NFTAccessCondition.md#gettransactionlogs) - [hashValues](NFTAccessCondition.md#hashvalues) - [hashValuesPlain](NFTAccessCondition.md#hashvaluesplain) - [init](NFTAccessCondition.md#init) @@ -60,6 +61,7 @@ - [send](NFTAccessCondition.md#send) - [sendFrom](NFTAccessCondition.md#sendfrom) - [setInstanceConfig](NFTAccessCondition.md#setinstanceconfig) +- [someLog](NFTAccessCondition.md#somelog) - [getInstance](NFTAccessCondition.md#getinstance) - [setInstanceConfig](NFTAccessCondition.md#setinstanceconfig-1) @@ -67,7 +69,7 @@ ### constructor -• **new NFTAccessCondition**(`contractName`) +• **new NFTAccessCondition**(`contractName`): [`NFTAccessCondition`](NFTAccessCondition.md) #### Parameters @@ -75,41 +77,45 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`NFTAccessCondition`](NFTAccessCondition.md) + #### Inherited from -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) +ProviderCondition\.constructor #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) +ProviderCondition.address #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) +ProviderCondition.contract #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -119,25 +125,25 @@ #### Inherited from -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) +ProviderCondition.contractName #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) +ProviderCondition.events #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -147,21 +153,21 @@ #### Inherited from -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) +ProviderCondition.version #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -169,17 +175,17 @@ ProviderCondition.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -187,13 +193,31 @@ ProviderCondition.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ProviderCondition.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -205,13 +229,13 @@ ProviderCondition.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -223,17 +247,17 @@ ProviderCondition.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -241,13 +265,13 @@ ProviderCondition.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -259,13 +283,13 @@ ProviderCondition.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -277,57 +301,172 @@ ProviderCondition.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ProviderCondition.web3 +ProviderCondition.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ProviderCondition.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### abortByTimeOut -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **abortByTimeOut**(`conditionId`, `from`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :------------ | :---------------------------------------------- | | `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) +ProviderCondition.abortByTimeOut #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) +[src/keeper/contracts/conditions/Condition.abstract.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L75) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -337,51 +476,51 @@ ProviderCondition.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) +ProviderCondition.call #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### checkPermissions -▸ **checkPermissions**(`grantee`, `did`, `from?`): `Promise`<`boolean`\> +▸ **checkPermissions**(`grantee`, `did`, `from?`): `Promise`\<`boolean`\> #### Parameters -| Name | Type | -| :-------- | :---------------------- | -| `grantee` | `string` | -| `did` | `string` | -| `from?` | [`Account`](Account.md) | +| Name | Type | +| :-------- | :---------------------------- | +| `grantee` | `string` | +| `did` | `string` | +| `from?` | [`NvmAccount`](NvmAccount.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts#L34) +[src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts#L38) --- ### fulfill -▸ **fulfill**(`agreementId`, `did`, `grantee`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfill**(`agreementId`, `did`, `grantee`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -390,54 +529,54 @@ ProviderCondition.web3 | `agreementId` | `string` | | `did` | `string` | | `grantee` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Overrides -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) +ProviderCondition.fulfill #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts#L24) +[src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts#L28) --- ### fulfillInstance -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillInstance**(`cond`, `additionalParams`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | +| Name | Type | Default value | +| :----------------- | :-------------------------------------------------------- | :------------ | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | `undefined` | +| `additionalParams` | `Record`\<`string`, `unknown`\> | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | +| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) +ProviderCondition.fulfillInstance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) +[src/keeper/contracts/conditions/Condition.abstract.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L139) --- ### fulfillPlain -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillPlain**(`agreementId`, `args`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters @@ -445,54 +584,54 @@ ProviderCondition.web3 | :------------ | :-------------------------------------------------------- | :------------ | | `agreementId` | `string` | `undefined` | | `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | | `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) +ProviderCondition.fulfillPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) +[src/keeper/contracts/conditions/Condition.abstract.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L47) --- ### fulfillWithNode -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillWithNode**(`cond`, `additionalParams`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :----------------- | :----------------------------------------------------- | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | +| `additionalParams` | `Record`\<`string`, `unknown`\> | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) +ProviderCondition.fulfillWithNode #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) +[src/keeper/contracts/conditions/Condition.abstract.ts:183](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L183) --- ### generateId -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> +▸ **generateId**(`agreementId`, `valueHash`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -503,21 +642,21 @@ ProviderCondition.web3 #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) +ProviderCondition.generateId #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) +[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L61) --- ### generateIdHash -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> +▸ **generateIdHash**(`agreementId`, `...values`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -528,21 +667,21 @@ ProviderCondition.web3 #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) +ProviderCondition.generateIdHash #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) +[src/keeper/contracts/conditions/Condition.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L57) --- ### generateIdWithSeed -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> +▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`\<[`string`, `string`]\> #### Parameters @@ -553,15 +692,15 @@ ProviderCondition.web3 #### Returns -`Promise`<[`string`, `string`]\> +`Promise`\<[`string`, `string`]\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) +ProviderCondition.generateIdWithSeed #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) +[src/keeper/contracts/conditions/Condition.abstract.ts:65](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L65) --- @@ -581,17 +720,17 @@ ProviderCondition.web3 #### Inherited from -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) +ProviderCondition.getConditionFulfilledEvent #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) +[src/keeper/contracts/conditions/Condition.abstract.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L79) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -601,70 +740,46 @@ ProviderCondition.web3 #### Returns -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) +ProviderCondition.getFromAddress #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) +ProviderCondition.getTransactionLogs #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### hashValues -▸ **hashValues**(`...args`): `Promise`<`string`\> +▸ **hashValues**(`...args`): `Promise`\<`string`\> #### Parameters @@ -674,21 +789,21 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) +ProviderCondition.hashValues #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) +[src/keeper/contracts/conditions/Condition.abstract.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L116) --- ### hashValuesPlain -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> +▸ **hashValuesPlain**(`...args`): `Promise`\<`string`\> #### Parameters @@ -698,71 +813,72 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) +ProviderCondition.hashValuesPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) +[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L122) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) +ProviderCondition.init #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instance -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instance**(`agreementId`, `params`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | +| Name | Type | +| :------------ | :------------------------------------------------------- | +| `agreementId` | `string` | +| `params` | `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> | #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) +ProviderCondition.instance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) +[src/keeper/contracts/conditions/Condition.abstract.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L163) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -774,15 +890,15 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) +ProviderCondition.instanceFromDDO #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) +[src/keeper/contracts/conditions/Condition.abstract.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L131) --- @@ -796,17 +912,17 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) +ProviderCondition.nodeMethod #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L208) +[src/keeper/contracts/conditions/Condition.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L200) --- ### params -▸ **params**(`did`, `grantee`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +▸ **params**(`did`, `grantee`): `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> #### Parameters @@ -817,21 +933,21 @@ readonly `ParamType`[] #### Returns -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +`ConditionParameters`\<`Record`\<`string`, `unknown`\>\> #### Overrides -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) +ProviderCondition.params #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts#L16) +[src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts#L20) --- ### paramsFromDDO -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +▸ **paramsFromDDO**(`«destructured»`): `Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -841,75 +957,75 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Overrides -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) +ProviderCondition.paramsFromDDO #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts#L20) +[src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts#L24) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) +ProviderCondition.send #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) +ProviderCondition.sendFrom #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -923,17 +1039,41 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) +ProviderCondition.setInstanceConfig + +#### Defined in + +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +ProviderCondition.someLog #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`NFTAccessCondition`](NFTAccessCondition.md)\> +▸ **getInstance**(`config`): `Promise`\<[`NFTAccessCondition`](NFTAccessCondition.md)\> #### Parameters @@ -943,21 +1083,21 @@ readonly `ParamType`[] #### Returns -`Promise`<[`NFTAccessCondition`](NFTAccessCondition.md)\> +`Promise`\<[`NFTAccessCondition`](NFTAccessCondition.md)\> #### Overrides -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) +ProviderCondition.getInstance #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts#L12) +[src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTAccessCondition.ts#L16) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -978,8 +1118,8 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) +ProviderCondition.setInstanceConfig #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFTAccessService.md b/docs/api-reference/classes/NFTAccessService.md index d5774f2fa..f640506ad 100644 --- a/docs/api-reference/classes/NFTAccessService.md +++ b/docs/api-reference/classes/NFTAccessService.md @@ -10,7 +10,7 @@ ## Implements -- [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceNFTAccess`](../interfaces/ServiceNFTAccess.md)\> +- [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`ServiceNFTAccess`](../interfaces/ServiceNFTAccess.md)\> ## Table of contents @@ -27,12 +27,14 @@ - [artifactsFolder](NFTAccessService.md#artifactsfolder) - [circuitsFolder](NFTAccessService.md#circuitsfolder) +- [client](NFTAccessService.md#client) - [config](NFTAccessService.md#config) - [instanceConfig](NFTAccessService.md#instanceconfig) - [instantiableConfig](NFTAccessService.md#instantiableconfig) - [logger](NFTAccessService.md#logger) - [nevermined](NFTAccessService.md#nevermined) -- [web3](NFTAccessService.md#web3) +- [publicClient](NFTAccessService.md#publicclient) +- [walletClient](NFTAccessService.md#walletclient) ### Methods @@ -49,7 +51,7 @@ ### constructor -• **new NFTAccessService**(`config`) +• **new NFTAccessService**(`config`): [`NFTAccessService`](NFTAccessService.md) #### Parameters @@ -57,13 +59,17 @@ | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`NFTAccessService`](NFTAccessService.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/AccessService.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L78) +[src/nevermined/AccessService.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L76) ## Properties @@ -73,7 +79,7 @@ #### Defined in -[src/nevermined/AccessService.ts:75](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L75) +[src/nevermined/AccessService.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L73) --- @@ -83,17 +89,17 @@ #### Defined in -[src/nevermined/AccessService.ts:76](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L76) +[src/nevermined/AccessService.ts:74](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L74) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -101,17 +107,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -119,13 +125,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -137,13 +161,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -155,17 +179,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -173,13 +197,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -191,13 +215,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -209,31 +233,146 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### accept -▸ **accept**(`params`): `Promise`<`boolean`\> +▸ **accept**(`params`): `Promise`\<`boolean`\> #### Parameters @@ -243,7 +382,7 @@ Instantiable.web3 #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Implementation of @@ -251,7 +390,7 @@ Instantiable.web3 #### Defined in -[src/nevermined/AccessService.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L115) +[src/nevermined/AccessService.ts:113](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L113) --- @@ -263,7 +402,7 @@ Instantiable.web3 | Name | Type | | :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](Account.md) | +| `publisher` | [`NvmAccount`](NvmAccount.md) | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | | `serviceAttributes` | [`ServiceAttributes`](../interfaces/ServiceAttributes.md) | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | @@ -279,25 +418,25 @@ Instantiable.web3 #### Defined in -[src/nevermined/AccessService.ts:85](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L85) +[src/nevermined/AccessService.ts:83](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L83) --- ### process -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> +▸ **process**(`params`, `from`, `txparams?`): `Promise`\<`void`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Implementation of @@ -305,13 +444,13 @@ Instantiable.web3 #### Defined in -[src/nevermined/AccessService.ts:106](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L106) +[src/nevermined/AccessService.ts:104](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L104) --- ### select -▸ **select**(`main`): [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceNFTAccess`](../interfaces/ServiceNFTAccess.md)\> +▸ **select**(`main`): [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`ServiceNFTAccess`](../interfaces/ServiceNFTAccess.md)\> #### Parameters @@ -321,17 +460,17 @@ Instantiable.web3 #### Returns -[`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceNFTAccess`](../interfaces/ServiceNFTAccess.md)\> +[`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`ServiceNFTAccess`](../interfaces/ServiceNFTAccess.md)\> #### Defined in -[src/nevermined/AccessService.ts:102](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L102) +[src/nevermined/AccessService.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L100) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -349,25 +488,25 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### track -▸ **track**(`params`, `from`, `txparams?`): `Promise`<`boolean`\> +▸ **track**(`params`, `from`, `txparams?`): `Promise`\<`boolean`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Implementation of @@ -375,13 +514,13 @@ Instantiable.web3 #### Defined in -[src/nevermined/AccessService.ts:120](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L120) +[src/nevermined/AccessService.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L118) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -399,13 +538,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -430,4 +569,4 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFTAccessTemplate.md b/docs/api-reference/classes/NFTAccessTemplate.md index 316920ce3..ddd151bc5 100644 --- a/docs/api-reference/classes/NFTAccessTemplate.md +++ b/docs/api-reference/classes/NFTAccessTemplate.md @@ -4,7 +4,7 @@ ## Hierarchy -- [`BaseTemplate`](BaseTemplate.md)<`NFTAccessTemplateParams`, [`ServiceNFTAccess`](../interfaces/ServiceNFTAccess.md)\> +- [`BaseTemplate`](BaseTemplate.md)\<`NFTAccessTemplateParams`, [`ServiceNFTAccess`](../interfaces/ServiceNFTAccess.md)\> ↳ **`NFTAccessTemplate`** @@ -26,12 +26,14 @@ - [artifactsFolder](NFTAccessTemplate.md#artifactsfolder) - [circuitsFolder](NFTAccessTemplate.md#circuitsfolder) +- [client](NFTAccessTemplate.md#client) - [config](NFTAccessTemplate.md#config) - [instanceConfig](NFTAccessTemplate.md#instanceconfig) - [instantiableConfig](NFTAccessTemplate.md#instantiableconfig) - [logger](NFTAccessTemplate.md#logger) - [nevermined](NFTAccessTemplate.md#nevermined) -- [web3](NFTAccessTemplate.md#web3) +- [publicClient](NFTAccessTemplate.md#publicclient) +- [walletClient](NFTAccessTemplate.md#walletclient) ### Methods @@ -54,12 +56,11 @@ - [getConditionTypes](NFTAccessTemplate.md#getconditiontypes) - [getConditions](NFTAccessTemplate.md#getconditions) - [getFromAddress](NFTAccessTemplate.md#getfromaddress) -- [getInputsOfMethod](NFTAccessTemplate.md#getinputsofmethod) - [getServiceAgreementTemplate](NFTAccessTemplate.md#getserviceagreementtemplate) - [getServiceAgreementTemplateConditionByRef](NFTAccessTemplate.md#getserviceagreementtemplateconditionbyref) - [getServiceAgreementTemplateConditions](NFTAccessTemplate.md#getserviceagreementtemplateconditions) - [getServiceAgreementTemplateDependencies](NFTAccessTemplate.md#getserviceagreementtemplatedependencies) -- [getSignatureOfMethod](NFTAccessTemplate.md#getsignatureofmethod) +- [getTransactionLogs](NFTAccessTemplate.md#gettransactionlogs) - [init](NFTAccessTemplate.md#init) - [instanceFromDDO](NFTAccessTemplate.md#instancefromddo) - [lockConditionIndex](NFTAccessTemplate.md#lockconditionindex) @@ -75,6 +76,7 @@ - [service](NFTAccessTemplate.md#service) - [serviceEndpoint](NFTAccessTemplate.md#serviceendpoint) - [setInstanceConfig](NFTAccessTemplate.md#setinstanceconfig) +- [someLog](NFTAccessTemplate.md#somelog) - [standardContext](NFTAccessTemplate.md#standardcontext) - [track](NFTAccessTemplate.md#track) - [validateAgreement](NFTAccessTemplate.md#validateagreement) @@ -85,7 +87,7 @@ ### constructor -• `Protected` **new NFTAccessTemplate**(`contractName`) +• **new NFTAccessTemplate**(`contractName`): [`NFTAccessTemplate`](NFTAccessTemplate.md) #### Parameters @@ -93,19 +95,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`NFTAccessTemplate`](NFTAccessTemplate.md) + #### Inherited from [BaseTemplate](BaseTemplate.md).[constructor](BaseTemplate.md#constructor) #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L68) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L51) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -113,13 +119,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -127,7 +133,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -141,13 +147,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -155,7 +161,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -169,17 +175,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -187,17 +193,17 @@ BaseTemplate.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -205,13 +211,31 @@ BaseTemplate.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +BaseTemplate.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -223,13 +247,13 @@ BaseTemplate.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -241,17 +265,17 @@ BaseTemplate.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -259,13 +283,13 @@ BaseTemplate.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -277,13 +301,13 @@ BaseTemplate.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -295,31 +319,146 @@ BaseTemplate.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -BaseTemplate.web3 +BaseTemplate.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +BaseTemplate.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### accept -▸ **accept**(`params`): `Promise`<`boolean`\> +▸ **accept**(`params`): `Promise`\<`boolean`\> #### Parameters @@ -329,7 +468,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Overrides @@ -337,13 +476,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:107](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L107) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:133](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L133) --- ### agreementId -▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`<`string`\> +▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`\<`string`\> #### Parameters @@ -354,7 +493,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -362,13 +501,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L213) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:202](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L202) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -378,15 +517,15 @@ BaseTemplate.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -394,7 +533,7 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- @@ -412,13 +551,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L42) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:49](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L49) --- ### createAgreement -▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -430,12 +569,12 @@ BaseTemplate.web3 | `timeLocks` | `number`[] | | `timeOuts` | `number`[] | | `extraArgs` | `any`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -443,13 +582,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L90) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L73) --- ### createAgreementAndPay -▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -466,12 +605,12 @@ BaseTemplate.web3 | `tokenAddress` | `string` | | `amounts` | `bigint`[] | | `receivers` | `string`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -479,13 +618,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L115) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L98) --- ### createAgreementFromDDO -▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `from`, `timeOuts?`, `txParams?`): `Promise`<`string`\> +▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `timeOuts?`, `txParams?`): `Promise`\<`string`\> Create a new agreement using the data of a DDO. @@ -496,14 +635,13 @@ Create a new agreement using the data of a DDO. | `agreementIdSeed` | `string` | - | | `ddo` | [`DDO`](DDO.md) | DDO. | | `parameters` | `NFTAccessTemplateParams` | | -| `consumer` | [`Account`](Account.md) | - | -| `from` | [`Account`](Account.md) | - | +| `consumer` | [`NvmAccount`](NvmAccount.md) | - | | `timeOuts?` | `number`[] | - | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> true if the call was successful. @@ -513,13 +651,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:222](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L222) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:211](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L211) --- ### createAgreementWithPaymentFromDDO -▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`<`string`\> +▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`\<`string`\> #### Parameters @@ -529,14 +667,14 @@ true if the call was successful. | `ddo` | [`DDO`](DDO.md) | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | | `parameters` | `NFTAccessTemplateParams` | -| `consumer` | [`Account`](Account.md) | -| `from` | [`Account`](Account.md) | +| `consumer` | [`NvmAccount`](NvmAccount.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | | `observer?` | (`orderProgressStep`: [`OrderProgressStep`](../enums/OrderProgressStep.md)) => `void` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -544,7 +682,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L252) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:240](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L240) --- @@ -556,7 +694,7 @@ true if the call was successful. | Name | Type | | :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](Account.md) | +| `publisher` | [`NvmAccount`](NvmAccount.md) | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | | `serviceAttributes` | [`ServiceAttributes`](../interfaces/ServiceAttributes.md) | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | @@ -572,7 +710,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L35) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L48) --- @@ -590,13 +728,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L31) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L38) --- ### extraGen -▸ **extraGen**(`_params`): `Promise`<`any`\> +▸ **extraGen**(`_params`): `Promise`\<`any`\> #### Parameters @@ -606,7 +744,7 @@ true if the call was successful. #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Inherited from @@ -614,13 +752,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:94](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L94) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) --- ### getAgreementCreatedEvent -▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`<`any`[]\> +▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`\<`any`[]\> Generates and returns the agreement creation event. @@ -632,7 +770,7 @@ Generates and returns the agreement creation event. #### Returns -`Promise`<`any`[]\> +`Promise`\<`any`[]\> Agreement created event. @@ -642,13 +780,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:459](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L459) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:450](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L450) --- ### getAgreementData -▸ **getAgreementData**(`agreementId`): `Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +▸ **getAgreementData**(`agreementId`): `Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Parameters @@ -658,7 +796,7 @@ Agreement created event. #### Returns -`Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +`Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Inherited from @@ -666,13 +804,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L21) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L29) --- ### getAgreementIdsFromDDO -▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`<`string`[]\> +▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`\<`string`[]\> Get agreement conditions IDs. @@ -687,7 +825,7 @@ Get agreement conditions IDs. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> The condition IDs. @@ -697,13 +835,13 @@ The condition IDs. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:180](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L180) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:169](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L169) --- ### getAgreementStatus -▸ **getAgreementStatus**(`agreementId`): `Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +▸ **getAgreementStatus**(`agreementId`): `Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> Returns the status of the conditions. @@ -715,7 +853,7 @@ Returns the status of the conditions. #### Returns -`Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +`Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> The conditions status. @@ -725,13 +863,13 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:346](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L346) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:331](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L331) --- ### getAgreementsForDID -▸ **getAgreementsForDID**(`did`): `Promise`<`string`[]\> +▸ **getAgreementsForDID**(`did`): `Promise`\<`string`[]\> #### Parameters @@ -741,7 +879,7 @@ The conditions status. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> #### Inherited from @@ -749,19 +887,19 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:485](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L485) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:476](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L476) --- ### getConditionTypes -▸ **getConditionTypes**(): `Promise`<`string`[]\> +▸ **getConditionTypes**(): `Promise`\<`string`[]\> Conditions address list. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> A list of condition addresses. @@ -771,19 +909,19 @@ A list of condition addresses. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L154) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:137](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L137) --- ### getConditions -▸ **getConditions**(): `Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +▸ **getConditions**(): `Promise`\<`ConditionSmall`[]\> List of condition contracts. #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +`Promise`\<`ConditionSmall`[]\> A list of condition contracts. @@ -793,13 +931,13 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:165](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L165) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L148) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -809,7 +947,7 @@ A list of condition contracts. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -817,31 +955,7 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getInputsOfMethod](BaseTemplate.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- @@ -859,13 +973,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:71](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L71) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:78](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L78) --- ### getServiceAgreementTemplateConditionByRef -▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`<[`ConditionSmall`](ConditionSmall.md)\> +▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`\<`undefined` \| `ConditionSmall`\> #### Parameters @@ -875,7 +989,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)\> +`Promise`\<`undefined` \| `ConditionSmall`\> #### Inherited from @@ -883,7 +997,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:329](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L329) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:314](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L314) --- @@ -901,17 +1015,17 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:324](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L324) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:309](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L309) --- ### getServiceAgreementTemplateDependencies -▸ **getServiceAgreementTemplateDependencies**(): `Promise`<{ `[condition: string]`: `string`[]; }\> +▸ **getServiceAgreementTemplateDependencies**(): `Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Returns -`Promise`<{ `[condition: string]`: `string`[]; }\> +`Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Inherited from @@ -919,49 +1033,50 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:336](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L336) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:321](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L321) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[BaseTemplate](BaseTemplate.md).[getSignatureOfMethod](BaseTemplate.md#getsignatureofmethod) +[BaseTemplate](BaseTemplate.md).[getTransactionLogs](BaseTemplate.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -969,13 +1084,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`): `Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`NFTAccessTemplateParams`\>\> +▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`): `Promise`\<`AgreementInstance`\<`NFTAccessTemplateParams`\>\> #### Parameters @@ -988,7 +1103,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`NFTAccessTemplateParams`\>\> +`Promise`\<`AgreementInstance`\<`NFTAccessTemplateParams`\>\> #### Overrides @@ -996,7 +1111,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L47) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L54) --- @@ -1014,13 +1129,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L74) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L57) --- ### lockTokens -▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams`): `Promise`<`void`\> +▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams?`): `Promise`\<`void`\> #### Parameters @@ -1028,12 +1143,12 @@ readonly `ParamType`[] | :------------- | :---------------------------------------------- | | `tokenAddress` | `any` | | `amounts` | `any` | -| `from` | [`Account`](Account.md) | -| `txParams` | [`TxParameters`](../interfaces/TxParameters.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1041,7 +1156,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:393](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L393) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:382](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L382) --- @@ -1059,7 +1174,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L28) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L35) --- @@ -1084,13 +1199,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L35) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:42](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L42) --- ### paramsGen -▸ **paramsGen**(`«destructured»`): `Promise`<`NFTAccessTemplateParams`\> +▸ **paramsGen**(`«destructured»`): `Promise`\<`NFTAccessTemplateParams`\> Specialize params @@ -1102,7 +1217,7 @@ Specialize params #### Returns -`Promise`<`NFTAccessTemplateParams`\> +`Promise`\<`NFTAccessTemplateParams`\> #### Overrides @@ -1110,13 +1225,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L38) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:45](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L45) --- ### paymentData -▸ **paymentData**(`service`): `Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +▸ **paymentData**(`service`): `Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Parameters @@ -1126,7 +1241,7 @@ Specialize params #### Returns -`Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +`Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Inherited from @@ -1134,13 +1249,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L78) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L61) --- ### printAgreementStatus -▸ **printAgreementStatus**(`agreementId`): `Promise`<`void`\> +▸ **printAgreementStatus**(`agreementId`): `Promise`\<`void`\> Prints the agreement status. @@ -1152,7 +1267,7 @@ Prints the agreement status. #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1160,25 +1275,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:429](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L429) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:418](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L418) --- ### process -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> +▸ **process**(`params`, `from`, `txparams?`): `Promise`\<`void`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Overrides @@ -1186,26 +1301,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:75](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L75) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:101](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L101) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1213,26 +1328,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1240,7 +1355,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- @@ -1258,7 +1373,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L25) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:32](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L32) --- @@ -1276,13 +1391,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L31) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L44) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1300,13 +1415,37 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[BaseTemplate](BaseTemplate.md).[someLog](BaseTemplate.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### standardContext -▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): [`ConditionContext`](../interfaces/ConditionContext.md) +▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): `ConditionContext` #### Parameters @@ -1318,7 +1457,7 @@ Prints the agreement status. #### Returns -[`ConditionContext`](../interfaces/ConditionContext.md) +`ConditionContext` #### Inherited from @@ -1326,25 +1465,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L200) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:189](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L189) --- ### track -▸ **track**(`params`, `from`, `txparams?`): `Promise`<`boolean`\> +▸ **track**(`params`, `from`, `txparams?`): `Promise`\<`boolean`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Overrides @@ -1352,13 +1491,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:143](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L143) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:169](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L169) --- ### validateAgreement -▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`<`void`\> +▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`\<`void`\> #### Parameters @@ -1367,13 +1506,13 @@ Prints the agreement status. | `agreement_id` | `string` | | `did` | `string` | | `params` | `NFTAccessTemplateParams` | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `extra` | `any` | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Overrides @@ -1381,13 +1520,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L90) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L116) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`NFTAccessTemplate`](NFTAccessTemplate.md)\> +▸ **getInstance**(`config`): `Promise`\<[`NFTAccessTemplate`](NFTAccessTemplate.md)\> #### Parameters @@ -1397,7 +1536,7 @@ Prints the agreement status. #### Returns -`Promise`<[`NFTAccessTemplate`](NFTAccessTemplate.md)\> +`Promise`\<[`NFTAccessTemplate`](NFTAccessTemplate.md)\> #### Overrides @@ -1405,13 +1544,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFTAccessTemplate.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTAccessTemplate.ts#L21) +[src/keeper/contracts/templates/NFTAccessTemplate.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTAccessTemplate.ts#L28) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1436,4 +1575,4 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFTAttributes.md b/docs/api-reference/classes/NFTAttributes.md index f6cec2c7b..d1a249ddb 100644 --- a/docs/api-reference/classes/NFTAttributes.md +++ b/docs/api-reference/classes/NFTAttributes.md @@ -23,6 +23,7 @@ - [fulfillAccessTimelock](NFTAttributes.md#fulfillaccesstimelock) - [fulfillAccessTimeout](NFTAttributes.md#fulfillaccesstimeout) - [metadata](NFTAttributes.md#metadata) +- [nft](NFTAttributes.md#nft) - [nftContractAddress](NFTAttributes.md#nftcontractaddress) - [nftMetadataUrl](NFTAttributes.md#nftmetadataurl) - [nftType](NFTAttributes.md#nfttype) @@ -31,7 +32,6 @@ - [providers](NFTAttributes.md#providers) - [royaltyAttributes](NFTAttributes.md#royaltyattributes) - [services](NFTAttributes.md#services) -- [DEFAULT_ENCRYPTION_METHOD](NFTAttributes.md#default_encryption_method) - [defaultValues](NFTAttributes.md#defaultvalues) ### Methods @@ -48,7 +48,11 @@ ### constructor -• **new NFTAttributes**() +• **new NFTAttributes**(): [`NFTAttributes`](NFTAttributes.md) + +#### Returns + +[`NFTAttributes`](NFTAttributes.md) #### Inherited from @@ -69,7 +73,7 @@ That asset association typically helps to search and filter between assets part #### Defined in -[src/models/AssetAttributes.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L47) +[src/models/AssetAttributes.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L48) --- @@ -81,7 +85,7 @@ Max number of nfts that can be minted, 0 means uncapped #### Defined in -[src/models/NFTAttributes.ts:87](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L87) +[src/models/NFTAttributes.ts:213](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L213) --- @@ -102,7 +106,7 @@ This method allows to specify the encryption method to be used. #### Defined in -[src/models/AssetAttributes.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L20) +[src/models/AssetAttributes.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L21) --- @@ -119,7 +123,7 @@ The type of ERC used (721 or 1155) #### Defined in -[src/models/NFTAttributes.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L55) +[src/models/NFTAttributes.ts:176](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L176) --- @@ -140,7 +144,7 @@ This would allow to create an agreement that can not fulfilled until certain per #### Defined in -[src/models/AssetAttributes.ts:67](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L67) +[src/models/AssetAttributes.ts:68](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L68) --- @@ -161,7 +165,7 @@ This would allow to create an agreement that is not fulfilled after a certain pe #### Defined in -[src/models/AssetAttributes.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L57) +[src/models/AssetAttributes.ts:58](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L58) --- @@ -181,7 +185,19 @@ Metadata describing the asset #### Defined in -[src/models/AssetAttributes.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L13) +[src/models/AssetAttributes.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L14) + +--- + +### nft + +• `Optional` **nft**: [`NFTServiceAttributes`](NFTServiceAttributes.md) + +Attributes related with the NFT service (access or sales) + +#### Defined in + +[src/models/NFTAttributes.ts:193](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L193) --- @@ -193,7 +209,7 @@ The address of the deployed NFT Contract #### Defined in -[src/models/NFTAttributes.ts:67](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L67) +[src/models/NFTAttributes.ts:188](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L188) --- @@ -205,7 +221,7 @@ URL to the metadata definition of the NFT contract #### Defined in -[src/models/NFTAttributes.ts:82](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L82) +[src/models/NFTAttributes.ts:208](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L208) --- @@ -219,7 +235,7 @@ This attribute allow to specify between the different Nevermined NFT types #### Defined in -[src/models/NFTAttributes.ts:62](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L62) +[src/models/NFTAttributes.ts:183](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L183) --- @@ -231,7 +247,7 @@ If the asset is pre-minted #### Defined in -[src/models/NFTAttributes.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L77) +[src/models/NFTAttributes.ts:203](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L203) --- @@ -251,7 +267,7 @@ List of additional asset services to be included as part of an asset #### Defined in -[src/models/AssetAttributes.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L32) +[src/models/AssetAttributes.ts:33](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L33) --- @@ -271,7 +287,7 @@ Typically just the address of one Nevermined Node trusted by the user. #### Defined in -[src/models/AssetAttributes.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L41) +[src/models/AssetAttributes.ts:42](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L42) --- @@ -283,7 +299,7 @@ Attributes describing the royalties attached to the NFT in the secondary market #### Defined in -[src/models/NFTAttributes.ts:72](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L72) +[src/models/NFTAttributes.ts:198](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L198) --- @@ -303,21 +319,7 @@ List of services and their attributes offered by an asset. #### Defined in -[src/models/AssetAttributes.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L26) - ---- - -### DEFAULT_ENCRYPTION_METHOD - -▪ `Static` **DEFAULT_ENCRYPTION_METHOD**: [`EncryptionMethod`](../code-reference.md#encryptionmethod) - -#### Inherited from - -[AssetAttributes](AssetAttributes.md).[DEFAULT_ENCRYPTION_METHOD](AssetAttributes.md#default_encryption_method) - -#### Defined in - -[src/models/AssetAttributes.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/AssetAttributes.ts#L7) +[src/models/AssetAttributes.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/AssetAttributes.ts#L27) --- @@ -327,26 +329,29 @@ List of services and their attributes offered by an asset. #### Type declaration -| Name | Type | -| :------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `appId` | `string` | -| `cap` | `bigint` | -| `encryptionMethod` | [`EncryptionMethod`](../code-reference.md#encryptionmethod) | -| `fulfillAccessTimelock` | `number` | -| `fulfillAccessTimeout` | `number` | -| `nft` | { `amount`: `bigint` ; `duration`: `number` = 0; `isSubscription`: `boolean` = false; `nftTransfer`: `boolean` = true; `serviceType`: [`ServiceType`](../code-reference.md#servicetype) ; `tokenId`: `string` = '' } | -| `nft.amount` | `bigint` | -| `nft.duration` | `number` | -| `nft.isSubscription` | `boolean` | -| `nft.nftTransfer` | `boolean` | -| `nft.serviceType` | [`ServiceType`](../code-reference.md#servicetype) | -| `nft.tokenId` | `string` | -| `nftMetadataUrl` | `string` | -| `preMint` | `boolean` | -| `predefinedAssetServices` | [`ServiceCommon`](../interfaces/ServiceCommon.md)[] | -| `providers` | `any`[] | -| `royaltyAttributes` | `any` | -| `services` | { `price`: [`AssetPrice`](AssetPrice.md) ; `serviceType`: [`ServiceType`](../code-reference.md#servicetype) }[] | +| Name | Type | +| :------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `appId` | `string` | +| `cap` | `bigint` | +| `encryptionMethod` | [`EncryptionMethod`](../code-reference.md#encryptionmethod) | +| `fulfillAccessTimelock` | `number` | +| `fulfillAccessTimeout` | `number` | +| `nft` | \{ `amount`: `bigint` ; `duration`: `number` = 0; `isSubscription`: `boolean` = false; `maxCreditsToCharge`: `bigint` ; `minCreditsRequired`: `bigint` ; `minCreditsToCharge`: `bigint` ; `nftTransfer`: `boolean` = true; `serviceType`: [`ServiceType`](../code-reference.md#servicetype) ; `tokenId`: `string` = '' } | +| `nft.amount` | `bigint` | +| `nft.duration` | `number` | +| `nft.isSubscription` | `boolean` | +| `nft.maxCreditsToCharge` | `bigint` | +| `nft.minCreditsRequired` | `bigint` | +| `nft.minCreditsToCharge` | `bigint` | +| `nft.nftTransfer` | `boolean` | +| `nft.serviceType` | [`ServiceType`](../code-reference.md#servicetype) | +| `nft.tokenId` | `string` | +| `nftMetadataUrl` | `string` | +| `preMint` | `boolean` | +| `predefinedAssetServices` | [`ServiceCommon`](../interfaces/ServiceCommon.md)[] | +| `providers` | `never`[] | +| `royaltyAttributes` | `undefined` | +| `services` | \{ `price`: [`AssetPrice`](AssetPrice.md) ; `serviceType`: [`ServiceType`](../code-reference.md#servicetype) }[] | #### Overrides @@ -354,43 +359,43 @@ List of services and their attributes offered by an asset. #### Defined in -[src/models/NFTAttributes.ts:89](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L89) +[src/models/NFTAttributes.ts:215](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L215) ## Methods ### getCreditsSubscriptionInstance -▸ `Static` **getCreditsSubscriptionInstance**(`nftAttributes`): `Required`<[`NFTAttributes`](NFTAttributes.md)\> +▸ **getCreditsSubscriptionInstance**(`nftAttributes`): `Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Parameters -| Name | Type | -| :-------------- | :---------------------------------------------- | -| `nftAttributes` | `Partial`<[`NFTAttributes`](NFTAttributes.md)\> | +| Name | Type | +| :-------------- | :----------------------------------------------- | +| `nftAttributes` | `Partial`\<[`NFTAttributes`](NFTAttributes.md)\> | #### Returns -`Required`<[`NFTAttributes`](NFTAttributes.md)\> +`Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Defined in -[src/models/NFTAttributes.ts:116](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L116) +[src/models/NFTAttributes.ts:246](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L246) --- ### getInstance -▸ `Static` **getInstance**(`nftAttributes`): `Required`<[`NFTAttributes`](NFTAttributes.md)\> +▸ **getInstance**(`nftAttributes`): `Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Parameters -| Name | Type | -| :-------------- | :---------------------------------- | -| `nftAttributes` | [`NFTAttributes`](NFTAttributes.md) | +| Name | Type | +| :-------------- | :----------------------------------------------- | +| `nftAttributes` | `Partial`\<[`NFTAttributes`](NFTAttributes.md)\> | #### Returns -`Required`<[`NFTAttributes`](NFTAttributes.md)\> +`Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Overrides @@ -398,104 +403,104 @@ List of services and their attributes offered by an asset. #### Defined in -[src/models/NFTAttributes.ts:98](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L98) +[src/models/NFTAttributes.ts:224](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L224) --- ### getNFT1155Instance -▸ `Static` **getNFT1155Instance**(`nftAttributes`): `Required`<[`NFTAttributes`](NFTAttributes.md)\> +▸ **getNFT1155Instance**(`nftAttributes`): `Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Parameters -| Name | Type | -| :-------------- | :---------------------------------------------- | -| `nftAttributes` | `Partial`<[`NFTAttributes`](NFTAttributes.md)\> | +| Name | Type | +| :-------------- | :----------------------------------------------- | +| `nftAttributes` | `Partial`\<[`NFTAttributes`](NFTAttributes.md)\> | #### Returns -`Required`<[`NFTAttributes`](NFTAttributes.md)\> +`Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Defined in -[src/models/NFTAttributes.ts:105](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L105) +[src/models/NFTAttributes.ts:235](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L235) --- ### getNFT721Instance -▸ `Static` **getNFT721Instance**(`nftAttributes`): `Required`<[`NFTAttributes`](NFTAttributes.md)\> +▸ **getNFT721Instance**(`nftAttributes`): `Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Parameters -| Name | Type | -| :-------------- | :---------------------------------------------- | -| `nftAttributes` | `Partial`<[`NFTAttributes`](NFTAttributes.md)\> | +| Name | Type | +| :-------------- | :----------------------------------------------- | +| `nftAttributes` | `Partial`\<[`NFTAttributes`](NFTAttributes.md)\> | #### Returns -`Required`<[`NFTAttributes`](NFTAttributes.md)\> +`Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Defined in -[src/models/NFTAttributes.ts:134](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L134) +[src/models/NFTAttributes.ts:263](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L263) --- ### getPOAPInstance -▸ `Static` **getPOAPInstance**(`nftAttributes`): `Required`<[`NFTAttributes`](NFTAttributes.md)\> +▸ **getPOAPInstance**(`nftAttributes`): `Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Parameters -| Name | Type | -| :-------------- | :---------------------------------------------- | -| `nftAttributes` | `Partial`<[`NFTAttributes`](NFTAttributes.md)\> | +| Name | Type | +| :-------------- | :----------------------------------------------- | +| `nftAttributes` | `Partial`\<[`NFTAttributes`](NFTAttributes.md)\> | #### Returns -`Required`<[`NFTAttributes`](NFTAttributes.md)\> +`Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Defined in -[src/models/NFTAttributes.ts:161](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L161) +[src/models/NFTAttributes.ts:289](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L289) --- ### getSoulBoundInstance -▸ `Static` **getSoulBoundInstance**(`nftAttributes`): `Required`<[`NFTAttributes`](NFTAttributes.md)\> +▸ **getSoulBoundInstance**(`nftAttributes`): `Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Parameters -| Name | Type | -| :-------------- | :---------------------------------------------- | -| `nftAttributes` | `Partial`<[`NFTAttributes`](NFTAttributes.md)\> | +| Name | Type | +| :-------------- | :----------------------------------------------- | +| `nftAttributes` | `Partial`\<[`NFTAttributes`](NFTAttributes.md)\> | #### Returns -`Required`<[`NFTAttributes`](NFTAttributes.md)\> +`Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Defined in -[src/models/NFTAttributes.ts:173](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L173) +[src/models/NFTAttributes.ts:301](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L301) --- ### getSubscriptionInstance -▸ `Static` **getSubscriptionInstance**(`nftAttributes`): `Required`<[`NFTAttributes`](NFTAttributes.md)\> +▸ **getSubscriptionInstance**(`nftAttributes`): `Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Parameters -| Name | Type | -| :-------------- | :---------------------------------------------- | -| `nftAttributes` | `Partial`<[`NFTAttributes`](NFTAttributes.md)\> | +| Name | Type | +| :-------------- | :----------------------------------------------- | +| `nftAttributes` | `Partial`\<[`NFTAttributes`](NFTAttributes.md)\> | #### Returns -`Required`<[`NFTAttributes`](NFTAttributes.md)\> +`Required`\<[`NFTAttributes`](NFTAttributes.md)\> #### Defined in -[src/models/NFTAttributes.ts:145](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L145) +[src/models/NFTAttributes.ts:274](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L274) diff --git a/docs/api-reference/classes/NFTContractsBase.md b/docs/api-reference/classes/NFTContractsBase.md index 786901e86..51ba324fb 100644 --- a/docs/api-reference/classes/NFTContractsBase.md +++ b/docs/api-reference/classes/NFTContractsBase.md @@ -8,10 +8,10 @@ ↳ **`NFTContractsBase`** - ↳↳ [`Nft721Contract`](Nft721Contract.md) - ↳↳ [`Nft1155Contract`](Nft1155Contract.md) + ↳↳ [`Nft721Contract`](Nft721Contract.md) + ## Table of contents ### Constructors @@ -30,22 +30,22 @@ - [artifactsFolder](NFTContractsBase.md#artifactsfolder) - [circuitsFolder](NFTContractsBase.md#circuitsfolder) +- [client](NFTContractsBase.md#client) - [config](NFTContractsBase.md#config) - [instanceConfig](NFTContractsBase.md#instanceconfig) - [instantiableConfig](NFTContractsBase.md#instantiableconfig) - [logger](NFTContractsBase.md#logger) - [nevermined](NFTContractsBase.md#nevermined) -- [web3](NFTContractsBase.md#web3) +- [publicClient](NFTContractsBase.md#publicclient) +- [walletClient](NFTContractsBase.md#walletclient) ### Methods - [\_createClone](NFTContractsBase.md#_createclone) - [call](NFTContractsBase.md#call) - [getFromAddress](NFTContractsBase.md#getfromaddress) -- [getInputsOfMethod](NFTContractsBase.md#getinputsofmethod) -- [getMintedEntries](NFTContractsBase.md#getmintedentries) - [getNFTAttributes](NFTContractsBase.md#getnftattributes) -- [getSignatureOfMethod](NFTContractsBase.md#getsignatureofmethod) +- [getTransactionLogs](NFTContractsBase.md#gettransactionlogs) - [grantOperatorRole](NFTContractsBase.md#grantoperatorrole) - [init](NFTContractsBase.md#init) - [isOperator](NFTContractsBase.md#isoperator) @@ -54,6 +54,7 @@ - [send](NFTContractsBase.md#send) - [sendFrom](NFTContractsBase.md#sendfrom) - [setInstanceConfig](NFTContractsBase.md#setinstanceconfig) +- [someLog](NFTContractsBase.md#somelog) - [getInstance](NFTContractsBase.md#getinstance) - [setInstanceConfig](NFTContractsBase.md#setinstanceconfig-1) @@ -61,7 +62,7 @@ ### constructor -• **new NFTContractsBase**(`contractName`) +• **new NFTContractsBase**(`contractName`): [`NFTContractsBase`](NFTContractsBase.md) #### Parameters @@ -69,19 +70,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`NFTContractsBase`](NFTContractsBase.md) + #### Inherited from [ContractBase](ContractBase.md).[constructor](ContractBase.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -89,13 +94,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -103,7 +108,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -117,13 +122,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -131,7 +136,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -145,17 +150,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -163,17 +168,17 @@ ContractBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -181,13 +186,31 @@ ContractBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ContractBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -199,13 +222,13 @@ ContractBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -217,17 +240,17 @@ ContractBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -235,13 +258,13 @@ ContractBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -253,13 +276,13 @@ ContractBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -271,31 +294,146 @@ ContractBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ContractBase.web3 +ContractBase.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ContractBase.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### \_createClone -▸ `Protected` **\_createClone**(`ercType`, `name`, `symbol`, `uri`, `cap`, `operators?`, `from?`, `txParams?`): `Promise`<`any`\> +▸ **\_createClone**(`ercType`, `name`, `symbol`, `uri`, `cap`, `operators?`, `from`, `txParams?`): `Promise`\<`any`\> Creates a contract clone of an existing contract instance @@ -307,26 +445,26 @@ Creates a contract clone of an existing contract instance | `name` | `string` | `undefined` | NFT Contract name | | `symbol` | `string` | `undefined` | NFT Contract symbol | | `uri` | `string` | `undefined` | NFT Contract metadata uri | -| `cap` | `bigint` | `undefined` | NFT cap (just for ERC-721) | +| `cap` | `undefined` \| `bigint` | `undefined` | NFT cap (just for ERC-721) | | `operators` | `string`[] | `[]` | Array of account addresses to be added as NFT operators | -| `from?` | [`Account`](Account.md) | `undefined` | Sender account | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | - | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L34) +[src/keeper/contracts/NFTContractsBase.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L41) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -336,15 +474,15 @@ Contract Receipt #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -352,13 +490,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -368,7 +506,7 @@ Contract Receipt #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -376,62 +514,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ContractBase](ContractBase.md).[getInputsOfMethod](ContractBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getMintedEntries - -▸ **getMintedEntries**(`owner`, `did?`): `Promise`<[`MintedEntry`](../interfaces/MintedEntry.md)[]\> - -It gets all the `MintedEntries` events from the NFT Contract - -#### Parameters - -| Name | Type | Description | -| :------ | :------- | :---------------------- | -| `owner` | `string` | the user owning the NFT | -| `did?` | `string` | the tokenId of the NFT | - -#### Returns - -`Promise`<[`MintedEntry`](../interfaces/MintedEntry.md)[]\> - -An array of `MintedEntry` objects - -#### Defined in - -[src/keeper/contracts/NFTContractsBase.ts:125](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L125) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getNFTAttributes -▸ **getNFTAttributes**(`did`): `Promise`<{ `mintCap`: `bigint` ; `nftInitialized`: `boolean` ; `nftSupply`: `bigint` ; `nftURI`: `string` }\> +▸ **getNFTAttributes**(`did`): `Promise`\<\{ `mintCap`: `bigint` ; `nftInitialized`: `boolean` ; `nftSupply`: `bigint` ; `nftURI`: `string` }\> #### Parameters @@ -441,42 +530,42 @@ An array of `MintedEntry` objects #### Returns -`Promise`<{ `mintCap`: `bigint` ; `nftInitialized`: `boolean` ; `nftSupply`: `bigint` ; `nftURI`: `string` }\> +`Promise`\<\{ `mintCap`: `bigint` ; `nftInitialized`: `boolean` ; `nftSupply`: `bigint` ; `nftURI`: `string` }\> #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:82](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L82) +[src/keeper/contracts/NFTContractsBase.ts:97](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L97) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ContractBase](ContractBase.md).[getSignatureOfMethod](ContractBase.md#getsignatureofmethod) +[ContractBase](ContractBase.md).[getTransactionLogs](ContractBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### grantOperatorRole -▸ **grantOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **grantOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Add an address as operator in the NFT Contract @@ -485,35 +574,36 @@ Add an address as operator in the NFT Contract | Name | Type | Description | | :---------------- | :---------------------------------------------- | :----------------- | | `operatorAddress` | `string` | New minter address | -| `from?` | [`Account`](Account.md) | Sender account | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:69](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L69) +[src/keeper/contracts/NFTContractsBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L84) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -521,13 +611,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### isOperator -▸ **isOperator**(`address`): `Promise`<`boolean`\> +▸ **isOperator**(`address`): `Promise`\<`boolean`\> Checks if an account is an operator in the NFT contract @@ -539,37 +629,37 @@ Checks if an account is an operator in the NFT contract #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if is an operator #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L78) +[src/keeper/contracts/NFTContractsBase.ts:93](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L93) --- ### owner -▸ **owner**(): `Promise`<`string`\> +▸ **owner**(): `Promise`\<`string`\> Gets the contract owner #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> Address of the contract owner #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L19) +[src/keeper/contracts/NFTContractsBase.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L26) --- ### revokeOperatorRole -▸ **revokeOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **revokeOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Revoke an address as operator in the NFT Contract @@ -578,37 +668,37 @@ Revoke an address as operator in the NFT Contract | Name | Type | Description | | :---------------- | :---------------------------------------------- | :----------------------- | | `operatorAddress` | `string` | Minter address to revoke | -| `from?` | [`Account`](Account.md) | Sender account | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L115) +[src/keeper/contracts/NFTContractsBase.ts:130](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L130) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -616,26 +706,26 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -643,13 +733,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -667,13 +757,37 @@ Contract Receipt #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[ContractBase](ContractBase.md).[someLog](ContractBase.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -691,13 +805,13 @@ Contract Receipt #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -722,4 +836,4 @@ Contract Receipt #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFTError.md b/docs/api-reference/classes/NFTError.md index 023f30b11..2ea9e66cf 100644 --- a/docs/api-reference/classes/NFTError.md +++ b/docs/api-reference/classes/NFTError.md @@ -8,6 +8,10 @@ ↳ **`NFTError`** + ↳↳ [`DynamicCreditsOverLimit`](DynamicCreditsOverLimit.md) + + ↳↳ [`DynamicCreditsUnderLimit`](DynamicCreditsUnderLimit.md) + ## Table of contents ### Constructors @@ -16,6 +20,7 @@ ### Properties +- [cause](NFTError.md#cause) - [message](NFTError.md#message) - [name](NFTError.md#name) - [stack](NFTError.md#stack) @@ -30,7 +35,7 @@ ### constructor -• **new NFTError**(`message`) +• **new NFTError**(`message`): [`NFTError`](NFTError.md) #### Parameters @@ -38,16 +43,34 @@ | :-------- | :------- | | `message` | `string` | +#### Returns + +[`NFTError`](NFTError.md) + #### Overrides Error.constructor #### Defined in -[src/errors/NFTError.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/errors/NFTError.ts#L2) +[src/errors/NeverminedErrors.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L38) ## Properties +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +Error.cause + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + ### message • **message**: `string` @@ -58,7 +81,7 @@ Error.message #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1068 +node_modules/typescript/lib/lib.es5.d.ts:1077 --- @@ -72,7 +95,7 @@ Error.name #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1067 +node_modules/typescript/lib/lib.es5.d.ts:1076 --- @@ -86,7 +109,7 @@ Error.stack #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1069 +node_modules/typescript/lib/lib.es5.d.ts:1078 --- @@ -94,12 +117,16 @@ node_modules/typescript/lib/lib.es5.d.ts:1069 ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Type declaration ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -111,17 +138,13 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from Error.prepareStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:11 +node_modules/@types/node/globals.d.ts:28 --- @@ -135,13 +158,13 @@ Error.stackTraceLimit #### Defined in -node_modules/@types/node/globals.d.ts:13 +node_modules/@types/node/globals.d.ts:30 ## Methods ### captureStackTrace -▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object @@ -162,4 +185,4 @@ Error.captureStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:4 +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/NFTHolderCondition.md b/docs/api-reference/classes/NFTHolderCondition.md index 3f6787078..3906360e1 100644 --- a/docs/api-reference/classes/NFTHolderCondition.md +++ b/docs/api-reference/classes/NFTHolderCondition.md @@ -6,7 +6,7 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi ## Hierarchy -- [`ConsumerCondition`](ConsumerCondition.md)<`NFTHolderConditionContext`\> +- `ConsumerCondition`\<`NFTHolderConditionContext`\> ↳ **`NFTHolderCondition`** @@ -28,12 +28,14 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi - [artifactsFolder](NFTHolderCondition.md#artifactsfolder) - [circuitsFolder](NFTHolderCondition.md#circuitsfolder) +- [client](NFTHolderCondition.md#client) - [config](NFTHolderCondition.md#config) - [instanceConfig](NFTHolderCondition.md#instanceconfig) - [instantiableConfig](NFTHolderCondition.md#instantiableconfig) - [logger](NFTHolderCondition.md#logger) - [nevermined](NFTHolderCondition.md#nevermined) -- [web3](NFTHolderCondition.md#web3) +- [publicClient](NFTHolderCondition.md#publicclient) +- [walletClient](NFTHolderCondition.md#walletclient) ### Methods @@ -49,8 +51,7 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi - [generateIdWithSeed](NFTHolderCondition.md#generateidwithseed) - [getConditionFulfilledEvent](NFTHolderCondition.md#getconditionfulfilledevent) - [getFromAddress](NFTHolderCondition.md#getfromaddress) -- [getInputsOfMethod](NFTHolderCondition.md#getinputsofmethod) -- [getSignatureOfMethod](NFTHolderCondition.md#getsignatureofmethod) +- [getTransactionLogs](NFTHolderCondition.md#gettransactionlogs) - [hashValues](NFTHolderCondition.md#hashvalues) - [hashValuesPlain](NFTHolderCondition.md#hashvaluesplain) - [init](NFTHolderCondition.md#init) @@ -62,6 +63,7 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi - [send](NFTHolderCondition.md#send) - [sendFrom](NFTHolderCondition.md#sendfrom) - [setInstanceConfig](NFTHolderCondition.md#setinstanceconfig) +- [someLog](NFTHolderCondition.md#somelog) - [getInstance](NFTHolderCondition.md#getinstance) - [setInstanceConfig](NFTHolderCondition.md#setinstanceconfig-1) @@ -69,7 +71,7 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi ### constructor -• **new NFTHolderCondition**(`contractName`) +• **new NFTHolderCondition**(`contractName`): [`NFTHolderCondition`](NFTHolderCondition.md) #### Parameters @@ -77,41 +79,45 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`NFTHolderCondition`](NFTHolderCondition.md) + #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[constructor](ConsumerCondition.md#constructor) +ConsumerCondition\.constructor #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[address](ConsumerCondition.md#address) +ConsumerCondition.address #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[contract](ConsumerCondition.md#contract) +ConsumerCondition.contract #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -121,25 +127,25 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[contractName](ConsumerCondition.md#contractname) +ConsumerCondition.contractName #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[events](ConsumerCondition.md#events) +ConsumerCondition.events #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -149,21 +155,21 @@ Allows to fulfill a condition to users holding some amount of NFTs for a specifi #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[version](ConsumerCondition.md#version) +ConsumerCondition.version #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -171,17 +177,17 @@ ConsumerCondition.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -189,13 +195,31 @@ ConsumerCondition.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ConsumerCondition.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -207,13 +231,13 @@ ConsumerCondition.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -225,17 +249,17 @@ ConsumerCondition.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -243,13 +267,13 @@ ConsumerCondition.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -261,13 +285,13 @@ ConsumerCondition.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -279,51 +303,166 @@ ConsumerCondition.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ConsumerCondition.web3 +ConsumerCondition.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ConsumerCondition.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### abortByTimeOut -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **abortByTimeOut**(`conditionId`, `from`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :------------ | :---------------------------------------------- | | `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[abortByTimeOut](ConsumerCondition.md#abortbytimeout) +ConsumerCondition.abortByTimeOut #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) +[src/keeper/contracts/conditions/Condition.abstract.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L75) --- @@ -343,13 +482,13 @@ ConsumerCondition.web3 #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts#L39) +[src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts#L44) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -359,29 +498,29 @@ ConsumerCondition.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[call](ConsumerCondition.md#call) +ConsumerCondition.call #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### fulfill -▸ **fulfill**(`agreementId`, `did`, `holderAddress`, `amount`, `nftContractAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfill**(`agreementId`, `did`, `holderAddress`, `amount`, `nftContractAddress`, `from`, `txParams?`): `Promise`\<`any`\> Fulfill requires a validation that holder as enough NFTs for a specific DID. @@ -394,56 +533,56 @@ Fulfill requires a validation that holder as enough NFTs for a specific DID. | `holderAddress` | `string` | The contract address where the reward is locked. | | `amount` | `bigint` | The amount of NFT to be hold | | `nftContractAddress` | `string` | Address of the nft contract | -| `from?` | [`Account`](Account.md) | Account sending the transaction | +| `from` | [`NvmAccount`](NvmAccount.md) | Account sending the transaction | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transacion parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> condition state #### Overrides -[ConsumerCondition](ConsumerCondition.md).[fulfill](ConsumerCondition.md#fulfill) +ConsumerCondition.fulfill #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts#L74) +[src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts#L79) --- ### fulfillInstance -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillInstance**(`cond`, `additionalParams`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | +| Name | Type | Default value | +| :----------------- | :-------------------------------------------------------- | :------------ | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | `undefined` | +| `additionalParams` | `Record`\<`string`, `unknown`\> | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | +| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[fulfillInstance](ConsumerCondition.md#fulfillinstance) +ConsumerCondition.fulfillInstance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) +[src/keeper/contracts/conditions/Condition.abstract.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L139) --- ### fulfillPlain -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillPlain**(`agreementId`, `args`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters @@ -451,54 +590,54 @@ condition state | :------------ | :-------------------------------------------------------- | :------------ | | `agreementId` | `string` | `undefined` | | `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | | `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[fulfillPlain](ConsumerCondition.md#fulfillplain) +ConsumerCondition.fulfillPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) +[src/keeper/contracts/conditions/Condition.abstract.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L47) --- ### fulfillWithNode -▸ **fulfillWithNode**(`_cond`, `_additionalParams`, `_from?`, `_txParams?`): `Promise`<`void`\> +▸ **fulfillWithNode**(`_cond`, `_additionalParams`, `_from`, `_txParams?`): `Promise`\<`void`\> #### Parameters -| Name | Type | -| :------------------ | :----------------------------------------------------------------------------------------- | -| `_cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `_additionalParams` | `Record`<`string`, `unknown`\> | -| `_from?` | [`Account`](Account.md) | -| `_txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------------ | :----------------------------------------------------- | +| `_cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | +| `_additionalParams` | `Record`\<`string`, `unknown`\> | +| `_from` | [`NvmAccount`](NvmAccount.md) | +| `_txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[fulfillWithNode](ConsumerCondition.md#fulfillwithnode) +ConsumerCondition.fulfillWithNode #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:217](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L217) +[src/keeper/contracts/conditions/Condition.abstract.ts:209](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L209) --- ### generateId -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> +▸ **generateId**(`agreementId`, `valueHash`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -509,21 +648,21 @@ condition state #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[generateId](ConsumerCondition.md#generateid) +ConsumerCondition.generateId #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) +[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L61) --- ### generateIdHash -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> +▸ **generateIdHash**(`agreementId`, `...values`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -534,21 +673,21 @@ condition state #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[generateIdHash](ConsumerCondition.md#generateidhash) +ConsumerCondition.generateIdHash #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) +[src/keeper/contracts/conditions/Condition.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L57) --- ### generateIdWithSeed -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> +▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`\<[`string`, `string`]\> #### Parameters @@ -559,15 +698,15 @@ condition state #### Returns -`Promise`<[`string`, `string`]\> +`Promise`\<[`string`, `string`]\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[generateIdWithSeed](ConsumerCondition.md#generateidwithseed) +ConsumerCondition.generateIdWithSeed #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) +[src/keeper/contracts/conditions/Condition.abstract.ts:65](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L65) --- @@ -587,17 +726,17 @@ condition state #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[getConditionFulfilledEvent](ConsumerCondition.md#getconditionfulfilledevent) +ConsumerCondition.getConditionFulfilledEvent #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) +[src/keeper/contracts/conditions/Condition.abstract.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L79) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -607,70 +746,46 @@ condition state #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[getFromAddress](ConsumerCondition.md#getfromaddress) +ConsumerCondition.getFromAddress #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getInputsOfMethod +### getTransactionLogs -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -readonly `ParamType`[] +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[getInputsOfMethod](ConsumerCondition.md#getinputsofmethod) +ConsumerCondition.getTransactionLogs #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[ConsumerCondition](ConsumerCondition.md).[getSignatureOfMethod](ConsumerCondition.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### hashValues -▸ **hashValues**(`...args`): `Promise`<`string`\> +▸ **hashValues**(`...args`): `Promise`\<`string`\> #### Parameters @@ -680,21 +795,21 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[hashValues](ConsumerCondition.md#hashvalues) +ConsumerCondition.hashValues #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) +[src/keeper/contracts/conditions/Condition.abstract.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L116) --- ### hashValuesPlain -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> +▸ **hashValuesPlain**(`...args`): `Promise`\<`string`\> #### Parameters @@ -704,71 +819,72 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[hashValuesPlain](ConsumerCondition.md#hashvaluesplain) +ConsumerCondition.hashValuesPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) +[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L122) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[init](ConsumerCondition.md#init) +ConsumerCondition.init #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instance -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instance**(`agreementId`, `params`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | +| Name | Type | +| :------------ | :------------------------------------------------------- | +| `agreementId` | `string` | +| `params` | `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> | #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[instance](ConsumerCondition.md#instance) +ConsumerCondition.instance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) +[src/keeper/contracts/conditions/Condition.abstract.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L163) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -780,15 +896,15 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[instanceFromDDO](ConsumerCondition.md#instancefromddo) +ConsumerCondition.instanceFromDDO #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) +[src/keeper/contracts/conditions/Condition.abstract.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L131) --- @@ -808,13 +924,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts:45](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts#L45) +[src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts:50](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts#L50) --- ### params -▸ **params**(`did`, `holderAddress`, `amount`, `nftContractAddress?`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +▸ **params**(`did`, `holderAddress`, `amount`, `nftContractAddress?`): `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> Generate the hash of condition inputs with the following parameters. @@ -829,23 +945,23 @@ Generate the hash of condition inputs with the following parameters. #### Returns -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +`ConditionParameters`\<`Record`\<`string`, `unknown`\>\> hash of all the values #### Overrides -[ConsumerCondition](ConsumerCondition.md).[params](ConsumerCondition.md#params) +ConsumerCondition.params #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts#L30) +[src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts#L35) --- ### paramsFromDDO -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +▸ **paramsFromDDO**(`«destructured»`): `Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -855,75 +971,75 @@ hash of all the values #### Returns -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Overrides -[ConsumerCondition](ConsumerCondition.md).[paramsFromDDO](ConsumerCondition.md#paramsfromddo) +ConsumerCondition.paramsFromDDO #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts:52](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts#L52) +[src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts#L57) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[send](ConsumerCondition.md#send) +ConsumerCondition.send #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[sendFrom](ConsumerCondition.md#sendfrom) +ConsumerCondition.sendFrom #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -937,17 +1053,41 @@ hash of all the values #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[setInstanceConfig](ConsumerCondition.md#setinstanceconfig) +ConsumerCondition.setInstanceConfig + +#### Defined in + +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +ConsumerCondition.someLog #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`NFTHolderCondition`](NFTHolderCondition.md)\> +▸ **getInstance**(`config`): `Promise`\<[`NFTHolderCondition`](NFTHolderCondition.md)\> #### Parameters @@ -957,21 +1097,21 @@ hash of all the values #### Returns -`Promise`<[`NFTHolderCondition`](NFTHolderCondition.md)\> +`Promise`\<[`NFTHolderCondition`](NFTHolderCondition.md)\> #### Overrides -[ConsumerCondition](ConsumerCondition.md).[getInstance](ConsumerCondition.md#getinstance) +ConsumerCondition.getInstance #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts#L17) +[src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTHolderCondition.ts#L22) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -992,8 +1132,8 @@ hash of all the values #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[setInstanceConfig](ConsumerCondition.md#setinstanceconfig-1) +ConsumerCondition.setInstanceConfig #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFTLockCondition.md b/docs/api-reference/classes/NFTLockCondition.md index 33cbefca7..6abb77eed 100644 --- a/docs/api-reference/classes/NFTLockCondition.md +++ b/docs/api-reference/classes/NFTLockCondition.md @@ -6,7 +6,7 @@ Implementation of the NFT Lock Condition ## Hierarchy -- [`ConsumerCondition`](ConsumerCondition.md)<`NFTLockConditionContext`\> +- `ConsumerCondition`\<`NFTLockConditionContext`\> ↳ **`NFTLockCondition`** @@ -28,12 +28,14 @@ Implementation of the NFT Lock Condition - [artifactsFolder](NFTLockCondition.md#artifactsfolder) - [circuitsFolder](NFTLockCondition.md#circuitsfolder) +- [client](NFTLockCondition.md#client) - [config](NFTLockCondition.md#config) - [instanceConfig](NFTLockCondition.md#instanceconfig) - [instantiableConfig](NFTLockCondition.md#instantiableconfig) - [logger](NFTLockCondition.md#logger) - [nevermined](NFTLockCondition.md#nevermined) -- [web3](NFTLockCondition.md#web3) +- [publicClient](NFTLockCondition.md#publicclient) +- [walletClient](NFTLockCondition.md#walletclient) ### Methods @@ -48,8 +50,7 @@ Implementation of the NFT Lock Condition - [generateIdWithSeed](NFTLockCondition.md#generateidwithseed) - [getConditionFulfilledEvent](NFTLockCondition.md#getconditionfulfilledevent) - [getFromAddress](NFTLockCondition.md#getfromaddress) -- [getInputsOfMethod](NFTLockCondition.md#getinputsofmethod) -- [getSignatureOfMethod](NFTLockCondition.md#getsignatureofmethod) +- [getTransactionLogs](NFTLockCondition.md#gettransactionlogs) - [hashValues](NFTLockCondition.md#hashvalues) - [hashValuesPlain](NFTLockCondition.md#hashvaluesplain) - [init](NFTLockCondition.md#init) @@ -60,6 +61,7 @@ Implementation of the NFT Lock Condition - [send](NFTLockCondition.md#send) - [sendFrom](NFTLockCondition.md#sendfrom) - [setInstanceConfig](NFTLockCondition.md#setinstanceconfig) +- [someLog](NFTLockCondition.md#somelog) - [getInstance](NFTLockCondition.md#getinstance) - [setInstanceConfig](NFTLockCondition.md#setinstanceconfig-1) @@ -67,7 +69,7 @@ Implementation of the NFT Lock Condition ### constructor -• **new NFTLockCondition**(`contractName`) +• **new NFTLockCondition**(`contractName`): [`NFTLockCondition`](NFTLockCondition.md) #### Parameters @@ -75,41 +77,45 @@ Implementation of the NFT Lock Condition | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`NFTLockCondition`](NFTLockCondition.md) + #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[constructor](ConsumerCondition.md#constructor) +ConsumerCondition\.constructor #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[address](ConsumerCondition.md#address) +ConsumerCondition.address #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[contract](ConsumerCondition.md#contract) +ConsumerCondition.contract #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -119,25 +125,25 @@ Implementation of the NFT Lock Condition #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[contractName](ConsumerCondition.md#contractname) +ConsumerCondition.contractName #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[events](ConsumerCondition.md#events) +ConsumerCondition.events #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -147,21 +153,21 @@ Implementation of the NFT Lock Condition #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[version](ConsumerCondition.md#version) +ConsumerCondition.version #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -169,17 +175,17 @@ ConsumerCondition.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -187,13 +193,31 @@ ConsumerCondition.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ConsumerCondition.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -205,13 +229,13 @@ ConsumerCondition.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -223,17 +247,17 @@ ConsumerCondition.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -241,13 +265,13 @@ ConsumerCondition.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -259,13 +283,13 @@ ConsumerCondition.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -277,57 +301,172 @@ ConsumerCondition.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ConsumerCondition.web3 +ConsumerCondition.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ConsumerCondition.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### abortByTimeOut -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **abortByTimeOut**(`conditionId`, `from`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :------------ | :---------------------------------------------- | | `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[abortByTimeOut](ConsumerCondition.md#abortbytimeout) +ConsumerCondition.abortByTimeOut #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) +[src/keeper/contracts/conditions/Condition.abstract.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L75) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -337,29 +476,29 @@ ConsumerCondition.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[call](ConsumerCondition.md#call) +ConsumerCondition.call #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### fulfill -▸ **fulfill**(`agreementId`, `did`, `rewardAddress`, `amount`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfill**(`agreementId`, `did`, `rewardAddress`, `amount`, `from`, `txParams?`): `Promise`\<`any`\> Fulfill requires valid NFT transfer in order to lock the amount of DID NFTs based on SEA. @@ -371,56 +510,56 @@ Fulfill requires valid NFT transfer in order to lock the amount of DID NFTs base | `did` | `string` | Asset Decentralized identifier. | | `rewardAddress` | `string` | The contract address where the reward is locked. | | `amount` | `bigint` | The amount of tokens to be transferred. | -| `from?` | [`Account`](Account.md) | Account sending the transaction | +| `from` | [`NvmAccount`](NvmAccount.md) | Account sending the transaction | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Condition state. #### Overrides -[ConsumerCondition](ConsumerCondition.md).[fulfill](ConsumerCondition.md#fulfill) +ConsumerCondition.fulfill #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts:45](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts#L45) +[src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts:49](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts#L49) --- ### fulfillInstance -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillInstance**(`cond`, `additionalParams`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | +| Name | Type | Default value | +| :----------------- | :-------------------------------------------------------- | :------------ | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | `undefined` | +| `additionalParams` | `Record`\<`string`, `unknown`\> | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | +| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[fulfillInstance](ConsumerCondition.md#fulfillinstance) +ConsumerCondition.fulfillInstance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) +[src/keeper/contracts/conditions/Condition.abstract.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L139) --- ### fulfillPlain -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillPlain**(`agreementId`, `args`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters @@ -428,54 +567,54 @@ Condition state. | :------------ | :-------------------------------------------------------- | :------------ | | `agreementId` | `string` | `undefined` | | `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | | `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[fulfillPlain](ConsumerCondition.md#fulfillplain) +ConsumerCondition.fulfillPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) +[src/keeper/contracts/conditions/Condition.abstract.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L47) --- ### fulfillWithNode -▸ **fulfillWithNode**(`_cond`, `_additionalParams`, `_from?`, `_txParams?`): `Promise`<`void`\> +▸ **fulfillWithNode**(`_cond`, `_additionalParams`, `_from`, `_txParams?`): `Promise`\<`void`\> #### Parameters -| Name | Type | -| :------------------ | :----------------------------------------------------------------------------------------- | -| `_cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `_additionalParams` | `Record`<`string`, `unknown`\> | -| `_from?` | [`Account`](Account.md) | -| `_txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------------ | :----------------------------------------------------- | +| `_cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | +| `_additionalParams` | `Record`\<`string`, `unknown`\> | +| `_from` | [`NvmAccount`](NvmAccount.md) | +| `_txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[fulfillWithNode](ConsumerCondition.md#fulfillwithnode) +ConsumerCondition.fulfillWithNode #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:217](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L217) +[src/keeper/contracts/conditions/Condition.abstract.ts:209](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L209) --- ### generateId -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> +▸ **generateId**(`agreementId`, `valueHash`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -486,21 +625,21 @@ Condition state. #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[generateId](ConsumerCondition.md#generateid) +ConsumerCondition.generateId #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) +[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L61) --- ### generateIdHash -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> +▸ **generateIdHash**(`agreementId`, `...values`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -511,21 +650,21 @@ Condition state. #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[generateIdHash](ConsumerCondition.md#generateidhash) +ConsumerCondition.generateIdHash #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) +[src/keeper/contracts/conditions/Condition.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L57) --- ### generateIdWithSeed -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> +▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`\<[`string`, `string`]\> #### Parameters @@ -536,15 +675,15 @@ Condition state. #### Returns -`Promise`<[`string`, `string`]\> +`Promise`\<[`string`, `string`]\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[generateIdWithSeed](ConsumerCondition.md#generateidwithseed) +ConsumerCondition.generateIdWithSeed #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) +[src/keeper/contracts/conditions/Condition.abstract.ts:65](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L65) --- @@ -564,17 +703,17 @@ Condition state. #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[getConditionFulfilledEvent](ConsumerCondition.md#getconditionfulfilledevent) +ConsumerCondition.getConditionFulfilledEvent #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) +[src/keeper/contracts/conditions/Condition.abstract.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L79) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -584,70 +723,46 @@ Condition state. #### Returns -`Promise`<`string`\> - -#### Inherited from - -[ConsumerCondition](ConsumerCondition.md).[getFromAddress](ConsumerCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] +`Promise`\<`string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[getInputsOfMethod](ConsumerCondition.md#getinputsofmethod) +ConsumerCondition.getFromAddress #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[getSignatureOfMethod](ConsumerCondition.md#getsignatureofmethod) +ConsumerCondition.getTransactionLogs #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### hashValues -▸ **hashValues**(`...args`): `Promise`<`string`\> +▸ **hashValues**(`...args`): `Promise`\<`string`\> #### Parameters @@ -657,21 +772,21 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[hashValues](ConsumerCondition.md#hashvalues) +ConsumerCondition.hashValues #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) +[src/keeper/contracts/conditions/Condition.abstract.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L116) --- ### hashValuesPlain -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> +▸ **hashValuesPlain**(`...args`): `Promise`\<`string`\> #### Parameters @@ -681,71 +796,72 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[hashValuesPlain](ConsumerCondition.md#hashvaluesplain) +ConsumerCondition.hashValuesPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) +[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L122) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[init](ConsumerCondition.md#init) +ConsumerCondition.init #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instance -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instance**(`agreementId`, `params`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | +| Name | Type | +| :------------ | :------------------------------------------------------- | +| `agreementId` | `string` | +| `params` | `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> | #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[instance](ConsumerCondition.md#instance) +ConsumerCondition.instance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) +[src/keeper/contracts/conditions/Condition.abstract.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L163) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -757,21 +873,21 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[instanceFromDDO](ConsumerCondition.md#instancefromddo) +ConsumerCondition.instanceFromDDO #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) +[src/keeper/contracts/conditions/Condition.abstract.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L131) --- ### params -▸ **params**(`did`, `rewardAddress`, `amount`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +▸ **params**(`did`, `rewardAddress`, `amount`): `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> Generates the hash of condition inputs. @@ -785,23 +901,23 @@ Generates the hash of condition inputs. #### Returns -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +`ConditionParameters`\<`Record`\<`string`, `unknown`\>\> Hash of all the values. #### Overrides -[ConsumerCondition](ConsumerCondition.md).[params](ConsumerCondition.md#params) +ConsumerCondition.params #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts#L27) +[src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts#L31) --- ### paramsFromDDO -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +▸ **paramsFromDDO**(`«destructured»`): `Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -811,75 +927,75 @@ Hash of all the values. #### Returns -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Overrides -[ConsumerCondition](ConsumerCondition.md).[paramsFromDDO](ConsumerCondition.md#paramsfromddo) +ConsumerCondition.paramsFromDDO #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts#L31) +[src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts#L35) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[send](ConsumerCondition.md#send) +ConsumerCondition.send #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[sendFrom](ConsumerCondition.md#sendfrom) +ConsumerCondition.sendFrom #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -893,17 +1009,41 @@ Hash of all the values. #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[setInstanceConfig](ConsumerCondition.md#setinstanceconfig) +ConsumerCondition.setInstanceConfig + +#### Defined in + +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +ConsumerCondition.someLog #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`NFTLockCondition`](NFTLockCondition.md)\> +▸ **getInstance**(`config`): `Promise`\<[`NFTLockCondition`](NFTLockCondition.md)\> #### Parameters @@ -913,21 +1053,21 @@ Hash of all the values. #### Returns -`Promise`<[`NFTLockCondition`](NFTLockCondition.md)\> +`Promise`\<[`NFTLockCondition`](NFTLockCondition.md)\> #### Overrides -[ConsumerCondition](ConsumerCondition.md).[getInstance](ConsumerCondition.md#getinstance) +ConsumerCondition.getInstance #### Defined in -[src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts#L16) +[src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/NFTLockCondition.ts#L20) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -948,8 +1088,8 @@ Hash of all the values. #### Inherited from -[ConsumerCondition](ConsumerCondition.md).[setInstanceConfig](ConsumerCondition.md#setinstanceconfig-1) +ConsumerCondition.setInstanceConfig #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFTSalesService.md b/docs/api-reference/classes/NFTSalesService.md index 17507bcb2..72f73a5a1 100644 --- a/docs/api-reference/classes/NFTSalesService.md +++ b/docs/api-reference/classes/NFTSalesService.md @@ -10,7 +10,7 @@ ## Implements -- [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceNFTSales`](../interfaces/ServiceNFTSales.md)\> +- [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`ServiceNFTSales`](../interfaces/ServiceNFTSales.md)\> ## Table of contents @@ -27,12 +27,14 @@ - [artifactsFolder](NFTSalesService.md#artifactsfolder) - [circuitsFolder](NFTSalesService.md#circuitsfolder) +- [client](NFTSalesService.md#client) - [config](NFTSalesService.md#config) - [instanceConfig](NFTSalesService.md#instanceconfig) - [instantiableConfig](NFTSalesService.md#instantiableconfig) - [logger](NFTSalesService.md#logger) - [nevermined](NFTSalesService.md#nevermined) -- [web3](NFTSalesService.md#web3) +- [publicClient](NFTSalesService.md#publicclient) +- [walletClient](NFTSalesService.md#walletclient) ### Methods @@ -49,7 +51,7 @@ ### constructor -• **new NFTSalesService**(`config`) +• **new NFTSalesService**(`config`): [`NFTSalesService`](NFTSalesService.md) #### Parameters @@ -57,13 +59,17 @@ | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`NFTSalesService`](NFTSalesService.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/AccessService.ts:135](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L135) +[src/nevermined/AccessService.ts:133](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L133) ## Properties @@ -73,7 +79,7 @@ #### Defined in -[src/nevermined/AccessService.ts:132](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L132) +[src/nevermined/AccessService.ts:130](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L130) --- @@ -83,17 +89,17 @@ #### Defined in -[src/nevermined/AccessService.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L133) +[src/nevermined/AccessService.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L131) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -101,17 +107,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -119,13 +125,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -137,13 +161,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -155,17 +179,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -173,13 +197,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -191,13 +215,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -209,31 +233,146 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### accept -▸ **accept**(`params`): `Promise`<`boolean`\> +▸ **accept**(`params`): `Promise`\<`boolean`\> #### Parameters @@ -243,7 +382,7 @@ Instantiable.web3 #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Implementation of @@ -251,7 +390,7 @@ Instantiable.web3 #### Defined in -[src/nevermined/AccessService.ts:172](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L172) +[src/nevermined/AccessService.ts:170](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L170) --- @@ -263,7 +402,7 @@ Instantiable.web3 | Name | Type | | :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](Account.md) | +| `publisher` | [`NvmAccount`](NvmAccount.md) | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | | `serviceAttributes` | [`ServiceAttributes`](../interfaces/ServiceAttributes.md) | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | @@ -279,25 +418,25 @@ Instantiable.web3 #### Defined in -[src/nevermined/AccessService.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L142) +[src/nevermined/AccessService.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L140) --- ### process -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> +▸ **process**(`params`, `from`, `txparams?`): `Promise`\<`void`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Implementation of @@ -305,13 +444,13 @@ Instantiable.web3 #### Defined in -[src/nevermined/AccessService.ts:163](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L163) +[src/nevermined/AccessService.ts:161](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L161) --- ### select -▸ **select**(`main`): [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceNFTSales`](../interfaces/ServiceNFTSales.md)\> +▸ **select**(`main`): [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`ServiceNFTSales`](../interfaces/ServiceNFTSales.md)\> #### Parameters @@ -321,17 +460,17 @@ Instantiable.web3 #### Returns -[`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceNFTSales`](../interfaces/ServiceNFTSales.md)\> +[`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`ServiceNFTSales`](../interfaces/ServiceNFTSales.md)\> #### Defined in -[src/nevermined/AccessService.ts:159](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L159) +[src/nevermined/AccessService.ts:157](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L157) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -349,25 +488,25 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### track -▸ **track**(`params`, `from`, `txparams?`): `Promise`<`boolean`\> +▸ **track**(`params`, `from`, `txparams?`): `Promise`\<`boolean`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Implementation of @@ -375,13 +514,13 @@ Instantiable.web3 #### Defined in -[src/nevermined/AccessService.ts:177](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L177) +[src/nevermined/AccessService.ts:175](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L175) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -399,13 +538,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -430,4 +569,4 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFTSalesTemplate.md b/docs/api-reference/classes/NFTSalesTemplate.md index 3a31092b6..75a38c812 100644 --- a/docs/api-reference/classes/NFTSalesTemplate.md +++ b/docs/api-reference/classes/NFTSalesTemplate.md @@ -4,7 +4,7 @@ ## Hierarchy -- [`BaseTemplate`](BaseTemplate.md)<`NFTSalesTemplateParams`, [`ServiceNFTSales`](../interfaces/ServiceNFTSales.md)\> +- [`BaseTemplate`](BaseTemplate.md)\<`NFTSalesTemplateParams`, [`ServiceNFTSales`](../interfaces/ServiceNFTSales.md)\> ↳ **`NFTSalesTemplate`** @@ -26,12 +26,14 @@ - [artifactsFolder](NFTSalesTemplate.md#artifactsfolder) - [circuitsFolder](NFTSalesTemplate.md#circuitsfolder) +- [client](NFTSalesTemplate.md#client) - [config](NFTSalesTemplate.md#config) - [instanceConfig](NFTSalesTemplate.md#instanceconfig) - [instantiableConfig](NFTSalesTemplate.md#instantiableconfig) - [logger](NFTSalesTemplate.md#logger) - [nevermined](NFTSalesTemplate.md#nevermined) -- [web3](NFTSalesTemplate.md#web3) +- [publicClient](NFTSalesTemplate.md#publicclient) +- [walletClient](NFTSalesTemplate.md#walletclient) ### Methods @@ -54,13 +56,12 @@ - [getConditionTypes](NFTSalesTemplate.md#getconditiontypes) - [getConditions](NFTSalesTemplate.md#getconditions) - [getFromAddress](NFTSalesTemplate.md#getfromaddress) -- [getInputsOfMethod](NFTSalesTemplate.md#getinputsofmethod) - [getParamsFromService](NFTSalesTemplate.md#getparamsfromservice) - [getServiceAgreementTemplate](NFTSalesTemplate.md#getserviceagreementtemplate) - [getServiceAgreementTemplateConditionByRef](NFTSalesTemplate.md#getserviceagreementtemplateconditionbyref) - [getServiceAgreementTemplateConditions](NFTSalesTemplate.md#getserviceagreementtemplateconditions) - [getServiceAgreementTemplateDependencies](NFTSalesTemplate.md#getserviceagreementtemplatedependencies) -- [getSignatureOfMethod](NFTSalesTemplate.md#getsignatureofmethod) +- [getTransactionLogs](NFTSalesTemplate.md#gettransactionlogs) - [init](NFTSalesTemplate.md#init) - [instanceFromDDO](NFTSalesTemplate.md#instancefromddo) - [lockConditionIndex](NFTSalesTemplate.md#lockconditionindex) @@ -76,6 +77,7 @@ - [service](NFTSalesTemplate.md#service) - [serviceEndpoint](NFTSalesTemplate.md#serviceendpoint) - [setInstanceConfig](NFTSalesTemplate.md#setinstanceconfig) +- [someLog](NFTSalesTemplate.md#somelog) - [standardContext](NFTSalesTemplate.md#standardcontext) - [track](NFTSalesTemplate.md#track) - [validateAgreement](NFTSalesTemplate.md#validateagreement) @@ -86,7 +88,7 @@ ### constructor -• `Protected` **new NFTSalesTemplate**(`contractName`) +• **new NFTSalesTemplate**(`contractName`): [`NFTSalesTemplate`](NFTSalesTemplate.md) #### Parameters @@ -94,19 +96,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`NFTSalesTemplate`](NFTSalesTemplate.md) + #### Inherited from [BaseTemplate](BaseTemplate.md).[constructor](BaseTemplate.md#constructor) #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L68) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L51) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -114,13 +120,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -128,7 +134,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -142,13 +148,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -156,7 +162,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -170,17 +176,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -188,17 +194,17 @@ BaseTemplate.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -206,13 +212,31 @@ BaseTemplate.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +BaseTemplate.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -224,13 +248,13 @@ BaseTemplate.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -242,17 +266,17 @@ BaseTemplate.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -260,13 +284,13 @@ BaseTemplate.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -278,13 +302,13 @@ BaseTemplate.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -296,31 +320,146 @@ BaseTemplate.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -BaseTemplate.web3 +BaseTemplate.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +BaseTemplate.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### accept -▸ **accept**(`_params`): `Promise`<`boolean`\> +▸ **accept**(`_params`): `Promise`\<`boolean`\> #### Parameters @@ -330,7 +469,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Inherited from @@ -338,13 +477,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L98) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:114](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L114) --- ### agreementId -▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`<`string`\> +▸ **agreementId**(`agreementIdSeed`, `creator`): `Promise`\<`string`\> #### Parameters @@ -355,7 +494,7 @@ BaseTemplate.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -363,13 +502,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L213) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:202](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L202) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -379,15 +518,15 @@ BaseTemplate.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -395,7 +534,7 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- @@ -413,13 +552,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/NFTSalesTemplate.ts:85](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTSalesTemplate.ts#L85) +[src/keeper/contracts/templates/NFTSalesTemplate.ts:96](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTSalesTemplate.ts#L96) --- ### createAgreement -▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreement**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `extraArgs`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -431,12 +570,12 @@ BaseTemplate.web3 | `timeLocks` | `number`[] | | `timeOuts` | `number`[] | | `extraArgs` | `any`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -444,13 +583,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L90) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L73) --- ### createAgreementAndPay -▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **createAgreementAndPay**(`agreementId`, `did`, `conditionIds`, `timeLocks`, `timeOuts`, `accessConsumer`, `condIdx`, `rewardAddress`, `tokenAddress`, `amounts`, `receivers`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -467,12 +606,12 @@ BaseTemplate.web3 | `tokenAddress` | `string` | | `amounts` | `bigint`[] | | `receivers` | `string`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -480,13 +619,13 @@ BaseTemplate.web3 #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L115) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:98](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L98) --- ### createAgreementFromDDO -▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `from`, `timeOuts?`, `txParams?`): `Promise`<`string`\> +▸ **createAgreementFromDDO**(`agreementIdSeed`, `ddo`, `parameters`, `consumer`, `timeOuts?`, `txParams?`): `Promise`\<`string`\> Create a new agreement using the data of a DDO. @@ -497,14 +636,13 @@ Create a new agreement using the data of a DDO. | `agreementIdSeed` | `string` | - | | `ddo` | [`DDO`](DDO.md) | DDO. | | `parameters` | `NFTSalesTemplateParams` | | -| `consumer` | [`Account`](Account.md) | - | -| `from` | [`Account`](Account.md) | - | +| `consumer` | [`NvmAccount`](NvmAccount.md) | - | | `timeOuts?` | `number`[] | - | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> true if the call was successful. @@ -514,13 +652,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:222](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L222) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:211](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L211) --- ### createAgreementWithPaymentFromDDO -▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`<`string`\> +▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`\<`string`\> #### Parameters @@ -530,14 +668,14 @@ true if the call was successful. | `ddo` | [`DDO`](DDO.md) | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | | `parameters` | `NFTSalesTemplateParams` | -| `consumer` | [`Account`](Account.md) | -| `from` | [`Account`](Account.md) | +| `consumer` | [`NvmAccount`](NvmAccount.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | | `observer?` | (`orderProgressStep`: [`OrderProgressStep`](../enums/OrderProgressStep.md)) => `void` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -545,7 +683,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L252) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:240](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L240) --- @@ -557,7 +695,7 @@ true if the call was successful. | Name | Type | | :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](Account.md) | +| `publisher` | [`NvmAccount`](NvmAccount.md) | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | | `serviceAttributes` | [`ServiceAttributes`](../interfaces/ServiceAttributes.md) | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | @@ -573,7 +711,7 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L35) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L48) --- @@ -591,13 +729,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/NFTSalesTemplate.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTSalesTemplate.ts#L39) +[src/keeper/contracts/templates/NFTSalesTemplate.ts:42](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTSalesTemplate.ts#L42) --- ### extraGen -▸ **extraGen**(`_params`): `Promise`<`any`\> +▸ **extraGen**(`_params`): `Promise`\<`any`\> #### Parameters @@ -607,7 +745,7 @@ true if the call was successful. #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Inherited from @@ -615,13 +753,13 @@ true if the call was successful. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:94](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L94) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) --- ### getAgreementCreatedEvent -▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`<`any`[]\> +▸ **getAgreementCreatedEvent**(`agreementId`): `Promise`\<`any`[]\> Generates and returns the agreement creation event. @@ -633,7 +771,7 @@ Generates and returns the agreement creation event. #### Returns -`Promise`<`any`[]\> +`Promise`\<`any`[]\> Agreement created event. @@ -643,13 +781,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:459](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L459) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:450](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L450) --- ### getAgreementData -▸ **getAgreementData**(`agreementId`): `Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +▸ **getAgreementData**(`agreementId`): `Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Parameters @@ -659,7 +797,7 @@ Agreement created event. #### Returns -`Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +`Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` ; `did`: `string` }\> #### Inherited from @@ -667,13 +805,13 @@ Agreement created event. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L21) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L29) --- ### getAgreementIdsFromDDO -▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`<`string`[]\> +▸ **getAgreementIdsFromDDO**(`agreementId`, `ddo`, `creator`, `params`): `Promise`\<`string`[]\> Get agreement conditions IDs. @@ -688,7 +826,7 @@ Get agreement conditions IDs. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> The condition IDs. @@ -698,13 +836,13 @@ The condition IDs. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:180](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L180) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:169](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L169) --- ### getAgreementStatus -▸ **getAgreementStatus**(`agreementId`): `Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +▸ **getAgreementStatus**(`agreementId`): `Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> Returns the status of the conditions. @@ -716,7 +854,7 @@ Returns the status of the conditions. #### Returns -`Promise`<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> +`Promise`\<`false` \| [`AgreementConditionsStatus`](../interfaces/AgreementConditionsStatus.md)\> The conditions status. @@ -726,13 +864,13 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:346](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L346) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:331](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L331) --- ### getAgreementsForDID -▸ **getAgreementsForDID**(`did`): `Promise`<`string`[]\> +▸ **getAgreementsForDID**(`did`): `Promise`\<`string`[]\> #### Parameters @@ -742,7 +880,7 @@ The conditions status. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> #### Inherited from @@ -750,19 +888,19 @@ The conditions status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:485](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L485) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:476](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L476) --- ### getConditionTypes -▸ **getConditionTypes**(): `Promise`<`string`[]\> +▸ **getConditionTypes**(): `Promise`\<`string`[]\> Conditions address list. #### Returns -`Promise`<`string`[]\> +`Promise`\<`string`[]\> A list of condition addresses. @@ -772,19 +910,19 @@ A list of condition addresses. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L154) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:137](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L137) --- ### getConditions -▸ **getConditions**(): `Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +▸ **getConditions**(): `Promise`\<`ConditionSmall`[]\> List of condition contracts. #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)[]\> +`Promise`\<`ConditionSmall`[]\> A list of condition contracts. @@ -794,13 +932,13 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:165](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L165) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L148) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -810,7 +948,7 @@ A list of condition contracts. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -818,37 +956,13 @@ A list of condition contracts. #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[BaseTemplate](BaseTemplate.md).[getInputsOfMethod](BaseTemplate.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getParamsFromService -▸ **getParamsFromService**(`consumerId`, `nftAmount`, `service`): `Promise`<`NFTSalesTemplateParams`\> +▸ **getParamsFromService**(`consumerId`, `nftAmount`, `service`): `Promise`\<`NFTSalesTemplateParams`\> #### Parameters @@ -860,11 +974,11 @@ readonly `ParamType`[] #### Returns -`Promise`<`NFTSalesTemplateParams`\> +`Promise`\<`NFTSalesTemplateParams`\> #### Defined in -[src/keeper/contracts/templates/NFTSalesTemplate.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTSalesTemplate.ts#L54) +[src/keeper/contracts/templates/NFTSalesTemplate.ts:64](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTSalesTemplate.ts#L64) --- @@ -882,13 +996,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFTSalesTemplate.ts:136](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTSalesTemplate.ts#L136) +[src/keeper/contracts/templates/NFTSalesTemplate.ts:147](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTSalesTemplate.ts#L147) --- ### getServiceAgreementTemplateConditionByRef -▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`<[`ConditionSmall`](ConditionSmall.md)\> +▸ **getServiceAgreementTemplateConditionByRef**(`ref`): `Promise`\<`undefined` \| `ConditionSmall`\> #### Parameters @@ -898,7 +1012,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionSmall`](ConditionSmall.md)\> +`Promise`\<`undefined` \| `ConditionSmall`\> #### Inherited from @@ -906,7 +1020,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:329](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L329) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:314](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L314) --- @@ -924,17 +1038,17 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:324](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L324) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:309](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L309) --- ### getServiceAgreementTemplateDependencies -▸ **getServiceAgreementTemplateDependencies**(): `Promise`<{ `[condition: string]`: `string`[]; }\> +▸ **getServiceAgreementTemplateDependencies**(): `Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Returns -`Promise`<{ `[condition: string]`: `string`[]; }\> +`Promise`\<\{ `[condition: string]`: `string`[]; }\> #### Inherited from @@ -942,49 +1056,50 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:336](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L336) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:321](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L321) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[BaseTemplate](BaseTemplate.md).[getSignatureOfMethod](BaseTemplate.md#getsignatureofmethod) +[BaseTemplate](BaseTemplate.md).[getTransactionLogs](BaseTemplate.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -992,13 +1107,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`, `serviceIndex?`): `Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`NFTSalesTemplateParams`\>\> +▸ **instanceFromDDO**(`agreementIdSeed`, `ddo`, `creator`, `parameters`, `serviceIndex?`): `Promise`\<`AgreementInstance`\<`NFTSalesTemplateParams`\>\> #### Parameters @@ -1012,7 +1127,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`AgreementInstance`](../interfaces/AgreementInstance.md)<`NFTSalesTemplateParams`\>\> +`Promise`\<`AgreementInstance`\<`NFTSalesTemplateParams`\>\> #### Overrides @@ -1020,7 +1135,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFTSalesTemplate.ts:91](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTSalesTemplate.ts#L91) +[src/keeper/contracts/templates/NFTSalesTemplate.ts:102](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTSalesTemplate.ts#L102) --- @@ -1038,13 +1153,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFTSalesTemplate.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTSalesTemplate.ts#L81) +[src/keeper/contracts/templates/NFTSalesTemplate.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTSalesTemplate.ts#L92) --- ### lockTokens -▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams`): `Promise`<`void`\> +▸ **lockTokens**(`tokenAddress`, `amounts`, `from`, `txParams?`): `Promise`\<`void`\> #### Parameters @@ -1052,12 +1167,12 @@ readonly `ParamType`[] | :------------- | :---------------------------------------------- | | `tokenAddress` | `any` | | `amounts` | `any` | -| `from` | [`Account`](Account.md) | -| `txParams` | [`TxParameters`](../interfaces/TxParameters.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1065,7 +1180,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:393](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L393) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:382](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L382) --- @@ -1083,7 +1198,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFTSalesTemplate.ts:36](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTSalesTemplate.ts#L36) +[src/keeper/contracts/templates/NFTSalesTemplate.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTSalesTemplate.ts#L39) --- @@ -1112,13 +1227,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/templates/NFTSalesTemplate.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTSalesTemplate.ts#L43) +[src/keeper/contracts/templates/NFTSalesTemplate.ts:46](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTSalesTemplate.ts#L46) --- ### paramsGen -▸ **paramsGen**(`«destructured»`): `Promise`<`NFTSalesTemplateParams`\> +▸ **paramsGen**(`«destructured»`): `Promise`\<`NFTSalesTemplateParams`\> Specialize params @@ -1130,7 +1245,7 @@ Specialize params #### Returns -`Promise`<`NFTSalesTemplateParams`\> +`Promise`\<`NFTSalesTemplateParams`\> #### Overrides @@ -1138,13 +1253,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/NFTSalesTemplate.ts:72](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTSalesTemplate.ts#L72) +[src/keeper/contracts/templates/NFTSalesTemplate.ts:83](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTSalesTemplate.ts#L83) --- ### paymentData -▸ **paymentData**(`service`): `Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +▸ **paymentData**(`service`): `Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Parameters @@ -1154,7 +1269,7 @@ Specialize params #### Returns -`Promise`<[`PaymentData`](../interfaces/PaymentData.md)\> +`Promise`\<[`PaymentData`](../interfaces/PaymentData.md)\> #### Inherited from @@ -1162,13 +1277,13 @@ Specialize params #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L78) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L61) --- ### printAgreementStatus -▸ **printAgreementStatus**(`agreementId`): `Promise`<`void`\> +▸ **printAgreementStatus**(`agreementId`): `Promise`\<`void`\> Prints the agreement status. @@ -1180,7 +1295,7 @@ Prints the agreement status. #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1188,25 +1303,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:429](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L429) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:418](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L418) --- ### process -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> +▸ **process**(`params`, `from`, `txparams?`): `Promise`\<`void`\> #### Parameters | Name | Type | | :---------- | :------------------------------------------------------ | | `params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1214,26 +1329,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:110](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L110) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:126](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L126) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1241,26 +1356,26 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -1268,7 +1383,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- @@ -1286,7 +1401,7 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFTSalesTemplate.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTSalesTemplate.ts#L28) +[src/keeper/contracts/templates/NFTSalesTemplate.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTSalesTemplate.ts#L31) --- @@ -1304,13 +1419,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFTSalesTemplate.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTSalesTemplate.ts#L32) +[src/keeper/contracts/templates/NFTSalesTemplate.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTSalesTemplate.ts#L35) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1328,13 +1443,37 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[BaseTemplate](BaseTemplate.md).[someLog](BaseTemplate.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### standardContext -▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): [`ConditionContext`](../interfaces/ConditionContext.md) +▸ **standardContext**(`ddo`, `creator`, `serviceIndex?`): `ConditionContext` #### Parameters @@ -1346,7 +1485,7 @@ Prints the agreement status. #### Returns -[`ConditionContext`](../interfaces/ConditionContext.md) +`ConditionContext` #### Inherited from @@ -1354,25 +1493,25 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L200) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:189](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L189) --- ### track -▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`<`boolean`\> +▸ **track**(`_params`, `_from`, `_txparams?`): `Promise`\<`boolean`\> #### Parameters | Name | Type | | :----------- | :------------------------------------------------------ | | `_params` | [`ValidationParams`](../interfaces/ValidationParams.md) | -| `_from` | [`Account`](Account.md) | +| `_from` | [`NvmAccount`](NvmAccount.md) | | `_txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Inherited from @@ -1380,13 +1519,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:102](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L102) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L118) --- ### validateAgreement -▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`<`void`\> +▸ **validateAgreement**(`agreement_id`, `did`, `params`, `from`, `extra?`, `txparams?`): `Promise`\<`void`\> #### Parameters @@ -1395,13 +1534,13 @@ Prints the agreement status. | `agreement_id` | `string` | | `did` | `string` | | `params` | `NFTSalesTemplateParams` | -| `from` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `extra` | `any` | | `txparams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -1409,13 +1548,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/BaseTemplate.abstract.ts:125](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L125) +[src/keeper/contracts/templates/BaseTemplate.abstract.ts:141](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/BaseTemplate.abstract.ts#L141) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`NFTSalesTemplate`](NFTSalesTemplate.md)\> +▸ **getInstance**(`config`): `Promise`\<[`NFTSalesTemplate`](NFTSalesTemplate.md)\> #### Parameters @@ -1425,7 +1564,7 @@ Prints the agreement status. #### Returns -`Promise`<[`NFTSalesTemplate`](NFTSalesTemplate.md)\> +`Promise`\<[`NFTSalesTemplate`](NFTSalesTemplate.md)\> #### Overrides @@ -1433,13 +1572,13 @@ Prints the agreement status. #### Defined in -[src/keeper/contracts/templates/NFTSalesTemplate.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/NFTSalesTemplate.ts#L24) +[src/keeper/contracts/templates/NFTSalesTemplate.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/NFTSalesTemplate.ts#L27) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1464,4 +1603,4 @@ Prints the agreement status. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NFTServiceAttributes.md b/docs/api-reference/classes/NFTServiceAttributes.md index 9d08be67b..ca6d7f97c 100644 --- a/docs/api-reference/classes/NFTServiceAttributes.md +++ b/docs/api-reference/classes/NFTServiceAttributes.md @@ -13,19 +13,29 @@ - [amount](NFTServiceAttributes.md#amount) - [duration](NFTServiceAttributes.md#duration) - [isSubscription](NFTServiceAttributes.md#issubscription) +- [maxCreditsToCharge](NFTServiceAttributes.md#maxcreditstocharge) +- [minCreditsRequired](NFTServiceAttributes.md#mincreditsrequired) +- [minCreditsToCharge](NFTServiceAttributes.md#mincreditstocharge) - [nftTransfer](NFTServiceAttributes.md#nfttransfer) - [tokenId](NFTServiceAttributes.md#tokenid) - [defaultValues](NFTServiceAttributes.md#defaultvalues) ### Methods +- [configureServicesAttributes](NFTServiceAttributes.md#configureservicesattributes) +- [getCreditsToCharge](NFTServiceAttributes.md#getcreditstocharge) - [getDefaultNFTServiceAttributes](NFTServiceAttributes.md#getdefaultnftserviceattributes) +- [isCreditsBalanceEnough](NFTServiceAttributes.md#iscreditsbalanceenough) ## Constructors ### constructor -• **new NFTServiceAttributes**() +• **new NFTServiceAttributes**(): [`NFTServiceAttributes`](NFTServiceAttributes.md) + +#### Returns + +[`NFTServiceAttributes`](NFTServiceAttributes.md) ## Properties @@ -37,7 +47,7 @@ Number of editions #### Defined in -[src/models/NFTAttributes.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L25) +[src/models/NFTAttributes.ts:17](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L17) --- @@ -49,7 +59,7 @@ If is a subscription this means the number of blocks the subscription last. If 0 #### Defined in -[src/models/NFTAttributes.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L20) +[src/models/NFTAttributes.ts:32](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L32) --- @@ -61,7 +71,46 @@ If true means the NFT works as a subscription #### Defined in -[src/models/NFTAttributes.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L15) +[src/models/NFTAttributes.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L27) + +--- + +### maxCreditsToCharge + +• `Optional` **maxCreditsToCharge**: `bigint` + +The maximum number of credits that can be charged to the subscriber. +If not specified, the subscription cost is not capped + +#### Defined in + +[src/models/NFTAttributes.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L44) + +--- + +### minCreditsRequired + +• `Optional` **minCreditsRequired**: `bigint` + +The minimum number of credits that the subscribers needs to hold to access the asset. +If not specified, the amount defined in the service agreement or 1 credit will be required + +#### Defined in + +[src/models/NFTAttributes.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L56) + +--- + +### minCreditsToCharge + +• `Optional` **minCreditsToCharge**: `bigint` + +The minimum number of credits that will be charged to the subscriber. +If not specified, the amount defined in the service agreement or 1 credit will be charged + +#### Defined in + +[src/models/NFTAttributes.ts:50](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L50) --- @@ -73,7 +122,7 @@ The asset is transferred (true) or minted (false) with Nevermined contracts #### Defined in -[src/models/NFTAttributes.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L10) +[src/models/NFTAttributes.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L22) --- @@ -86,7 +135,7 @@ For example if is a NFT Access service requiring holding a NFT, this is the toke #### Defined in -[src/models/NFTAttributes.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L31) +[src/models/NFTAttributes.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L38) --- @@ -96,29 +145,108 @@ For example if is a NFT Access service requiring holding a NFT, this is the toke #### Type declaration -| Name | Type | -| :--------------- | :------------------------------------------------ | -| `amount` | `bigint` | -| `duration` | `number` | -| `isSubscription` | `boolean` | -| `nftTransfer` | `boolean` | -| `serviceType` | [`ServiceType`](../code-reference.md#servicetype) | -| `tokenId` | `string` | +| Name | Type | +| :------------------- | :------------------------------------------------ | +| `amount` | `bigint` | +| `duration` | `number` | +| `isSubscription` | `boolean` | +| `maxCreditsToCharge` | `bigint` | +| `minCreditsRequired` | `bigint` | +| `minCreditsToCharge` | `bigint` | +| `nftTransfer` | `boolean` | +| `serviceType` | [`ServiceType`](../code-reference.md#servicetype) | +| `tokenId` | `string` | #### Defined in -[src/models/NFTAttributes.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L33) +[src/models/NFTAttributes.ts:58](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L58) ## Methods +### configureServicesAttributes + +▸ **configureServicesAttributes**(`nftAttributes`): `Partial`\<[`NFTAttributes`](NFTAttributes.md)\> + +Given some partial nft attributes it applies some default validations and pre-configure default values + +#### Parameters + +| Name | Type | Description | +| :-------------- | :----------------------------------------------- | :--------------------- | +| `nftAttributes` | `Partial`\<[`NFTAttributes`](NFTAttributes.md)\> | partial nft attributes | + +#### Returns + +`Partial`\<[`NFTAttributes`](NFTAttributes.md)\> + +nft attributes validated and configured + +#### Defined in + +[src/models/NFTAttributes.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L136) + +--- + +### getCreditsToCharge + +▸ **getCreditsToCharge**(`nftAttributes`, `chargeType?`, `dynamicAmount?`): `undefined` \| `bigint` + +Taking into account the nft attributes confifured tt returns the number of credits to be consumed + +#### Parameters + +| Name | Type | Default value | Description | +| :--------------- | :------------------------------------------------ | :----------------- | :------------------------------------------------- | +| `nftAttributes` | [`NFTServiceAttributes`](NFTServiceAttributes.md) | `undefined` | - | +| `chargeType` | [`ChargeType`](../enums/ChargeType.md) | `ChargeType.Fixed` | - | +| `dynamicAmount?` | `bigint` | `undefined` | the dynamic amount of credits asked to be consumed | + +#### Returns + +`undefined` \| `bigint` + +amount to consume + +#### Defined in + +[src/models/NFTAttributes.ts:81](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L81) + +--- + ### getDefaultNFTServiceAttributes -▸ `Static` **getDefaultNFTServiceAttributes**(): `Required`<[`NFTServiceAttributes`](NFTServiceAttributes.md)\> +▸ **getDefaultNFTServiceAttributes**(): `Required`\<[`NFTServiceAttributes`](NFTServiceAttributes.md)\> #### Returns -`Required`<[`NFTServiceAttributes`](NFTServiceAttributes.md)\> +`Required`\<[`NFTServiceAttributes`](NFTServiceAttributes.md)\> + +#### Defined in + +[src/models/NFTAttributes.ts:70](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L70) + +--- + +### isCreditsBalanceEnough + +▸ **isCreditsBalanceEnough**(`nftAttributes`, `creditsBalance`, `dynamicAmount?`): `boolean` + +Given some credits balance if checks if that's enough to access to a NFT asset + +#### Parameters + +| Name | Type | Description | +| :--------------- | :------------------------------------------------ | :----------------------------------------------- | +| `nftAttributes` | [`NFTServiceAttributes`](NFTServiceAttributes.md) | NFT Attributes metadata | +| `creditsBalance` | `bigint` | balance of credits | +| `dynamicAmount?` | `bigint` | the dynamic amount of credits asked to be burned | + +#### Returns + +`boolean` + +boolean #### Defined in -[src/models/NFTAttributes.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NFTAttributes.ts#L42) +[src/models/NFTAttributes.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NFTAttributes.ts#L115) diff --git a/docs/api-reference/classes/NFTsBaseApi.md b/docs/api-reference/classes/NFTsBaseApi.md index 39fd16101..754049143 100644 --- a/docs/api-reference/classes/NFTsBaseApi.md +++ b/docs/api-reference/classes/NFTsBaseApi.md @@ -10,10 +10,10 @@ Abstract class providing common NFT methods for different ERC implementations. ↳ **`NFTsBaseApi`** - ↳↳ [`NFT721Api`](NFT721Api.md) - ↳↳ [`NFT1155Api`](NFT1155Api.md) + ↳↳ [`NFT721Api`](NFT721Api.md) + ## Table of contents ### Constructors @@ -28,12 +28,14 @@ Abstract class providing common NFT methods for different ERC implementations. - [artifactsFolder](NFTsBaseApi.md#artifactsfolder) - [circuitsFolder](NFTsBaseApi.md#circuitsfolder) +- [client](NFTsBaseApi.md#client) - [config](NFTsBaseApi.md#config) - [instanceConfig](NFTsBaseApi.md#instanceconfig) - [instantiableConfig](NFTsBaseApi.md#instantiableconfig) - [logger](NFTsBaseApi.md#logger) - [nevermined](NFTsBaseApi.md#nevermined) -- [web3](NFTsBaseApi.md#web3) +- [publicClient](NFTsBaseApi.md#publicclient) +- [walletClient](NFTsBaseApi.md#walletclient) ### Methods @@ -61,7 +63,11 @@ Abstract class providing common NFT methods for different ERC implementations. ### constructor -• **new NFTsBaseApi**() +• **new NFTsBaseApi**(): [`NFTsBaseApi`](NFTsBaseApi.md) + +#### Returns + +[`NFTsBaseApi`](NFTsBaseApi.md) #### Inherited from @@ -75,7 +81,7 @@ Abstract class providing common NFT methods for different ERC implementations. #### Index signature -▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`Service`](../code-reference.md#service)\> +▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`Service`](../code-reference.md#service)\> #### Inherited from @@ -83,17 +89,17 @@ Abstract class providing common NFT methods for different ERC implementations. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L29) +[src/nevermined/api/RegistryBaseApi.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L39) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -101,17 +107,17 @@ RegistryBaseApi.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -119,13 +125,31 @@ RegistryBaseApi.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +RegistryBaseApi.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -137,13 +161,13 @@ RegistryBaseApi.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -155,17 +179,17 @@ RegistryBaseApi.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -173,13 +197,13 @@ RegistryBaseApi.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -191,13 +215,13 @@ RegistryBaseApi.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -209,31 +233,146 @@ RegistryBaseApi.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +RegistryBaseApi.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -RegistryBaseApi.web3 +RegistryBaseApi.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### \_details -▸ `Protected` **\_details**(`did`, `ercType`): `Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +▸ **\_details**(`did`, `ercType`): `Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> Get the details of an NFT @@ -246,7 +385,7 @@ Get the details of an NFT #### Returns -`Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +`Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> The details of the NFT. @@ -266,13 +405,13 @@ assert.equal(details.owner, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L150) +[src/nevermined/api/nfts/NFTsBaseApi.ts:152](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L152) --- ### access -▸ **access**(`did`, `consumer`, `destination?`, `fileIndex?`, `agreementId?`, `buyer?`, `babysig?`, `serviceReference?`): `Promise`<`boolean`\> +▸ **access**(`did`, `from`, `destination?`, `fileIndex?`, `agreementId?`, `buyer?`, `babysig?`, `serviceReference?`): `Promise`\<`boolean`\> Access the files associated with an NFT. @@ -281,7 +420,7 @@ Access the files associated with an NFT. | Name | Type | Default value | Description | | :----------------- | :------------------------------------------------------------ | :------------- | :------------------------------------------------------------------------ | | `did` | `string` | `undefined` | The Decentralized Identifier of the NFT asset. | -| `consumer` | [`Account`](Account.md) | `undefined` | The NFT holder account. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The user account holding NFTs (after purchase) requesting the access | | `destination?` | `string` | `undefined` | The download destination for the files. | | `fileIndex?` | `number` | `undefined` | The index of the file. If unset will download all the files in the asset. | | `agreementId` | `string` | `'0x'` | The NFT sales agreement id. | @@ -291,7 +430,7 @@ Access the files associated with an NFT. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the access was successful or file if isToDownload is false. @@ -308,13 +447,13 @@ const result = await nevermined.nfts1155.access(ddo.id, collector, '/tmp/') #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:419](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L419) +[src/nevermined/api/nfts/NFTsBaseApi.ts:427](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L427) --- ### addRating -▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, it adds a vote to the asset curation information. @@ -325,13 +464,13 @@ Given a DID, it adds a vote to the asset curation information. | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `newRating` | `number` | `undefined` | New average rating of the asset | | `numVotesAdded` | `number` | `1` | Number of new votes added to the rating, typically just 1 | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -341,29 +480,29 @@ Given a DID, it adds a vote to the asset curation information. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:514](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L514) +[src/nevermined/api/RegistryBaseApi.ts:534](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L534) --- ### buySecondaryMarketNft -▸ **buySecondaryMarketNft**(`consumer`, `nftAmount?`, `agreementIdSeed`, `conditionsTimeout?`, `txParams?`): `Promise`<`boolean`\> +▸ **buySecondaryMarketNft**(`from`, `nftAmount?`, `agreementIdSeed`, `conditionsTimeout?`, `txParams?`): `Promise`\<`boolean`\> Buys a number of listed NFTs on secondary markets. #### Parameters -| Name | Type | Description | -| :------------------ | :---------------------------------------------- | :----------------------------------------- | -| `consumer` | [`Account`](Account.md) | The account of the buyer/consumer. | -| `nftAmount` | `bigint` | The number of assets to buy. 1 by default. | -| `agreementIdSeed` | `string` | - | -| `conditionsTimeout` | `number`[] | - | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :------------------ | :---------------------------------------------- | :--------------------------------------------------------- | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the buyer/consumer. | +| `nftAmount` | `bigint` | The number of assets to buy. 1 by default. | +| `agreementIdSeed` | `string` | The seed of the initial sales agreement created off-chain. | +| `conditionsTimeout` | `number`[] | The timeout for the conditions. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the buy was successful. @@ -380,13 +519,13 @@ Thrown if there is an error buying the NFT. #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:341](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L341) +[src/nevermined/api/nfts/NFTsBaseApi.ts:345](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L345) --- ### claimNFT -▸ `Protected` **claimNFT**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `ercType?`, `did?`, `serviceIndex?`): `Promise`<`boolean`\> +▸ **claimNFT**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `ercType?`, `did?`, `serviceIndex?`): `Promise`\<`boolean`\> Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. @@ -404,7 +543,7 @@ Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -435,26 +574,26 @@ const receipt = await nevermined.nfts721.claim( #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L50) +[src/nevermined/api/nfts/NFTsBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L52) --- ### getSubscriptionToken -▸ **getSubscriptionToken**(`did`, `account`): `Promise`<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> +▸ **getSubscriptionToken**(`did`, `from`): `Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> Get a JWT token for an asset associated with a webService #### Parameters -| Name | Type | Description | -| :-------- | :---------------------- | :----------------------------------------------------------------------------- | -| `did` | `string` | The did of the asset with a webService resource and an associated subscription | -| `account` | [`Account`](Account.md) | Account of the user requesting the token | +| Name | Type | Description | +| :----- | :---------------------------- | :----------------------------------------------------------------------------- | +| `did` | `string` | The did of the asset with a webService resource and an associated subscription | +| `from` | [`NvmAccount`](NvmAccount.md) | Account of the user requesting the token | #### Returns -`Promise`<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> +`Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> [SubscriptionToken](../interfaces/SubscriptionToken.md) @@ -469,13 +608,13 @@ assert.isDefined(response.neverminedProxyUri) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:478](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L478) +[src/nevermined/api/nfts/NFTsBaseApi.ts:490](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L490) --- ### isOperator -▸ **isOperator**(`nftContractAddress`, `operatorAddress`, `ercType?`): `Promise`<`boolean`\> +▸ **isOperator**(`nftContractAddress`, `operatorAddress`, `ercType?`): `Promise`\<`boolean`\> Check if a particular address is the operator of given a NFT address. @@ -489,19 +628,19 @@ Check if a particular address is the operator of given a NFT address. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> operator status of address as a boolean #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:116](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L116) +[src/nevermined/api/nfts/NFTsBaseApi.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L118) --- ### isOperatorOfDID -▸ **isOperatorOfDID**(`did`, `address`, `ercType?`): `Promise`<`boolean`\> +▸ **isOperatorOfDID**(`did`, `address`, `ercType?`): `Promise`\<`boolean`\> Check if a particular address is the operator of a DID. @@ -515,19 +654,19 @@ Check if a particular address is the operator of a DID. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> operator status of address as a boolean #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:91](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L91) +[src/nevermined/api/nfts/NFTsBaseApi.ts:93](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L93) --- ### list -▸ **list**(`did`, `list`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **list**(`did`, `list`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset allowing to list or unlist it. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. In a Nevermined environment, when an asset is unlisted, it is not possible to be found and accessed by any user. @@ -538,13 +677,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be | :---------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `list` | `boolean` | `undefined` | Needs the asset to be listed or unlisted | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -554,13 +693,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:462](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L462) +[src/nevermined/api/RegistryBaseApi.ts:482](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L482) --- ### listOnSecondaryMarkets -▸ **listOnSecondaryMarkets**(`ddo`, `assetPrice`, `nftAmount`, `nftTransfer`, `provider`, `token`, `owner`): `Promise`<`string`\> +▸ **listOnSecondaryMarkets**(`ddo`, `assetPrice`, `nftAmount`, `nftTransfer`, `provider`, `token`, `from`): `Promise`\<`string`\> After purchase re-list an NFT to enable secondary market sales. @@ -574,11 +713,11 @@ After purchase re-list an NFT to enable secondary market sales. | `nftTransfer` | `boolean` | - | | `provider` | `string` | The address that will be the provider of the secondary sale. | | `token` | [`Token`](Token.md) | - | -| `owner` | [`Account`](Account.md) | The account of the current owner. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the current owner. | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> the agreementId of the secondary sale. @@ -602,29 +741,29 @@ Thrown if there is an error listing the NFT. #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:260](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L260) +[src/nevermined/api/nfts/NFTsBaseApi.ts:262](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L262) --- ### orderAsset -▸ **orderAsset**(`did`, `serviceReference`, `consumer`, `params?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **orderAsset**(`did`, `serviceReference`, `from`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> Start the purchase/order of an asset's service. Starts by signing the service agreement then sends the request to the publisher via the service endpoint (Node http service). #### Parameters -| Name | Type | Description | -| :----------------- | :------------------------------------------------------------ | :---------------- | -| `did` | `string` | Decentralized ID. | -| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | -| `consumer` | [`Account`](Account.md) | Consumer account. | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :----------------- | :------------------------------------------------------------ | :--------------------- | +| `did` | `string` | Decentralized ID. | +| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | +| `from` | [`NvmAccount`](NvmAccount.md) | Consumer account. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID. @@ -634,13 +773,13 @@ The agreement ID. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:563](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L563) +[src/nevermined/api/RegistryBaseApi.ts:585](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L585) --- ### registerNeverminedAsset -▸ `Protected` **registerNeverminedAsset**(`assetAttributes`, `publisher`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **registerNeverminedAsset**(`assetAttributes`, `from`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> It registers a new asset in a Nevermined network. This method is protected and not exposed via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, and `nfts` APIs. @@ -650,14 +789,14 @@ via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | | `assetAttributes` | [`AssetAttributes`](AssetAttributes.md) | Attributes describing the asset | -| `publisher` | [`Account`](Account.md) | The account publishing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-721) associated to the asset | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The metadata of the asset created (DDO) @@ -671,15 +810,16 @@ The metadata of the asset created (DDO) #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L42) +[src/nevermined/api/RegistryBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L52) --- ### resolveAsset -▸ `Protected` **resolveAsset**(`did`, `policy?`): `Promise`<[`DDO`](DDO.md)\> +▸ **resolveAsset**(`did`, `policy?`): `Promise`\<[`DDO`](DDO.md)\> -Returns a DDO by DID. Depending of the resolution policy it prioritize the Metadata API or Immutable urls. +Given an asset DID it returns the metadata of that asset represented by a DDO object. +Depending of the resolution policy it prioritize fetching that Metadata from the Marketplace API or Immutable urls (like IPFS). #### Parameters @@ -690,7 +830,7 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> [DDO](DDO.md) @@ -700,13 +840,13 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:310](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L310) +[src/nevermined/api/RegistryBaseApi.ts:324](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L324) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -724,13 +864,13 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### updateAsset -▸ `Protected` **updateAsset**(`did`, `metadata`, `publisher`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **updateAsset**(`did`, `metadata`, `from`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. @@ -740,13 +880,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th | :----------------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | `undefined` | Metadata describing the asset | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadataOptions` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -756,13 +896,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:353](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L353) +[src/nevermined/api/RegistryBaseApi.ts:367](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L367) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -780,13 +920,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### getNFTContractAddress -▸ `Static` **getNFTContractAddress**(`ddo`, `serviceReference?`): `any` +▸ **getNFTContractAddress**(`ddo`, `serviceReference?`): `any` Gets the NFT contract address associated with a Nevermined asset from the DDO. @@ -811,13 +951,13 @@ const nftContractAddress = NFT1155Api.getNFTContractAddress(ddo) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:219](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L219) +[src/nevermined/api/nfts/NFTsBaseApi.ts:221](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L221) --- ### getServicePlugin -▸ `Static` `Protected` **getServicePlugin**(`config`): `Object` +▸ **getServicePlugin**(`config`): `Object` Initializes the default Nevermined service plugins and return that instance @@ -833,13 +973,12 @@ Initializes the default Nevermined service plugins and return that instance The Nevermined Service Plugin instance -| Name | Type | -| :------------ | :------------------------------------------------------------------------------------------------------------ | -| `aave-credit` | [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceAaveCredit`](../interfaces/ServiceAaveCredit.md)\> | -| `access` | [`AccessService`](AccessService.md) | -| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | -| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | -| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | +| Name | Type | +| :----------- | :-------------------------------------------------------------------- | +| `access` | [`AccessService`](AccessService.md) | +| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | +| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | +| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | #### Inherited from @@ -847,13 +986,13 @@ The Nevermined Service Plugin instance #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:618](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L618) +[src/nevermined/api/RegistryBaseApi.ts:640](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L640) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -878,4 +1017,4 @@ The Nevermined Service Plugin instance #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/Nevermined.md b/docs/api-reference/classes/Nevermined.md index 89cb28caa..2c71e8aad 100644 --- a/docs/api-reference/classes/Nevermined.md +++ b/docs/api-reference/classes/Nevermined.md @@ -31,29 +31,37 @@ Main interface for Nevermined Protocol. - [search](Nevermined.md#search) - [services](Nevermined.md#services) - [utils](Nevermined.md#utils) +- [DEFAULT_INITIALIZATION_OPTIONS](Nevermined.md#default_initialization_options) ### Accessors - [artifactsFolder](Nevermined.md#artifactsfolder) - [circuitsFolder](Nevermined.md#circuitsfolder) +- [client](Nevermined.md#client) - [config](Nevermined.md#config) - [instanceConfig](Nevermined.md#instanceconfig) - [instantiableConfig](Nevermined.md#instantiableconfig) - [logger](Nevermined.md#logger) - [nevermined](Nevermined.md#nevermined) -- [web3](Nevermined.md#web3) +- [publicClient](Nevermined.md#publicclient) +- [walletClient](Nevermined.md#walletclient) ### Methods - [setInstanceConfig](Nevermined.md#setinstanceconfig) - [getInstance](Nevermined.md#getinstance) +- [getSearchOnlyInstance](Nevermined.md#getsearchonlyinstance) - [setInstanceConfig](Nevermined.md#setinstanceconfig-1) ## Constructors ### constructor -• `Private` **new Nevermined**() +• **new Nevermined**(): [`Nevermined`](Nevermined.md) + +#### Returns + +[`Nevermined`](Nevermined.md) #### Overrides @@ -61,7 +69,7 @@ Main interface for Nevermined Protocol. #### Defined in -[src/nevermined/Nevermined.ts:211](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L211) +[src/nevermined/Nevermined.ts:263](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L263) ## Properties @@ -73,7 +81,7 @@ Accounts submodule #### Defined in -[src/nevermined/Nevermined.ts:159](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L159) +[src/nevermined/Nevermined.ts:206](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L206) --- @@ -85,7 +93,7 @@ Agreements submodule #### Defined in -[src/nevermined/Nevermined.ts:164](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L164) +[src/nevermined/Nevermined.ts:211](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L211) --- @@ -97,7 +105,7 @@ Assets API #### Defined in -[src/nevermined/Nevermined.ts:169](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L169) +[src/nevermined/Nevermined.ts:216](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L216) --- @@ -109,7 +117,7 @@ Compute API #### Defined in -[src/nevermined/Nevermined.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L174) +[src/nevermined/Nevermined.ts:221](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L221) --- @@ -121,19 +129,19 @@ Nevermined very own contract reflector. #### Type declaration -| Name | Type | -| :-------------------- | :---------------------------------------------------------------------------------- | -| `loadErc20` | (`address`: `string`) => `Promise`<[`CustomToken`](CustomToken.md)\> | -| `loadNft1155` | (`address`: `string`) => `Promise`<[`NFT1155Api`](NFT1155Api.md)\> | -| `loadNft1155Api` | (`api`: [`NFT1155Api`](NFT1155Api.md)) => `Promise`<[`NFT1155Api`](NFT1155Api.md)\> | -| `loadNft1155Contract` | (`address`: `string`) => `Promise`<[`Nft1155Contract`](Nft1155Contract.md)\> | -| `loadNft721` | (`address`: `string`) => `Promise`<[`NFT721Api`](NFT721Api.md)\> | -| `loadNft721Api` | (`api`: [`NFT721Api`](NFT721Api.md)) => `Promise`<[`NFT721Api`](NFT721Api.md)\> | -| `loadNft721Contract` | (`address`: `string`) => `Promise`<[`Nft721Contract`](Nft721Contract.md)\> | +| Name | Type | Description | +| :-------------------- | :----------------------------------------------------------------------------------- | :---------- | +| `loadErc20` | (`address`: `string`) => `Promise`\<[`CustomToken`](CustomToken.md)\> | - | +| `loadNft1155` | (`address`: `string`) => `Promise`\<[`NFT1155Api`](NFT1155Api.md)\> | - | +| `loadNft1155Api` | (`api`: [`NFT1155Api`](NFT1155Api.md)) => `Promise`\<[`NFT1155Api`](NFT1155Api.md)\> | - | +| `loadNft1155Contract` | (`address`: `string`) => `Promise`\<[`Nft1155Contract`](Nft1155Contract.md)\> | - | +| `loadNft721` | (`address`: `string`) => `Promise`\<[`NFT721Api`](NFT721Api.md)\> | - | +| `loadNft721Api` | (`api`: [`NFT721Api`](NFT721Api.md)) => `Promise`\<[`NFT721Api`](NFT721Api.md)\> | - | +| `loadNft721Contract` | (`address`: `string`) => `Promise`\<[`Nft721Contract`](Nft721Contract.md)\> | - | #### Defined in -[src/nevermined/Nevermined.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L74) +[src/nevermined/Nevermined.ts:121](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L121) --- @@ -145,7 +153,7 @@ If keeper is connected #### Defined in -[src/nevermined/Nevermined.ts:209](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L209) +[src/nevermined/Nevermined.ts:261](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L261) --- @@ -157,7 +165,7 @@ Keeper instance. #### Defined in -[src/nevermined/Nevermined.ts:154](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L154) +[src/nevermined/Nevermined.ts:201](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L201) --- @@ -169,7 +177,7 @@ ERC-1155 Nfts API #### Defined in -[src/nevermined/Nevermined.ts:179](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L179) +[src/nevermined/Nevermined.ts:226](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L226) --- @@ -181,7 +189,7 @@ ERC-721 Nfts API #### Defined in -[src/nevermined/Nevermined.ts:184](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L184) +[src/nevermined/Nevermined.ts:231](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L231) --- @@ -193,7 +201,7 @@ Provenance submodule #### Defined in -[src/nevermined/Nevermined.ts:189](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L189) +[src/nevermined/Nevermined.ts:236](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L236) --- @@ -205,7 +213,7 @@ SearchApi API #### Defined in -[src/nevermined/Nevermined.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L194) +[src/nevermined/Nevermined.ts:241](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L241) --- @@ -217,7 +225,7 @@ SearchApi API #### Defined in -[src/nevermined/Nevermined.ts:199](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L199) +[src/nevermined/Nevermined.ts:246](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L246) --- @@ -229,17 +237,27 @@ Utils submodule #### Defined in -[src/nevermined/Nevermined.ts:204](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L204) +[src/nevermined/Nevermined.ts:251](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L251) + +--- + +### DEFAULT_INITIALIZATION_OPTIONS + +▪ `Static` **DEFAULT_INITIALIZATION_OPTIONS**: [`NeverminedInitializationOptions`](../interfaces/NeverminedInitializationOptions.md) + +#### Defined in + +[src/nevermined/Nevermined.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L24) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -247,17 +265,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -265,13 +283,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -283,13 +319,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -301,17 +337,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -319,13 +355,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -337,13 +373,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -355,31 +391,146 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -Instantiable.web3 +Instantiable.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +Instantiable.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -397,25 +548,26 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`Nevermined`](Nevermined.md)\> +▸ **getInstance**(`config`, `initOptions?`): `Promise`\<[`Nevermined`](Nevermined.md)\> Returns the instance of Nevermined. #### Parameters -| Name | Type | Description | -| :------- | :------------------------------------------ | :--------------------------------- | -| `config` | [`NeverminedOptions`](NeverminedOptions.md) | Nevermined instance configuration. | +| Name | Type | Description | +| :------------ | :------------------------------------------------------------------------------------ | :--------------------------------- | +| `config` | [`NeverminedOptions`](NeverminedOptions.md) | Nevermined instance configuration. | +| `initOptions` | [`NeverminedInitializationOptions`](../interfaces/NeverminedInitializationOptions.md) | - | #### Returns -`Promise`<[`Nevermined`](Nevermined.md)\> +`Promise`\<[`Nevermined`](Nevermined.md)\> A [Nevermined](Nevermined.md) instance @@ -434,13 +586,33 @@ const nevermined = await Nevermined.getInstance(config) #### Defined in -[src/nevermined/Nevermined.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Nevermined.ts#L34) +[src/nevermined/Nevermined.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L51) + +--- + +### getSearchOnlyInstance + +▸ **getSearchOnlyInstance**(`config`): `Promise`\<[`Nevermined`](Nevermined.md)\> + +#### Parameters + +| Name | Type | +| :------- | :------------------------------------------ | +| `config` | [`NeverminedOptions`](NeverminedOptions.md) | + +#### Returns + +`Promise`\<[`Nevermined`](Nevermined.md)\> + +#### Defined in + +[src/nevermined/Nevermined.ts:102](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Nevermined.ts#L102) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -465,4 +637,4 @@ const nevermined = await Nevermined.getInstance(config) #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NeverminedEvent.md b/docs/api-reference/classes/NeverminedEvent.md index 23b237b9c..bf121601f 100644 --- a/docs/api-reference/classes/NeverminedEvent.md +++ b/docs/api-reference/classes/NeverminedEvent.md @@ -2,6 +2,8 @@ # Class: NeverminedEvent +Abstract class to handle Smart Contract events + ## Hierarchy - [`Instantiable`](Instantiable.md) @@ -27,12 +29,14 @@ - [artifactsFolder](NeverminedEvent.md#artifactsfolder) - [circuitsFolder](NeverminedEvent.md#circuitsfolder) +- [client](NeverminedEvent.md#client) - [config](NeverminedEvent.md#config) - [instanceConfig](NeverminedEvent.md#instanceconfig) - [instantiableConfig](NeverminedEvent.md#instantiableconfig) - [logger](NeverminedEvent.md#logger) - [nevermined](NeverminedEvent.md#nevermined) -- [web3](NeverminedEvent.md#web3) +- [publicClient](NeverminedEvent.md#publicclient) +- [walletClient](NeverminedEvent.md#walletclient) ### Methods @@ -49,14 +53,22 @@ ### constructor -• `Protected` **new NeverminedEvent**(`contract`, `eventEmitter`) +• **new NeverminedEvent**(`contract`, `eventEmitter`): [`NeverminedEvent`](NeverminedEvent.md) + +Initializes the NeverminedEvent instance #### Parameters -| Name | Type | -| :------------- | :---------------------------------------------- | -| `contract` | [`ContractBase`](ContractBase.md) | -| `eventEmitter` | [`EventEmitter`](../interfaces/EventEmitter.md) | +| Name | Type | Description | +| :------------- | :---------------------------------------------- | :---------------------------- | +| `contract` | [`ContractBase`](ContractBase.md) | contract instance | +| `eventEmitter` | [`EventEmitter`](../interfaces/EventEmitter.md) | events emitter implementation | + +#### Returns + +[`NeverminedEvent`](NeverminedEvent.md) + +the NeverminedEvent instance #### Overrides @@ -64,17 +76,17 @@ #### Defined in -[src/events/NeverminedEvent.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L34) +[src/events/NeverminedEvent.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L26) ## Properties ### contract -• `Protected` **contract**: [`ContractBase`](ContractBase.md) = `null` +• `Protected` **contract**: [`ContractBase`](ContractBase.md) #### Defined in -[src/events/NeverminedEvent.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L29) +[src/events/NeverminedEvent.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L15) --- @@ -84,17 +96,17 @@ #### Defined in -[src/events/NeverminedEvent.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L28) +[src/events/NeverminedEvent.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L14) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -102,17 +114,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -120,13 +132,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -138,13 +168,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -156,17 +186,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -174,13 +204,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -192,13 +222,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -210,31 +240,146 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### getBlockNumber -▸ `Abstract` **getBlockNumber**(`...args`): `Promise`<`number`\> +▸ **getBlockNumber**(`...args`): `Promise`\<`bigint`\> #### Parameters @@ -244,17 +389,17 @@ Instantiable.web3 #### Returns -`Promise`<`number`\> +`Promise`\<`bigint`\> #### Defined in -[src/events/NeverminedEvent.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L32) +[src/events/NeverminedEvent.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L18) --- ### getEventData -▸ `Abstract` **getEventData**(`options`): [`EventResult`](../code-reference.md#eventresult) +▸ **getEventData**(`options`): [`EventResult`](../code-reference.md#eventresult) #### Parameters @@ -268,13 +413,13 @@ Instantiable.web3 #### Defined in -[src/events/NeverminedEvent.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L30) +[src/events/NeverminedEvent.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L16) --- ### getPastEvents -▸ `Abstract` **getPastEvents**(`options`): [`EventResult`](../code-reference.md#eventresult) +▸ **getPastEvents**(`options`): [`EventResult`](../code-reference.md#eventresult) #### Parameters @@ -288,34 +433,39 @@ Instantiable.web3 #### Defined in -[src/events/NeverminedEvent.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L31) +[src/events/NeverminedEvent.ts:17](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L17) --- ### once -▸ **once**(`callback?`, `options?`): `Promise`<[`EventResult`](../code-reference.md#eventresult)\> +▸ **once**(`callback`, `options`, `timeout?`): `Promise`\<[`EventResult`](../code-reference.md#eventresult)\> + +Subscribes to a contract event and waits for the first event to happen #### Parameters -| Name | Type | -| :---------- | :------------------------------------------------------------------------ | -| `callback?` | (`events`: [`EventResult`](../code-reference.md#eventresult)[]) => `void` | -| `options?` | [`EventOptions`](../interfaces/EventOptions.md) | +| Name | Type | Default value | Description | +| :--------- | :------------------------------------------------------------------------ | :------------ | :------------------------------------------- | +| `callback` | (`events`: [`EventResult`](../code-reference.md#eventresult)[]) => `void` | `undefined` | function called when the event is triggered | +| `options` | [`EventOptions`](../interfaces/EventOptions.md) | `undefined` | event filter options | +| `timeout` | `number` | `15_000` | maximum time to wait for the event to happen | #### Returns -`Promise`<[`EventResult`](../code-reference.md#eventresult)\> +`Promise`\<[`EventResult`](../code-reference.md#eventresult)\> + +Promise with the event data #### Defined in -[src/events/NeverminedEvent.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L54) +[src/events/NeverminedEvent.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L60) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -333,7 +483,7 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- @@ -341,26 +491,30 @@ Instantiable.web3 ▸ **subscribe**(`callback`, `options`): [`ContractEventSubscription`](../interfaces/ContractEventSubscription.md) +Subscribes to a contract event + #### Parameters -| Name | Type | -| :--------- | :------------------------------------------------------------------------ | -| `callback` | (`events`: [`EventResult`](../code-reference.md#eventresult)[]) => `void` | -| `options` | [`EventOptions`](../interfaces/EventOptions.md) | +| Name | Type | Description | +| :--------- | :------------------------------------------------------------------------ | :------------------------------------------ | +| `callback` | (`events`: [`EventResult`](../code-reference.md#eventresult)[]) => `void` | function called when the event is triggered | +| `options` | [`EventOptions`](../interfaces/EventOptions.md) | event filter options | #### Returns [`ContractEventSubscription`](../interfaces/ContractEventSubscription.md) +[ContractEventSubscription](../interfaces/ContractEventSubscription.md) + #### Defined in -[src/events/NeverminedEvent.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L40) +[src/events/NeverminedEvent.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L38) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -378,13 +532,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -409,4 +563,4 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NeverminedNode.md b/docs/api-reference/classes/NeverminedNode.md index e3600374b..e696740df 100644 --- a/docs/api-reference/classes/NeverminedNode.md +++ b/docs/api-reference/classes/NeverminedNode.md @@ -21,13 +21,15 @@ The Nevermined Node is the technical component executed by the Publishers allowi - [artifactsFolder](NeverminedNode.md#artifactsfolder) - [circuitsFolder](NeverminedNode.md#circuitsfolder) +- [client](NeverminedNode.md#client) - [config](NeverminedNode.md#config) - [instanceConfig](NeverminedNode.md#instanceconfig) - [instantiableConfig](NeverminedNode.md#instantiableconfig) - [logger](NeverminedNode.md#logger) - [nevermined](NeverminedNode.md#nevermined) +- [publicClient](NeverminedNode.md#publicclient) - [url](NeverminedNode.md#url) -- [web3](NeverminedNode.md#web3) +- [walletClient](NeverminedNode.md#walletclient) ### Methods @@ -76,7 +78,7 @@ The Nevermined Node is the technical component executed by the Publishers allowi ### constructor -• **new NeverminedNode**(`config`) +• **new NeverminedNode**(`config`): [`NeverminedNode`](NeverminedNode.md) #### Parameters @@ -84,23 +86,27 @@ The Nevermined Node is the technical component executed by the Publishers allowi | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`NeverminedNode`](NeverminedNode.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/services/node/NeverminedNode.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L38) +[src/services/node/NeverminedNode.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L39) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -108,17 +114,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -126,13 +132,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -144,13 +168,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -162,17 +186,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -180,13 +204,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -198,13 +222,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -216,13 +240,95 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- ### url -• `Private` `get` **url**(): `string` +• `get` **url**(): `string` #### Returns @@ -230,31 +336,64 @@ Instantiable.nevermined #### Defined in -[src/services/node/NeverminedNode.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L34) +[src/services/node/NeverminedNode.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L35) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### claimNFT -▸ **claimNFT**(`agreementId`, `nftHolder`, `nftReceiver`, `nftAmount`, `ercType?`, `did?`, `serviceIndex?`): `Promise`<`boolean`\> +▸ **claimNFT**(`agreementId`, `nftHolder`, `nftReceiver`, `nftAmount`, `ercType?`, `did?`, `serviceIndex?`): `Promise`\<`boolean`\> #### Parameters @@ -270,61 +409,61 @@ Instantiable.web3 #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Defined in -[src/services/node/NeverminedNode.ts:374](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L374) +[src/services/node/NeverminedNode.ts:379](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L379) --- ### computeLogs -▸ **computeLogs**(`agreementId`, `executionId`, `account`): `Promise`<`any`\> +▸ **computeLogs**(`agreementId`, `executionId`, `account`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------------ | :---------------------- | -| `agreementId` | `string` | -| `executionId` | `string` | -| `account` | [`Account`](Account.md) | +| Name | Type | +| :------------ | :---------------------------- | +| `agreementId` | `string` | +| `executionId` | `string` | +| `account` | [`NvmAccount`](NvmAccount.md) | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/node/NeverminedNode.ts:304](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L304) +[src/services/node/NeverminedNode.ts:309](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L309) --- ### computeStatus -▸ **computeStatus**(`agreementId`, `executionId`, `account`): `Promise`<`any`\> +▸ **computeStatus**(`agreementId`, `executionId`, `account`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------------ | :---------------------- | -| `agreementId` | `string` | -| `executionId` | `string` | -| `account` | [`Account`](Account.md) | +| Name | Type | +| :------------ | :---------------------------- | +| `agreementId` | `string` | +| `executionId` | `string` | +| `account` | [`NvmAccount`](NvmAccount.md) | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/node/NeverminedNode.ts:339](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L339) +[src/services/node/NeverminedNode.ts:344](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L344) --- ### consumeService -▸ **consumeService**(`did`, `agreementId`, `serviceEndpoint`, `account`, `files`, `destination`, `index?`, `result?`, `buyer?`, `babysig?`): `Promise`<`string`\> +▸ **consumeService**(`did`, `agreementId`, `serviceEndpoint`, `account`, `files`, `destination`, `index?`, `result?`, `buyer?`, `babysig?`): `Promise`\<`string`\> #### Parameters @@ -333,9 +472,9 @@ Instantiable.web3 | `did` | `string` | `undefined` | | `agreementId` | `string` | `undefined` | | `serviceEndpoint` | `string` | `undefined` | -| `account` | [`Account`](Account.md) | `undefined` | +| `account` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `files` | [`MetaDataExternalResource`](../interfaces/MetaDataExternalResource.md)[] | `undefined` | -| `destination` | `string` | `undefined` | +| `destination` | `undefined` \| `string` | `undefined` | | `index` | `number` | `-1` | | `result` | [`AssetResult`](../enums/AssetResult.md) | `AssetResult.DATA` | | `buyer?` | `string` | `undefined` | @@ -343,41 +482,41 @@ Instantiable.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/services/node/NeverminedNode.ts:172](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L172) +[src/services/node/NeverminedNode.ts:173](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L173) --- ### downloadService -▸ **downloadService**(`files`, `destination`, `index?`, `headers?`, `result?`): `Promise`<`string`\> +▸ **downloadService**(`files`, `destination`, `index?`, `headers?`, `result?`): `Promise`\<`string`\> #### Parameters | Name | Type | Default value | | :------------ | :------------------------------------------------------------------------ | :----------------- | | `files` | [`MetaDataExternalResource`](../interfaces/MetaDataExternalResource.md)[] | `undefined` | -| `destination` | `string` | `undefined` | +| `destination` | `undefined` \| `string` | `undefined` | | `index` | `number` | `-1` | | `headers?` | `Object` | `undefined` | | `result` | [`AssetResult`](../enums/AssetResult.md) | `AssetResult.DATA` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/services/node/NeverminedNode.ts:239](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L239) +[src/services/node/NeverminedNode.ts:240](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L240) --- ### encrypt -▸ **encrypt**(`did`, `document`, `method`): `Promise`<`any`\> +▸ **encrypt**(`did`, `document`, `method`): `Promise`\<`any`\> #### Parameters @@ -389,39 +528,39 @@ Instantiable.web3 #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/node/NeverminedNode.ts:219](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L219) +[src/services/node/NeverminedNode.ts:220](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L220) --- ### execute -▸ **execute**(`agreementId`, `workflowDid`, `account`): `Promise`<`any`\> +▸ **execute**(`agreementId`, `workflowDid`, `account`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------------ | :---------------------- | -| `agreementId` | `string` | -| `workflowDid` | `string` | -| `account` | [`Account`](Account.md) | +| Name | Type | +| :------------ | :---------------------------- | +| `agreementId` | `string` | +| `workflowDid` | `string` | +| `account` | [`NvmAccount`](NvmAccount.md) | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/node/NeverminedNode.ts:268](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L268) +[src/services/node/NeverminedNode.ts:269](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L269) --- ### fetchToken -▸ **fetchToken**(`grantToken`, `numberTries?`): `Promise`<`string`\> +▸ **fetchToken**(`grantToken`, `numberTries?`): `Promise`\<`string`\> #### Parameters @@ -432,11 +571,11 @@ Instantiable.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/services/node/NeverminedNode.ts:419](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L419) +[src/services/node/NeverminedNode.ts:428](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L428) --- @@ -450,7 +589,7 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L55) +[src/services/node/NeverminedNode.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L56) --- @@ -464,21 +603,21 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:59](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L59) +[src/services/node/NeverminedNode.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L60) --- ### getBabyjubPublicKey -▸ **getBabyjubPublicKey**(): `Promise`<`any`\> +▸ **getBabyjubPublicKey**(): `Promise`\<`any`\> #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/node/NeverminedNode.ts:138](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L138) +[src/services/node/NeverminedNode.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L139) --- @@ -492,7 +631,7 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:111](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L111) +[src/services/node/NeverminedNode.ts:112](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L112) --- @@ -512,7 +651,7 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:67](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L67) +[src/services/node/NeverminedNode.ts:68](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L68) --- @@ -532,7 +671,7 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:71](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L71) +[src/services/node/NeverminedNode.ts:72](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L72) --- @@ -546,7 +685,7 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:51](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L51) +[src/services/node/NeverminedNode.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L52) --- @@ -560,21 +699,21 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:143](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L143) +[src/services/node/NeverminedNode.ts:144](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L144) --- ### getEcdsaPublicKey -▸ **getEcdsaPublicKey**(): `Promise`<`any`\> +▸ **getEcdsaPublicKey**(): `Promise`\<`any`\> #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/node/NeverminedNode.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L133) +[src/services/node/NeverminedNode.ts:134](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L134) --- @@ -588,7 +727,7 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:79](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L79) +[src/services/node/NeverminedNode.ts:80](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L80) --- @@ -608,7 +747,7 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:75](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L75) +[src/services/node/NeverminedNode.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L76) --- @@ -622,21 +761,21 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:83](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L83) +[src/services/node/NeverminedNode.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L84) --- ### getNeverminedNodeInfo -▸ **getNeverminedNodeInfo**(): `Promise`<`any`\> +▸ **getNeverminedNodeInfo**(): `Promise`\<`any`\> #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/node/NeverminedNode.ts:119](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L119) +[src/services/node/NeverminedNode.ts:120](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L120) --- @@ -650,7 +789,7 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:103](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L103) +[src/services/node/NeverminedNode.ts:104](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L104) --- @@ -664,7 +803,7 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:107](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L107) +[src/services/node/NeverminedNode.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L108) --- @@ -678,21 +817,21 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L99) +[src/services/node/NeverminedNode.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L100) --- ### getProviderAddress -▸ **getProviderAddress**(): `Promise`<`any`\> +▸ **getProviderAddress**(): `Promise`\<`any`\> #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/node/NeverminedNode.ts:123](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L123) +[src/services/node/NeverminedNode.ts:124](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L124) --- @@ -706,21 +845,21 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L47) +[src/services/node/NeverminedNode.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L48) --- ### getRsaPublicKey -▸ **getRsaPublicKey**(): `Promise`<`any`\> +▸ **getRsaPublicKey**(): `Promise`\<`any`\> #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/node/NeverminedNode.ts:128](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L128) +[src/services/node/NeverminedNode.ts:129](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L129) --- @@ -740,28 +879,28 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L63) +[src/services/node/NeverminedNode.ts:64](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L64) --- ### getSubscriptionToken -▸ **getSubscriptionToken**(`did`, `account`): `Promise`<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> +▸ **getSubscriptionToken**(`did`, `account`): `Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> #### Parameters -| Name | Type | -| :-------- | :---------------------- | -| `did` | `string` | -| `account` | [`Account`](Account.md) | +| Name | Type | +| :-------- | :---------------------------- | +| `did` | `string` | +| `account` | [`NvmAccount`](NvmAccount.md) | #### Returns -`Promise`<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> +`Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> #### Defined in -[src/services/node/NeverminedNode.ts:489](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L489) +[src/services/node/NeverminedNode.ts:497](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L497) --- @@ -781,7 +920,7 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L115) +[src/services/node/NeverminedNode.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L116) --- @@ -795,7 +934,7 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:87](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L87) +[src/services/node/NeverminedNode.ts:88](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L88) --- @@ -809,7 +948,7 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:91](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L91) +[src/services/node/NeverminedNode.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L92) --- @@ -823,27 +962,27 @@ Instantiable.web3 #### Defined in -[src/services/node/NeverminedNode.ts:95](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L95) +[src/services/node/NeverminedNode.ts:96](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L96) --- ### getVersionInfo -▸ **getVersionInfo**(): `Promise`<`any`\> +▸ **getVersionInfo**(): `Promise`\<`any`\> #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/node/NeverminedNode.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L43) +[src/services/node/NeverminedNode.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L44) --- ### initializeServiceAgreement -▸ **initializeServiceAgreement**(`did`, `serviceAgreementId`, `serviceIndex`, `signature`, `consumerAddress`): `Promise`<`any`\> +▸ **initializeServiceAgreement**(`did`, `serviceAgreementId`, `serviceIndex`, `signature`, `consumerAddress`): `Promise`\<`any`\> #### Parameters @@ -857,17 +996,17 @@ Instantiable.web3 #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/node/NeverminedNode.ts:147](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L147) +[src/services/node/NeverminedNode.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L148) --- ### publishImmutableContent -▸ **publishImmutableContent**(`ddo`, `publishMetadata?`): `Promise`<{ `backend`: [`ImmutableBackends`](../enums/ImmutableBackends.md) ; `url`: `string` }\> +▸ **publishImmutableContent**(`ddo`, `publishMetadata?`): `Promise`\<\{ `backend`: [`ImmutableBackends`](../enums/ImmutableBackends.md) ; `url`: `string` }\> #### Parameters @@ -878,17 +1017,17 @@ Instantiable.web3 #### Returns -`Promise`<{ `backend`: [`ImmutableBackends`](../enums/ImmutableBackends.md) ; `url`: `string` }\> +`Promise`\<\{ `backend`: [`ImmutableBackends`](../enums/ImmutableBackends.md) ; `url`: `string` }\> #### Defined in -[src/services/node/NeverminedNode.ts:434](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L434) +[src/services/node/NeverminedNode.ts:443](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L443) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -906,13 +1045,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### uploadContent -▸ **uploadContent**(`data`, `encrypt?`, `backend?`): `Promise`<`any`\> +▸ **uploadContent**(`data`, `encrypt?`, `backend?`): `Promise`\<`any`\> #### Parameters @@ -924,17 +1063,17 @@ Instantiable.web3 #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/services/node/NeverminedNode.ts:461](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L461) +[src/services/node/NeverminedNode.ts:469](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L469) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -952,13 +1091,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -983,4 +1122,4 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NeverminedNodeError.md b/docs/api-reference/classes/NeverminedNodeError.md index f5244ce5c..dbc5a4830 100644 --- a/docs/api-reference/classes/NeverminedNodeError.md +++ b/docs/api-reference/classes/NeverminedNodeError.md @@ -16,6 +16,7 @@ ### Properties +- [cause](NeverminedNodeError.md#cause) - [message](NeverminedNodeError.md#message) - [name](NeverminedNodeError.md#name) - [stack](NeverminedNodeError.md#stack) @@ -30,7 +31,7 @@ ### constructor -• **new NeverminedNodeError**(`message`) +• **new NeverminedNodeError**(`message`): [`NeverminedNodeError`](NeverminedNodeError.md) #### Parameters @@ -38,16 +39,34 @@ | :-------- | :------- | | `message` | `string` | +#### Returns + +[`NeverminedNodeError`](NeverminedNodeError.md) + #### Overrides Error.constructor #### Defined in -[src/errors/NeverminedNodeError.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/errors/NeverminedNodeError.ts#L2) +[src/errors/NeverminedErrors.ts:2](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L2) ## Properties +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +Error.cause + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + ### message • **message**: `string` @@ -58,7 +77,7 @@ Error.message #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1068 +node_modules/typescript/lib/lib.es5.d.ts:1077 --- @@ -72,7 +91,7 @@ Error.name #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1067 +node_modules/typescript/lib/lib.es5.d.ts:1076 --- @@ -86,7 +105,7 @@ Error.stack #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1069 +node_modules/typescript/lib/lib.es5.d.ts:1078 --- @@ -94,12 +113,16 @@ node_modules/typescript/lib/lib.es5.d.ts:1069 ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Type declaration ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -111,17 +134,13 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from Error.prepareStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:11 +node_modules/@types/node/globals.d.ts:28 --- @@ -135,13 +154,13 @@ Error.stackTraceLimit #### Defined in -node_modules/@types/node/globals.d.ts:13 +node_modules/@types/node/globals.d.ts:30 ## Methods ### captureStackTrace -▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object @@ -162,4 +181,4 @@ Error.captureStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:4 +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/NeverminedOptions.md b/docs/api-reference/classes/NeverminedOptions.md index bc837a27e..656aedc60 100644 --- a/docs/api-reference/classes/NeverminedOptions.md +++ b/docs/api-reference/classes/NeverminedOptions.md @@ -10,9 +10,10 @@ ### Properties -- [aaveConfig](NeverminedOptions.md#aaveconfig) - [accounts](NeverminedOptions.md#accounts) +- [appUrl](NeverminedOptions.md#appurl) - [artifactsFolder](NeverminedOptions.md#artifactsfolder) +- [chainId](NeverminedOptions.md#chainid) - [circuitsFolder](NeverminedOptions.md#circuitsfolder) - [gasMultiplier](NeverminedOptions.md#gasmultiplier) - [gasStationUri](NeverminedOptions.md#gasstationuri) @@ -27,32 +28,39 @@ - [verbose](NeverminedOptions.md#verbose) - [web3Provider](NeverminedOptions.md#web3provider) - [web3ProviderUri](NeverminedOptions.md#web3provideruri) +- [zeroDevProjectId](NeverminedOptions.md#zerodevprojectid) ## Constructors ### constructor -• **new NeverminedOptions**() +• **new NeverminedOptions**(): [`NeverminedOptions`](NeverminedOptions.md) + +#### Returns + +[`NeverminedOptions`](NeverminedOptions.md) ## Properties -### aaveConfig +### accounts -• `Optional` **aaveConfig**: [`AaveConfig`](../interfaces/AaveConfig.md) +• `Optional` **accounts**: [`NvmAccount`](NvmAccount.md)[] #### Defined in -[src/models/NeverminedOptions.ts:58](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L58) +[src/models/NeverminedOptions.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L73) --- -### accounts +### appUrl + +• `Optional` **appUrl**: `string` -• `Optional` **accounts**: `Signer`[] +The Nevermined App URL. #### Defined in -[src/models/NeverminedOptions.ts:69](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L69) +[src/models/NeverminedOptions.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L16) --- @@ -64,7 +72,17 @@ The folder where the nevermined contract artifacts are located. #### Defined in -[src/models/NeverminedOptions.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L63) +[src/models/NeverminedOptions.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L67) + +--- + +### chainId + +• `Optional` **chainId**: `number` + +#### Defined in + +[src/models/NeverminedOptions.ts:5](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L5) --- @@ -76,7 +94,7 @@ The folder where the nevermined contract circuits are located. #### Defined in -[src/models/NeverminedOptions.ts:67](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L67) +[src/models/NeverminedOptions.ts:71](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L71) --- @@ -89,7 +107,7 @@ Can be used to speed up the transactions. #### Defined in -[src/models/NeverminedOptions.ts:51](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L51) +[src/models/NeverminedOptions.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L57) --- @@ -101,7 +119,7 @@ Use a gas station to calculate transaction fees #### Defined in -[src/models/NeverminedOptions.ts:85](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L85) +[src/models/NeverminedOptions.ts:89](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L89) --- @@ -113,7 +131,7 @@ Enpoint for the graph-node http query #### Defined in -[src/models/NeverminedOptions.ts:56](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L56) +[src/models/NeverminedOptions.ts:62](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L62) --- @@ -127,7 +145,7 @@ the asset resolution requests. #### Defined in -[src/models/NeverminedOptions.ts:76](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L76) +[src/models/NeverminedOptions.ts:80](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L80) --- @@ -137,7 +155,7 @@ the asset resolution requests. #### Defined in -[src/models/NeverminedOptions.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L78) +[src/models/NeverminedOptions.ts:82](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L82) --- @@ -147,7 +165,7 @@ the asset resolution requests. #### Defined in -[src/models/NeverminedOptions.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L80) +[src/models/NeverminedOptions.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L84) --- @@ -159,7 +177,7 @@ Marketplace auth token. #### Defined in -[src/models/NeverminedOptions.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L35) +[src/models/NeverminedOptions.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L41) --- @@ -176,7 +194,7 @@ https://docs.nevermined.io/docs/architecture/marketplace-api/ #### Defined in -[src/models/NeverminedOptions.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L17) +[src/models/NeverminedOptions.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L23) --- @@ -192,7 +210,7 @@ The public address of the Nevermined Node. #### Defined in -[src/models/NeverminedOptions.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L30) +[src/models/NeverminedOptions.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L36) --- @@ -209,7 +227,7 @@ https://docs.nevermined.io/docs/architecture/node/ #### Defined in -[src/models/NeverminedOptions.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L24) +[src/models/NeverminedOptions.ts:30](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L30) --- @@ -221,7 +239,7 @@ Log level. #### Defined in -[src/models/NeverminedOptions.ts:45](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L45) +[src/models/NeverminedOptions.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L51) --- @@ -233,7 +251,7 @@ Web3 Provider. #### Defined in -[src/models/NeverminedOptions.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L40) +[src/models/NeverminedOptions.ts:46](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L46) --- @@ -247,4 +265,16 @@ It's possible to use a public available provider or a private/paid one like Infu #### Defined in -[src/models/NeverminedOptions.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/NeverminedOptions.ts#L11) +[src/models/NeverminedOptions.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L11) + +--- + +### zeroDevProjectId + +• `Optional` **zeroDevProjectId**: `string` + +ZeroDev project id + +#### Defined in + +[src/models/NeverminedOptions.ts:94](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NeverminedOptions.ts#L94) diff --git a/docs/api-reference/classes/Nft1155Contract.md b/docs/api-reference/classes/Nft1155Contract.md index a15c8ff94..73ea6cf0b 100644 --- a/docs/api-reference/classes/Nft1155Contract.md +++ b/docs/api-reference/classes/Nft1155Contract.md @@ -28,12 +28,14 @@ NFTs contracts DTO allowing to manage Nevermined ERC-1155 NFTs - [artifactsFolder](Nft1155Contract.md#artifactsfolder) - [circuitsFolder](Nft1155Contract.md#circuitsfolder) +- [client](Nft1155Contract.md#client) - [config](Nft1155Contract.md#config) - [instanceConfig](Nft1155Contract.md#instanceconfig) - [instantiableConfig](Nft1155Contract.md#instantiableconfig) - [logger](Nft1155Contract.md#logger) - [nevermined](Nft1155Contract.md#nevermined) -- [web3](Nft1155Contract.md#web3) +- [publicClient](Nft1155Contract.md#publicclient) +- [walletClient](Nft1155Contract.md#walletclient) ### Methods @@ -44,10 +46,9 @@ NFTs contracts DTO allowing to manage Nevermined ERC-1155 NFTs - [call](Nft1155Contract.md#call) - [createClone](Nft1155Contract.md#createclone) - [getFromAddress](Nft1155Contract.md#getfromaddress) -- [getInputsOfMethod](Nft1155Contract.md#getinputsofmethod) - [getMintedEntries](Nft1155Contract.md#getmintedentries) - [getNFTAttributes](Nft1155Contract.md#getnftattributes) -- [getSignatureOfMethod](Nft1155Contract.md#getsignatureofmethod) +- [getTransactionLogs](Nft1155Contract.md#gettransactionlogs) - [grantOperatorRole](Nft1155Contract.md#grantoperatorrole) - [init](Nft1155Contract.md#init) - [isApprovedForAll](Nft1155Contract.md#isapprovedforall) @@ -59,6 +60,7 @@ NFTs contracts DTO allowing to manage Nevermined ERC-1155 NFTs - [sendFrom](Nft1155Contract.md#sendfrom) - [setApprovalForAll](Nft1155Contract.md#setapprovalforall) - [setInstanceConfig](Nft1155Contract.md#setinstanceconfig) +- [someLog](Nft1155Contract.md#somelog) - [transferNft](Nft1155Contract.md#transfernft) - [uri](Nft1155Contract.md#uri) - [getInstance](Nft1155Contract.md#getinstance) @@ -69,7 +71,7 @@ NFTs contracts DTO allowing to manage Nevermined ERC-1155 NFTs ### constructor -• **new Nft1155Contract**(`contractName`) +• **new Nft1155Contract**(`contractName`): [`Nft1155Contract`](Nft1155Contract.md) #### Parameters @@ -77,19 +79,23 @@ NFTs contracts DTO allowing to manage Nevermined ERC-1155 NFTs | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`Nft1155Contract`](Nft1155Contract.md) + #### Inherited from [NFTContractsBase](NFTContractsBase.md).[constructor](NFTContractsBase.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -97,13 +103,13 @@ NFTs contracts DTO allowing to manage Nevermined ERC-1155 NFTs #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -111,7 +117,7 @@ NFTs contracts DTO allowing to manage Nevermined ERC-1155 NFTs #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -125,13 +131,13 @@ NFTs contracts DTO allowing to manage Nevermined ERC-1155 NFTs #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -139,7 +145,7 @@ NFTs contracts DTO allowing to manage Nevermined ERC-1155 NFTs #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -153,17 +159,17 @@ NFTs contracts DTO allowing to manage Nevermined ERC-1155 NFTs #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -171,17 +177,17 @@ NFTContractsBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -189,13 +195,31 @@ NFTContractsBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +NFTContractsBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -207,13 +231,13 @@ NFTContractsBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -225,17 +249,17 @@ NFTContractsBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -243,13 +267,13 @@ NFTContractsBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -261,13 +285,13 @@ NFTContractsBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -279,31 +303,146 @@ NFTContractsBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -NFTContractsBase.web3 +NFTContractsBase.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +NFTContractsBase.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### \_createClone -▸ `Protected` **\_createClone**(`ercType`, `name`, `symbol`, `uri`, `cap`, `operators?`, `from?`, `txParams?`): `Promise`<`any`\> +▸ **\_createClone**(`ercType`, `name`, `symbol`, `uri`, `cap`, `operators?`, `from`, `txParams?`): `Promise`\<`any`\> Creates a contract clone of an existing contract instance @@ -315,14 +454,14 @@ Creates a contract clone of an existing contract instance | `name` | `string` | `undefined` | NFT Contract name | | `symbol` | `string` | `undefined` | NFT Contract symbol | | `uri` | `string` | `undefined` | NFT Contract metadata uri | -| `cap` | `bigint` | `undefined` | NFT cap (just for ERC-721) | +| `cap` | `undefined` \| `bigint` | `undefined` | NFT cap (just for ERC-721) | | `operators` | `string`[] | `[]` | Array of account addresses to be added as NFT operators | -| `from?` | [`Account`](Account.md) | `undefined` | Sender account | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | - | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> Contract Receipt @@ -332,13 +471,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L34) +[src/keeper/contracts/NFTContractsBase.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L41) --- ### balance -▸ **balance**(`address`, `did`): `Promise`<`bigint`\> +▸ **balance**(`address`, `did`): `Promise`\<`bigint`\> Get an address balance for a specific NFT with id `did` @@ -351,44 +490,44 @@ Get an address balance for a specific NFT with id `did` #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> #### Defined in -[src/keeper/contracts/Nft1155Contract.ts:116](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft1155Contract.ts#L116) +[src/keeper/contracts/Nft1155Contract.ts:120](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft1155Contract.ts#L120) --- ### burn -▸ **burn**(`from`, `tokenId`, `amount`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **burn**(`from`, `tokenId`, `amount`, `txParams?`): `Promise`\<`any`\> It burns some editions of a NFT (ERC-1155) #### Parameters -| Name | Type | Description | -| :---------- | :---------------------------------------------- | :--------------------------------------- | -| `from` | `string` | Account address burning the NFT editions | -| `tokenId` | `string` | The NFT id to burn | -| `amount` | `bigint` | Number of editions to burn | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | +| Name | Type | Description | +| :---------- | :---------------------------------------------- | :-------------------------------- | +| `from` | [`NvmAccount`](NvmAccount.md) | Account burning the NFT editions | +| `tokenId` | `string` | The NFT id to burn | +| `amount` | `bigint` | Number of editions to burn | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/Nft1155Contract.ts:171](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft1155Contract.ts#L171) +[src/keeper/contracts/Nft1155Contract.ts:176](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft1155Contract.ts#L176) --- ### burnFromHolder -▸ **burnFromHolder**(`holder`, `tokenId`, `amount`, `from`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **burnFromHolder**(`holder`, `tokenId`, `amount`, `from`, `txParams?`): `Promise`\<`any`\> It burns some editions of a NFT (ERC-1155) @@ -399,24 +538,24 @@ It burns some editions of a NFT (ERC-1155) | `holder` | `string` | Address of the account holding the NFT editions that are going to be burned | | `tokenId` | `string` | The NFT id to burn | | `amount` | `bigint` | Number of editions to burn | -| `from` | `string` | Account address burning the NFT editions | +| `from` | [`NvmAccount`](NvmAccount.md) | Account burning the NFT editions | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/Nft1155Contract.ts:185](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft1155Contract.ts#L185) +[src/keeper/contracts/Nft1155Contract.ts:195](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft1155Contract.ts#L195) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -426,15 +565,15 @@ Contract Receipt #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -442,13 +581,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### createClone -▸ **createClone**(`name`, `symbol`, `uri`, `operators?`, `from?`, `txParams?`): `Promise`<`any`\> +▸ **createClone**(`name`, `symbol`, `uri`, `operators?`, `from`, `txParams?`): `Promise`\<`any`\> Creates a contract clone of an existing contract instance @@ -460,24 +599,24 @@ Creates a contract clone of an existing contract instance | `symbol` | `string` | `undefined` | NFT Contract symbol | | `uri` | `string` | `undefined` | NFT Contract metadata uri | | `operators` | `string`[] | `[]` | Array of account addresses to be added as NFT operators | -| `from?` | [`Account`](Account.md) | `undefined` | Sender account | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | - | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/Nft1155Contract.ts:69](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft1155Contract.ts#L69) +[src/keeper/contracts/Nft1155Contract.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft1155Contract.ts#L73) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -487,7 +626,7 @@ Contract Receipt #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -495,39 +634,15 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[NFTContractsBase](NFTContractsBase.md).[getInputsOfMethod](NFTContractsBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getMintedEntries -▸ **getMintedEntries**(`owner`, `did?`): `Promise`<[`MintedEntry`](../interfaces/MintedEntry.md)[]\> +▸ **getMintedEntries**(`owner`, `did?`): `Promise`\<[`NFT1155MintedEntry`](../interfaces/NFT1155MintedEntry.md)[]\> -It gets all the `MintedEntries` events from the NFT Contract +It gets all the `NFT1155MintedEntry` events from the NFT Contract #### Parameters @@ -538,23 +653,19 @@ It gets all the `MintedEntries` events from the NFT Contract #### Returns -`Promise`<[`MintedEntry`](../interfaces/MintedEntry.md)[]\> +`Promise`\<[`NFT1155MintedEntry`](../interfaces/NFT1155MintedEntry.md)[]\> -An array of `MintedEntry` objects - -#### Inherited from - -[NFTContractsBase](NFTContractsBase.md).[getMintedEntries](NFTContractsBase.md#getmintedentries) +An array of `NFT1155MintedEntry` objects #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:125](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L125) +[src/keeper/contracts/Nft1155Contract.ts:221](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft1155Contract.ts#L221) --- ### getNFTAttributes -▸ **getNFTAttributes**(`did`): `Promise`<{ `mintCap`: `bigint` ; `nftInitialized`: `boolean` ; `nftSupply`: `bigint` ; `nftURI`: `string` }\> +▸ **getNFTAttributes**(`did`): `Promise`\<\{ `mintCap`: `bigint` ; `nftInitialized`: `boolean` ; `nftSupply`: `bigint` ; `nftURI`: `string` }\> #### Parameters @@ -564,7 +675,7 @@ An array of `MintedEntry` objects #### Returns -`Promise`<{ `mintCap`: `bigint` ; `nftInitialized`: `boolean` ; `nftSupply`: `bigint` ; `nftURI`: `string` }\> +`Promise`\<\{ `mintCap`: `bigint` ; `nftInitialized`: `boolean` ; `nftSupply`: `bigint` ; `nftURI`: `string` }\> #### Inherited from @@ -572,38 +683,38 @@ An array of `MintedEntry` objects #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:82](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L82) +[src/keeper/contracts/NFTContractsBase.ts:97](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L97) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[NFTContractsBase](NFTContractsBase.md).[getSignatureOfMethod](NFTContractsBase.md#getsignatureofmethod) +[NFTContractsBase](NFTContractsBase.md).[getTransactionLogs](NFTContractsBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### grantOperatorRole -▸ **grantOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **grantOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Add an address as operator in the NFT Contract @@ -612,12 +723,12 @@ Add an address as operator in the NFT Contract | Name | Type | Description | | :---------------- | :---------------------------------------------- | :----------------- | | `operatorAddress` | `string` | New minter address | -| `from?` | [`Account`](Account.md) | Sender account | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt @@ -627,24 +738,25 @@ Contract Receipt #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:69](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L69) +[src/keeper/contracts/NFTContractsBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L84) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -652,13 +764,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### isApprovedForAll -▸ **isApprovedForAll**(`accountAddress`, `operatorAddress`): `Promise`<`unknown`\> +▸ **isApprovedForAll**(`accountAddress`, `operatorAddress`): `Promise`\<`unknown`\> Checks if the operator is approved for an account address @@ -671,19 +783,19 @@ Checks if the operator is approved for an account address #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> Boolean #### Defined in -[src/keeper/contracts/Nft1155Contract.ts:87](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft1155Contract.ts#L87) +[src/keeper/contracts/Nft1155Contract.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft1155Contract.ts#L91) --- ### isOperator -▸ **isOperator**(`address`): `Promise`<`boolean`\> +▸ **isOperator**(`address`): `Promise`\<`boolean`\> Checks if an account is an operator in the NFT contract @@ -695,7 +807,7 @@ Checks if an account is an operator in the NFT contract #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if is an operator @@ -705,13 +817,13 @@ true if is an operator #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L78) +[src/keeper/contracts/NFTContractsBase.ts:93](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L93) --- ### mint -▸ **mint**(`to`, `did`, `amount`, `from`, `data?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **mint**(`to`, `did`, `amount`, `from`, `data?`, `txParams?`): `Promise`\<`any`\> It mints some editions of a NFT (ERC-1155) @@ -722,31 +834,31 @@ It mints some editions of a NFT (ERC-1155) | `to` | `string` | Account address of the NFT receiver | | `did` | `string` | The NFT id to mint | | `amount` | `bigint` | Number of editions to mint | -| `from` | `string` | Account address minting the NFT | +| `from` | [`NvmAccount`](NvmAccount.md) | Account minting the NFT | | `data?` | `string` | Data | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/Nft1155Contract.ts:151](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft1155Contract.ts#L151) +[src/keeper/contracts/Nft1155Contract.ts:155](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft1155Contract.ts#L155) --- ### owner -▸ **owner**(): `Promise`<`string`\> +▸ **owner**(): `Promise`\<`string`\> Gets the contract owner #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> Address of the contract owner @@ -756,13 +868,13 @@ Address of the contract owner #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L19) +[src/keeper/contracts/NFTContractsBase.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L26) --- ### revokeOperatorRole -▸ **revokeOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **revokeOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Revoke an address as operator in the NFT Contract @@ -771,12 +883,12 @@ Revoke an address as operator in the NFT Contract | Name | Type | Description | | :---------------- | :---------------------------------------------- | :----------------------- | | `operatorAddress` | `string` | Minter address to revoke | -| `from?` | [`Account`](Account.md) | Sender account | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt @@ -786,26 +898,26 @@ Contract Receipt #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L115) +[src/keeper/contracts/NFTContractsBase.ts:130](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L130) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -813,26 +925,26 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -840,13 +952,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setApprovalForAll -▸ **setApprovalForAll**(`operatorAddress`, `approved`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **setApprovalForAll**(`operatorAddress`, `approved`, `from`, `txParams?`): `Promise`\<`any`\> Configure approval for a specific operator address @@ -856,24 +968,24 @@ Configure approval for a specific operator address | :---------------- | :---------------------------------------------- | :-------------------------------- | | `operatorAddress` | `string` | Operator address | | `approved` | `boolean` | Is approved | -| `from?` | [`Account`](Account.md) | Sender account | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/Nft1155Contract.ts:100](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft1155Contract.ts#L100) +[src/keeper/contracts/Nft1155Contract.ts:104](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft1155Contract.ts#L104) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -891,13 +1003,37 @@ Contract Receipt #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[NFTContractsBase](NFTContractsBase.md).[someLog](NFTContractsBase.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### transferNft -▸ **transferNft**(`did`, `to`, `amount`, `from`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **transferNft**(`did`, `to`, `amount`, `from`, `txParams?`): `Promise`\<`any`\> It transfers a NFT @@ -908,24 +1044,24 @@ It transfers a NFT | `did` | `string` | The NFT id | | `to` | `string` | Account address of the NFT receiver | | `amount` | `bigint` | Number of editions to transfer. Typically just 1 | -| `from` | `string` | Account address transferring the NFT | +| `from` | [`NvmAccount`](NvmAccount.md) | Account transferring the NFT | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/Nft1155Contract.ts:130](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft1155Contract.ts#L130) +[src/keeper/contracts/Nft1155Contract.ts:134](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft1155Contract.ts#L134) --- ### uri -▸ **uri**(`did`): `Promise`<`string`\> +▸ **uri**(`did`): `Promise`\<`string`\> It returns the NFT metadata uri @@ -937,19 +1073,19 @@ It returns the NFT metadata uri #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> The NFT metadata url #### Defined in -[src/keeper/contracts/Nft1155Contract.ts:201](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft1155Contract.ts#L201) +[src/keeper/contracts/Nft1155Contract.ts:211](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft1155Contract.ts#L211) --- ### getInstance -▸ `Static` **getInstance**(`config`, `address?`, `contractName?`, `artifactsFolder?`): `Promise`<[`Nft1155Contract`](Nft1155Contract.md)\> +▸ **getInstance**(`config`, `address?`, `contractName?`, `artifactsFolder?`): `Promise`\<[`Nft1155Contract`](Nft1155Contract.md)\> #### Parameters @@ -958,11 +1094,11 @@ The NFT metadata url | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | | `address?` | `string` | `undefined` | | `contractName` | `string` | `'NFT1155Upgradeable'` | -| `artifactsFolder` | `string` | `config.artifactsFolder` | +| `artifactsFolder` | `undefined` \| `string` | `config.artifactsFolder` | #### Returns -`Promise`<[`Nft1155Contract`](Nft1155Contract.md)\> +`Promise`\<[`Nft1155Contract`](Nft1155Contract.md)\> #### Overrides @@ -970,13 +1106,13 @@ The NFT metadata url #### Defined in -[src/keeper/contracts/Nft1155Contract.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft1155Contract.ts#L14) +[src/keeper/contracts/Nft1155Contract.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft1155Contract.ts#L15) --- ### getInstanceUsingABI -▸ `Static` **getInstanceUsingABI**(`config`, `address`, `solidityABI`): `Promise`<[`Nft1155Contract`](Nft1155Contract.md)\> +▸ **getInstanceUsingABI**(`config`, `address`, `solidityABI`): `Promise`\<[`Nft1155Contract`](Nft1155Contract.md)\> #### Parameters @@ -988,17 +1124,17 @@ The NFT metadata url #### Returns -`Promise`<[`Nft1155Contract`](Nft1155Contract.md)\> +`Promise`\<[`Nft1155Contract`](Nft1155Contract.md)\> #### Defined in -[src/keeper/contracts/Nft1155Contract.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft1155Contract.ts#L39) +[src/keeper/contracts/Nft1155Contract.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft1155Contract.ts#L44) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1023,4 +1159,4 @@ The NFT metadata url #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/Nft721Contract.md b/docs/api-reference/classes/Nft721Contract.md index 30d370a38..b44cd71e8 100644 --- a/docs/api-reference/classes/Nft721Contract.md +++ b/docs/api-reference/classes/Nft721Contract.md @@ -26,12 +26,14 @@ - [artifactsFolder](Nft721Contract.md#artifactsfolder) - [circuitsFolder](Nft721Contract.md#circuitsfolder) +- [client](Nft721Contract.md#client) - [config](Nft721Contract.md#config) - [instanceConfig](Nft721Contract.md#instanceconfig) - [instantiableConfig](Nft721Contract.md#instantiableconfig) - [logger](Nft721Contract.md#logger) - [nevermined](Nft721Contract.md#nevermined) -- [web3](Nft721Contract.md#web3) +- [publicClient](Nft721Contract.md#publicclient) +- [walletClient](Nft721Contract.md#walletclient) ### Methods @@ -41,10 +43,9 @@ - [call](Nft721Contract.md#call) - [createClone](Nft721Contract.md#createclone) - [getFromAddress](Nft721Contract.md#getfromaddress) -- [getInputsOfMethod](Nft721Contract.md#getinputsofmethod) - [getMintedEntries](Nft721Contract.md#getmintedentries) - [getNFTAttributes](Nft721Contract.md#getnftattributes) -- [getSignatureOfMethod](Nft721Contract.md#getsignatureofmethod) +- [getTransactionLogs](Nft721Contract.md#gettransactionlogs) - [grantOperatorRole](Nft721Contract.md#grantoperatorrole) - [init](Nft721Contract.md#init) - [isApprovedForAll](Nft721Contract.md#isapprovedforall) @@ -58,6 +59,7 @@ - [sendFrom](Nft721Contract.md#sendfrom) - [setApprovalForAll](Nft721Contract.md#setapprovalforall) - [setInstanceConfig](Nft721Contract.md#setinstanceconfig) +- [someLog](Nft721Contract.md#somelog) - [tokenURI](Nft721Contract.md#tokenuri) - [getInstance](Nft721Contract.md#getinstance) - [getInstanceUsingABI](Nft721Contract.md#getinstanceusingabi) @@ -67,7 +69,7 @@ ### constructor -• **new Nft721Contract**(`contractName`) +• **new Nft721Contract**(`contractName`): [`Nft721Contract`](Nft721Contract.md) #### Parameters @@ -75,19 +77,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`Nft721Contract`](Nft721Contract.md) + #### Inherited from [NFTContractsBase](NFTContractsBase.md).[constructor](NFTContractsBase.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -95,13 +101,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -109,7 +115,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -123,13 +129,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -137,7 +143,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -151,17 +157,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -169,17 +175,17 @@ NFTContractsBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -187,13 +193,31 @@ NFTContractsBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +NFTContractsBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -205,13 +229,13 @@ NFTContractsBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -223,17 +247,17 @@ NFTContractsBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -241,13 +265,13 @@ NFTContractsBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -259,13 +283,13 @@ NFTContractsBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -277,31 +301,146 @@ NFTContractsBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -NFTContractsBase.web3 +NFTContractsBase.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +NFTContractsBase.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### \_createClone -▸ `Protected` **\_createClone**(`ercType`, `name`, `symbol`, `uri`, `cap`, `operators?`, `from?`, `txParams?`): `Promise`<`any`\> +▸ **\_createClone**(`ercType`, `name`, `symbol`, `uri`, `cap`, `operators?`, `from`, `txParams?`): `Promise`\<`any`\> Creates a contract clone of an existing contract instance @@ -313,14 +452,14 @@ Creates a contract clone of an existing contract instance | `name` | `string` | `undefined` | NFT Contract name | | `symbol` | `string` | `undefined` | NFT Contract symbol | | `uri` | `string` | `undefined` | NFT Contract metadata uri | -| `cap` | `bigint` | `undefined` | NFT cap (just for ERC-721) | +| `cap` | `undefined` \| `bigint` | `undefined` | NFT cap (just for ERC-721) | | `operators` | `string`[] | `[]` | Array of account addresses to be added as NFT operators | -| `from?` | [`Account`](Account.md) | `undefined` | Sender account | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | - | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> Contract Receipt @@ -330,13 +469,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L34) +[src/keeper/contracts/NFTContractsBase.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L41) --- ### balanceOf -▸ **balanceOf**(`owner`): `Promise`<`bigint`\> +▸ **balanceOf**(`owner`): `Promise`\<`bigint`\> #### Parameters @@ -346,17 +485,17 @@ Contract Receipt #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> #### Defined in -[src/keeper/contracts/Nft721Contract.ts:117](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft721Contract.ts#L117) +[src/keeper/contracts/Nft721Contract.ts:119](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft721Contract.ts#L119) --- ### burn -▸ **burn**(`tokenId`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **burn**(`tokenId`, `from`, `txParams?`): `Promise`\<`any`\> It burns some editions of a NFT (ERC-721) @@ -365,24 +504,24 @@ It burns some editions of a NFT (ERC-721) | Name | Type | Description | | :---------- | :---------------------------------------------- | :-------------------------------- | | `tokenId` | `string` | The NFT id to burn | -| `from?` | [`Account`](Account.md) | The account burning the NFT | +| `from` | [`NvmAccount`](NvmAccount.md) | The account burning the NFT | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/Nft721Contract.ts:100](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft721Contract.ts#L100) +[src/keeper/contracts/Nft721Contract.ts:102](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft721Contract.ts#L102) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -392,15 +531,15 @@ Contract Receipt #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -408,13 +547,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### createClone -▸ **createClone**(`name`, `symbol`, `uri`, `cap`, `operators?`, `from?`, `txParams?`): `Promise`<`any`\> +▸ **createClone**(`name`, `symbol`, `uri`, `cap`, `operators?`, `from`, `txParams?`): `Promise`\<`any`\> Creates a contract clone of an existing contract instance @@ -427,24 +566,24 @@ Creates a contract clone of an existing contract instance | `uri` | `string` | `undefined` | NFT Contract metadata uri | | `cap` | `bigint` | `undefined` | NFT cap | | `operators` | `string`[] | `[]` | Array of account addresses to be added as NFT operators | -| `from?` | [`Account`](Account.md) | `undefined` | Sender account | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | - | #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> Contract Receipt #### Defined in -[src/keeper/contracts/Nft721Contract.ts:66](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft721Contract.ts#L66) +[src/keeper/contracts/Nft721Contract.ts:68](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft721Contract.ts#L68) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -454,7 +593,7 @@ Contract Receipt #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -462,39 +601,15 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[NFTContractsBase](NFTContractsBase.md).[getInputsOfMethod](NFTContractsBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getMintedEntries -▸ **getMintedEntries**(`owner`, `did?`): `Promise`<[`MintedEntry`](../interfaces/MintedEntry.md)[]\> +▸ **getMintedEntries**(`owner`, `did?`): `Promise`\<[`NFT721MintedEntry`](../interfaces/NFT721MintedEntry.md)[]\> -It gets all the `MintedEntries` events from the NFT Contract +It gets all the `NFT721MintedEntry` events from the NFT Contract #### Parameters @@ -505,23 +620,19 @@ It gets all the `MintedEntries` events from the NFT Contract #### Returns -`Promise`<[`MintedEntry`](../interfaces/MintedEntry.md)[]\> +`Promise`\<[`NFT721MintedEntry`](../interfaces/NFT721MintedEntry.md)[]\> -An array of `MintedEntry` objects - -#### Inherited from - -[NFTContractsBase](NFTContractsBase.md).[getMintedEntries](NFTContractsBase.md#getmintedentries) +An array of `NFT721MintedEntry` objects #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:125](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L125) +[src/keeper/contracts/Nft721Contract.ts:137](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft721Contract.ts#L137) --- ### getNFTAttributes -▸ **getNFTAttributes**(`did`): `Promise`<{ `mintCap`: `bigint` ; `nftInitialized`: `boolean` ; `nftSupply`: `bigint` ; `nftURI`: `string` }\> +▸ **getNFTAttributes**(`did`): `Promise`\<\{ `mintCap`: `bigint` ; `nftInitialized`: `boolean` ; `nftSupply`: `bigint` ; `nftURI`: `string` }\> #### Parameters @@ -531,7 +642,7 @@ An array of `MintedEntry` objects #### Returns -`Promise`<{ `mintCap`: `bigint` ; `nftInitialized`: `boolean` ; `nftSupply`: `bigint` ; `nftURI`: `string` }\> +`Promise`\<\{ `mintCap`: `bigint` ; `nftInitialized`: `boolean` ; `nftSupply`: `bigint` ; `nftURI`: `string` }\> #### Inherited from @@ -539,38 +650,38 @@ An array of `MintedEntry` objects #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:82](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L82) +[src/keeper/contracts/NFTContractsBase.ts:97](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L97) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[NFTContractsBase](NFTContractsBase.md).[getSignatureOfMethod](NFTContractsBase.md#getsignatureofmethod) +[NFTContractsBase](NFTContractsBase.md).[getTransactionLogs](NFTContractsBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### grantOperatorRole -▸ **grantOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **grantOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Add an address as operator in the NFT Contract @@ -579,12 +690,12 @@ Add an address as operator in the NFT Contract | Name | Type | Description | | :---------------- | :---------------------------------------------- | :----------------- | | `operatorAddress` | `string` | New minter address | -| `from?` | [`Account`](Account.md) | Sender account | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt @@ -594,24 +705,25 @@ Contract Receipt #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:69](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L69) +[src/keeper/contracts/NFTContractsBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L84) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -619,13 +731,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### isApprovedForAll -▸ **isApprovedForAll**(`accountAddress`, `operatorAddress`): `Promise`<`unknown`\> +▸ **isApprovedForAll**(`accountAddress`, `operatorAddress`): `Promise`\<`unknown`\> #### Parameters @@ -636,17 +748,17 @@ Contract Receipt #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> #### Defined in -[src/keeper/contracts/Nft721Contract.ts:113](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft721Contract.ts#L113) +[src/keeper/contracts/Nft721Contract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft721Contract.ts#L115) --- ### isOperator -▸ **isOperator**(`address`): `Promise`<`boolean`\> +▸ **isOperator**(`address`): `Promise`\<`boolean`\> Checks if an account is an operator in the NFT contract @@ -658,7 +770,7 @@ Checks if an account is an operator in the NFT contract #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if is an operator @@ -668,35 +780,35 @@ true if is an operator #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L78) +[src/keeper/contracts/NFTContractsBase.ts:93](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L93) --- ### mint -▸ **mint**(`did`, `from`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **mint**(`did`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :---------- | :---------------------------------------------- | | `did` | `string` | -| `from` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/Nft721Contract.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft721Contract.ts#L78) +[src/keeper/contracts/Nft721Contract.ts:80](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft721Contract.ts#L80) --- ### mintWithURL -▸ **mintWithURL**(`to`, `did`, `url`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **mintWithURL**(`to`, `did`, `url`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -705,28 +817,28 @@ true if is an operator | `to` | `string` | | `did` | `string` | | `url` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/Nft721Contract.ts:82](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft721Contract.ts#L82) +[src/keeper/contracts/Nft721Contract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft721Contract.ts#L84) --- ### owner -▸ **owner**(): `Promise`<`string`\> +▸ **owner**(): `Promise`\<`string`\> Gets the contract owner #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> Address of the contract owner @@ -736,13 +848,13 @@ Address of the contract owner #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L19) +[src/keeper/contracts/NFTContractsBase.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L26) --- ### ownerOf -▸ **ownerOf**(`did`): `Promise`<`string`\> +▸ **ownerOf**(`did`): `Promise`\<`string`\> #### Parameters @@ -752,17 +864,17 @@ Address of the contract owner #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/Nft721Contract.ts:121](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft721Contract.ts#L121) +[src/keeper/contracts/Nft721Contract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft721Contract.ts#L123) --- ### revokeOperatorRole -▸ **revokeOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **revokeOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Revoke an address as operator in the NFT Contract @@ -771,12 +883,12 @@ Revoke an address as operator in the NFT Contract | Name | Type | Description | | :---------------- | :---------------------------------------------- | :----------------------- | | `operatorAddress` | `string` | Minter address to revoke | -| `from?` | [`Account`](Account.md) | Sender account | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Contract Receipt @@ -786,26 +898,26 @@ Contract Receipt #### Defined in -[src/keeper/contracts/NFTContractsBase.ts:115](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L115) +[src/keeper/contracts/NFTContractsBase.ts:130](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L130) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -813,26 +925,26 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -840,13 +952,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setApprovalForAll -▸ **setApprovalForAll**(`target`, `state`, `from`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **setApprovalForAll**(`target`, `state`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -854,22 +966,22 @@ Contract Receipt | :---------- | :---------------------------------------------- | | `target` | `string` | | `state` | `boolean` | -| `from` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/Nft721Contract.ts:104](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft721Contract.ts#L104) +[src/keeper/contracts/Nft721Contract.ts:106](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft721Contract.ts#L106) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -887,13 +999,37 @@ Contract Receipt #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[NFTContractsBase](NFTContractsBase.md).[someLog](NFTContractsBase.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### tokenURI -▸ **tokenURI**(`did`): `Promise`<`string`\> +▸ **tokenURI**(`did`): `Promise`\<`string`\> #### Parameters @@ -903,17 +1039,17 @@ Contract Receipt #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/Nft721Contract.ts:125](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft721Contract.ts#L125) +[src/keeper/contracts/Nft721Contract.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft721Contract.ts#L127) --- ### getInstance -▸ `Static` **getInstance**(`config`, `address`, `contractName?`, `artifactsFolder?`): `Promise`<[`Nft721Contract`](Nft721Contract.md)\> +▸ **getInstance**(`config`, `address`, `contractName?`, `artifactsFolder?`): `Promise`\<[`Nft721Contract`](Nft721Contract.md)\> #### Parameters @@ -922,11 +1058,11 @@ Contract Receipt | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | | `address` | `string` | `undefined` | | `contractName` | `string` | `'NFT721Upgradeable'` | -| `artifactsFolder` | `string` | `config.artifactsFolder` | +| `artifactsFolder` | `undefined` \| `string` | `config.artifactsFolder` | #### Returns -`Promise`<[`Nft721Contract`](Nft721Contract.md)\> +`Promise`\<[`Nft721Contract`](Nft721Contract.md)\> #### Overrides @@ -934,13 +1070,13 @@ Contract Receipt #### Defined in -[src/keeper/contracts/Nft721Contract.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft721Contract.ts#L11) +[src/keeper/contracts/Nft721Contract.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft721Contract.ts#L12) --- ### getInstanceUsingABI -▸ `Static` **getInstanceUsingABI**(`config`, `address`, `solidityABI`): `Promise`<[`Nft721Contract`](Nft721Contract.md)\> +▸ **getInstanceUsingABI**(`config`, `address`, `solidityABI`): `Promise`\<[`Nft721Contract`](Nft721Contract.md)\> #### Parameters @@ -952,17 +1088,17 @@ Contract Receipt #### Returns -`Promise`<[`Nft721Contract`](Nft721Contract.md)\> +`Promise`\<[`Nft721Contract`](Nft721Contract.md)\> #### Defined in -[src/keeper/contracts/Nft721Contract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Nft721Contract.ts#L35) +[src/keeper/contracts/Nft721Contract.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Nft721Contract.ts#L38) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -987,4 +1123,4 @@ Contract Receipt #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/NvmAccount.md b/docs/api-reference/classes/NvmAccount.md new file mode 100644 index 000000000..dfe0cfb12 --- /dev/null +++ b/docs/api-reference/classes/NvmAccount.md @@ -0,0 +1,437 @@ +[@nevermined-io/sdk](../code-reference.md) / NvmAccount + +# Class: NvmAccount + +Account information. + +## Table of contents + +### Constructors + +- [constructor](NvmAccount.md#constructor) + +### Properties + +- [accountSigner](NvmAccount.md#accountsigner) +- [accountType](NvmAccount.md#accounttype) +- [babySecret](NvmAccount.md#babysecret) +- [babyX](NvmAccount.md#babyx) +- [babyY](NvmAccount.md#babyy) +- [id](NvmAccount.md#id) +- [kernelClient](NvmAccount.md#kernelclient) +- [password](NvmAccount.md#password) +- [zeroDevSigner](NvmAccount.md#zerodevsigner) + +### Methods + +- [getAccountSigner](NvmAccount.md#getaccountsigner) +- [getAddress](NvmAccount.md#getaddress) +- [getId](NvmAccount.md#getid) +- [getKernelClient](NvmAccount.md#getkernelclient) +- [getPassword](NvmAccount.md#getpassword) +- [getPublic](NvmAccount.md#getpublic) +- [getType](NvmAccount.md#gettype) +- [getZeroDevSigner](NvmAccount.md#getzerodevsigner) +- [isZeroDev](NvmAccount.md#iszerodev) +- [setId](NvmAccount.md#setid) +- [setPassword](NvmAccount.md#setpassword) +- [signTextLocally](NvmAccount.md#signtextlocally) +- [fromAccount](NvmAccount.md#fromaccount) +- [fromAddress](NvmAccount.md#fromaddress) +- [fromZeroDevSessionKey](NvmAccount.md#fromzerodevsessionkey) +- [fromZeroDevSigner](NvmAccount.md#fromzerodevsigner) + +## Constructors + +### constructor + +• **new NvmAccount**(`id`, `accountType?`): [`NvmAccount`](NvmAccount.md) + +#### Parameters + +| Name | Type | +| :------------ | :--------------- | +| `id` | `string` | +| `accountType` | `NvmAccountType` | + +#### Returns + +[`NvmAccount`](NvmAccount.md) + +#### Defined in + +[src/models/NvmAccount.ts:86](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L86) + +## Properties + +### accountSigner + +• `Private` `Optional` **accountSigner**: `Account` \| `PrivateKeyAccount` + +#### Defined in + +[src/models/NvmAccount.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L15) + +--- + +### accountType + +• **accountType**: `NvmAccountType` + +#### Defined in + +[src/models/NvmAccount.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L23) + +--- + +### babySecret + +• `Optional` **babySecret**: `string` + +#### Defined in + +[src/models/NvmAccount.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L14) + +--- + +### babyX + +• `Optional` **babyX**: `string` + +#### Defined in + +[src/models/NvmAccount.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L12) + +--- + +### babyY + +• `Optional` **babyY**: `string` + +#### Defined in + +[src/models/NvmAccount.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L13) + +--- + +### id + +• `Private` **id**: `string` + +#### Defined in + +[src/models/NvmAccount.ts:87](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L87) + +--- + +### kernelClient + +• `Private` `Optional` **kernelClient**: `KernelAccountClient`\<`"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"`, `Transport`, `Chain`, `any`\> + +#### Defined in + +[src/models/NvmAccount.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L16) + +--- + +### password + +• `Private` `Optional` **password**: `string` + +#### Defined in + +[src/models/NvmAccount.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L11) + +--- + +### zeroDevSigner + +• `Private` `Optional` **zeroDevSigner**: `any` + +#### Defined in + +[src/models/NvmAccount.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L22) + +## Methods + +### getAccountSigner + +▸ **getAccountSigner**(): `any` + +#### Returns + +`any` + +#### Defined in + +[src/models/NvmAccount.ts:94](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L94) + +--- + +### getAddress + +▸ **getAddress**(): \`0x$\{string}\` + +#### Returns + +\`0x$\{string}\` + +#### Defined in + +[src/models/NvmAccount.ts:113](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L113) + +--- + +### getId + +▸ **getId**(): \`0x$\{string}\` + +#### Returns + +\`0x$\{string}\` + +#### Defined in + +[src/models/NvmAccount.ts:117](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L117) + +--- + +### getKernelClient + +▸ **getKernelClient**(): `undefined` \| `KernelAccountClient`\<`"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"`, `Transport`, `Chain`, `any`\> + +#### Returns + +`undefined` \| `KernelAccountClient`\<`"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"`, `Transport`, `Chain`, `any`\> + +#### Defined in + +[src/models/NvmAccount.ts:98](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L98) + +--- + +### getPassword + +▸ **getPassword**(): `undefined` \| `string` + +Returns account password. + +#### Returns + +`undefined` \| `string` + +The account password. + +#### Defined in + +[src/models/NvmAccount.ts:153](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L153) + +--- + +### getPublic + +▸ **getPublic**(): `string` + +#### Returns + +`string` + +#### Defined in + +[src/models/NvmAccount.ts:125](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L125) + +--- + +### getType + +▸ **getType**(): `"local"` \| `"json-rpc"` \| `"zerodev"` \| `"sessionKey"` + +#### Returns + +`"local"` \| `"json-rpc"` \| `"zerodev"` \| `"sessionKey"` + +#### Defined in + +[src/models/NvmAccount.ts:102](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L102) + +--- + +### getZeroDevSigner + +▸ **getZeroDevSigner**(): `any` + +#### Returns + +`any` + +#### Defined in + +[src/models/NvmAccount.ts:105](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L105) + +--- + +### isZeroDev + +▸ **isZeroDev**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[src/models/NvmAccount.ts:109](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L109) + +--- + +### setId + +▸ **setId**(`id`): `void` + +#### Parameters + +| Name | Type | +| :--- | :------- | +| `id` | `string` | + +#### Returns + +`void` + +#### Defined in + +[src/models/NvmAccount.ts:121](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L121) + +--- + +### setPassword + +▸ **setPassword**(`password`): `void` + +Set account password. + +#### Parameters + +| Name | Type | Description | +| :--------- | :------- | :-------------------- | +| `password` | `string` | Password for account. | + +#### Returns + +`void` + +#### Defined in + +[src/models/NvmAccount.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L145) + +--- + +### signTextLocally + +▸ **signTextLocally**(`text`): `Promise`\<\`0x$\{string}\`\> + +#### Parameters + +| Name | Type | +| :----- | :----------------------- | +| `text` | `string` \| `Uint8Array` | + +#### Returns + +`Promise`\<\`0x$\{string}\`\> + +#### Defined in + +[src/models/NvmAccount.ts:129](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L129) + +--- + +### fromAccount + +▸ **fromAccount**(`account`): [`NvmAccount`](NvmAccount.md) + +Returns a nevermined Account from a viem account + +#### Parameters + +| Name | Type | Description | +| :-------- | :------------------------------- | :------------------- | +| `account` | `Account` \| `PrivateKeyAccount` | A viem local account | + +#### Returns + +[`NvmAccount`](NvmAccount.md) + +The nevermined account + +#### Defined in + +[src/models/NvmAccount.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L31) + +--- + +### fromAddress + +▸ **fromAddress**(`address`): [`NvmAccount`](NvmAccount.md) + +Returns a nevermined Account from an address. This method is used for browser integration (i.e Metamask) + +#### Parameters + +| Name | Type | Description | +| :-------- | :--------------- | :--------------- | +| `address` | \`0x$\{string}\` | A wallet address | + +#### Returns + +[`NvmAccount`](NvmAccount.md) + +The nevermined account + +#### Defined in + +[src/models/NvmAccount.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L44) + +--- + +### fromZeroDevSessionKey + +▸ **fromZeroDevSessionKey**(`kernelClient`): [`NvmAccount`](NvmAccount.md) + +#### Parameters + +| Name | Type | +| :------------- | :--------------------------------------------------------------------------------------------------- | +| `kernelClient` | `KernelAccountClient`\<`"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"`, `Transport`, `Chain`, `any`\> | + +#### Returns + +[`NvmAccount`](NvmAccount.md) + +#### Defined in + +[src/models/NvmAccount.ts:71](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L71) + +--- + +### fromZeroDevSigner + +▸ **fromZeroDevSigner**(`kernelClient`): `Promise`\<[`NvmAccount`](NvmAccount.md)\> + +Returns a nevermined Account from a zerodev signer + +#### Parameters + +| Name | Type | +| :------------- | :--------------------------------------------------------------------------------------------------- | +| `kernelClient` | `KernelAccountClient`\<`"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"`, `Transport`, `Chain`, `any`\> | + +#### Returns + +`Promise`\<[`NvmAccount`](NvmAccount.md)\> + +The nevermined account + +#### Defined in + +[src/models/NvmAccount.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmAccount.ts#L56) diff --git a/docs/api-reference/classes/ClientError.md b/docs/api-reference/classes/NvmAccountError.md similarity index 52% rename from docs/api-reference/classes/ClientError.md rename to docs/api-reference/classes/NvmAccountError.md index 0dc717783..c4cc61ea4 100644 --- a/docs/api-reference/classes/ClientError.md +++ b/docs/api-reference/classes/NvmAccountError.md @@ -1,43 +1,47 @@ -[@nevermined-io/sdk](../code-reference.md) / ClientError +[@nevermined-io/sdk](../code-reference.md) / NvmAccountError -# Class: ClientError +# Class: NvmAccountError ## Hierarchy - `Error` - ↳ **`ClientError`** + ↳ **`NvmAccountError`** ## Table of contents ### Constructors -- [constructor](ClientError.md#constructor) +- [constructor](NvmAccountError.md#constructor) ### Properties -- [message](ClientError.md#message) -- [name](ClientError.md#name) -- [stack](ClientError.md#stack) -- [prepareStackTrace](ClientError.md#preparestacktrace) -- [stackTraceLimit](ClientError.md#stacktracelimit) +- [cause](NvmAccountError.md#cause) +- [message](NvmAccountError.md#message) +- [name](NvmAccountError.md#name) +- [stack](NvmAccountError.md#stack) +- [prepareStackTrace](NvmAccountError.md#preparestacktrace) +- [stackTraceLimit](NvmAccountError.md#stacktracelimit) ### Methods -- [captureStackTrace](ClientError.md#capturestacktrace) +- [captureStackTrace](NvmAccountError.md#capturestacktrace) ## Constructors ### constructor -• **new ClientError**(`message`, `clientName`) +• **new NvmAccountError**(`message`): [`NvmAccountError`](NvmAccountError.md) #### Parameters -| Name | Type | -| :----------- | :------- | -| `message` | `string` | -| `clientName` | `string` | +| Name | Type | +| :-------- | :------- | +| `message` | `string` | + +#### Returns + +[`NvmAccountError`](NvmAccountError.md) #### Overrides @@ -45,10 +49,24 @@ Error.constructor #### Defined in -[src/errors/ClientError.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/errors/ClientError.ts#L2) +[src/errors/NeverminedErrors.ts:106](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L106) ## Properties +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +Error.cause + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + ### message • **message**: `string` @@ -59,7 +77,7 @@ Error.message #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1068 +node_modules/typescript/lib/lib.es5.d.ts:1077 --- @@ -73,7 +91,7 @@ Error.name #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1067 +node_modules/typescript/lib/lib.es5.d.ts:1076 --- @@ -87,7 +105,7 @@ Error.stack #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1069 +node_modules/typescript/lib/lib.es5.d.ts:1078 --- @@ -95,12 +113,16 @@ node_modules/typescript/lib/lib.es5.d.ts:1069 ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Type declaration ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -112,17 +134,13 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from Error.prepareStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:11 +node_modules/@types/node/globals.d.ts:28 --- @@ -136,13 +154,13 @@ Error.stackTraceLimit #### Defined in -node_modules/@types/node/globals.d.ts:13 +node_modules/@types/node/globals.d.ts:30 ## Methods ### captureStackTrace -▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object @@ -163,4 +181,4 @@ Error.captureStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:4 +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/NvmApiKey.md b/docs/api-reference/classes/NvmApiKey.md new file mode 100644 index 000000000..15372065d --- /dev/null +++ b/docs/api-reference/classes/NvmApiKey.md @@ -0,0 +1,400 @@ +[@nevermined-io/sdk](../code-reference.md) / NvmApiKey + +# Class: NvmApiKey + +## Implements + +- `JWTPayload` + +## Indexable + +▪ [propName: `string`]: `any` + +Additional attributes + +## Table of contents + +### Constructors + +- [constructor](NvmApiKey.md#constructor) + +### Properties + +- [aud](NvmApiKey.md#aud) +- [exp](NvmApiKey.md#exp) +- [iat](NvmApiKey.md#iat) +- [iss](NvmApiKey.md#iss) +- [nvt](NvmApiKey.md#nvt) +- [sub](NvmApiKey.md#sub) +- [ver](NvmApiKey.md#ver) +- [zsk](NvmApiKey.md#zsk) + +### Methods + +- [hash](NvmApiKey.md#hash) +- [isValid](NvmApiKey.md#isvalid) +- [serialize](NvmApiKey.md#serialize) +- [toString](NvmApiKey.md#tostring) +- [decode](NvmApiKey.md#decode) +- [decryptAndDecode](NvmApiKey.md#decryptanddecode) +- [deserialize](NvmApiKey.md#deserialize) +- [fromJWT](NvmApiKey.md#fromjwt) +- [generate](NvmApiKey.md#generate) +- [generateEncrypted](NvmApiKey.md#generateencrypted) +- [hash](NvmApiKey.md#hash-1) + +## Constructors + +### constructor + +• **new NvmApiKey**(): [`NvmApiKey`](NvmApiKey.md) + +#### Returns + +[`NvmApiKey`](NvmApiKey.md) + +#### Defined in + +[src/models/NvmApiKey.ts:58](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L58) + +## Properties + +### aud + +• **aud**: `string` + +The chain id of the network the key is valid for. If zero the key is not having any network limitation + +#### Implementation of + +JWTPayload.aud + +#### Defined in + +[src/models/NvmApiKey.ts:17](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L17) + +--- + +### exp + +• `Optional` **exp**: `number` + +JWT Expiration Time + +**`See`** + +[RFC7519#section-4.1.4](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.4) + +#### Implementation of + +JWTPayload.exp + +#### Defined in + +[src/models/NvmApiKey.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L44) + +--- + +### iat + +• `Optional` **iat**: `number` + +JWT Issued At + +**`See`** + +[RFC7519#section-4.1.6](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.6) + +#### Implementation of + +JWTPayload.iat + +#### Defined in + +[src/models/NvmApiKey.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L51) + +--- + +### iss + +• **iss**: `string` + +The public address of the account issuing the key + +#### Implementation of + +JWTPayload.iss + +#### Defined in + +[src/models/NvmApiKey.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L12) + +--- + +### nvt + +• `Optional` **nvt**: `string` + +The Marketplace auth token + +#### Defined in + +[src/models/NvmApiKey.ts:37](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L37) + +--- + +### sub + +• **sub**: `string` + +The public address of the account the key is issued for. Typically the address of the Node/Backend who can process the key + +#### Implementation of + +JWTPayload.sub + +#### Defined in + +[src/models/NvmApiKey.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L22) + +--- + +### ver + +• **ver**: `string` = `'v1'` + +The version of the key + +#### Defined in + +[src/models/NvmApiKey.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L27) + +--- + +### zsk + +• `Optional` **zsk**: `string` + +The ZeroDev session key + +#### Defined in + +[src/models/NvmApiKey.ts:32](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L32) + +## Methods + +### hash + +▸ **hash**(): `string` + +#### Returns + +`string` + +#### Defined in + +[src/models/NvmApiKey.ts:164](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L164) + +--- + +### isValid + +▸ **isValid**(`chainId?`): `boolean` + +#### Parameters + +| Name | Type | Default value | +| :-------- | :------- | :------------ | +| `chainId` | `number` | `0` | + +#### Returns + +`boolean` + +#### Defined in + +[src/models/NvmApiKey.ts:126](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L126) + +--- + +### serialize + +▸ **serialize**(): `string` + +#### Returns + +`string` + +#### Defined in + +[src/models/NvmApiKey.ts:152](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L152) + +--- + +### toString + +▸ **toString**(): `string` + +#### Returns + +`string` + +#### Defined in + +[src/models/NvmApiKey.ts:156](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L156) + +--- + +### decode + +▸ **decode**(`str`): `JWTPayload` + +#### Parameters + +| Name | Type | +| :---- | :------- | +| `str` | `string` | + +#### Returns + +`JWTPayload` + +#### Defined in + +[src/models/NvmApiKey.ts:160](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L160) + +--- + +### decryptAndDecode + +▸ **decryptAndDecode**(`encryptedJwt`, `privateKey`): `Promise`\<[`NvmApiKey`](NvmApiKey.md)\> + +#### Parameters + +| Name | Type | +| :------------- | :------- | +| `encryptedJwt` | `string` | +| `privateKey` | `string` | + +#### Returns + +`Promise`\<[`NvmApiKey`](NvmApiKey.md)\> + +#### Defined in + +[src/models/NvmApiKey.ts:121](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L121) + +--- + +### deserialize + +▸ **deserialize**(`str`): [`NvmApiKey`](NvmApiKey.md) + +#### Parameters + +| Name | Type | +| :---- | :------- | +| `str` | `string` | + +#### Returns + +[`NvmApiKey`](NvmApiKey.md) + +#### Defined in + +[src/models/NvmApiKey.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L148) + +--- + +### fromJWT + +▸ **fromJWT**(`jwt`): [`NvmApiKey`](NvmApiKey.md) + +#### Parameters + +| Name | Type | +| :---- | :----------- | +| `jwt` | `JWTPayload` | + +#### Returns + +[`NvmApiKey`](NvmApiKey.md) + +#### Defined in + +[src/models/NvmApiKey.ts:137](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L137) + +--- + +### generate + +▸ **generate**(`signatureUtils`, `issuerAccount`, `zeroDevSessionKey`, `marketplaceAuthToken`, `receiverAddress`, `expirationTime?`, `chainId?`, `additionalParams?`): `Promise`\<[`NvmApiKey`](NvmApiKey.md)\> + +#### Parameters + +| Name | Type | Default value | +| :--------------------- | :------------------------------------ | :------------ | +| `signatureUtils` | [`SignatureUtils`](SignatureUtils.md) | `undefined` | +| `issuerAccount` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `zeroDevSessionKey` | `string` | `undefined` | +| `marketplaceAuthToken` | `string` | `undefined` | +| `receiverAddress` | `string` | `undefined` | +| `expirationTime` | `string` | `'1y'` | +| `chainId` | `number` | `0` | +| `additionalParams` | `Object` | `{}` | + +#### Returns + +`Promise`\<[`NvmApiKey`](NvmApiKey.md)\> + +#### Defined in + +[src/models/NvmApiKey.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L60) + +--- + +### generateEncrypted + +▸ **generateEncrypted**(`signatureUtils`, `issuerAccount`, `zeroDevSessionKey`, `marketplaceAuthToken`, `receiverAddress`, `receiverPublicKey`, `expirationTime?`, `chainId?`, `additionalParams?`): `Promise`\<`string`\> + +#### Parameters + +| Name | Type | Default value | +| :--------------------- | :------------------------------------ | :------------ | +| `signatureUtils` | [`SignatureUtils`](SignatureUtils.md) | `undefined` | +| `issuerAccount` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `zeroDevSessionKey` | `string` | `undefined` | +| `marketplaceAuthToken` | `string` | `undefined` | +| `receiverAddress` | `string` | `undefined` | +| `receiverPublicKey` | `string` | `undefined` | +| `expirationTime` | `string` | `'1y'` | +| `chainId` | `number` | `0` | +| `additionalParams` | `Object` | `{}` | + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[src/models/NvmApiKey.ts:97](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L97) + +--- + +### hash + +▸ **hash**(`serialized`): `string` + +#### Parameters + +| Name | Type | +| :----------- | :------- | +| `serialized` | `string` | + +#### Returns + +`string` + +#### Defined in + +[src/models/NvmApiKey.ts:168](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/NvmApiKey.ts#L168) diff --git a/docs/api-reference/classes/NvmApp.md b/docs/api-reference/classes/NvmApp.md new file mode 100644 index 000000000..2b785b930 --- /dev/null +++ b/docs/api-reference/classes/NvmApp.md @@ -0,0 +1,1063 @@ +[@nevermined-io/sdk](../code-reference.md) / NvmApp + +# Class: NvmApp + +Represents the NvmApp class which is the main entry point for interacting with the Nevermined SDK. + +## Table of contents + +### Constructors + +- [constructor](NvmApp.md#constructor) + +### Properties + +- [assetProviders](NvmApp.md#assetproviders) +- [configNVM](NvmApp.md#confignvm) +- [fullSDK](NvmApp.md#fullsdk) +- [loginCredentials](NvmApp.md#logincredentials) +- [networkFee](NvmApp.md#networkfee) +- [networkFeeReceiver](NvmApp.md#networkfeereceiver) +- [searchSDK](NvmApp.md#searchsdk) +- [subscriptionNFTContractAddress](NvmApp.md#subscriptionnftcontractaddress) +- [userAccount](NvmApp.md#useraccount) +- [zeroDevSignerAccount](NvmApp.md#zerodevsigneraccount) +- [defaultAppInitializationOptions](NvmApp.md#defaultappinitializationoptions) + +### Accessors + +- [config](NvmApp.md#config) +- [networkFees](NvmApp.md#networkfees) +- [sdk](NvmApp.md#sdk) +- [search](NvmApp.md#search) +- [services](NvmApp.md#services) + +### Methods + +- [addNetworkFee](NvmApp.md#addnetworkfee) +- [claimSubscription](NvmApp.md#claimsubscription) +- [connect](NvmApp.md#connect) +- [createCreditsSubscription](NvmApp.md#createcreditssubscription) +- [createCreditsSubscriptionAsync](NvmApp.md#createcreditssubscriptionasync) +- [createTimeSubscription](NvmApp.md#createtimesubscription) +- [createTimeSubscriptionAsync](NvmApp.md#createtimesubscriptionasync) +- [disconnect](NvmApp.md#disconnect) +- [downloadFiles](NvmApp.md#downloadfiles) +- [getBalance](NvmApp.md#getbalance) +- [getLoginCredentials](NvmApp.md#getlogincredentials) +- [getServiceAccessToken](NvmApp.md#getserviceaccesstoken) +- [initializeSearch](NvmApp.md#initializesearch) +- [isNetworkFeeIncluded](NvmApp.md#isnetworkfeeincluded) +- [isWeb3Connected](NvmApp.md#isweb3connected) +- [orderSubscription](NvmApp.md#ordersubscription) +- [orderSubscriptionAsync](NvmApp.md#ordersubscriptionasync) +- [registerFileAsset](NvmApp.md#registerfileasset) +- [registerFileAssetAsync](NvmApp.md#registerfileassetasync) +- [registerServiceAsset](NvmApp.md#registerserviceasset) +- [registerServiceAssetAsync](NvmApp.md#registerserviceassetasync) +- [updateAsset](NvmApp.md#updateasset) +- [updateAssetAsync](NvmApp.md#updateassetasync) +- [validateFileAssetMetadata](NvmApp.md#validatefileassetmetadata) +- [validateServiceAssetMetadata](NvmApp.md#validateserviceassetmetadata) +- [validateSubscription](NvmApp.md#validatesubscription) +- [getConfigFromTagName](NvmApp.md#getconfigfromtagname) +- [getInstance](NvmApp.md#getinstance) +- [switchConfigBetweenEnvs](NvmApp.md#switchconfigbetweenenvs) + +## Constructors + +### constructor + +• **new NvmApp**(`config`): [`NvmApp`](NvmApp.md) + +Represents the NvmApp class. + +#### Parameters + +| Name | Type | Description | +| :------- | :--------------------- | :------------------------------------------------ | +| `config` | `NeverminedAppOptions` | The configuration options for the Nevermined App. | + +#### Returns + +[`NvmApp`](NvmApp.md) + +#### Defined in + +[src/nevermined/NvmApp.ts:125](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L125) + +## Properties + +### assetProviders + +• **assetProviders**: `string`[] = `[]` + +#### Defined in + +[src/nevermined/NvmApp.ts:74](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L74) + +--- + +### configNVM + +• `Private` **configNVM**: `NeverminedAppOptions` + +#### Defined in + +[src/nevermined/NvmApp.ts:69](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L69) + +--- + +### fullSDK + +• `Private` **fullSDK**: `undefined` \| [`Nevermined`](Nevermined.md) + +#### Defined in + +[src/nevermined/NvmApp.ts:72](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L72) + +--- + +### loginCredentials + +• `Private` **loginCredentials**: `undefined` \| `string` + +#### Defined in + +[src/nevermined/NvmApp.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L75) + +--- + +### networkFee + +• `Private` **networkFee**: `undefined` \| `bigint` + +#### Defined in + +[src/nevermined/NvmApp.ts:78](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L78) + +--- + +### networkFeeReceiver + +• `Private` **networkFeeReceiver**: `undefined` \| `string` + +#### Defined in + +[src/nevermined/NvmApp.ts:77](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L77) + +--- + +### searchSDK + +• `Private` **searchSDK**: [`Nevermined`](Nevermined.md) + +#### Defined in + +[src/nevermined/NvmApp.ts:71](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L71) + +--- + +### subscriptionNFTContractAddress + +• `Private` **subscriptionNFTContractAddress**: `undefined` \| `string` + +#### Defined in + +[src/nevermined/NvmApp.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L76) + +--- + +### userAccount + +• `Private` **userAccount**: `undefined` \| [`NvmAccount`](NvmAccount.md) + +#### Defined in + +[src/nevermined/NvmApp.ts:70](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L70) + +--- + +### zeroDevSignerAccount + +• `Private` **zeroDevSignerAccount**: `undefined` \| `SmartAccountSigner`\<`"custom"`, \`0x$\{string}\`\> + +#### Defined in + +[src/nevermined/NvmApp.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L73) + +--- + +### defaultAppInitializationOptions + +▪ `Static` `Readonly` **defaultAppInitializationOptions**: [`NeverminedInitializationOptions`](../interfaces/NeverminedInitializationOptions.md) + +Default initialization options for the Nevermined application. + +#### Defined in + +[src/nevermined/NvmApp.ts:83](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L83) + +## Accessors + +### config + +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) + +Gets the configuration options for the Nevermined application. + +#### Returns + +[`NeverminedOptions`](NeverminedOptions.md) + +The configuration options for the Nevermined application. + +#### Defined in + +[src/nevermined/NvmApp.ts:246](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L246) + +--- + +### networkFees + +• `get` **networkFees**(): `Object` + +Gets the network fees. + +#### Returns + +`Object` + +An object containing the receiver and fee. + +| Name | Type | +| :--------- | :------- | +| `fee` | `bigint` | +| `receiver` | `string` | + +#### Defined in + +[src/nevermined/NvmApp.ts:281](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L281) + +--- + +### sdk + +• `get` **sdk**(): [`Nevermined`](Nevermined.md) + +Gets the Nevermined SDK instance. + +#### Returns + +[`Nevermined`](Nevermined.md) + +The Nevermined SDK instance. + +**`Throws`** + +If Web3 is not connected, try calling the connect method first. + +#### Defined in + +[src/nevermined/NvmApp.ts:271](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L271) + +--- + +### search + +• `get` **search**(): [`SearchApi`](SearchApi.md) + +Gets the SearchApi instance. + +#### Returns + +[`SearchApi`](SearchApi.md) + +The SearchApi instance. + +#### Defined in + +[src/nevermined/NvmApp.ts:254](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L254) + +--- + +### services + +• `get` **services**(): [`ServicesApi`](ServicesApi.md) + +Gets the Services API instance. + +#### Returns + +[`ServicesApi`](ServicesApi.md) + +The Services API instance. + +#### Defined in + +[src/nevermined/NvmApp.ts:262](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L262) + +## Methods + +### addNetworkFee + +▸ **addNetworkFee**(`price`): [`AssetPrice`](AssetPrice.md) + +Adds the network fee to the given asset price. +If the network fee is not already included in the price, it adjusts the price to include the network fees. + +#### Parameters + +| Name | Type | Description | +| :------ | :---------------------------- | :------------------------------------------------------ | +| `price` | [`AssetPrice`](AssetPrice.md) | The asset price to which the network fee will be added. | + +#### Returns + +[`AssetPrice`](AssetPrice.md) + +The updated asset price with the network fee included, or the original price if the network fee is already included. + +#### Defined in + +[src/nevermined/NvmApp.ts:825](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L825) + +--- + +### claimSubscription + +▸ **claimSubscription**(`agreementId`, `subscriptionDid`, `numberCredits`, `serviceIndex?`): `Promise`\<`boolean`\> + +Claims a subscription by transferring the specified number of credits from the subscription owner to the user's account. + +#### Parameters + +| Name | Type | Description | +| :---------------- | :------- | :----------------------------------------------------------- | +| `agreementId` | `string` | The ID of the agreement associated with the subscription. | +| `subscriptionDid` | `string` | The DID (Decentralized Identifier) of the subscription. | +| `numberCredits` | `bigint` | The number of credits to be claimed. | +| `serviceIndex?` | `number` | (Optional) The index of the service within the subscription. | + +#### Returns + +`Promise`\<`boolean`\> + +A Promise that resolves to a boolean indicating whether the claim was successful. + +**`Throws`** + +If Web3 is not connected or if there is an error claiming the NFT of the subscription. + +#### Defined in + +[src/nevermined/NvmApp.ts:564](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L564) + +--- + +### connect + +▸ **connect**(`account`, `message?`, `config?`, `initOptions?`): `Promise`\<\{ `marketplaceAuthToken`: `string` ; `userAccount`: [`NvmAccount`](NvmAccount.md) ; `zeroDevSignerAccount`: `undefined` \| `SmartAccountSigner`\<`"custom"`, \`0x$\{string}\`\> }\> + +Connects to the Nevermined network and initializes the NvmApp instance. + +#### Parameters + +| Name | Type | Description | +| :------------- | :------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------- | +| `account` | `string` \| [`NvmAccount`](NvmAccount.md) \| `SmartAccountSigner`\<`"custom"`, \`0x$\{string}\`\> | The account to connect with. It can be either a string representing the account address or an instance of the Account class. | +| `message?` | `string` | An optional message to include in the client assertion for authentication. | +| `config?` | [`NeverminedOptions`](NeverminedOptions.md) | Optional configuration options for the Nevermined instance. | +| `initOptions?` | [`NeverminedInitializationOptions`](../interfaces/NeverminedInitializationOptions.md) | Optional initialization options for the Nevermined instance. | + +#### Returns + +`Promise`\<\{ `marketplaceAuthToken`: `string` ; `userAccount`: [`NvmAccount`](NvmAccount.md) ; `zeroDevSignerAccount`: `undefined` \| `SmartAccountSigner`\<`"custom"`, \`0x$\{string}\`\> }\> + +An object containing the marketplace authentication token, user account, and zeroDev signer account (if applicable). + +#### Defined in + +[src/nevermined/NvmApp.ts:147](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L147) + +--- + +### createCreditsSubscription + +▸ **createCreditsSubscription**(`susbcriptionMetadata`, `subscriptionPrice`, `numberCredits`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> + +Creates a credits subscription. + +#### Parameters + +| Name | Type | Description | +| :--------------------- | :-------------------------------------- | :------------------------------------------ | +| `susbcriptionMetadata` | [`MetaData`](../interfaces/MetaData.md) | The metadata for the subscription. | +| `subscriptionPrice` | [`AssetPrice`](AssetPrice.md) | The price of the subscription. | +| `numberCredits` | `bigint` | The number of credits for the subscription. | + +#### Returns + +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> + +A `SubscribablePromise` that resolves to a `DDO` object representing the created subscription. + +**`Throws`** + +If Web3 is not connected. + +**`Throws`** + +If the validation of the subscription fails. + +#### Defined in + +[src/nevermined/NvmApp.ts:371](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L371) + +--- + +### createCreditsSubscriptionAsync + +▸ **createCreditsSubscriptionAsync**(`susbcriptionMetadata`, `subscriptionPrice`, `numberCredits`): `Promise`\<[`DDO`](DDO.md)\> + +Creates a credits subscription asynchronously. + +#### Parameters + +| Name | Type | Description | +| :--------------------- | :-------------------------------------- | :------------------------------------------ | +| `susbcriptionMetadata` | [`MetaData`](../interfaces/MetaData.md) | The metadata for the subscription. | +| `subscriptionPrice` | [`AssetPrice`](AssetPrice.md) | The price of the subscription. | +| `numberCredits` | `bigint` | The number of credits for the subscription. | + +#### Returns + +`Promise`\<[`DDO`](DDO.md)\> + +A Promise that resolves to a DDO (Decentralized Data Object). + +#### Defined in + +[src/nevermined/NvmApp.ts:425](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L425) + +--- + +### createTimeSubscription + +▸ **createTimeSubscription**(`susbcriptionMetadata`, `subscriptionPrice`, `duration`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> + +Creates a time-based subscription for a given asset. + +#### Parameters + +| Name | Type | Description | +| :--------------------- | :-------------------------------------- | :------------------------------------------- | +| `susbcriptionMetadata` | [`MetaData`](../interfaces/MetaData.md) | The metadata of the subscription. | +| `subscriptionPrice` | [`AssetPrice`](AssetPrice.md) | The price of the subscription. | +| `duration` | `number` | The duration of the subscription in seconds. | + +#### Returns + +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> + +A promise that resolves to the progress steps and the resulting DDO (Decentralized Data Object). + +**`Throws`** + +If Web3 is not connected. + +**`Throws`** + +If the validation of the subscription fails. + +#### Defined in + +[src/nevermined/NvmApp.ts:297](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L297) + +--- + +### createTimeSubscriptionAsync + +▸ **createTimeSubscriptionAsync**(`susbcriptionMetadata`, `subscriptionPrice`, `duration`): `Promise`\<[`DDO`](DDO.md)\> + +Creates a time-based subscription asynchronously. + +#### Parameters + +| Name | Type | Description | +| :--------------------- | :-------------------------------------- | :------------------------------------------- | +| `susbcriptionMetadata` | [`MetaData`](../interfaces/MetaData.md) | The metadata for the subscription. | +| `subscriptionPrice` | [`AssetPrice`](AssetPrice.md) | The price of the subscription. | +| `duration` | `number` | The duration of the subscription in seconds. | + +#### Returns + +`Promise`\<[`DDO`](DDO.md)\> + +A Promise that resolves to the [DDO](DDO.md) (Decentralized Data Object) of the created subscription. + +#### Defined in + +[src/nevermined/NvmApp.ts:353](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L353) + +--- + +### disconnect + +▸ **disconnect**(): `Promise`\<`void`\> + +Disconnects the NvmApp from the current web3 provider. +Clears the fullSDK instance and resets the user account, zeroDevSigner settings, and login credentials. + +#### Returns + +`Promise`\<`void`\> + +#### Defined in + +[src/nevermined/NvmApp.ts:216](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L216) + +--- + +### downloadFiles + +▸ **downloadFiles**(`fileAssetDid`, `fileIndex?`, `destinationPath?`, `agreementId?`): `Promise`\<[`OperationResult`](../interfaces/OperationResult.md)\> + +Downloads files associated with a given file asset DID. + +#### Parameters + +| Name | Type | Description | +| :----------------- | :------- | :-------------------------------------------------------------------------------------- | +| `fileAssetDid` | `string` | The DID of the file asset. | +| `fileIndex?` | `number` | (Optional) The index of the file to download if the file asset contains multiple files. | +| `destinationPath?` | `string` | (Optional) The path where the downloaded files will be saved. | +| `agreementId?` | `string` | (Optional) The ID of the agreement associated with the file asset. | + +#### Returns + +`Promise`\<[`OperationResult`](../interfaces/OperationResult.md)\> + +A Promise that resolves to an OperationResult object containing the agreement ID and the success status of the download operation. + +**`Throws`** + +If there is an error downloading the files. + +#### Defined in + +[src/nevermined/NvmApp.ts:652](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L652) + +--- + +### getBalance + +▸ **getBalance**(`subscriptionDid`, `accountAddress?`): `Promise`\<[`SubscriptionBalance`](../interfaces/SubscriptionBalance.md)\> + +Retrieves the balance and subscription information for a given subscription DID and account address. +If no account address is provided, the user's account ID will be used. + +#### Parameters + +| Name | Type | Description | +| :---------------- | :------- | :--------------------------------------------------------------------------------------------------- | +| `subscriptionDid` | `string` | The DID (Decentralized Identifier) of the subscription. | +| `accountAddress?` | `string` | (Optional) The Ethereum address of the account. If not provided, the user's account ID will be used. | + +#### Returns + +`Promise`\<[`SubscriptionBalance`](../interfaces/SubscriptionBalance.md)\> + +A Promise that resolves to a SubscriptionBalance object containing the subscription type, balance, and access information. + +**`Throws`** + +If the Web3 provider is not connected. + +**`Throws`** + +If there is an error retrieving the subscription information. + +#### Defined in + +[src/nevermined/NvmApp.ts:599](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L599) + +--- + +### getLoginCredentials + +▸ **getLoginCredentials**(): `undefined` \| `string` + +Retrieves the login credentials. + +#### Returns + +`undefined` \| `string` + +The login credentials as a string, or undefined if not set. + +#### Defined in + +[src/nevermined/NvmApp.ts:238](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L238) + +--- + +### getServiceAccessToken + +▸ **getServiceAccessToken**(`serviceDid`): `Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> + +Retrieves the service access token for a given service DID. + +#### Parameters + +| Name | Type | Description | +| :----------- | :------- | :------------------------------------------------------ | +| `serviceDid` | `string` | The service DID for which to retrieve the access token. | + +#### Returns + +`Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> + +A promise that resolves to the subscription token. + +**`Throws`** + +If Web3 is not connected. Call the connect method first. + +#### Defined in + +[src/nevermined/NvmApp.ts:635](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L635) + +--- + +### initializeSearch + +▸ **initializeSearch**(`config?`): `Promise`\<`void`\> + +Initializes the search functionality of the Nevermined App. + +#### Parameters + +| Name | Type | Description | +| :-------- | :--------------------- | :----------------------------------------------------- | +| `config?` | `NeverminedAppOptions` | Optional configuration options for the Nevermined App. | + +#### Returns + +`Promise`\<`void`\> + +A Promise that resolves to void. + +#### Defined in + +[src/nevermined/NvmApp.ts:134](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L134) + +--- + +### isNetworkFeeIncluded + +▸ **isNetworkFeeIncluded**(`price`): `boolean` + +Checks if the network fee is included in the given asset price. + +#### Parameters + +| Name | Type | Description | +| :------ | :---------------------------- | :------------------------ | +| `price` | [`AssetPrice`](AssetPrice.md) | The asset price to check. | + +#### Returns + +`boolean` + +A boolean indicating whether the network fee is included. + +#### Defined in + +[src/nevermined/NvmApp.ts:840](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L840) + +--- + +### isWeb3Connected + +▸ **isWeb3Connected**(): `boolean` + +Checks if the web3 provider is connected. + +#### Returns + +`boolean` + +True if the web3 provider is connected, false otherwise. + +#### Defined in + +[src/nevermined/NvmApp.ts:230](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L230) + +--- + +### orderSubscription + +▸ **orderSubscription**(`subscriptionDid`, `numberCredits`, `serviceIndex?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> + +Orders a subscription for a given NFT. + +#### Parameters + +| Name | Type | Description | +| :---------------- | :------- | :------------------------------------------------------------------- | +| `subscriptionDid` | `string` | The DID of the subscription NFT. | +| `numberCredits` | `bigint` | The number of credits to be used for the subscription. | +| `serviceIndex?` | `number` | (Optional) The index of the service to be used for the subscription. | + +#### Returns + +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> + +A `SubscribablePromise` that resolves to the progress of the order or rejects with an error message. + +**`Throws`** + +If Web3 is not connected. + +**`Throws`** + +If there is an error ordering the subscription. + +#### Defined in + +[src/nevermined/NvmApp.ts:534](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L534) + +--- + +### orderSubscriptionAsync + +▸ **orderSubscriptionAsync**(`subscriptionDid`, `agreementId?`): `Promise`\<[`OperationResult`](../interfaces/OperationResult.md)\> + +Orders a subscription and claim asynchronously. + +#### Parameters + +| Name | Type | Description | +| :---------------- | :------- | :---------------------------------- | +| `subscriptionDid` | `string` | The DID of the subscription. | +| `agreementId?` | `string` | The ID of the agreement (optional). | + +#### Returns + +`Promise`\<[`OperationResult`](../interfaces/OperationResult.md)\> + +A Promise that resolves to an OperationResult object. + +**`Throws`** + +If Web3 is not connected. + +**`Throws`** + +If there is an error ordering the subscription. + +#### Defined in + +[src/nevermined/NvmApp.ts:480](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L480) + +--- + +### registerFileAsset + +▸ **registerFileAsset**(`metadata`, `subscriptionDid`, `costInCredits?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> + +Registers a file asset by creating a new DDO (Decentralized Data Object) on the network. + +#### Parameters + +| Name | Type | Description | +| :---------------- | :-------------------------------------- | :------------------------------------------------------------------------------ | +| `metadata` | [`MetaData`](../interfaces/MetaData.md) | The metadata of the file asset. | +| `subscriptionDid` | `string` | The subscription DID (Decentralized Identifier) associated with the file asset. | +| `costInCredits` | `bigint` | The cost of the file asset in credits (default is 1). | + +#### Returns + +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> + +A `SubscribablePromise` that resolves to a `DDO` (Decentralized Data Object) representing the registered file asset. + +**`Throws`** + +If the Web3 connection is not established. + +**`Throws`** + +If the file asset metadata is not valid. + +#### Defined in + +[src/nevermined/NvmApp.ts:760](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L760) + +--- + +### registerFileAssetAsync + +▸ **registerFileAssetAsync**(`metadata`, `subscriptionDid`, `costInCredits?`): `Promise`\<[`DDO`](DDO.md)\> + +Registers a file asset asynchronously. + +#### Parameters + +| Name | Type | Description | +| :---------------- | :-------------------------------------- | :--------------------------------- | +| `metadata` | [`MetaData`](../interfaces/MetaData.md) | The metadata of the file asset. | +| `subscriptionDid` | `string` | The subscription DID. | +| `costInCredits` | `bigint` | The cost in credits (default: 1n). | + +#### Returns + +`Promise`\<[`DDO`](DDO.md)\> + +A Promise that resolves to the registered DDO (Decentralized Data Object). + +#### Defined in + +[src/nevermined/NvmApp.ts:810](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L810) + +--- + +### registerServiceAsset + +▸ **registerServiceAsset**(`metadata`, `subscriptionDid`, `costInCredits?`, `minCreditsToCharge?`, `maxCreditsToCharge?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> + +Registers a service asset. + +#### Parameters + +| Name | Type | Description | +| :------------------- | :-------------------------------------- | :--------------------------------------------------- | +| `metadata` | [`MetaData`](../interfaces/MetaData.md) | The metadata of the asset. | +| `subscriptionDid` | `string` | The subscription DID. | +| `costInCredits` | `bigint` | The cost in credits (default: 1). | +| `minCreditsToCharge` | `bigint` | The minimum credits required to charge (default: 1). | +| `maxCreditsToCharge` | `bigint` | The maximum credits to charge (default: 1). | + +#### Returns + +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> + +A promise that resolves to the progress steps and the registered DDO. + +**`Throws`** + +If Web3 is not connected. + +**`Throws`** + +If the metadata validation fails. + +#### Defined in + +[src/nevermined/NvmApp.ts:687](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L687) + +--- + +### registerServiceAssetAsync + +▸ **registerServiceAssetAsync**(`metadata`, `subscriptionDid`, `costInCredits?`, `minCreditsToCharge?`, `maxCreditsToCharge?`): `Promise`\<[`DDO`](DDO.md)\> + +#### Parameters + +| Name | Type | +| :------------------- | :-------------------------------------- | +| `metadata` | [`MetaData`](../interfaces/MetaData.md) | +| `subscriptionDid` | `string` | +| `costInCredits` | `bigint` | +| `minCreditsToCharge` | `bigint` | +| `maxCreditsToCharge` | `bigint` | + +#### Returns + +`Promise`\<[`DDO`](DDO.md)\> + +#### Defined in + +[src/nevermined/NvmApp.ts:734](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L734) + +--- + +### updateAsset + +▸ **updateAsset**(`did`, `metadata`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> + +Updates the metadata of an asset. + +#### Parameters + +| Name | Type | Description | +| :--------- | :-------------------------------------- | :----------------------------------------------- | +| `did` | `string` | The decentralized identifier (DID) of the asset. | +| `metadata` | [`MetaData`](../interfaces/MetaData.md) | The updated metadata for the asset. | + +#### Returns + +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> + +A `SubscribablePromise` that resolves to the updated `DDO` (Decentralized Data Object). + +**`Throws`** + +If Web3 is not connected. Call the `connect` method first. + +#### Defined in + +[src/nevermined/NvmApp.ts:445](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L445) + +--- + +### updateAssetAsync + +▸ **updateAssetAsync**(`did`, `metadata`): `Promise`\<[`DDO`](DDO.md)\> + +Updates the asset with the specified DID using the provided metadata. + +#### Parameters + +| Name | Type | Description | +| :--------- | :-------------------------------------- | :--------------------------------------------------------- | +| `did` | `string` | The DID (Decentralized Identifier) of the asset to update. | +| `metadata` | [`MetaData`](../interfaces/MetaData.md) | The updated metadata for the asset. | + +#### Returns + +`Promise`\<[`DDO`](DDO.md)\> + +A Promise that resolves to the updated DDO (Decentralized Data Object) of the asset. + +#### Defined in + +[src/nevermined/NvmApp.ts:467](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L467) + +--- + +### validateFileAssetMetadata + +▸ **validateFileAssetMetadata**(`_susbcriptionMetadata`): [`MetadataValidationResults`](../interfaces/MetadataValidationResults.md) + +#### Parameters + +| Name | Type | +| :---------------------- | :-------------------------------------- | +| `_susbcriptionMetadata` | [`MetaData`](../interfaces/MetaData.md) | + +#### Returns + +[`MetadataValidationResults`](../interfaces/MetadataValidationResults.md) + +#### Defined in + +[src/nevermined/NvmApp.ts:888](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L888) + +--- + +### validateServiceAssetMetadata + +▸ **validateServiceAssetMetadata**(`_susbcriptionMetadata`): [`MetadataValidationResults`](../interfaces/MetadataValidationResults.md) + +#### Parameters + +| Name | Type | +| :---------------------- | :-------------------------------------- | +| `_susbcriptionMetadata` | [`MetaData`](../interfaces/MetaData.md) | + +#### Returns + +[`MetadataValidationResults`](../interfaces/MetadataValidationResults.md) + +#### Defined in + +[src/nevermined/NvmApp.ts:881](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L881) + +--- + +### validateSubscription + +▸ **validateSubscription**(`metadata`, `price`, `subscriptionType`): [`MetadataValidationResults`](../interfaces/MetadataValidationResults.md) + +#### Parameters + +| Name | Type | +| :----------------- | :------------------------------------------------- | +| `metadata` | [`MetaData`](../interfaces/MetaData.md) | +| `price` | [`AssetPrice`](AssetPrice.md) | +| `subscriptionType` | [`SubscriptionType`](../enums/SubscriptionType.md) | + +#### Returns + +[`MetadataValidationResults`](../interfaces/MetadataValidationResults.md) + +#### Defined in + +[src/nevermined/NvmApp.ts:855](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L855) + +--- + +### getConfigFromTagName + +▸ **getConfigFromTagName**(`appEnv`): [`NeverminedOptions`](NeverminedOptions.md) + +#### Parameters + +| Name | Type | +| :------- | :----------------------------------------------------- | +| `appEnv` | [`NVMAppEnvironments`](../enums/NVMAppEnvironments.md) | + +#### Returns + +[`NeverminedOptions`](NeverminedOptions.md) + +#### Defined in + +[src/nevermined/NvmApp.ts:892](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L892) + +--- + +### getInstance + +▸ **getInstance**(`appEnv`, `config?`): `Promise`\<[`NvmApp`](NvmApp.md)\> + +Returns an instance of the NvmApp class. + +#### Parameters + +| Name | Type | Description | +| :-------- | :------------------------------------------------------- | :------------------------------------------------------ | +| `appEnv` | [`NVMAppEnvironments`](../enums/NVMAppEnvironments.md) | The environment for the NvmApp instance. | +| `config?` | `Partial`\<[`NeverminedOptions`](NeverminedOptions.md)\> | Optional configuration options for the NvmApp instance. | + +#### Returns + +`Promise`\<[`NvmApp`](NvmApp.md)\> + +A Promise that resolves to an instance of the NvmApp class. + +#### Defined in + +[src/nevermined/NvmApp.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L108) + +--- + +### switchConfigBetweenEnvs + +▸ **switchConfigBetweenEnvs**(`appEnv`): [`NeverminedOptions`](NeverminedOptions.md) + +#### Parameters + +| Name | Type | +| :------- | :----------------------------------------------------- | +| `appEnv` | [`NVMAppEnvironments`](../enums/NVMAppEnvironments.md) | + +#### Returns + +[`NeverminedOptions`](NeverminedOptions.md) + +#### Defined in + +[src/nevermined/NvmApp.ts:897](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L897) diff --git a/docs/api-reference/classes/NvmAppMetadata.md b/docs/api-reference/classes/NvmAppMetadata.md new file mode 100644 index 000000000..7b9263470 --- /dev/null +++ b/docs/api-reference/classes/NvmAppMetadata.md @@ -0,0 +1,190 @@ +[@nevermined-io/sdk](../code-reference.md) / NvmAppMetadata + +# Class: NvmAppMetadata + +## Table of contents + +### Constructors + +- [constructor](NvmAppMetadata.md#constructor) + +### Methods + +- [getCreditsSubscriptionMetadataTemplate](NvmAppMetadata.md#getcreditssubscriptionmetadatatemplate) +- [getFileMetadataTemplate](NvmAppMetadata.md#getfilemetadatatemplate) +- [getServiceMetadataTemplate](NvmAppMetadata.md#getservicemetadatatemplate) +- [getSubscriptionMetadataTemplate](NvmAppMetadata.md#getsubscriptionmetadatatemplate) +- [getTimeSubscriptionMetadataTemplate](NvmAppMetadata.md#gettimesubscriptionmetadatatemplate) +- [validateSubscription](NvmAppMetadata.md#validatesubscription) + +## Constructors + +### constructor + +• **new NvmAppMetadata**(): [`NvmAppMetadata`](NvmAppMetadata.md) + +#### Returns + +[`NvmAppMetadata`](NvmAppMetadata.md) + +## Methods + +### getCreditsSubscriptionMetadataTemplate + +▸ **getCreditsSubscriptionMetadataTemplate**(`name`, `author`, `customData?`): [`MetaData`](../interfaces/MetaData.md) + +It returns a metadata template for a credits limitted subscription + +#### Parameters + +| Name | Type | Description | +| :----------- | :------- | :------------------------------------------------ | +| `name` | `string` | the name of the subscription | +| `author` | `string` | the author of the subscrpiton | +| `customData` | `Object` | any key-value pair to be included in the metadata | + +#### Returns + +[`MetaData`](../interfaces/MetaData.md) + +Metadata + +#### Defined in + +[src/ddo/NvmAppMetadata.ts:46](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/NvmAppMetadata.ts#L46) + +--- + +### getFileMetadataTemplate + +▸ **getFileMetadataTemplate**(`name`, `author`, `customData?`): [`MetaData`](../interfaces/MetaData.md) + +It gets a metadata template for a file type of asset (datasets, moldels, algorithms, etc.) + +#### Parameters + +| Name | Type | Description | +| :----------- | :------- | :--------------------------------------------- | +| `name` | `string` | the name of the asset | +| `author` | `string` | the autor of the asset | +| `customData` | `Object` | key-value pairs to be included in the metadata | + +#### Returns + +[`MetaData`](../interfaces/MetaData.md) + +Metadata + +#### Defined in + +[src/ddo/NvmAppMetadata.ts:192](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/NvmAppMetadata.ts#L192) + +--- + +### getServiceMetadataTemplate + +▸ **getServiceMetadataTemplate**(`name`, `author`, `endpoints`, `openEndpoints`, `openApiEndpoint`, `serviceType?`, `authType`, `authToken?`, `authUser?`, `authPassword?`, `isPriceDynamic?`, `customData?`, `nonce?`): [`MetaData`](../interfaces/MetaData.md) + +It returns a metadata template for Web Service + +#### Parameters + +| Name | Type | Default value | Description | +| :---------------- | :----------------------------------------------- | :------------ | :----------------------------------------------------------------------- | +| `name` | `string` | `undefined` | the name of the subscription | +| `author` | `string` | `undefined` | the author of the subscrpiton | +| `endpoints` | \{ `[verb: string]`: `string`; }[] | `undefined` | the list of endpoints | +| `openEndpoints` | `string`[] | `undefined` | the list of open endpoints (not protected) | +| `openApiEndpoint` | `undefined` \| `string` | `undefined` | the openApi endpoint endpoint if any | +| `serviceType` | `string` | `'RESTful'` | the type of the service | +| `authType` | `"none"` \| `"basic"` \| `"bearer"` \| `"oauth"` | `undefined` | the type of authentication required by the service | +| `authToken?` | `string` | `undefined` | the token to be used for authentication (if authType is oauth or bearer) | +| `authUser?` | `string` | `undefined` | the username to be used for authentication (if authType is basic) | +| `authPassword?` | `string` | `undefined` | the password to be used for authentication (if authType is basic) | +| `isPriceDynamic` | `boolean` | `false` | if the price is dynamic | +| `customData` | `Object` | `{}` | any key-value pair to be included in the metadata | +| `nonce` | `string` \| `number` | `undefined` | the nonce to be included in the metadata | + +#### Returns + +[`MetaData`](../interfaces/MetaData.md) + +Metadata + +#### Defined in + +[src/ddo/NvmAppMetadata.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/NvmAppMetadata.ts#L115) + +--- + +### getSubscriptionMetadataTemplate + +▸ **getSubscriptionMetadataTemplate**(`name`, `author`, `customData?`): [`MetaData`](../interfaces/MetaData.md) + +It returns a metadata template for subscription + +#### Parameters + +| Name | Type | Description | +| :----------- | :------- | :------------------------------------------------ | +| `name` | `string` | the name of the subscription | +| `author` | `string` | the author of the subscrpiton | +| `customData` | `Object` | any key-value pair to be included in the metadata | + +#### Returns + +[`MetaData`](../interfaces/MetaData.md) + +Metadata + +#### Defined in + +[src/ddo/NvmAppMetadata.ts:71](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/NvmAppMetadata.ts#L71) + +--- + +### getTimeSubscriptionMetadataTemplate + +▸ **getTimeSubscriptionMetadataTemplate**(`name`, `author`, `timeMeasure`, `customData?`): [`MetaData`](../interfaces/MetaData.md) + +It returns a metadata template for a subscription with time limit + +#### Parameters + +| Name | Type | Description | +| :------------ | :------- | :------------------------------------------------ | +| `name` | `string` | the name of the subscription | +| `author` | `string` | the author of the subscrpiton | +| `timeMeasure` | `string` | the string defining the time measure | +| `customData` | `Object` | any key-value pair to be included in the metadata | + +#### Returns + +[`MetaData`](../interfaces/MetaData.md) + +Metadata + +#### Defined in + +[src/ddo/NvmAppMetadata.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/NvmAppMetadata.ts#L19) + +--- + +### validateSubscription + +▸ **validateSubscription**(`metadata`, `subscriptionType`): [`MetadataValidationResults`](../interfaces/MetadataValidationResults.md) + +#### Parameters + +| Name | Type | +| :----------------- | :------------------------------------------------- | +| `metadata` | [`MetaData`](../interfaces/MetaData.md) | +| `subscriptionType` | [`SubscriptionType`](../enums/SubscriptionType.md) | + +#### Returns + +[`MetadataValidationResults`](../interfaces/MetadataValidationResults.md) + +#### Defined in + +[src/ddo/NvmAppMetadata.ts:216](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/NvmAppMetadata.ts#L216) diff --git a/docs/api-reference/classes/Permissions.md b/docs/api-reference/classes/Permissions.md index 77500cdfe..85e865359 100644 --- a/docs/api-reference/classes/Permissions.md +++ b/docs/api-reference/classes/Permissions.md @@ -18,13 +18,15 @@ - [artifactsFolder](Permissions.md#artifactsfolder) - [circuitsFolder](Permissions.md#circuitsfolder) +- [client](Permissions.md#client) - [config](Permissions.md#config) - [instanceConfig](Permissions.md#instanceconfig) - [instantiableConfig](Permissions.md#instantiableconfig) - [logger](Permissions.md#logger) - [nevermined](Permissions.md#nevermined) +- [publicClient](Permissions.md#publicclient) - [url](Permissions.md#url) -- [web3](Permissions.md#web3) +- [walletClient](Permissions.md#walletclient) ### Methods @@ -44,7 +46,7 @@ ### constructor -• **new Permissions**(`config`) +• **new Permissions**(`config`): [`Permissions`](Permissions.md) #### Parameters @@ -52,23 +54,27 @@ | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`Permissions`](Permissions.md) + #### Inherited from [MarketplaceApi](MarketplaceApi.md).[constructor](MarketplaceApi.md#constructor) #### Defined in -[src/services/metadata/MarketplaceAPI.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L7) +[src/services/metadata/MarketplaceAPI.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L7) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -76,17 +82,17 @@ MarketplaceApi.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -94,13 +100,31 @@ MarketplaceApi.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +MarketplaceApi.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -112,13 +136,13 @@ MarketplaceApi.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -130,17 +154,17 @@ MarketplaceApi.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -148,13 +172,13 @@ MarketplaceApi.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -166,13 +190,13 @@ MarketplaceApi.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -184,13 +208,95 @@ MarketplaceApi.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +MarketplaceApi.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- ### url -• `Protected` `get` **url**(): `string` +• `get` **url**(): `string` #### Returns @@ -202,31 +308,64 @@ MarketplaceApi.url #### Defined in -[src/services/metadata/MarketplaceAPI.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L12) +[src/services/metadata/MarketplaceAPI.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L12) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -MarketplaceApi.web3 +MarketplaceApi.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### addNewAddress -▸ **addNewAddress**(`clientAssertion`): `Promise`<`string`\> +▸ **addNewAddress**(`clientAssertion`): `Promise`\<`string`\> #### Parameters @@ -236,7 +375,7 @@ MarketplaceApi.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -244,13 +383,13 @@ MarketplaceApi.web3 #### Defined in -[src/services/metadata/MarketplaceAPI.ts:36](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L36) +[src/services/metadata/MarketplaceAPI.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L36) --- ### create -▸ **create**(`newPermission`): `Promise`<[`Permission`](../interfaces/Permission.md)\> +▸ **create**(`newPermission`): `Promise`\<[`Permission`](../interfaces/Permission.md)\> Create Permission @@ -262,17 +401,17 @@ Create Permission #### Returns -`Promise`<[`Permission`](../interfaces/Permission.md)\> +`Promise`\<[`Permission`](../interfaces/Permission.md)\> #### Defined in -[src/services/metadata/Permissions.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Permissions.ts#L14) +[src/services/metadata/Permissions.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Permissions.ts#L18) --- ### deleteOneById -▸ **deleteOneById**(`id`): `Promise`<`void`\> +▸ **deleteOneById**(`id`): `Promise`\<`void`\> Delele a bookmark by id @@ -284,17 +423,17 @@ Delele a bookmark by id #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Defined in -[src/services/metadata/Permissions.ts:138](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Permissions.ts#L138) +[src/services/metadata/Permissions.ts:142](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Permissions.ts#L142) --- ### findManyByUserId -▸ **findManyByUserId**(`userId`, `query?`): `Promise`<[`MarketplaceResults`](../interfaces/MarketplaceResults.md)<[`Permission`](../interfaces/Permission.md)\>\> +▸ **findManyByUserId**(`userId`, `query?`): `Promise`\<[`MarketplaceResults`](../interfaces/MarketplaceResults.md)\<[`Permission`](../interfaces/Permission.md)\>\> Get permissions by userId @@ -307,17 +446,17 @@ Get permissions by userId #### Returns -`Promise`<[`MarketplaceResults`](../interfaces/MarketplaceResults.md)<[`Permission`](../interfaces/Permission.md)\>\> +`Promise`\<[`MarketplaceResults`](../interfaces/MarketplaceResults.md)\<[`Permission`](../interfaces/Permission.md)\>\> #### Defined in -[src/services/metadata/Permissions.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Permissions.ts#L63) +[src/services/metadata/Permissions.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Permissions.ts#L67) --- ### findManyByUserIdAndType -▸ **findManyByUserIdAndType**(`userId`, `type`, `query?`): `Promise`<[`MarketplaceResults`](../interfaces/MarketplaceResults.md)<[`Permission`](../interfaces/Permission.md)\>\> +▸ **findManyByUserIdAndType**(`userId`, `type`, `query?`): `Promise`\<[`MarketplaceResults`](../interfaces/MarketplaceResults.md)\<[`Permission`](../interfaces/Permission.md)\>\> Get permissions by userId and specific type @@ -331,17 +470,17 @@ Get permissions by userId and specific type #### Returns -`Promise`<[`MarketplaceResults`](../interfaces/MarketplaceResults.md)<[`Permission`](../interfaces/Permission.md)\>\> +`Promise`\<[`MarketplaceResults`](../interfaces/MarketplaceResults.md)\<[`Permission`](../interfaces/Permission.md)\>\> #### Defined in -[src/services/metadata/Permissions.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Permissions.ts#L88) +[src/services/metadata/Permissions.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Permissions.ts#L92) --- ### findOneById -▸ **findOneById**(`id`): `Promise`<[`Permission`](../interfaces/Permission.md)\> +▸ **findOneById**(`id`): `Promise`\<[`Permission`](../interfaces/Permission.md)\> Get a permission by Id @@ -353,17 +492,17 @@ Get a permission by Id #### Returns -`Promise`<[`Permission`](../interfaces/Permission.md)\> +`Promise`\<[`Permission`](../interfaces/Permission.md)\> #### Defined in -[src/services/metadata/Permissions.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Permissions.ts#L41) +[src/services/metadata/Permissions.ts:45](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Permissions.ts#L45) --- ### login -▸ **login**(`clientAssertion`): `Promise`<`string`\> +▸ **login**(`clientAssertion`): `Promise`\<`string`\> #### Parameters @@ -373,7 +512,7 @@ Get a permission by Id #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -381,13 +520,13 @@ Get a permission by Id #### Defined in -[src/services/metadata/MarketplaceAPI.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L16) +[src/services/metadata/MarketplaceAPI.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L16) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -405,36 +544,36 @@ Get a permission by Id #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### updateOneById -▸ **updateOneById**(`id`, `permission`): `Promise`<[`Permission`](../interfaces/Permission.md)\> +▸ **updateOneById**(`id`, `permission`): `Promise`\<[`Permission`](../interfaces/Permission.md)\> Update a Permission by id #### Parameters -| Name | Type | -| :----------- | :------------------------------------------------------ | -| `id` | `string` | -| `permission` | `Partial`<[`Permission`](../interfaces/Permission.md)\> | +| Name | Type | +| :----------- | :------------------------------------------------------- | +| `id` | `string` | +| `permission` | `Partial`\<[`Permission`](../interfaces/Permission.md)\> | #### Returns -`Promise`<[`Permission`](../interfaces/Permission.md)\> +`Promise`\<[`Permission`](../interfaces/Permission.md)\> #### Defined in -[src/services/metadata/Permissions.ts:114](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Permissions.ts#L114) +[src/services/metadata/Permissions.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Permissions.ts#L118) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -452,13 +591,13 @@ Update a Permission by id #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -483,4 +622,4 @@ Update a Permission by id #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/Profiles.md b/docs/api-reference/classes/Profiles.md index b18ef0a7c..6ece4d462 100644 --- a/docs/api-reference/classes/Profiles.md +++ b/docs/api-reference/classes/Profiles.md @@ -18,13 +18,15 @@ - [artifactsFolder](Profiles.md#artifactsfolder) - [circuitsFolder](Profiles.md#circuitsfolder) +- [client](Profiles.md#client) - [config](Profiles.md#config) - [instanceConfig](Profiles.md#instanceconfig) - [instantiableConfig](Profiles.md#instantiableconfig) - [logger](Profiles.md#logger) - [nevermined](Profiles.md#nevermined) +- [publicClient](Profiles.md#publicclient) - [url](Profiles.md#url) -- [web3](Profiles.md#web3) +- [walletClient](Profiles.md#walletclient) ### Methods @@ -43,7 +45,7 @@ ### constructor -• **new Profiles**(`config`) +• **new Profiles**(`config`): [`Profiles`](Profiles.md) #### Parameters @@ -51,23 +53,27 @@ | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`Profiles`](Profiles.md) + #### Inherited from [MarketplaceApi](MarketplaceApi.md).[constructor](MarketplaceApi.md#constructor) #### Defined in -[src/services/metadata/MarketplaceAPI.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L7) +[src/services/metadata/MarketplaceAPI.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L7) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -75,17 +81,17 @@ MarketplaceApi.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -93,13 +99,31 @@ MarketplaceApi.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +MarketplaceApi.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -111,13 +135,13 @@ MarketplaceApi.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -129,17 +153,17 @@ MarketplaceApi.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -147,13 +171,13 @@ MarketplaceApi.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -165,13 +189,13 @@ MarketplaceApi.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -183,13 +207,95 @@ MarketplaceApi.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +MarketplaceApi.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- ### url -• `Protected` `get` **url**(): `string` +• `get` **url**(): `string` #### Returns @@ -201,31 +307,64 @@ MarketplaceApi.url #### Defined in -[src/services/metadata/MarketplaceAPI.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L12) +[src/services/metadata/MarketplaceAPI.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L12) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -MarketplaceApi.web3 +MarketplaceApi.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### addNewAddress -▸ **addNewAddress**(`clientAssertion`): `Promise`<`string`\> +▸ **addNewAddress**(`clientAssertion`): `Promise`\<`string`\> #### Parameters @@ -235,7 +374,7 @@ MarketplaceApi.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -243,13 +382,13 @@ MarketplaceApi.web3 #### Defined in -[src/services/metadata/MarketplaceAPI.ts:36](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L36) +[src/services/metadata/MarketplaceAPI.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L36) --- ### create -▸ **create**(`newProfile`): `Promise`<[`Profile`](../interfaces/Profile.md)\> +▸ **create**(`newProfile`): `Promise`\<[`Profile`](../interfaces/Profile.md)\> Create user profile @@ -261,17 +400,17 @@ Create user profile #### Returns -`Promise`<[`Profile`](../interfaces/Profile.md)\> +`Promise`\<[`Profile`](../interfaces/Profile.md)\> #### Defined in -[src/services/metadata/Profiles.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Profiles.ts#L11) +[src/services/metadata/Profiles.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Profiles.ts#L11) --- ### disableOneByUserId -▸ **disableOneByUserId**(`userId`): `Promise`<[`Profile`](../interfaces/Profile.md)\> +▸ **disableOneByUserId**(`userId`): `Promise`\<[`Profile`](../interfaces/Profile.md)\> #### Parameters @@ -281,17 +420,17 @@ Create user profile #### Returns -`Promise`<[`Profile`](../interfaces/Profile.md)\> +`Promise`\<[`Profile`](../interfaces/Profile.md)\> #### Defined in -[src/services/metadata/Profiles.ts:93](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Profiles.ts#L93) +[src/services/metadata/Profiles.ts:95](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Profiles.ts#L95) --- ### findOneByAddress -▸ **findOneByAddress**(`address`): `Promise`<[`Profile`](../interfaces/Profile.md)\> +▸ **findOneByAddress**(`address`): `Promise`\<[`ReducedProfile`](../interfaces/ReducedProfile.md)\> #### Parameters @@ -301,17 +440,17 @@ Create user profile #### Returns -`Promise`<[`Profile`](../interfaces/Profile.md)\> +`Promise`\<[`ReducedProfile`](../interfaces/ReducedProfile.md)\> #### Defined in -[src/services/metadata/Profiles.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Profiles.ts#L74) +[src/services/metadata/Profiles.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Profiles.ts#L76) --- ### findOneByUserId -▸ **findOneByUserId**(`userId`): `Promise`<[`Profile`](../interfaces/Profile.md)\> +▸ **findOneByUserId**(`userId`): `Promise`\<[`Profile`](../interfaces/Profile.md)\> #### Parameters @@ -321,17 +460,17 @@ Create user profile #### Returns -`Promise`<[`Profile`](../interfaces/Profile.md)\> +`Promise`\<[`Profile`](../interfaces/Profile.md)\> #### Defined in -[src/services/metadata/Profiles.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Profiles.ts#L55) +[src/services/metadata/Profiles.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Profiles.ts#L55) --- ### login -▸ **login**(`clientAssertion`): `Promise`<`string`\> +▸ **login**(`clientAssertion`): `Promise`\<`string`\> #### Parameters @@ -341,7 +480,7 @@ Create user profile #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -349,13 +488,13 @@ Create user profile #### Defined in -[src/services/metadata/MarketplaceAPI.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MarketplaceAPI.ts#L16) +[src/services/metadata/MarketplaceAPI.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MarketplaceAPI.ts#L16) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -373,36 +512,36 @@ Create user profile #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### update -▸ **update**(`userId`, `profile`): `Promise`<[`Profile`](../interfaces/Profile.md)\> +▸ **update**(`userId`, `profile`): `Promise`\<[`Profile`](../interfaces/Profile.md)\> Update user profile #### Parameters -| Name | Type | -| :-------- | :------------------------------------------------------ | -| `userId` | `string` | -| `profile` | `Partial`<[`NewProfile`](../interfaces/NewProfile.md)\> | +| Name | Type | +| :-------- | :------------------------------------------------------- | +| `userId` | `string` | +| `profile` | `Partial`\<[`NewProfile`](../interfaces/NewProfile.md)\> | #### Returns -`Promise`<[`Profile`](../interfaces/Profile.md)\> +`Promise`\<[`Profile`](../interfaces/Profile.md)\> #### Defined in -[src/services/metadata/Profiles.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/Profiles.ts#L34) +[src/services/metadata/Profiles.ts:34](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/Profiles.ts#L34) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -420,13 +559,13 @@ Update user profile #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -451,4 +590,4 @@ Update user profile #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/ProvenanceApi.md b/docs/api-reference/classes/ProvenanceApi.md index 7d6610995..667d230c4 100644 --- a/docs/api-reference/classes/ProvenanceApi.md +++ b/docs/api-reference/classes/ProvenanceApi.md @@ -2,7 +2,7 @@ # Class: ProvenanceApi -Nevermined Provenance API. It allows to register and search entries in the Nevermined W3C Provenance registry +The Nevermined Provenance API allows to register and search entries in the Nevermined W3C Provenance registry You can find more information about Nevermined Provenance here: [https://docs.nevermined.io/docs/architecture/specs/Spec-PROVENANCE](https://docs.nevermined.io/docs/architecture/specs/Spec-PROVENANCE) @@ -22,12 +22,14 @@ You can find more information about Nevermined Provenance here: - [artifactsFolder](ProvenanceApi.md#artifactsfolder) - [circuitsFolder](ProvenanceApi.md#circuitsfolder) +- [client](ProvenanceApi.md#client) - [config](ProvenanceApi.md#config) - [instanceConfig](ProvenanceApi.md#instanceconfig) - [instantiableConfig](ProvenanceApi.md#instantiableconfig) - [logger](ProvenanceApi.md#logger) - [nevermined](ProvenanceApi.md#nevermined) -- [web3](ProvenanceApi.md#web3) +- [publicClient](ProvenanceApi.md#publicclient) +- [walletClient](ProvenanceApi.md#walletclient) ### Methods @@ -50,7 +52,7 @@ You can find more information about Nevermined Provenance here: ### constructor -• **new ProvenanceApi**(`config`) +• **new ProvenanceApi**(`config`): [`ProvenanceApi`](ProvenanceApi.md) Creates a new ProvenanceApi @@ -60,23 +62,29 @@ Creates a new ProvenanceApi | :------- | :---------------------------------------------------------- | :--------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | Configuration of the Nevermined instance | +#### Returns + +[`ProvenanceApi`](ProvenanceApi.md) + +[ProvenanceApi](ProvenanceApi.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/api/ProvenanceApi.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ProvenanceApi.ts#L18) +[src/nevermined/api/ProvenanceApi.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ProvenanceApi.ts#L18) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -84,17 +92,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -102,13 +110,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -120,13 +146,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -138,17 +164,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -156,13 +182,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -174,13 +200,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -192,33 +218,148 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### actedOnBehalf -▸ **actedOnBehalf**(`provenanceId`, `did`, `delegateAgentId`, `responsibleAgentId`, `activityId`, `signature`, `attributes`, `from`, `txParams?`): `Promise`<`boolean`\> +▸ **actedOnBehalf**(`provenanceId`, `did`, `delegateAgentId`, `responsibleAgentId`, `activityId`, `signature`, `attributes`, `from`, `txParams?`): `Promise`\<`boolean`\> -Implements the W3C PROV Delegation action +Implements the W3C PROV Delegation action. #### Parameters @@ -231,51 +372,55 @@ Implements the W3C PROV Delegation action | `activityId` | `string` | Identifier of the activity creating the new entity | | `signature` | `string` | Signature provided by the delegated agent | | `attributes` | `string` | Attributes associated with the action | -| `from` | [`Account`](Account.md) | Sender account address. | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the call succeeded. +**`Remarks`** + +This method can be called when want to track the delegation of an agent to act on behalf of another agent. + #### Defined in -[src/nevermined/api/ProvenanceApi.ts:147](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ProvenanceApi.ts#L147) +[src/nevermined/api/ProvenanceApi.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ProvenanceApi.ts#L163) --- ### addDidProvenanceDelegate -▸ **addDidProvenanceDelegate**(`did`, `delegated`, `from`, `txParams?`): `Promise`<`boolean`\> +▸ **addDidProvenanceDelegate**(`did`, `delegatedAddress`, `from`, `txParams?`): `Promise`\<`boolean`\> -Add new DID provenance delegate. +Add new DID provenance delegate. The delegate will be able to perform actions on behalf of the DID owner. #### Parameters -| Name | Type | Description | -| :---------- | :---------------------------------------------- | :------------------------------- | -| `did` | `string` | Identifier of the entity created | -| `delegated` | `string` | Delegate Address | -| `from` | [`Account`](Account.md) | Sender account address. | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | +| Name | Type | Description | +| :----------------- | :---------------------------------------------- | :------------------------------- | +| `did` | `string` | Identifier of the entity created | +| `delegatedAddress` | `string` | Delegate Address | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the call succeeded. #### Defined in -[src/nevermined/api/ProvenanceApi.ts:180](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ProvenanceApi.ts#L180) +[src/nevermined/api/ProvenanceApi.ts:196](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ProvenanceApi.ts#L196) --- ### getDIDProvenanceEvents -▸ **getDIDProvenanceEvents**(`did`): `Promise`<{ `activityId`: `string` ; `agentId`: `string` ; `agentInvolvedId`: `string` ; `attributes?`: `string` ; `blockNumberUpdated`: `number` ; `did`: `string` ; `id`: `string` ; `method`: `number` ; `provId`: `string` ; `relatedDid`: `string` }[]\> +▸ **getDIDProvenanceEvents**(`did`): `Promise`\<\{ `activityId`: `string` ; `agentId`: `string` ; `agentInvolvedId`: `string` ; `attributes?`: `string` ; `blockNumberUpdated`: `number` ; `did`: `string` ; `id`: `string` ; `method`: `number` ; `provId`: `string` ; `relatedDid`: `string` }[]\> Search for ProvenanceAttributeRegistered events related with a specific DID @@ -287,19 +432,19 @@ Search for ProvenanceAttributeRegistered events related with a specific DID #### Returns -`Promise`<{ `activityId`: `string` ; `agentId`: `string` ; `agentInvolvedId`: `string` ; `attributes?`: `string` ; `blockNumberUpdated`: `number` ; `did`: `string` ; `id`: `string` ; `method`: `number` ; `provId`: `string` ; `relatedDid`: `string` }[]\> +`Promise`\<\{ `activityId`: `string` ; `agentId`: `string` ; `agentInvolvedId`: `string` ; `attributes?`: `string` ; `blockNumberUpdated`: `number` ; `did`: `string` ; `id`: `string` ; `method`: `number` ; `provId`: `string` ; `relatedDid`: `string` }[]\> A list of provenance events. #### Defined in -[src/nevermined/api/ProvenanceApi.ts:240](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ProvenanceApi.ts#L240) +[src/nevermined/api/ProvenanceApi.ts:258](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ProvenanceApi.ts#L258) --- ### getProvenanceEntry -▸ **getProvenanceEntry**(`provenanceId`): `Promise`<[`ProvenanceRegistry`](../interfaces/ProvenanceRegistry.md)\> +▸ **getProvenanceEntry**(`provenanceId`): `Promise`\<`undefined` \| \{ `activityId`: `any` ; `agentId`: `any` ; `agentInvolvedId`: `any` ; `blockNumberUpdated`: `any` ; `createdBy`: `any` ; `did`: `any` ; `method`: [`ProvenanceMethod`](../enums/ProvenanceMethod.md) ; `relatedDid`: `any` ; `signatureDelegate`: `any` }\> Given a provenance id it returns the provenance details @@ -311,17 +456,19 @@ Given a provenance id it returns the provenance details #### Returns -`Promise`<[`ProvenanceRegistry`](../interfaces/ProvenanceRegistry.md)\> +`Promise`\<`undefined` \| \{ `activityId`: `any` ; `agentId`: `any` ; `agentInvolvedId`: `any` ; `blockNumberUpdated`: `any` ; `createdBy`: `any` ; `did`: `any` ; `method`: [`ProvenanceMethod`](../enums/ProvenanceMethod.md) ; `relatedDid`: `any` ; `signatureDelegate`: `any` }\> + +[ProvenanceRegistry](../interfaces/ProvenanceRegistry.md) object with the provenance details #### Defined in -[src/nevermined/api/ProvenanceApi.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ProvenanceApi.ts#L28) +[src/nevermined/api/ProvenanceApi.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ProvenanceApi.ts#L28) --- ### getProvenanceMethodEvents -▸ **getProvenanceMethodEvents**<`T`\>(`method`, `did`): `Promise`<[`ProvenanceEvent`](../code-reference.md#provenanceevent)<`T`\>[]\> +▸ **getProvenanceMethodEvents**\<`T`\>(`method`, `did`): `Promise`\<[`ProvenanceEvent`](../code-reference.md#provenanceevent)\<`T`\>[]\> Search for ProvenanceAttributeRegistered events related with a specific DID @@ -340,19 +487,19 @@ Search for ProvenanceAttributeRegistered events related with a specific DID #### Returns -`Promise`<[`ProvenanceEvent`](../code-reference.md#provenanceevent)<`T`\>[]\> +`Promise`\<[`ProvenanceEvent`](../code-reference.md#provenanceevent)\<`T`\>[]\> A list of provenance method events. #### Defined in -[src/nevermined/api/ProvenanceApi.ts:250](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ProvenanceApi.ts#L250) +[src/nevermined/api/ProvenanceApi.ts:268](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ProvenanceApi.ts#L268) --- ### getProvenanceOwner -▸ **getProvenanceOwner**(`did`): `Promise`<`unknown`\> +▸ **getProvenanceOwner**(`did`): `Promise`\<`unknown`\> Retrieve the owner of the provenance record. @@ -364,67 +511,71 @@ Retrieve the owner of the provenance record. #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> + +Address of the provenance owner. #### Defined in -[src/nevermined/api/ProvenanceApi.ts:231](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ProvenanceApi.ts#L231) +[src/nevermined/api/ProvenanceApi.ts:249](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ProvenanceApi.ts#L249) --- ### isProvenanceDelegate -▸ **isProvenanceDelegate**(`did`, `delegated`): `Promise`<`unknown`\> +▸ **isProvenanceDelegate**(`did`, `delegatedAddress`): `Promise`\<`unknown`\> Check whether a given DID delegate exists #### Parameters -| Name | Type | Description | -| :---------- | :------- | :------------------------------- | -| `did` | `string` | Identifier of the entity created | -| `delegated` | `string` | Delegate Address | +| Name | Type | Description | +| :----------------- | :------- | :------------------------------- | +| `did` | `string` | Identifier of the entity created | +| `delegatedAddress` | `string` | Delegate Address | #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> + +true if the address is a delegate. #### Defined in -[src/nevermined/api/ProvenanceApi.ts:223](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ProvenanceApi.ts#L223) +[src/nevermined/api/ProvenanceApi.ts:240](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ProvenanceApi.ts#L240) --- ### removeDidProvenanceDelegate -▸ **removeDidProvenanceDelegate**(`did`, `delegated`, `from`, `txParams?`): `Promise`<`boolean`\> +▸ **removeDidProvenanceDelegate**(`did`, `delegatedAddress`, `from`, `txParams?`): `Promise`\<`boolean`\> -Remove an existing DID delegate. +Remove an existing DID as delegate. #### Parameters -| Name | Type | Description | -| :---------- | :---------------------------------------------- | :------------------------------- | -| `did` | `string` | Identifier of the entity created | -| `delegated` | `string` | Delegate Address | -| `from` | [`Account`](Account.md) | Sender account address. | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | +| Name | Type | Description | +| :----------------- | :---------------------------------------------- | :------------------------------- | +| `did` | `string` | Identifier of the entity created | +| `delegatedAddress` | `string` | Delegate Address | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the call succeeded. #### Defined in -[src/nevermined/api/ProvenanceApi.ts:203](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ProvenanceApi.ts#L203) +[src/nevermined/api/ProvenanceApi.ts:219](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ProvenanceApi.ts#L219) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -442,15 +593,15 @@ true if the call succeeded. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### used -▸ **used**(`provenanceId`, `did`, `agentId`, `activityId`, `signature`, `attributes`, `from`, `txParams?`): `Promise`<`boolean`\> +▸ **used**(`provenanceId`, `did`, `agentId`, `activityId`, `signature`, `attributes`, `from`, `txParams?`): `Promise`\<`boolean`\> -Implements the W3C PROV Usage action +Implements the W3C PROV Usage action. #### Parameters @@ -462,24 +613,28 @@ Implements the W3C PROV Usage action | `activityId` | `string` | Identifier of the activity creating the new entity | | `signature` | `string` | Signature (optional) provided by the agent involved | | `attributes` | `string` | Attributes associated with the action | -| `from` | [`Account`](Account.md) | Sender account address. | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the call succeeded. +**`Remarks`** + +This method can be called when want to track the usage of a DID. + #### Defined in -[src/nevermined/api/ProvenanceApi.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ProvenanceApi.ts#L44) +[src/nevermined/api/ProvenanceApi.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ProvenanceApi.ts#L48) --- ### wasAssociatedWith -▸ **wasAssociatedWith**(`provenanceId`, `did`, `agentId`, `activityId`, `attributes`, `from`, `txParams?`): `Promise`<`boolean`\> +▸ **wasAssociatedWith**(`provenanceId`, `did`, `agentId`, `activityId`, `attributes`, `from`, `txParams?`): `Promise`\<`boolean`\> Implements the W3C PROV Association action @@ -492,24 +647,28 @@ Implements the W3C PROV Association action | `agentId` | `string` | Agent Identifier | | `activityId` | `string` | Identifier of the activity creating the new entity | | `attributes` | `string` | Attributes associated with the action | -| `from` | [`Account`](Account.md) | Sender account address. | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the call succeeded. +**`Remarks`** + +This method can be called when want to track the association of an agent with a DID. + #### Defined in -[src/nevermined/api/ProvenanceApi.ts:113](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ProvenanceApi.ts#L113) +[src/nevermined/api/ProvenanceApi.ts:125](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ProvenanceApi.ts#L125) --- ### wasDerivedFrom -▸ **wasDerivedFrom**(`provenanceId`, `newEntityDid`, `usedEntityDid`, `agentId`, `activityId`, `attributes`, `from`, `txParams?`): `Promise`<`boolean`\> +▸ **wasDerivedFrom**(`provenanceId`, `newEntityDid`, `usedEntityDid`, `agentId`, `activityId`, `attributes`, `from`, `txParams?`): `Promise`\<`boolean`\> Implements the W3C PROV Derivation action @@ -523,24 +682,28 @@ Implements the W3C PROV Derivation action | `agentId` | `string` | Agent Identifier | | `activityId` | `string` | Identifier of the activity creating the new entity | | `attributes` | `string` | Attributes associated with the action | -| `from` | [`Account`](Account.md) | Sender account address. | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the call succeeded. +**`Remarks`** + +This method can be called when want to track the derivation of a new DID from an existing DID. + #### Defined in -[src/nevermined/api/ProvenanceApi.ts:79](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ProvenanceApi.ts#L79) +[src/nevermined/api/ProvenanceApi.ts:87](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ProvenanceApi.ts#L87) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -558,13 +721,13 @@ true if the call succeeded. #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -589,4 +752,4 @@ true if the call succeeded. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/ProviderCondition.md b/docs/api-reference/classes/ProviderCondition.md deleted file mode 100644 index 7fc4bef3a..000000000 --- a/docs/api-reference/classes/ProviderCondition.md +++ /dev/null @@ -1,1005 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / ProviderCondition - -# Class: ProviderCondition - -## Type parameters - -| Name | Type | -| :------ | :-------------------------------------------------------------- | -| `Ctx` | extends [`ConditionContext`](../interfaces/ConditionContext.md) | -| `Extra` | `Record`<`string`, `unknown`\> | - -## Hierarchy - -- [`Condition`](Condition.md)<`Ctx`, `Extra`\> - - ↳ **`ProviderCondition`** - - ↳↳ [`AccessCondition`](AccessCondition.md) - - ↳↳ [`EscrowPaymentCondition`](EscrowPaymentCondition.md) - - ↳↳ [`ComputeExecutionCondition`](ComputeExecutionCondition.md) - - ↳↳ [`NFTAccessCondition`](NFTAccessCondition.md) - - ↳↳ [`TransferNFTCondition`](TransferNFTCondition.md) - - ↳↳ [`TransferNFT721Condition`](TransferNFT721Condition.md) - - ↳↳ [`TransferDIDOwnershipCondition`](TransferDIDOwnershipCondition.md) - - ↳↳ [`AaveBorrowCondition`](AaveBorrowCondition.md) - - ↳↳ [`AaveCollateralDepositCondition`](AaveCollateralDepositCondition.md) - - ↳↳ [`AaveCollateralWithdrawCondition`](AaveCollateralWithdrawCondition.md) - - ↳↳ [`AaveRepayCondition`](AaveRepayCondition.md) - - ↳↳ [`NFT721LockCondition`](NFT721LockCondition.md) - - ↳↳ [`DistributeNFTCollateralCondition`](DistributeNFTCollateralCondition.md) - -## Table of contents - -### Constructors - -- [constructor](ProviderCondition.md#constructor) - -### Properties - -- [address](ProviderCondition.md#address) -- [contract](ProviderCondition.md#contract) -- [contractName](ProviderCondition.md#contractname) -- [events](ProviderCondition.md#events) -- [version](ProviderCondition.md#version) - -### Accessors - -- [artifactsFolder](ProviderCondition.md#artifactsfolder) -- [circuitsFolder](ProviderCondition.md#circuitsfolder) -- [config](ProviderCondition.md#config) -- [instanceConfig](ProviderCondition.md#instanceconfig) -- [instantiableConfig](ProviderCondition.md#instantiableconfig) -- [logger](ProviderCondition.md#logger) -- [nevermined](ProviderCondition.md#nevermined) -- [web3](ProviderCondition.md#web3) - -### Methods - -- [abortByTimeOut](ProviderCondition.md#abortbytimeout) -- [call](ProviderCondition.md#call) -- [fulfill](ProviderCondition.md#fulfill) -- [fulfillInstance](ProviderCondition.md#fulfillinstance) -- [fulfillPlain](ProviderCondition.md#fulfillplain) -- [fulfillWithNode](ProviderCondition.md#fulfillwithnode) -- [generateId](ProviderCondition.md#generateid) -- [generateIdHash](ProviderCondition.md#generateidhash) -- [generateIdWithSeed](ProviderCondition.md#generateidwithseed) -- [getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) -- [getFromAddress](ProviderCondition.md#getfromaddress) -- [getInputsOfMethod](ProviderCondition.md#getinputsofmethod) -- [getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) -- [hashValues](ProviderCondition.md#hashvalues) -- [hashValuesPlain](ProviderCondition.md#hashvaluesplain) -- [init](ProviderCondition.md#init) -- [instance](ProviderCondition.md#instance) -- [instanceFromDDO](ProviderCondition.md#instancefromddo) -- [nodeMethod](ProviderCondition.md#nodemethod) -- [params](ProviderCondition.md#params) -- [paramsFromDDO](ProviderCondition.md#paramsfromddo) -- [send](ProviderCondition.md#send) -- [sendFrom](ProviderCondition.md#sendfrom) -- [setInstanceConfig](ProviderCondition.md#setinstanceconfig) -- [getInstance](ProviderCondition.md#getinstance) -- [setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) - -## Constructors - -### constructor - -• **new ProviderCondition**<`Ctx`, `Extra`\>(`contractName`) - -#### Type parameters - -| Name | Type | -| :------ | :-------------------------------------------------------------- | -| `Ctx` | extends [`ConditionContext`](../interfaces/ConditionContext.md) | -| `Extra` | `Record`<`string`, `unknown`\> | - -#### Parameters - -| Name | Type | -| :------------- | :------- | -| `contractName` | `string` | - -#### Inherited from - -[Condition](Condition.md).[constructor](Condition.md#constructor) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) - -## Properties - -### address - -• **address**: `string` - -#### Inherited from - -[Condition](Condition.md).[address](Condition.md#address) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) - ---- - -### contract - -• **contract**: `BaseContract` = `null` - -#### Inherited from - -[Condition](Condition.md).[contract](Condition.md#contract) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) - ---- - -### contractName - -• `Readonly` **contractName**: `string` - -#### Inherited from - -[Condition](Condition.md).[contractName](Condition.md#contractname) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) - ---- - -### events - -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` - -#### Inherited from - -[Condition](Condition.md).[events](Condition.md#events) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) - ---- - -### version - -• **version**: `string` - -#### Inherited from - -[Condition](Condition.md).[version](Condition.md#version) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -Condition.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -Condition.circuitsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) - ---- - -### config - -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -Condition.config - -#### Defined in - -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -Condition.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -Condition.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -Condition.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -Condition.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -Condition.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) - -## Methods - -### abortByTimeOut - -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------- | -| `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[Condition](Condition.md).[abortByTimeOut](Condition.md#abortbytimeout) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) - ---- - -### call - -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> - -#### Type parameters - -| Name | -| :--- | -| `T` | - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | - -#### Returns - -`Promise`<`T`\> - -#### Inherited from - -[Condition](Condition.md).[call](Condition.md#call) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) - ---- - -### fulfill - -▸ `Abstract` **fulfill**(`agreementId`, `...args`): `any` - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...args` | `any`[] | - -#### Returns - -`any` - -#### Inherited from - -[Condition](Condition.md).[fulfill](Condition.md#fulfill) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L61) - ---- - -### fulfillInstance - -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :----------------- | :------------------------------------------------------------------ | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\> | `undefined` | -| `additionalParams` | `Extra` | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[Condition](Condition.md).[fulfillInstance](Condition.md#fulfillinstance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) - ---- - -### fulfillPlain - -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | Default value | -| :------------ | :-------------------------------------------------------- | :------------ | -| `agreementId` | `string` | `undefined` | -| `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[Condition](Condition.md).[fulfillPlain](Condition.md#fulfillplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) - ---- - -### fulfillWithNode - -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :----------------- | :------------------------------------------------------------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\> | -| `additionalParams` | `Extra` | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Overrides - -[Condition](Condition.md).[fulfillWithNode](Condition.md#fulfillwithnode) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) - ---- - -### generateId - -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[Condition](Condition.md).[generateId](Condition.md#generateid) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) - ---- - -### generateIdHash - -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `...values` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[Condition](Condition.md).[generateIdHash](Condition.md#generateidhash) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) - ---- - -### generateIdWithSeed - -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | -| `valueHash` | `string` | - -#### Returns - -`Promise`<[`string`, `string`]\> - -#### Inherited from - -[Condition](Condition.md).[generateIdWithSeed](Condition.md#generateidwithseed) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) - ---- - -### getConditionFulfilledEvent - -▸ **getConditionFulfilledEvent**(`agreementId`): [`EventResult`](../code-reference.md#eventresult) - -#### Parameters - -| Name | Type | -| :------------ | :------- | -| `agreementId` | `string` | - -#### Returns - -[`EventResult`](../code-reference.md#eventresult) - -#### Inherited from - -[Condition](Condition.md).[getConditionFulfilledEvent](Condition.md#getconditionfulfilledevent) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) - ---- - -### getFromAddress - -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------- | -| `from?` | `string` | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[Condition](Condition.md).[getFromAddress](Condition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[Condition](Condition.md).[getInputsOfMethod](Condition.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[Condition](Condition.md).[getSignatureOfMethod](Condition.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) - ---- - -### hashValues - -▸ **hashValues**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[Condition](Condition.md).[hashValues](Condition.md#hashvalues) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) - ---- - -### hashValuesPlain - -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -`Promise`<`string`\> - -#### Inherited from - -[Condition](Condition.md).[hashValuesPlain](Condition.md#hashvaluesplain) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) - ---- - -### init - -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> - -#### Parameters - -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`void`\> - -#### Inherited from - -[Condition](Condition.md).[init](Condition.md#init) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) - ---- - -### instance - -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\>\> - -#### Parameters - -| Name | Type | -| :------------ | :---------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\> | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\>\> - -#### Inherited from - -[Condition](Condition.md).[instance](Condition.md#instance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) - ---- - -### instanceFromDDO - -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\>\> - -#### Parameters - -| Name | Type | -| :------------ | :-------------------------------------------------------------------- | -| `agreementId` | `string` | -| `ctx` | `Ctx` | -| `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | - -#### Returns - -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Extra`\>\> - -#### Inherited from - -[Condition](Condition.md).[instanceFromDDO](Condition.md#instancefromddo) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) - ---- - -### nodeMethod - -▸ **nodeMethod**(): [`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Returns - -[`ConditionMethod`](../code-reference.md#conditionmethod) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L208) - ---- - -### params - -▸ **params**(`...args`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\> - -#### Parameters - -| Name | Type | -| :-------- | :------ | -| `...args` | `any`[] | - -#### Returns - -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\> - -#### Inherited from - -[Condition](Condition.md).[params](Condition.md#params) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L122) - ---- - -### paramsFromDDO - -▸ `Abstract` **paramsFromDDO**(`ctx`, `...args`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\>\> - -#### Parameters - -| Name | Type | -| :-------- | :-------------------------------------------------------------------- | -| `ctx` | `Ctx` | -| `...args` | [`ConditionInstanceSmall`](../interfaces/ConditionInstanceSmall.md)[] | - -#### Returns - -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Extra`\>\> - -#### Inherited from - -[Condition](Condition.md).[paramsFromDDO](Condition.md#paramsfromddo) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:137](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L137) - ---- - -### send - -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[Condition](Condition.md).[send](Condition.md#send) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) - ---- - -### sendFrom - -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | - -#### Returns - -`Promise`<`ContractTransactionReceipt`\> - -#### Inherited from - -[Condition](Condition.md).[sendFrom](Condition.md#sendfrom) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[Condition](Condition.md).[setInstanceConfig](Condition.md#setinstanceconfig) - -#### Defined in - -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) - ---- - -### getInstance - -▸ `Static` **getInstance**<`Ctx`, `Extra`\>(`config`, `conditionName`, `conditionsClass`, `optional?`): `Promise`<`any`\> - -#### Type parameters - -| Name | Type | -| :------ | :-------------------------------------------------------------- | -| `Ctx` | extends [`ConditionContext`](../interfaces/ConditionContext.md) | -| `Extra` | `Extra` | - -#### Parameters - -| Name | Type | Default value | -| :---------------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `conditionName` | `string` | `undefined` | -| `conditionsClass` | `any` | `undefined` | -| `optional` | `boolean` | `false` | - -#### Returns - -`Promise`<`any`\> - -#### Inherited from - -[Condition](Condition.md).[getInstance](Condition.md#getinstance) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:111](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L111) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[Condition](Condition.md).[setInstanceConfig](Condition.md#setinstanceconfig-1) - -#### Defined in - -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) diff --git a/docs/api-reference/classes/Providers.md b/docs/api-reference/classes/Providers.md index cfcf32426..62544d2f4 100644 --- a/docs/api-reference/classes/Providers.md +++ b/docs/api-reference/classes/Providers.md @@ -20,12 +20,14 @@ Providers API that allows the basic management of the provider accounts associat - [artifactsFolder](Providers.md#artifactsfolder) - [circuitsFolder](Providers.md#circuitsfolder) +- [client](Providers.md#client) - [config](Providers.md#config) - [instanceConfig](Providers.md#instanceconfig) - [instantiableConfig](Providers.md#instantiableconfig) - [logger](Providers.md#logger) - [nevermined](Providers.md#nevermined) -- [web3](Providers.md#web3) +- [publicClient](Providers.md#publicclient) +- [walletClient](Providers.md#walletclient) ### Methods @@ -40,7 +42,7 @@ Providers API that allows the basic management of the provider accounts associat ### constructor -• **new Providers**(`config`) +• **new Providers**(`config`): [`Providers`](Providers.md) #### Parameters @@ -48,23 +50,27 @@ Providers API that allows the basic management of the provider accounts associat | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`Providers`](Providers.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/Provider.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Provider.ts#L9) +[src/nevermined/Provider.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Provider.ts#L9) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -72,17 +78,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -90,13 +96,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -108,13 +132,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -126,17 +150,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -144,13 +168,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -162,13 +186,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -180,58 +204,173 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### add -▸ **add**(`did`, `address`, `from`, `txParams?`): `Promise`<`boolean`\> +▸ **add**(`did`, `newProviderAddress`, `from`, `txParams?`): `Promise`\<`boolean`\> Add a new provider in the registry for a did. #### Parameters -| Name | Type | Description | -| :---------- | :---------------------------------------------- | :--------------------------------------------- | -| `did` | `string` | Identifier of the entity created | -| `address` | `string` | New provider address in the list of providers. | -| `from` | [`Account`](Account.md) | Sender account address. | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | +| Name | Type | Description | +| :------------------- | :---------------------------------------------- | :--------------------------------------------- | +| `did` | `string` | Identifier of the entity created | +| `newProviderAddress` | `string` | New provider address in the list of providers. | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the call succeeded. #### Defined in -[src/nevermined/Provider.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Provider.ts#L23) +[src/nevermined/Provider.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Provider.ts#L23) --- ### list -▸ **list**(`did`): `Promise`<`any`\> +▸ **list**(`did`): `Promise`\<`any`\> List the provider addresses for a did. @@ -243,44 +382,44 @@ List the provider addresses for a did. #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/nevermined/Provider.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Provider.ts#L55) +[src/nevermined/Provider.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Provider.ts#L55) --- ### remove -▸ **remove**(`did`, `address`, `from`, `txParams?`): `Promise`<`boolean`\> +▸ **remove**(`did`, `addressToRemove`, `from`, `txParams?`): `Promise`\<`boolean`\> Remove a provider in the registry for a did. #### Parameters -| Name | Type | Description | -| :---------- | :---------------------------------------------- | :--------------------------------------------- | -| `did` | `string` | Identifier of the entity created | -| `address` | `string` | New provider address in the list of providers. | -| `from` | [`Account`](Account.md) | Sender account address. | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | +| Name | Type | Description | +| :---------------- | :---------------------------------------------- | :--------------------------------------------- | +| `did` | `string` | Identifier of the entity created | +| `addressToRemove` | `string` | New provider address in the list of providers. | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the call succeeded. #### Defined in -[src/nevermined/Provider.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Provider.ts#L41) +[src/nevermined/Provider.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Provider.ts#L41) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -298,13 +437,13 @@ true if the call succeeded. #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -322,13 +461,13 @@ true if the call succeeded. #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -353,4 +492,4 @@ true if the call succeeded. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/RegistryBaseApi.md b/docs/api-reference/classes/RegistryBaseApi.md index 565ab2916..255c4b98f 100644 --- a/docs/api-reference/classes/RegistryBaseApi.md +++ b/docs/api-reference/classes/RegistryBaseApi.md @@ -10,12 +10,12 @@ Abstract class proving common functionality related with Assets registration. ↳ **`RegistryBaseApi`** - ↳↳ [`NFTsBaseApi`](NFTsBaseApi.md) - ↳↳ [`AssetsApi`](AssetsApi.md) ↳↳ [`ComputeApi`](ComputeApi.md) + ↳↳ [`NFTsBaseApi`](NFTsBaseApi.md) + ## Table of contents ### Constructors @@ -30,12 +30,14 @@ Abstract class proving common functionality related with Assets registration. - [artifactsFolder](RegistryBaseApi.md#artifactsfolder) - [circuitsFolder](RegistryBaseApi.md#circuitsfolder) +- [client](RegistryBaseApi.md#client) - [config](RegistryBaseApi.md#config) - [instanceConfig](RegistryBaseApi.md#instanceconfig) - [instantiableConfig](RegistryBaseApi.md#instantiableconfig) - [logger](RegistryBaseApi.md#logger) - [nevermined](RegistryBaseApi.md#nevermined) -- [web3](RegistryBaseApi.md#web3) +- [publicClient](RegistryBaseApi.md#publicclient) +- [walletClient](RegistryBaseApi.md#walletclient) ### Methods @@ -55,7 +57,11 @@ Abstract class proving common functionality related with Assets registration. ### constructor -• **new RegistryBaseApi**() +• **new RegistryBaseApi**(): [`RegistryBaseApi`](RegistryBaseApi.md) + +#### Returns + +[`RegistryBaseApi`](RegistryBaseApi.md) #### Inherited from @@ -69,21 +75,21 @@ Abstract class proving common functionality related with Assets registration. #### Index signature -▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`Service`](../code-reference.md#service)\> +▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`Service`](../code-reference.md#service)\> #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L29) +[src/nevermined/api/RegistryBaseApi.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L39) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -91,17 +97,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -109,13 +115,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -127,13 +151,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -145,17 +169,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -163,13 +187,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -181,13 +205,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -199,31 +223,146 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### addRating -▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, it adds a vote to the asset curation information. @@ -234,45 +373,49 @@ Given a DID, it adds a vote to the asset curation information. | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `newRating` | `number` | `undefined` | New average rating of the asset | | `numVotesAdded` | `number` | `1` | Number of new votes added to the rating, typically just 1 | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:514](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L514) +[src/nevermined/api/RegistryBaseApi.ts:534](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L534) --- ### getPriced -▸ `Private` **getPriced**(`assetPrice`): `Promise`<[`PricedMetadataInformation`](../code-reference.md#pricedmetadatainformation)\> +▸ **getPriced**(`assetPrice`): `Promise`\<[`PricedMetadataInformation`](../code-reference.md#pricedmetadatainformation)\> + +It returns the priced metadata information of an asset #### Parameters -| Name | Type | -| :----------- | :---------------------------- | -| `assetPrice` | [`AssetPrice`](AssetPrice.md) | +| Name | Type | Description | +| :----------- | :------------------------------------------- | :-------------- | +| `assetPrice` | `undefined` \| [`AssetPrice`](AssetPrice.md) | the asset price | #### Returns -`Promise`<[`PricedMetadataInformation`](../code-reference.md#pricedmetadatainformation)\> +`Promise`\<[`PricedMetadataInformation`](../code-reference.md#pricedmetadatainformation)\> + +[PricedMetadataInformation](../code-reference.md#pricedmetadatainformation) #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:629](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L629) +[src/nevermined/api/RegistryBaseApi.ts:654](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L654) --- ### list -▸ **list**(`did`, `list`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **list**(`did`, `list`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset allowing to list or unlist it. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. In a Nevermined environment, when an asset is unlisted, it is not possible to be found and accessed by any user. @@ -283,53 +426,53 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be | :---------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `list` | `boolean` | `undefined` | Needs the asset to be listed or unlisted | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:462](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L462) +[src/nevermined/api/RegistryBaseApi.ts:482](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L482) --- ### orderAsset -▸ **orderAsset**(`did`, `serviceReference`, `consumer`, `params?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **orderAsset**(`did`, `serviceReference`, `from`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> Start the purchase/order of an asset's service. Starts by signing the service agreement then sends the request to the publisher via the service endpoint (Node http service). #### Parameters -| Name | Type | Description | -| :----------------- | :------------------------------------------------------------ | :---------------- | -| `did` | `string` | Decentralized ID. | -| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | -| `consumer` | [`Account`](Account.md) | Consumer account. | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :----------------- | :------------------------------------------------------------ | :--------------------- | +| `did` | `string` | Decentralized ID. | +| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | +| `from` | [`NvmAccount`](NvmAccount.md) | Consumer account. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:563](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L563) +[src/nevermined/api/RegistryBaseApi.ts:585](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L585) --- ### registerNeverminedAsset -▸ `Protected` **registerNeverminedAsset**(`assetAttributes`, `publisher`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **registerNeverminedAsset**(`assetAttributes`, `from`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> It registers a new asset in a Nevermined network. This method is protected and not exposed via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, and `nfts` APIs. @@ -339,14 +482,14 @@ via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | | `assetAttributes` | [`AssetAttributes`](AssetAttributes.md) | Attributes describing the asset | -| `publisher` | [`Account`](Account.md) | The account publishing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-721) associated to the asset | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The metadata of the asset created (DDO) @@ -356,15 +499,16 @@ The metadata of the asset created (DDO) #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L42) +[src/nevermined/api/RegistryBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L52) --- ### resolveAsset -▸ `Protected` **resolveAsset**(`did`, `policy?`): `Promise`<[`DDO`](DDO.md)\> +▸ **resolveAsset**(`did`, `policy?`): `Promise`\<[`DDO`](DDO.md)\> -Returns a DDO by DID. Depending of the resolution policy it prioritize the Metadata API or Immutable urls. +Given an asset DID it returns the metadata of that asset represented by a DDO object. +Depending of the resolution policy it prioritize fetching that Metadata from the Marketplace API or Immutable urls (like IPFS). #### Parameters @@ -375,19 +519,19 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> [DDO](DDO.md) #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:310](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L310) +[src/nevermined/api/RegistryBaseApi.ts:324](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L324) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -405,13 +549,13 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### updateAsset -▸ `Protected` **updateAsset**(`did`, `metadata`, `publisher`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **updateAsset**(`did`, `metadata`, `from`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. @@ -421,25 +565,25 @@ Given a DID, updates the metadata associated to the asset. It also can upload th | :----------------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | `undefined` | Metadata describing the asset | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadataOptions` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:353](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L353) +[src/nevermined/api/RegistryBaseApi.ts:367](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L367) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -457,13 +601,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### getServicePlugin -▸ `Static` `Protected` **getServicePlugin**(`config`): `Object` +▸ **getServicePlugin**(`config`): `Object` Initializes the default Nevermined service plugins and return that instance @@ -479,23 +623,22 @@ Initializes the default Nevermined service plugins and return that instance The Nevermined Service Plugin instance -| Name | Type | -| :------------ | :------------------------------------------------------------------------------------------------------------ | -| `aave-credit` | [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceAaveCredit`](../interfaces/ServiceAaveCredit.md)\> | -| `access` | [`AccessService`](AccessService.md) | -| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | -| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | -| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | +| Name | Type | +| :----------- | :-------------------------------------------------------------------- | +| `access` | [`AccessService`](AccessService.md) | +| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | +| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | +| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:618](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L618) +[src/nevermined/api/RegistryBaseApi.ts:640](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L640) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -520,4 +663,4 @@ The Nevermined Service Plugin instance #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/RewardsDistributor.md b/docs/api-reference/classes/RewardsDistributor.md index 39a823b03..459bfa968 100644 --- a/docs/api-reference/classes/RewardsDistributor.md +++ b/docs/api-reference/classes/RewardsDistributor.md @@ -26,25 +26,27 @@ - [artifactsFolder](RewardsDistributor.md#artifactsfolder) - [circuitsFolder](RewardsDistributor.md#circuitsfolder) +- [client](RewardsDistributor.md#client) - [config](RewardsDistributor.md#config) - [instanceConfig](RewardsDistributor.md#instanceconfig) - [instantiableConfig](RewardsDistributor.md#instantiableconfig) - [logger](RewardsDistributor.md#logger) - [nevermined](RewardsDistributor.md#nevermined) -- [web3](RewardsDistributor.md#web3) +- [publicClient](RewardsDistributor.md#publicclient) +- [walletClient](RewardsDistributor.md#walletclient) ### Methods - [call](RewardsDistributor.md#call) - [claimReward](RewardsDistributor.md#claimreward) - [getFromAddress](RewardsDistributor.md#getfromaddress) -- [getInputsOfMethod](RewardsDistributor.md#getinputsofmethod) -- [getSignatureOfMethod](RewardsDistributor.md#getsignatureofmethod) +- [getTransactionLogs](RewardsDistributor.md#gettransactionlogs) - [init](RewardsDistributor.md#init) - [send](RewardsDistributor.md#send) - [sendFrom](RewardsDistributor.md#sendfrom) - [setInstanceConfig](RewardsDistributor.md#setinstanceconfig) - [setReceivers](RewardsDistributor.md#setreceivers) +- [someLog](RewardsDistributor.md#somelog) - [getInstance](RewardsDistributor.md#getinstance) - [setInstanceConfig](RewardsDistributor.md#setinstanceconfig-1) @@ -52,7 +54,7 @@ ### constructor -• **new RewardsDistributor**(`contractName`) +• **new RewardsDistributor**(`contractName`): [`RewardsDistributor`](RewardsDistributor.md) #### Parameters @@ -60,19 +62,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`RewardsDistributor`](RewardsDistributor.md) + #### Inherited from [ContractBase](ContractBase.md).[constructor](ContractBase.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -80,13 +86,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -94,7 +100,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -108,13 +114,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -122,7 +128,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -136,17 +142,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -154,17 +160,17 @@ ContractBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -172,13 +178,31 @@ ContractBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ContractBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -190,13 +214,13 @@ ContractBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -208,17 +232,17 @@ ContractBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -226,13 +250,13 @@ ContractBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -244,13 +268,13 @@ ContractBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -262,31 +286,146 @@ ContractBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ContractBase.web3 +ContractBase.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ContractBase.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -296,15 +435,15 @@ ContractBase.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -312,13 +451,13 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### claimReward -▸ **claimReward**(`agreementId`, `did`, `amounts`, `receivers`, `returnAddress`, `lockPaymentAddress`, `tokenAddress`, `lockCondition`, `releaseConditions`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **claimReward**(`agreementId`, `did`, `amounts`, `receivers`, `returnAddress`, `lockPaymentAddress`, `tokenAddress`, `lockCondition`, `releaseConditions`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -333,22 +472,22 @@ ContractBase.web3 | `tokenAddress` | `string` | | `lockCondition` | `string` | | `releaseConditions` | `string`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/royalties/RewardsDistributor.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/royalties/RewardsDistributor.ts#L19) +[src/keeper/contracts/royalties/RewardsDistributor.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/royalties/RewardsDistributor.ts#L22) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -358,7 +497,7 @@ ContractBase.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -366,73 +505,50 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ContractBase](ContractBase.md).[getInputsOfMethod](ContractBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ContractBase](ContractBase.md).[getSignatureOfMethod](ContractBase.md#getsignatureofmethod) +[ContractBase](ContractBase.md).[getTransactionLogs](ContractBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -440,26 +556,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -467,26 +583,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -494,13 +610,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -518,13 +634,13 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### setReceivers -▸ **setReceivers**(`did`, `addr`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **setReceivers**(`did`, `addr`, `from`, `params?`): `Promise`\<`any`\> #### Parameters @@ -532,22 +648,46 @@ readonly `ParamType`[] | :-------- | :---------------------------------------------- | | `did` | `string` | | `addr` | `string`[] | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> + +#### Defined in + +[src/keeper/contracts/royalties/RewardsDistributor.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/royalties/RewardsDistributor.ts#L19) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[ContractBase](ContractBase.md).[someLog](ContractBase.md#somelog) #### Defined in -[src/keeper/contracts/royalties/RewardsDistributor.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/royalties/RewardsDistributor.ts#L16) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`RewardsDistributor`](RewardsDistributor.md)\> +▸ **getInstance**(`config`): `Promise`\<[`RewardsDistributor`](RewardsDistributor.md)\> #### Parameters @@ -557,7 +697,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`RewardsDistributor`](RewardsDistributor.md)\> +`Promise`\<[`RewardsDistributor`](RewardsDistributor.md)\> #### Overrides @@ -565,13 +705,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/royalties/RewardsDistributor.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/royalties/RewardsDistributor.ts#L7) +[src/keeper/contracts/royalties/RewardsDistributor.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/royalties/RewardsDistributor.ts#L9) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -596,4 +736,4 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/RoyaltyScheme.md b/docs/api-reference/classes/RoyaltyScheme.md index 19df0d93e..922370e4f 100644 --- a/docs/api-reference/classes/RoyaltyScheme.md +++ b/docs/api-reference/classes/RoyaltyScheme.md @@ -8,10 +8,10 @@ ↳ **`RoyaltyScheme`** - ↳↳ [`StandardRoyalties`](StandardRoyalties.md) - ↳↳ [`CurveRoyalties`](CurveRoyalties.md) + ↳↳ [`StandardRoyalties`](StandardRoyalties.md) + ## Table of contents ### Constructors @@ -30,25 +30,27 @@ - [artifactsFolder](RoyaltyScheme.md#artifactsfolder) - [circuitsFolder](RoyaltyScheme.md#circuitsfolder) +- [client](RoyaltyScheme.md#client) - [config](RoyaltyScheme.md#config) - [instanceConfig](RoyaltyScheme.md#instanceconfig) - [instantiableConfig](RoyaltyScheme.md#instantiableconfig) - [logger](RoyaltyScheme.md#logger) - [nevermined](RoyaltyScheme.md#nevermined) -- [web3](RoyaltyScheme.md#web3) +- [publicClient](RoyaltyScheme.md#publicclient) +- [walletClient](RoyaltyScheme.md#walletclient) ### Methods - [call](RoyaltyScheme.md#call) - [getFromAddress](RoyaltyScheme.md#getfromaddress) -- [getInputsOfMethod](RoyaltyScheme.md#getinputsofmethod) - [getRoyalty](RoyaltyScheme.md#getroyalty) -- [getSignatureOfMethod](RoyaltyScheme.md#getsignatureofmethod) +- [getTransactionLogs](RoyaltyScheme.md#gettransactionlogs) - [init](RoyaltyScheme.md#init) - [send](RoyaltyScheme.md#send) - [sendFrom](RoyaltyScheme.md#sendfrom) - [setInstanceConfig](RoyaltyScheme.md#setinstanceconfig) - [setRoyalty](RoyaltyScheme.md#setroyalty) +- [someLog](RoyaltyScheme.md#somelog) - [getInstance](RoyaltyScheme.md#getinstance) - [setInstanceConfig](RoyaltyScheme.md#setinstanceconfig-1) @@ -56,7 +58,7 @@ ### constructor -• **new RoyaltyScheme**(`contractName`) +• **new RoyaltyScheme**(`contractName`): [`RoyaltyScheme`](RoyaltyScheme.md) #### Parameters @@ -64,19 +66,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`RoyaltyScheme`](RoyaltyScheme.md) + #### Inherited from [ContractBase](ContractBase.md).[constructor](ContractBase.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -84,13 +90,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -98,7 +104,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -112,13 +118,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -126,7 +132,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -140,17 +146,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -158,17 +164,17 @@ ContractBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -176,13 +182,31 @@ ContractBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ContractBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -194,13 +218,13 @@ ContractBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -212,17 +236,17 @@ ContractBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -230,13 +254,13 @@ ContractBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -248,13 +272,13 @@ ContractBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -266,31 +290,146 @@ ContractBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +ContractBase.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -ContractBase.web3 +ContractBase.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -300,15 +439,15 @@ ContractBase.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -316,13 +455,13 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -332,7 +471,7 @@ ContractBase.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -340,37 +479,13 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ContractBase](ContractBase.md).[getInputsOfMethod](ContractBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getRoyalty -▸ **getRoyalty**(`did`): `Promise`<`number`\> +▸ **getRoyalty**(`did`): `Promise`\<`number`\> #### Parameters @@ -380,53 +495,54 @@ readonly `ParamType`[] #### Returns -`Promise`<`number`\> +`Promise`\<`number`\> #### Defined in -[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L26) +[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L28) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ContractBase](ContractBase.md).[getSignatureOfMethod](ContractBase.md#getsignatureofmethod) +[ContractBase](ContractBase.md).[getTransactionLogs](ContractBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -434,26 +550,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -461,26 +577,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -488,13 +604,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -512,13 +628,13 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### setRoyalty -▸ **setRoyalty**(`did`, `amount`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **setRoyalty**(`did`, `amount`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -526,22 +642,46 @@ readonly `ParamType`[] | :---------- | :---------------------------------------------- | | `did` | `string` | | `amount` | `number` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> + +#### Defined in + +[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L24) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[ContractBase](ContractBase.md).[someLog](ContractBase.md#somelog) #### Defined in -[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L22) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`, `schemeName`, `schemeClass`, `optional?`): `Promise`<`any`\> +▸ **getInstance**(`config`, `schemeName`, `schemeClass`, `optional?`): `Promise`\<`any`\> #### Parameters @@ -554,7 +694,7 @@ readonly `ParamType`[] #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Overrides @@ -562,13 +702,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L7) +[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L9) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -593,4 +733,4 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/SearchApi.md b/docs/api-reference/classes/SearchApi.md index 58bb01954..3c8ca7054 100644 --- a/docs/api-reference/classes/SearchApi.md +++ b/docs/api-reference/classes/SearchApi.md @@ -22,12 +22,14 @@ You can find more information about Nevermined Metadata here: - [artifactsFolder](SearchApi.md#artifactsfolder) - [circuitsFolder](SearchApi.md#circuitsfolder) +- [client](SearchApi.md#client) - [config](SearchApi.md#config) - [instanceConfig](SearchApi.md#instanceconfig) - [instantiableConfig](SearchApi.md#instantiableconfig) - [logger](SearchApi.md#logger) - [nevermined](SearchApi.md#nevermined) -- [web3](SearchApi.md#web3) +- [publicClient](SearchApi.md#publicclient) +- [walletClient](SearchApi.md#walletclient) ### Methods @@ -50,7 +52,7 @@ You can find more information about Nevermined Metadata here: ### constructor -• **new SearchApi**(`config`) +• **new SearchApi**(`config`): [`SearchApi`](SearchApi.md) Creates a new SearchApi @@ -60,23 +62,29 @@ Creates a new SearchApi | :------- | :---------------------------------------------------------- | :--------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | Configuration of the Nevermined instance | +#### Returns + +[`SearchApi`](SearchApi.md) + +[SearchApi](SearchApi.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/api/SearchApi.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/SearchApi.ts#L32) +[src/nevermined/api/SearchApi.ts:30](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/SearchApi.ts#L30) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -84,17 +92,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -102,13 +110,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -120,13 +146,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -138,17 +164,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -156,13 +182,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -174,13 +200,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -192,31 +218,146 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### byDID -▸ **byDID**(`did?`, `metadataServiceEndpoint?`): `Promise`<[`DDO`](DDO.md)\> +▸ **byDID**(`did`, `metadataServiceEndpoint?`): `Promise`\<[`DDO`](DDO.md)\> Search over the assets using a keyword. @@ -224,24 +365,24 @@ Search over the assets using a keyword. | Name | Type | Description | | :------------------------- | :-------------------------- | :------------------------- | -| `did?` | `string` \| [`DID`](DID.md) | DID of the asset. | +| `did` | `string` \| [`DID`](DID.md) | DID of the asset. | | `metadataServiceEndpoint?` | `string` | Metadata service endpoint. | #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> DDO of the asset. #### Defined in -[src/nevermined/api/SearchApi.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/SearchApi.ts#L43) +[src/nevermined/api/SearchApi.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/SearchApi.ts#L41) --- ### byPrice -▸ **byPrice**(`minPrice`, `maxPrice`, `serviceType?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +▸ **byPrice**(`minPrice`, `maxPrice`, `serviceType?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Query for assets by price. @@ -259,7 +400,7 @@ Query for assets by price. #### Returns -`Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +`Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> **`Example`** @@ -269,13 +410,13 @@ const results = await nevermined.search.byPrice(1, 20) #### Defined in -[src/nevermined/api/SearchApi.ts:112](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/SearchApi.ts#L112) +[src/nevermined/api/SearchApi.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/SearchApi.ts#L110) --- ### bySubscriptionContractAddress -▸ **bySubscriptionContractAddress**(`contractAddress`, `nftType`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +▸ **bySubscriptionContractAddress**(`contractAddress`, `nftType`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Search for all subscription DDOs with `contractAddress` @@ -293,19 +434,19 @@ Search for all subscription DDOs with `contractAddress` #### Returns -`Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +`Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Promise #### Defined in -[src/nevermined/api/SearchApi.ts:165](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/SearchApi.ts#L165) +[src/nevermined/api/SearchApi.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/SearchApi.ts#L163) --- ### byText -▸ **byText**(`text`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +▸ **byText**(`text`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Search over the assets using a keyword. @@ -321,19 +462,19 @@ Search over the assets using a keyword. #### Returns -`Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +`Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> A list of [DDO](DDO.md)s. #### Defined in -[src/nevermined/api/SearchApi.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/SearchApi.ts#L80) +[src/nevermined/api/SearchApi.ts:78](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/SearchApi.ts#L78) --- ### datasetsByNftContract -▸ **datasetsByNftContract**(`nftContractAddress`, `nftType?`, `tokenId?`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +▸ **datasetsByNftContract**(`nftContractAddress`, `nftType?`, `tokenId?`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Search of all datasets belonging to a subscription NFT contract @@ -352,19 +493,19 @@ Search of all datasets belonging to a subscription NFT contract #### Returns -`Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +`Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Promise #### Defined in -[src/nevermined/api/SearchApi.ts:634](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/SearchApi.ts#L634) +[src/nevermined/api/SearchApi.ts:632](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/SearchApi.ts#L632) --- ### datasetsBySubscription -▸ **datasetsBySubscription**(`subscriptionDid`, `nftType?`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +▸ **datasetsBySubscription**(`subscriptionDid`, `nftType?`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Search of all datasets belonging to a subscription @@ -382,19 +523,19 @@ Search of all datasets belonging to a subscription #### Returns -`Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +`Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Promise #### Defined in -[src/nevermined/api/SearchApi.ts:744](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/SearchApi.ts#L744) +[src/nevermined/api/SearchApi.ts:753](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/SearchApi.ts#L753) --- ### query -▸ **query**(`query`): `Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +▸ **query**(`query`): `Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Search over the assets using a query. @@ -406,7 +547,7 @@ Search over the assets using a query. #### Returns -`Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +`Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> A list of [DDO](DDO.md)s matching the query @@ -417,13 +558,13 @@ returning only DDOs for that appId #### Defined in -[src/nevermined/api/SearchApi.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/SearchApi.ts#L57) +[src/nevermined/api/SearchApi.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/SearchApi.ts#L55) --- ### servicesByNftContract -▸ **servicesByNftContract**(`nftContractAddress`, `nftType?`, `tokenId?`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +▸ **servicesByNftContract**(`nftContractAddress`, `nftType?`, `tokenId?`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Search of all services belonging to a subscription nft contract @@ -442,19 +583,19 @@ Search of all services belonging to a subscription nft contract #### Returns -`Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +`Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Promise #### Defined in -[src/nevermined/api/SearchApi.ts:474](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/SearchApi.ts#L474) +[src/nevermined/api/SearchApi.ts:472](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/SearchApi.ts#L472) --- ### servicesBySubscription -▸ **servicesBySubscription**(`subscriptionDid`, `nftType?`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +▸ **servicesBySubscription**(`subscriptionDid`, `nftType?`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Search of all services belonging to a subscription @@ -472,19 +613,19 @@ Search of all services belonging to a subscription #### Returns -`Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +`Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Promise #### Defined in -[src/nevermined/api/SearchApi.ts:584](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/SearchApi.ts#L584) +[src/nevermined/api/SearchApi.ts:582](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/SearchApi.ts#L582) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -502,13 +643,13 @@ Promise #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### subscriptionsCreated -▸ **subscriptionsCreated**(`account`, `nftType?`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +▸ **subscriptionsCreated**(`account`, `nftType?`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Search of all subscriptions created by `account` @@ -516,7 +657,7 @@ Search of all subscriptions created by `account` | Name | Type | Default value | Description | | :--------------------- | :------------------------------------------------------------------------------------------------------------------------- | :------------ | :------------------------------------------ | -| `account` | [`Account`](Account.md) | `undefined` | The account that created the subscriptions. | +| `account` | [`NvmAccount`](NvmAccount.md) | `undefined` | The account that created the subscriptions. | | `nftType?` | [`NeverminedNFT721Type`](../enums/NeverminedNFT721Type.md) \| [`NeverminedNFT1155Type`](../enums/NeverminedNFT1155Type.md) | `undefined` | The nftType | | `customNestedQueries?` | `unknown`[] | `undefined` | Custom nested queries to add to the search | | `offset` | `number` | `100` | The number of results to return | @@ -526,19 +667,19 @@ Search of all subscriptions created by `account` #### Returns -`Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +`Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Promise #### Defined in -[src/nevermined/api/SearchApi.ts:264](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/SearchApi.ts#L264) +[src/nevermined/api/SearchApi.ts:262](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/SearchApi.ts#L262) --- ### subscriptionsPurchased -▸ **subscriptionsPurchased**(`account`, `nftType?`, `ercType?`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +▸ **subscriptionsPurchased**(`account`, `nftType?`, `ercType?`, `customNestedQueries?`, `offset?`, `page?`, `sort?`, `appId?`): `Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Search of all subscriptions purchased by `account` @@ -546,7 +687,7 @@ Search of all subscriptions purchased by `account` | Name | Type | Default value | Description | | :--------------------- | :------------------------------------------------------------------------------------------------------------------------- | :------------ | :-------------------------------------------- | -| `account` | [`Account`](Account.md) | `undefined` | The account that purchased the subscriptions. | +| `account` | [`NvmAccount`](NvmAccount.md) | `undefined` | The account that purchased the subscriptions. | | `nftType?` | [`NeverminedNFT721Type`](../enums/NeverminedNFT721Type.md) \| [`NeverminedNFT1155Type`](../enums/NeverminedNFT1155Type.md) | `undefined` | The nftType | | `ercType?` | `721` \| `1155` | `undefined` | - | | `customNestedQueries?` | `unknown`[] | `undefined` | Custom nested queries to add to the search | @@ -557,19 +698,19 @@ Search of all subscriptions purchased by `account` #### Returns -`Promise`<[`QueryResult`](../interfaces/QueryResult.md)\> +`Promise`\<[`QueryResult`](../interfaces/QueryResult.md)\> Promise #### Defined in -[src/nevermined/api/SearchApi.ts:356](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/SearchApi.ts#L356) +[src/nevermined/api/SearchApi.ts:354](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/SearchApi.ts#L354) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -587,13 +728,13 @@ Promise #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -618,4 +759,4 @@ Promise #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/ServiceAgreement.md b/docs/api-reference/classes/ServiceAgreement.md index 33ee9cd45..bf974eaa1 100644 --- a/docs/api-reference/classes/ServiceAgreement.md +++ b/docs/api-reference/classes/ServiceAgreement.md @@ -18,12 +18,14 @@ - [artifactsFolder](ServiceAgreement.md#artifactsfolder) - [circuitsFolder](ServiceAgreement.md#circuitsfolder) +- [client](ServiceAgreement.md#client) - [config](ServiceAgreement.md#config) - [instanceConfig](ServiceAgreement.md#instanceconfig) - [instantiableConfig](ServiceAgreement.md#instantiableconfig) - [logger](ServiceAgreement.md#logger) - [nevermined](ServiceAgreement.md#nevermined) -- [web3](ServiceAgreement.md#web3) +- [publicClient](ServiceAgreement.md#publicclient) +- [walletClient](ServiceAgreement.md#walletclient) ### Methods @@ -39,7 +41,7 @@ ### constructor -• **new ServiceAgreement**(`config`) +• **new ServiceAgreement**(`config`): [`ServiceAgreement`](ServiceAgreement.md) #### Parameters @@ -47,23 +49,27 @@ | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`ServiceAgreement`](ServiceAgreement.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/utils/ServiceAgreement.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/ServiceAgreement.ts#L8) +[src/nevermined/utils/ServiceAgreement.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/ServiceAgreement.ts#L9) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -71,17 +77,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -89,13 +95,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -107,13 +131,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -125,17 +149,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -143,13 +167,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -161,13 +185,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -179,56 +203,171 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### createHashSignature -▸ **createHashSignature**(`templateId`, `serviceAgreementId`, `valueHashes`, `timelockValues`, `timeoutValues`, `consumer`): `Promise`<`string`\> +▸ **createHashSignature**(`templateId`, `serviceAgreementId`, `valueHashes`, `timelockValues`, `timeoutValues`, `consumer`): `Promise`\<`string`\> #### Parameters -| Name | Type | -| :------------------- | :---------------------- | -| `templateId` | `string` | -| `serviceAgreementId` | `string` | -| `valueHashes` | `string`[] | -| `timelockValues` | `number`[] | -| `timeoutValues` | `number`[] | -| `consumer` | [`Account`](Account.md) | +| Name | Type | +| :------------------- | :---------------------------- | +| `templateId` | `string` | +| `serviceAgreementId` | `string` | +| `valueHashes` | `string`[] | +| `timelockValues` | `number`[] | +| `timeoutValues` | `number`[] | +| `consumer` | [`NvmAccount`](NvmAccount.md) | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/ServiceAgreement.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/ServiceAgreement.ts#L42) +[src/nevermined/utils/ServiceAgreement.ts:43](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/ServiceAgreement.ts#L43) --- ### getTimeValuesFromService -▸ `Private` **getTimeValuesFromService**(`service`, `type`): `number`[] +▸ **getTimeValuesFromService**(`service`, `type`): `number`[] #### Parameters @@ -243,7 +382,7 @@ Instantiable.web3 #### Defined in -[src/nevermined/utils/ServiceAgreement.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/ServiceAgreement.ts#L86) +[src/nevermined/utils/ServiceAgreement.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/ServiceAgreement.ts#L91) --- @@ -267,13 +406,13 @@ Instantiable.web3 #### Defined in -[src/nevermined/utils/ServiceAgreement.ts:66](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/ServiceAgreement.ts#L66) +[src/nevermined/utils/ServiceAgreement.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/ServiceAgreement.ts#L67) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -291,13 +430,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### signServiceAgreement -▸ **signServiceAgreement**(`ddo`, `serviceType`, `serviceAgreementId`, `agreementConditionsIds`, `consumer`): `Promise`<`string`\> +▸ **signServiceAgreement**(`ddo`, `serviceType`, `serviceAgreementId`, `agreementConditionsIds`, `consumer`): `Promise`\<`string`\> #### Parameters @@ -307,21 +446,21 @@ Instantiable.web3 | `serviceType` | [`ServiceType`](../code-reference.md#servicetype) | | `serviceAgreementId` | `string` | | `agreementConditionsIds` | `string`[] | -| `consumer` | [`Account`](Account.md) | +| `consumer` | [`NvmAccount`](NvmAccount.md) | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/ServiceAgreement.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/ServiceAgreement.ts#L13) +[src/nevermined/utils/ServiceAgreement.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/ServiceAgreement.ts#L14) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -339,13 +478,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -370,4 +509,4 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/ServicesApi.md b/docs/api-reference/classes/ServicesApi.md index 84ad5b9da..6f4d2cd43 100644 --- a/docs/api-reference/classes/ServicesApi.md +++ b/docs/api-reference/classes/ServicesApi.md @@ -18,7 +18,6 @@ Utils internal submodule of Nevermined. ### Properties -- [aave](ServicesApi.md#aave) - [bookmarks](ServicesApi.md#bookmarks) - [marketplace](ServicesApi.md#marketplace) - [metadata](ServicesApi.md#metadata) @@ -30,16 +29,17 @@ Utils internal submodule of Nevermined. - [artifactsFolder](ServicesApi.md#artifactsfolder) - [circuitsFolder](ServicesApi.md#circuitsfolder) +- [client](ServicesApi.md#client) - [config](ServicesApi.md#config) - [instanceConfig](ServicesApi.md#instanceconfig) - [instantiableConfig](ServicesApi.md#instantiableconfig) - [logger](ServicesApi.md#logger) - [nevermined](ServicesApi.md#nevermined) -- [web3](ServicesApi.md#web3) +- [publicClient](ServicesApi.md#publicclient) +- [walletClient](ServicesApi.md#walletclient) ### Methods -- [initializeAave](ServicesApi.md#initializeaave) - [setInstanceConfig](ServicesApi.md#setinstanceconfig) - [getInstance](ServicesApi.md#getinstance) - [setInstanceConfig](ServicesApi.md#setinstanceconfig-1) @@ -48,7 +48,7 @@ Utils internal submodule of Nevermined. ### constructor -• **new ServicesApi**(`config`) +• **new ServicesApi**(`config`): [`ServicesApi`](ServicesApi.md) Creates a new ServicesApi @@ -58,27 +58,21 @@ Creates a new ServicesApi | :------- | :---------------------------------------------------------- | :--------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | Configuration of the Nevermined instance | -#### Overrides - -[Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) - -#### Defined in - -[src/nevermined/api/ServicesApi.ts:56](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ServicesApi.ts#L56) +#### Returns -## Properties +[`ServicesApi`](ServicesApi.md) -### aave +[ServicesApi](ServicesApi.md) -• **aave**: [`AaveCredit`](AaveCredit.md) +#### Overrides -Aave instance. +[Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/api/ServicesApi.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ServicesApi.ts#L49) +[src/nevermined/api/ServicesApi.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ServicesApi.ts#L48) ---- +## Properties ### bookmarks @@ -88,7 +82,7 @@ Bookmarks instance #### Defined in -[src/nevermined/api/ServicesApi.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ServicesApi.ts#L44) +[src/nevermined/api/ServicesApi.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ServicesApi.ts#L41) --- @@ -100,7 +94,7 @@ Nevermined Node Service #### Defined in -[src/nevermined/api/ServicesApi.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ServicesApi.ts#L24) +[src/nevermined/api/ServicesApi.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ServicesApi.ts#L21) --- @@ -112,7 +106,7 @@ Marketplace instance. #### Defined in -[src/nevermined/api/ServicesApi.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ServicesApi.ts#L29) +[src/nevermined/api/ServicesApi.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ServicesApi.ts#L26) --- @@ -124,7 +118,7 @@ Nevermined Node Service #### Defined in -[src/nevermined/api/ServicesApi.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ServicesApi.ts#L19) +[src/nevermined/api/ServicesApi.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ServicesApi.ts#L16) --- @@ -136,7 +130,7 @@ Permissions service #### Defined in -[src/nevermined/api/ServicesApi.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ServicesApi.ts#L34) +[src/nevermined/api/ServicesApi.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ServicesApi.ts#L31) --- @@ -148,17 +142,17 @@ Profiles instance #### Defined in -[src/nevermined/api/ServicesApi.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ServicesApi.ts#L39) +[src/nevermined/api/ServicesApi.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/ServicesApi.ts#L36) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -166,17 +160,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -184,13 +178,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -202,13 +214,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -220,17 +232,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -238,13 +250,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -256,13 +268,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -274,45 +286,146 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -Instantiable.web3 +Instantiable.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) -## Methods +--- -### initializeAave +### walletClient -▸ **initializeAave**(): `Promise`<`void`\> +• `get` **walletClient**(): `Object` #### Returns -`Promise`<`void`\> +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +Instantiable.walletClient #### Defined in -[src/nevermined/api/ServicesApi.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/ServicesApi.ts#L68) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ---- +## Methods ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -330,13 +443,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -354,13 +467,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -385,4 +498,4 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/SignatureUtils.md b/docs/api-reference/classes/SignatureUtils.md index 6cf618b09..afd10d296 100644 --- a/docs/api-reference/classes/SignatureUtils.md +++ b/docs/api-reference/classes/SignatureUtils.md @@ -18,27 +18,32 @@ - [artifactsFolder](SignatureUtils.md#artifactsfolder) - [circuitsFolder](SignatureUtils.md#circuitsfolder) +- [client](SignatureUtils.md#client) - [config](SignatureUtils.md#config) - [instanceConfig](SignatureUtils.md#instanceconfig) - [instantiableConfig](SignatureUtils.md#instantiableconfig) - [logger](SignatureUtils.md#logger) - [nevermined](SignatureUtils.md#nevermined) -- [web3](SignatureUtils.md#web3) +- [publicClient](SignatureUtils.md#publicclient) +- [walletClient](SignatureUtils.md#walletclient) ### Methods - [setInstanceConfig](SignatureUtils.md#setinstanceconfig) - [signText](SignatureUtils.md#signtext) -- [verifyText](SignatureUtils.md#verifytext) +- [signTransaction](SignatureUtils.md#signtransaction) +- [signTypedData](SignatureUtils.md#signtypeddata) +- [verifyIsSigner](SignatureUtils.md#verifyissigner) - [getInstance](SignatureUtils.md#getinstance) - [hash](SignatureUtils.md#hash) +- [recoverSignerAddress](SignatureUtils.md#recoversigneraddress) - [setInstanceConfig](SignatureUtils.md#setinstanceconfig-1) ## Constructors ### constructor -• **new SignatureUtils**(`config`) +• **new SignatureUtils**(`config`): [`SignatureUtils`](SignatureUtils.md) #### Parameters @@ -46,23 +51,27 @@ | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`SignatureUtils`](SignatureUtils.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/utils/SignatureUtils.ts:5](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/SignatureUtils.ts#L5) +[src/nevermined/utils/SignatureUtils.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/SignatureUtils.ts#L9) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -70,17 +79,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -88,13 +97,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -106,13 +133,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -124,17 +151,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -142,13 +169,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -160,13 +187,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -178,31 +205,146 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -Instantiable.web3 +Instantiable.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +Instantiable.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -220,55 +362,100 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### signText -▸ **signText**(`text`, `address`): `Promise`<`string`\> +▸ **signText**(`text`, `account`): `Promise`\<\`0x$\{string}\`\> #### Parameters -| Name | Type | -| :-------- | :----------------------- | -| `text` | `string` \| `Uint8Array` | -| `address` | `string` | +| Name | Type | +| :-------- | :---------------------------------------- | +| `text` | `string` \| `Uint8Array` | +| `account` | `string` \| [`NvmAccount`](NvmAccount.md) | #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Defined in -[src/nevermined/utils/SignatureUtils.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/SignatureUtils.ts#L10) +[src/nevermined/utils/SignatureUtils.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/SignatureUtils.ts#L14) --- -### verifyText +### signTransaction -▸ **verifyText**(`text`, `signature`): `Promise`<`string`\> +▸ **signTransaction**(`tx`, `account`): `Promise`\<`string`\> #### Parameters -| Name | Type | -| :---------- | :------- | -| `text` | `string` | -| `signature` | `string` | +| Name | Type | +| :-------- | :---------------------------------------- | +| `tx` | \`0x$\{string}\` | +| `account` | `string` \| [`NvmAccount`](NvmAccount.md) | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/SignatureUtils.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/SignatureUtils.ts#L22) +[src/nevermined/utils/SignatureUtils.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/SignatureUtils.ts#L73) + +--- + +### signTypedData + +▸ **signTypedData**(`domain`, `types`, `value`, `account`): `Promise`\<\`0x$\{string}\`\> + +#### Parameters + +| Name | Type | +| :-------- | :---------------------------------------------------- | +| `domain` | [`TypedDataDomain`](../interfaces/TypedDataDomain.md) | +| `types` | [`TypedDataTypes`](../interfaces/TypedDataTypes.md) | +| `value` | `Record`\<`string`, `any`\> | +| `account` | `string` \| [`NvmAccount`](NvmAccount.md) | + +#### Returns + +`Promise`\<\`0x$\{string}\`\> + +#### Defined in + +[src/nevermined/utils/SignatureUtils.ts:37](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/SignatureUtils.ts#L37) + +--- + +### verifyIsSigner + +▸ **verifyIsSigner**(`text`, `signature`, `signerAddress`): `Promise`\<`boolean`\> + +#### Parameters + +| Name | Type | +| :-------------- | :------- | +| `text` | `string` | +| `signature` | `string` | +| `signerAddress` | `string` | + +#### Returns + +`Promise`\<`boolean`\> + +#### Defined in + +[src/nevermined/utils/SignatureUtils.ts:94](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/SignatureUtils.ts#L94) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -286,13 +473,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### hash -▸ `Static` **hash**(`seed`): `string` +▸ **hash**(`seed`): `string` #### Parameters @@ -306,13 +493,34 @@ Instantiable.web3 #### Defined in -[src/nevermined/utils/SignatureUtils.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/SignatureUtils.ts#L26) +[src/nevermined/utils/SignatureUtils.ts:113](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/SignatureUtils.ts#L113) + +--- + +### recoverSignerAddress + +▸ **recoverSignerAddress**(`message`, `signature`): `Promise`\<`string`\> + +#### Parameters + +| Name | Type | +| :---------- | :------- | +| `message` | `string` | +| `signature` | `string` | + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[src/nevermined/utils/SignatureUtils.ts:106](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/SignatureUtils.ts#L106) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -337,4 +545,4 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/StandardRoyalties.md b/docs/api-reference/classes/StandardRoyalties.md index d9bed58fe..d83c858ec 100644 --- a/docs/api-reference/classes/StandardRoyalties.md +++ b/docs/api-reference/classes/StandardRoyalties.md @@ -26,25 +26,27 @@ - [artifactsFolder](StandardRoyalties.md#artifactsfolder) - [circuitsFolder](StandardRoyalties.md#circuitsfolder) +- [client](StandardRoyalties.md#client) - [config](StandardRoyalties.md#config) - [instanceConfig](StandardRoyalties.md#instanceconfig) - [instantiableConfig](StandardRoyalties.md#instantiableconfig) - [logger](StandardRoyalties.md#logger) - [nevermined](StandardRoyalties.md#nevermined) -- [web3](StandardRoyalties.md#web3) +- [publicClient](StandardRoyalties.md#publicclient) +- [walletClient](StandardRoyalties.md#walletclient) ### Methods - [call](StandardRoyalties.md#call) - [getFromAddress](StandardRoyalties.md#getfromaddress) -- [getInputsOfMethod](StandardRoyalties.md#getinputsofmethod) - [getRoyalty](StandardRoyalties.md#getroyalty) -- [getSignatureOfMethod](StandardRoyalties.md#getsignatureofmethod) +- [getTransactionLogs](StandardRoyalties.md#gettransactionlogs) - [init](StandardRoyalties.md#init) - [send](StandardRoyalties.md#send) - [sendFrom](StandardRoyalties.md#sendfrom) - [setInstanceConfig](StandardRoyalties.md#setinstanceconfig) - [setRoyalty](StandardRoyalties.md#setroyalty) +- [someLog](StandardRoyalties.md#somelog) - [getInstance](StandardRoyalties.md#getinstance) - [setInstanceConfig](StandardRoyalties.md#setinstanceconfig-1) @@ -52,7 +54,7 @@ ### constructor -• **new StandardRoyalties**(`contractName`) +• **new StandardRoyalties**(`contractName`): [`StandardRoyalties`](StandardRoyalties.md) #### Parameters @@ -60,19 +62,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`StandardRoyalties`](StandardRoyalties.md) + #### Inherited from [RoyaltyScheme](RoyaltyScheme.md).[constructor](RoyaltyScheme.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -80,13 +86,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -94,7 +100,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -108,13 +114,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -122,7 +128,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -136,17 +142,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -154,17 +160,17 @@ RoyaltyScheme.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -172,13 +178,31 @@ RoyaltyScheme.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +RoyaltyScheme.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -190,13 +214,13 @@ RoyaltyScheme.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -208,17 +232,17 @@ RoyaltyScheme.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -226,13 +250,13 @@ RoyaltyScheme.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -244,13 +268,13 @@ RoyaltyScheme.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -262,31 +286,146 @@ RoyaltyScheme.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -RoyaltyScheme.web3 +RoyaltyScheme.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +RoyaltyScheme.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -296,15 +435,15 @@ RoyaltyScheme.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -312,13 +451,13 @@ RoyaltyScheme.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -328,7 +467,7 @@ RoyaltyScheme.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -336,37 +475,13 @@ RoyaltyScheme.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[RoyaltyScheme](RoyaltyScheme.md).[getInputsOfMethod](RoyaltyScheme.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getRoyalty -▸ **getRoyalty**(`did`): `Promise`<`number`\> +▸ **getRoyalty**(`did`): `Promise`\<`number`\> #### Parameters @@ -376,7 +491,7 @@ readonly `ParamType`[] #### Returns -`Promise`<`number`\> +`Promise`\<`number`\> #### Inherited from @@ -384,49 +499,50 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L26) +[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L28) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[RoyaltyScheme](RoyaltyScheme.md).[getSignatureOfMethod](RoyaltyScheme.md#getsignatureofmethod) +[RoyaltyScheme](RoyaltyScheme.md).[getTransactionLogs](RoyaltyScheme.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -434,26 +550,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -461,26 +577,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -488,13 +604,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -512,13 +628,13 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### setRoyalty -▸ **setRoyalty**(`did`, `amount`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **setRoyalty**(`did`, `amount`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -526,12 +642,12 @@ readonly `ParamType`[] | :---------- | :---------------------------------------------- | | `did` | `string` | | `amount` | `number` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -539,13 +655,37 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L22) +[src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/royalties/RoyaltyScheme.abstract.ts#L24) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[RoyaltyScheme](RoyaltyScheme.md).[someLog](RoyaltyScheme.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`StandardRoyalties`](StandardRoyalties.md)\> +▸ **getInstance**(`config`): `Promise`\<[`StandardRoyalties`](StandardRoyalties.md)\> #### Parameters @@ -555,7 +695,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`StandardRoyalties`](StandardRoyalties.md)\> +`Promise`\<[`StandardRoyalties`](StandardRoyalties.md)\> #### Overrides @@ -563,13 +703,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/royalties/StandardRoyalties.ts:5](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/royalties/StandardRoyalties.ts#L5) +[src/keeper/contracts/royalties/StandardRoyalties.ts:5](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/royalties/StandardRoyalties.ts#L5) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -594,4 +734,4 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/SubgraphEvent.md b/docs/api-reference/classes/SubgraphEvent.md index 6a01098b5..da75f5029 100644 --- a/docs/api-reference/classes/SubgraphEvent.md +++ b/docs/api-reference/classes/SubgraphEvent.md @@ -2,6 +2,8 @@ # Class: SubgraphEvent +Class to handle Smart Contract events connected to the contract subgraphs + ## Hierarchy - [`NeverminedEvent`](NeverminedEvent.md) @@ -24,12 +26,14 @@ - [artifactsFolder](SubgraphEvent.md#artifactsfolder) - [circuitsFolder](SubgraphEvent.md#circuitsfolder) +- [client](SubgraphEvent.md#client) - [config](SubgraphEvent.md#config) - [instanceConfig](SubgraphEvent.md#instanceconfig) - [instantiableConfig](SubgraphEvent.md#instantiableconfig) - [logger](SubgraphEvent.md#logger) - [nevermined](SubgraphEvent.md#nevermined) -- [web3](SubgraphEvent.md#web3) +- [publicClient](SubgraphEvent.md#publicclient) +- [walletClient](SubgraphEvent.md#walletclient) ### Methods @@ -46,14 +50,22 @@ ### constructor -• `Protected` **new SubgraphEvent**(`contract`, `eventEmitter`) +• **new SubgraphEvent**(`contract`, `eventEmitter`): [`SubgraphEvent`](SubgraphEvent.md) + +Initializes the NeverminedEvent instance #### Parameters -| Name | Type | -| :------------- | :---------------------------------------------- | -| `contract` | [`ContractBase`](ContractBase.md) | -| `eventEmitter` | [`EventEmitter`](../interfaces/EventEmitter.md) | +| Name | Type | Description | +| :------------- | :---------------------------------------------- | :---------------------------- | +| `contract` | [`ContractBase`](ContractBase.md) | contract instance | +| `eventEmitter` | [`EventEmitter`](../interfaces/EventEmitter.md) | events emitter implementation | + +#### Returns + +[`SubgraphEvent`](SubgraphEvent.md) + +the NeverminedEvent instance #### Inherited from @@ -61,13 +73,13 @@ #### Defined in -[src/events/NeverminedEvent.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L34) +[src/events/NeverminedEvent.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L26) ## Properties ### contract -• `Protected` **contract**: [`ContractBase`](ContractBase.md) = `null` +• `Protected` **contract**: [`ContractBase`](ContractBase.md) #### Inherited from @@ -75,7 +87,7 @@ #### Defined in -[src/events/NeverminedEvent.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L29) +[src/events/NeverminedEvent.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L15) --- @@ -89,27 +101,27 @@ #### Defined in -[src/events/NeverminedEvent.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L28) +[src/events/NeverminedEvent.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L14) --- ### subgraph -• **subgraph**: `ApolloClient`<`NormalizedCacheObject`\> +• **subgraph**: `ApolloClient`\<`NormalizedCacheObject`\> #### Defined in -[src/events/SubgraphEvent.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/SubgraphEvent.ts#L16) +[src/events/SubgraphEvent.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/SubgraphEvent.ts#L20) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -117,17 +129,17 @@ NeverminedEvent.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -135,13 +147,31 @@ NeverminedEvent.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +NeverminedEvent.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -153,13 +183,13 @@ NeverminedEvent.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -171,17 +201,17 @@ NeverminedEvent.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -189,13 +219,13 @@ NeverminedEvent.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -207,13 +237,13 @@ NeverminedEvent.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -225,35 +255,154 @@ NeverminedEvent.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +NeverminedEvent.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -NeverminedEvent.web3 +NeverminedEvent.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### getBlockNumber -▸ **getBlockNumber**(): `Promise`<`number`\> +▸ **getBlockNumber**(): `Promise`\<`bigint`\> + +It returns the block number of the latest block minted in the blockchain #### Returns -`Promise`<`number`\> +`Promise`\<`bigint`\> + +the block number #### Overrides @@ -261,7 +410,7 @@ NeverminedEvent.web3 #### Defined in -[src/events/SubgraphEvent.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/SubgraphEvent.ts#L68) +[src/events/SubgraphEvent.ts:93](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/SubgraphEvent.ts#L93) --- @@ -269,23 +418,27 @@ NeverminedEvent.web3 ▸ **getEventData**(`options`): [`EventResult`](../code-reference.md#eventresult) +It returns the events matching a given filter + #### Parameters -| Name | Type | -| :-------- | :---------------------------------------------- | -| `options` | [`EventOptions`](../interfaces/EventOptions.md) | +| Name | Type | Description | +| :-------- | :---------------------------------------------- | :------------------- | +| `options` | [`EventOptions`](../interfaces/EventOptions.md) | event filter options | #### Returns [`EventResult`](../code-reference.md#eventresult) +[EventResult](../code-reference.md#eventresult) + #### Overrides [NeverminedEvent](NeverminedEvent.md).[getEventData](NeverminedEvent.md#geteventdata) #### Defined in -[src/events/SubgraphEvent.ts:46](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/SubgraphEvent.ts#L46) +[src/events/SubgraphEvent.ts:63](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/SubgraphEvent.ts#L63) --- @@ -293,40 +446,49 @@ NeverminedEvent.web3 ▸ **getPastEvents**(`options`): [`EventResult`](../code-reference.md#eventresult) +It returns the events matching a given filter + #### Parameters -| Name | Type | -| :-------- | :---------------------------------------------- | -| `options` | [`EventOptions`](../interfaces/EventOptions.md) | +| Name | Type | Description | +| :-------- | :---------------------------------------------- | :------------------- | +| `options` | [`EventOptions`](../interfaces/EventOptions.md) | event filter options | #### Returns [`EventResult`](../code-reference.md#eventresult) +[EventResult](../code-reference.md#eventresult) + #### Overrides [NeverminedEvent](NeverminedEvent.md).[getPastEvents](NeverminedEvent.md#getpastevents) #### Defined in -[src/events/SubgraphEvent.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/SubgraphEvent.ts#L64) +[src/events/SubgraphEvent.ts:85](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/SubgraphEvent.ts#L85) --- ### once -▸ **once**(`callback?`, `options?`): `Promise`<[`EventResult`](../code-reference.md#eventresult)\> +▸ **once**(`callback`, `options`, `timeout?`): `Promise`\<[`EventResult`](../code-reference.md#eventresult)\> + +Subscribes to a contract event and waits for the first event to happen #### Parameters -| Name | Type | -| :---------- | :------------------------------------------------------------------------ | -| `callback?` | (`events`: [`EventResult`](../code-reference.md#eventresult)[]) => `void` | -| `options?` | [`EventOptions`](../interfaces/EventOptions.md) | +| Name | Type | Default value | Description | +| :--------- | :------------------------------------------------------------------------ | :------------ | :------------------------------------------- | +| `callback` | (`events`: [`EventResult`](../code-reference.md#eventresult)[]) => `void` | `undefined` | function called when the event is triggered | +| `options` | [`EventOptions`](../interfaces/EventOptions.md) | `undefined` | event filter options | +| `timeout` | `number` | `15_000` | maximum time to wait for the event to happen | #### Returns -`Promise`<[`EventResult`](../code-reference.md#eventresult)\> +`Promise`\<[`EventResult`](../code-reference.md#eventresult)\> + +Promise with the event data #### Inherited from @@ -334,13 +496,13 @@ NeverminedEvent.web3 #### Defined in -[src/events/NeverminedEvent.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L54) +[src/events/NeverminedEvent.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L60) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -358,7 +520,7 @@ NeverminedEvent.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- @@ -366,57 +528,65 @@ NeverminedEvent.web3 ▸ **subscribe**(`callback`, `options`): [`ContractEventSubscription`](../interfaces/ContractEventSubscription.md) +Subscribes to a contract event + #### Parameters -| Name | Type | -| :--------- | :------------------------------------------------------------------------ | -| `callback` | (`events`: [`EventResult`](../code-reference.md#eventresult)[]) => `void` | -| `options` | [`EventOptions`](../interfaces/EventOptions.md) | +| Name | Type | Description | +| :--------- | :------------------------------------------------------------------------ | :------------------------------------------ | +| `callback` | (`events`: [`EventResult`](../code-reference.md#eventresult)[]) => `void` | function called when the event is triggered | +| `options` | [`EventOptions`](../interfaces/EventOptions.md) | event filter options | #### Returns [`ContractEventSubscription`](../interfaces/ContractEventSubscription.md) +[ContractEventSubscription](../interfaces/ContractEventSubscription.md) + #### Inherited from [NeverminedEvent](NeverminedEvent.md).[subscribe](NeverminedEvent.md#subscribe) #### Defined in -[src/events/NeverminedEvent.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L40) +[src/events/NeverminedEvent.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/NeverminedEvent.ts#L38) --- ### getInstance -▸ `Static` **getInstance**(`contract`, `eventEmitter`, `graphHttpUri`, `networkName`): [`SubgraphEvent`](SubgraphEvent.md) +▸ **getInstance**(`contract`, `eventEmitter`, `graphHttpUri`, `networkName`): [`SubgraphEvent`](SubgraphEvent.md) + +It gets a new instance of SubgraphEvent #### Parameters -| Name | Type | -| :------------- | :---------------------------------------------- | -| `contract` | [`ContractBase`](ContractBase.md) | -| `eventEmitter` | [`EventEmitter`](../interfaces/EventEmitter.md) | -| `graphHttpUri` | `string` | -| `networkName` | `string` | +| Name | Type | Description | +| :------------- | :---------------------------------------------- | :--------------------------------- | +| `contract` | [`ContractBase`](ContractBase.md) | contract instance | +| `eventEmitter` | [`EventEmitter`](../interfaces/EventEmitter.md) | events emitter implementation | +| `graphHttpUri` | `string` | url of the subgraph | +| `networkName` | `string` | the name of the blockchain network | #### Returns [`SubgraphEvent`](SubgraphEvent.md) +the SubgraphEvent instance + #### Overrides [NeverminedEvent](NeverminedEvent.md).[getInstance](NeverminedEvent.md#getinstance) #### Defined in -[src/events/SubgraphEvent.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/SubgraphEvent.ts#L18) +[src/events/SubgraphEvent.ts:30](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/events/SubgraphEvent.ts#L30) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -441,4 +611,4 @@ NeverminedEvent.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/SubscribableObserver.md b/docs/api-reference/classes/SubscribableObserver.md index 8e067fd3d..e0d8b862d 100644 --- a/docs/api-reference/classes/SubscribableObserver.md +++ b/docs/api-reference/classes/SubscribableObserver.md @@ -1,6 +1,6 @@ [@nevermined-io/sdk](../code-reference.md) / SubscribableObserver -# Class: SubscribableObserver +# Class: SubscribableObserver\ ## Type parameters @@ -33,7 +33,7 @@ ### constructor -• **new SubscribableObserver**<`T`, `P`\>() +• **new SubscribableObserver**\<`T`, `P`\>(): [`SubscribableObserver`](SubscribableObserver.md)\<`T`, `P`\> #### Type parameters @@ -42,6 +42,10 @@ | `T` | | `P` | +#### Returns + +[`SubscribableObserver`](SubscribableObserver.md)\<`T`, `P`\> + ## Properties ### completed @@ -50,17 +54,17 @@ #### Defined in -[src/utils/SubscribableObserver.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribableObserver.ts#L2) +[src/utils/SubscribableObserver.ts:2](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribableObserver.ts#L2) --- ### subscriptions -• `Private` **subscriptions**: `Set`<{ `onComplete?`: (`complete`: `P`) => `void` ; `onError?`: (`error`: `any`) => `void` ; `onNext?`: (`next`: `T`) => `void` }\> +• `Private` **subscriptions**: `Set`\<\{ `onComplete?`: (`complete`: `P`) => `void` ; `onError?`: (`error`: `any`) => `void` ; `onNext?`: (`next`: `T`) => `void` }\> #### Defined in -[src/utils/SubscribableObserver.ts:4](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribableObserver.ts#L4) +[src/utils/SubscribableObserver.ts:4](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribableObserver.ts#L4) ## Methods @@ -80,19 +84,19 @@ #### Defined in -[src/utils/SubscribableObserver.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribableObserver.ts#L30) +[src/utils/SubscribableObserver.ts:30](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribableObserver.ts#L30) --- ### emit -▸ `Private` **emit**(`type`, `value`): `void` +▸ **emit**(`type`, `value`): `void` #### Parameters | Name | Type | | :------ | :------------------------------------------ | -| `type` | `"onError"` \| `"onNext"` \| `"onComplete"` | +| `type` | `"onNext"` \| `"onComplete"` \| `"onError"` | | `value` | `any` | #### Returns @@ -101,7 +105,7 @@ #### Defined in -[src/utils/SubscribableObserver.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribableObserver.ts#L40) +[src/utils/SubscribableObserver.ts:40](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribableObserver.ts#L40) --- @@ -121,7 +125,7 @@ #### Defined in -[src/utils/SubscribableObserver.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribableObserver.ts#L35) +[src/utils/SubscribableObserver.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribableObserver.ts#L35) --- @@ -141,7 +145,7 @@ #### Defined in -[src/utils/SubscribableObserver.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribableObserver.ts#L26) +[src/utils/SubscribableObserver.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribableObserver.ts#L26) --- @@ -167,13 +171,13 @@ #### Defined in -[src/utils/SubscribableObserver.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribableObserver.ts#L10) +[src/utils/SubscribableObserver.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribableObserver.ts#L10) --- ### unsubscribe -▸ `Private` **unsubscribe**(): `void` +▸ **unsubscribe**(): `void` #### Returns @@ -181,4 +185,4 @@ #### Defined in -[src/utils/SubscribableObserver.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribableObserver.ts#L47) +[src/utils/SubscribableObserver.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribableObserver.ts#L47) diff --git a/docs/api-reference/classes/SubscribablePromise.md b/docs/api-reference/classes/SubscribablePromise.md index 13eda781b..5e621d278 100644 --- a/docs/api-reference/classes/SubscribablePromise.md +++ b/docs/api-reference/classes/SubscribablePromise.md @@ -1,6 +1,6 @@ [@nevermined-io/sdk](../code-reference.md) / SubscribablePromise -# Class: SubscribablePromise +# Class: SubscribablePromise\ ## Type parameters @@ -33,7 +33,7 @@ ### constructor -• **new SubscribablePromise**<`T`, `P`\>(`executor`) +• **new SubscribablePromise**\<`T`, `P`\>(`executor`): [`SubscribablePromise`](SubscribablePromise.md)\<`T`, `P`\> #### Type parameters @@ -44,39 +44,43 @@ #### Parameters -| Name | Type | -| :--------- | :------------------------------------------------------------------------------------------------------ | -| `executor` | (`observer`: [`SubscribableObserver`](SubscribableObserver.md)<`T`, `P`\>) => `void` \| `Promise`<`P`\> | +| Name | Type | +| :--------- | :-------------------------------------------------------------------------------------------------------- | +| `executor` | (`observer`: [`SubscribableObserver`](SubscribableObserver.md)\<`T`, `P`\>) => `void` \| `Promise`\<`P`\> | + +#### Returns + +[`SubscribablePromise`](SubscribablePromise.md)\<`T`, `P`\> #### Defined in -[src/utils/SubscribablePromise.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribablePromise.ts#L15) +[src/utils/SubscribablePromise.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribablePromise.ts#L15) ## Properties ### observer -• `Private` **observer**: [`SubscribableObserver`](SubscribableObserver.md)<`T`, `P`\> +• `Private` **observer**: [`SubscribableObserver`](SubscribableObserver.md)\<`T`, `P`\> #### Defined in -[src/utils/SubscribablePromise.ts:4](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribablePromise.ts#L4) +[src/utils/SubscribablePromise.ts:4](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribablePromise.ts#L4) --- ### promise -• `Private` **promise**: `Promise`<`P`\> & [`SubscribablePromise`](SubscribablePromise.md)<`T`, `P`\> +• `Private` **promise**: `Promise`\<`P`\> & [`SubscribablePromise`](SubscribablePromise.md)\<`T`, `P`\> #### Defined in -[src/utils/SubscribablePromise.ts:6](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribablePromise.ts#L6) +[src/utils/SubscribablePromise.ts:6](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribablePromise.ts#L6) ## Methods ### catch -▸ **catch**(`onrejected?`): `Promise`<`any`\> & [`SubscribablePromise`](SubscribablePromise.md)<`T`, `P`\> +▸ **catch**(`onrejected?`): `Promise`\<`any`\> & [`SubscribablePromise`](SubscribablePromise.md)\<`T`, `P`\> #### Parameters @@ -86,17 +90,17 @@ #### Returns -`Promise`<`any`\> & [`SubscribablePromise`](SubscribablePromise.md)<`T`, `P`\> +`Promise`\<`any`\> & [`SubscribablePromise`](SubscribablePromise.md)\<`T`, `P`\> #### Defined in -[src/utils/SubscribablePromise.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribablePromise.ts#L33) +[src/utils/SubscribablePromise.ts:33](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribablePromise.ts#L33) --- ### finally -▸ **finally**(`onfinally?`): `Promise`<`P`\> & [`SubscribablePromise`](SubscribablePromise.md)<`T`, `P`\> +▸ **finally**(`onfinally?`): `Promise`\<`P`\> & [`SubscribablePromise`](SubscribablePromise.md)\<`T`, `P`\> #### Parameters @@ -106,23 +110,23 @@ #### Returns -`Promise`<`P`\> & [`SubscribablePromise`](SubscribablePromise.md)<`T`, `P`\> +`Promise`\<`P`\> & [`SubscribablePromise`](SubscribablePromise.md)\<`T`, `P`\> #### Defined in -[src/utils/SubscribablePromise.ts:37](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribablePromise.ts#L37) +[src/utils/SubscribablePromise.ts:37](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribablePromise.ts#L37) --- ### init -▸ `Private` **init**(`executor`): `void` +▸ **init**(`executor`): `void` #### Parameters -| Name | Type | -| :--------- | :------------------------------------------------------------------------------------------------------ | -| `executor` | (`observer`: [`SubscribableObserver`](SubscribableObserver.md)<`T`, `P`\>) => `void` \| `Promise`<`P`\> | +| Name | Type | +| :--------- | :-------------------------------------------------------------------------------------------------------- | +| `executor` | (`observer`: [`SubscribableObserver`](SubscribableObserver.md)\<`T`, `P`\>) => `void` \| `Promise`\<`P`\> | #### Returns @@ -130,13 +134,13 @@ #### Defined in -[src/utils/SubscribablePromise.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribablePromise.ts#L41) +[src/utils/SubscribablePromise.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribablePromise.ts#L41) --- ### next -▸ **next**(`onNext`): [`SubscribablePromise`](SubscribablePromise.md)<`T`, `P`\> +▸ **next**(`onNext`): [`SubscribablePromise`](SubscribablePromise.md)\<`T`, `P`\> #### Parameters @@ -146,11 +150,11 @@ #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<`T`, `P`\> +[`SubscribablePromise`](SubscribablePromise.md)\<`T`, `P`\> #### Defined in -[src/utils/SubscribablePromise.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribablePromise.ts#L24) +[src/utils/SubscribablePromise.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribablePromise.ts#L24) --- @@ -174,13 +178,13 @@ #### Defined in -[src/utils/SubscribablePromise.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribablePromise.ts#L20) +[src/utils/SubscribablePromise.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribablePromise.ts#L20) --- ### then -▸ **then**(`onfulfilled?`, `onrejected?`): `Promise`<`any`\> & [`SubscribablePromise`](SubscribablePromise.md)<`T`, `P`\> +▸ **then**(`onfulfilled?`, `onrejected?`): `Promise`\<`any`\> & [`SubscribablePromise`](SubscribablePromise.md)\<`T`, `P`\> #### Parameters @@ -191,8 +195,8 @@ #### Returns -`Promise`<`any`\> & [`SubscribablePromise`](SubscribablePromise.md)<`T`, `P`\> +`Promise`\<`any`\> & [`SubscribablePromise`](SubscribablePromise.md)\<`T`, `P`\> #### Defined in -[src/utils/SubscribablePromise.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/SubscribablePromise.ts#L29) +[src/utils/SubscribablePromise.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/SubscribablePromise.ts#L29) diff --git a/docs/api-reference/classes/SubscriptionCreditsNFTApi.md b/docs/api-reference/classes/SubscriptionCreditsNFTApi.md index c7acd2ede..3359c0293 100644 --- a/docs/api-reference/classes/SubscriptionCreditsNFTApi.md +++ b/docs/api-reference/classes/SubscriptionCreditsNFTApi.md @@ -26,13 +26,15 @@ Allows the interaction with external ERC-1155 NFT contracts built on top of the - [address](SubscriptionCreditsNFTApi.md#address) - [artifactsFolder](SubscriptionCreditsNFTApi.md#artifactsfolder) - [circuitsFolder](SubscriptionCreditsNFTApi.md#circuitsfolder) +- [client](SubscriptionCreditsNFTApi.md#client) - [config](SubscriptionCreditsNFTApi.md#config) - [getContract](SubscriptionCreditsNFTApi.md#getcontract) - [instanceConfig](SubscriptionCreditsNFTApi.md#instanceconfig) - [instantiableConfig](SubscriptionCreditsNFTApi.md#instantiableconfig) - [logger](SubscriptionCreditsNFTApi.md#logger) - [nevermined](SubscriptionCreditsNFTApi.md#nevermined) -- [web3](SubscriptionCreditsNFTApi.md#web3) +- [publicClient](SubscriptionCreditsNFTApi.md#publicclient) +- [walletClient](SubscriptionCreditsNFTApi.md#walletclient) ### Methods @@ -78,7 +80,11 @@ Allows the interaction with external ERC-1155 NFT contracts built on top of the ### constructor -• **new SubscriptionCreditsNFTApi**() +• **new SubscriptionCreditsNFTApi**(): [`SubscriptionCreditsNFTApi`](SubscriptionCreditsNFTApi.md) + +#### Returns + +[`SubscriptionCreditsNFTApi`](SubscriptionCreditsNFTApi.md) #### Inherited from @@ -96,7 +102,7 @@ Allows the interaction with external ERC-1155 NFT contracts built on top of the #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L22) +[src/nevermined/api/nfts/NFT1155Api.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L26) --- @@ -106,7 +112,7 @@ Allows the interaction with external ERC-1155 NFT contracts built on top of the #### Index signature -▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`Service`](../code-reference.md#service)\> +▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`Service`](../code-reference.md#service)\> #### Inherited from @@ -114,7 +120,7 @@ Allows the interaction with external ERC-1155 NFT contracts built on top of the #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L29) +[src/nevermined/api/RegistryBaseApi.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L39) ## Accessors @@ -122,7 +128,7 @@ Allows the interaction with external ERC-1155 NFT contracts built on top of the • `get` **address**(): `string` -Gets the ERC-721 NFT Contract address +Gets the ERC-1155 NFT Contract address #### Returns @@ -136,17 +142,17 @@ NFT1155Api.address #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:60](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L60) +[src/nevermined/api/nfts/NFT1155Api.ts:64](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L64) --- ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -154,17 +160,17 @@ NFT1155Api.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -172,13 +178,31 @@ NFT1155Api.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +NFT1155Api.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -190,7 +214,7 @@ NFT1155Api.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- @@ -212,13 +236,13 @@ NFT1155Api.getContract #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L68) +[src/nevermined/api/nfts/NFT1155Api.ts:72](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L72) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -230,17 +254,17 @@ NFT1155Api.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -248,13 +272,13 @@ NFT1155Api.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -266,13 +290,13 @@ NFT1155Api.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -284,31 +308,146 @@ NFT1155Api.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -NFT1155Api.web3 +NFT1155Api.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +NFT1155Api.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### \_details -▸ `Protected` **\_details**(`did`, `ercType`): `Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +▸ **\_details**(`did`, `ercType`): `Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> Get the details of an NFT @@ -321,7 +460,7 @@ Get the details of an NFT #### Returns -`Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +`Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> The details of the NFT. @@ -345,13 +484,13 @@ assert.equal(details.owner, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L150) +[src/nevermined/api/nfts/NFTsBaseApi.ts:152](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L152) --- ### access -▸ **access**(`did`, `consumer`, `destination?`, `fileIndex?`, `agreementId?`, `buyer?`, `babysig?`, `serviceReference?`): `Promise`<`boolean`\> +▸ **access**(`did`, `from`, `destination?`, `fileIndex?`, `agreementId?`, `buyer?`, `babysig?`, `serviceReference?`): `Promise`\<`boolean`\> Access the files associated with an NFT. @@ -360,7 +499,7 @@ Access the files associated with an NFT. | Name | Type | Default value | Description | | :----------------- | :------------------------------------------------------------ | :------------- | :------------------------------------------------------------------------ | | `did` | `string` | `undefined` | The Decentralized Identifier of the NFT asset. | -| `consumer` | [`Account`](Account.md) | `undefined` | The NFT holder account. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The user account holding NFTs (after purchase) requesting the access | | `destination?` | `string` | `undefined` | The download destination for the files. | | `fileIndex?` | `number` | `undefined` | The index of the file. If unset will download all the files in the asset. | | `agreementId` | `string` | `'0x'` | The NFT sales agreement id. | @@ -370,7 +509,7 @@ Access the files associated with an NFT. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the access was successful or file if isToDownload is false. @@ -391,13 +530,13 @@ const result = await nevermined.nfts1155.access(ddo.id, collector, '/tmp/') #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:419](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L419) +[src/nevermined/api/nfts/NFTsBaseApi.ts:427](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L427) --- ### addRating -▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, it adds a vote to the asset curation information. @@ -408,13 +547,13 @@ Given a DID, it adds a vote to the asset curation information. | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `newRating` | `number` | `undefined` | New average rating of the asset | | `numVotesAdded` | `number` | `1` | Number of new votes added to the rating, typically just 1 | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -424,26 +563,26 @@ Given a DID, it adds a vote to the asset curation information. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:514](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L514) +[src/nevermined/api/RegistryBaseApi.ts:534](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L534) --- ### balance -▸ **balance**(`did`, `account`): `Promise`<`bigint`\> +▸ **balance**(`did`, `account`): `Promise`\<`bigint`\> Get the NFT balance for a particular did associated to an account/address #### Parameters -| Name | Type | Description | -| :-------- | :---------------------------------- | :--------------------------------------------- | -| `did` | `string` | The Decentralized Identifier of the NFT asset. | -| `account` | `string` \| [`Account`](Account.md) | The account/address to check the balance of. | +| Name | Type | Description | +| :-------- | :---------------------------------------- | :--------------------------------------------- | +| `did` | `string` | The Decentralized Identifier of the NFT asset. | +| `account` | `string` \| [`NvmAccount`](NvmAccount.md) | The account/address to check the balance of. | #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> The number of editions of a NFT owned by the account/address. @@ -459,30 +598,30 @@ const balance = await nevermined.nfts1155.balance(ddo.id, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:466](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L466) +[src/nevermined/api/nfts/NFT1155Api.ts:464](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L464) --- ### burn -▸ **burn**(`tokenId`, `nftAmount`, `account`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **burn**(`tokenId`, `nftAmount`, `from`, `txParams?`): `Promise`\<`any`\> -Burn NFTs associated with an asset. +It burns NFTs associated with an asset. #### Parameters -| Name | Type | Description | -| :---------- | :---------------------------------------------- | :--------------------------------------------- | -| `tokenId` | `string` | The Decentralized Identifier of the NFT asset. | -| `nftAmount` | `bigint` | The amount of NFTs to burn. | -| `account` | [`Account`](Account.md) | The account of the publisher of the NFT. | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | +| Name | Type | Description | +| :---------- | :---------------------------------------------- | :---------------------------------------------------------------- | +| `tokenId` | `string` | The Decentralized Identifier of the NFT asset. | +| `nftAmount` | `bigint` | The amount of NFTs to burn. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the publisher of the NFT with permissions to burn. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Remarks`** @@ -500,15 +639,15 @@ await nevermined.nfts1155.burn(did, 2n, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:185](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L185) +[src/nevermined/api/nfts/NFT1155Api.ts:189](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L189) --- ### burnFromHolder -▸ **burnFromHolder**(`holder`, `tokenId`, `nftAmount`, `account`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **burnFromHolder**(`holder`, `tokenId`, `nftAmount`, `from`, `txParams?`): `Promise`\<`any`\> -Burn NFTs associated with an asset of a specific account. +Burns NFTs associated with an asset of a specific account. #### Parameters @@ -517,14 +656,14 @@ Burn NFTs associated with an asset of a specific account. | `holder` | `string` | The address of the account that holds the NFTs. | | `tokenId` | `string` | The TokenId of the NFT | | `nftAmount` | `bigint` | The amount of NFTs to burn. | -| `account` | `string` \| [`Account`](Account.md) | The account of the publisher of the NFT. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the publisher of the NFT. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Remarks`** @@ -542,29 +681,29 @@ await nevermined.nfts1155.burnTo(holder, tokenId, 2n, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L213) +[src/nevermined/api/nfts/NFT1155Api.ts:217](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L217) --- ### buySecondaryMarketNft -▸ **buySecondaryMarketNft**(`consumer`, `nftAmount?`, `agreementIdSeed`, `conditionsTimeout?`, `txParams?`): `Promise`<`boolean`\> +▸ **buySecondaryMarketNft**(`from`, `nftAmount?`, `agreementIdSeed`, `conditionsTimeout?`, `txParams?`): `Promise`\<`boolean`\> Buys a number of listed NFTs on secondary markets. #### Parameters -| Name | Type | Description | -| :------------------ | :---------------------------------------------- | :----------------------------------------- | -| `consumer` | [`Account`](Account.md) | The account of the buyer/consumer. | -| `nftAmount` | `bigint` | The number of assets to buy. 1 by default. | -| `agreementIdSeed` | `string` | - | -| `conditionsTimeout` | `number`[] | - | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :------------------ | :---------------------------------------------- | :--------------------------------------------------------- | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the buyer/consumer. | +| `nftAmount` | `bigint` | The number of assets to buy. 1 by default. | +| `agreementIdSeed` | `string` | The seed of the initial sales agreement created off-chain. | +| `conditionsTimeout` | `number`[] | The timeout for the conditions. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the buy was successful. @@ -585,30 +724,30 @@ Thrown if there is an error buying the NFT. #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:341](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L341) +[src/nevermined/api/nfts/NFTsBaseApi.ts:345](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L345) --- ### claim -▸ **claim**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `did?`, `serviceIndex?`): `Promise`<`boolean`\> +▸ **claim**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `did?`, `serviceIndex?`): `Promise`\<`boolean`\> Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. #### Parameters -| Name | Type | Description | -| :--------------- | :------- | :--------------------------------------------------------------------------- | -| `agreementId` | `string` | The NFT sales agreement id. | -| `nftHolder` | `string` | The address of the current owner of the NFT. | -| `nftReceiver` | `string` | The address where the NFT should be transferred. | -| `numberEditions` | `bigint` | The number of NFT editions to transfer. If the NFT is ERC-721 it should be 1 | -| `did?` | `string` | The Decentralized Identifier of the asset. | -| `serviceIndex?` | `number` | The index of the service in the DDO that will be claimed | +| Name | Type | Description | +| :--------------- | :------- | :---------------------------------------------------------------------------- | +| `agreementId` | `string` | The NFT sales agreement id. | +| `nftHolder` | `string` | The address of the current owner of the NFT. | +| `nftReceiver` | `string` | The address where the NFT should be transferred. | +| `numberEditions` | `bigint` | The number of NFT editions to transfer. If the NFT is ERC-1155 it should be 1 | +| `did?` | `string` | The Decentralized Identifier of the asset. | +| `serviceIndex?` | `number` | The index of the service in the DDO that will be claimed | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -624,7 +763,13 @@ as soon as the payment is made **`Example`** ```ts -const receipt = await nevermined.nfts721.claim(agreementId, editor.getId(), subscriber.getId(), 1n) +const receipt = await nevermined.nfts1155.claim( + agreementId, + publisherAddress, + subscriberAddress, + 1n, + did, +) ``` #### Inherited from @@ -633,13 +778,13 @@ const receipt = await nevermined.nfts721.claim(agreementId, editor.getId(), subs #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:321](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L321) +[src/nevermined/api/nfts/NFT1155Api.ts:320](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L320) --- ### claimNFT -▸ `Protected` **claimNFT**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `ercType?`, `did?`, `serviceIndex?`): `Promise`<`boolean`\> +▸ **claimNFT**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `ercType?`, `did?`, `serviceIndex?`): `Promise`\<`boolean`\> Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. @@ -657,7 +802,7 @@ Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -692,13 +837,13 @@ const receipt = await nevermined.nfts721.claim( #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L50) +[src/nevermined/api/nfts/NFTsBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L52) --- ### create -▸ **create**(`nftAttributes`, `publisher`, `publicationOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **create**(`nftAttributes`, `from`, `publicationOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> Creates a new Nevermined asset associated to a NFT (ERC-1155). @@ -706,14 +851,14 @@ Creates a new Nevermined asset associated to a NFT (ERC-1155). | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | -| `nftAttributes` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-721) associated to the asset | -| `publisher` | [`Account`](Account.md) | The account publishing the asset | +| `nftAttributes` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-1155) associated to the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The newly registered [DDO](DDO.md). @@ -746,15 +891,15 @@ const ddo = await nevermined.nfts1155.create(nftAttributes, publisher) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:103](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L103) +[src/nevermined/api/nfts/NFT1155Api.ts:107](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L107) --- ### details -▸ **details**(`did`): `Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +▸ **details**(`did`): `Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> -Get the details of an NFT +Get the details of a NFT #### Parameters @@ -764,7 +909,7 @@ Get the details of an NFT #### Returns -`Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +`Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> The details of the NFT. @@ -788,26 +933,26 @@ assert.equal(details.owner, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:679](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L679) +[src/nevermined/api/nfts/NFT1155Api.ts:676](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L676) --- ### getSubscriptionToken -▸ **getSubscriptionToken**(`did`, `account`): `Promise`<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> +▸ **getSubscriptionToken**(`did`, `from`): `Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> Get a JWT token for an asset associated with a webService #### Parameters -| Name | Type | Description | -| :-------- | :---------------------- | :----------------------------------------------------------------------------- | -| `did` | `string` | The did of the asset with a webService resource and an associated subscription | -| `account` | [`Account`](Account.md) | Account of the user requesting the token | +| Name | Type | Description | +| :----- | :---------------------------- | :----------------------------------------------------------------------------- | +| `did` | `string` | The did of the asset with a webService resource and an associated subscription | +| `from` | [`NvmAccount`](NvmAccount.md) | Account of the user requesting the token | #### Returns -`Promise`<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> +`Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> [SubscriptionToken](../interfaces/SubscriptionToken.md) @@ -826,13 +971,13 @@ assert.isDefined(response.neverminedProxyUri) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:478](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L478) +[src/nevermined/api/nfts/NFTsBaseApi.ts:490](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L490) --- ### grantOperatorRole -▸ **grantOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **grantOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Adds a minter (`minterAddress`) to the NFT Contract. Granting and revoking minting permissions only can be done by the NFT Contract owner @@ -842,14 +987,14 @@ Granting and revoking minting permissions only can be done by the NFT Contract o | Name | Type | Description | | :---------------- | :---------------------------------------------- | :--------------------------------------------------------------------- | | `operatorAddress` | `string` | The address of the account to be added as operator in the NFT Contract | -| `from?` | [`Account`](Account.md) | The account giving operator permissions | +| `from` | [`NvmAccount`](NvmAccount.md) | The account giving operator permissions | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -863,13 +1008,13 @@ await nevermined.nfts1155.grantOperatorRole(someoneElse, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:625](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L625) +[src/nevermined/api/nfts/NFT1155Api.ts:622](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L622) --- ### isApprovedForAll -▸ **isApprovedForAll**(`operatorAddress`, `from`): `Promise`<`unknown`\> +▸ **isApprovedForAll**(`operatorAddress`, `from`): `Promise`\<`unknown`\> Returns if the `operatorAddress` is approved @@ -882,7 +1027,7 @@ Returns if the `operatorAddress` is approved #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> Boolean saying if the `operatorAddress` is approved @@ -902,13 +1047,13 @@ await nevermined.nfts1155.isApprovedForAll(someoneElse, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:540](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L540) +[src/nevermined/api/nfts/NFT1155Api.ts:538](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L538) --- ### isOperator -▸ **isOperator**(`nftContractAddress`, `operatorAddress`, `ercType?`): `Promise`<`boolean`\> +▸ **isOperator**(`nftContractAddress`, `operatorAddress`, `ercType?`): `Promise`\<`boolean`\> Check if a particular address is the operator of given a NFT address. @@ -922,7 +1067,7 @@ Check if a particular address is the operator of given a NFT address. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> operator status of address as a boolean @@ -932,13 +1077,13 @@ operator status of address as a boolean #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:116](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L116) +[src/nevermined/api/nfts/NFTsBaseApi.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L118) --- ### isOperatorOfDID -▸ **isOperatorOfDID**(`did`, `address`, `ercType?`): `Promise`<`boolean`\> +▸ **isOperatorOfDID**(`did`, `address`, `ercType?`): `Promise`\<`boolean`\> Check if a particular address is the operator of a DID. @@ -952,7 +1097,7 @@ Check if a particular address is the operator of a DID. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> operator status of address as a boolean @@ -962,13 +1107,13 @@ operator status of address as a boolean #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:91](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L91) +[src/nevermined/api/nfts/NFTsBaseApi.ts:93](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L93) --- ### list -▸ **list**(`did`, `list`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **list**(`did`, `list`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset allowing to list or unlist it. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. In a Nevermined environment, when an asset is unlisted, it is not possible to be found and accessed by any user. @@ -979,13 +1124,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be | :---------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `list` | `boolean` | `undefined` | Needs the asset to be listed or unlisted | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -995,13 +1140,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:462](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L462) +[src/nevermined/api/RegistryBaseApi.ts:482](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L482) --- ### listOnSecondaryMarkets -▸ **listOnSecondaryMarkets**(`ddo`, `assetPrice`, `nftAmount`, `nftTransfer`, `provider`, `token`, `owner`): `Promise`<`string`\> +▸ **listOnSecondaryMarkets**(`ddo`, `assetPrice`, `nftAmount`, `nftTransfer`, `provider`, `token`, `from`): `Promise`\<`string`\> After purchase re-list an NFT to enable secondary market sales. @@ -1015,11 +1160,11 @@ After purchase re-list an NFT to enable secondary market sales. | `nftTransfer` | `boolean` | - | | `provider` | `string` | The address that will be the provider of the secondary sale. | | `token` | [`Token`](Token.md) | - | -| `owner` | [`Account`](Account.md) | The account of the current owner. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the current owner. | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> the agreementId of the secondary sale. @@ -1047,15 +1192,15 @@ Thrown if there is an error listing the NFT. #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:260](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L260) +[src/nevermined/api/nfts/NFTsBaseApi.ts:262](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L262) --- ### mint -▸ **mint**(`did`, `nftAmount`, `receiver`, `account`, `data?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **mint**(`did`, `nftAmount`, `receiver`, `from`, `data?`, `txParams?`): `Promise`\<`any`\> -Mint NFTs associated with an asset. +It mints the NFTs associated with an asset. #### Parameters @@ -1063,16 +1208,16 @@ Mint NFTs associated with an asset. | :---------- | :---------------------------------------------- | :-------------------------------------------------------------------------------------------- | | `did` | `string` | The Decentralized Identifier of the NFT asset. | | `nftAmount` | `bigint` | The amount of NFTs to mint. | -| `receiver` | `string` | Account address of the NFT receiver, if `undefined` the minter account will receive the NFT/s | -| `account` | [`Account`](Account.md) | The account to mint the NFT. \* | +| `receiver` | `undefined` \| `string` | Account address of the NFT receiver, if `undefined` the minter account will receive the NFT/s | +| `from` | [`NvmAccount`](NvmAccount.md) | The account minting the NFT. \* | | `data?` | `string` | Data | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Remarks`** @@ -1090,15 +1235,15 @@ await nevermined.nfts1155.mint(did, 10n, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:145](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L145) +[src/nevermined/api/nfts/NFT1155Api.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L149) --- ### order -▸ **order**(`did`, `numberEditions`, `consumer`, `serviceReference?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **order**(`did`, `numberEditions`, `from`, `serviceReference?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> -Buy NFTs. +It orders NFTs. #### Parameters @@ -1106,13 +1251,13 @@ Buy NFTs. | :----------------- | :------------------------------------------------------------ | :------------ | :------------------------------------------------------------- | | `did` | `string` | `undefined` | The Decentralized Identifier of the NFT asset. | | `numberEditions` | `bigint` | `undefined` | The amount of NFTs to buy. | -| `consumer` | [`Account`](Account.md) | `undefined` | The account of the NFT buyer. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The account of the NFT buyer. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to order | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID. @@ -1133,29 +1278,29 @@ agreementId = await nevermined.nfts1155.order(ddo.id, numberNFTs, collector) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:252](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L252) +[src/nevermined/api/nfts/NFT1155Api.ts:250](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L250) --- ### orderAsset -▸ **orderAsset**(`did`, `serviceReference`, `consumer`, `params?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **orderAsset**(`did`, `serviceReference`, `from`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> Start the purchase/order of an asset's service. Starts by signing the service agreement then sends the request to the publisher via the service endpoint (Node http service). #### Parameters -| Name | Type | Description | -| :----------------- | :------------------------------------------------------------ | :---------------- | -| `did` | `string` | Decentralized ID. | -| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | -| `consumer` | [`Account`](Account.md) | Consumer account. | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :----------------- | :------------------------------------------------------------ | :--------------------- | +| `did` | `string` | Decentralized ID. | +| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | +| `from` | [`NvmAccount`](NvmAccount.md) | Consumer account. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID. @@ -1165,26 +1310,26 @@ The agreement ID. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:563](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L563) +[src/nevermined/api/RegistryBaseApi.ts:585](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L585) --- ### owner -▸ **owner**(): `Promise`<`string`\> +▸ **owner**(): `Promise`\<`string`\> Gets the contract owner #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> Address of the contract owner **`Example`** ```ts -const nftContractOwner = new Account(await nevermined.nfts1155.owner()) +const nftContractOwner = new NvmAccount(await nevermined.nfts1155.owner()) ``` #### Inherited from @@ -1193,13 +1338,13 @@ const nftContractOwner = new Account(await nevermined.nfts1155.owner()) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:485](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L485) +[src/nevermined/api/nfts/NFT1155Api.ts:483](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L483) --- ### registerNeverminedAsset -▸ `Protected` **registerNeverminedAsset**(`assetAttributes`, `publisher`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **registerNeverminedAsset**(`assetAttributes`, `from`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> It registers a new asset in a Nevermined network. This method is protected and not exposed via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, and `nfts` APIs. @@ -1209,14 +1354,14 @@ via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | | `assetAttributes` | [`AssetAttributes`](AssetAttributes.md) | Attributes describing the asset | -| `publisher` | [`Account`](Account.md) | The account publishing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-721) associated to the asset | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The metadata of the asset created (DDO) @@ -1230,13 +1375,13 @@ The metadata of the asset created (DDO) #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L42) +[src/nevermined/api/RegistryBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L52) --- ### releaseRewards -▸ **releaseRewards**(`agreementId`, `did`, `serviceReference?`, `nftAmount`, `publisher`, `txParams?`): `Promise`<`boolean`\> +▸ **releaseRewards**(`agreementId`, `did`, `serviceReference?`, `nftAmount`, `from`, `txParams?`): `Promise`\<`boolean`\> Release the funds from escrow. @@ -1248,12 +1393,12 @@ Release the funds from escrow. | `did` | `string` | `undefined` | The Decentralized identifier of the NFT asset. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to release rewards | | `nftAmount` | `bigint` | `undefined` | The amount of NFTs to transfer. | -| `publisher` | [`Account`](Account.md) | `undefined` | The current owner of the NFTs. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The current owner of the NFTs. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the funds release was successful. @@ -1278,13 +1423,13 @@ Thrown if there is an error releasing the rewards #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:424](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L424) +[src/nevermined/api/nfts/NFT1155Api.ts:423](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L423) --- ### releaseSecondaryMarketRewards -▸ **releaseSecondaryMarketRewards**(`owner`, `consumer`, `agreementIdSeed`, `serviceReference?`, `txParams?`): `Promise`<`boolean`\> +▸ **releaseSecondaryMarketRewards**(`owner`, `consumer`, `agreementIdSeed`, `serviceReference?`, `txParams?`): `Promise`\<`boolean`\> Used to release the secondary market NFT & the locked rewards. @@ -1292,15 +1437,15 @@ Used to release the secondary market NFT & the locked rewards. | Name | Type | Default value | Description | | :----------------- | :------------------------------------------------------------ | :------------ | :----------------------------------------------------------------------- | -| `owner` | [`Account`](Account.md) | `undefined` | The owner account. | -| `consumer` | [`Account`](Account.md) | `undefined` | The consumer account. | +| `owner` | [`NvmAccount`](NvmAccount.md) | `undefined` | The owner account. | +| `consumer` | [`NvmAccount`](NvmAccount.md) | `undefined` | The consumer account. | | `agreementIdSeed` | `string` | `undefined` | the Id of the underlying service agreement seed. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to release rewards | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transaction was successful. @@ -1321,15 +1466,16 @@ Thrown if there is an error releasing the rewards. #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:562](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L562) +[src/nevermined/api/nfts/NFT1155Api.ts:560](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L560) --- ### resolveAsset -▸ `Protected` **resolveAsset**(`did`, `policy?`): `Promise`<[`DDO`](DDO.md)\> +▸ **resolveAsset**(`did`, `policy?`): `Promise`\<[`DDO`](DDO.md)\> -Returns a DDO by DID. Depending of the resolution policy it prioritize the Metadata API or Immutable urls. +Given an asset DID it returns the metadata of that asset represented by a DDO object. +Depending of the resolution policy it prioritize fetching that Metadata from the Marketplace API or Immutable urls (like IPFS). #### Parameters @@ -1340,7 +1486,7 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> [DDO](DDO.md) @@ -1350,13 +1496,13 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:310](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L310) +[src/nevermined/api/RegistryBaseApi.ts:324](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L324) --- ### revokeOperatorRole -▸ **revokeOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **revokeOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Revokes an address (`operatorAddress`) of the NFT Contract as operator. Granting and revoking minting permissions only can be done by the NFT Contract owner @@ -1366,14 +1512,14 @@ Granting and revoking minting permissions only can be done by the NFT Contract o | Name | Type | Description | | :---------------- | :---------------------------------------------- | :----------------------------------------------------------------------- | | `operatorAddress` | `string` | The address of the account to be revoked as operator in the NFT Contract | -| `from?` | [`Account`](Account.md) | The account revoking operator permissions | +| `from` | [`NvmAccount`](NvmAccount.md) | The account revoking operator permissions | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -1387,13 +1533,13 @@ await nevermined.nfts1155.revokeOperatorRole(someoneElse, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:651](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L651) +[src/nevermined/api/nfts/NFT1155Api.ts:648](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L648) --- ### setApprovalForAll -▸ **setApprovalForAll**(`operatorAddress`, `approved`, `from`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **setApprovalForAll**(`operatorAddress`, `approved`, `from`, `txParams?`): `Promise`\<`any`\> Enable or disable NFT permissions for an operator. @@ -1403,14 +1549,14 @@ Enable or disable NFT permissions for an operator. | :---------------- | :---------------------------------------------- | :------------------------------------------------------------------- | | `operatorAddress` | `string` | The address that of the operator we want to give transfer rights to. | | `approved` | `boolean` | Give or remove transfer rights from the operator. | -| `from` | [`Account`](Account.md) | The account that wants to give transfer rights to the operator. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account that wants to give transfer rights to the operator. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction additional parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceiptnReceiptnReceipt +The TransactionReceipt **`See`** @@ -1428,13 +1574,13 @@ await nevermined.nfts1155.setApprovalForAll(someoneElse, true, artist) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:510](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L510) +[src/nevermined/api/nfts/NFT1155Api.ts:508](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L508) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1452,13 +1598,13 @@ await nevermined.nfts1155.setApprovalForAll(someoneElse, true, artist) #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### transfer -▸ **transfer**(`agreementId`, `did`, `nftAmount`, `publisher`, `serviceReference?`, `txParams?`): `Promise`<`boolean`\> +▸ **transfer**(`agreementId`, `did`, `nftAmount`, `from`, `serviceReference?`, `txParams?`): `Promise`\<`boolean`\> Transfer NFTs to the consumer. @@ -1469,13 +1615,13 @@ Transfer NFTs to the consumer. | `agreementId` | `string` | `undefined` | The NFT sales agreement id. | | `did` | `string` | `undefined` | The Decentralized identifier of the NFT asset. | | `nftAmount` | `bigint` | `undefined` | The number of NFTs to transfer. | -| `publisher` | [`Account`](Account.md) | `undefined` | The current owner of the NFTs. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The current owner of the NFTs. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to transfer | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -1501,13 +1647,13 @@ Thrown if there is an error transferring the NFT #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:368](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L368) +[src/nevermined/api/nfts/NFT1155Api.ts:367](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L367) --- ### updateAsset -▸ `Protected` **updateAsset**(`did`, `metadata`, `publisher`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **updateAsset**(`did`, `metadata`, `from`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. @@ -1517,13 +1663,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th | :----------------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | `undefined` | Metadata describing the asset | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadataOptions` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -1533,36 +1679,40 @@ Given a DID, updates the metadata associated to the asset. It also can upload th #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:353](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L353) +[src/nevermined/api/RegistryBaseApi.ts:367](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L367) --- ### deployInstance -▸ `Static` **deployInstance**(`config`, `contractABI`, `from`, `args?`): `Promise`<[`SubscriptionCreditsNFTApi`](SubscriptionCreditsNFTApi.md)\> +▸ **deployInstance**(`config`, `contractABI`, `from`, `args?`): `Promise`\<[`SubscriptionCreditsNFTApi`](SubscriptionCreditsNFTApi.md)\> + +It deploys a new instance of the Subscription NFT (ERC-1155) contract #### Parameters -| Name | Type | Default value | -| :------------ | :------------------------------------------ | :------------ | -| `config` | [`NeverminedOptions`](NeverminedOptions.md) | `undefined` | -| `contractABI` | `any` | `undefined` | -| `from` | [`Account`](Account.md) | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | Default value | Description | +| :------------ | :------------------------------------------ | :------------ | :--------------------------------------------------------------- | +| `config` | [`NeverminedOptions`](NeverminedOptions.md) | `undefined` | The Nevermined config | +| `contractABI` | `any` | `undefined` | The ABI of the Subscription NFT Contract | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The account that will deploy the contract | +| `args` | `never`[] | `[]` | The list of arguments passed to the contract when is initialized | #### Returns -`Promise`<[`SubscriptionCreditsNFTApi`](SubscriptionCreditsNFTApi.md)\> +`Promise`\<[`SubscriptionCreditsNFTApi`](SubscriptionCreditsNFTApi.md)\> + +The Subscription NFT API instance [SubscriptionCreditsNFTApi](SubscriptionCreditsNFTApi.md). #### Defined in -[src/nevermined/api/nfts/SubscriptionCreditsNFTApi.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/SubscriptionCreditsNFTApi.ts#L26) +[src/nevermined/api/nfts/SubscriptionCreditsNFTApi.ts:45](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/SubscriptionCreditsNFTApi.ts#L45) --- ### getInstance -▸ `Static` **getInstance**(`config`, `nftContractInstance?`, `nftContractAddress?`): `Promise`<[`NFT1155Api`](NFT1155Api.md)\> +▸ **getInstance**(`config`, `nftContractInstance?`, `nftContractAddress?`): `Promise`\<[`NFT1155Api`](NFT1155Api.md)\> Create a new Nevermined NFTs (ERC-1155) instance allowing to interact with that kind of NFTs. @@ -1570,13 +1720,13 @@ Create a new Nevermined NFTs (ERC-1155) instance allowing to interact with that | Name | Type | Description | | :--------------------- | :---------------------------------------------------------- | :---------------------------------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | The Nevermined config | | `nftContractInstance?` | [`Nft1155Contract`](Nft1155Contract.md) | If there is already deployed an instance of `Nft1155Contract` | | `nftContractAddress?` | `string` | If the `Nft1155Contract` is deployed in an address it will connect to that contract | #### Returns -`Promise`<[`NFT1155Api`](NFT1155Api.md)\> +`Promise`\<[`NFT1155Api`](NFT1155Api.md)\> The NFTs 1155 API instance [NFT1155Api](NFT1155Api.md). @@ -1592,35 +1742,39 @@ nfts1155 = await Nft1155Api.getInstance(instanceConfig, nft1155Contract) #### Defined in -[src/nevermined/api/nfts/NFT1155Api.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT1155Api.ts#L40) +[src/nevermined/api/nfts/NFT1155Api.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT1155Api.ts#L44) --- ### getInstanceUsingABI -▸ `Static` **getInstanceUsingABI**(`config`, `nftContractAddress`, `solidityABI`): `Promise`<[`SubscriptionCreditsNFTApi`](SubscriptionCreditsNFTApi.md)\> +▸ **getInstanceUsingABI**(`config`, `nftContractAddress`, `solidityABI`): `Promise`\<[`SubscriptionCreditsNFTApi`](SubscriptionCreditsNFTApi.md)\> + +It gets a Subscription NFT (ERC-1155) instance #### Parameters -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | -| `nftContractAddress` | `string` | -| `solidityABI` | `any` | +| Name | Type | Description | +| :------------------- | :---------------------------------------------------------- | :------------------------------------------------------------------------------------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | The Nevermined config | +| `nftContractAddress` | `string` | If the Subscription NFT Contract is deployed in an address it will connect to that contract | +| `solidityABI` | `any` | The ABI of the Contract | #### Returns -`Promise`<[`SubscriptionCreditsNFTApi`](SubscriptionCreditsNFTApi.md)\> +`Promise`\<[`SubscriptionCreditsNFTApi`](SubscriptionCreditsNFTApi.md)\> + +The Subscription NFT API instance [SubscriptionCreditsNFTApi](SubscriptionCreditsNFTApi.md). #### Defined in -[src/nevermined/api/nfts/SubscriptionCreditsNFTApi.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/SubscriptionCreditsNFTApi.ts#L9) +[src/nevermined/api/nfts/SubscriptionCreditsNFTApi.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/SubscriptionCreditsNFTApi.ts#L20) --- ### getNFTContractAddress -▸ `Static` **getNFTContractAddress**(`ddo`, `serviceReference?`): `any` +▸ **getNFTContractAddress**(`ddo`, `serviceReference?`): `any` Gets the NFT contract address associated with a Nevermined asset from the DDO. @@ -1649,13 +1803,13 @@ const nftContractAddress = NFT1155Api.getNFTContractAddress(ddo) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:219](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L219) +[src/nevermined/api/nfts/NFTsBaseApi.ts:221](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L221) --- ### getServicePlugin -▸ `Static` `Protected` **getServicePlugin**(`config`): `Object` +▸ **getServicePlugin**(`config`): `Object` Initializes the default Nevermined service plugins and return that instance @@ -1671,13 +1825,12 @@ Initializes the default Nevermined service plugins and return that instance The Nevermined Service Plugin instance -| Name | Type | -| :------------ | :------------------------------------------------------------------------------------------------------------ | -| `aave-credit` | [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceAaveCredit`](../interfaces/ServiceAaveCredit.md)\> | -| `access` | [`AccessService`](AccessService.md) | -| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | -| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | -| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | +| Name | Type | +| :----------- | :-------------------------------------------------------------------- | +| `access` | [`AccessService`](AccessService.md) | +| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | +| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | +| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | #### Inherited from @@ -1685,13 +1838,13 @@ The Nevermined Service Plugin instance #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:618](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L618) +[src/nevermined/api/RegistryBaseApi.ts:640](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L640) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1716,4 +1869,4 @@ The Nevermined Service Plugin instance #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/SubscriptionNFTApi.md b/docs/api-reference/classes/SubscriptionNFTApi.md index 7b535a31d..13cf5b400 100644 --- a/docs/api-reference/classes/SubscriptionNFTApi.md +++ b/docs/api-reference/classes/SubscriptionNFTApi.md @@ -26,13 +26,15 @@ Allows the interaction with external ERC-721 NFT contracts built on top of the N - [address](SubscriptionNFTApi.md#address) - [artifactsFolder](SubscriptionNFTApi.md#artifactsfolder) - [circuitsFolder](SubscriptionNFTApi.md#circuitsfolder) +- [client](SubscriptionNFTApi.md#client) - [config](SubscriptionNFTApi.md#config) - [getContract](SubscriptionNFTApi.md#getcontract) - [instanceConfig](SubscriptionNFTApi.md#instanceconfig) - [instantiableConfig](SubscriptionNFTApi.md#instantiableconfig) - [logger](SubscriptionNFTApi.md#logger) - [nevermined](SubscriptionNFTApi.md#nevermined) -- [web3](SubscriptionNFTApi.md#web3) +- [publicClient](SubscriptionNFTApi.md#publicclient) +- [walletClient](SubscriptionNFTApi.md#walletclient) ### Methods @@ -81,7 +83,11 @@ Allows the interaction with external ERC-721 NFT contracts built on top of the N ### constructor -• **new SubscriptionNFTApi**() +• **new SubscriptionNFTApi**(): [`SubscriptionNFTApi`](SubscriptionNFTApi.md) + +#### Returns + +[`SubscriptionNFTApi`](SubscriptionNFTApi.md) #### Inherited from @@ -99,7 +105,7 @@ Allows the interaction with external ERC-721 NFT contracts built on top of the N #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L22) +[src/nevermined/api/nfts/NFT721Api.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L27) --- @@ -109,7 +115,7 @@ Allows the interaction with external ERC-721 NFT contracts built on top of the N #### Index signature -▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`Service`](../code-reference.md#service)\> +▪ [key: `string`]: [`ServicePlugin`](../interfaces/ServicePlugin.md)\<[`Service`](../code-reference.md#service)\> #### Inherited from @@ -117,7 +123,7 @@ Allows the interaction with external ERC-721 NFT contracts built on top of the N #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L29) +[src/nevermined/api/RegistryBaseApi.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L39) ## Accessors @@ -139,17 +145,17 @@ NFT721Api.address #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L55) +[src/nevermined/api/nfts/NFT721Api.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L60) --- ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -157,17 +163,17 @@ NFT721Api.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -175,13 +181,31 @@ NFT721Api.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +NFT721Api.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -193,7 +217,7 @@ NFT721Api.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- @@ -215,13 +239,13 @@ NFT721Api.getContract #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L63) +[src/nevermined/api/nfts/NFT721Api.ts:68](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L68) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -233,17 +257,17 @@ NFT721Api.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -251,13 +275,13 @@ NFT721Api.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -269,13 +293,13 @@ NFT721Api.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -287,31 +311,146 @@ NFT721Api.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -NFT721Api.web3 +NFT721Api.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +NFT721Api.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### \_details -▸ `Protected` **\_details**(`did`, `ercType`): `Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +▸ **\_details**(`did`, `ercType`): `Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> Get the details of an NFT @@ -324,7 +463,7 @@ Get the details of an NFT #### Returns -`Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +`Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> The details of the NFT. @@ -348,13 +487,13 @@ assert.equal(details.owner, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L150) +[src/nevermined/api/nfts/NFTsBaseApi.ts:152](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L152) --- ### access -▸ **access**(`did`, `consumer`, `destination?`, `fileIndex?`, `agreementId?`, `buyer?`, `babysig?`, `serviceReference?`): `Promise`<`boolean`\> +▸ **access**(`did`, `from`, `destination?`, `fileIndex?`, `agreementId?`, `buyer?`, `babysig?`, `serviceReference?`): `Promise`\<`boolean`\> Access the files associated with an NFT. @@ -363,7 +502,7 @@ Access the files associated with an NFT. | Name | Type | Default value | Description | | :----------------- | :------------------------------------------------------------ | :------------- | :------------------------------------------------------------------------ | | `did` | `string` | `undefined` | The Decentralized Identifier of the NFT asset. | -| `consumer` | [`Account`](Account.md) | `undefined` | The NFT holder account. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The user account holding NFTs (after purchase) requesting the access | | `destination?` | `string` | `undefined` | The download destination for the files. | | `fileIndex?` | `number` | `undefined` | The index of the file. If unset will download all the files in the asset. | | `agreementId` | `string` | `'0x'` | The NFT sales agreement id. | @@ -373,7 +512,7 @@ Access the files associated with an NFT. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the access was successful or file if isToDownload is false. @@ -394,13 +533,13 @@ const result = await nevermined.nfts1155.access(ddo.id, collector, '/tmp/') #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:419](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L419) +[src/nevermined/api/nfts/NFTsBaseApi.ts:427](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L427) --- ### addRating -▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **addRating**(`did`, `newRating`, `numVotesAdded?`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, it adds a vote to the asset curation information. @@ -411,13 +550,13 @@ Given a DID, it adds a vote to the asset curation information. | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `newRating` | `number` | `undefined` | New average rating of the asset | | `numVotesAdded` | `number` | `1` | Number of new votes added to the rating, typically just 1 | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -427,25 +566,25 @@ Given a DID, it adds a vote to the asset curation information. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:514](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L514) +[src/nevermined/api/RegistryBaseApi.ts:534](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L534) --- ### balanceOf -▸ **balanceOf**(`account`): `Promise`<`bigint`\> +▸ **balanceOf**(`account`): `Promise`\<`bigint`\> Get the NFT balance for a particular account/address #### Parameters -| Name | Type | Description | -| :-------- | :---------------------------------- | :------------------------------------------- | -| `account` | `string` \| [`Account`](Account.md) | The account/address to check the balance of. | +| Name | Type | Description | +| :-------- | :---------------------------------------- | :------------------------------------------- | +| `account` | `string` \| [`NvmAccount`](NvmAccount.md) | The account/address to check the balance of. | #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> The balance of NFTs owned by the account. @@ -461,13 +600,13 @@ const balance = await nevermined.nfts721.balance(artist) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:506](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L506) +[src/nevermined/api/nfts/NFT721Api.ts:506](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L506) --- ### burn -▸ **burn**(`tokenId`, `account`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **burn**(`tokenId`, `from`, `txParams?`): `Promise`\<`any`\> Burn NFTs associated with an asset. @@ -476,14 +615,14 @@ Burn NFTs associated with an asset. | Name | Type | Description | | :---------- | :---------------------------------------------- | :--------------------------------------- | | `tokenId` | `string` | The identifier of the token to burn | -| `account` | [`Account`](Account.md) | The account of the publisher of the NFT. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the publisher of the NFT. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Remarks`** @@ -501,29 +640,29 @@ await nevermined.nfts721.burn(tokenId, artist) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:347](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L347) +[src/nevermined/api/nfts/NFT721Api.ts:348](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L348) --- ### buySecondaryMarketNft -▸ **buySecondaryMarketNft**(`consumer`, `nftAmount?`, `agreementIdSeed`, `conditionsTimeout?`, `txParams?`): `Promise`<`boolean`\> +▸ **buySecondaryMarketNft**(`from`, `nftAmount?`, `agreementIdSeed`, `conditionsTimeout?`, `txParams?`): `Promise`\<`boolean`\> Buys a number of listed NFTs on secondary markets. #### Parameters -| Name | Type | Description | -| :------------------ | :---------------------------------------------- | :----------------------------------------- | -| `consumer` | [`Account`](Account.md) | The account of the buyer/consumer. | -| `nftAmount` | `bigint` | The number of assets to buy. 1 by default. | -| `agreementIdSeed` | `string` | - | -| `conditionsTimeout` | `number`[] | - | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :------------------ | :---------------------------------------------- | :--------------------------------------------------------- | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the buyer/consumer. | +| `nftAmount` | `bigint` | The number of assets to buy. 1 by default. | +| `agreementIdSeed` | `string` | The seed of the initial sales agreement created off-chain. | +| `conditionsTimeout` | `number`[] | The timeout for the conditions. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the buy was successful. @@ -544,13 +683,13 @@ Thrown if there is an error buying the NFT. #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:341](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L341) +[src/nevermined/api/nfts/NFTsBaseApi.ts:345](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L345) --- ### claim -▸ **claim**(`agreementId`, `nftHolder`, `nftReceiver`, `did?`, `serviceIndex?`): `Promise`<`boolean`\> +▸ **claim**(`agreementId`, `nftHolder`, `nftReceiver`, `did?`, `serviceIndex?`): `Promise`\<`boolean`\> Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. @@ -566,7 +705,7 @@ Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -591,13 +730,13 @@ const receipt = await nevermined.nfts721.claim(agreementId, editor.getId(), subs #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:193](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L193) +[src/nevermined/api/nfts/NFT721Api.ts:198](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L198) --- ### claimNFT -▸ `Protected` **claimNFT**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `ercType?`, `did?`, `serviceIndex?`): `Promise`<`boolean`\> +▸ **claimNFT**(`agreementId`, `nftHolder`, `nftReceiver`, `numberEditions?`, `ercType?`, `did?`, `serviceIndex?`): `Promise`\<`boolean`\> Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. @@ -615,7 +754,7 @@ Claims the transfer of a NFT to the Nevermined Node on behalf of the publisher. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -650,13 +789,13 @@ const receipt = await nevermined.nfts721.claim( #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L50) +[src/nevermined/api/nfts/NFTsBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L52) --- ### create -▸ **create**(`nftAttributes`, `publisher`, `publicationOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **create**(`nftAttributes`, `from`, `publicationOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> Creates a new Nevermined asset associated to a NFT (ERC-721). @@ -665,13 +804,13 @@ Creates a new Nevermined asset associated to a NFT (ERC-721). | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | | `nftAttributes` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-721) associated to the asset | -| `publisher` | [`Account`](Account.md) | The account publishing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The newly registered [DDO](DDO.md). @@ -706,13 +845,13 @@ ddo = await nevermined.nfts721.create( #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:97](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L97) +[src/nevermined/api/nfts/NFT721Api.ts:102](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L102) --- ### details -▸ **details**(`did`): `Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +▸ **details**(`did`): `Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> Get the details of an NFT @@ -724,7 +863,7 @@ Get the details of an NFT #### Returns -`Promise`<{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> +`Promise`\<\{ `blockNumberUpdated`: `number` ; `lastChecksum`: `any` ; `lastUpdatedBy`: `any` ; `mintCap`: `bigint` ; `nftContractAddress`: `any` ; `nftInitialized`: `any` ; `nftSupply`: `bigint` ; `nftURI`: `string` ; `owner`: `any` ; `providers`: `any` ; `royalties`: `number` ; `royaltyScheme`: [`RoyaltyKind`](../enums/RoyaltyKind.md) ; `url`: `any` }\> The details of the NFT. @@ -748,26 +887,26 @@ assert.equal(details.owner, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:639](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L639) +[src/nevermined/api/nfts/NFT721Api.ts:638](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L638) --- ### getSubscriptionToken -▸ **getSubscriptionToken**(`did`, `account`): `Promise`<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> +▸ **getSubscriptionToken**(`did`, `from`): `Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> Get a JWT token for an asset associated with a webService #### Parameters -| Name | Type | Description | -| :-------- | :---------------------- | :----------------------------------------------------------------------------- | -| `did` | `string` | The did of the asset with a webService resource and an associated subscription | -| `account` | [`Account`](Account.md) | Account of the user requesting the token | +| Name | Type | Description | +| :----- | :---------------------------- | :----------------------------------------------------------------------------- | +| `did` | `string` | The did of the asset with a webService resource and an associated subscription | +| `from` | [`NvmAccount`](NvmAccount.md) | Account of the user requesting the token | #### Returns -`Promise`<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> +`Promise`\<[`SubscriptionToken`](../interfaces/SubscriptionToken.md)\> [SubscriptionToken](../interfaces/SubscriptionToken.md) @@ -786,13 +925,13 @@ assert.isDefined(response.neverminedProxyUri) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:478](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L478) +[src/nevermined/api/nfts/NFTsBaseApi.ts:490](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L490) --- ### grantOperatorRole -▸ **grantOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **grantOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Adds a operator (`operatorAddress`) to the NFT Contract. Granting and revoking operator permissions only can be done by the NFT Contract owner @@ -802,14 +941,14 @@ Granting and revoking operator permissions only can be done by the NFT Contract | Name | Type | Description | | :---------------- | :---------------------------------------------- | :--------------------------------------------------------------------- | | `operatorAddress` | `string` | The address of the account to be added as operator in the NFT Contract | -| `from?` | [`Account`](Account.md) | The account giving operator permissions | +| `from` | [`NvmAccount`](NvmAccount.md) | The account giving operator permissions | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -823,13 +962,13 @@ await nevermined.nfts721.grantOperatorRole(someoneElse, artist) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:585](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L585) +[src/nevermined/api/nfts/NFT721Api.ts:584](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L584) --- ### isApprovedForAll -▸ **isApprovedForAll**(`operatorAddress`, `from`): `Promise`<`unknown`\> +▸ **isApprovedForAll**(`operatorAddress`, `from`): `Promise`\<`unknown`\> Returns if the `operatorAddress` is approved @@ -842,7 +981,7 @@ Returns if the `operatorAddress` is approved #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> Boolean saying if the `operatorAddress` is approved @@ -858,13 +997,13 @@ await nevermined.nfts721.isApprovedForAll(someoneElse, artist.getId()) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:490](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L490) +[src/nevermined/api/nfts/NFT721Api.ts:490](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L490) --- ### isOperator -▸ **isOperator**(`nftContractAddress`, `operatorAddress`, `ercType?`): `Promise`<`boolean`\> +▸ **isOperator**(`nftContractAddress`, `operatorAddress`, `ercType?`): `Promise`\<`boolean`\> Check if a particular address is the operator of given a NFT address. @@ -878,7 +1017,7 @@ Check if a particular address is the operator of given a NFT address. #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> operator status of address as a boolean @@ -888,28 +1027,28 @@ operator status of address as a boolean #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:116](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L116) +[src/nevermined/api/nfts/NFTsBaseApi.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L118) --- ### isOperatorOfDID -▸ **isOperatorOfDID**(`did`, `address`): `Promise`<`boolean`\> +▸ **isOperatorOfDID**(`did`, `address`): `Promise`\<`boolean`\> -Check if a particular address is the operator of a DID. +It checks if an address is an operator of the NFT associated to the asset #### Parameters -| Name | Type | Description | -| :-------- | :------- | :-------------------------------------- | -| `did` | `string` | The DID of the NFT to check | -| `address` | `string` | The address to check if operator status | +| Name | Type | Description | +| :-------- | :------- | :--------------------------------------------- | +| `did` | `string` | The Decentralized identifier of the NFT asset. | +| `address` | `string` | The address to check if operator status | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> -operator status of address as a boolean +true if the address is an operator of the NFT #### Inherited from @@ -917,13 +1056,13 @@ operator status of address as a boolean #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:643](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L643) +[src/nevermined/api/nfts/NFT721Api.ts:648](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L648) --- ### list -▸ **list**(`did`, `list`, `publisher`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **list**(`did`, `list`, `from`, `publishMetadata?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset allowing to list or unlist it. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. In a Nevermined environment, when an asset is unlisted, it is not possible to be found and accessed by any user. @@ -934,13 +1073,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be | :---------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `list` | `boolean` | `undefined` | Needs the asset to be listed or unlisted | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadata` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -950,13 +1089,13 @@ In a Nevermined environment, when an asset is unlisted, it is not possible to be #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:462](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L462) +[src/nevermined/api/RegistryBaseApi.ts:482](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L482) --- ### listOnSecondaryMarkets -▸ **listOnSecondaryMarkets**(`ddo`, `assetPrice`, `nftAmount`, `nftTransfer`, `provider`, `token`, `owner`): `Promise`<`string`\> +▸ **listOnSecondaryMarkets**(`ddo`, `assetPrice`, `nftAmount`, `nftTransfer`, `provider`, `token`, `from`): `Promise`\<`string`\> After purchase re-list an NFT to enable secondary market sales. @@ -970,11 +1109,11 @@ After purchase re-list an NFT to enable secondary market sales. | `nftTransfer` | `boolean` | - | | `provider` | `string` | The address that will be the provider of the secondary sale. | | `token` | [`Token`](Token.md) | - | -| `owner` | [`Account`](Account.md) | The account of the current owner. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the current owner. | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> the agreementId of the secondary sale. @@ -1002,15 +1141,15 @@ Thrown if there is an error listing the NFT. #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:260](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L260) +[src/nevermined/api/nfts/NFTsBaseApi.ts:262](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L262) --- ### mint -▸ **mint**(`did`, `publisher`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **mint**(`did`, `from`, `txParams?`): `Promise`\<`any`\> -Mint NFTs associated with an asset. +It mints NFTs associated with an asset. This function can be called multiple times as long as the minting does not exceed the maximum cap set during creation. @@ -1019,14 +1158,14 @@ This function can be called multiple times as long as the minting does not excee | Name | Type | Description | | :---------- | :---------------------------------------------- | :--------------------------------------------- | | `did` | `string` | The Decentralized Identifier of the NFT asset. | -| `publisher` | [`Account`](Account.md) | The account of the minter | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the minter | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -1040,13 +1179,13 @@ await nevermined.nfts721.mint(ddo.id, artist) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:319](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L319) +[src/nevermined/api/nfts/NFT721Api.ts:324](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L324) --- ### mintWithURL -▸ **mintWithURL**(`to`, `did`, `url`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **mintWithURL**(`to`, `did`, `url`, `from`, `txParams?`): `Promise`\<`any`\> Mint NFTs associated with an asset allowing to specify some metadata @@ -1059,14 +1198,14 @@ This function can be called multiple times as long as the minting does not excee | `to` | `string` | The address receiving the NFT minted | | `did` | `string` | The Decentralized Identifier of the NFT asset. | | `url` | `string` | The URL with NFT metadata | -| `from?` | [`Account`](Account.md) | The account of the minter | +| `from` | [`NvmAccount`](NvmAccount.md) | The account of the minter | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -1080,13 +1219,13 @@ await nevermined.nfts721.mintWithURL(receiverAddress, ddo.id, nftMetadata, artis #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:367](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L367) +[src/nevermined/api/nfts/NFT721Api.ts:368](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L368) --- ### order -▸ **order**(`did`, `consumer`, `serviceReference?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **order**(`did`, `from`, `serviceReference?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> Order a NFT-721. @@ -1095,13 +1234,13 @@ Order a NFT-721. | Name | Type | Default value | Description | | :----------------- | :------------------------------------------------------------ | :------------ | :------------------------------------------------------------- | | `did` | `string` | `undefined` | The Decentralized Identifier of the NFT asset. | -| `consumer` | [`Account`](Account.md) | `undefined` | The account of the NFT buyer. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The account of the NFT buyer. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to order | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID. @@ -1122,29 +1261,29 @@ const agreementId = await nevermined.nfts721.order(ddo.id, collector) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:134](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L134) +[src/nevermined/api/nfts/NFT721Api.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L139) --- ### orderAsset -▸ **orderAsset**(`did`, `serviceReference`, `consumer`, `params?`): [`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +▸ **orderAsset**(`did`, `serviceReference`, `from`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> Start the purchase/order of an asset's service. Starts by signing the service agreement then sends the request to the publisher via the service endpoint (Node http service). #### Parameters -| Name | Type | Description | -| :----------------- | :------------------------------------------------------------ | :---------------- | -| `did` | `string` | Decentralized ID. | -| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | -| `consumer` | [`Account`](Account.md) | Consumer account. | -| `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - | +| Name | Type | Description | +| :----------------- | :------------------------------------------------------------ | :--------------------- | +| `did` | `string` | Decentralized ID. | +| `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | Service. | +| `from` | [`NvmAccount`](NvmAccount.md) | Consumer account. | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`OrderProgressStep`](../enums/OrderProgressStep.md), `string`\> The agreement ID. @@ -1154,13 +1293,13 @@ The agreement ID. #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:563](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L563) +[src/nevermined/api/RegistryBaseApi.ts:585](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L585) --- ### ownerOf -▸ **ownerOf**(`did`): `Promise`<`string`\> +▸ **ownerOf**(`did`): `Promise`\<`string`\> Gets the contract owner @@ -1172,14 +1311,14 @@ Gets the contract owner #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> Address of the contract owner **`Example`** ```ts -const nftContractOwner = new Account(await nevermined.nfts721.ownerOf()) +const nftContractOwner = new NvmAccount(await nevermined.nfts721.ownerOf()) ``` #### Inherited from @@ -1188,13 +1327,13 @@ const nftContractOwner = new Account(await nevermined.nfts721.ownerOf()) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:416](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L416) +[src/nevermined/api/nfts/NFT721Api.ts:417](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L417) --- ### ownerOfAsset -▸ **ownerOfAsset**(`did`): `Promise`<`string`\> +▸ **ownerOfAsset**(`did`): `Promise`\<`string`\> Given a DID it gets the owner of the NFT if that DID is used as tokenId @@ -1206,7 +1345,7 @@ Given a DID it gets the owner of the NFT if that DID is used as tokenId #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> The address of the NFT owner. @@ -1222,13 +1361,13 @@ const owner = await nevermined.nfts721.ownerOfAsset(ddo.id, nftTokenAddress) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:450](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L450) +[src/nevermined/api/nfts/NFT721Api.ts:451](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L451) --- ### ownerOfAssetByAgreement -▸ **ownerOfAssetByAgreement**(`did`, `agreementId`): `Promise`<`string`\> +▸ **ownerOfAssetByAgreement**(`did`, `agreementId`): `Promise`\<`string`\> Given a DID and an agreement id it gets the owner of the NFT @@ -1241,7 +1380,7 @@ Given a DID and an agreement id it gets the owner of the NFT #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> The address of the NFT owner. @@ -1257,15 +1396,15 @@ const owner = await nevermined.nfts721.ownerOfAssetByAgreement(ddo.id, agreement #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:468](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L468) +[src/nevermined/api/nfts/NFT721Api.ts:468](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L468) --- ### ownerOfTokenId -▸ **ownerOfTokenId**(`tokenId`): `Promise`<`string`\> +▸ **ownerOfTokenId**(`tokenId`): `Promise`\<`string`\> -Given some information, it gets the owner of the NFT +Given some information, it gets the public address of the asset owner #### Parameters @@ -1275,7 +1414,7 @@ Given some information, it gets the owner of the NFT #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> The address of the NFT owner. @@ -1291,13 +1430,13 @@ const owner = await nevermined.nfts721.ownerOfTokenId(tokenId) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:433](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L433) +[src/nevermined/api/nfts/NFT721Api.ts:434](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L434) --- ### registerNeverminedAsset -▸ `Protected` **registerNeverminedAsset**(`assetAttributes`, `publisher`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +▸ **registerNeverminedAsset**(`assetAttributes`, `from`, `publicationOptions`, `nftAttributes?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> It registers a new asset in a Nevermined network. This method is protected and not exposed via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, and `nfts` APIs. @@ -1307,14 +1446,14 @@ via the Nevermined APIs directly. It must accessed via the `assets`, `compute`, | Name | Type | Description | | :------------------- | :------------------------------------------------------ | :-------------------------------------------------------------------------------- | | `assetAttributes` | [`AssetAttributes`](AssetAttributes.md) | Attributes describing the asset | -| `publisher` | [`Account`](Account.md) | The account publishing the asset | +| `from` | [`NvmAccount`](NvmAccount.md) | The account publishing the asset | | `publicationOptions` | [`AssetPublicationOptions`](AssetPublicationOptions.md) | Allows to specify the publication options of the off-chain and the on-chain data. | | `nftAttributes?` | [`NFTAttributes`](NFTAttributes.md) | Attributes describing the NFT (ERC-721) associated to the asset | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`CreateProgressStep`](../enums/CreateProgressStep.md), [`DDO`](DDO.md)\> The metadata of the asset created (DDO) @@ -1328,13 +1467,13 @@ The metadata of the asset created (DDO) #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L42) +[src/nevermined/api/RegistryBaseApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L52) --- ### releaseRewards -▸ **releaseRewards**(`agreementId`, `did`, `publisher`, `serviceReference?`, `txParams?`): `Promise`<`boolean`\> +▸ **releaseRewards**(`agreementId`, `did`, `from`, `serviceReference?`, `txParams?`): `Promise`\<`boolean`\> Release the funds from escrow. @@ -1344,13 +1483,13 @@ Release the funds from escrow. | :----------------- | :------------------------------------------------------------ | :------------ | :----------------------------------------------------------------------- | | `agreementId` | `string` | `undefined` | The NFT sales agreement id. | | `did` | `string` | `undefined` | The Decentralized identifier of the NFT asset. | -| `publisher` | [`Account`](Account.md) | `undefined` | The current owner of the NFTs. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The current owner of the NFTs. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to release rewards | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the funds release was successful. @@ -1375,13 +1514,13 @@ Thrown if there is an error releasing the rewards. #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:277](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L277) +[src/nevermined/api/nfts/NFT721Api.ts:283](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L283) --- ### releaseSecondaryMarketRewards -▸ **releaseSecondaryMarketRewards**(`owner`, `account`, `agreementIdSeed`, `txParams?`): `Promise`<`boolean`\> +▸ **releaseSecondaryMarketRewards**(`owner`, `account`, `agreementIdSeed`, `txParams?`): `Promise`\<`boolean`\> Used to release the secondary market NFT & the locked rewards. @@ -1389,14 +1528,14 @@ Used to release the secondary market NFT & the locked rewards. | Name | Type | Description | | :---------------- | :---------------------------------------------- | :---------------------------------------------------------------- | -| `owner` | [`Account`](Account.md) | The owner account. | -| `account` | [`Account`](Account.md) | Account of the user sending the transaction | +| `owner` | [`NvmAccount`](NvmAccount.md) | The owner account. | +| `account` | [`NvmAccount`](NvmAccount.md) | Account of the user sending the transaction | | `agreementIdSeed` | `string` | the seed of the Agreement Id of the underlying service agreement. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transaction was successful. @@ -1417,15 +1556,16 @@ Thrown if there is an error releasing the rewards. #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:529](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L529) +[src/nevermined/api/nfts/NFT721Api.ts:529](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L529) --- ### resolveAsset -▸ `Protected` **resolveAsset**(`did`, `policy?`): `Promise`<[`DDO`](DDO.md)\> +▸ **resolveAsset**(`did`, `policy?`): `Promise`\<[`DDO`](DDO.md)\> -Returns a DDO by DID. Depending of the resolution policy it prioritize the Metadata API or Immutable urls. +Given an asset DID it returns the metadata of that asset represented by a DDO object. +Depending of the resolution policy it prioritize fetching that Metadata from the Marketplace API or Immutable urls (like IPFS). #### Parameters @@ -1436,7 +1576,7 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Returns -`Promise`<[`DDO`](DDO.md)\> +`Promise`\<[`DDO`](DDO.md)\> [DDO](DDO.md) @@ -1446,13 +1586,13 @@ Returns a DDO by DID. Depending of the resolution policy it prioritize the Metad #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:310](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L310) +[src/nevermined/api/RegistryBaseApi.ts:324](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L324) --- ### revokeOperatorRole -▸ **revokeOperatorRole**(`operatorAddress`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **revokeOperatorRole**(`operatorAddress`, `from`, `txParams?`): `Promise`\<`any`\> Revokes a minter (`operatorAddress`) of the NFT Contract. Granting and revoking minting permissions only can be done by the NFT Contract owner @@ -1462,14 +1602,14 @@ Granting and revoking minting permissions only can be done by the NFT Contract o | Name | Type | Description | | :---------------- | :---------------------------------------------- | :----------------------------------------------------------------------- | | `operatorAddress` | `string` | The address of the account to be revoked as operator in the NFT Contract | -| `from?` | [`Account`](Account.md) | The account revoking operator permissions | +| `from` | [`NvmAccount`](NvmAccount.md) | The account revoking operator permissions | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -1483,13 +1623,13 @@ await nevermined.nfts721.revokeOperatorRole(someoneElse, artist) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:611](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L611) +[src/nevermined/api/nfts/NFT721Api.ts:610](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L610) --- ### setApprovalForAll -▸ **setApprovalForAll**(`target`, `approved`, `from`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **setApprovalForAll**(`target`, `approved`, `from`, `txParams?`): `Promise`\<`any`\> Enable or disable NFT permissions for an operator. @@ -1499,14 +1639,14 @@ Enable or disable NFT permissions for an operator. | :---------- | :---------------------------------------------- | :------------------------------------------------------------------- | | `target` | `string` | The address that of the operator we want to give transfer rights to. | | `approved` | `boolean` | Give or remove transfer rights from the operator. | -| `from` | [`Account`](Account.md) | The account that wants to give transfer rights to the operator. | +| `from` | [`NvmAccount`](NvmAccount.md) | The account that wants to give transfer rights to the operator. | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Optional transaction parameters. | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> -The ethers.ContractTransactionReceipt +The TransactionReceipt **`Example`** @@ -1520,13 +1660,13 @@ await nevermined.nfts721.setApprovalForAll(someoneElse, true, artist) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:395](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L395) +[src/nevermined/api/nfts/NFT721Api.ts:396](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L396) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -1544,15 +1684,16 @@ await nevermined.nfts721.setApprovalForAll(someoneElse, true, artist) #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### transfer -▸ **transfer**(`agreementId`, `did`, `publisher`, `serviceReference?`, `txParams?`): `Promise`<`boolean`\> +▸ **transfer**(`agreementId`, `did`, `from`, `serviceReference?`, `txParams?`): `Promise`\<`boolean`\> -Transfer NFT-721 to the consumer. +It transfers NFT-721 to the consumer. +This method only will work if called by the owner of the asset or a provider. #### Parameters @@ -1560,13 +1701,13 @@ Transfer NFT-721 to the consumer. | :----------------- | :------------------------------------------------------------ | :------------ | :---------------------------------------------------------------- | | `agreementId` | `string` | `undefined` | The NFT sales agreement id. | | `did` | `string` | `undefined` | The Decentralized identifier of the NFT asset. | -| `publisher` | [`Account`](Account.md) | `undefined` | The current owner of the NFTs. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The current owner of the NFTs. | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | `'nft-sales'` | The reference to identify wich service within the DDO to transfer | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters. | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the transfer was successful. @@ -1592,13 +1733,13 @@ Thrown if there is an error transferring the NFT #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:226](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L226) +[src/nevermined/api/nfts/NFT721Api.ts:232](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L232) --- ### updateAsset -▸ `Protected` **updateAsset**(`did`, `metadata`, `publisher`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +▸ **updateAsset**(`did`, `metadata`, `from`, `publishMetadataOptions?`, `txParams?`): [`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> Given a DID, updates the metadata associated to the asset. It also can upload this metadata to a remote decentralized stored depending on the `publishMetadata` parameter. @@ -1608,13 +1749,13 @@ Given a DID, updates the metadata associated to the asset. It also can upload th | :----------------------- | :------------------------------------------------------------- | :--------------------------------------- | :------------------------------------------------------------------------------- | | `did` | `string` | `undefined` | Decentralized ID representing the unique id of an asset in a Nevermined network. | | `metadata` | [`MetaData`](../interfaces/MetaData.md) | `undefined` | Metadata describing the asset | -| `publisher` | [`Account`](Account.md) | `undefined` | Account of the user updating the metadata | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account of the user updating the metadata | | `publishMetadataOptions` | [`PublishMetadataOptions`](../enums/PublishMetadataOptions.md) | `PublishMetadataOptions.OnlyMetadataAPI` | It allows to specify where to store the metadata | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Optional transaction parameters | #### Returns -[`SubscribablePromise`](SubscribablePromise.md)<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> +[`SubscribablePromise`](SubscribablePromise.md)\<[`UpdateProgressStep`](../enums/UpdateProgressStep.md), [`DDO`](DDO.md)\> [DDO](DDO.md) The DDO updated @@ -1624,36 +1765,40 @@ Given a DID, updates the metadata associated to the asset. It also can upload th #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:353](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L353) +[src/nevermined/api/RegistryBaseApi.ts:367](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L367) --- ### deployInstance -▸ `Static` **deployInstance**(`config`, `contractABI`, `from`, `args?`): `Promise`<[`SubscriptionNFTApi`](SubscriptionNFTApi.md)\> +▸ **deployInstance**(`config`, `contractABI`, `from`, `args?`): `Promise`\<[`SubscriptionNFTApi`](SubscriptionNFTApi.md)\> + +It deploys a new instance of the Subscription NFT (ERC-721) contract #### Parameters -| Name | Type | Default value | -| :------------ | :------------------------------------------ | :------------ | -| `config` | [`NeverminedOptions`](NeverminedOptions.md) | `undefined` | -| `contractABI` | `any` | `undefined` | -| `from` | [`Account`](Account.md) | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | Default value | Description | +| :------------ | :------------------------------------------ | :------------ | :--------------------------------------------------------------- | +| `config` | [`NeverminedOptions`](NeverminedOptions.md) | `undefined` | The Nevermined config | +| `contractABI` | `any` | `undefined` | The ABI of the Subscription NFT Contract | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | The account that will deploy the contract | +| `args` | `never`[] | `[]` | The list of arguments passed to the contract when is initialized | #### Returns -`Promise`<[`SubscriptionNFTApi`](SubscriptionNFTApi.md)\> +`Promise`\<[`SubscriptionNFTApi`](SubscriptionNFTApi.md)\> + +The Subscription NFT API instance [SubscriptionNFTApi](SubscriptionNFTApi.md). #### Defined in -[src/nevermined/api/nfts/SubscriptionNFTApi.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/SubscriptionNFTApi.ts#L25) +[src/nevermined/api/nfts/SubscriptionNFTApi.ts:45](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/SubscriptionNFTApi.ts#L45) --- ### getInstance -▸ `Static` **getInstance**(`config`, `nftContractAddress`): `Promise`<[`NFT721Api`](NFT721Api.md)\> +▸ **getInstance**(`config`, `nftContractAddress`): `Promise`\<[`NFT721Api`](NFT721Api.md)\> Create a new Nevermined NFTs (ERC-721) instance allowing to interact with that kind of NFTs. @@ -1666,7 +1811,7 @@ Create a new Nevermined NFTs (ERC-721) instance allowing to interact with that k #### Returns -`Promise`<[`NFT721Api`](NFT721Api.md)\> +`Promise`\<[`NFT721Api`](NFT721Api.md)\> The NFTs 721 API instance [NFT721Api](NFT721Api.md). @@ -1682,35 +1827,39 @@ nfts721 = await Nft721Api.getInstance(instanceConfig, nftContractAddress) #### Defined in -[src/nevermined/api/nfts/NFT721Api.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFT721Api.ts#L39) +[src/nevermined/api/nfts/NFT721Api.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFT721Api.ts#L44) --- ### getInstanceUsingABI -▸ `Static` **getInstanceUsingABI**(`config`, `nftContractAddress`, `solidityABI`): `Promise`<[`SubscriptionNFTApi`](SubscriptionNFTApi.md)\> +▸ **getInstanceUsingABI**(`config`, `nftContractAddress`, `solidityABI`): `Promise`\<[`SubscriptionNFTApi`](SubscriptionNFTApi.md)\> + +It gets a Subscription NFT (ERC-721) instance #### Parameters -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | -| `nftContractAddress` | `string` | -| `solidityABI` | `any` | +| Name | Type | Description | +| :------------------- | :---------------------------------------------------------- | :------------------------------------------------------------------------------------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | The Nevermined config | +| `nftContractAddress` | `string` | If the Subscription NFT Contract is deployed in an address it will connect to that contract | +| `solidityABI` | `any` | The ABI of the Contract | #### Returns -`Promise`<[`SubscriptionNFTApi`](SubscriptionNFTApi.md)\> +`Promise`\<[`SubscriptionNFTApi`](SubscriptionNFTApi.md)\> + +The Subscription NFT API instance [SubscriptionNFTApi](SubscriptionNFTApi.md). #### Defined in -[src/nevermined/api/nfts/SubscriptionNFTApi.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/SubscriptionNFTApi.ts#L8) +[src/nevermined/api/nfts/SubscriptionNFTApi.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/SubscriptionNFTApi.ts#L20) --- ### getNFTContractAddress -▸ `Static` **getNFTContractAddress**(`ddo`, `serviceReference?`): `any` +▸ **getNFTContractAddress**(`ddo`, `serviceReference?`): `any` Gets the NFT contract address associated with a Nevermined asset from the DDO. @@ -1739,13 +1888,13 @@ const nftContractAddress = NFT1155Api.getNFTContractAddress(ddo) #### Defined in -[src/nevermined/api/nfts/NFTsBaseApi.ts:219](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/nfts/NFTsBaseApi.ts#L219) +[src/nevermined/api/nfts/NFTsBaseApi.ts:221](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/nfts/NFTsBaseApi.ts#L221) --- ### getServicePlugin -▸ `Static` `Protected` **getServicePlugin**(`config`): `Object` +▸ **getServicePlugin**(`config`): `Object` Initializes the default Nevermined service plugins and return that instance @@ -1761,13 +1910,12 @@ Initializes the default Nevermined service plugins and return that instance The Nevermined Service Plugin instance -| Name | Type | -| :------------ | :------------------------------------------------------------------------------------------------------------ | -| `aave-credit` | [`ServicePlugin`](../interfaces/ServicePlugin.md)<[`ServiceAaveCredit`](../interfaces/ServiceAaveCredit.md)\> | -| `access` | [`AccessService`](AccessService.md) | -| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | -| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | -| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | +| Name | Type | +| :----------- | :-------------------------------------------------------------------- | +| `access` | [`AccessService`](AccessService.md) | +| `compute` | [`EscrowComputeExecutionTemplate`](EscrowComputeExecutionTemplate.md) | +| `nft-access` | [`NFTAccessService`](NFTAccessService.md) | +| `nft-sales` | [`NFTSalesService`](NFTSalesService.md) | #### Inherited from @@ -1775,13 +1923,13 @@ The Nevermined Service Plugin instance #### Defined in -[src/nevermined/api/RegistryBaseApi.ts:618](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/RegistryBaseApi.ts#L618) +[src/nevermined/api/RegistryBaseApi.ts:640](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/RegistryBaseApi.ts#L640) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1806,4 +1954,4 @@ The Nevermined Service Plugin instance #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/TemplateStoreManager.md b/docs/api-reference/classes/TemplateStoreManager.md index ee5b88feb..514d8f794 100644 --- a/docs/api-reference/classes/TemplateStoreManager.md +++ b/docs/api-reference/classes/TemplateStoreManager.md @@ -26,23 +26,24 @@ - [artifactsFolder](TemplateStoreManager.md#artifactsfolder) - [circuitsFolder](TemplateStoreManager.md#circuitsfolder) +- [client](TemplateStoreManager.md#client) - [config](TemplateStoreManager.md#config) - [instanceConfig](TemplateStoreManager.md#instanceconfig) - [instantiableConfig](TemplateStoreManager.md#instantiableconfig) - [logger](TemplateStoreManager.md#logger) - [nevermined](TemplateStoreManager.md#nevermined) -- [web3](TemplateStoreManager.md#web3) +- [publicClient](TemplateStoreManager.md#publicclient) +- [walletClient](TemplateStoreManager.md#walletclient) ### Methods - [approveTemplate](TemplateStoreManager.md#approvetemplate) - [call](TemplateStoreManager.md#call) - [getFromAddress](TemplateStoreManager.md#getfromaddress) -- [getInputsOfMethod](TemplateStoreManager.md#getinputsofmethod) - [getListSize](TemplateStoreManager.md#getlistsize) - [getOwner](TemplateStoreManager.md#getowner) -- [getSignatureOfMethod](TemplateStoreManager.md#getsignatureofmethod) - [getTemplate](TemplateStoreManager.md#gettemplate) +- [getTransactionLogs](TemplateStoreManager.md#gettransactionlogs) - [init](TemplateStoreManager.md#init) - [isApproved](TemplateStoreManager.md#isapproved) - [proposeTemplate](TemplateStoreManager.md#proposetemplate) @@ -50,6 +51,7 @@ - [send](TemplateStoreManager.md#send) - [sendFrom](TemplateStoreManager.md#sendfrom) - [setInstanceConfig](TemplateStoreManager.md#setinstanceconfig) +- [someLog](TemplateStoreManager.md#somelog) - [getInstance](TemplateStoreManager.md#getinstance) - [setInstanceConfig](TemplateStoreManager.md#setinstanceconfig-1) @@ -57,7 +59,7 @@ ### constructor -• **new TemplateStoreManager**(`contractName`) +• **new TemplateStoreManager**(`contractName`): [`TemplateStoreManager`](TemplateStoreManager.md) #### Parameters @@ -65,19 +67,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`TemplateStoreManager`](TemplateStoreManager.md) + #### Inherited from [ContractBase](ContractBase.md).[constructor](ContractBase.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -85,13 +91,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -99,7 +105,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -113,13 +119,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -127,7 +133,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -141,17 +147,17 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -159,17 +165,17 @@ ContractBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -177,13 +183,31 @@ ContractBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ContractBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -195,13 +219,13 @@ ContractBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -213,17 +237,17 @@ ContractBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -231,13 +255,13 @@ ContractBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -249,13 +273,13 @@ ContractBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -267,54 +291,169 @@ ContractBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +ContractBase.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -ContractBase.web3 +ContractBase.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### approveTemplate -▸ **approveTemplate**(`address`, `from?`, `ignoreApproved?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **approveTemplate**(`address`, `from`, `ignoreApproved?`, `txParams?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :---------------- | :---------------------------------------------- | | `address` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `ignoreApproved?` | `boolean` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L50) +[src/keeper/contracts/managers/TemplateStoreManager.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L51) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -324,15 +463,15 @@ ContractBase.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -340,13 +479,13 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -356,7 +495,7 @@ ContractBase.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -364,121 +503,98 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ContractBase](ContractBase.md).[getInputsOfMethod](ContractBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- ### getListSize -▸ **getListSize**(): `Promise`<`unknown`\> +▸ **getListSize**(): `Promise`\<`unknown`\> #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:85](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L85) +[src/keeper/contracts/managers/TemplateStoreManager.ts:86](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L86) --- ### getOwner -▸ **getOwner**(): `Promise`<`string`\> +▸ **getOwner**(): `Promise`\<`string`\> #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L29) +[src/keeper/contracts/managers/TemplateStoreManager.ts:30](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L30) --- -### getSignatureOfMethod +### getTemplate -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTemplate**(`templateId`): `Promise`\<[`TemplateMetadata`](../interfaces/TemplateMetadata.md)\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :----------- | :------- | +| `templateId` | `string` | #### Returns -`string` - -#### Inherited from - -[ContractBase](ContractBase.md).[getSignatureOfMethod](ContractBase.md#getsignatureofmethod) +`Promise`\<[`TemplateMetadata`](../interfaces/TemplateMetadata.md)\> #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/managers/TemplateStoreManager.ts:72](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L72) --- -### getTemplate +### getTransactionLogs -▸ **getTemplate**(`templateId`): `Promise`<[`TemplateMetadata`](../interfaces/TemplateMetadata.md)\> +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | -| :----------- | :------- | -| `templateId` | `string` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`Promise`<[`TemplateMetadata`](../interfaces/TemplateMetadata.md)\> +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> + +#### Inherited from + +[ContractBase](ContractBase.md).[getTransactionLogs](ContractBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:71](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L71) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -486,13 +602,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### isApproved -▸ **isApproved**(`templateId`): `Promise`<`boolean`\> +▸ **isApproved**(`templateId`): `Promise`\<`boolean`\> #### Parameters @@ -502,75 +618,75 @@ readonly `ParamType`[] #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L81) +[src/keeper/contracts/managers/TemplateStoreManager.ts:82](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L82) --- ### proposeTemplate -▸ **proposeTemplate**(`address`, `from?`, `ignoreExists?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **proposeTemplate**(`address`, `from`, `ignoreExists?`, `txParams?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :-------------- | :---------------------------------------------- | | `address` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `ignoreExists?` | `boolean` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L33) +[src/keeper/contracts/managers/TemplateStoreManager.ts:34](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L34) --- ### revokeTemplate -▸ **revokeTemplate**(`address`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **revokeTemplate**(`address`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :---------- | :---------------------------------------------- | | `address` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:67](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L67) +[src/keeper/contracts/managers/TemplateStoreManager.ts:68](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L68) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -578,26 +694,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -605,13 +721,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -629,13 +745,37 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[ContractBase](ContractBase.md).[someLog](ContractBase.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`TemplateStoreManager`](TemplateStoreManager.md)\> +▸ **getInstance**(`config`): `Promise`\<[`TemplateStoreManager`](TemplateStoreManager.md)\> #### Parameters @@ -645,7 +785,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`TemplateStoreManager`](TemplateStoreManager.md)\> +`Promise`\<[`TemplateStoreManager`](TemplateStoreManager.md)\> #### Overrides @@ -653,13 +793,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L21) +[src/keeper/contracts/managers/TemplateStoreManager.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L22) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -684,4 +824,4 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/Token.md b/docs/api-reference/classes/Token.md index c0445f7ca..047a938e6 100644 --- a/docs/api-reference/classes/Token.md +++ b/docs/api-reference/classes/Token.md @@ -29,12 +29,14 @@ - [artifactsFolder](Token.md#artifactsfolder) - [circuitsFolder](Token.md#circuitsfolder) +- [client](Token.md#client) - [config](Token.md#config) - [instanceConfig](Token.md#instanceconfig) - [instantiableConfig](Token.md#instantiableconfig) - [logger](Token.md#logger) - [nevermined](Token.md#nevermined) -- [web3](Token.md#web3) +- [publicClient](Token.md#publicclient) +- [walletClient](Token.md#walletclient) ### Methods @@ -44,13 +46,13 @@ - [call](Token.md#call) - [decimals](Token.md#decimals) - [getFromAddress](Token.md#getfromaddress) -- [getInputsOfMethod](Token.md#getinputsofmethod) -- [getSignatureOfMethod](Token.md#getsignatureofmethod) +- [getTransactionLogs](Token.md#gettransactionlogs) - [init](Token.md#init) - [name](Token.md#name) - [send](Token.md#send) - [sendFrom](Token.md#sendfrom) - [setInstanceConfig](Token.md#setinstanceconfig) +- [someLog](Token.md#somelog) - [strBalanceOf](Token.md#strbalanceof) - [symbol](Token.md#symbol) - [totalSupply](Token.md#totalsupply) @@ -62,7 +64,7 @@ ### constructor -• **new Token**(`contractName`) +• **new Token**(`contractName`): [`Token`](Token.md) #### Parameters @@ -70,19 +72,23 @@ | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`Token`](Token.md) + #### Inherited from [ContractBase](ContractBase.md).[constructor](ContractBase.md#constructor) #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from @@ -90,13 +96,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from @@ -104,7 +110,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -118,13 +124,13 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from @@ -132,7 +138,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -146,7 +152,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) --- @@ -156,17 +162,17 @@ #### Defined in -[src/keeper/contracts/Token.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L7) +[src/keeper/contracts/Token.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L8) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -174,17 +180,17 @@ ContractBase.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -192,13 +198,31 @@ ContractBase.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ContractBase.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -210,13 +234,13 @@ ContractBase.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -228,17 +252,17 @@ ContractBase.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -246,13 +270,13 @@ ContractBase.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -264,13 +288,13 @@ ContractBase.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -282,31 +306,146 @@ ContractBase.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ContractBase.web3 +ContractBase.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ContractBase.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### approve -▸ **approve**(`to`, `price`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **approve**(`to`, `price`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -314,22 +453,22 @@ ContractBase.web3 | :---------- | :---------------------------------------------- | | `to` | `string` | | `price` | `bigint` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/Token.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L27) +[src/keeper/contracts/Token.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L28) --- ### balanceOf -▸ **balanceOf**(`address`): `Promise`<`bigint`\> +▸ **balanceOf**(`address`): `Promise`\<`bigint`\> #### Parameters @@ -339,17 +478,17 @@ ContractBase.web3 #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> #### Defined in -[src/keeper/contracts/Token.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L43) +[src/keeper/contracts/Token.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L44) --- ### balanceOfConverted -▸ **balanceOfConverted**(`address`): `Promise`<`bigint`\> +▸ **balanceOfConverted**(`address`): `Promise`\<`bigint`\> #### Parameters @@ -359,17 +498,17 @@ ContractBase.web3 #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> #### Defined in -[src/keeper/contracts/Token.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L35) +[src/keeper/contracts/Token.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L36) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -379,15 +518,15 @@ ContractBase.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from @@ -395,27 +534,27 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### decimals -▸ **decimals**(): `Promise`<`number`\> +▸ **decimals**(): `Promise`\<`number`\> #### Returns -`Promise`<`number`\> +`Promise`\<`number`\> #### Defined in -[src/keeper/contracts/Token.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L31) +[src/keeper/contracts/Token.ts:32](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L32) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -425,7 +564,7 @@ ContractBase.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from @@ -433,73 +572,50 @@ ContractBase.web3 #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] - -#### Inherited from - -[ContractBase](ContractBase.md).[getInputsOfMethod](ContractBase.md#getinputsofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ContractBase](ContractBase.md).[getSignatureOfMethod](ContractBase.md#getsignatureofmethod) +[ContractBase](ContractBase.md).[getTransactionLogs](ContractBase.md#gettransactionlogs) #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from @@ -507,40 +623,40 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### name -▸ **name**(): `Promise`<`string`\> +▸ **name**(): `Promise`\<`string`\> #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/Token.ts:51](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L51) +[src/keeper/contracts/Token.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L52) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -548,26 +664,26 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from @@ -575,13 +691,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -599,13 +715,37 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +[ContractBase](ContractBase.md).[someLog](ContractBase.md#somelog) + +#### Defined in + +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### strBalanceOf -▸ **strBalanceOf**(`address`): `Promise`<`string`\> +▸ **strBalanceOf**(`address`): `Promise`\<`string`\> #### Parameters @@ -615,45 +755,45 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/Token.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L39) +[src/keeper/contracts/Token.ts:40](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L40) --- ### symbol -▸ **symbol**(): `Promise`<`string`\> +▸ **symbol**(): `Promise`\<`string`\> #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/Token.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L47) +[src/keeper/contracts/Token.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L48) --- ### totalSupply -▸ **totalSupply**(): `Promise`<`bigint`\> +▸ **totalSupply**(): `Promise`\<`bigint`\> #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> #### Defined in -[src/keeper/contracts/Token.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L55) +[src/keeper/contracts/Token.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L56) --- ### transfer -▸ **transfer**(`to`, `amount`, `from`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **transfer**(`to`, `amount`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters @@ -661,22 +801,22 @@ readonly `ParamType`[] | :---------- | :---------------------------------------------- | | `to` | `string` | | `amount` | `bigint` | -| `from` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Defined in -[src/keeper/contracts/Token.ts:59](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L59) +[src/keeper/contracts/Token.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L60) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`Token`](Token.md)\> +▸ **getInstance**(`config`): `Promise`\<[`Token`](Token.md)\> #### Parameters @@ -686,7 +826,7 @@ readonly `ParamType`[] #### Returns -`Promise`<[`Token`](Token.md)\> +`Promise`\<[`Token`](Token.md)\> #### Overrides @@ -694,13 +834,13 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/Token.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Token.ts#L21) +[src/keeper/contracts/Token.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Token.ts#L22) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -725,4 +865,4 @@ readonly `ParamType`[] #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/TokenUtils.md b/docs/api-reference/classes/TokenUtils.md index d6a4fe2a0..58d43615c 100644 --- a/docs/api-reference/classes/TokenUtils.md +++ b/docs/api-reference/classes/TokenUtils.md @@ -20,12 +20,14 @@ Tokens submodule of Nevermined. - [artifactsFolder](TokenUtils.md#artifactsfolder) - [circuitsFolder](TokenUtils.md#circuitsfolder) +- [client](TokenUtils.md#client) - [config](TokenUtils.md#config) - [instanceConfig](TokenUtils.md#instanceconfig) - [instantiableConfig](TokenUtils.md#instantiableconfig) - [logger](TokenUtils.md#logger) - [nevermined](TokenUtils.md#nevermined) -- [web3](TokenUtils.md#web3) +- [publicClient](TokenUtils.md#publicclient) +- [walletClient](TokenUtils.md#walletclient) ### Methods @@ -43,7 +45,7 @@ Tokens submodule of Nevermined. ### constructor -• **new TokenUtils**(`config`) +• **new TokenUtils**(`config`): [`TokenUtils`](TokenUtils.md) #### Parameters @@ -51,23 +53,27 @@ Tokens submodule of Nevermined. | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | +#### Returns + +[`TokenUtils`](TokenUtils.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/Token.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Token.ts#L9) +[src/nevermined/Token.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Token.ts#L9) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -75,17 +81,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -93,13 +99,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -111,13 +135,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -129,17 +153,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -147,13 +171,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -165,13 +189,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -183,25 +207,140 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods @@ -215,61 +354,61 @@ Instantiable.web3 #### Defined in -[src/nevermined/Token.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Token.ts#L30) +[src/nevermined/Token.ts:30](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Token.ts#L30) --- ### getName -▸ **getName**(): `Promise`<`string`\> +▸ **getName**(): `Promise`\<`string`\> Get token name. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/Token.ts:37](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Token.ts#L37) +[src/nevermined/Token.ts:37](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Token.ts#L37) --- ### getSymbol -▸ **getSymbol**(): `Promise`<`string`\> +▸ **getSymbol**(): `Promise`\<`string`\> Get token symbol. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/Token.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Token.ts#L26) +[src/nevermined/Token.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Token.ts#L26) --- ### getTotalSupply -▸ **getTotalSupply**(): `Promise`<`bigint`\> +▸ **getTotalSupply**(): `Promise`\<`bigint`\> Get token total supply #### Returns -`Promise`<`bigint`\> +`Promise`\<`bigint`\> #### Defined in -[src/nevermined/Token.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Token.ts#L44) +[src/nevermined/Token.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Token.ts#L44) --- ### request -▸ **request**(`account`, `amount`, `params?`): `Promise`<`boolean`\> +▸ **request**(`account`, `amount`, `params?`): `Promise`\<`boolean`\> Request tokens for an account. @@ -277,25 +416,25 @@ Request tokens for an account. | Name | Type | Description | | :-------- | :---------------------------------------------- | :---------------- | -| `account` | [`Account`](Account.md) | Account instance. | -| `amount` | `number` | Token amount. | +| `account` | [`NvmAccount`](NvmAccount.md) | Account instance. | +| `amount` | `bigint` | Token amount. | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | - | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> true if the call succeeded, false otherwise #### Defined in -[src/nevermined/Token.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Token.ts#L73) +[src/nevermined/Token.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Token.ts#L73) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -313,13 +452,13 @@ true if the call succeeded, false otherwise #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### transfer -▸ **transfer**(`to`, `amount`, `from`, `txParams?`): `Promise`<`boolean`\> +▸ **transfer**(`to`, `amount`, `from`, `txParams?`): `Promise`\<`boolean`\> Transfer a number of tokens to the mentioned account. @@ -329,24 +468,24 @@ Transfer a number of tokens to the mentioned account. | :---------- | :---------------------------------------------- | :-------------------------------- | | `to` | `string` | Address that receives the tokens. | | `amount` | `bigint` | Tokens to transfer. | -| `from` | [`Account`](Account.md) | Sender account address. | +| `from` | [`NvmAccount`](NvmAccount.md) | Sender account | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> True if the transfer succeeded. #### Defined in -[src/nevermined/Token.ts:56](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Token.ts#L56) +[src/nevermined/Token.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Token.ts#L56) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`TokenUtils`](TokenUtils.md)\> +▸ **getInstance**(`config`): `Promise`\<[`TokenUtils`](TokenUtils.md)\> Returns the instance of Token. @@ -358,7 +497,7 @@ Returns the instance of Token. #### Returns -`Promise`<[`TokenUtils`](TokenUtils.md)\> +`Promise`\<[`TokenUtils`](TokenUtils.md)\> [Token](Token.md) @@ -368,13 +507,13 @@ Returns the instance of Token. #### Defined in -[src/nevermined/Token.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Token.ts#L18) +[src/nevermined/Token.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Token.ts#L18) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -399,4 +538,4 @@ Returns the instance of Token. #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/TransferDIDOwnershipCondition.md b/docs/api-reference/classes/TransferDIDOwnershipCondition.md index 2a9300ab8..14b598e7c 100644 --- a/docs/api-reference/classes/TransferDIDOwnershipCondition.md +++ b/docs/api-reference/classes/TransferDIDOwnershipCondition.md @@ -6,7 +6,7 @@ Condition allowing to transfer the ownership between the original owner and a re ## Hierarchy -- [`ProviderCondition`](ProviderCondition.md)<`AccessConditionContext`\> +- `ProviderCondition`\<`AccessConditionContext`\> ↳ **`TransferDIDOwnershipCondition`** @@ -28,12 +28,14 @@ Condition allowing to transfer the ownership between the original owner and a re - [artifactsFolder](TransferDIDOwnershipCondition.md#artifactsfolder) - [circuitsFolder](TransferDIDOwnershipCondition.md#circuitsfolder) +- [client](TransferDIDOwnershipCondition.md#client) - [config](TransferDIDOwnershipCondition.md#config) - [instanceConfig](TransferDIDOwnershipCondition.md#instanceconfig) - [instantiableConfig](TransferDIDOwnershipCondition.md#instantiableconfig) - [logger](TransferDIDOwnershipCondition.md#logger) - [nevermined](TransferDIDOwnershipCondition.md#nevermined) -- [web3](TransferDIDOwnershipCondition.md#web3) +- [publicClient](TransferDIDOwnershipCondition.md#publicclient) +- [walletClient](TransferDIDOwnershipCondition.md#walletclient) ### Methods @@ -48,8 +50,7 @@ Condition allowing to transfer the ownership between the original owner and a re - [generateIdWithSeed](TransferDIDOwnershipCondition.md#generateidwithseed) - [getConditionFulfilledEvent](TransferDIDOwnershipCondition.md#getconditionfulfilledevent) - [getFromAddress](TransferDIDOwnershipCondition.md#getfromaddress) -- [getInputsOfMethod](TransferDIDOwnershipCondition.md#getinputsofmethod) -- [getSignatureOfMethod](TransferDIDOwnershipCondition.md#getsignatureofmethod) +- [getTransactionLogs](TransferDIDOwnershipCondition.md#gettransactionlogs) - [hashValues](TransferDIDOwnershipCondition.md#hashvalues) - [hashValuesPlain](TransferDIDOwnershipCondition.md#hashvaluesplain) - [init](TransferDIDOwnershipCondition.md#init) @@ -61,6 +62,7 @@ Condition allowing to transfer the ownership between the original owner and a re - [send](TransferDIDOwnershipCondition.md#send) - [sendFrom](TransferDIDOwnershipCondition.md#sendfrom) - [setInstanceConfig](TransferDIDOwnershipCondition.md#setinstanceconfig) +- [someLog](TransferDIDOwnershipCondition.md#somelog) - [getInstance](TransferDIDOwnershipCondition.md#getinstance) - [setInstanceConfig](TransferDIDOwnershipCondition.md#setinstanceconfig-1) @@ -68,7 +70,7 @@ Condition allowing to transfer the ownership between the original owner and a re ### constructor -• **new TransferDIDOwnershipCondition**(`contractName`) +• **new TransferDIDOwnershipCondition**(`contractName`): [`TransferDIDOwnershipCondition`](TransferDIDOwnershipCondition.md) #### Parameters @@ -76,41 +78,45 @@ Condition allowing to transfer the ownership between the original owner and a re | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`TransferDIDOwnershipCondition`](TransferDIDOwnershipCondition.md) + #### Inherited from -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) +ProviderCondition\.constructor #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) +ProviderCondition.address #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) +ProviderCondition.contract #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -120,25 +126,25 @@ Condition allowing to transfer the ownership between the original owner and a re #### Inherited from -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) +ProviderCondition.contractName #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) +ProviderCondition.events #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -148,21 +154,21 @@ Condition allowing to transfer the ownership between the original owner and a re #### Inherited from -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) +ProviderCondition.version #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -170,17 +176,17 @@ ProviderCondition.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -188,13 +194,31 @@ ProviderCondition.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ProviderCondition.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -206,13 +230,13 @@ ProviderCondition.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -224,17 +248,17 @@ ProviderCondition.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -242,13 +266,13 @@ ProviderCondition.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -260,13 +284,13 @@ ProviderCondition.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -278,57 +302,172 @@ ProviderCondition.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ProviderCondition.web3 +ProviderCondition.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ProviderCondition.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### abortByTimeOut -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **abortByTimeOut**(`conditionId`, `from`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :------------ | :---------------------------------------------- | | `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) +ProviderCondition.abortByTimeOut #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) +[src/keeper/contracts/conditions/Condition.abstract.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L75) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -338,29 +477,29 @@ ProviderCondition.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) +ProviderCondition.call #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### fulfill -▸ **fulfill**(`agreementId`, `did`, `receiver`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfill**(`agreementId`, `did`, `receiver`, `from`, `txParams?`): `Promise`\<`any`\> Fulfill the transfer DID ownership condition. @@ -371,12 +510,12 @@ Fulfill the transfer DID ownership condition. | `agreementId` | `string` | Agreement identifier. | | `did` | `string` | The Decentralized Identifier of the asset. | | `receiver` | `string` | The address of the granted user. | -| `from?` | [`Account`](Account.md) | Account fullfilling | +| `from` | [`NvmAccount`](NvmAccount.md) | Account fullfilling | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | Transaction parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Condition state. @@ -387,45 +526,45 @@ Fulfill method transfer full ownership permissions to the receiver address. #### Overrides -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) +ProviderCondition.fulfill #### Defined in -[src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts:53](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts#L53) +[src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts:53](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts#L53) --- ### fulfillInstance -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillInstance**(`cond`, `additionalParams`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | +| Name | Type | Default value | +| :----------------- | :-------------------------------------------------------- | :------------ | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | `undefined` | +| `additionalParams` | `Record`\<`string`, `unknown`\> | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | +| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) +ProviderCondition.fulfillInstance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) +[src/keeper/contracts/conditions/Condition.abstract.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L139) --- ### fulfillPlain -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillPlain**(`agreementId`, `args`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters @@ -433,54 +572,54 @@ Fulfill method transfer full ownership permissions to the receiver address. | :------------ | :-------------------------------------------------------- | :------------ | | `agreementId` | `string` | `undefined` | | `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | | `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) +ProviderCondition.fulfillPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) +[src/keeper/contracts/conditions/Condition.abstract.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L47) --- ### fulfillWithNode -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillWithNode**(`cond`, `additionalParams`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :----------------- | :----------------------------------------------------- | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | +| `additionalParams` | `Record`\<`string`, `unknown`\> | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) +ProviderCondition.fulfillWithNode #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) +[src/keeper/contracts/conditions/Condition.abstract.ts:183](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L183) --- ### generateId -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> +▸ **generateId**(`agreementId`, `valueHash`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -491,21 +630,21 @@ Fulfill method transfer full ownership permissions to the receiver address. #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) +ProviderCondition.generateId #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) +[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L61) --- ### generateIdHash -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> +▸ **generateIdHash**(`agreementId`, `...values`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -516,21 +655,21 @@ Fulfill method transfer full ownership permissions to the receiver address. #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) +ProviderCondition.generateIdHash #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) +[src/keeper/contracts/conditions/Condition.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L57) --- ### generateIdWithSeed -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> +▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`\<[`string`, `string`]\> #### Parameters @@ -541,15 +680,15 @@ Fulfill method transfer full ownership permissions to the receiver address. #### Returns -`Promise`<[`string`, `string`]\> +`Promise`\<[`string`, `string`]\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) +ProviderCondition.generateIdWithSeed #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) +[src/keeper/contracts/conditions/Condition.abstract.ts:65](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L65) --- @@ -569,17 +708,17 @@ Fulfill method transfer full ownership permissions to the receiver address. #### Inherited from -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) +ProviderCondition.getConditionFulfilledEvent #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) +[src/keeper/contracts/conditions/Condition.abstract.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L79) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -589,70 +728,46 @@ Fulfill method transfer full ownership permissions to the receiver address. #### Returns -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) +ProviderCondition.getFromAddress #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) +ProviderCondition.getTransactionLogs #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### hashValues -▸ **hashValues**(`...args`): `Promise`<`string`\> +▸ **hashValues**(`...args`): `Promise`\<`string`\> #### Parameters @@ -662,21 +777,21 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) +ProviderCondition.hashValues #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) +[src/keeper/contracts/conditions/Condition.abstract.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L116) --- ### hashValuesPlain -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> +▸ **hashValuesPlain**(`...args`): `Promise`\<`string`\> #### Parameters @@ -686,71 +801,72 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) +ProviderCondition.hashValuesPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) +[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L122) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) +ProviderCondition.init #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instance -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instance**(`agreementId`, `params`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | +| Name | Type | +| :------------ | :------------------------------------------------------- | +| `agreementId` | `string` | +| `params` | `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> | #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) +ProviderCondition.instance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) +[src/keeper/contracts/conditions/Condition.abstract.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L163) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -762,15 +878,15 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) +ProviderCondition.instanceFromDDO #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) +[src/keeper/contracts/conditions/Condition.abstract.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L131) --- @@ -784,17 +900,17 @@ readonly `ParamType`[] #### Inherited from -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) +ProviderCondition.nodeMethod #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L208) +[src/keeper/contracts/conditions/Condition.abstract.ts:200](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L200) --- ### params -▸ **params**(`did`, `receiver`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +▸ **params**(`did`, `receiver`): `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> Generates the hash of the condition inputs. @@ -807,23 +923,23 @@ Generates the hash of the condition inputs. #### Returns -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +`ConditionParameters`\<`Record`\<`string`, `unknown`\>\> Hash of all the values. #### Overrides -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) +ProviderCondition.params #### Defined in -[src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts#L31) +[src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts#L31) --- ### paramsFromDDO -▸ **paramsFromDDO**(`«destructured»`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +▸ **paramsFromDDO**(`«destructured»`): `Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -833,75 +949,75 @@ Hash of all the values. #### Returns -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Overrides -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) +ProviderCondition.paramsFromDDO #### Defined in -[src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts#L35) +[src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts#L35) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) +ProviderCondition.send #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) +ProviderCondition.sendFrom #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -915,17 +1031,41 @@ Hash of all the values. #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) +ProviderCondition.setInstanceConfig + +#### Defined in + +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +ProviderCondition.someLog #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`TransferDIDOwnershipCondition`](TransferDIDOwnershipCondition.md)\> +▸ **getInstance**(`config`): `Promise`\<[`TransferDIDOwnershipCondition`](TransferDIDOwnershipCondition.md)\> #### Parameters @@ -935,21 +1075,21 @@ Hash of all the values. #### Returns -`Promise`<[`TransferDIDOwnershipCondition`](TransferDIDOwnershipCondition.md)\> +`Promise`\<[`TransferDIDOwnershipCondition`](TransferDIDOwnershipCondition.md)\> #### Overrides -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) +ProviderCondition.getInstance #### Defined in -[src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts#L15) +[src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/TransferDIDOwnershipCondition.ts#L15) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -970,8 +1110,8 @@ Hash of all the values. #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) +ProviderCondition.setInstanceConfig #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/TransferNFT721Condition.md b/docs/api-reference/classes/TransferNFT721Condition.md index 6fc9ddc81..a5da136b8 100644 --- a/docs/api-reference/classes/TransferNFT721Condition.md +++ b/docs/api-reference/classes/TransferNFT721Condition.md @@ -6,7 +6,7 @@ Condition allowing to transfer an NFT between the original owner and a receiver ## Hierarchy -- [`ProviderCondition`](ProviderCondition.md)<`TransferNFT721ConditionContext`\> +- `ProviderCondition`\<`TransferNFT721ConditionContext`\> ↳ **`TransferNFT721Condition`** @@ -28,12 +28,14 @@ Condition allowing to transfer an NFT between the original owner and a receiver - [artifactsFolder](TransferNFT721Condition.md#artifactsfolder) - [circuitsFolder](TransferNFT721Condition.md#circuitsfolder) +- [client](TransferNFT721Condition.md#client) - [config](TransferNFT721Condition.md#config) - [instanceConfig](TransferNFT721Condition.md#instanceconfig) - [instantiableConfig](TransferNFT721Condition.md#instantiableconfig) - [logger](TransferNFT721Condition.md#logger) - [nevermined](TransferNFT721Condition.md#nevermined) -- [web3](TransferNFT721Condition.md#web3) +- [publicClient](TransferNFT721Condition.md#publicclient) +- [walletClient](TransferNFT721Condition.md#walletclient) ### Methods @@ -48,8 +50,7 @@ Condition allowing to transfer an NFT between the original owner and a receiver - [generateIdWithSeed](TransferNFT721Condition.md#generateidwithseed) - [getConditionFulfilledEvent](TransferNFT721Condition.md#getconditionfulfilledevent) - [getFromAddress](TransferNFT721Condition.md#getfromaddress) -- [getInputsOfMethod](TransferNFT721Condition.md#getinputsofmethod) -- [getSignatureOfMethod](TransferNFT721Condition.md#getsignatureofmethod) +- [getTransactionLogs](TransferNFT721Condition.md#gettransactionlogs) - [hashValues](TransferNFT721Condition.md#hashvalues) - [hashValuesPlain](TransferNFT721Condition.md#hashvaluesplain) - [init](TransferNFT721Condition.md#init) @@ -62,6 +63,7 @@ Condition allowing to transfer an NFT between the original owner and a receiver - [send](TransferNFT721Condition.md#send) - [sendFrom](TransferNFT721Condition.md#sendfrom) - [setInstanceConfig](TransferNFT721Condition.md#setinstanceconfig) +- [someLog](TransferNFT721Condition.md#somelog) - [getInstance](TransferNFT721Condition.md#getinstance) - [setInstanceConfig](TransferNFT721Condition.md#setinstanceconfig-1) @@ -69,7 +71,7 @@ Condition allowing to transfer an NFT between the original owner and a receiver ### constructor -• **new TransferNFT721Condition**(`contractName`) +• **new TransferNFT721Condition**(`contractName`): [`TransferNFT721Condition`](TransferNFT721Condition.md) #### Parameters @@ -77,41 +79,45 @@ Condition allowing to transfer an NFT between the original owner and a receiver | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`TransferNFT721Condition`](TransferNFT721Condition.md) + #### Inherited from -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) +ProviderCondition\.constructor #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) +ProviderCondition.address #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) +ProviderCondition.contract #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -121,25 +127,25 @@ Condition allowing to transfer an NFT between the original owner and a receiver #### Inherited from -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) +ProviderCondition.contractName #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) +ProviderCondition.events #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -149,21 +155,21 @@ Condition allowing to transfer an NFT between the original owner and a receiver #### Inherited from -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) +ProviderCondition.version #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -171,17 +177,17 @@ ProviderCondition.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -189,13 +195,31 @@ ProviderCondition.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ProviderCondition.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -207,13 +231,13 @@ ProviderCondition.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -225,17 +249,17 @@ ProviderCondition.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -243,13 +267,13 @@ ProviderCondition.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -261,13 +285,13 @@ ProviderCondition.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -279,57 +303,172 @@ ProviderCondition.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ProviderCondition.web3 +ProviderCondition.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ProviderCondition.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### abortByTimeOut -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **abortByTimeOut**(`conditionId`, `from`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :------------ | :---------------------------------------------- | | `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) +ProviderCondition.abortByTimeOut #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) +[src/keeper/contracts/conditions/Condition.abstract.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L75) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -339,29 +478,29 @@ ProviderCondition.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) +ProviderCondition.call #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### fulfill -▸ **fulfill**(`agreementId`, `did`, `nftReceiver`, `lockPaymentCondition`, `nftTokenAddress`, `willBeTransferred?`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfill**(`agreementId`, `did`, `nftReceiver`, `lockPaymentCondition`, `nftTokenAddress`, `willBeTransferred?`, `from`, `txParams?`): `Promise`\<`any`\> Fulfill the transfer NFT condition. @@ -375,12 +514,12 @@ Fulfill the transfer NFT condition. | `lockPaymentCondition` | `string` | `undefined` | lock payment condition identifier. | | `nftTokenAddress` | `string` | `undefined` | address of the nft token to use. | | `willBeTransferred` | `boolean` | `true` | Indicates if the asset will be transferred or minted | -| `from?` | [`Account`](Account.md) | `undefined` | | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | - | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Condition state. @@ -390,45 +529,45 @@ Only DID owner or DID provider can call this method. #### Overrides -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) +ProviderCondition.fulfill #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts:146](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts#L146) +[src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts:146](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts#L146) --- ### fulfillInstance -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillInstance**(`cond`, `additionalParams`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | +| Name | Type | Default value | +| :----------------- | :-------------------------------------------------------- | :------------ | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | `undefined` | +| `additionalParams` | `Record`\<`string`, `unknown`\> | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | +| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) +ProviderCondition.fulfillInstance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) +[src/keeper/contracts/conditions/Condition.abstract.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L139) --- ### fulfillPlain -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillPlain**(`agreementId`, `args`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters @@ -436,54 +575,54 @@ Only DID owner or DID provider can call this method. | :------------ | :-------------------------------------------------------- | :------------ | | `agreementId` | `string` | `undefined` | | `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | | `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) +ProviderCondition.fulfillPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) +[src/keeper/contracts/conditions/Condition.abstract.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L47) --- ### fulfillWithNode -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillWithNode**(`cond`, `additionalParams`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :----------------- | :----------------------------------------------------- | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | +| `additionalParams` | `Record`\<`string`, `unknown`\> | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) +ProviderCondition.fulfillWithNode #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) +[src/keeper/contracts/conditions/Condition.abstract.ts:183](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L183) --- ### generateId -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> +▸ **generateId**(`agreementId`, `valueHash`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -494,21 +633,21 @@ Only DID owner or DID provider can call this method. #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) +ProviderCondition.generateId #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) +[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L61) --- ### generateIdHash -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> +▸ **generateIdHash**(`agreementId`, `...values`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -519,21 +658,21 @@ Only DID owner or DID provider can call this method. #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) +ProviderCondition.generateIdHash #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) +[src/keeper/contracts/conditions/Condition.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L57) --- ### generateIdWithSeed -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> +▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`\<[`string`, `string`]\> #### Parameters @@ -544,15 +683,15 @@ Only DID owner or DID provider can call this method. #### Returns -`Promise`<[`string`, `string`]\> +`Promise`\<[`string`, `string`]\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) +ProviderCondition.generateIdWithSeed #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) +[src/keeper/contracts/conditions/Condition.abstract.ts:65](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L65) --- @@ -572,17 +711,17 @@ Only DID owner or DID provider can call this method. #### Inherited from -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) +ProviderCondition.getConditionFulfilledEvent #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) +[src/keeper/contracts/conditions/Condition.abstract.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L79) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -592,70 +731,46 @@ Only DID owner or DID provider can call this method. #### Returns -`Promise`<`string`\> - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) - ---- - -### getInputsOfMethod - -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] - -#### Parameters - -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | - -#### Returns - -readonly `ParamType`[] +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) +ProviderCondition.getFromAddress #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getSignatureOfMethod +### getTransactionLogs -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -`string` +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) +ProviderCondition.getTransactionLogs #### Defined in -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### hashValues -▸ **hashValues**(`...args`): `Promise`<`string`\> +▸ **hashValues**(`...args`): `Promise`\<`string`\> #### Parameters @@ -665,21 +780,21 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) +ProviderCondition.hashValues #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) +[src/keeper/contracts/conditions/Condition.abstract.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L116) --- ### hashValuesPlain -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> +▸ **hashValuesPlain**(`...args`): `Promise`\<`string`\> #### Parameters @@ -689,71 +804,72 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) +ProviderCondition.hashValuesPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) +[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L122) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) +ProviderCondition.init #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instance -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instance**(`agreementId`, `params`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | +| Name | Type | +| :------------ | :------------------------------------------------------- | +| `agreementId` | `string` | +| `params` | `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> | #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) +ProviderCondition.instance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) +[src/keeper/contracts/conditions/Condition.abstract.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L163) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -765,15 +881,15 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) +ProviderCondition.instanceFromDDO #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) +[src/keeper/contracts/conditions/Condition.abstract.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L131) --- @@ -787,17 +903,17 @@ readonly `ParamType`[] #### Overrides -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) +ProviderCondition.nodeMethod #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts:171](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts#L171) +[src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts:171](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts#L171) --- ### params -▸ **params**(`did`, `nftHolder`, `nftReceiver`, `lockCondition`, `nftTokenAddress`, `willBeTransferred?`, `expiration?`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +▸ **params**(`did`, `nftHolder`, `nftReceiver`, `lockCondition`, `nftTokenAddress`, `willBeTransferred?`, `expiration?`): `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> Generates the hash of condition inputs. @@ -815,23 +931,23 @@ Generates the hash of condition inputs. #### Returns -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +`ConditionParameters`\<`Record`\<`string`, `unknown`\>\> Hash of all the values #### Overrides -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) +ProviderCondition.params #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts#L38) +[src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts#L38) --- ### paramsFromDDO -▸ **paramsFromDDO**(`«destructured»`, `lockCondition`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +▸ **paramsFromDDO**(`«destructured»`, `lockCondition`): `Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -842,21 +958,21 @@ Hash of all the values #### Returns -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Overrides -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) +ProviderCondition.paramsFromDDO #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts:83](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts#L83) +[src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts:83](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts#L83) --- ### paramsFromService -▸ **paramsFromService**(`«destructured»`, `lockCondition`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +▸ **paramsFromService**(`«destructured»`, `lockCondition`): `Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -867,71 +983,71 @@ Hash of all the values #### Returns -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts:107](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts#L107) +[src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts:107](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts#L107) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) +ProviderCondition.send #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) +ProviderCondition.sendFrom #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -945,17 +1061,41 @@ Hash of all the values #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) +ProviderCondition.setInstanceConfig + +#### Defined in + +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +ProviderCondition.someLog #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`TransferNFT721Condition`](TransferNFT721Condition.md)\> +▸ **getInstance**(`config`): `Promise`\<[`TransferNFT721Condition`](TransferNFT721Condition.md)\> #### Parameters @@ -965,21 +1105,21 @@ Hash of all the values #### Returns -`Promise`<[`TransferNFT721Condition`](TransferNFT721Condition.md)\> +`Promise`\<[`TransferNFT721Condition`](TransferNFT721Condition.md)\> #### Overrides -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) +ProviderCondition.getInstance #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts#L23) +[src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFT721Condition.ts#L23) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1000,8 +1140,8 @@ Hash of all the values #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) +ProviderCondition.setInstanceConfig #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/TransferNFTCondition.md b/docs/api-reference/classes/TransferNFTCondition.md index 91a3d377e..130cd1f0c 100644 --- a/docs/api-reference/classes/TransferNFTCondition.md +++ b/docs/api-reference/classes/TransferNFTCondition.md @@ -6,7 +6,7 @@ Condition allowing to transfer an NFT between the original owner and a receiver ## Hierarchy -- [`ProviderCondition`](ProviderCondition.md)<`TransferNFTConditionContext`\> +- `ProviderCondition`\<`TransferNFTConditionContext`\> ↳ **`TransferNFTCondition`** @@ -29,12 +29,14 @@ Condition allowing to transfer an NFT between the original owner and a receiver - [artifactsFolder](TransferNFTCondition.md#artifactsfolder) - [circuitsFolder](TransferNFTCondition.md#circuitsfolder) +- [client](TransferNFTCondition.md#client) - [config](TransferNFTCondition.md#config) - [instanceConfig](TransferNFTCondition.md#instanceconfig) - [instantiableConfig](TransferNFTCondition.md#instantiableconfig) - [logger](TransferNFTCondition.md#logger) - [nevermined](TransferNFTCondition.md#nevermined) -- [web3](TransferNFTCondition.md#web3) +- [publicClient](TransferNFTCondition.md#publicclient) +- [walletClient](TransferNFTCondition.md#walletclient) ### Methods @@ -50,8 +52,7 @@ Condition allowing to transfer an NFT between the original owner and a receiver - [generateIdWithSeed](TransferNFTCondition.md#generateidwithseed) - [getConditionFulfilledEvent](TransferNFTCondition.md#getconditionfulfilledevent) - [getFromAddress](TransferNFTCondition.md#getfromaddress) -- [getInputsOfMethod](TransferNFTCondition.md#getinputsofmethod) -- [getSignatureOfMethod](TransferNFTCondition.md#getsignatureofmethod) +- [getTransactionLogs](TransferNFTCondition.md#gettransactionlogs) - [hashValues](TransferNFTCondition.md#hashvalues) - [hashValuesPlain](TransferNFTCondition.md#hashvaluesplain) - [init](TransferNFTCondition.md#init) @@ -64,6 +65,7 @@ Condition allowing to transfer an NFT between the original owner and a receiver - [send](TransferNFTCondition.md#send) - [sendFrom](TransferNFTCondition.md#sendfrom) - [setInstanceConfig](TransferNFTCondition.md#setinstanceconfig) +- [someLog](TransferNFTCondition.md#somelog) - [getInstance](TransferNFTCondition.md#getinstance) - [setInstanceConfig](TransferNFTCondition.md#setinstanceconfig-1) @@ -71,7 +73,7 @@ Condition allowing to transfer an NFT between the original owner and a receiver ### constructor -• **new TransferNFTCondition**(`contractName`) +• **new TransferNFTCondition**(`contractName`): [`TransferNFTCondition`](TransferNFTCondition.md) #### Parameters @@ -79,41 +81,45 @@ Condition allowing to transfer an NFT between the original owner and a receiver | :------------- | :------- | | `contractName` | `string` | +#### Returns + +[`TransferNFTCondition`](TransferNFTCondition.md) + #### Inherited from -[ProviderCondition](ProviderCondition.md).[constructor](ProviderCondition.md#constructor) +ProviderCondition\.constructor #### Defined in -[src/keeper/contracts/ContractBase.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L34) +[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L24) ## Properties ### address -• **address**: `string` +• **address**: \`0x$\{string}\` #### Inherited from -[ProviderCondition](ProviderCondition.md).[address](ProviderCondition.md#address) +ProviderCondition.address #### Defined in -[src/keeper/contracts/ContractBase.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L32) +[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L22) --- ### contract -• **contract**: `BaseContract` = `null` +• **contract**: `any` #### Inherited from -[ProviderCondition](ProviderCondition.md).[contract](ProviderCondition.md#contract) +ProviderCondition.contract #### Defined in -[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L29) +[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L19) --- @@ -123,25 +129,25 @@ Condition allowing to transfer an NFT between the original owner and a receiver #### Inherited from -[ProviderCondition](ProviderCondition.md).[contractName](ProviderCondition.md#contractname) +ProviderCondition.contractName #### Defined in -[src/keeper/contracts/ContractBase.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L28) +[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L18) --- ### events -• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) = `null` +• **events**: [`ContractEvent`](ContractEvent.md) \| [`SubgraphEvent`](SubgraphEvent.md) #### Inherited from -[ProviderCondition](ProviderCondition.md).[events](ProviderCondition.md#events) +ProviderCondition.events #### Defined in -[src/keeper/contracts/ContractBase.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L30) +[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L20) --- @@ -151,11 +157,11 @@ Condition allowing to transfer an NFT between the original owner and a receiver #### Inherited from -[ProviderCondition](ProviderCondition.md).[version](ProviderCondition.md#version) +ProviderCondition.version #### Defined in -[src/keeper/contracts/ContractBase.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L31) +[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L21) --- @@ -165,17 +171,17 @@ Condition allowing to transfer an NFT between the original owner and a receiver #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L26) +[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L27) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -183,17 +189,17 @@ ProviderCondition.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -201,13 +207,31 @@ ProviderCondition.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +ProviderCondition.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -219,13 +243,13 @@ ProviderCondition.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -237,17 +261,17 @@ ProviderCondition.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -255,13 +279,13 @@ ProviderCondition.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -273,13 +297,13 @@ ProviderCondition.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -291,57 +315,172 @@ ProviderCondition.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) --- -### web3 +### publicClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **publicClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | #### Inherited from -ProviderCondition.web3 +ProviderCondition.publicClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) + +--- + +### walletClient + +• `get` **walletClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Inherited from + +ProviderCondition.walletClient + +#### Defined in + +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### abortByTimeOut -▸ **abortByTimeOut**(`conditionId`, `from?`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **abortByTimeOut**(`conditionId`, `from`, `params?`): `Promise`\<`any`\> #### Parameters | Name | Type | | :------------ | :---------------------------------------------- | | `conditionId` | `string` | -| `from?` | [`Account`](Account.md) | +| `from` | [`NvmAccount`](NvmAccount.md) | | `params?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[abortByTimeOut](ProviderCondition.md#abortbytimeout) +ProviderCondition.abortByTimeOut #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L88) +[src/keeper/contracts/conditions/Condition.abstract.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L75) --- ### call -▸ **call**<`T`\>(`name`, `args`, `from?`): `Promise`<`T`\> +▸ **call**\<`T`\>(`functionName`, `args`, `from?`): `Promise`\<`T`\> #### Type parameters @@ -351,29 +490,29 @@ ProviderCondition.web3 #### Parameters -| Name | Type | -| :------ | :------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | `string` | +| Name | Type | +| :------------- | :------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from?` | `string` | #### Returns -`Promise`<`T`\> +`Promise`\<`T`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[call](ProviderCondition.md#call) +ProviderCondition.call #### Defined in -[src/keeper/contracts/ContractBase.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L328) +[src/keeper/contracts/ContractBase.ts:91](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L91) --- ### fulfill -▸ **fulfill**(`agreementId`, `did`, `nftReceiver`, `nftAmount`, `nftContractAddress`, `lockPaymentCondition`, `willBeTransferred?`, `expiration?`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfill**(`agreementId`, `did`, `nftReceiver`, `nftAmount`, `nftContractAddress`, `lockPaymentCondition`, `from`, `willBeTransferred?`, `expiration?`, `txParams?`): `Promise`\<`any`\> Fulfill the transfer NFT condition. @@ -387,14 +526,14 @@ Fulfill the transfer NFT condition. | `nftAmount` | `bigint` | `undefined` | amount of NFTs to transfer. | | `nftContractAddress` | `string` | `undefined` | Address of the nft contract | | `lockPaymentCondition` | `string` | `undefined` | lock payment condition identifier. | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | | `willBeTransferred` | `boolean` | `true` | Indicates if the asset will be transferred or minted | | `expiration` | `number` | `0` | - | -| `from?` | [`Account`](Account.md) | `undefined` | | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | - | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Condition state. @@ -404,17 +543,17 @@ Only DID owner or DID provider can call this method. #### Overrides -[ProviderCondition](ProviderCondition.md).[fulfill](ProviderCondition.md#fulfill) +ProviderCondition.fulfill #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:141](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L141) +[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:146](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L146) --- ### fulfillForDelegate -▸ **fulfillForDelegate**(`agreementId`, `did`, `nftHolder`, `nftReceiver`, `nftAmount`, `lockPaymentCondition`, `nftAddress`, `willBeTransferred?`, `expiration?`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillForDelegate**(`agreementId`, `did`, `nftHolder`, `nftReceiver`, `nftAmount`, `lockPaymentCondition`, `nftAddress`, `willBeTransferred?`, `expiration?`, `from`, `txParams?`): `Promise`\<`any`\> Fulfill the transfer NFT condition. @@ -431,12 +570,12 @@ Fulfill the transfer NFT condition. | `nftAddress` | `string` | `undefined` | - | | `willBeTransferred` | `boolean` | `true` | Indicates if the asset will be transferred or minted | | `expiration` | `bigint` | `undefined` | Block in which the token expires. If zero means no expiration | -| `from?` | [`Account`](Account.md) | `undefined` | Account sending the transaction | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | Account sending the transaction | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | Transaction parameters | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> Condition state. @@ -446,41 +585,41 @@ Only DID owner or DID provider can call this method. #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:187](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L187) +[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:192](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L192) --- ### fulfillInstance -▸ **fulfillInstance**(`cond`, `additionalParams`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillInstance**(`cond`, `additionalParams`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters -| Name | Type | Default value | -| :----------------- | :----------------------------------------------------------------------------------------- | :------------ | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | `undefined` | -| `additionalParams` | `Record`<`string`, `unknown`\> | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | +| Name | Type | Default value | +| :----------------- | :-------------------------------------------------------- | :------------ | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | `undefined` | +| `additionalParams` | `Record`\<`string`, `unknown`\> | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | +| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillInstance](ProviderCondition.md#fulfillinstance) +ProviderCondition.fulfillInstance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:150](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L150) +[src/keeper/contracts/conditions/Condition.abstract.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L139) --- ### fulfillPlain -▸ **fulfillPlain**(`agreementId`, `args`, `from?`, `txParams?`, `method?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillPlain**(`agreementId`, `args`, `from`, `txParams?`, `method?`): `Promise`\<`any`\> #### Parameters @@ -488,54 +627,54 @@ Only DID owner or DID provider can call this method. | :------------ | :-------------------------------------------------------- | :------------ | | `agreementId` | `string` | `undefined` | | `args` | `any`[] | `undefined` | -| `from?` | [`Account`](Account.md) | `undefined` | +| `from` | [`NvmAccount`](NvmAccount.md) | `undefined` | | `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | `undefined` | | `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | `'fulfill'` | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillPlain](ProviderCondition.md#fulfillplain) +ProviderCondition.fulfillPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L63) +[src/keeper/contracts/conditions/Condition.abstract.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L47) --- ### fulfillWithNode -▸ **fulfillWithNode**(`cond`, `additionalParams`, `from?`, `txParams?`): `Promise`<`ContractTransactionReceipt`\> +▸ **fulfillWithNode**(`cond`, `additionalParams`, `from`, `txParams?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :----------------- | :----------------------------------------------------------------------------------------- | -| `cond` | [`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\> | -| `additionalParams` | `Record`<`string`, `unknown`\> | -| `from?` | [`Account`](Account.md) | -| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :----------------- | :----------------------------------------------------- | +| `cond` | `ConditionInstance`\<`Record`\<`string`, `unknown`\>\> | +| `additionalParams` | `Record`\<`string`, `unknown`\> | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `txParams?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[fulfillWithNode](ProviderCondition.md#fulfillwithnode) +ProviderCondition.fulfillWithNode #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L194) +[src/keeper/contracts/conditions/Condition.abstract.ts:183](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L183) --- ### generateId -▸ **generateId**(`agreementId`, `valueHash`): `Promise`<`string`\> +▸ **generateId**(`agreementId`, `valueHash`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -546,21 +685,21 @@ Only DID owner or DID provider can call this method. #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateId](ProviderCondition.md#generateid) +ProviderCondition.generateId #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L77) +[src/keeper/contracts/conditions/Condition.abstract.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L61) --- ### generateIdHash -▸ **generateIdHash**(`agreementId`, `...values`): `Promise`<`string`\> +▸ **generateIdHash**(`agreementId`, `...values`): `Promise`\<\`0x$\{string}\`\> #### Parameters @@ -571,21 +710,21 @@ Only DID owner or DID provider can call this method. #### Returns -`Promise`<`string`\> +`Promise`\<\`0x$\{string}\`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdHash](ProviderCondition.md#generateidhash) +ProviderCondition.generateIdHash #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L73) +[src/keeper/contracts/conditions/Condition.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L57) --- ### generateIdWithSeed -▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`<[`string`, `string`]\> +▸ **generateIdWithSeed**(`agreementId`, `valueHash`): `Promise`\<[`string`, `string`]\> #### Parameters @@ -596,15 +735,15 @@ Only DID owner or DID provider can call this method. #### Returns -`Promise`<[`string`, `string`]\> +`Promise`\<[`string`, `string`]\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[generateIdWithSeed](ProviderCondition.md#generateidwithseed) +ProviderCondition.generateIdWithSeed #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L81) +[src/keeper/contracts/conditions/Condition.abstract.ts:65](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L65) --- @@ -624,17 +763,17 @@ Only DID owner or DID provider can call this method. #### Inherited from -[ProviderCondition](ProviderCondition.md).[getConditionFulfilledEvent](ProviderCondition.md#getconditionfulfilledevent) +ProviderCondition.getConditionFulfilledEvent #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L92) +[src/keeper/contracts/conditions/Condition.abstract.ts:79](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L79) --- ### getFromAddress -▸ `Protected` **getFromAddress**(`from?`): `Promise`<`string`\> +▸ **getFromAddress**(`from?`): `Promise`\<`string`\> #### Parameters @@ -644,70 +783,46 @@ Only DID owner or DID provider can call this method. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getFromAddress](ProviderCondition.md#getfromaddress) +ProviderCondition.getFromAddress #### Defined in -[src/keeper/contracts/ContractBase.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L80) +[src/keeper/contracts/ContractBase.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L67) --- -### getInputsOfMethod +### getTransactionLogs -▸ **getInputsOfMethod**(`methodName`): readonly `ParamType`[] +▸ **getTransactionLogs**(`txReceipt`, `eventName`): `ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Parameters -| Name | Type | -| :----------- | :------- | -| `methodName` | `string` | +| Name | Type | +| :---------- | :------------------- | +| `txReceipt` | `TransactionReceipt` | +| `eventName` | `string` | #### Returns -readonly `ParamType`[] +`ParseEventLogsReturnType`\<`any`, `string`, `false`, `string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[getInputsOfMethod](ProviderCondition.md#getinputsofmethod) +ProviderCondition.getTransactionLogs #### Defined in -[src/keeper/contracts/ContractBase.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L44) - ---- - -### getSignatureOfMethod - -▸ **getSignatureOfMethod**(`methodName`, `args?`): `string` - -#### Parameters - -| Name | Type | Default value | -| :----------- | :------- | :------------ | -| `methodName` | `string` | `undefined` | -| `args` | `any`[] | `[]` | - -#### Returns - -`string` - -#### Inherited from - -[ProviderCondition](ProviderCondition.md).[getSignatureOfMethod](ProviderCondition.md#getsignatureofmethod) - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L39) +[src/keeper/contracts/ContractBase.ts:75](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L75) --- ### hashValues -▸ **hashValues**(`...args`): `Promise`<`string`\> +▸ **hashValues**(`...args`): `Promise`\<`string`\> #### Parameters @@ -717,21 +832,21 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValues](ProviderCondition.md#hashvalues) +ProviderCondition.hashValues #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:129](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L129) +[src/keeper/contracts/conditions/Condition.abstract.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L116) --- ### hashValuesPlain -▸ **hashValuesPlain**(`...args`): `Promise`<`string`\> +▸ **hashValuesPlain**(`...args`): `Promise`\<`string`\> #### Parameters @@ -741,71 +856,72 @@ readonly `ParamType`[] #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[hashValuesPlain](ProviderCondition.md#hashvaluesplain) +ProviderCondition.hashValuesPlain #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L133) +[src/keeper/contracts/conditions/Condition.abstract.ts:122](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L122) --- ### init -▸ `Protected` **init**(`config`, `optional?`): `Promise`<`void`\> +▸ **init**(`config`, `optional?`, `contractAddress?`): `Promise`\<`void`\> #### Parameters -| Name | Type | Default value | -| :--------- | :---------------------------------------------------------- | :------------ | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | -| `optional` | `boolean` | `false` | +| Name | Type | Default value | +| :----------------- | :---------------------------------------------------------- | :------------ | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | `undefined` | +| `optional` | `boolean` | `false` | +| `contractAddress?` | `string` | `undefined` | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[init](ProviderCondition.md#init) +ProviderCondition.init #### Defined in -[src/keeper/contracts/ContractBase.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L49) +[src/keeper/contracts/ContractBase.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L29) --- ### instance -▸ **instance**(`agreementId`, `params`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instance**(`agreementId`, `params`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters -| Name | Type | -| :------------ | :--------------------------------------------------------------------------------------------- | -| `agreementId` | `string` | -| `params` | [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> | +| Name | Type | +| :------------ | :------------------------------------------------------- | +| `agreementId` | `string` | +| `params` | `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> | #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instance](ProviderCondition.md#instance) +ProviderCondition.instance #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:174](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L174) +[src/keeper/contracts/conditions/Condition.abstract.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L163) --- ### instanceFromDDO -▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +▸ **instanceFromDDO**(`agreementId`, `ctx`, `...args`): `Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -817,15 +933,15 @@ readonly `ParamType`[] #### Returns -`Promise`<[`ConditionInstance`](../interfaces/ConditionInstance.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionInstance`\<`Record`\<`string`, `unknown`\>\>\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[instanceFromDDO](ProviderCondition.md#instancefromddo) +ProviderCondition.instanceFromDDO #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:142](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L142) +[src/keeper/contracts/conditions/Condition.abstract.ts:131](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/Condition.abstract.ts#L131) --- @@ -845,7 +961,7 @@ readonly `ParamType`[] #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:92](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L92) +[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:97](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L97) --- @@ -859,17 +975,17 @@ readonly `ParamType`[] #### Overrides -[ProviderCondition](ProviderCondition.md).[nodeMethod](ProviderCondition.md#nodemethod) +ProviderCondition.nodeMethod #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:213](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L213) +[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:218](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L218) --- ### params -▸ **params**(`did`, `nftHolder`, `nftReceiver`, `nftAmount`, `lockCondition`, `nftContractAddress?`, `willBeTransferred?`, `expiration?`): [`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +▸ **params**(`did`, `nftHolder`, `nftReceiver`, `nftAmount`, `lockCondition`, `nftContractAddress?`, `willBeTransferred?`, `expiration?`): `ConditionParameters`\<`Record`\<`string`, `unknown`\>\> Generates the hash of condition inputs. @@ -888,23 +1004,23 @@ Generates the hash of condition inputs. #### Returns -[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\> +`ConditionParameters`\<`Record`\<`string`, `unknown`\>\> Hash of all the values #### Overrides -[ProviderCondition](ProviderCondition.md).[params](ProviderCondition.md#params) +ProviderCondition.params #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L44) +[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:45](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L45) --- ### paramsFromDDO -▸ **paramsFromDDO**(`«destructured»`, `lockCondition`): `Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +▸ **paramsFromDDO**(`«destructured»`, `lockCondition`): `Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Parameters @@ -915,75 +1031,75 @@ Hash of all the values #### Returns -`Promise`<[`ConditionParameters`](../interfaces/ConditionParameters.md)<`Record`<`string`, `unknown`\>\>\> +`Promise`\<`ConditionParameters`\<`Record`\<`string`, `unknown`\>\>\> #### Overrides -[ProviderCondition](ProviderCondition.md).[paramsFromDDO](ProviderCondition.md#paramsfromddo) +ProviderCondition.paramsFromDDO #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L99) +[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:104](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L104) --- ### send -▸ **send**(`name`, `from`, `args`, `params?`): `Promise`<`ContractTransactionReceipt`\> +▸ **send**(`functionName`, `from`, `args`, `params?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `from` | `string` | -| `args` | `any`[] | -| `params` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `args` | `any`[] | +| `params` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[send](ProviderCondition.md#send) +ProviderCondition.send #### Defined in -[src/keeper/contracts/ContractBase.ts:235](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L235) +[src/keeper/contracts/ContractBase.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L127) --- ### sendFrom -▸ **sendFrom**(`name`, `args`, `from?`, `value?`): `Promise`<`ContractTransactionReceipt`\> +▸ **sendFrom**(`functionName`, `args`, `from`, `value?`): `Promise`\<`any`\> #### Parameters -| Name | Type | -| :------- | :---------------------------------------------- | -| `name` | `string` | -| `args` | `any`[] | -| `from?` | [`Account`](Account.md) | -| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | +| Name | Type | +| :------------- | :---------------------------------------------- | +| `functionName` | `string` | +| `args` | `any`[] | +| `from` | [`NvmAccount`](NvmAccount.md) | +| `value?` | [`TxParameters`](../interfaces/TxParameters.md) | #### Returns -`Promise`<`ContractTransactionReceipt`\> +`Promise`\<`any`\> #### Inherited from -[ProviderCondition](ProviderCondition.md).[sendFrom](ProviderCondition.md#sendfrom) +ProviderCondition.sendFrom #### Defined in -[src/keeper/contracts/ContractBase.ts:88](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L88) +[src/keeper/contracts/ContractBase.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L108) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -997,17 +1113,41 @@ Hash of all the values #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig) +ProviderCondition.setInstanceConfig + +#### Defined in + +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) + +--- + +### someLog + +▸ **someLog**(`logs`): `undefined` + +#### Parameters + +| Name | Type | +| :----- | :------ | +| `logs` | `any`[] | + +#### Returns + +`undefined` + +#### Inherited from + +ProviderCondition.someLog #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/keeper/contracts/ContractBase.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/ContractBase.ts#L84) --- ### getInstance -▸ `Static` **getInstance**(`config`): `Promise`<[`TransferNFTCondition`](TransferNFTCondition.md)\> +▸ **getInstance**(`config`): `Promise`\<[`TransferNFTCondition`](TransferNFTCondition.md)\> #### Parameters @@ -1017,21 +1157,21 @@ Hash of all the values #### Returns -`Promise`<[`TransferNFTCondition`](TransferNFTCondition.md)\> +`Promise`\<[`TransferNFTCondition`](TransferNFTCondition.md)\> #### Overrides -[ProviderCondition](ProviderCondition.md).[getInstance](ProviderCondition.md#getinstance) +ProviderCondition.getInstance #### Defined in -[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L28) +[src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/conditions/NFTs/TransferNFTCondition.ts#L29) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -1052,8 +1192,8 @@ Hash of all the values #### Inherited from -[ProviderCondition](ProviderCondition.md).[setInstanceConfig](ProviderCondition.md#setinstanceconfig-1) +ProviderCondition.setInstanceConfig #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/UtilsApi.md b/docs/api-reference/classes/UtilsApi.md index 0df6db865..df228c0d0 100644 --- a/docs/api-reference/classes/UtilsApi.md +++ b/docs/api-reference/classes/UtilsApi.md @@ -19,9 +19,9 @@ Nevermined Utils API ### Properties - [agreements](UtilsApi.md#agreements) +- [blockchain](UtilsApi.md#blockchain) - [contractHandler](UtilsApi.md#contracthandler) - [fetch](UtilsApi.md#fetch) -- [files](UtilsApi.md#files) - [jwt](UtilsApi.md#jwt) - [signature](UtilsApi.md#signature) - [token](UtilsApi.md#token) @@ -31,12 +31,14 @@ Nevermined Utils API - [artifactsFolder](UtilsApi.md#artifactsfolder) - [circuitsFolder](UtilsApi.md#circuitsfolder) +- [client](UtilsApi.md#client) - [config](UtilsApi.md#config) - [instanceConfig](UtilsApi.md#instanceconfig) - [instantiableConfig](UtilsApi.md#instantiableconfig) - [logger](UtilsApi.md#logger) - [nevermined](UtilsApi.md#nevermined) -- [web3](UtilsApi.md#web3) +- [publicClient](UtilsApi.md#publicclient) +- [walletClient](UtilsApi.md#walletclient) ### Methods @@ -48,15 +50,22 @@ Nevermined Utils API ### constructor -• **new UtilsApi**(`config`) +• **new UtilsApi**(`config`, `initOptions`): [`UtilsApi`](UtilsApi.md) Creates a new AssetsApi #### Parameters -| Name | Type | Description | -| :------- | :---------------------------------------------------------- | :--------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | Configuration of the Nevermined instance | +| Name | Type | Description | +| :------------ | :------------------------------------------------------------------------------------ | :--------------------------------------- | +| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | Configuration of the Nevermined instance | +| `initOptions` | [`NeverminedInitializationOptions`](../interfaces/NeverminedInitializationOptions.md) | - | + +#### Returns + +[`UtilsApi`](UtilsApi.md) + +[UtilsApi](UtilsApi.md) #### Overrides @@ -64,7 +73,7 @@ Creates a new AssetsApi #### Defined in -[src/nevermined/api/UtilsApi.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/UtilsApi.ts#L57) +[src/nevermined/api/UtilsApi.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/UtilsApi.ts#L61) ## Properties @@ -76,43 +85,43 @@ Agreement utils. #### Defined in -[src/nevermined/api/UtilsApi.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/UtilsApi.ts#L15) +[src/nevermined/api/UtilsApi.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/UtilsApi.ts#L19) --- -### contractHandler +### blockchain -• **contractHandler**: [`ContractHandler`](ContractHandler.md) +• **blockchain**: [`BlockchainViemUtils`](BlockchainViemUtils.md) -Contract utils +Blockchain utils. #### Defined in -[src/nevermined/api/UtilsApi.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/UtilsApi.ts#L50) +[src/nevermined/api/UtilsApi.ts:34](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/UtilsApi.ts#L34) --- -### fetch +### contractHandler -• **fetch**: [`WebServiceConnector`](WebServiceConnector.md) +• **contractHandler**: [`ContractHandler`](ContractHandler.md) -Fetch utils. +Contract utils #### Defined in -[src/nevermined/api/UtilsApi.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/UtilsApi.ts#L20) +[src/nevermined/api/UtilsApi.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/UtilsApi.ts#L54) --- -### files +### fetch -• **files**: [`Files`](Files.md) +• **fetch**: [`WebServiceConnector`](WebServiceConnector.md) -Files utils. +Fetch utils. #### Defined in -[src/nevermined/api/UtilsApi.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/UtilsApi.ts#L25) +[src/nevermined/api/UtilsApi.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/UtilsApi.ts#L24) --- @@ -124,7 +133,7 @@ Jwt utils. #### Defined in -[src/nevermined/api/UtilsApi.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/UtilsApi.ts#L30) +[src/nevermined/api/UtilsApi.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/UtilsApi.ts#L29) --- @@ -136,7 +145,7 @@ Signature utils. #### Defined in -[src/nevermined/api/UtilsApi.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/UtilsApi.ts#L35) +[src/nevermined/api/UtilsApi.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/UtilsApi.ts#L39) --- @@ -148,7 +157,7 @@ Token utils. #### Defined in -[src/nevermined/api/UtilsApi.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/UtilsApi.ts#L40) +[src/nevermined/api/UtilsApi.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/UtilsApi.ts#L44) --- @@ -160,17 +169,17 @@ Token utils. #### Defined in -[src/nevermined/api/UtilsApi.ts:45](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/UtilsApi.ts#L45) +[src/nevermined/api/UtilsApi.ts:49](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/UtilsApi.ts#L49) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -178,17 +187,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -196,13 +205,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -214,13 +241,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -232,17 +259,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -250,13 +277,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -268,13 +295,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -286,31 +313,146 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -328,13 +470,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -352,13 +494,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -383,4 +525,4 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/Versions.md b/docs/api-reference/classes/Versions.md index a2146c6a5..1191cdc2b 100644 --- a/docs/api-reference/classes/Versions.md +++ b/docs/api-reference/classes/Versions.md @@ -20,12 +20,14 @@ Versions submodule . - [artifactsFolder](Versions.md#artifactsfolder) - [circuitsFolder](Versions.md#circuitsfolder) +- [client](Versions.md#client) - [config](Versions.md#config) - [instanceConfig](Versions.md#instanceconfig) - [instantiableConfig](Versions.md#instantiableconfig) - [logger](Versions.md#logger) - [nevermined](Versions.md#nevermined) -- [web3](Versions.md#web3) +- [publicClient](Versions.md#publicclient) +- [walletClient](Versions.md#walletclient) ### Methods @@ -38,7 +40,7 @@ Versions submodule . ### constructor -• **new Versions**(`config`) +• **new Versions**(`config`): [`Versions`](Versions.md) Creates a new Versions @@ -48,23 +50,29 @@ Creates a new Versions | :------- | :---------------------------------------------------------- | :--------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | Configuration of the Nevermined instance | +#### Returns + +[`Versions`](Versions.md) + +[Versions](Versions.md) + #### Overrides [Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) #### Defined in -[src/nevermined/Versions.ts:46](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L46) +[src/nevermined/Versions.ts:46](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L46) ## Accessors ### artifactsFolder -• `Protected` `get` **artifactsFolder**(): `string` +• `get` **artifactsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -72,17 +80,17 @@ Instantiable.artifactsFolder #### Defined in -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) +[src/Instantiable.abstract.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L132) --- ### circuitsFolder -• `Protected` `get` **circuitsFolder**(): `string` +• `get` **circuitsFolder**(): `undefined` \| `string` #### Returns -`string` +`undefined` \| `string` #### Inherited from @@ -90,13 +98,31 @@ Instantiable.circuitsFolder #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/Instantiable.abstract.ts:136](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L136) + +--- + +### client + +• `get` **client**(): [`Web3Clients`](../interfaces/Web3Clients.md) + +#### Returns + +[`Web3Clients`](../interfaces/Web3Clients.md) + +#### Inherited from + +Instantiable.client + +#### Defined in + +[src/Instantiable.abstract.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L84) --- ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) +• `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) #### Returns @@ -108,13 +134,13 @@ Instantiable.config #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) +[src/Instantiable.abstract.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L115) --- ### instanceConfig -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns @@ -126,17 +152,17 @@ Instantiable.instanceConfig #### Defined in -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) +[src/Instantiable.abstract.ts:140](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L140) --- ### instantiableConfig -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) +• `get` **instantiableConfig**(): `undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Returns -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) +`undefined` \| [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Inherited from @@ -144,13 +170,13 @@ Instantiable.instantiableConfig #### Defined in -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) +[src/Instantiable.abstract.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L108) --- ### logger -• `Protected` `get` **logger**(): `Logger` +• `get` **logger**(): `Logger` #### Returns @@ -162,13 +188,13 @@ Instantiable.logger #### Defined in -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) +[src/Instantiable.abstract.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L123) --- ### nevermined -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) +• `get` **nevermined**(): [`Nevermined`](Nevermined.md) #### Returns @@ -180,45 +206,160 @@ Instantiable.nevermined #### Defined in -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) +[src/Instantiable.abstract.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L76) + +--- + +### publicClient + +• `get` **publicClient**(): `Object` + +#### Returns + +`Object` + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Inherited from + +Instantiable.publicClient + +#### Defined in + +[src/Instantiable.abstract.ts:92](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L92) --- -### web3 +### walletClient -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` +• `get` **walletClient**(): `Object` #### Returns -`JsonRpcProvider` \| `BrowserProvider` +`Object` + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | #### Inherited from -Instantiable.web3 +Instantiable.walletClient #### Defined in -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/Instantiable.abstract.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L100) ## Methods ### get -▸ **get**(): `Promise`<[`PlatformVersions`](../interfaces/PlatformVersions.md)\> +▸ **get**(): `Promise`\<[`PlatformVersions`](../interfaces/PlatformVersions.md)\> #### Returns -`Promise`<[`PlatformVersions`](../interfaces/PlatformVersions.md)\> +`Promise`\<[`PlatformVersions`](../interfaces/PlatformVersions.md)\> #### Defined in -[src/nevermined/Versions.ts:51](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L51) +[src/nevermined/Versions.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L51) --- ### setInstanceConfig -▸ `Protected` **setInstanceConfig**(`config`): `void` +▸ **setInstanceConfig**(`config`): `void` #### Parameters @@ -236,13 +377,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/Instantiable.abstract.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L158) --- ### getInstance -▸ `Static` **getInstance**(`..._args`): `any` +▸ **getInstance**(`..._args`): `any` #### Parameters @@ -260,13 +401,13 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) +[src/Instantiable.abstract.ts:145](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L145) --- ### setInstanceConfig -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` +▸ **setInstanceConfig**\<`T`\>(`instance`, `instantiableConfig`): `void` #### Type parameters @@ -291,4 +432,4 @@ Instantiable.web3 #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/Instantiable.abstract.ts:149](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L149) diff --git a/docs/api-reference/classes/Web3Error.md b/docs/api-reference/classes/Web3Error.md index 6cf23df5a..65738da11 100644 --- a/docs/api-reference/classes/Web3Error.md +++ b/docs/api-reference/classes/Web3Error.md @@ -16,6 +16,7 @@ ### Properties +- [cause](Web3Error.md#cause) - [message](Web3Error.md#message) - [name](Web3Error.md#name) - [stack](Web3Error.md#stack) @@ -30,7 +31,7 @@ ### constructor -• **new Web3Error**(`message`) +• **new Web3Error**(`message`): [`Web3Error`](Web3Error.md) #### Parameters @@ -38,16 +39,34 @@ | :-------- | :------- | | `message` | `string` | +#### Returns + +[`Web3Error`](Web3Error.md) + #### Overrides Error.constructor #### Defined in -[src/errors/Web3Error.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/errors/Web3Error.ts#L2) +[src/errors/NeverminedErrors.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/errors/NeverminedErrors.ts#L26) ## Properties +### cause + +• `Optional` **cause**: `unknown` + +#### Inherited from + +Error.cause + +#### Defined in + +node_modules/typescript/lib/lib.es2022.error.d.ts:24 + +--- + ### message • **message**: `string` @@ -58,7 +77,7 @@ Error.message #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1068 +node_modules/typescript/lib/lib.es5.d.ts:1077 --- @@ -72,7 +91,7 @@ Error.name #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1067 +node_modules/typescript/lib/lib.es5.d.ts:1076 --- @@ -86,7 +105,7 @@ Error.stack #### Defined in -node_modules/typescript/lib/lib.es5.d.ts:1069 +node_modules/typescript/lib/lib.es5.d.ts:1078 --- @@ -94,12 +113,16 @@ node_modules/typescript/lib/lib.es5.d.ts:1069 ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any` +Optional override for formatting stack traces + +**`See`** + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + #### Type declaration ▸ (`err`, `stackTraces`): `any` -Optional override for formatting stack traces - ##### Parameters | Name | Type | @@ -111,17 +134,13 @@ Optional override for formatting stack traces `any` -**`See`** - -https://v8.dev/docs/stack-trace-api#customizing-stack-traces - #### Inherited from Error.prepareStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:11 +node_modules/@types/node/globals.d.ts:28 --- @@ -135,13 +154,13 @@ Error.stackTraceLimit #### Defined in -node_modules/@types/node/globals.d.ts:13 +node_modules/@types/node/globals.d.ts:30 ## Methods ### captureStackTrace -▸ `Static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` +▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` Create .stack property on a target object @@ -162,4 +181,4 @@ Error.captureStackTrace #### Defined in -node_modules/@types/node/globals.d.ts:4 +node_modules/@types/node/globals.d.ts:21 diff --git a/docs/api-reference/classes/Web3Provider.md b/docs/api-reference/classes/Web3Provider.md deleted file mode 100644 index d95b92272..000000000 --- a/docs/api-reference/classes/Web3Provider.md +++ /dev/null @@ -1,43 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / Web3Provider - -# Class: Web3Provider - -## Table of contents - -### Constructors - -- [constructor](Web3Provider.md#constructor) - -### Methods - -- [getWeb3](Web3Provider.md#getweb3) - -## Constructors - -### constructor - -• **new Web3Provider**() - -## Methods - -### getWeb3 - -▸ `Static` **getWeb3**(`config?`): `Promise`<`JsonRpcProvider` \| `BrowserProvider`\> - -Returns ethers.Provider instance. - -#### Parameters - -| Name | Type | -| :------- | :------------------------------------------------------ | -| `config` | `Partial`<[`NeverminedOptions`](NeverminedOptions.md)\> | - -#### Returns - -`Promise`<`JsonRpcProvider` \| `BrowserProvider`\> - -web3 instance - -#### Defined in - -[src/keeper/Web3Provider.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/Web3Provider.ts#L10) diff --git a/docs/api-reference/classes/Web3ProviderWrapper.md b/docs/api-reference/classes/Web3ProviderWrapper.md deleted file mode 100644 index 720111dc8..000000000 --- a/docs/api-reference/classes/Web3ProviderWrapper.md +++ /dev/null @@ -1,64 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / Web3ProviderWrapper - -# Class: Web3ProviderWrapper - -## Table of contents - -### Constructors - -- [constructor](Web3ProviderWrapper.md#constructor) - -### Properties - -- [provider](Web3ProviderWrapper.md#provider) - -### Methods - -- [send](Web3ProviderWrapper.md#send) - -## Constructors - -### constructor - -• **new Web3ProviderWrapper**(`provider`) - -#### Parameters - -| Name | Type | -| :--------- | :------------------------------------- | -| `provider` | `JsonRpcProvider` \| `BrowserProvider` | - -#### Defined in - -[src/keeper/utils.ts:82](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L82) - -## Properties - -### provider - -• **provider**: `JsonRpcProvider` \| `BrowserProvider` - -#### Defined in - -[src/keeper/utils.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L80) - -## Methods - -### send - -▸ **send**(`payload`, `callback`): `void` - -#### Parameters - -| Name | Type | -| :--------- | :--------------------------------------------------------------------------------------------- | -| `payload` | [`JsonRpcPayload`](../interfaces/JsonRpcPayload.md) | -| `callback` | (`error`: `Error`, `result?`: [`JsonRpcResponse`](../interfaces/JsonRpcResponse.md)) => `void` | - -#### Returns - -`void` - -#### Defined in - -[src/keeper/utils.ts:85](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L85) diff --git a/docs/api-reference/classes/WebServiceConnector.md b/docs/api-reference/classes/WebServiceConnector.md index e8b190950..ba48a2887 100644 --- a/docs/api-reference/classes/WebServiceConnector.md +++ b/docs/api-reference/classes/WebServiceConnector.md @@ -4,28 +4,15 @@ Provides a common interface to web services. -## Hierarchy - -- [`Instantiable`](Instantiable.md) - - ↳ **`WebServiceConnector`** - ## Table of contents ### Constructors - [constructor](WebServiceConnector.md#constructor) -### Accessors +### Properties -- [artifactsFolder](WebServiceConnector.md#artifactsfolder) -- [circuitsFolder](WebServiceConnector.md#circuitsfolder) - [config](WebServiceConnector.md#config) -- [instanceConfig](WebServiceConnector.md#instanceconfig) -- [instantiableConfig](WebServiceConnector.md#instantiableconfig) -- [logger](WebServiceConnector.md#logger) -- [nevermined](WebServiceConnector.md#nevermined) -- [web3](WebServiceConnector.md#web3) ### Methods @@ -40,18 +27,15 @@ Provides a common interface to web services. - [getFileResponse](WebServiceConnector.md#getfileresponse) - [post](WebServiceConnector.md#post) - [put](WebServiceConnector.md#put) -- [setInstanceConfig](WebServiceConnector.md#setinstanceconfig) - [uploadFile](WebServiceConnector.md#uploadfile) - [uploadMessage](WebServiceConnector.md#uploadmessage) - [getIPFSAuthToken](WebServiceConnector.md#getipfsauthtoken) -- [getInstance](WebServiceConnector.md#getinstance) -- [setInstanceConfig](WebServiceConnector.md#setinstanceconfig-1) ## Constructors ### constructor -• **new WebServiceConnector**(`config`) +• **new WebServiceConnector**(`config`): [`WebServiceConnector`](WebServiceConnector.md) #### Parameters @@ -59,163 +43,29 @@ Provides a common interface to web services. | :------- | :---------------------------------------------------------- | | `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | -#### Overrides - -[Instantiable](Instantiable.md).[constructor](Instantiable.md#constructor) - -#### Defined in - -[src/nevermined/utils/WebServiceConnector.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L21) - -## Accessors - -### artifactsFolder - -• `Protected` `get` **artifactsFolder**(): `string` - -#### Returns - -`string` - -#### Inherited from - -Instantiable.artifactsFolder - -#### Defined in - -[src/Instantiable.abstract.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L73) - ---- - -### circuitsFolder - -• `Protected` `get` **circuitsFolder**(): `string` - #### Returns -`string` - -#### Inherited from - -Instantiable.circuitsFolder +[`WebServiceConnector`](WebServiceConnector.md) #### Defined in -[src/Instantiable.abstract.ts:77](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L77) +[src/nevermined/utils/WebServiceConnector.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L26) ---- +## Properties ### config -• `Protected` `get` **config**(): [`NeverminedOptions`](NeverminedOptions.md) - -#### Returns - -[`NeverminedOptions`](NeverminedOptions.md) - -#### Inherited from - -Instantiable.config +• **config**: [`InstantiableConfig`](../interfaces/InstantiableConfig.md) #### Defined in -[src/Instantiable.abstract.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L57) - ---- - -### instanceConfig - -• `Protected` `get` **instanceConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -Instantiable.instanceConfig - -#### Defined in - -[src/Instantiable.abstract.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L81) - ---- - -### instantiableConfig - -• `Protected` `get` **instantiableConfig**(): [`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Returns - -[`InstantiableConfig`](../interfaces/InstantiableConfig.md) - -#### Inherited from - -Instantiable.instantiableConfig - -#### Defined in - -[src/Instantiable.abstract.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L50) - ---- - -### logger - -• `Protected` `get` **logger**(): `Logger` - -#### Returns - -`Logger` - -#### Inherited from - -Instantiable.logger - -#### Defined in - -[src/Instantiable.abstract.ts:64](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L64) - ---- - -### nevermined - -• `Protected` `get` **nevermined**(): [`Nevermined`](Nevermined.md) - -#### Returns - -[`Nevermined`](Nevermined.md) - -#### Inherited from - -Instantiable.nevermined - -#### Defined in - -[src/Instantiable.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L35) - ---- - -### web3 - -• `get` **web3**(): `JsonRpcProvider` \| `BrowserProvider` - -#### Returns - -`JsonRpcProvider` \| `BrowserProvider` - -#### Inherited from - -Instantiable.web3 - -#### Defined in - -[src/Instantiable.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L42) +[src/nevermined/utils/WebServiceConnector.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L24) ## Methods ### \_sleep -▸ `Private` **\_sleep**(`ms`): `Promise`<`unknown`\> +▸ **\_sleep**(`ms`): `Promise`\<`unknown`\> #### Parameters @@ -225,17 +75,17 @@ Instantiable.web3 #### Returns -`Promise`<`unknown`\> +`Promise`\<`unknown`\> #### Defined in -[src/nevermined/utils/WebServiceConnector.ts:221](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L221) +[src/nevermined/utils/WebServiceConnector.ts:226](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L226) --- ### delete -▸ **delete**(`url`, `payload?`, `headers?`): `Promise`<`Response`\> +▸ **delete**(`url`, `payload?`, `headers?`): `Promise`\<`Response`\> #### Parameters @@ -247,17 +97,17 @@ Instantiable.web3 #### Returns -`Promise`<`Response`\> +`Promise`\<`Response`\> #### Defined in -[src/nevermined/utils/WebServiceConnector.ts:65](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L65) +[src/nevermined/utils/WebServiceConnector.ts:71](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L71) --- ### downloadFile -▸ **downloadFile**(`url`, `destination?`, `index?`, `headers?`): `Promise`<`string`\> +▸ **downloadFile**(`url`, `destination?`, `index?`, `headers?`): `Promise`\<`string`\> #### Parameters @@ -270,17 +120,17 @@ Instantiable.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/WebServiceConnector.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L80) +[src/nevermined/utils/WebServiceConnector.ts:86](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L86) --- ### downloadUrl -▸ **downloadUrl**(`url`, `headers?`): `Promise`<`string`\> +▸ **downloadUrl**(`url`, `headers?`): `Promise`\<`string`\> #### Parameters @@ -291,17 +141,17 @@ Instantiable.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/WebServiceConnector.ts:132](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L132) +[src/nevermined/utils/WebServiceConnector.ts:139](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L139) --- ### fetch -▸ `Private` **fetch**(`url`, `opts`, `numberTries?`): `Promise`<`Response`\> +▸ **fetch**(`url`, `opts`, `numberTries?`): `Promise`\<`Response`\> #### Parameters @@ -313,17 +163,17 @@ Instantiable.web3 #### Returns -`Promise`<`Response`\> +`Promise`\<`Response`\> #### Defined in -[src/nevermined/utils/WebServiceConnector.ts:203](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L203) +[src/nevermined/utils/WebServiceConnector.ts:209](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L209) --- ### fetchCID -▸ **fetchCID**(`cid`): `Promise`<`string`\> +▸ **fetchCID**(`cid`): `Promise`\<`string`\> #### Parameters @@ -333,17 +183,17 @@ Instantiable.web3 #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/nevermined/utils/WebServiceConnector.ts:175](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L175) +[src/nevermined/utils/WebServiceConnector.ts:181](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L181) --- ### fetchToken -▸ **fetchToken**(`url`, `grantToken`, `numberTries?`): `Promise`<`Response`\> +▸ **fetchToken**(`url`, `grantToken`, `numberTries?`): `Promise`\<`Response`\> #### Parameters @@ -355,17 +205,17 @@ Instantiable.web3 #### Returns -`Promise`<`Response`\> +`Promise`\<`Response`\> #### Defined in -[src/nevermined/utils/WebServiceConnector.ts:159](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L159) +[src/nevermined/utils/WebServiceConnector.ts:165](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L165) --- ### get -▸ **get**(`url`, `headers?`): `Promise`<`Response`\> +▸ **get**(`url`, `headers?`): `Promise`\<`Response`\> #### Parameters @@ -376,17 +226,17 @@ Instantiable.web3 #### Returns -`Promise`<`Response`\> +`Promise`\<`Response`\> #### Defined in -[src/nevermined/utils/WebServiceConnector.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L41) +[src/nevermined/utils/WebServiceConnector.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L47) --- ### getFileResponse -▸ `Private` **getFileResponse**(`url`, `index?`, `headers?`): `Promise`<{ `name`: `string` ; `response`: `Response` }\> +▸ **getFileResponse**(`url`, `index?`, `headers?`): `Promise`\<\{ `name`: `string` ; `response`: `Response` }\> #### Parameters @@ -398,17 +248,17 @@ Instantiable.web3 #### Returns -`Promise`<{ `name`: `string` ; `response`: `Response` }\> +`Promise`\<\{ `name`: `string` ; `response`: `Response` }\> #### Defined in -[src/nevermined/utils/WebServiceConnector.ts:107](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L107) +[src/nevermined/utils/WebServiceConnector.ts:113](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L113) --- ### post -▸ **post**(`url`, `payload`, `headers?`): `Promise`<`Response`\> +▸ **post**(`url`, `payload`, `headers?`): `Promise`\<`Response`\> #### Parameters @@ -420,17 +270,17 @@ Instantiable.web3 #### Returns -`Promise`<`Response`\> +`Promise`\<`Response`\> #### Defined in -[src/nevermined/utils/WebServiceConnector.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L26) +[src/nevermined/utils/WebServiceConnector.ts:32](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L32) --- ### put -▸ **put**(`url`, `payload`, `headers?`): `Promise`<`Response`\> +▸ **put**(`url`, `payload`, `headers?`): `Promise`\<`Response`\> #### Parameters @@ -442,41 +292,17 @@ Instantiable.web3 #### Returns -`Promise`<`Response`\> - -#### Defined in - -[src/nevermined/utils/WebServiceConnector.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L50) - ---- - -### setInstanceConfig - -▸ `Protected` **setInstanceConfig**(`config`): `void` - -#### Parameters - -| Name | Type | -| :------- | :---------------------------------------------------------- | -| `config` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[Instantiable](Instantiable.md).[setInstanceConfig](Instantiable.md#setinstanceconfig) +`Promise`\<`Response`\> #### Defined in -[src/Instantiable.abstract.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L99) +[src/nevermined/utils/WebServiceConnector.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L56) --- ### uploadFile -▸ **uploadFile**(`url`, `data`, `encrypt?`): `Promise`<`any`\> +▸ **uploadFile**(`url`, `data`, `encrypt?`): `Promise`\<`any`\> #### Parameters @@ -488,17 +314,17 @@ Instantiable.web3 #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/nevermined/utils/WebServiceConnector.ts:149](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L149) +[src/nevermined/utils/WebServiceConnector.ts:156](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L156) --- ### uploadMessage -▸ **uploadMessage**(`url`, `data`, `encrypt?`): `Promise`<`any`\> +▸ **uploadMessage**(`url`, `data`, `encrypt?`): `Promise`\<`any`\> #### Parameters @@ -510,77 +336,22 @@ Instantiable.web3 #### Returns -`Promise`<`any`\> +`Promise`\<`any`\> #### Defined in -[src/nevermined/utils/WebServiceConnector.ts:140](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L140) +[src/nevermined/utils/WebServiceConnector.ts:147](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L147) --- ### getIPFSAuthToken -▸ `Static` `Private` **getIPFSAuthToken**(): `string` - -#### Returns - -`string` - -#### Defined in - -[src/nevermined/utils/WebServiceConnector.ts:193](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/WebServiceConnector.ts#L193) - ---- - -### getInstance - -▸ `Static` **getInstance**(`..._args`): `any` - -#### Parameters - -| Name | Type | -| :--------- | :---- | -| `..._args` | `any` | +▸ **getIPFSAuthToken**(): `undefined` \| `string` #### Returns -`any` - -#### Inherited from - -[Instantiable](Instantiable.md).[getInstance](Instantiable.md#getinstance) - -#### Defined in - -[src/Instantiable.abstract.ts:86](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L86) - ---- - -### setInstanceConfig - -▸ `Static` `Protected` **setInstanceConfig**<`T`\>(`instance`, `instantiableConfig`): `void` - -#### Type parameters - -| Name | Type | -| :--- | :---------------------------------------- | -| `T` | extends [`Instantiable`](Instantiable.md) | - -#### Parameters - -| Name | Type | -| :------------------- | :---------------------------------------------------------- | -| `instance` | `T` | -| `instantiableConfig` | [`InstantiableConfig`](../interfaces/InstantiableConfig.md) | - -#### Returns - -`void` - -#### Inherited from - -[Instantiable](Instantiable.md).[setInstanceConfig](Instantiable.md#setinstanceconfig-1) +`undefined` \| `string` #### Defined in -[src/Instantiable.abstract.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L90) +[src/nevermined/utils/WebServiceConnector.ts:199](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/WebServiceConnector.ts#L199) diff --git a/docs/api-reference/code-reference.md b/docs/api-reference/code-reference.md index 1f2d67811..68b4581a2 100644 --- a/docs/api-reference/code-reference.md +++ b/docs/api-reference/code-reference.md @@ -12,6 +12,7 @@ - [AccessStatus](enums/AccessStatus.md) - [AssetResult](enums/AssetResult.md) +- [ChargeType](enums/ChargeType.md) - [ConditionState](enums/ConditionState.md) - [CreateProgressStep](enums/CreateProgressStep.md) - [DIDResolvePolicy](enums/DIDResolvePolicy.md) @@ -20,6 +21,7 @@ - [ExternalResourceFileType](enums/ExternalResourceFileType.md) - [ImmutableBackends](enums/ImmutableBackends.md) - [LogLevel](enums/LogLevel.md) +- [NVMAppEnvironments](enums/NVMAppEnvironments.md) - [NeverminedNFT1155Type](enums/NeverminedNFT1155Type.md) - [NeverminedNFT721Type](enums/NeverminedNFT721Type.md) - [NodeUploadBackends](enums/NodeUploadBackends.md) @@ -31,22 +33,16 @@ - [PublishOnChainOptions](enums/PublishOnChainOptions.md) - [RoyaltyKind](enums/RoyaltyKind.md) - [State](enums/State.md) +- [SubscriptionType](enums/SubscriptionType.md) - [TemplateState](enums/TemplateState.md) - [UpdateProgressStep](enums/UpdateProgressStep.md) - [ValueType](enums/ValueType.md) ### Classes -- [AaveBorrowCondition](classes/AaveBorrowCondition.md) -- [AaveCollateralDepositCondition](classes/AaveCollateralDepositCondition.md) -- [AaveCollateralWithdrawCondition](classes/AaveCollateralWithdrawCondition.md) -- [AaveCredit](classes/AaveCredit.md) -- [AaveCreditTemplate](classes/AaveCreditTemplate.md) -- [AaveRepayCondition](classes/AaveRepayCondition.md) - [AccessCondition](classes/AccessCondition.md) - [AccessService](classes/AccessService.md) - [AccessTemplate](classes/AccessTemplate.md) -- [Account](classes/Account.md) - [AccountsApi](classes/AccountsApi.md) - [AgreementStoreManager](classes/AgreementStoreManager.md) - [AgreementTemplate](classes/AgreementTemplate.md) @@ -59,33 +55,33 @@ - [AssetsApi](classes/AssetsApi.md) - [BabyjubPublicKey](classes/BabyjubPublicKey.md) - [BaseTemplate](classes/BaseTemplate.md) +- [BlockchainViemUtils](classes/BlockchainViemUtils.md) - [Bookmarks](classes/Bookmarks.md) -- [ClientError](classes/ClientError.md) - [ComputeApi](classes/ComputeApi.md) - [ComputeExecutionCondition](classes/ComputeExecutionCondition.md) -- [Condition](classes/Condition.md) -- [ConditionSmall](classes/ConditionSmall.md) - [ConditionStoreManager](classes/ConditionStoreManager.md) -- [ConsumerCondition](classes/ConsumerCondition.md) - [ContractBase](classes/ContractBase.md) - [ContractEvent](classes/ContractEvent.md) - [ContractHandler](classes/ContractHandler.md) - [CurveRoyalties](classes/CurveRoyalties.md) - [CustomToken](classes/CustomToken.md) - [DDO](classes/DDO.md) +- [DDOConditionNotFoundError](classes/DDOConditionNotFoundError.md) - [DDOError](classes/DDOError.md) +- [DDOParamNotFoundError](classes/DDOParamNotFoundError.md) - [DDOPriceNotFoundError](classes/DDOPriceNotFoundError.md) +- [DDOServiceAlreadyExists](classes/DDOServiceAlreadyExists.md) - [DDOServiceNotFoundError](classes/DDOServiceNotFoundError.md) - [DID](classes/DID.md) - [DIDRegistry](classes/DIDRegistry.md) - [DIDSalesTemplate](classes/DIDSalesTemplate.md) - [Dispenser](classes/Dispenser.md) -- [DistributeNFTCollateralCondition](classes/DistributeNFTCollateralCondition.md) +- [DynamicCreditsOverLimit](classes/DynamicCreditsOverLimit.md) +- [DynamicCreditsUnderLimit](classes/DynamicCreditsUnderLimit.md) - [EscrowComputeExecutionTemplate](classes/EscrowComputeExecutionTemplate.md) - [EscrowPaymentCondition](classes/EscrowPaymentCondition.md) - [EthSignJWT](classes/EthSignJWT.md) - [EventHandler](classes/EventHandler.md) -- [Files](classes/Files.md) - [GenericContract](classes/GenericContract.md) - [GraphError](classes/GraphError.md) - [HttpError](classes/HttpError.md) @@ -101,7 +97,6 @@ - [NFT721AccessTemplate](classes/NFT721AccessTemplate.md) - [NFT721Api](classes/NFT721Api.md) - [NFT721HolderCondition](classes/NFT721HolderCondition.md) -- [NFT721LockCondition](classes/NFT721LockCondition.md) - [NFT721SalesTemplate](classes/NFT721SalesTemplate.md) - [NFTAccessCondition](classes/NFTAccessCondition.md) - [NFTAccessService](classes/NFTAccessService.md) @@ -122,10 +117,14 @@ - [NeverminedOptions](classes/NeverminedOptions.md) - [Nft1155Contract](classes/Nft1155Contract.md) - [Nft721Contract](classes/Nft721Contract.md) +- [NvmAccount](classes/NvmAccount.md) +- [NvmAccountError](classes/NvmAccountError.md) +- [NvmApiKey](classes/NvmApiKey.md) +- [NvmApp](classes/NvmApp.md) +- [NvmAppMetadata](classes/NvmAppMetadata.md) - [Permissions](classes/Permissions.md) - [Profiles](classes/Profiles.md) - [ProvenanceApi](classes/ProvenanceApi.md) -- [ProviderCondition](classes/ProviderCondition.md) - [Providers](classes/Providers.md) - [RegistryBaseApi](classes/RegistryBaseApi.md) - [RewardsDistributor](classes/RewardsDistributor.md) @@ -149,20 +148,15 @@ - [UtilsApi](classes/UtilsApi.md) - [Versions](classes/Versions.md) - [Web3Error](classes/Web3Error.md) -- [Web3Provider](classes/Web3Provider.md) -- [Web3ProviderWrapper](classes/Web3ProviderWrapper.md) - [WebServiceConnector](classes/WebServiceConnector.md) ### Interfaces -- [AaveConfig](interfaces/AaveConfig.md) -- [AaveCreditTemplateParams](interfaces/AaveCreditTemplateParams.md) - [AccessProofTemplateParams](interfaces/AccessProofTemplateParams.md) - [ActedOnBehalfEvent](interfaces/ActedOnBehalfEvent.md) - [AdditionalInformation](interfaces/AdditionalInformation.md) - [AgreementConditionsStatus](interfaces/AgreementConditionsStatus.md) - [AgreementData](interfaces/AgreementData.md) -- [AgreementInstance](interfaces/AgreementInstance.md) - [AgreementPrepareResult](interfaces/AgreementPrepareResult.md) - [Algorithm](interfaces/Algorithm.md) - [AuthToken](interfaces/AuthToken.md) @@ -170,34 +164,34 @@ - [Babysig](interfaces/Babysig.md) - [Balance](interfaces/Balance.md) - [Bookmark](interfaces/Bookmark.md) -- [ConditionContext](interfaces/ConditionContext.md) - [ConditionData](interfaces/ConditionData.md) -- [ConditionInstance](interfaces/ConditionInstance.md) - [ConditionInstanceSmall](interfaces/ConditionInstanceSmall.md) -- [ConditionParameters](interfaces/ConditionParameters.md) - [ContractEventSubscription](interfaces/ContractEventSubscription.md) - [Curation](interfaces/Curation.md) - [DDOStatus](interfaces/DDOStatus.md) - [Eip712Data](interfaces/Eip712Data.md) - [EventEmitter](interfaces/EventEmitter.md) - [EventOptions](interfaces/EventOptions.md) -- [Filter](interfaces/Filter.md) +- [FilterContractEvent](interfaces/FilterContractEvent.md) - [GenericAccess](interfaces/GenericAccess.md) - [InputType](interfaces/InputType.md) - [InstantiableConfig](interfaces/InstantiableConfig.md) -- [JsonRpcPayload](interfaces/JsonRpcPayload.md) -- [JsonRpcResponse](interfaces/JsonRpcResponse.md) - [MarketplaceResults](interfaces/MarketplaceResults.md) - [MetaData](interfaces/MetaData.md) - [MetaDataExternalResource](interfaces/MetaDataExternalResource.md) - [MetaDataMain](interfaces/MetaDataMain.md) +- [MetadataValidationResults](interfaces/MetadataValidationResults.md) - [MethodReflection](interfaces/MethodReflection.md) -- [MintedEntry](interfaces/MintedEntry.md) +- [NFT1155MintedEntry](interfaces/NFT1155MintedEntry.md) +- [NFT721MintedEntry](interfaces/NFT721MintedEntry.md) +- [NeverminedInitializationOptions](interfaces/NeverminedInitializationOptions.md) - [NewBookmark](interfaces/NewBookmark.md) - [NewPermission](interfaces/NewPermission.md) - [NewProfile](interfaces/NewProfile.md) - [NvmConfig](interfaces/NvmConfig.md) - [NvmConfigVersions](interfaces/NvmConfigVersions.md) +- [OperationResult](interfaces/OperationResult.md) +- [PaymentAttributes](interfaces/PaymentAttributes.md) - [PaymentData](interfaces/PaymentData.md) - [Permission](interfaces/Permission.md) - [PlatformKeeperTech](interfaces/PlatformKeeperTech.md) @@ -211,10 +205,11 @@ - [Provider](interfaces/Provider.md) - [PublicKey](interfaces/PublicKey.md) - [QueryResult](interfaces/QueryResult.md) +- [ReducedProfile](interfaces/ReducedProfile.md) - [ResourceAuthentication](interfaces/ResourceAuthentication.md) - [RoyaltyAttributes](interfaces/RoyaltyAttributes.md) - [SearchQuery](interfaces/SearchQuery.md) -- [ServiceAaveCredit](interfaces/ServiceAaveCredit.md) +- [SearchResults](interfaces/SearchResults.md) - [ServiceAccess](interfaces/ServiceAccess.md) - [ServiceAgreementTemplate](interfaces/ServiceAgreementTemplate.md) - [ServiceAgreementTemplateCondition](interfaces/ServiceAgreementTemplateCondition.md) @@ -234,6 +229,8 @@ - [StageInput](interfaces/StageInput.md) - [StageOutput](interfaces/StageOutput.md) - [StageTransformation](interfaces/StageTransformation.md) +- [SubscriptionBalance](interfaces/SubscriptionBalance.md) +- [SubscriptionMetadata](interfaces/SubscriptionMetadata.md) - [SubscriptionToken](interfaces/SubscriptionToken.md) - [TemplateMetadata](interfaces/TemplateMetadata.md) - [TxParameters](interfaces/TxParameters.md) @@ -245,14 +242,13 @@ - [WasAssociatedWithEvent](interfaces/WasAssociatedWithEvent.md) - [WasDerivedFromEvent](interfaces/WasDerivedFromEvent.md) - [WasGeneratedByEvent](interfaces/WasGeneratedByEvent.md) +- [Web3Clients](interfaces/Web3Clients.md) - [WebService](interfaces/WebService.md) - [WebServiceInternalAttributes](interfaces/WebServiceInternalAttributes.md) - [Workflow](interfaces/Workflow.md) ### Type Aliases -- [AaveConditionType](code-reference.md#aaveconditiontype) -- [BigNumberish](code-reference.md#bignumberish) - [ConditionMethod](code-reference.md#conditionmethod) - [ConditionType](code-reference.md#conditiontype) - [EncryptionMethod](code-reference.md#encryptionmethod) @@ -266,15 +262,16 @@ ### Variables -- [AaveCreditConditions](code-reference.md#aavecreditconditions) +- [ConditionStateNames](code-reference.md#conditionstatenames) +- [DEFAULT_ENCRYPTION_METHOD](code-reference.md#default_encryption_method) - [DEFAULT_REGISTRATION_ACTIVITY_ID](code-reference.md#default_registration_activity_id) - [DEPENDENCIES_RELEASE_CONDITION](code-reference.md#dependencies_release_condition) +- [DefaultPaymentAttributes](code-reference.md#defaultpaymentattributes) - [Logger](code-reference.md#logger) +- [NETWORK_FEE_DENOMINATOR](code-reference.md#network_fee_denominator) - [SALES_SERVICES](code-reference.md#sales_services) - [ZeroAddress](code-reference.md#zeroaddress) -- [aaveCreditTemplateServiceAgreementTemplate](code-reference.md#aavecredittemplateserviceagreementtemplate) - [apiPath](code-reference.md#apipath) -- [conditionStateNames](code-reference.md#conditionstatenames) - [defaultNeverminedNFTType](code-reference.md#defaultneverminednfttype) - [ercOfNeverminedNFTType](code-reference.md#ercofneverminednfttype) - [serviceIndex](code-reference.md#serviceindex) @@ -282,30 +279,60 @@ ### Functions +- [\_sleep](code-reference.md#_sleep) - [buildQuery](code-reference.md#buildquery) -- [convertEthersV6SignerToAccountSigner](code-reference.md#convertethersv6signertoaccountsigner) +- [checkContractExists](code-reference.md#checkcontractexists) +- [createKernelClient](code-reference.md#createkernelclient) +- [createSessionKey](code-reference.md#createsessionkey) +- [decryptMessage](code-reference.md#decryptmessage) +- [deployContractInstance](code-reference.md#deploycontractinstance) +- [deserializeECIES](code-reference.md#deserializeecies) - [didPrefixed](code-reference.md#didprefixed) +- [didToTokenId](code-reference.md#didtotokenid) - [didTransformer](code-reference.md#didtransformer) - [didZeroX](code-reference.md#didzerox) +- [encodeBytes32String](code-reference.md#encodebytes32string) +- [encryptMessage](code-reference.md#encryptmessage) - [eventToObject](code-reference.md#eventtoobject) - [formatEther](code-reference.md#formatether) - [formatUnits](code-reference.md#formatunits) - [generateId](code-reference.md#generateid) - [generateInstantiableConfigFromConfig](code-reference.md#generateinstantiableconfigfromconfig) +- [getBytes](code-reference.md#getbytes) +- [getChain](code-reference.md#getchain) +- [getChecksumAddress](code-reference.md#getchecksumaddress) - [getCircularReplacer](code-reference.md#getcircularreplacer) - [getConditionsByParams](code-reference.md#getconditionsbyparams) +- [getContractInstance](code-reference.md#getcontractinstance) +- [getInputsOfFunction](code-reference.md#getinputsoffunction) +- [getInputsOfFunctionFormatted](code-reference.md#getinputsoffunctionformatted) - [getNetworkName](code-reference.md#getnetworkname) - [getRoyaltyAttributes](code-reference.md#getroyaltyattributes) - [getRoyaltyScheme](code-reference.md#getroyaltyscheme) +- [getSessionKey](code-reference.md#getsessionkey) +- [getSignatureOfFunction](code-reference.md#getsignatureoffunction) +- [getWeb3ViemClients](code-reference.md#getweb3viemclients) +- [isTestnet](code-reference.md#istestnet) +- [isValidAddress](code-reference.md#isvalidaddress) - [jsonReplacer](code-reference.md#jsonreplacer) -- [makeAccount](code-reference.md#makeaccount) -- [makeAccounts](code-reference.md#makeaccounts) -- [makeBuffer](code-reference.md#makebuffer) +- [keccak256](code-reference.md#keccak256) +- [keccak256Packed](code-reference.md#keccak256packed) +- [keccak256WithEncode](code-reference.md#keccak256withencode) +- [makeRandomWallet](code-reference.md#makerandomwallet) +- [makeRandomWallets](code-reference.md#makerandomwallets) +- [makeWallet](code-reference.md#makewallet) +- [makeWallets](code-reference.md#makewallets) - [noDidPrefixed](code-reference.md#nodidprefixed) - [noZeroX](code-reference.md#nozerox) - [objectPromiseAll](code-reference.md#objectpromiseall) - [parseEther](code-reference.md#parseether) - [parseUnits](code-reference.md#parseunits) +- [searchAbiEvent](code-reference.md#searchabievent) +- [searchAbiFunction](code-reference.md#searchabifunction) +- [serializeECIES](code-reference.md#serializeecies) +- [urlSafeBase64Decode](code-reference.md#urlsafebase64decode) +- [urlSafeBase64Encode](code-reference.md#urlsafebase64encode) +- [zeroPadValue](code-reference.md#zeropadvalue) - [zeroX](code-reference.md#zerox) - [zeroXTransformer](code-reference.md#zeroxtransformer) @@ -317,45 +344,23 @@ Renames and re-exports [Logger](code-reference.md#logger) ## Type Aliases -### AaveConditionType - -Ƭ **AaveConditionType**: `"lockNft"` \| `"depositCollateral"` \| `"borrowCredit"` \| `"repayCredit"` \| `"withdrawCollateral"` \| `"distributeNft"` - -#### Defined in - -[src/keeper/contracts/defi/Service.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/Service.ts#L19) - ---- - -### BigNumberish - -Ƭ **BigNumberish**: `string` \| `Numeric` - -Any type that can be used where a big number is needed. - -#### Defined in - -node_modules/ethers/lib.commonjs/utils/maths.d.ts:9 - ---- - ### ConditionMethod Ƭ **ConditionMethod**: `"fulfill"` \| `"fulfillForDelegate"` #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L16) +[src/types/ContractTypes.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L10) --- ### ConditionType -Ƭ **ConditionType**: `"lockPayment"` \| `"escrowPayment"` \| `"nftHolder"` \| `"transferNFT"` \| [`AaveConditionType`](code-reference.md#aaveconditiontype) +Ƭ **ConditionType**: `"lockPayment"` \| `"escrowPayment"` \| `"nftHolder"` \| `"transferNFT"` #### Defined in -[src/ddo/types.ts:555](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L555) +[src/types/DDOTypes.ts:606](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L606) --- @@ -365,17 +370,17 @@ node_modules/ethers/lib.commonjs/utils/maths.d.ts:9 #### Defined in -[src/services/metadata/MetadataService.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L16) +[src/constants/AssetConstants.ts:4](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/constants/AssetConstants.ts#L4) --- ### EventResult -Ƭ **EventResult**: `Promise`<`any`[]\> +Ƭ **EventResult**: `Promise`\<`any`[]\> #### Defined in -[src/events/NeverminedEvent.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L25) +[src/types/EventTypes.ts:25](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/EventTypes.ts#L25) --- @@ -385,17 +390,17 @@ node_modules/ethers/lib.commonjs/utils/maths.d.ts:9 #### Defined in -[src/models/types.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L40) +[src/types/GeneralTypes.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L31) --- ### ParameterType -Ƭ **ParameterType**: `string` \| `number` \| `number`[] \| [`Account`](classes/Account.md) \| [`BabyjubPublicKey`](classes/BabyjubPublicKey.md) \| [`Service`](code-reference.md#service) \| [`ServiceType`](code-reference.md#servicetype) \| [`TxParameters`](interfaces/TxParameters.md) +Ƭ **ParameterType**: `string` \| `number` \| `number`[] \| [`NvmAccount`](classes/NvmAccount.md) \| [`BabyjubPublicKey`](classes/BabyjubPublicKey.md) \| [`Service`](code-reference.md#service) \| [`ServiceType`](code-reference.md#servicetype) \| [`TxParameters`](interfaces/TxParameters.md) #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L27) +[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L23) --- @@ -405,23 +410,23 @@ node_modules/ethers/lib.commonjs/utils/maths.d.ts:9 #### Type declaration -| Name | Type | -| :---------------------------------------------------------- | :---------------------------------------------------------------------------------------------------- | -| `attributes` | { `additionalInformation`: { `priceHighestDenomination`: `number` } ; `main`: { `price`: `string` } } | -| `attributes.additionalInformation` | { `priceHighestDenomination`: `number` } | -| `attributes.additionalInformation.priceHighestDenomination` | `number` | -| `attributes.main` | { `price`: `string` } | -| `attributes.main.price` | `string` | +| Name | Type | +| :---------------------------------------------------------- | :------------------------------------------------------------------------------------------------------- | +| `attributes` | \{ `additionalInformation`: \{ `priceHighestDenomination`: `number` } ; `main`: \{ `price`: `string` } } | +| `attributes.additionalInformation` | \{ `priceHighestDenomination`: `number` } | +| `attributes.additionalInformation.priceHighestDenomination` | `number` | +| `attributes.main` | \{ `price`: `string` } | +| `attributes.main.price` | `string` | #### Defined in -[src/ddo/types.ts:600](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L600) +[src/types/DDOTypes.ts:644](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L644) --- ### ProvenanceEvent -Ƭ **ProvenanceEvent**<`T`\>: `T` extends [`WAS_GENERATED_BY`](enums/ProvenanceMethod.md#was_generated_by) ? [`WasGeneratedByEvent`](interfaces/WasGeneratedByEvent.md) : `T` extends [`USED`](enums/ProvenanceMethod.md#used) ? [`UsedEvent`](interfaces/UsedEvent.md) : `T` extends [`WAS_DERIVED_FROM`](enums/ProvenanceMethod.md#was_derived_from) ? [`WasDerivedFromEvent`](interfaces/WasDerivedFromEvent.md) : `T` extends [`WAS_ASSOCIATED_WITH`](enums/ProvenanceMethod.md#was_associated_with) ? [`WasAssociatedWithEvent`](interfaces/WasAssociatedWithEvent.md) : `T` extends [`ACTED_ON_BEHALF`](enums/ProvenanceMethod.md#acted_on_behalf) ? [`ActedOnBehalfEvent`](interfaces/ActedOnBehalfEvent.md) : [`WasGeneratedByEvent`](interfaces/WasGeneratedByEvent.md) \| [`UsedEvent`](interfaces/UsedEvent.md) \| [`WasDerivedFromEvent`](interfaces/WasDerivedFromEvent.md) \| [`WasAssociatedWithEvent`](interfaces/WasAssociatedWithEvent.md) \| [`ActedOnBehalfEvent`](interfaces/ActedOnBehalfEvent.md) +Ƭ **ProvenanceEvent**\<`T`\>: `T` extends [`WAS_GENERATED_BY`](enums/ProvenanceMethod.md#was_generated_by) ? [`WasGeneratedByEvent`](interfaces/WasGeneratedByEvent.md) : `T` extends [`USED`](enums/ProvenanceMethod.md#used) ? [`UsedEvent`](interfaces/UsedEvent.md) : `T` extends [`WAS_DERIVED_FROM`](enums/ProvenanceMethod.md#was_derived_from) ? [`WasDerivedFromEvent`](interfaces/WasDerivedFromEvent.md) : `T` extends [`WAS_ASSOCIATED_WITH`](enums/ProvenanceMethod.md#was_associated_with) ? [`WasAssociatedWithEvent`](interfaces/WasAssociatedWithEvent.md) : `T` extends [`ACTED_ON_BEHALF`](enums/ProvenanceMethod.md#acted_on_behalf) ? [`ActedOnBehalfEvent`](interfaces/ActedOnBehalfEvent.md) : [`WasGeneratedByEvent`](interfaces/WasGeneratedByEvent.md) \| [`UsedEvent`](interfaces/UsedEvent.md) \| [`WasDerivedFromEvent`](interfaces/WasDerivedFromEvent.md) \| [`WasAssociatedWithEvent`](interfaces/WasAssociatedWithEvent.md) \| [`ActedOnBehalfEvent`](interfaces/ActedOnBehalfEvent.md) #### Type parameters @@ -431,13 +436,13 @@ node_modules/ethers/lib.commonjs/utils/maths.d.ts:9 #### Defined in -[src/keeper/contracts/Provenance.ts:82](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L82) +[src/keeper/contracts/Provenance.ts:80](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L80) --- ### Service -Ƭ **Service**<`T`\>: `T` extends `"authorization"` ? [`ServiceAuthorization`](interfaces/ServiceAuthorization.md) : `T` extends `"metadata"` ? [`ServiceMetadata`](interfaces/ServiceMetadata.md) : `T` extends `"nft-access"` ? [`ServiceNFTAccess`](interfaces/ServiceNFTAccess.md) : `T` extends `"nft-sales"` ? [`ServiceNFTSales`](interfaces/ServiceNFTSales.md) : `T` extends `"access"` ? [`ServiceAccess`](interfaces/ServiceAccess.md) : `T` extends `"compute"` ? [`ServiceCompute`](interfaces/ServiceCompute.md) : `T` extends `"aave-credit"` ? [`ServiceAaveCredit`](interfaces/ServiceAaveCredit.md) : `T` extends `"default"` ? [`ServiceCommon`](interfaces/ServiceCommon.md) : [`ServiceCommon`](interfaces/ServiceCommon.md) +Ƭ **Service**\<`T`\>: `T` extends `"authorization"` ? [`ServiceAuthorization`](interfaces/ServiceAuthorization.md) : `T` extends `"metadata"` ? [`ServiceMetadata`](interfaces/ServiceMetadata.md) : `T` extends `"nft-access"` ? [`ServiceNFTAccess`](interfaces/ServiceNFTAccess.md) : `T` extends `"nft-sales"` ? [`ServiceNFTSales`](interfaces/ServiceNFTSales.md) : `T` extends `"access"` ? [`ServiceAccess`](interfaces/ServiceAccess.md) : `T` extends `"compute"` ? [`ServiceCompute`](interfaces/ServiceCompute.md) : `T` extends `"default"` ? [`ServiceCommon`](interfaces/ServiceCommon.md) : [`ServiceCommon`](interfaces/ServiceCommon.md) #### Type parameters @@ -447,33 +452,43 @@ node_modules/ethers/lib.commonjs/utils/maths.d.ts:9 #### Defined in -[src/ddo/types.ts:719](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L719) +[src/types/DDOTypes.ts:765](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L765) --- ### ServiceType -Ƭ **ServiceType**: `"authorization"` \| `"metadata"` \| `"access"` \| `"compute"` \| `"workflow"` \| `"nft-access"` \| `"nft-sales"` \| `"aave-credit"` \| `"nft-sales-proof"` +Ƭ **ServiceType**: `"authorization"` \| `"metadata"` \| `"access"` \| `"compute"` \| `"workflow"` \| `"nft-access"` \| `"nft-sales"` \| `"nft-sales-proof"` #### Defined in -[src/ddo/types.ts:562](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L562) +[src/types/DDOTypes.ts:608](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L608) ## Variables -### AaveCreditConditions +### ConditionStateNames -• `Const` **AaveCreditConditions**: `string`[] +• `Const` **ConditionStateNames**: `string`[] #### Defined in -[src/keeper/contracts/defi/Service.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/Service.ts#L10) +[src/types/ContractTypes.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L8) + +--- + +### DEFAULT_ENCRYPTION_METHOD + +• `Const` **DEFAULT_ENCRYPTION_METHOD**: [`EncryptionMethod`](code-reference.md#encryptionmethod) + +#### Defined in + +[src/constants/AssetConstants.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/constants/AssetConstants.ts#L7) --- ### DEFAULT_REGISTRATION_ACTIVITY_ID -• `Const` **DEFAULT_REGISTRATION_ACTIVITY_ID**: `string` +• `Const` **DEFAULT_REGISTRATION_ACTIVITY_ID**: `"AssetRegistration"` Identifies the default Provenance Activity Id to be recorded on-chain in the DIDRegistry Smart Contract when an asset is registered. It associates to the new DID created the 'Asset Registration' activity. @@ -481,7 +496,7 @@ an asset is registered. It associates to the new DID created the 'Asset Registra #### Defined in -[src/keeper/contracts/Provenance.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L9) +[src/keeper/contracts/Provenance.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L7) --- @@ -491,67 +506,67 @@ an asset is registered. It associates to the new DID created the 'Asset Registra #### Defined in -[src/ddo/DDO.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L31) +[src/ddo/DDO.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L36) --- -### Logger +### DefaultPaymentAttributes -• `Const` **Logger**: `Logger` +• `Const` **DefaultPaymentAttributes**: [`PaymentAttributes`](interfaces/PaymentAttributes.md)[] #### Defined in -[src/utils/Logger.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/Logger.ts#L43) +[src/types/DDOTypes.ts:74](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L74) --- -### SALES_SERVICES +### Logger -• `Const` **SALES_SERVICES**: `string`[] +• `Const` **Logger**: `Logger` #### Defined in -[src/ddo/DDO.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/DDO.ts#L29) +[src/models/Logger.ts:43](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Logger.ts#L43) --- -### ZeroAddress +### NETWORK_FEE_DENOMINATOR -• `Const` **ZeroAddress**: `"0x0000000000000000000000000000000000000000"` +• `Const` **NETWORK_FEE_DENOMINATOR**: `10000n` #### Defined in -[src/utils/ConversionTypeHelpers.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/ConversionTypeHelpers.ts#L43) +[src/constants/AssetConstants.ts:1](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/constants/AssetConstants.ts#L1) --- -### aaveCreditTemplateServiceAgreementTemplate +### SALES_SERVICES -• `Const` **aaveCreditTemplateServiceAgreementTemplate**: [`ServiceAgreementTemplate`](interfaces/ServiceAgreementTemplate.md) +• `Const` **SALES_SERVICES**: `string`[] #### Defined in -[src/keeper/contracts/defi/AaveCreditTemplate.serviceAgreementTemplate.ts:3](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.serviceAgreementTemplate.ts#L3) +[src/ddo/DDO.ts:34](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L34) --- -### apiPath +### ZeroAddress -• `Const` **apiPath**: `"/api/v1/metadata/assets/ddo"` +• `Const` **ZeroAddress**: `"0x0000000000000000000000000000000000000000"` #### Defined in -[src/services/metadata/MetadataService.ts:6](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L6) +[src/constants/AssetConstants.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/constants/AssetConstants.ts#L10) --- -### conditionStateNames +### apiPath -• `Const` **conditionStateNames**: `string`[] +• `Const` **apiPath**: `"/api/v1/metadata/assets/ddo"` #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L42) +[src/services/metadata/MetadataService.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L8) --- @@ -568,7 +583,7 @@ an asset is registered. It associates to the new DID created the 'Asset Registra #### Defined in -[src/models/types.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L49) +[src/types/GeneralTypes.ts:40](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L40) --- @@ -587,7 +602,7 @@ an asset is registered. It associates to the new DID created the 'Asset Registra #### Defined in -[src/models/types.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L42) +[src/types/GeneralTypes.ts:33](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L33) --- @@ -599,7 +614,6 @@ an asset is registered. It associates to the new DID created the 'Asset Registra | Name | Type | | :-------------------- | :------- | -| `aave-credit` | `number` | | `access` | `number` | | `access-proof` | `number` | | `authorization` | `number` | @@ -617,7 +631,7 @@ an asset is registered. It associates to the new DID created the 'Asset Registra #### Defined in -[src/ddo/types.ts:573](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L573) +[src/types/DDOTypes.ts:618](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L618) --- @@ -627,20 +641,40 @@ an asset is registered. It associates to the new DID created the 'Asset Registra #### Defined in -[src/services/metadata/MetadataService.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L7) +[src/services/metadata/MetadataService.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L9) ## Functions +### \_sleep + +▸ **\_sleep**(`ms`): `Promise`\<`unknown`\> + +#### Parameters + +| Name | Type | +| :--- | :------- | +| `ms` | `number` | + +#### Returns + +`Promise`\<`unknown`\> + +#### Defined in + +[src/common/helpers.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/common/helpers.ts#L47) + +--- + ### buildQuery -▸ **buildQuery**(`url`, `query`): `any` +▸ **buildQuery**(`url`, `query?`): `any` #### Parameters -| Name | Type | -| :------ | :----------------------------------------- | -| `url` | `string` | -| `query` | [`SearchQuery`](interfaces/SearchQuery.md) | +| Name | Type | +| :------- | :----------------------------------------- | +| `url` | `string` | +| `query?` | [`SearchQuery`](interfaces/SearchQuery.md) | #### Returns @@ -648,27 +682,223 @@ an asset is registered. It associates to the new DID created the 'Asset Registra #### Defined in -[src/common/helpers.ts:4](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/helpers.ts#L4) +[src/common/helpers.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/common/helpers.ts#L7) + +--- + +### checkContractExists + +▸ **checkContractExists**(`contractAddress`, `client`): `Promise`\<`boolean`\> + +Given a contract address it checks if the contract exists on the blockchain. + +#### Parameters + +| Name | Type | Description | +| :-------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `contractAddress` | `string` | the contract address | +| `client` | `Object` | the client to interact with the blockchain | +| `client.account` | `undefined` | The Account of the Client. | +| `client.batch?` | `Object` | Flags for batch settings. | +| `client.batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `client.cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `client.call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | Executes a new message call immediately without submitting a transaction to the network. - Docs: https://viem.sh/docs/actions/public/call - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const data = await client.call({ account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', }) ` | +| `client.ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `client.chain` | `undefined` \| `Chain` | Chain for the client. | +| `client.createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createBlockFilter - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) **`Example`** `ts import { createPublicClient, createBlockFilter, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await createBlockFilter(client) // { id: "0x345a6572337856574a76364e457a4366", type: 'block' } ` | +| `client.createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | Creates a Filter to retrieve event logs that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges) or [`getFilterLogs`](https://viem.sh/docs/actions/public/getFilterLogs). - Docs: https://viem.sh/docs/contract/createContractEventFilter **`Example`** `ts import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), }) ` | +| `client.createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createEventFilter - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', }) ` | +| `client.createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() // { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } ` | +| `client.estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | Estimates the gas required to successfully execute a contract write function call. - Docs: https://viem.sh/docs/contract/estimateContractGas **`Remarks`** Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **`Example`** `ts import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gas = await client.estimateContractGas({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint() public']), functionName: 'mint', account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', }) ` | +| `client.estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | Returns an estimate for the fees per gas for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateFeesPerGas() // { maxFeePerGas: ..., maxPriorityFeePerGas: ... } ` | +| `client.estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | Estimates the gas necessary to complete a transaction without submitting it to the network. - Docs: https://viem.sh/docs/actions/public/estimateGas - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) **`Example`** `ts import { createPublicClient, http, parseEther } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasEstimate = await client.estimateGas({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: parseEther('1'), }) ` | +| `client.estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | Returns an estimate for the max priority fee per gas (in wei) for a transaction to be included in the next block. - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() // 10000000n ` | +| `client.extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `client.getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | Returns the balance of an address in wei. - Docs: https://viem.sh/docs/actions/public/getBalance - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) **`Remarks`** You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). `ts const balance = await getBalance(client, { address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', blockTag: 'safe' }) const balanceAsEther = formatEther(balance) // "6.942" ` **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const balance = await client.getBalance({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) // 10000000000000000000000n (wei) ` | +| `client.getBlobBaseFee` | () => `Promise`\<`bigint`\> | Returns the base fee per blob gas in wei. - Docs: https://viem.sh/docs/actions/public/getBlobBaseFee - JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getBlobBaseFee } from 'viem/public' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blobBaseFee = await client.getBlobBaseFee() ` | +| `client.getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | Returns information about a block at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlock - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/fetching-blocks - JSON-RPC Methods: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getBlock() ` | +| `client.getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | Returns the number of the most recent block seen. - Docs: https://viem.sh/docs/actions/public/getBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/fetching-blocks - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const blockNumber = await client.getBlockNumber() // 69420n ` | +| `client.getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | Returns the number of Transactions at a block number, hash, or tag. - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount - JSON-RPC Methods: - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const count = await client.getBlockTransactionCount() ` | +| `client.getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | Retrieves the bytecode at an address. - Docs: https://viem.sh/docs/contract/getBytecode - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getBytecode({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', }) ` | +| `client.getChainId` | () => `Promise`\<`number`\> | Returns the chain ID associated with the current network. - Docs: https://viem.sh/docs/actions/public/getChainId - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const chainId = await client.getChainId() // 1 ` | +| `client.getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | Returns a list of event logs emitted by a contract. - Docs: https://viem.sh/docs/actions/public/getContractEvents - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { wagmiAbi } from './abi' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getContractEvents(client, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: wagmiAbi, eventName: 'Transfer' }) ` | +| `client.getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | Gets address for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAddress - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **`Remarks`** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAddress = await client.getEnsAddress({ name: normalize('wevm.eth'), }) // '0xd2135CfB216b74109775236E36d4b433F1DF507B' ` | +| `client.getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | Gets the avatar of an ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **`Remarks`** Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensAvatar = await client.getEnsAvatar({ name: normalize('wevm.eth'), }) // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' ` | +| `client.getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | Gets primary name for specified address. - Docs: https://viem.sh/docs/ens/actions/getEnsName - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **`Remarks`** Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const ensName = await client.getEnsName({ address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', }) // 'wevm.eth' ` | +| `client.getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | Gets resolver for ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **`Remarks`** Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const resolverAddress = await client.getEnsResolver({ name: normalize('wevm.eth'), }) // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' ` | +| `client.getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | Gets a text record for specified ENS name. - Docs: https://viem.sh/docs/ens/actions/getEnsResolver - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens **`Remarks`** Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { normalize } from 'viem/ens' const client = createPublicClient({ chain: mainnet, transport: http(), }) const twitterRecord = await client.getEnsText({ name: normalize('wevm.eth'), key: 'com.twitter', }) // 'wagmi_sh' ` | +| `client.getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | Returns a collection of historical gas information. - Docs: https://viem.sh/docs/actions/public/getFeeHistory - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const feeHistory = await client.getFeeHistory({ blockCount: 4, rewardPercentiles: [25, 75], }) ` | +| `client.getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. - Docs: https://viem.sh/docs/actions/public/getFilterChanges - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) **`Remarks`** A Filter can be created from the following actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) Depending on the type of filter, the return value will be different: - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. - If the filter was created with `createBlockFilter`, it returns a list of block hashes. **`Example`** `ts // Blocks import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createBlockFilter() const hashes = await client.getFilterChanges({ filter }) ` **`Example`** `ts // Contract Events import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createContractEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), eventName: 'Transfer', }) const logs = await client.getFilterChanges({ filter }) ` **`Example`** `ts // Raw Events import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterChanges({ filter }) ` **`Example`** `ts // Transactions import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createPendingTransactionFilter() const hashes = await client.getFilterChanges({ filter }) ` | +| `client.getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | Returns a list of event logs since the filter was created. - Docs: https://viem.sh/docs/actions/public/getFilterLogs - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) **`Remarks`** `getFilterLogs` is only compatible with **event filters**. **`Example`** `ts import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const filter = await client.createEventFilter({ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), }) const logs = await client.getFilterLogs({ filter }) ` | +| `client.getGasPrice` | () => `Promise`\<`bigint`\> | Returns the current price of gas (in wei). - Docs: https://viem.sh/docs/actions/public/getGasPrice - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const gasPrice = await client.getGasPrice() ` | +| `client.getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | Returns a list of event logs matching the provided parameters. - Docs: https://viem.sh/docs/actions/public/getLogs - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/filters-and-logs/event-logs - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) **`Example`** `ts import { createPublicClient, http, parseAbiItem } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const logs = await client.getLogs() ` | +| `client.getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | Returns the account and storage values of the specified account including the Merkle-proof. - Docs: https://viem.sh/docs/actions/public/getProof - JSON-RPC Methods: - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const block = await client.getProof({ address: '0x...', storageKeys: ['0x...'], }) ` | +| `client.getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | Returns the value from a storage slot at a given address. - Docs: https://viem.sh/docs/contract/getStorageAt - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { getStorageAt } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const code = await client.getStorageAt({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', slot: toHex(0), }) ` | +| `client.getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. - Docs: https://viem.sh/docs/actions/public/getTransaction - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transaction = await client.getTransaction({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) ` | +| `client.getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | Returns the number of blocks passed (confirmations) since the transaction was processed on a block. - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const confirmations = await client.getTransactionConfirmations({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) ` | +| `client.getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. - Docs: https://viem.sh/docs/actions/public/getTransactionCount - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionCount = await client.getTransactionCount({ address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) ` | +| `client.getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.getTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) ` | +| `client.key` | `string` | A key for the client. | +| `client.multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). - Docs: https://viem.sh/docs/contract/multicall **`Example`** `ts import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const abi = parseAbi([ 'function balanceOf(address) view returns (uint256)', 'function totalSupply() view returns (uint256)', ]) const result = await client.multicall({ contracts: [ { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }, { address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi, functionName: 'totalSupply', }, ], }) // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] ` | +| `client.name` | `string` | A name for the client. | +| `client.pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `client.prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | Prepares a transaction request for signing. - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest **`Example`** `ts import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', to: '0x0000000000000000000000000000000000000000', value: 1n, }) ` **`Example`** `ts // Account Hoisting import { createWalletClient, http } from 'viem' import { privateKeyToAccount } from 'viem/accounts' import { mainnet } from 'viem/chains' const client = createWalletClient({ account: privateKeyToAccount('0x…'), chain: mainnet, transport: custom(window.ethereum), }) const request = await client.prepareTransactionRequest({ to: '0x0000000000000000000000000000000000000000', value: 1n, }) ` | +| `client.readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | Calls a read-only function on a contract, and returns the response. - Docs: https://viem.sh/docs/contract/readContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/reading-contracts **`Remarks`** A "read-only" function (constant function) on a Solidity contract is denoted by a `view` or `pure` keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas. Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`call` action](https://viem.sh/docs/actions/public/call) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **`Example`** `ts import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' import { readContract } from 'viem/contract' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.readContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function balanceOf(address) view returns (uint256)']), functionName: 'balanceOf', args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], }) // 424122n ` | +| `client.request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `client.sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | Sends a **signed** transaction to the network - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) **`Example`** `ts import { createWalletClient, custom } from 'viem' import { mainnet } from 'viem/chains' import { sendRawTransaction } from 'viem/wallet' const client = createWalletClient({ chain: mainnet, transport: custom(window.ethereum), }) const hash = await client.sendRawTransaction({ serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' }) ` | +| `client.simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. - Docs: https://viem.sh/docs/contract/simulateContract - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/writing-to-contracts **`Remarks`** This function does not require gas to execute and _**does not**_ change the state of the blockchain. It is almost identical to [`readContract`](https://viem.sh/docs/contract/readContract), but also supports contract write functions. Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`call` action](https://viem.sh/docs/actions/public/call) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const result = await client.simulateContract({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['function mint(uint32) view returns (uint32)']), functionName: 'mint', args: ['69420'], account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', }) ` | +| `client.transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `client.type` | `string` | The type of client. | +| `client.uid` | `string` | A unique ID for the client. | +| `client.uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | Destroys a Filter that was created from one of the following Actions: - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) - Docs: https://viem.sh/docs/actions/public/uninstallFilter - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' const filter = await client.createPendingTransactionFilter() const uninstalled = await client.uninstallFilter({ filter }) // true ` | +| `client.verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `client.verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `client.waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt - Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/sending-transactions - JSON-RPC Methods: - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. - If a Transaction has been replaced: - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions - Checks if one of the Transactions is a replacement - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). **`Remarks`** The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. There are 3 types of Transaction Replacement reasons: - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const transactionReceipt = await client.waitForTransactionReceipt({ hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', }) ` | +| `client.watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | Watches and returns incoming block numbers. - Docs: https://viem.sh/docs/actions/public/watchBlockNumber - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlockNumber({ onBlockNumber: (blockNumber) => console.log(blockNumber), }) ` | +| `client.watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | Watches and returns information for incoming blocks. - Docs: https://viem.sh/docs/actions/public/watchBlocks - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/watching-blocks - JSON-RPC Methods: - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchBlocks({ onBlock: (block) => console.log(block), }) ` | +| `client.watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | Watches and returns emitted contract event logs. - Docs: https://viem.sh/docs/contract/watchContractEvent **`Remarks`** This Action will batch up all the event logs found within the [`pollingInterval`](https://viem.sh/docs/contract/watchContractEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/contract/watchContractEvent#onLogs). `watchContractEvent` will attempt to create an [Event Filter](https://viem.sh/docs/contract/createContractEventFilter) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **`Example`** `ts import { createPublicClient, http, parseAbi } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchContractEvent({ address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), eventName: 'Transfer', args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, onLogs: (logs) => console.log(logs), }) ` | +| `client.watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). - Docs: https://viem.sh/docs/actions/public/watchEvent - JSON-RPC Methods: - **RPC Provider supports `eth_newFilter`:** - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). - **RPC Provider does not support `eth_newFilter`:** - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. **`Remarks`** This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = client.watchEvent({ onLogs: (logs) => console.log(logs), }) ` | +| `client.watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | Watches and returns pending transaction hashes. - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions - JSON-RPC Methods: - When `poll: true` - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. **`Remarks`** This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). **`Example`** `ts import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http(), }) const unwatch = await client.watchPendingTransactions({ onTransactions: (hashes) => console.log(hashes), }) ` | + +#### Returns + +`Promise`\<`boolean`\> + +true if the contract exists and false otherwise + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:213](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L213) + +--- + +### createKernelClient + +▸ **createKernelClient**(`signer`, `chainId`, `zeroDevProjectId`): `Promise`\<`KernelAccountClient`\<`"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"`, `Transport`, `Chain`, `any`\>\> + +It creates a ZeroDev Kernel client. + +#### Parameters + +| Name | Type | Description | +| :----------------- | :------- | :----------------------------------------------------------------- | +| `signer` | `any` | the signer account | +| `chainId` | `number` | the chain id | +| `zeroDevProjectId` | `string` | the zero dev project id, you can get it from the ZeroDev dashboard | + +#### Returns + +`Promise`\<`KernelAccountClient`\<`"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"`, `Transport`, `Chain`, `any`\>\> + +the kernel client + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:533](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L533) + +--- + +### createSessionKey + +▸ **createSessionKey**(`signer`, `publicClient`, `permissions`): `Promise`\<`string`\> + +It creates a ZeroDev Session Key with some specific permissions + +#### Parameters + +| Name | Type | Description | +| :------------- | :------ | :---------------------------------------------- | +| `signer` | `any` | the signer account | +| `publicClient` | `any` | the blockchain client | +| `permissions` | `any`[] | the permissions to configure in the session key | + +#### Returns + +`Promise`\<`string`\> + +the session key serialized + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:581](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L581) + +--- + +### decryptMessage + +▸ **decryptMessage**(`encryptedMessage`, `privateKey`): `Promise`\<`string`\> + +#### Parameters + +| Name | Type | +| :----------------- | :------- | +| `encryptedMessage` | `string` | +| `privateKey` | `any` | + +#### Returns + +`Promise`\<`string`\> + +#### Defined in + +[src/common/helpers.ts:81](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/common/helpers.ts#L81) + +--- + +### deployContractInstance + +▸ **deployContractInstance**(`artifact`, `from`, `args?`, `client`): `Promise`\<\{ `abi`: `Abi` ; `address`: \`0x$\{string}\` ; `createEventFilter`: {} ; `estimateGas`: {} & {} ; `getEvents`: {} ; `read`: {} ; `simulate`: {} ; `watchEvent`: {} ; `write`: {} }\> + +Given an artifact, it deploys the contract and returns the contract instance. + +#### Parameters + +| Name | Type | Default value | Description | +| :------------------ | :----------------------------------------- | :------------ | :---------------------------------------------------------------- | +| `artifact` | `Object` | `undefined` | the contract artifact | +| `artifact.abi` | `Abi` | `undefined` | - | +| `artifact.bytecode` | \`0x$\{string}\` | `undefined` | - | +| `artifact.name?` | `string` | `undefined` | - | +| `from` | [`NvmAccount`](classes/NvmAccount.md) | `undefined` | the deployer account | +| `args` | `string`[] | `[]` | parameters to be passed to the contract during the initialization | +| `client` | [`Web3Clients`](interfaces/Web3Clients.md) | `undefined` | the client to interact with the blockchain | + +#### Returns + +`Promise`\<\{ `abi`: `Abi` ; `address`: \`0x$\{string}\` ; `createEventFilter`: {} ; `estimateGas`: {} & {} ; `getEvents`: {} ; `read`: {} ; `simulate`: {} ; `watchEvent`: {} ; `write`: {} }\> + +a contract instance + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:150](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L150) --- -### convertEthersV6SignerToAccountSigner +### deserializeECIES -▸ **convertEthersV6SignerToAccountSigner**(`signer`): `SmartAccountSigner` +▸ **deserializeECIES**(`serialized`): `Object` #### Parameters -| Name | Type | -| :------- | :------------------- | -| `signer` | `Signer` \| `Wallet` | +| Name | Type | +| :----------- | :---- | +| `serialized` | `any` | #### Returns -`SmartAccountSigner` +`Object` + +| Name | Type | +| :--------------- | :------- | +| `ciphertext` | `Buffer` | +| `ephemPublicKey` | `Buffer` | +| `iv` | `Buffer` | +| `mac` | `Buffer` | #### Defined in -[src/keeper/utils.ts:100](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L100) +[src/common/helpers.ts:99](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/common/helpers.ts#L99) --- @@ -688,7 +918,32 @@ an asset is registered. It associates to the new DID created the 'Asset Registra #### Defined in -[src/utils/ConversionTypeHelpers.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/ConversionTypeHelpers.ts#L13) +[src/utils/ConversionTypeHelpers.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/ConversionTypeHelpers.ts#L13) + +--- + +### didToTokenId + +▸ **didToTokenId**(`did`): `bigint` + +It converts a DID to a Token ID. +This is useful because in the Solidity Smart contracts the tokenId is a uint256. + +#### Parameters + +| Name | Type | Description | +| :---- | :------- | :--------------------------------- | +| `did` | `string` | the unique identifier of the asset | + +#### Returns + +`bigint` + +the token id in a bigint format + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:320](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L320) --- @@ -709,13 +964,13 @@ an asset is registered. It associates to the new DID created the 'Asset Registra #### Defined in -[src/utils/ConversionTypeHelpers.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/ConversionTypeHelpers.ts#L16) +[src/utils/ConversionTypeHelpers.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/ConversionTypeHelpers.ts#L16) --- ### didZeroX -▸ **didZeroX**(`input`): `string` +▸ **didZeroX**(`input`): \`0x$\{string}\` #### Parameters @@ -725,11 +980,56 @@ an asset is registered. It associates to the new DID created the 'Asset Registra #### Returns -`string` +\`0x$\{string}\` + +#### Defined in + +[src/utils/ConversionTypeHelpers.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/ConversionTypeHelpers.ts#L22) + +--- + +### encodeBytes32String + +▸ **encodeBytes32String**(`message`): \`0x$\{string}\` + +Encodes a UTF-8 string into a hex string + +#### Parameters + +| Name | Type | Description | +| :-------- | :------- | :------------------- | +| `message` | `string` | the string to encode | + +#### Returns + +\`0x$\{string}\` + +the hex string + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:367](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L367) + +--- + +### encryptMessage + +▸ **encryptMessage**(`message`, `receiverPublicKey`): `Promise`\<`string`\> + +#### Parameters + +| Name | Type | +| :------------------ | :------- | +| `message` | `string` | +| `receiverPublicKey` | `string` | + +#### Returns + +`Promise`\<`string`\> #### Defined in -[src/utils/ConversionTypeHelpers.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/ConversionTypeHelpers.ts#L22) +[src/common/helpers.ts:74](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/common/helpers.ts#L74) --- @@ -749,7 +1049,7 @@ an asset is registered. It associates to the new DID created the 'Asset Registra #### Defined in -[src/utils/Events.ts:1](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/Events.ts#L1) +[src/utils/Events.ts:1](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/Events.ts#L1) --- @@ -761,9 +1061,9 @@ Converts a _wei_ value into _ether_. #### Parameters -| Name | Type | Description | -| :------ | :----------------------------------------------- | :------------------- | -| `value` | [`BigNumberish`](code-reference.md#bignumberish) | The value to format. | +| Name | Type | Description | +| :------ | :------- | :------------------- | +| `value` | `bigint` | The value to format. | #### Returns @@ -782,7 +1082,7 @@ formatEther(value) #### Defined in -[src/utils/UnitConversion.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/UnitConversion.ts#L57) +[src/nevermined/utils/BlockchainViemUtils.ts:520](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L520) --- @@ -794,10 +1094,10 @@ Returns a string representation of value formatted with _decimal_ digits. #### Parameters -| Name | Type | Default value | Description | -| :--------- | :----------------------------------------------- | :------------ | :------------------- | -| `value` | [`BigNumberish`](code-reference.md#bignumberish) | `undefined` | The value to format. | -| `decimals` | `number` | `18` | - | +| Name | Type | Default value | Description | +| :--------- | :------- | :------------ | :------------------- | +| `value` | `bigint` | `undefined` | The value to format. | +| `decimals` | `number` | `18` | - | #### Returns @@ -816,7 +1116,7 @@ formatUnits(oneEther, 18) #### Defined in -[src/utils/UnitConversion.ts:75](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/UnitConversion.ts#L75) +[src/nevermined/utils/BlockchainViemUtils.ts:483](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L483) --- @@ -836,45 +1136,114 @@ formatUnits(oneEther, 18) #### Defined in -[src/utils/GeneratorHelpers.ts:3](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/GeneratorHelpers.ts#L3) +[src/common/helpers.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/common/helpers.ts#L39) --- ### generateInstantiableConfigFromConfig -▸ **generateInstantiableConfigFromConfig**(`config`): `Promise`<`Partial`<[`InstantiableConfig`](interfaces/InstantiableConfig.md)\>\> +▸ **generateInstantiableConfigFromConfig**(`config`, `loadCore?`): `Promise`\<`Partial`\<[`InstantiableConfig`](interfaces/InstantiableConfig.md)\>\> #### Parameters -| Name | Type | -| :------- | :-------------------------------------------------- | -| `config` | [`NeverminedOptions`](classes/NeverminedOptions.md) | +| Name | Type | Default value | +| :--------- | :-------------------------------------------------- | :------------ | +| `config` | [`NeverminedOptions`](classes/NeverminedOptions.md) | `undefined` | +| `loadCore` | `boolean` | `true` | #### Returns -`Promise`<`Partial`<[`InstantiableConfig`](interfaces/InstantiableConfig.md)\>\> +`Promise`\<`Partial`\<[`InstantiableConfig`](interfaces/InstantiableConfig.md)\>\> + +#### Defined in + +[src/Instantiable.abstract.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L29) + +--- + +### getBytes + +▸ **getBytes**(`message`): `Uint8Array` + +Encodes a UTF-8 string into a byte array. + +#### Parameters + +| Name | Type | Description | +| :-------- | :------- | :------------------- | +| `message` | `string` | the string to encode | + +#### Returns + +`Uint8Array` + +the encoded byte array #### Defined in -[src/Instantiable.abstract.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L16) +[src/nevermined/utils/BlockchainViemUtils.ts:348](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L348) + +--- + +### getChain + +▸ **getChain**(`networkId`): `Chain` + +#### Parameters + +| Name | Type | +| :---------- | :---------------------- | +| `networkId` | `undefined` \| `number` | + +#### Returns + +`Chain` + +#### Defined in + +[src/utils/Network.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/Network.ts#L148) + +--- + +### getChecksumAddress + +▸ **getChecksumAddress**(`address`): `string` + +Given an address it returns that address in checksum format. + +#### Parameters + +| Name | Type | Description | +| :-------- | :------- | :---------- | +| `address` | `string` | the address | + +#### Returns + +`string` + +the same address in checksum format + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:329](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L329) --- ### getCircularReplacer -▸ **getCircularReplacer**(): (`key`: `any`, `value`: `any`) => `any` +▸ **getCircularReplacer**(): (`_key`: `any`, `value`: `any`) => `any` #### Returns `fn` -▸ (`key`, `value`): `any` +▸ (`_key`, `value`): `any` ##### Parameters | Name | Type | | :------ | :---- | -| `key` | `any` | +| `_key` | `any` | | `value` | `any` | ##### Returns @@ -883,7 +1252,7 @@ formatUnits(oneEther, 18) #### Defined in -[src/common/helpers.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/helpers.ts#L18) +[src/common/helpers.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/common/helpers.ts#L21) --- @@ -895,22 +1264,22 @@ Fill some static parameters that depends on the metadata. #### Parameters -| Name | Type | Default value | Description | -| :---------------------- | :------------------------------------------------------------------------------------------------ | :------------ | :----------------------- | -| `serviceType` | [`ServiceType`](code-reference.md#servicetype) | `undefined` | - | -| `conditions` | readonly [`ServiceAgreementTemplateCondition`](interfaces/ServiceAgreementTemplateCondition.md)[] | `undefined` | Conditions to fill. | -| `owner` | `string` | `undefined` | - | -| `assetPrice` | [`AssetPrice`](classes/AssetPrice.md) | `undefined` | Rewards distribution | -| `did?` | `string` | `undefined` | - | -| `erc20TokenContract?` | `string` | `undefined` | Number of nfts to handle | -| `nftTokenContract?` | `string` | `undefined` | Number of nfts to handle | -| `nftHolder?` | `string` | `undefined` | - | -| `nftAmount` | `bigint` | `undefined` | Number of nfts to handle | -| `nftTransfer` | `boolean` | `false` | - | -| `duration` | `number` | `0` | - | -| `fulfillAccessTimeout` | `number` | `0` | - | -| `fulfillAccessTimelock` | `number` | `0` | - | -| `tokenId` | `string` | `''` | - | +| Name | Type | Default value | Description | +| :---------------------- | :------------------------------------------------------------------------------------------------ | :------------ | :-------------------------------------------------------------------------------------- | +| `serviceType` | [`ServiceType`](code-reference.md#servicetype) | `undefined` | The type of the service "access", "nft-sales", etc. | +| `conditions` | readonly [`ServiceAgreementTemplateCondition`](interfaces/ServiceAgreementTemplateCondition.md)[] | `undefined` | List of conditions to fill. | +| `owner` | `string` | `undefined` | Owner of the asset. | +| `assetPrice` | [`AssetPrice`](classes/AssetPrice.md) | `undefined` | Rewards distribution | +| `did?` | `string` | `undefined` | The DID of the asset. | +| `erc20TokenContract?` | `string` | `undefined` | The address of the ERC20 token contract used for payment (0x0 address if native token). | +| `nftTokenContract?` | `string` | `undefined` | The address of the NFT token contract used. | +| `nftHolder?` | `string` | `undefined` | The address of the NFT holder. | +| `nftAmount` | `bigint` | `undefined` | Number of nfts to handle | +| `nftTransfer` | `boolean` | `false` | If the nft will be transferred (true) or minted (false) | +| `duration` | `number` | `0` | Duration if it's a subscription | +| `fulfillAccessTimeout` | `number` | `0` | Timeout for the fulfill of the access service | +| `fulfillAccessTimelock` | `number` | `0` | Timelock for the fulfill of the access service | +| `tokenId` | `string` | `''` | The token id of the NFT | #### Returns @@ -920,13 +1289,91 @@ Filled conditions. #### Defined in -[src/utils/DDOHelpers.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/DDOHelpers.ts#L25) +[src/ddo/DDO.ts:58](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/ddo/DDO.ts#L58) + +--- + +### getContractInstance + +▸ **getContractInstance**(`contractAddress`, `abi`, `client`): `Promise`\<\{ `abi`: `Abi` ; `address`: \`0x$\{string}\` ; `createEventFilter`: {} ; `estimateGas`: {} & {} ; `getEvents`: {} ; `read`: {} ; `simulate`: {} ; `watchEvent`: {} ; `write`: {} }\> + +Given an already deployed contract address and the ABI, it returns the contract instance. + +#### Parameters + +| Name | Type | Description | +| :---------------- | :----------------------------------------- | :----------------------------------------- | +| `contractAddress` | `string` | the contract address | +| `abi` | `Abi` | the contract artifact | +| `client` | [`Web3Clients`](interfaces/Web3Clients.md) | the client to interact with the blockchain | + +#### Returns + +`Promise`\<\{ `abi`: `Abi` ; `address`: \`0x$\{string}\` ; `createEventFilter`: {} ; `estimateGas`: {} & {} ; `getEvents`: {} ; `read`: {} ; `simulate`: {} ; `watchEvent`: {} ; `write`: {} }\> + +a contract instance + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:199](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L199) + +--- + +### getInputsOfFunction + +▸ **getInputsOfFunction**(`abi`, `funcName`, `args?`): readonly `AbiParameter`[] + +It searchs an ABI function in the ABI and return the inputs. + +#### Parameters + +| Name | Type | Default value | Description | +| :--------- | :------- | :------------ | :----------------------- | +| `abi` | `Abi` | `undefined` | the ABI of the contract | +| `funcName` | `string` | `undefined` | the function name | +| `args` | `any`[] | `[]` | the args of the function | + +#### Returns + +readonly `AbiParameter`[] + +the function found + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:292](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L292) + +--- + +### getInputsOfFunctionFormatted + +▸ **getInputsOfFunctionFormatted**(`abi`, `funcName`, `args?`): \{ `name`: `undefined` \| `string` = input.name; `value`: `any` }[] + +It searchs an ABI function in the ABI and return the inputs formatted. + +#### Parameters + +| Name | Type | Default value | Description | +| :--------- | :------- | :------------ | :----------------------- | +| `abi` | `Abi` | `undefined` | the ABI of the contract | +| `funcName` | `string` | `undefined` | the function name | +| `args` | `any`[] | `[]` | the args of the function | + +#### Returns + +\{ `name`: `undefined` \| `string` = input.name; `value`: `any` }[] + +the function found + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:303](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L303) --- ### getNetworkName -▸ **getNetworkName**(`networkId`): `Promise`<`string`\> +▸ **getNetworkName**(`networkId`): `Promise`\<`string`\> #### Parameters @@ -936,11 +1383,11 @@ Filled conditions. #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/utils.ts:5](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L5) +[src/utils/Network.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/Network.ts#L19) --- @@ -966,13 +1413,13 @@ The RoyaltyAttributes instance #### Defined in -[src/nevermined/api/AssetsApi.ts:96](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L96) +[src/nevermined/api/AssetsApi.ts:62](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L62) --- ### getRoyaltyScheme -▸ **getRoyaltyScheme**(`nvm`, `kind`): [`RoyaltyScheme`](classes/RoyaltyScheme.md) +▸ **getRoyaltyScheme**(`nvm`, `kind`): [`RoyaltyScheme`](classes/RoyaltyScheme.md) \| `undefined` It gets the on-chain royalties scheme @@ -985,25 +1432,141 @@ It gets the on-chain royalties scheme #### Returns -[`RoyaltyScheme`](classes/RoyaltyScheme.md) +[`RoyaltyScheme`](classes/RoyaltyScheme.md) \| `undefined` The royalty scheme #### Defined in -[src/nevermined/api/AssetsApi.ts:81](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L81) +[src/nevermined/api/AssetsApi.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L47) + +--- + +### getSessionKey + +▸ **getSessionKey**(`serializedSessionKey`, `zeroDevProjectId`, `publicClient`): `Promise`\<[`NvmAccount`](classes/NvmAccount.md)\> + +Given a serialized session key it reconstructs the NvmAccount represented by the session key. + +#### Parameters + +| Name | Type | Description | +| :--------------------- | :------- | :------------------------- | +| `serializedSessionKey` | `string` | the serialized session key | +| `zeroDevProjectId` | `string` | the zero dev project id | +| `publicClient` | `any` | the blockchain client | + +#### Returns + +`Promise`\<[`NvmAccount`](classes/NvmAccount.md)\> + +the NvmAccount represented by the session key + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:616](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L616) + +--- + +### getSignatureOfFunction + +▸ **getSignatureOfFunction**(`abi`, `funcName`, `args?`): `AbiFunction` + +It searchs an ABI function in the ABI. + +#### Parameters + +| Name | Type | Default value | Description | +| :--------- | :------- | :------------ | :----------------------- | +| `abi` | `Abi` | `undefined` | the ABI of the contract | +| `funcName` | `string` | `undefined` | the function name | +| `args` | `any`[] | `[]` | the args of the function | + +#### Returns + +`AbiFunction` + +the function found + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:281](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L281) + +--- + +### getWeb3ViemClients + +▸ **getWeb3ViemClients**(`config?`): `Promise`\<[`Web3Clients`](interfaces/Web3Clients.md)\> + +#### Parameters + +| Name | Type | +| :------- | :--------------------------------------------------------------- | +| `config` | `Partial`\<[`NeverminedOptions`](classes/NeverminedOptions.md)\> | + +#### Returns + +`Promise`\<[`Web3Clients`](interfaces/Web3Clients.md)\> + +#### Defined in + +[src/Instantiable.abstract.ts:49](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L49) + +--- + +### isTestnet + +▸ **isTestnet**(`networkId`): `boolean` + +#### Parameters + +| Name | Type | +| :---------- | :------- | +| `networkId` | `number` | + +#### Returns + +`boolean` + +#### Defined in + +[src/utils/Network.ts:83](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/Network.ts#L83) + +--- + +### isValidAddress + +▸ **isValidAddress**(`address`): `boolean` + +It checks if the address is a valid address. + +#### Parameters + +| Name | Type | Description | +| :-------- | :------- | :------------------- | +| `address` | `string` | the address to check | + +#### Returns + +`boolean` + +true of the address is valid + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:338](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L338) --- ### jsonReplacer -▸ **jsonReplacer**(`key`, `value`): `any` +▸ **jsonReplacer**(`_key`, `value`): `any` #### Parameters | Name | Type | | :------ | :---- | -| `key` | `any` | +| `_key` | `any` | | `value` | `any` | #### Returns @@ -1012,70 +1575,173 @@ The royalty scheme #### Defined in -[src/common/helpers.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/helpers.ts#L31) +[src/common/helpers.ts:34](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/common/helpers.ts#L34) + +--- + +### keccak256 + +▸ **keccak256**(`seed`): `string` + +It hashes a string using keccak256. + +#### Parameters + +| Name | Type | Description | +| :----- | :------- | :----------------- | +| `seed` | `string` | the string to hash | + +#### Returns + +`string` + +the hash + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:422](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L422) + +--- + +### keccak256Packed + +▸ **keccak256Packed**(`types`, `values`): `string` + +It encodes and hashes a list of primitive values into an ABI-encoded hex value. + +#### Parameters + +| Name | Type | Description | +| :------- | :------ | :---------------------- | +| `types` | `any`[] | the types of the values | +| `values` | `any`[] | the values to encode | + +#### Returns + +`string` + +the hash + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:443](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L443) + +--- + +### keccak256WithEncode + +▸ **keccak256WithEncode**(`types`, `values`): `string` + +It encodes and hashes a list of primitive values into an ABI-encoded hex value. + +#### Parameters + +| Name | Type | Description | +| :------- | :------ | :---------------------- | +| `types` | `any`[] | the types of the values | +| `values` | `any`[] | the values to encode | + +#### Returns + +`string` + +the hash + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:432](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L432) --- -### makeAccount +### makeRandomWallet + +▸ **makeRandomWallet**(): `HDAccount` + +It generates a random account. + +#### Returns -▸ **makeAccount**(`seedphrase`, `accountIndex?`): `ethers.Wallet` +`HDAccount` + +a new account + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:400](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L400) + +--- + +### makeRandomWallets + +▸ **makeRandomWallets**(`numAccounts?`): `any`[] + +It generates a list of random accounts #### Parameters -| Name | Type | Default value | -| :------------- | :------- | :------------ | -| `seedphrase` | `string` | `undefined` | -| `accountIndex` | `number` | `0` | +| Name | Type | Default value | Description | +| :------------ | :------- | :------------ | :------------------------------- | +| `numAccounts` | `number` | `10` | the number of accounts to create | #### Returns -`ethers.Wallet` +`any`[] + +the array of accounts #### Defined in -[src/utils/MakeAccounts.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/MakeAccounts.ts#L16) +[src/nevermined/utils/BlockchainViemUtils.ts:410](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L410) --- -### makeAccounts +### makeWallet -▸ **makeAccounts**(`seedphrase`, `numAccounts?`): `ethers.Wallet`[] +▸ **makeWallet**(`seedphrase`, `addressIndex?`): `HDAccount` + +Given a seedphrase, it returns an account. #### Parameters -| Name | Type | Default value | -| :------------ | :------- | :------------ | -| `seedphrase` | `string` | `undefined` | -| `numAccounts` | `number` | `10` | +| Name | Type | Default value | Description | +| :------------- | :------- | :------------ | :------------------------------------------------ | +| `seedphrase` | `string` | `undefined` | the seedphrase to be used to generate the account | +| `addressIndex` | `number` | `0` | the address index | #### Returns -`ethers.Wallet`[] +`HDAccount` + +an account #### Defined in -[src/utils/MakeAccounts.ts:3](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/MakeAccounts.ts#L3) +[src/nevermined/utils/BlockchainViemUtils.ts:378](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L378) --- -### makeBuffer +### makeWallets -▸ **makeBuffer**(`a`, `b`): `Buffer` +▸ **makeWallets**(`seedphrase`, `numAccounts?`): `any`[] + +Given a seedphrase generates multiple accounts #### Parameters -| Name | Type | -| :--- | :---- | -| `a` | `any` | -| `b` | `any` | +| Name | Type | Default value | Description | +| :------------ | :------- | :------------ | :------------------------------------------------ | +| `seedphrase` | `string` | `undefined` | the seedphrase to be used to generate the account | +| `numAccounts` | `number` | `10` | the number of accounts to create | #### Returns -`Buffer` +`any`[] + +the array of accounts #### Defined in -[src/utils/index.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/index.ts#L12) +[src/nevermined/utils/BlockchainViemUtils.ts:388](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L388) --- @@ -1095,7 +1761,7 @@ The royalty scheme #### Defined in -[src/utils/ConversionTypeHelpers.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/ConversionTypeHelpers.ts#L14) +[src/utils/ConversionTypeHelpers.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/ConversionTypeHelpers.ts#L14) --- @@ -1115,13 +1781,13 @@ The royalty scheme #### Defined in -[src/utils/ConversionTypeHelpers.ts:5](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/ConversionTypeHelpers.ts#L5) +[src/utils/ConversionTypeHelpers.ts:5](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/ConversionTypeHelpers.ts#L5) --- ### objectPromiseAll -▸ **objectPromiseAll**(`obj`): `Promise`<`any`\> +▸ **objectPromiseAll**(`obj`): `Promise`\<{}\> #### Parameters @@ -1131,11 +1797,11 @@ The royalty scheme #### Returns -`Promise`<`any`\> +`Promise`\<{}\> #### Defined in -[src/utils/PromiseResolver.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/PromiseResolver.ts#L11) +[src/utils/PromiseResolver.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/PromiseResolver.ts#L11) --- @@ -1169,7 +1835,7 @@ parseEther('-0.5') #### Defined in -[src/utils/UnitConversion.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/UnitConversion.ts#L19) +[src/nevermined/utils/BlockchainViemUtils.ts:502](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L502) --- @@ -1204,13 +1870,84 @@ parseUnits('121.0', 9) #### Defined in -[src/utils/UnitConversion.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/UnitConversion.ts#L39) +[src/nevermined/utils/BlockchainViemUtils.ts:465](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L465) --- -### zeroX +### searchAbiEvent -▸ **zeroX**(`input`): `string` +▸ **searchAbiEvent**(`abi`, `eventName`): `AbiEvent` + +It searchs an ABI event in the ABI. + +#### Parameters + +| Name | Type | Description | +| :---------- | :------- | :---------------------- | +| `abi` | `Abi` | the ABI of the contract | +| `eventName` | `string` | - | + +#### Returns + +`AbiEvent` + +the event found + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:263](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L263) + +--- + +### searchAbiFunction + +▸ **searchAbiFunction**(`abi`, `funcName`, `args?`): `AbiFunction` + +It searchs an ABI function in the ABI. + +#### Parameters + +| Name | Type | Default value | Description | +| :--------- | :------- | :------------ | :----------------------- | +| `abi` | `Abi` | `undefined` | the ABI of the contract | +| `funcName` | `string` | `undefined` | the function name | +| `args` | `any`[] | `[]` | the args of the function | + +#### Returns + +`AbiFunction` + +the function found + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:245](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L245) + +--- + +### serializeECIES + +▸ **serializeECIES**(`ecies`): `string` + +#### Parameters + +| Name | Type | +| :------ | :---- | +| `ecies` | `any` | + +#### Returns + +`string` + +#### Defined in + +[src/common/helpers.ts:88](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/common/helpers.ts#L88) + +--- + +### urlSafeBase64Decode + +▸ **urlSafeBase64Decode**(`input`): `Uint8Array` #### Parameters @@ -1220,11 +1957,76 @@ parseUnits('121.0', 9) #### Returns +`Uint8Array` + +#### Defined in + +[src/common/helpers.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/common/helpers.ts#L60) + +--- + +### urlSafeBase64Encode + +▸ **urlSafeBase64Encode**(`input`): `string` + +#### Parameters + +| Name | Type | +| :------ | :----------- | +| `input` | `Uint8Array` | + +#### Returns + `string` #### Defined in -[src/utils/ConversionTypeHelpers.ts:4](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/ConversionTypeHelpers.ts#L4) +[src/common/helpers.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/common/helpers.ts#L51) + +--- + +### zeroPadValue + +▸ **zeroPadValue**(`value`, `length`): `string` + +It pads a value with zeros. + +#### Parameters + +| Name | Type | Description | +| :------- | :------------------------------- | :----------------------------------- | +| `value` | \`0x$\{string}\` \| `Uint8Array` | the value to pad | +| `length` | `number` | the expected longitutde of the value | + +#### Returns + +`string` + +the padded value + +#### Defined in + +[src/nevermined/utils/BlockchainViemUtils.ts:358](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/utils/BlockchainViemUtils.ts#L358) + +--- + +### zeroX + +▸ **zeroX**(`input`): \`0x$\{string}\` + +#### Parameters + +| Name | Type | +| :------ | :------- | +| `input` | `string` | + +#### Returns + +\`0x$\{string}\` + +#### Defined in + +[src/utils/ConversionTypeHelpers.ts:4](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/ConversionTypeHelpers.ts#L4) --- @@ -1245,4 +2047,4 @@ parseUnits('121.0', 9) #### Defined in -[src/utils/ConversionTypeHelpers.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/ConversionTypeHelpers.ts#L7) +[src/utils/ConversionTypeHelpers.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/utils/ConversionTypeHelpers.ts#L7) diff --git a/docs/api-reference/enums/AccessStatus.md b/docs/api-reference/enums/AccessStatus.md index 247c97797..2c3e1dd2a 100644 --- a/docs/api-reference/enums/AccessStatus.md +++ b/docs/api-reference/enums/AccessStatus.md @@ -20,7 +20,7 @@ #### Defined in -[src/models/types.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L11) +[src/types/GeneralTypes.ts:3](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L3) --- @@ -30,7 +30,7 @@ #### Defined in -[src/models/types.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L12) +[src/types/GeneralTypes.ts:4](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L4) --- @@ -40,7 +40,7 @@ #### Defined in -[src/models/types.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L10) +[src/types/GeneralTypes.ts:2](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L2) --- @@ -50,7 +50,7 @@ #### Defined in -[src/models/types.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L14) +[src/types/GeneralTypes.ts:6](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L6) --- @@ -60,4 +60,4 @@ #### Defined in -[src/models/types.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L13) +[src/types/GeneralTypes.ts:5](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L5) diff --git a/docs/api-reference/enums/AssetResult.md b/docs/api-reference/enums/AssetResult.md index 2a0627615..a4f453de2 100644 --- a/docs/api-reference/enums/AssetResult.md +++ b/docs/api-reference/enums/AssetResult.md @@ -18,7 +18,7 @@ #### Defined in -[src/services/node/NeverminedNode.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L19) +[src/services/node/NeverminedNode.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L20) --- @@ -28,7 +28,7 @@ #### Defined in -[src/services/node/NeverminedNode.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L20) +[src/services/node/NeverminedNode.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L21) --- @@ -38,4 +38,4 @@ #### Defined in -[src/services/node/NeverminedNode.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L21) +[src/services/node/NeverminedNode.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L22) diff --git a/docs/api-reference/enums/ChargeType.md b/docs/api-reference/enums/ChargeType.md new file mode 100644 index 000000000..b7bd52ca5 --- /dev/null +++ b/docs/api-reference/enums/ChargeType.md @@ -0,0 +1,30 @@ +[@nevermined-io/sdk](../code-reference.md) / ChargeType + +# Enumeration: ChargeType + +## Table of contents + +### Enumeration Members + +- [Dynamic](ChargeType.md#dynamic) +- [Fixed](ChargeType.md#fixed) + +## Enumeration Members + +### Dynamic + +• **Dynamic** = `"dynamic"` + +#### Defined in + +[src/types/DDOTypes.ts:217](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L217) + +--- + +### Fixed + +• **Fixed** = `"fixed"` + +#### Defined in + +[src/types/DDOTypes.ts:216](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L216) diff --git a/docs/api-reference/enums/ConditionState.md b/docs/api-reference/enums/ConditionState.md index 59cfd47b6..e08625327 100644 --- a/docs/api-reference/enums/ConditionState.md +++ b/docs/api-reference/enums/ConditionState.md @@ -19,7 +19,7 @@ #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L13) +[src/types/ContractTypes.ts:5](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L5) --- @@ -29,7 +29,7 @@ #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L12) +[src/types/ContractTypes.ts:4](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L4) --- @@ -39,7 +39,7 @@ #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L11) +[src/types/ContractTypes.ts:3](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L3) --- @@ -49,4 +49,4 @@ #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L10) +[src/types/ContractTypes.ts:2](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L2) diff --git a/docs/api-reference/enums/CreateProgressStep.md b/docs/api-reference/enums/CreateProgressStep.md index fc872002d..fd42e858d 100644 --- a/docs/api-reference/enums/CreateProgressStep.md +++ b/docs/api-reference/enums/CreateProgressStep.md @@ -28,7 +28,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:5](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L5) +[src/nevermined/ProgressSteps.ts:5](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L5) --- @@ -38,7 +38,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L12) +[src/nevermined/ProgressSteps.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L12) --- @@ -48,7 +48,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L13) +[src/nevermined/ProgressSteps.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L13) --- @@ -58,7 +58,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L14) +[src/nevermined/ProgressSteps.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L14) --- @@ -68,7 +68,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:6](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L6) +[src/nevermined/ProgressSteps.ts:6](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L6) --- @@ -78,7 +78,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L7) +[src/nevermined/ProgressSteps.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L7) --- @@ -88,7 +88,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:3](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L3) +[src/nevermined/ProgressSteps.ts:3](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L3) --- @@ -98,7 +98,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:4](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L4) +[src/nevermined/ProgressSteps.ts:4](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L4) --- @@ -108,7 +108,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L8) +[src/nevermined/ProgressSteps.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L8) --- @@ -118,7 +118,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L2) +[src/nevermined/ProgressSteps.ts:2](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L2) --- @@ -128,7 +128,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L10) +[src/nevermined/ProgressSteps.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L10) --- @@ -138,7 +138,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L9) +[src/nevermined/ProgressSteps.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L9) --- @@ -148,4 +148,4 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L11) +[src/nevermined/ProgressSteps.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L11) diff --git a/docs/api-reference/enums/DIDResolvePolicy.md b/docs/api-reference/enums/DIDResolvePolicy.md index bab33380e..0ee540652 100644 --- a/docs/api-reference/enums/DIDResolvePolicy.md +++ b/docs/api-reference/enums/DIDResolvePolicy.md @@ -28,7 +28,7 @@ It described the policy to be used when resolving an asset. It has the following #### Defined in -[src/nevermined/api/AssetsApi.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L50) +[src/types/MetadataTypes.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L10) --- @@ -38,7 +38,7 @@ It described the policy to be used when resolving an asset. It has the following #### Defined in -[src/nevermined/api/AssetsApi.ts:51](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L51) +[src/types/MetadataTypes.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L11) --- @@ -48,7 +48,7 @@ It described the policy to be used when resolving an asset. It has the following #### Defined in -[src/nevermined/api/AssetsApi.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L54) +[src/types/MetadataTypes.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L14) --- @@ -58,7 +58,7 @@ It described the policy to be used when resolving an asset. It has the following #### Defined in -[src/nevermined/api/AssetsApi.ts:52](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L52) +[src/types/MetadataTypes.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L12) --- @@ -68,4 +68,4 @@ It described the policy to be used when resolving an asset. It has the following #### Defined in -[src/nevermined/api/AssetsApi.ts:53](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L53) +[src/types/MetadataTypes.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L13) diff --git a/docs/api-reference/enums/ERCType.md b/docs/api-reference/enums/ERCType.md index 354dab75b..658020788 100644 --- a/docs/api-reference/enums/ERCType.md +++ b/docs/api-reference/enums/ERCType.md @@ -17,7 +17,7 @@ #### Defined in -[src/models/types.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L25) +[src/types/GeneralTypes.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L16) --- @@ -27,4 +27,4 @@ #### Defined in -[src/models/types.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L24) +[src/types/GeneralTypes.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L15) diff --git a/docs/api-reference/enums/ExecuteProgressStep.md b/docs/api-reference/enums/ExecuteProgressStep.md index 41517f46c..2e006b26a 100644 --- a/docs/api-reference/enums/ExecuteProgressStep.md +++ b/docs/api-reference/enums/ExecuteProgressStep.md @@ -19,7 +19,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L39) +[src/nevermined/ProgressSteps.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L39) --- @@ -29,7 +29,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L38) +[src/nevermined/ProgressSteps.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L38) --- @@ -39,7 +39,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L41) +[src/nevermined/ProgressSteps.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L41) --- @@ -49,4 +49,4 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L40) +[src/nevermined/ProgressSteps.ts:40](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L40) diff --git a/docs/api-reference/enums/ExternalResourceFileType.md b/docs/api-reference/enums/ExternalResourceFileType.md index ddd425b2a..f2241eca0 100644 --- a/docs/api-reference/enums/ExternalResourceFileType.md +++ b/docs/api-reference/enums/ExternalResourceFileType.md @@ -21,7 +21,7 @@ #### Defined in -[src/ddo/types.ts:105](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L105) +[src/types/DDOTypes.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L115) --- @@ -31,7 +31,7 @@ #### Defined in -[src/ddo/types.ts:107](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L107) +[src/types/DDOTypes.ts:117](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L117) --- @@ -41,7 +41,7 @@ #### Defined in -[src/ddo/types.ts:110](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L110) +[src/types/DDOTypes.ts:120](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L120) --- @@ -51,7 +51,7 @@ #### Defined in -[src/ddo/types.ts:106](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L106) +[src/types/DDOTypes.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L116) --- @@ -61,7 +61,7 @@ #### Defined in -[src/ddo/types.ts:109](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L109) +[src/types/DDOTypes.ts:119](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L119) --- @@ -71,4 +71,4 @@ #### Defined in -[src/ddo/types.ts:108](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L108) +[src/types/DDOTypes.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L118) diff --git a/docs/api-reference/enums/ImmutableBackends.md b/docs/api-reference/enums/ImmutableBackends.md index d9c8dbe0e..73a39c6c4 100644 --- a/docs/api-reference/enums/ImmutableBackends.md +++ b/docs/api-reference/enums/ImmutableBackends.md @@ -17,7 +17,7 @@ #### Defined in -[src/ddo/types.ts:523](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L523) +[src/types/DDOTypes.ts:574](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L574) --- @@ -27,4 +27,4 @@ #### Defined in -[src/ddo/types.ts:524](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L524) +[src/types/DDOTypes.ts:575](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L575) diff --git a/docs/api-reference/enums/LogLevel.md b/docs/api-reference/enums/LogLevel.md index 12561dc9f..e05f89d89 100644 --- a/docs/api-reference/enums/LogLevel.md +++ b/docs/api-reference/enums/LogLevel.md @@ -20,7 +20,7 @@ #### Defined in -[src/utils/Logger.ts:3](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/Logger.ts#L3) +[src/models/Logger.ts:3](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Logger.ts#L3) --- @@ -30,7 +30,7 @@ #### Defined in -[src/utils/Logger.ts:5](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/Logger.ts#L5) +[src/models/Logger.ts:5](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Logger.ts#L5) --- @@ -40,7 +40,7 @@ #### Defined in -[src/utils/Logger.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/Logger.ts#L2) +[src/models/Logger.ts:2](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Logger.ts#L2) --- @@ -50,7 +50,7 @@ #### Defined in -[src/utils/Logger.ts:6](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/Logger.ts#L6) +[src/models/Logger.ts:6](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Logger.ts#L6) --- @@ -60,4 +60,4 @@ #### Defined in -[src/utils/Logger.ts:4](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/utils/Logger.ts#L4) +[src/models/Logger.ts:4](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Logger.ts#L4) diff --git a/docs/api-reference/enums/NVMAppEnvironments.md b/docs/api-reference/enums/NVMAppEnvironments.md new file mode 100644 index 000000000..af53f99bc --- /dev/null +++ b/docs/api-reference/enums/NVMAppEnvironments.md @@ -0,0 +1,129 @@ +[@nevermined-io/sdk](../code-reference.md) / NVMAppEnvironments + +# Enumeration: NVMAppEnvironments + +## Table of contents + +### Enumeration Members + +- [Base](NVMAppEnvironments.md#base) +- [Celo](NVMAppEnvironments.md#celo) +- [Custom](NVMAppEnvironments.md#custom) +- [Gnosis](NVMAppEnvironments.md#gnosis) +- [Live](NVMAppEnvironments.md#live) +- [Local](NVMAppEnvironments.md#local) +- [Matic](NVMAppEnvironments.md#matic) +- [Mumbai](NVMAppEnvironments.md#mumbai) +- [Optimism](NVMAppEnvironments.md#optimism) +- [Staging](NVMAppEnvironments.md#staging) +- [Testing](NVMAppEnvironments.md#testing) + +## Enumeration Members + +### Base + +• **Base** = `"base"` + +#### Defined in + +[src/nevermined/NvmApp.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L41) + +--- + +### Celo + +• **Celo** = `"celo"` + +#### Defined in + +[src/nevermined/NvmApp.ts:42](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L42) + +--- + +### Custom + +• **Custom** = `"custom"` + +#### Defined in + +[src/nevermined/NvmApp.ts:45](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L45) + +--- + +### Gnosis + +• **Gnosis** = `"gnosis"` + +#### Defined in + +[src/nevermined/NvmApp.ts:40](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L40) + +--- + +### Live + +• **Live** = `"live"` + +#### Defined in + +[src/nevermined/NvmApp.ts:37](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L37) + +--- + +### Local + +• **Local** = `"local"` + +#### Defined in + +[src/nevermined/NvmApp.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L44) + +--- + +### Matic + +• **Matic** = `"matic"` + +#### Defined in + +[src/nevermined/NvmApp.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L38) + +--- + +### Mumbai + +• **Mumbai** = `"mumbai"` + +#### Defined in + +[src/nevermined/NvmApp.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L39) + +--- + +### Optimism + +• **Optimism** = `"optimism"` + +#### Defined in + +[src/nevermined/NvmApp.ts:43](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L43) + +--- + +### Staging + +• **Staging** = `"staging"` + +#### Defined in + +[src/nevermined/NvmApp.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L35) + +--- + +### Testing + +• **Testing** = `"testing"` + +#### Defined in + +[src/nevermined/NvmApp.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L36) diff --git a/docs/api-reference/enums/NeverminedNFT1155Type.md b/docs/api-reference/enums/NeverminedNFT1155Type.md index 42feba082..c356dee86 100644 --- a/docs/api-reference/enums/NeverminedNFT1155Type.md +++ b/docs/api-reference/enums/NeverminedNFT1155Type.md @@ -17,7 +17,7 @@ #### Defined in -[src/models/types.ts:36](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L36) +[src/types/GeneralTypes.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L27) --- @@ -27,4 +27,4 @@ #### Defined in -[src/models/types.ts:37](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L37) +[src/types/GeneralTypes.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L28) diff --git a/docs/api-reference/enums/NeverminedNFT721Type.md b/docs/api-reference/enums/NeverminedNFT721Type.md index ff8bc5e61..c0dbaf9f8 100644 --- a/docs/api-reference/enums/NeverminedNFT721Type.md +++ b/docs/api-reference/enums/NeverminedNFT721Type.md @@ -19,7 +19,7 @@ #### Defined in -[src/models/types.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L29) +[src/types/GeneralTypes.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L20) --- @@ -29,7 +29,7 @@ #### Defined in -[src/models/types.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L31) +[src/types/GeneralTypes.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L22) --- @@ -39,7 +39,7 @@ #### Defined in -[src/models/types.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L32) +[src/types/GeneralTypes.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L23) --- @@ -49,4 +49,4 @@ #### Defined in -[src/models/types.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L30) +[src/types/GeneralTypes.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L21) diff --git a/docs/api-reference/enums/NodeUploadBackends.md b/docs/api-reference/enums/NodeUploadBackends.md index acb30c0fa..31afd363f 100644 --- a/docs/api-reference/enums/NodeUploadBackends.md +++ b/docs/api-reference/enums/NodeUploadBackends.md @@ -18,7 +18,7 @@ #### Defined in -[src/services/node/NeverminedNode.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L15) +[src/services/node/NeverminedNode.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L16) --- @@ -28,7 +28,7 @@ #### Defined in -[src/services/node/NeverminedNode.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L13) +[src/services/node/NeverminedNode.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L14) --- @@ -38,4 +38,4 @@ #### Defined in -[src/services/node/NeverminedNode.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L14) +[src/services/node/NeverminedNode.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L15) diff --git a/docs/api-reference/enums/OrderProgressStep.md b/docs/api-reference/enums/OrderProgressStep.md index 53f9a83c5..109b30065 100644 --- a/docs/api-reference/enums/OrderProgressStep.md +++ b/docs/api-reference/enums/OrderProgressStep.md @@ -21,7 +21,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L34) +[src/nevermined/ProgressSteps.ts:34](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L34) --- @@ -31,7 +31,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L32) +[src/nevermined/ProgressSteps.ts:32](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L32) --- @@ -41,7 +41,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L31) +[src/nevermined/ProgressSteps.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L31) --- @@ -51,7 +51,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L33) +[src/nevermined/ProgressSteps.ts:33](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L33) --- @@ -61,7 +61,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L30) +[src/nevermined/ProgressSteps.ts:30](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L30) --- @@ -71,4 +71,4 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L29) +[src/nevermined/ProgressSteps.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L29) diff --git a/docs/api-reference/enums/PermissionType.md b/docs/api-reference/enums/PermissionType.md index 11fb48347..ac1121a94 100644 --- a/docs/api-reference/enums/PermissionType.md +++ b/docs/api-reference/enums/PermissionType.md @@ -19,7 +19,7 @@ #### Defined in -[src/services/metadata/types.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L16) +[src/types/MetadataTypes.ts:90](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L90) --- @@ -29,7 +29,7 @@ #### Defined in -[src/services/metadata/types.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L15) +[src/types/MetadataTypes.ts:89](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L89) --- @@ -39,7 +39,7 @@ #### Defined in -[src/services/metadata/types.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L13) +[src/types/MetadataTypes.ts:87](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L87) --- @@ -49,4 +49,4 @@ #### Defined in -[src/services/metadata/types.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L14) +[src/types/MetadataTypes.ts:88](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L88) diff --git a/docs/api-reference/enums/PlatformTechStatus.md b/docs/api-reference/enums/PlatformTechStatus.md index e108b0060..2b538c15c 100644 --- a/docs/api-reference/enums/PlatformTechStatus.md +++ b/docs/api-reference/enums/PlatformTechStatus.md @@ -19,7 +19,7 @@ #### Defined in -[src/nevermined/Versions.ts:6](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L6) +[src/nevermined/Versions.ts:6](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L6) --- @@ -29,7 +29,7 @@ #### Defined in -[src/nevermined/Versions.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L8) +[src/nevermined/Versions.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L8) --- @@ -39,7 +39,7 @@ #### Defined in -[src/nevermined/Versions.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L7) +[src/nevermined/Versions.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L7) --- @@ -49,4 +49,4 @@ #### Defined in -[src/nevermined/Versions.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L9) +[src/nevermined/Versions.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L9) diff --git a/docs/api-reference/enums/ProvenanceMethod.md b/docs/api-reference/enums/ProvenanceMethod.md index 824c64150..3c564fd56 100644 --- a/docs/api-reference/enums/ProvenanceMethod.md +++ b/docs/api-reference/enums/ProvenanceMethod.md @@ -28,7 +28,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L24) +[src/keeper/contracts/Provenance.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L22) --- @@ -38,7 +38,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L13) +[src/keeper/contracts/Provenance.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L11) --- @@ -48,7 +48,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L21) +[src/keeper/contracts/Provenance.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L19) --- @@ -58,7 +58,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L12) +[src/keeper/contracts/Provenance.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L10) --- @@ -68,7 +68,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L15) +[src/keeper/contracts/Provenance.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L13) --- @@ -78,7 +78,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L23) +[src/keeper/contracts/Provenance.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L21) --- @@ -88,7 +88,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L22) +[src/keeper/contracts/Provenance.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L20) --- @@ -98,7 +98,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L20) +[src/keeper/contracts/Provenance.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L18) --- @@ -108,7 +108,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L18) +[src/keeper/contracts/Provenance.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L16) --- @@ -118,7 +118,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L14) +[src/keeper/contracts/Provenance.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L12) --- @@ -128,7 +128,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L16) +[src/keeper/contracts/Provenance.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L14) --- @@ -138,7 +138,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L19) +[src/keeper/contracts/Provenance.ts:17](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L17) --- @@ -148,4 +148,4 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L17) +[src/keeper/contracts/Provenance.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L15) diff --git a/docs/api-reference/enums/PublishMetadataOptions.md b/docs/api-reference/enums/PublishMetadataOptions.md index 80b01519f..8da833d6d 100644 --- a/docs/api-reference/enums/PublishMetadataOptions.md +++ b/docs/api-reference/enums/PublishMetadataOptions.md @@ -26,7 +26,7 @@ Where the metadata will be published. Options: #### Defined in -[src/nevermined/api/AssetsApi.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L25) +[src/types/MetadataTypes.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L28) --- @@ -36,7 +36,7 @@ Where the metadata will be published. Options: #### Defined in -[src/nevermined/api/AssetsApi.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L24) +[src/types/MetadataTypes.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L27) --- @@ -46,7 +46,7 @@ Where the metadata will be published. Options: #### Defined in -[src/nevermined/api/AssetsApi.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L23) +[src/types/MetadataTypes.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L26) --- @@ -56,4 +56,4 @@ Where the metadata will be published. Options: #### Defined in -[src/nevermined/api/AssetsApi.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L22) +[src/types/MetadataTypes.ts:25](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L25) diff --git a/docs/api-reference/enums/PublishOnChainOptions.md b/docs/api-reference/enums/PublishOnChainOptions.md index 6ff4fc108..39881fa0d 100644 --- a/docs/api-reference/enums/PublishOnChainOptions.md +++ b/docs/api-reference/enums/PublishOnChainOptions.md @@ -19,7 +19,7 @@ It specifies if the DID will be published on-chain initially or not. #### Defined in -[src/nevermined/api/AssetsApi.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L32) +[src/types/MetadataTypes.ts:35](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L35) --- @@ -29,4 +29,4 @@ It specifies if the DID will be published on-chain initially or not. #### Defined in -[src/nevermined/api/AssetsApi.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L33) +[src/types/MetadataTypes.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L36) diff --git a/docs/api-reference/enums/RoyaltyKind.md b/docs/api-reference/enums/RoyaltyKind.md index 43f404559..613ed27b1 100644 --- a/docs/api-reference/enums/RoyaltyKind.md +++ b/docs/api-reference/enums/RoyaltyKind.md @@ -20,7 +20,7 @@ The type of royalty #### Defined in -[src/nevermined/api/AssetsApi.ts:71](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L71) +[src/types/MetadataTypes.ts:49](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L49) --- @@ -30,7 +30,7 @@ The type of royalty #### Defined in -[src/nevermined/api/AssetsApi.ts:72](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L72) +[src/types/MetadataTypes.ts:50](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L50) --- @@ -40,4 +40,4 @@ The type of royalty #### Defined in -[src/nevermined/api/AssetsApi.ts:70](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L70) +[src/types/MetadataTypes.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L48) diff --git a/docs/api-reference/enums/State.md b/docs/api-reference/enums/State.md index 8aa17e0b2..4e7d247ba 100644 --- a/docs/api-reference/enums/State.md +++ b/docs/api-reference/enums/State.md @@ -18,7 +18,7 @@ #### Defined in -[src/services/metadata/types.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L34) +[src/types/MetadataTypes.ts:108](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L108) --- @@ -28,7 +28,7 @@ #### Defined in -[src/services/metadata/types.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L32) +[src/types/MetadataTypes.ts:106](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L106) --- @@ -38,4 +38,4 @@ #### Defined in -[src/services/metadata/types.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L33) +[src/types/MetadataTypes.ts:107](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L107) diff --git a/docs/api-reference/enums/SubscriptionType.md b/docs/api-reference/enums/SubscriptionType.md new file mode 100644 index 000000000..fca37d338 --- /dev/null +++ b/docs/api-reference/enums/SubscriptionType.md @@ -0,0 +1,41 @@ +[@nevermined-io/sdk](../code-reference.md) / SubscriptionType + +# Enumeration: SubscriptionType + +## Table of contents + +### Enumeration Members + +- [Both](SubscriptionType.md#both) +- [Credits](SubscriptionType.md#credits) +- [Time](SubscriptionType.md#time) + +## Enumeration Members + +### Both + +• **Both** = `"both"` + +#### Defined in + +[src/types/DDOTypes.ts:212](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L212) + +--- + +### Credits + +• **Credits** = `"credits"` + +#### Defined in + +[src/types/DDOTypes.ts:211](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L211) + +--- + +### Time + +• **Time** = `"time"` + +#### Defined in + +[src/types/DDOTypes.ts:210](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L210) diff --git a/docs/api-reference/enums/TemplateState.md b/docs/api-reference/enums/TemplateState.md index 08a5fac73..8bfab00e7 100644 --- a/docs/api-reference/enums/TemplateState.md +++ b/docs/api-reference/enums/TemplateState.md @@ -19,7 +19,7 @@ #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L9) +[src/keeper/contracts/managers/TemplateStoreManager.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L10) --- @@ -29,7 +29,7 @@ #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L8) +[src/keeper/contracts/managers/TemplateStoreManager.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L9) --- @@ -39,7 +39,7 @@ #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L10) +[src/keeper/contracts/managers/TemplateStoreManager.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L11) --- @@ -49,4 +49,4 @@ #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L7) +[src/keeper/contracts/managers/TemplateStoreManager.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L8) diff --git a/docs/api-reference/enums/UpdateProgressStep.md b/docs/api-reference/enums/UpdateProgressStep.md index a43d67282..a7f4110d7 100644 --- a/docs/api-reference/enums/UpdateProgressStep.md +++ b/docs/api-reference/enums/UpdateProgressStep.md @@ -23,7 +23,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L20) +[src/nevermined/ProgressSteps.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L20) --- @@ -33,7 +33,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L25) +[src/nevermined/ProgressSteps.ts:25](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L25) --- @@ -43,7 +43,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L21) +[src/nevermined/ProgressSteps.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L21) --- @@ -53,7 +53,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L18) +[src/nevermined/ProgressSteps.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L18) --- @@ -63,7 +63,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L24) +[src/nevermined/ProgressSteps.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L24) --- @@ -73,7 +73,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L22) +[src/nevermined/ProgressSteps.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L22) --- @@ -83,7 +83,7 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L19) +[src/nevermined/ProgressSteps.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L19) --- @@ -93,4 +93,4 @@ #### Defined in -[src/nevermined/ProgressSteps.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/ProgressSteps.ts#L23) +[src/nevermined/ProgressSteps.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/ProgressSteps.ts#L23) diff --git a/docs/api-reference/enums/ValueType.md b/docs/api-reference/enums/ValueType.md index e762704c0..042475395 100644 --- a/docs/api-reference/enums/ValueType.md +++ b/docs/api-reference/enums/ValueType.md @@ -19,7 +19,7 @@ #### Defined in -[src/models/types.ts:58](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L58) +[src/types/GeneralTypes.ts:49](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L49) --- @@ -29,7 +29,7 @@ #### Defined in -[src/models/types.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L55) +[src/types/GeneralTypes.ts:46](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L46) --- @@ -39,7 +39,7 @@ #### Defined in -[src/models/types.ts:56](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L56) +[src/types/GeneralTypes.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L47) --- @@ -49,4 +49,4 @@ #### Defined in -[src/models/types.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L57) +[src/types/GeneralTypes.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L48) diff --git a/docs/api-reference/interfaces/AaveConfig.md b/docs/api-reference/interfaces/AaveConfig.md deleted file mode 100644 index 09b90fe38..000000000 --- a/docs/api-reference/interfaces/AaveConfig.md +++ /dev/null @@ -1,63 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / AaveConfig - -# Interface: AaveConfig - -## Table of contents - -### Properties - -- [agreementFee](AaveConfig.md#agreementfee) -- [dataProviderAddress](AaveConfig.md#dataprovideraddress) -- [lendingPoolAddress](AaveConfig.md#lendingpooladdress) -- [treasuryAddress](AaveConfig.md#treasuryaddress) -- [wethAddress](AaveConfig.md#wethaddress) - -## Properties - -### agreementFee - -• **agreementFee**: `number` - -#### Defined in - -[src/models/types.ts:6](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L6) - ---- - -### dataProviderAddress - -• **dataProviderAddress**: `string` - -#### Defined in - -[src/models/types.ts:3](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L3) - ---- - -### lendingPoolAddress - -• **lendingPoolAddress**: `string` - -#### Defined in - -[src/models/types.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L2) - ---- - -### treasuryAddress - -• **treasuryAddress**: `string` - -#### Defined in - -[src/models/types.ts:5](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L5) - ---- - -### wethAddress - -• **wethAddress**: `string` - -#### Defined in - -[src/models/types.ts:4](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L4) diff --git a/docs/api-reference/interfaces/AaveCreditTemplateParams.md b/docs/api-reference/interfaces/AaveCreditTemplateParams.md deleted file mode 100644 index 499c610c3..000000000 --- a/docs/api-reference/interfaces/AaveCreditTemplateParams.md +++ /dev/null @@ -1,151 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / AaveCreditTemplateParams - -# Interface: AaveCreditTemplateParams - -## Table of contents - -### Properties - -- [amountToBorrow](AaveCreditTemplateParams.md#amounttoborrow) -- [amountToRepay](AaveCreditTemplateParams.md#amounttorepay) -- [assetToBorrow](AaveCreditTemplateParams.md#assettoborrow) -- [assetToRepay](AaveCreditTemplateParams.md#assettorepay) -- [collateralAmount](AaveCreditTemplateParams.md#collateralamount) -- [collateralAsset](AaveCreditTemplateParams.md#collateralasset) -- [delegatedAmount](AaveCreditTemplateParams.md#delegatedamount) -- [delegatedAsset](AaveCreditTemplateParams.md#delegatedasset) -- [interestRateMode](AaveCreditTemplateParams.md#interestratemode) -- [lockAddress](AaveCreditTemplateParams.md#lockaddress) -- [nftAmount](AaveCreditTemplateParams.md#nftamount) -- [nftContractAddress](AaveCreditTemplateParams.md#nftcontractaddress) -- [vaultAddress](AaveCreditTemplateParams.md#vaultaddress) - -## Properties - -### amountToBorrow - -• **amountToBorrow**: `string` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L25) - ---- - -### amountToRepay - -• **amountToRepay**: `string` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L32) - ---- - -### assetToBorrow - -• **assetToBorrow**: `string` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L24) - ---- - -### assetToRepay - -• **assetToRepay**: `string` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L31) - ---- - -### collateralAmount - -• **collateralAmount**: `string` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L28) - ---- - -### collateralAsset - -• **collateralAsset**: `string` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L27) - ---- - -### delegatedAmount - -• **delegatedAmount**: `string` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L30) - ---- - -### delegatedAsset - -• **delegatedAsset**: `string` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L29) - ---- - -### interestRateMode - -• **interestRateMode**: `number` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L26) - ---- - -### lockAddress - -• **lockAddress**: `string` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L34) - ---- - -### nftAmount - -• **nftAmount**: `number` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L35) - ---- - -### nftContractAddress - -• **nftContractAddress**: `string` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L33) - ---- - -### vaultAddress - -• **vaultAddress**: `string` - -#### Defined in - -[src/keeper/contracts/defi/AaveCreditTemplate.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/AaveCreditTemplate.ts#L23) diff --git a/docs/api-reference/interfaces/AccessProofTemplateParams.md b/docs/api-reference/interfaces/AccessProofTemplateParams.md index 4dd038955..4ac7359b7 100644 --- a/docs/api-reference/interfaces/AccessProofTemplateParams.md +++ b/docs/api-reference/interfaces/AccessProofTemplateParams.md @@ -14,11 +14,11 @@ ### consumer -• **consumer**: [`Account`](../classes/Account.md) +• **consumer**: [`NvmAccount`](../classes/NvmAccount.md) #### Defined in -[src/nevermined/AccessService.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L26) +[src/nevermined/AccessService.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L24) --- @@ -28,7 +28,7 @@ #### Defined in -[src/nevermined/AccessService.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L27) +[src/nevermined/AccessService.ts:25](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L25) --- @@ -38,4 +38,4 @@ #### Defined in -[src/nevermined/AccessService.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/AccessService.ts#L25) +[src/nevermined/AccessService.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/AccessService.ts#L23) diff --git a/docs/api-reference/interfaces/ActedOnBehalfEvent.md b/docs/api-reference/interfaces/ActedOnBehalfEvent.md index 2c74d5cd9..abbf50678 100644 --- a/docs/api-reference/interfaces/ActedOnBehalfEvent.md +++ b/docs/api-reference/interfaces/ActedOnBehalfEvent.md @@ -34,7 +34,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L55) +[src/keeper/contracts/Provenance.ts:53](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L53) --- @@ -48,7 +48,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L57) +[src/keeper/contracts/Provenance.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L55) --- @@ -62,7 +62,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:58](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L58) +[src/keeper/contracts/Provenance.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L56) --- @@ -72,7 +72,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:79](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L79) +[src/keeper/contracts/Provenance.ts:77](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L77) --- @@ -82,7 +82,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:78](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L78) +[src/keeper/contracts/Provenance.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L76) --- @@ -96,7 +96,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:53](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L53) +[src/keeper/contracts/Provenance.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L51) --- @@ -110,7 +110,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L54) +[src/keeper/contracts/Provenance.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L52) --- @@ -124,7 +124,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:56](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L56) +[src/keeper/contracts/Provenance.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L54) --- @@ -134,4 +134,4 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L80) +[src/keeper/contracts/Provenance.ts:78](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L78) diff --git a/docs/api-reference/interfaces/AdditionalInformation.md b/docs/api-reference/interfaces/AdditionalInformation.md index 031dbe7dc..84738b615 100644 --- a/docs/api-reference/interfaces/AdditionalInformation.md +++ b/docs/api-reference/interfaces/AdditionalInformation.md @@ -44,7 +44,7 @@ Categories used to describe this content. Empty by default. #### Defined in -[src/ddo/types.ts:374](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L374) +[src/types/DDOTypes.ts:425](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L425) --- @@ -54,7 +54,7 @@ Categories used to describe this content. Empty by default. #### Defined in -[src/ddo/types.ts:408](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L408) +[src/types/DDOTypes.ts:459](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L459) --- @@ -72,7 +72,7 @@ The party holding the legal copyright. Empty by default. #### Defined in -[src/ddo/types.ts:334](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L334) +[src/types/DDOTypes.ts:385](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L385) --- @@ -89,7 +89,7 @@ Can be used to store any non-default data, needs to be checked #### Defined in -[src/ddo/types.ts:403](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L403) +[src/types/DDOTypes.ts:454](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L454) --- @@ -108,7 +108,7 @@ explains what the data represents and what it can be used for. #### Defined in -[src/ddo/types.ts:328](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L328) +[src/types/DDOTypes.ts:379](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L379) --- @@ -127,13 +127,13 @@ codes from the [IETF BCP 47 standard](https://tools.ietf.org/html/bcp47). #### Defined in -[src/ddo/types.ts:368](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L368) +[src/types/DDOTypes.ts:419](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L419) --- ### links -• `Optional` **links**: { `[name: string]`: `string`; }[] +• `Optional` **links**: \{ `[name: string]`: `string`; }[] Mapping of links for data samples, or links to find out more information. Links may be to either a URL or another Asset. We expect marketplaces to @@ -157,7 +157,7 @@ to be domain-specific. #### Defined in -[src/ddo/types.ts:361](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L361) +[src/types/DDOTypes.ts:412](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L412) --- @@ -167,7 +167,7 @@ to be domain-specific. #### Defined in -[src/ddo/types.ts:407](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L407) +[src/types/DDOTypes.ts:458](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L458) --- @@ -185,7 +185,7 @@ BigNumbers #### Defined in -[src/ddo/types.ts:428](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L428) +[src/types/DDOTypes.ts:479](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L479) --- @@ -202,7 +202,7 @@ BigNumbers #### Defined in -[src/ddo/types.ts:410](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L410) +[src/types/DDOTypes.ts:461](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L461) --- @@ -219,20 +219,20 @@ BigNumbers #### Defined in -[src/ddo/types.ts:415](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L415) +[src/types/DDOTypes.ts:466](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L466) --- ### structuredMarkup -• `Optional` **structuredMarkup**: { `mediaType`: `string` ; `uri`: `string` }[] +• `Optional` **structuredMarkup**: \{ `mediaType`: `string` ; `uri`: `string` }[] A link to machine-readable structured markup (such as ttl/json-ld/rdf) describing the dataset. #### Defined in -[src/ddo/types.ts:394](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L394) +[src/types/DDOTypes.ts:445](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L445) --- @@ -250,7 +250,7 @@ Keywords or tags used to describe this content. Empty by default. #### Defined in -[src/ddo/types.ts:380](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L380) +[src/types/DDOTypes.ts:431](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L431) --- @@ -270,7 +270,7 @@ to get updated. #### Defined in -[src/ddo/types.ts:388](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L388) +[src/types/DDOTypes.ts:439](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L439) --- @@ -289,4 +289,4 @@ of the metadata, not an external link. #### Defined in -[src/ddo/types.ts:341](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L341) +[src/types/DDOTypes.ts:392](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L392) diff --git a/docs/api-reference/interfaces/AgreementConditionsStatus.md b/docs/api-reference/interfaces/AgreementConditionsStatus.md index 03ba84eb7..592a18c8a 100644 --- a/docs/api-reference/interfaces/AgreementConditionsStatus.md +++ b/docs/api-reference/interfaces/AgreementConditionsStatus.md @@ -4,4 +4,4 @@ ## Indexable -▪ [condition: `string`]: { `blocked`: `boolean` ; `blockedBy`: `string`[] ; `condition`: `string` ; `contractName`: `string` ; `state`: [`ConditionState`](../enums/ConditionState.md) } +▪ [condition: `string`]: \{ `blocked`: `boolean` ; `blockedBy`: `string`[] ; `condition`: `string` ; `contractName`: `string` ; `state`: [`ConditionState`](../enums/ConditionState.md) } diff --git a/docs/api-reference/interfaces/AgreementData.md b/docs/api-reference/interfaces/AgreementData.md index 61e418af8..c0b8d82f1 100644 --- a/docs/api-reference/interfaces/AgreementData.md +++ b/docs/api-reference/interfaces/AgreementData.md @@ -23,7 +23,7 @@ #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L9) +[src/keeper/contracts/managers/AgreementStoreManager.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L11) --- @@ -33,7 +33,7 @@ #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L10) +[src/keeper/contracts/managers/AgreementStoreManager.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L12) --- @@ -43,7 +43,7 @@ #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L15) +[src/keeper/contracts/managers/AgreementStoreManager.ts:17](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L17) --- @@ -53,7 +53,7 @@ #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L14) +[src/keeper/contracts/managers/AgreementStoreManager.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L16) --- @@ -63,7 +63,7 @@ #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L11) +[src/keeper/contracts/managers/AgreementStoreManager.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L13) --- @@ -73,7 +73,7 @@ #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L8) +[src/keeper/contracts/managers/AgreementStoreManager.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L10) --- @@ -83,7 +83,7 @@ #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L12) +[src/keeper/contracts/managers/AgreementStoreManager.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L14) --- @@ -93,4 +93,4 @@ #### Defined in -[src/keeper/contracts/managers/AgreementStoreManager.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/AgreementStoreManager.ts#L13) +[src/keeper/contracts/managers/AgreementStoreManager.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/AgreementStoreManager.ts#L15) diff --git a/docs/api-reference/interfaces/AgreementInstance.md b/docs/api-reference/interfaces/AgreementInstance.md deleted file mode 100644 index 5e7f701eb..000000000 --- a/docs/api-reference/interfaces/AgreementInstance.md +++ /dev/null @@ -1,47 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / AgreementInstance - -# Interface: AgreementInstance - -## Type parameters - -| Name | -| :------- | -| `Params` | - -## Table of contents - -### Properties - -- [agreementId](AgreementInstance.md#agreementid) -- [instances](AgreementInstance.md#instances) -- [list](AgreementInstance.md#list) - -## Properties - -### agreementId - -• **agreementId**: `string` - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L39) - ---- - -### instances - -• **instances**: [`ConditionInstanceSmall`](ConditionInstanceSmall.md)[] - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L40) - ---- - -### list - -• **list**: `Params` - -#### Defined in - -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L38) diff --git a/docs/api-reference/interfaces/AgreementPrepareResult.md b/docs/api-reference/interfaces/AgreementPrepareResult.md index 75122c3c9..7eb5a33c0 100644 --- a/docs/api-reference/interfaces/AgreementPrepareResult.md +++ b/docs/api-reference/interfaces/AgreementPrepareResult.md @@ -17,7 +17,7 @@ #### Defined in -[src/nevermined/api/AgreementsApi.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AgreementsApi.ts#L10) +[src/nevermined/api/AgreementsApi.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AgreementsApi.ts#L10) --- @@ -27,4 +27,4 @@ #### Defined in -[src/nevermined/api/AgreementsApi.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AgreementsApi.ts#L11) +[src/nevermined/api/AgreementsApi.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AgreementsApi.ts#L11) diff --git a/docs/api-reference/interfaces/Algorithm.md b/docs/api-reference/interfaces/Algorithm.md index 341a24993..2d9168d1a 100644 --- a/docs/api-reference/interfaces/Algorithm.md +++ b/docs/api-reference/interfaces/Algorithm.md @@ -20,7 +20,7 @@ #### Defined in -[src/ddo/types.ts:75](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L75) +[src/types/DDOTypes.ts:85](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L85) --- @@ -30,7 +30,7 @@ #### Defined in -[src/ddo/types.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L73) +[src/types/DDOTypes.ts:83](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L83) --- @@ -40,7 +40,7 @@ #### Defined in -[src/ddo/types.ts:72](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L72) +[src/types/DDOTypes.ts:82](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L82) --- @@ -58,7 +58,7 @@ #### Defined in -[src/ddo/types.ts:76](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L76) +[src/types/DDOTypes.ts:86](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L86) --- @@ -68,4 +68,4 @@ #### Defined in -[src/ddo/types.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L74) +[src/types/DDOTypes.ts:84](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L84) diff --git a/docs/api-reference/interfaces/AuthToken.md b/docs/api-reference/interfaces/AuthToken.md index 4a81888b6..c9326d5fe 100644 --- a/docs/api-reference/interfaces/AuthToken.md +++ b/docs/api-reference/interfaces/AuthToken.md @@ -16,4 +16,4 @@ #### Defined in -[src/services/metadata/MetadataService.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L34) +[src/services/metadata/MetadataService.ts:34](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L34) diff --git a/docs/api-reference/interfaces/Authentication.md b/docs/api-reference/interfaces/Authentication.md index 2de062545..e11bceb6b 100644 --- a/docs/api-reference/interfaces/Authentication.md +++ b/docs/api-reference/interfaces/Authentication.md @@ -17,7 +17,7 @@ #### Defined in -[src/ddo/types.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L14) +[src/types/DDOTypes.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L9) --- @@ -27,4 +27,4 @@ #### Defined in -[src/ddo/types.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L13) +[src/types/DDOTypes.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L8) diff --git a/docs/api-reference/interfaces/Babysig.md b/docs/api-reference/interfaces/Babysig.md index 401dae091..a8ba6c35a 100644 --- a/docs/api-reference/interfaces/Babysig.md +++ b/docs/api-reference/interfaces/Babysig.md @@ -17,7 +17,7 @@ #### Defined in -[src/models/types.ts:79](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L79) +[src/types/GeneralTypes.ts:66](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L66) --- @@ -27,4 +27,4 @@ #### Defined in -[src/models/types.ts:80](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L80) +[src/types/GeneralTypes.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L67) diff --git a/docs/api-reference/interfaces/Balance.md b/docs/api-reference/interfaces/Balance.md index b7aca36cb..d746bc063 100644 --- a/docs/api-reference/interfaces/Balance.md +++ b/docs/api-reference/interfaces/Balance.md @@ -17,7 +17,7 @@ #### Defined in -[src/models/types.ts:84](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L84) +[src/types/GeneralTypes.ts:71](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L71) --- @@ -27,4 +27,4 @@ #### Defined in -[src/models/types.ts:85](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L85) +[src/types/GeneralTypes.ts:72](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L72) diff --git a/docs/api-reference/interfaces/Bookmark.md b/docs/api-reference/interfaces/Bookmark.md index 55178c824..ca922dc85 100644 --- a/docs/api-reference/interfaces/Bookmark.md +++ b/docs/api-reference/interfaces/Bookmark.md @@ -26,7 +26,7 @@ #### Defined in -[src/services/metadata/types.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L9) +[src/types/MetadataTypes.ts:83](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L83) --- @@ -40,7 +40,7 @@ #### Defined in -[src/services/metadata/types.ts:4](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L4) +[src/types/MetadataTypes.ts:78](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L78) --- @@ -54,7 +54,7 @@ #### Defined in -[src/services/metadata/types.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L2) +[src/types/MetadataTypes.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L76) --- @@ -64,7 +64,7 @@ #### Defined in -[src/services/metadata/types.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L8) +[src/types/MetadataTypes.ts:82](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L82) --- @@ -78,4 +78,4 @@ #### Defined in -[src/services/metadata/types.ts:3](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L3) +[src/types/MetadataTypes.ts:77](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L77) diff --git a/docs/api-reference/interfaces/ConditionContext.md b/docs/api-reference/interfaces/ConditionContext.md deleted file mode 100644 index 18cf9ffea..000000000 --- a/docs/api-reference/interfaces/ConditionContext.md +++ /dev/null @@ -1,52 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / ConditionContext - -# Interface: ConditionContext - -## Table of contents - -### Properties - -- [creator](ConditionContext.md#creator) -- [ddo](ConditionContext.md#ddo) -- [price](ConditionContext.md#price) -- [service](ConditionContext.md#service) - -## Properties - -### creator - -• **creator**: `string` - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L22) - ---- - -### ddo - -• **ddo**: [`DDO`](../classes/DDO.md) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L19) - ---- - -### price - -• **price**: [`AssetPrice`](../classes/AssetPrice.md) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L21) - ---- - -### service - -• **service**: [`ServiceCommon`](ServiceCommon.md) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L20) diff --git a/docs/api-reference/interfaces/ConditionData.md b/docs/api-reference/interfaces/ConditionData.md index 1904978a9..fb4a1a560 100644 --- a/docs/api-reference/interfaces/ConditionData.md +++ b/docs/api-reference/interfaces/ConditionData.md @@ -22,27 +22,27 @@ #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L12) +[src/keeper/contracts/managers/ConditionStoreManager.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L13) --- ### blockNumberUpdated -• **blockNumberUpdated**: `number` +• `Optional` **blockNumberUpdated**: `number` #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L14) +[src/keeper/contracts/managers/ConditionStoreManager.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L15) --- ### lastUpdatedBy -• **lastUpdatedBy**: `string` +• `Optional` **lastUpdatedBy**: `string` #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L13) +[src/keeper/contracts/managers/ConditionStoreManager.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L14) --- @@ -52,7 +52,7 @@ #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L9) +[src/keeper/contracts/managers/ConditionStoreManager.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L10) --- @@ -62,7 +62,7 @@ #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L10) +[src/keeper/contracts/managers/ConditionStoreManager.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L11) --- @@ -72,7 +72,7 @@ #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L11) +[src/keeper/contracts/managers/ConditionStoreManager.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L12) --- @@ -82,4 +82,4 @@ #### Defined in -[src/keeper/contracts/managers/ConditionStoreManager.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/ConditionStoreManager.ts#L8) +[src/keeper/contracts/managers/ConditionStoreManager.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/ConditionStoreManager.ts#L9) diff --git a/docs/api-reference/interfaces/ConditionInstance.md b/docs/api-reference/interfaces/ConditionInstance.md deleted file mode 100644 index 56fd87677..000000000 --- a/docs/api-reference/interfaces/ConditionInstance.md +++ /dev/null @@ -1,121 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / ConditionInstance - -# Interface: ConditionInstance - -## Type parameters - -| Name | -| :------ | -| `Extra` | - -## Hierarchy - -- [`ConditionInstanceSmall`](ConditionInstanceSmall.md) - - ↳ **`ConditionInstance`** - -## Table of contents - -### Properties - -- [agreementId](ConditionInstance.md#agreementid) -- [condition](ConditionInstance.md#condition) -- [id](ConditionInstance.md#id) -- [list](ConditionInstance.md#list) -- [params](ConditionInstance.md#params) -- [seed](ConditionInstance.md#seed) - -## Properties - -### agreementId - -• **agreementId**: `string` - -#### Inherited from - -[ConditionInstanceSmall](ConditionInstanceSmall.md).[agreementId](ConditionInstanceSmall.md#agreementid) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L34) - ---- - -### condition - -• **condition**: `string` - -#### Inherited from - -[ConditionInstanceSmall](ConditionInstanceSmall.md).[condition](ConditionInstanceSmall.md#condition) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L35) - ---- - -### id - -• **id**: `string` - -#### Inherited from - -[ConditionInstanceSmall](ConditionInstanceSmall.md).[id](ConditionInstanceSmall.md#id) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L33) - ---- - -### list - -• **list**: `any`[] - -#### Inherited from - -[ConditionInstanceSmall](ConditionInstanceSmall.md).[list](ConditionInstanceSmall.md#list) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L31) - ---- - -### params - -• **params**: (`method`: [`ConditionMethod`](../code-reference.md#conditionmethod), `arg`: `Extra`) => `Promise`<`any`[]\> - -#### Type declaration - -▸ (`method`, `arg`): `Promise`<`any`[]\> - -##### Parameters - -| Name | Type | -| :------- | :-------------------------------------------------------- | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | -| `arg` | `Extra` | - -##### Returns - -`Promise`<`any`[]\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L39) - ---- - -### seed - -• **seed**: `string` - -#### Inherited from - -[ConditionInstanceSmall](ConditionInstanceSmall.md).[seed](ConditionInstanceSmall.md#seed) - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L32) diff --git a/docs/api-reference/interfaces/ConditionInstanceSmall.md b/docs/api-reference/interfaces/ConditionInstanceSmall.md index e688855d2..6a767021a 100644 --- a/docs/api-reference/interfaces/ConditionInstanceSmall.md +++ b/docs/api-reference/interfaces/ConditionInstanceSmall.md @@ -2,12 +2,6 @@ # Interface: ConditionInstanceSmall -## Hierarchy - -- **`ConditionInstanceSmall`** - - ↳ [`ConditionInstance`](ConditionInstance.md) - ## Table of contents ### Properties @@ -26,7 +20,7 @@ #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L34) +[src/types/ContractTypes.ts:33](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L33) --- @@ -36,7 +30,7 @@ #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L35) +[src/types/ContractTypes.ts:34](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L34) --- @@ -46,7 +40,7 @@ #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L33) +[src/types/ContractTypes.ts:32](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L32) --- @@ -56,7 +50,7 @@ #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L31) +[src/types/ContractTypes.ts:30](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L30) --- @@ -66,4 +60,4 @@ #### Defined in -[src/keeper/contracts/conditions/Condition.abstract.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L32) +[src/types/ContractTypes.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L31) diff --git a/docs/api-reference/interfaces/ConditionParameters.md b/docs/api-reference/interfaces/ConditionParameters.md deleted file mode 100644 index a08221e64..000000000 --- a/docs/api-reference/interfaces/ConditionParameters.md +++ /dev/null @@ -1,51 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / ConditionParameters - -# Interface: ConditionParameters - -## Type parameters - -| Name | -| :------ | -| `Extra` | - -## Table of contents - -### Properties - -- [list](ConditionParameters.md#list) -- [params](ConditionParameters.md#params) - -## Properties - -### list - -• **list**: `any`[] - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L26) - ---- - -### params - -• **params**: (`method`: [`ConditionMethod`](../code-reference.md#conditionmethod), `arg`: `Extra`) => `Promise`<`any`[]\> - -#### Type declaration - -▸ (`method`, `arg`): `Promise`<`any`[]\> - -##### Parameters - -| Name | Type | -| :------- | :-------------------------------------------------------- | -| `method` | [`ConditionMethod`](../code-reference.md#conditionmethod) | -| `arg` | `Extra` | - -##### Returns - -`Promise`<`any`[]\> - -#### Defined in - -[src/keeper/contracts/conditions/Condition.abstract.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/conditions/Condition.abstract.ts#L27) diff --git a/docs/api-reference/interfaces/ContractEventSubscription.md b/docs/api-reference/interfaces/ContractEventSubscription.md index 02c09c835..4dbae07c9 100644 --- a/docs/api-reference/interfaces/ContractEventSubscription.md +++ b/docs/api-reference/interfaces/ContractEventSubscription.md @@ -24,4 +24,4 @@ #### Defined in -[src/events/NeverminedEvent.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L22) +[src/types/EventTypes.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/EventTypes.ts#L22) diff --git a/docs/api-reference/interfaces/Curation.md b/docs/api-reference/interfaces/Curation.md index 0ae233af1..5dfc5a53b 100644 --- a/docs/api-reference/interfaces/Curation.md +++ b/docs/api-reference/interfaces/Curation.md @@ -33,7 +33,7 @@ true #### Defined in -[src/ddo/types.ts:315](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L315) +[src/types/DDOTypes.ts:366](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L366) --- @@ -51,7 +51,7 @@ Number of votes. 0 is the default value. #### Defined in -[src/ddo/types.ts:303](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L303) +[src/types/DDOTypes.ts:354](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L354) --- @@ -69,7 +69,7 @@ Decimal value between 0 and 1. 0 is the default value. #### Defined in -[src/ddo/types.ts:297](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L297) +[src/types/DDOTypes.ts:348](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L348) --- @@ -87,4 +87,4 @@ Schema applied to calculate the rating. #### Defined in -[src/ddo/types.ts:309](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L309) +[src/types/DDOTypes.ts:360](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L360) diff --git a/docs/api-reference/interfaces/DDOStatus.md b/docs/api-reference/interfaces/DDOStatus.md index 69f9eb024..2457a0030 100644 --- a/docs/api-reference/interfaces/DDOStatus.md +++ b/docs/api-reference/interfaces/DDOStatus.md @@ -26,7 +26,7 @@ #### Defined in -[src/services/metadata/MetadataService.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L25) +[src/services/metadata/MetadataService.ts:25](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L25) --- @@ -45,4 +45,4 @@ #### Defined in -[src/services/metadata/MetadataService.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L19) +[src/services/metadata/MetadataService.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L19) diff --git a/docs/api-reference/interfaces/Eip712Data.md b/docs/api-reference/interfaces/Eip712Data.md index 06b3a3b29..8b804d964 100644 --- a/docs/api-reference/interfaces/Eip712Data.md +++ b/docs/api-reference/interfaces/Eip712Data.md @@ -17,7 +17,7 @@ #### Defined in -[src/nevermined/utils/JwtUtils.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L10) +[src/types/GeneralTypes.ts:77](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L77) --- @@ -27,4 +27,4 @@ #### Defined in -[src/nevermined/utils/JwtUtils.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L9) +[src/types/GeneralTypes.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L76) diff --git a/docs/api-reference/interfaces/EventEmitter.md b/docs/api-reference/interfaces/EventEmitter.md index a7512e530..8d17b56ac 100644 --- a/docs/api-reference/interfaces/EventEmitter.md +++ b/docs/api-reference/interfaces/EventEmitter.md @@ -13,7 +13,7 @@ ### subscribe -• **subscribe**: (`callback`: () => `Promise`<`void`\>, `arg1`: () => `Promise`<`number`\>) => `void` +• **subscribe**: (`callback`: () => `Promise`\<`void`\>, `arg1`: () => `Promise`\<`bigint`\>) => `void` #### Type declaration @@ -21,10 +21,10 @@ ##### Parameters -| Name | Type | -| :--------- | :------------------------- | -| `callback` | () => `Promise`<`void`\> | -| `arg1` | () => `Promise`<`number`\> | +| Name | Type | +| :--------- | :-------------------------- | +| `callback` | () => `Promise`\<`void`\> | +| `arg1` | () => `Promise`\<`bigint`\> | ##### Returns @@ -32,13 +32,13 @@ #### Defined in -[src/events/NeverminedEvent.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L17) +[src/types/EventTypes.ts:17](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/EventTypes.ts#L17) --- ### unsubscribe -• **unsubscribe**: (`arg0`: () => `Promise`<`void`\>) => `void` +• **unsubscribe**: (`arg0`: () => `Promise`\<`void`\>) => `void` #### Type declaration @@ -46,9 +46,9 @@ ##### Parameters -| Name | Type | -| :----- | :----------------------- | -| `arg0` | () => `Promise`<`void`\> | +| Name | Type | +| :----- | :------------------------ | +| `arg0` | () => `Promise`\<`void`\> | ##### Returns @@ -56,4 +56,4 @@ #### Defined in -[src/events/NeverminedEvent.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L18) +[src/types/EventTypes.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/EventTypes.ts#L18) diff --git a/docs/api-reference/interfaces/EventOptions.md b/docs/api-reference/interfaces/EventOptions.md index 3903a6dbb..fe4d52464 100644 --- a/docs/api-reference/interfaces/EventOptions.md +++ b/docs/api-reference/interfaces/EventOptions.md @@ -21,54 +21,54 @@ #### Defined in -[src/events/NeverminedEvent.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L8) +[src/types/EventTypes.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/EventTypes.ts#L8) --- ### filterJsonRpc -• `Optional` **filterJsonRpc**: [`Filter`](Filter.md) +• `Optional` **filterJsonRpc**: [`FilterContractEvent`](FilterContractEvent.md) #### Defined in -[src/events/NeverminedEvent.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L9) +[src/types/EventTypes.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/EventTypes.ts#L9) --- ### filterSubgraph -• `Optional` **filterSubgraph**: `Record`<`string`, `unknown`\> +• `Optional` **filterSubgraph**: `Record`\<`string`, `unknown`\> #### Defined in -[src/events/NeverminedEvent.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L10) +[src/types/EventTypes.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/EventTypes.ts#L10) --- ### fromBlock -• `Optional` **fromBlock**: `string` \| `number` +• `Optional` **fromBlock**: `bigint` \| `BlockTag` #### Defined in -[src/events/NeverminedEvent.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L12) +[src/types/EventTypes.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/EventTypes.ts#L12) --- ### result -• `Optional` **result**: `Record`<`string`, `unknown`\> +• `Optional` **result**: `Record`\<`string`, `unknown`\> #### Defined in -[src/events/NeverminedEvent.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L11) +[src/types/EventTypes.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/EventTypes.ts#L11) --- ### toBlock -• `Optional` **toBlock**: `string` \| `number` +• `Optional` **toBlock**: `bigint` \| `BlockTag` #### Defined in -[src/events/NeverminedEvent.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/events/NeverminedEvent.ts#L13) +[src/types/EventTypes.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/EventTypes.ts#L13) diff --git a/docs/api-reference/interfaces/Filter.md b/docs/api-reference/interfaces/Filter.md deleted file mode 100644 index 73d3073cd..000000000 --- a/docs/api-reference/interfaces/Filter.md +++ /dev/null @@ -1,7 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / Filter - -# Interface: Filter - -## Indexable - -▪ [key: `string`]: `number` \| `string` \| `string`[] \| `number`[] diff --git a/docs/api-reference/interfaces/FilterContractEvent.md b/docs/api-reference/interfaces/FilterContractEvent.md new file mode 100644 index 000000000..506655190 --- /dev/null +++ b/docs/api-reference/interfaces/FilterContractEvent.md @@ -0,0 +1,7 @@ +[@nevermined-io/sdk](../code-reference.md) / FilterContractEvent + +# Interface: FilterContractEvent + +## Indexable + +▪ [key: `string`]: `number` \| `string` \| `string`[] \| `number`[] diff --git a/docs/api-reference/interfaces/GenericAccess.md b/docs/api-reference/interfaces/GenericAccess.md index 1de352cbf..a0fdff22d 100644 --- a/docs/api-reference/interfaces/GenericAccess.md +++ b/docs/api-reference/interfaces/GenericAccess.md @@ -22,13 +22,13 @@ #### Defined in -[src/keeper/contracts/templates/GenericAccess.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/GenericAccess.ts#L20) +[src/keeper/contracts/templates/GenericAccess.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/GenericAccess.ts#L22) ## Methods ### createAgreementWithPaymentFromDDO -▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`<`string`\> +▸ **createAgreementWithPaymentFromDDO**(`agreementIdSeed`, `ddo`, `serviceReference`, `parameters`, `consumer`, `from`, `txParams?`, `observer?`): `Promise`\<`string`\> #### Parameters @@ -38,24 +38,24 @@ | `ddo` | [`DDO`](../classes/DDO.md) | | `serviceReference` | `number` \| [`ServiceType`](../code-reference.md#servicetype) | | `parameters` | `any` | -| `consumer` | [`Account`](../classes/Account.md) | -| `from` | [`Account`](../classes/Account.md) | +| `consumer` | [`NvmAccount`](../classes/NvmAccount.md) | +| `from` | [`NvmAccount`](../classes/NvmAccount.md) | | `txParams?` | [`TxParameters`](TxParameters.md) | | `observer?` | (`orderProgressStep`: [`OrderProgressStep`](../enums/OrderProgressStep.md)) => `void` | #### Returns -`Promise`<`string`\> +`Promise`\<`string`\> #### Defined in -[src/keeper/contracts/templates/GenericAccess.ts:6](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/GenericAccess.ts#L6) +[src/keeper/contracts/templates/GenericAccess.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/GenericAccess.ts#L8) --- ### getAgreementData -▸ **getAgreementData**(`agreementId`): `Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +▸ **getAgreementData**(`agreementId`): `Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> #### Parameters @@ -65,11 +65,11 @@ #### Returns -`Promise`<{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> +`Promise`\<\{ `accessConsumer`: `string` ; `accessProvider`: `string` }\> #### Defined in -[src/keeper/contracts/templates/GenericAccess.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/GenericAccess.ts#L17) +[src/keeper/contracts/templates/GenericAccess.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/GenericAccess.ts#L19) --- @@ -90,4 +90,4 @@ #### Defined in -[src/keeper/contracts/templates/GenericAccess.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/GenericAccess.ts#L19) +[src/keeper/contracts/templates/GenericAccess.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/templates/GenericAccess.ts#L21) diff --git a/docs/api-reference/interfaces/InputType.md b/docs/api-reference/interfaces/InputType.md index fed4677fd..320cb0ac5 100644 --- a/docs/api-reference/interfaces/InputType.md +++ b/docs/api-reference/interfaces/InputType.md @@ -17,7 +17,7 @@ #### Defined in -[src/models/types.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L18) +[src/types/GeneralTypes.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L10) --- @@ -27,4 +27,4 @@ #### Defined in -[src/models/types.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L20) +[src/types/GeneralTypes.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L11) diff --git a/docs/api-reference/interfaces/InstantiableConfig.md b/docs/api-reference/interfaces/InstantiableConfig.md index f7c4ac012..3a766e467 100644 --- a/docs/api-reference/interfaces/InstantiableConfig.md +++ b/docs/api-reference/interfaces/InstantiableConfig.md @@ -8,10 +8,10 @@ - [artifactsFolder](InstantiableConfig.md#artifactsfolder) - [circuitsFolder](InstantiableConfig.md#circuitsfolder) +- [client](InstantiableConfig.md#client) - [config](InstantiableConfig.md#config) - [logger](InstantiableConfig.md#logger) - [nevermined](InstantiableConfig.md#nevermined) -- [web3](InstantiableConfig.md#web3) ## Properties @@ -21,7 +21,7 @@ #### Defined in -[src/Instantiable.abstract.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L12) +[src/Instantiable.abstract.ts:19](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L19) --- @@ -31,44 +31,44 @@ #### Defined in -[src/Instantiable.abstract.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L13) +[src/Instantiable.abstract.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L20) --- -### config +### client -• `Optional` **config**: [`NeverminedOptions`](../classes/NeverminedOptions.md) +• `Optional` **client**: [`Web3Clients`](Web3Clients.md) #### Defined in -[src/Instantiable.abstract.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L9) +[src/Instantiable.abstract.ts:17](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L17) --- -### logger +### config -• `Optional` **logger**: `Logger` +• `Optional` **config**: [`NeverminedOptions`](../classes/NeverminedOptions.md) #### Defined in -[src/Instantiable.abstract.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L11) +[src/Instantiable.abstract.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L16) --- -### nevermined +### logger -• **nevermined**: [`Nevermined`](../classes/Nevermined.md) +• `Optional` **logger**: `Logger` #### Defined in -[src/Instantiable.abstract.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L8) +[src/Instantiable.abstract.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L18) --- -### web3 +### nevermined -• `Optional` **web3**: `JsonRpcProvider` \| `BrowserProvider` +• **nevermined**: [`Nevermined`](../classes/Nevermined.md) #### Defined in -[src/Instantiable.abstract.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/Instantiable.abstract.ts#L10) +[src/Instantiable.abstract.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L15) diff --git a/docs/api-reference/interfaces/JsonRpcPayload.md b/docs/api-reference/interfaces/JsonRpcPayload.md deleted file mode 100644 index 3a02f6909..000000000 --- a/docs/api-reference/interfaces/JsonRpcPayload.md +++ /dev/null @@ -1,52 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / JsonRpcPayload - -# Interface: JsonRpcPayload - -## Table of contents - -### Properties - -- [id](JsonRpcPayload.md#id) -- [jsonrpc](JsonRpcPayload.md#jsonrpc) -- [method](JsonRpcPayload.md#method) -- [params](JsonRpcPayload.md#params) - -## Properties - -### id - -• `Optional` **id**: `string` \| `number` - -#### Defined in - -[src/keeper/utils.ts:69](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L69) - ---- - -### jsonrpc - -• **jsonrpc**: `string` - -#### Defined in - -[src/keeper/utils.ts:66](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L66) - ---- - -### method - -• **method**: `string` - -#### Defined in - -[src/keeper/utils.ts:67](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L67) - ---- - -### params - -• **params**: `any`[] - -#### Defined in - -[src/keeper/utils.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L68) diff --git a/docs/api-reference/interfaces/JsonRpcResponse.md b/docs/api-reference/interfaces/JsonRpcResponse.md deleted file mode 100644 index 714031ec1..000000000 --- a/docs/api-reference/interfaces/JsonRpcResponse.md +++ /dev/null @@ -1,52 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / JsonRpcResponse - -# Interface: JsonRpcResponse - -## Table of contents - -### Properties - -- [error](JsonRpcResponse.md#error) -- [id](JsonRpcResponse.md#id) -- [jsonrpc](JsonRpcResponse.md#jsonrpc) -- [result](JsonRpcResponse.md#result) - -## Properties - -### error - -• `Optional` **error**: `string` - -#### Defined in - -[src/keeper/utils.ts:76](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L76) - ---- - -### id - -• **id**: `number` - -#### Defined in - -[src/keeper/utils.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L74) - ---- - -### jsonrpc - -• **jsonrpc**: `string` - -#### Defined in - -[src/keeper/utils.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L73) - ---- - -### result - -• `Optional` **result**: `any` - -#### Defined in - -[src/keeper/utils.ts:75](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/utils.ts#L75) diff --git a/docs/api-reference/interfaces/MarketplaceResults.md b/docs/api-reference/interfaces/MarketplaceResults.md index 21bc2f8c0..46f3118fa 100644 --- a/docs/api-reference/interfaces/MarketplaceResults.md +++ b/docs/api-reference/interfaces/MarketplaceResults.md @@ -1,6 +1,6 @@ [@nevermined-io/sdk](../code-reference.md) / MarketplaceResults -# Interface: MarketplaceResults +# Interface: MarketplaceResults\ ## Type parameters @@ -25,7 +25,7 @@ #### Defined in -[src/common/interfaces.ts:7](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/interfaces.ts#L7) +[src/types/MetadataTypes.ts:59](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L59) --- @@ -35,7 +35,7 @@ #### Defined in -[src/common/interfaces.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/interfaces.ts#L8) +[src/types/MetadataTypes.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L60) --- @@ -45,14 +45,14 @@ #### Defined in -[src/common/interfaces.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/interfaces.ts#L9) +[src/types/MetadataTypes.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L61) --- ### total_results -• **total_results**: `SearchResults` +• **total_results**: [`SearchResults`](SearchResults.md) #### Defined in -[src/common/interfaces.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/interfaces.ts#L10) +[src/types/MetadataTypes.ts:62](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L62) diff --git a/docs/api-reference/interfaces/MetaData.md b/docs/api-reference/interfaces/MetaData.md index 2748c7b22..7ef6b3ea1 100644 --- a/docs/api-reference/interfaces/MetaData.md +++ b/docs/api-reference/interfaces/MetaData.md @@ -20,7 +20,7 @@ #### Defined in -[src/ddo/types.ts:435](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L435) +[src/types/DDOTypes.ts:486](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L486) --- @@ -30,7 +30,7 @@ #### Defined in -[src/ddo/types.ts:436](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L436) +[src/types/DDOTypes.ts:487](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L487) --- @@ -40,7 +40,7 @@ #### Defined in -[src/ddo/types.ts:434](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L434) +[src/types/DDOTypes.ts:485](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L485) --- @@ -50,7 +50,7 @@ #### Defined in -[src/ddo/types.ts:433](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L433) +[src/types/DDOTypes.ts:484](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L484) --- @@ -60,4 +60,4 @@ #### Defined in -[src/ddo/types.ts:432](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L432) +[src/types/DDOTypes.ts:483](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L483) diff --git a/docs/api-reference/interfaces/MetaDataExternalResource.md b/docs/api-reference/interfaces/MetaDataExternalResource.md index 91b149f19..b548b44ca 100644 --- a/docs/api-reference/interfaces/MetaDataExternalResource.md +++ b/docs/api-reference/interfaces/MetaDataExternalResource.md @@ -29,7 +29,7 @@ File checksum. #### Defined in -[src/ddo/types.ts:138](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L138) +[src/types/DDOTypes.ts:148](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L148) --- @@ -41,7 +41,7 @@ Checksum hash algorithm. #### Defined in -[src/ddo/types.ts:143](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L143) +[src/types/DDOTypes.ts:153](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L153) --- @@ -59,7 +59,7 @@ File compression (e.g. no, gzip, bzip2, etc). #### Defined in -[src/ddo/types.ts:171](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L171) +[src/types/DDOTypes.ts:181](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L181) --- @@ -71,7 +71,7 @@ File content length. #### Defined in -[src/ddo/types.ts:148](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L148) +[src/types/DDOTypes.ts:158](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L158) --- @@ -89,7 +89,7 @@ File format, if applicable. #### Defined in -[src/ddo/types.ts:133](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L133) +[src/types/DDOTypes.ts:143](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L143) --- @@ -107,7 +107,7 @@ File encoding. #### Defined in -[src/ddo/types.ts:165](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L165) +[src/types/DDOTypes.ts:175](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L175) --- @@ -123,7 +123,7 @@ If not provided is assumed the files are not encrypted. Currently only `dtp` is #### Defined in -[src/ddo/types.ts:179](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L179) +[src/types/DDOTypes.ts:189](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L189) --- @@ -135,7 +135,7 @@ File index. #### Defined in -[src/ddo/types.ts:127](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L127) +[src/types/DDOTypes.ts:137](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L137) --- @@ -147,7 +147,7 @@ File name. #### Defined in -[src/ddo/types.ts:117](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L117) +[src/types/DDOTypes.ts:127](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L127) --- @@ -160,7 +160,7 @@ For example the `ugcId` #### Defined in -[src/ddo/types.ts:159](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L159) +[src/types/DDOTypes.ts:169](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L169) --- @@ -172,7 +172,7 @@ The type of the external resource file #### Defined in -[src/ddo/types.ts:153](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L153) +[src/types/DDOTypes.ts:163](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L163) --- @@ -184,4 +184,4 @@ File URL. #### Defined in -[src/ddo/types.ts:122](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L122) +[src/types/DDOTypes.ts:132](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L132) diff --git a/docs/api-reference/interfaces/MetaDataMain.md b/docs/api-reference/interfaces/MetaDataMain.md index 004350b37..29c2eea78 100644 --- a/docs/api-reference/interfaces/MetaDataMain.md +++ b/docs/api-reference/interfaces/MetaDataMain.md @@ -23,8 +23,13 @@ https://github.com/nevermined-io/docs/blob/master/docs/architecture/specs/metada - [license](MetaDataMain.md#license) - [name](MetaDataMain.md#name) - [nftType](MetaDataMain.md#nfttype) +- [nonce](MetaDataMain.md#nonce) +- [paymentAttributes](MetaDataMain.md#paymentattributes) - [service](MetaDataMain.md#service) +- [subType](MetaDataMain.md#subtype) +- [subscription](MetaDataMain.md#subscription) - [type](MetaDataMain.md#type) +- [updatedAt](MetaDataMain.md#updatedat) - [webService](MetaDataMain.md#webservice) - [workflow](MetaDataMain.md#workflow) @@ -36,7 +41,7 @@ https://github.com/nevermined-io/docs/blob/master/docs/architecture/specs/metada #### Defined in -[src/ddo/types.ts:277](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L277) +[src/types/DDOTypes.ts:326](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L326) --- @@ -54,7 +59,7 @@ Name of the entity generating this data (e.g. Tfl, Disney Corp, etc.). #### Defined in -[src/ddo/types.ts:257](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L257) +[src/types/DDOTypes.ts:304](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L304) --- @@ -73,7 +78,7 @@ ISO 8601 format, Coordinated Universal Time. #### Defined in -[src/ddo/types.ts:243](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L243) +[src/types/DDOTypes.ts:280](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L280) --- @@ -93,7 +98,7 @@ so this value can't be set. #### Defined in -[src/ddo/types.ts:251](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L251) +[src/types/DDOTypes.ts:288](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L288) --- @@ -103,7 +108,7 @@ so this value can't be set. #### Defined in -[src/ddo/types.ts:273](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L273) +[src/types/DDOTypes.ts:322](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L322) --- @@ -113,7 +118,7 @@ so this value can't be set. #### Defined in -[src/ddo/types.ts:281](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L281) +[src/types/DDOTypes.ts:330](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L330) --- @@ -125,7 +130,7 @@ Array of File objects including the encrypted file urls and some additional info #### Defined in -[src/ddo/types.ts:269](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L269) +[src/types/DDOTypes.ts:316](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L316) --- @@ -135,7 +140,7 @@ Array of File objects including the encrypted file urls and some additional info #### Defined in -[src/ddo/types.ts:285](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L285) +[src/types/DDOTypes.ts:334](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L334) --- @@ -154,7 +159,7 @@ If it's not specified, the following value will be added: "No License Specified" #### Defined in -[src/ddo/types.ts:264](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L264) +[src/types/DDOTypes.ts:311](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L311) --- @@ -172,7 +177,7 @@ Descriptive name of the Asset. #### Defined in -[src/ddo/types.ts:221](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L221) +[src/types/DDOTypes.ts:249](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L249) --- @@ -182,7 +187,27 @@ Descriptive name of the Asset. #### Defined in -[src/ddo/types.ts:283](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L283) +[src/types/DDOTypes.ts:332](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L332) + +--- + +### nonce + +• `Optional` **nonce**: `number` + +#### Defined in + +[src/types/DDOTypes.ts:298](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L298) + +--- + +### paymentAttributes + +• `Optional` **paymentAttributes**: [`PaymentAttributes`](PaymentAttributes.md)[] + +#### Defined in + +[src/types/DDOTypes.ts:336](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L336) --- @@ -192,16 +217,40 @@ Descriptive name of the Asset. #### Defined in -[src/ddo/types.ts:279](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L279) +[src/types/DDOTypes.ts:328](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L328) + +--- + +### subType + +• `Optional` **subType**: `string` + +Sub type asssociated to the main type of the asset. This subtype is open so final users are not restricted to use anything they need. +Helps to filter by the sub type of asset, for example if type is a service, the subtype could ai-agent, web-service, web-socket-service, etc +Another example, if the type is 'dataset' the subtype could be 'tabular', 'parquet', 'csv', etc + +#### Defined in + +[src/types/DDOTypes.ts:273](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L273) + +--- + +### subscription + +• `Optional` **subscription**: [`SubscriptionMetadata`](SubscriptionMetadata.md) + +#### Defined in + +[src/types/DDOTypes.ts:318](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L318) --- ### type -• **type**: `"compute"` \| `"workflow"` \| `"service"` \| `"dataset"` \| `"algorithm"` \| `"subscription"` \| `"other"` +• **type**: `"compute"` \| `"workflow"` \| `"service"` \| `"dataset"` \| `"algorithm"` \| `"subscription"` \| `"model"` \| `"file"` \| `"other"` \| `"assistant"` Type of the Asset. Helps to filter by the type of asset, -initially ("dataset", "algorithm", "compute", "workflow", "compute", "subscription", "other"). +initially ("dataset", "algorithm", "compute", "workflow", "model", "file", "subscription", "other"). **`Example`** @@ -211,7 +260,27 @@ initially ("dataset", "algorithm", "compute", "workflow", "compute", "subscripti #### Defined in -[src/ddo/types.ts:228](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L228) +[src/types/DDOTypes.ts:256](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L256) + +--- + +### updatedAt + +• `Optional` **updatedAt**: `string` + +The date on which the asset DDO was updated into the metadata store. +This value is created automatically by Metadata upon update, +so this value can't be set. + +**`Example`** + +```ts +'2019-01-31T08:38:32Z' +``` + +#### Defined in + +[src/types/DDOTypes.ts:296](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L296) --- @@ -221,7 +290,7 @@ initially ("dataset", "algorithm", "compute", "workflow", "compute", "subscripti #### Defined in -[src/ddo/types.ts:271](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L271) +[src/types/DDOTypes.ts:320](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L320) --- @@ -231,4 +300,4 @@ initially ("dataset", "algorithm", "compute", "workflow", "compute", "subscripti #### Defined in -[src/ddo/types.ts:275](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L275) +[src/types/DDOTypes.ts:324](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L324) diff --git a/docs/api-reference/interfaces/MetadataValidationResults.md b/docs/api-reference/interfaces/MetadataValidationResults.md new file mode 100644 index 000000000..a031b5be2 --- /dev/null +++ b/docs/api-reference/interfaces/MetadataValidationResults.md @@ -0,0 +1,30 @@ +[@nevermined-io/sdk](../code-reference.md) / MetadataValidationResults + +# Interface: MetadataValidationResults + +## Table of contents + +### Properties + +- [isValid](MetadataValidationResults.md#isvalid) +- [messages](MetadataValidationResults.md#messages) + +## Properties + +### isValid + +• **isValid**: `boolean` + +#### Defined in + +[src/nevermined/NvmApp.ts:49](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L49) + +--- + +### messages + +• **messages**: `string`[] + +#### Defined in + +[src/nevermined/NvmApp.ts:50](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L50) diff --git a/docs/api-reference/interfaces/MethodReflection.md b/docs/api-reference/interfaces/MethodReflection.md index a8cf958b1..bb1bdcb50 100644 --- a/docs/api-reference/interfaces/MethodReflection.md +++ b/docs/api-reference/interfaces/MethodReflection.md @@ -20,7 +20,7 @@ #### Defined in -[src/models/types.ts:71](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L71) +[src/types/GeneralTypes.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L60) --- @@ -30,7 +30,7 @@ #### Defined in -[src/models/types.ts:67](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L67) +[src/types/GeneralTypes.ts:58](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L58) --- @@ -40,7 +40,7 @@ #### Defined in -[src/models/types.ts:75](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L75) +[src/types/GeneralTypes.ts:62](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L62) --- @@ -50,7 +50,7 @@ #### Defined in -[src/models/types.ts:69](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L69) +[src/types/GeneralTypes.ts:59](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L59) --- @@ -60,4 +60,4 @@ #### Defined in -[src/models/types.ts:73](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L73) +[src/types/GeneralTypes.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L61) diff --git a/docs/api-reference/interfaces/MintedEntry.md b/docs/api-reference/interfaces/MintedEntry.md deleted file mode 100644 index c00570a78..000000000 --- a/docs/api-reference/interfaces/MintedEntry.md +++ /dev/null @@ -1,41 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / MintedEntry - -# Interface: MintedEntry - -## Table of contents - -### Properties - -- [amountMinted](MintedEntry.md#amountminted) -- [expirationBlock](MintedEntry.md#expirationblock) -- [mintBlock](MintedEntry.md#mintblock) - -## Properties - -### amountMinted - -• **amountMinted**: `bigint` - -#### Defined in - -[src/keeper/contracts/NFTContractsBase.ts:8](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L8) - ---- - -### expirationBlock - -• **expirationBlock**: `bigint` - -#### Defined in - -[src/keeper/contracts/NFTContractsBase.ts:9](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L9) - ---- - -### mintBlock - -• **mintBlock**: `bigint` - -#### Defined in - -[src/keeper/contracts/NFTContractsBase.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/NFTContractsBase.ts#L10) diff --git a/docs/api-reference/interfaces/NFT1155MintedEntry.md b/docs/api-reference/interfaces/NFT1155MintedEntry.md new file mode 100644 index 000000000..bd433af69 --- /dev/null +++ b/docs/api-reference/interfaces/NFT1155MintedEntry.md @@ -0,0 +1,41 @@ +[@nevermined-io/sdk](../code-reference.md) / NFT1155MintedEntry + +# Interface: NFT1155MintedEntry + +## Table of contents + +### Properties + +- [amountMinted](NFT1155MintedEntry.md#amountminted) +- [expirationBlock](NFT1155MintedEntry.md#expirationblock) +- [mintBlock](NFT1155MintedEntry.md#mintblock) + +## Properties + +### amountMinted + +• **amountMinted**: `bigint` + +#### Defined in + +[src/keeper/contracts/NFTContractsBase.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L15) + +--- + +### expirationBlock + +• **expirationBlock**: `bigint` + +#### Defined in + +[src/keeper/contracts/NFTContractsBase.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L16) + +--- + +### mintBlock + +• **mintBlock**: `bigint` + +#### Defined in + +[src/keeper/contracts/NFTContractsBase.ts:17](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L17) diff --git a/docs/api-reference/interfaces/NFT721MintedEntry.md b/docs/api-reference/interfaces/NFT721MintedEntry.md new file mode 100644 index 000000000..661de9bd8 --- /dev/null +++ b/docs/api-reference/interfaces/NFT721MintedEntry.md @@ -0,0 +1,41 @@ +[@nevermined-io/sdk](../code-reference.md) / NFT721MintedEntry + +# Interface: NFT721MintedEntry + +## Table of contents + +### Properties + +- [expirationBlock](NFT721MintedEntry.md#expirationblock) +- [mintBlock](NFT721MintedEntry.md#mintblock) +- [tokenId](NFT721MintedEntry.md#tokenid) + +## Properties + +### expirationBlock + +• **expirationBlock**: `bigint` + +#### Defined in + +[src/keeper/contracts/NFTContractsBase.ts:10](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L10) + +--- + +### mintBlock + +• **mintBlock**: `bigint` + +#### Defined in + +[src/keeper/contracts/NFTContractsBase.ts:11](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L11) + +--- + +### tokenId + +• **tokenId**: `string` + +#### Defined in + +[src/keeper/contracts/NFTContractsBase.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/NFTContractsBase.ts#L9) diff --git a/docs/api-reference/interfaces/NeverminedInitializationOptions.md b/docs/api-reference/interfaces/NeverminedInitializationOptions.md new file mode 100644 index 000000000..e047c3697 --- /dev/null +++ b/docs/api-reference/interfaces/NeverminedInitializationOptions.md @@ -0,0 +1,129 @@ +[@nevermined-io/sdk](../code-reference.md) / NeverminedInitializationOptions + +# Interface: NeverminedInitializationOptions + +## Table of contents + +### Properties + +- [loadAccessFlow](NeverminedInitializationOptions.md#loadaccessflow) +- [loadCompute](NeverminedInitializationOptions.md#loadcompute) +- [loadCore](NeverminedInitializationOptions.md#loadcore) +- [loadDIDTransferFlow](NeverminedInitializationOptions.md#loaddidtransferflow) +- [loadDispenser](NeverminedInitializationOptions.md#loaddispenser) +- [loadERC20Token](NeverminedInitializationOptions.md#loaderc20token) +- [loadNFTs1155](NeverminedInitializationOptions.md#loadnfts1155) +- [loadNFTs721](NeverminedInitializationOptions.md#loadnfts721) +- [loadRewards](NeverminedInitializationOptions.md#loadrewards) +- [loadRoyalties](NeverminedInitializationOptions.md#loadroyalties) +- [loadServiceAgreements](NeverminedInitializationOptions.md#loadserviceagreements) + +## Properties + +### loadAccessFlow + +• **loadAccessFlow**: `boolean` + +#### Defined in + +[src/types/GeneralTypes.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L100) + +--- + +### loadCompute + +• **loadCompute**: `boolean` + +#### Defined in + +[src/types/GeneralTypes.ts:104](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L104) + +--- + +### loadCore + +• **loadCore**: `boolean` + +#### Defined in + +[src/types/GeneralTypes.ts:94](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L94) + +--- + +### loadDIDTransferFlow + +• **loadDIDTransferFlow**: `boolean` + +#### Defined in + +[src/types/GeneralTypes.ts:101](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L101) + +--- + +### loadDispenser + +• **loadDispenser**: `boolean` + +#### Defined in + +[src/types/GeneralTypes.ts:98](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L98) + +--- + +### loadERC20Token + +• **loadERC20Token**: `boolean` + +#### Defined in + +[src/types/GeneralTypes.ts:99](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L99) + +--- + +### loadNFTs1155 + +• **loadNFTs1155**: `boolean` + +#### Defined in + +[src/types/GeneralTypes.ts:97](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L97) + +--- + +### loadNFTs721 + +• **loadNFTs721**: `boolean` + +#### Defined in + +[src/types/GeneralTypes.ts:96](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L96) + +--- + +### loadRewards + +• **loadRewards**: `boolean` + +#### Defined in + +[src/types/GeneralTypes.ts:102](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L102) + +--- + +### loadRoyalties + +• **loadRoyalties**: `boolean` + +#### Defined in + +[src/types/GeneralTypes.ts:103](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L103) + +--- + +### loadServiceAgreements + +• **loadServiceAgreements**: `boolean` + +#### Defined in + +[src/types/GeneralTypes.ts:95](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L95) diff --git a/docs/api-reference/interfaces/NewBookmark.md b/docs/api-reference/interfaces/NewBookmark.md index b91d6e5d4..142b6f537 100644 --- a/docs/api-reference/interfaces/NewBookmark.md +++ b/docs/api-reference/interfaces/NewBookmark.md @@ -24,7 +24,7 @@ #### Defined in -[src/services/metadata/types.ts:4](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L4) +[src/types/MetadataTypes.ts:78](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L78) --- @@ -34,7 +34,7 @@ #### Defined in -[src/services/metadata/types.ts:2](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L2) +[src/types/MetadataTypes.ts:76](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L76) --- @@ -44,4 +44,4 @@ #### Defined in -[src/services/metadata/types.ts:3](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L3) +[src/types/MetadataTypes.ts:77](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L77) diff --git a/docs/api-reference/interfaces/NewPermission.md b/docs/api-reference/interfaces/NewPermission.md index e4e5ac3db..b010741f9 100644 --- a/docs/api-reference/interfaces/NewPermission.md +++ b/docs/api-reference/interfaces/NewPermission.md @@ -25,7 +25,7 @@ #### Defined in -[src/services/metadata/types.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L23) +[src/types/MetadataTypes.ts:97](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L97) --- @@ -35,7 +35,7 @@ #### Defined in -[src/services/metadata/types.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L22) +[src/types/MetadataTypes.ts:96](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L96) --- @@ -45,7 +45,7 @@ #### Defined in -[src/services/metadata/types.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L21) +[src/types/MetadataTypes.ts:95](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L95) --- @@ -55,4 +55,4 @@ #### Defined in -[src/services/metadata/types.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L20) +[src/types/MetadataTypes.ts:94](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L94) diff --git a/docs/api-reference/interfaces/NewProfile.md b/docs/api-reference/interfaces/NewProfile.md index 8357a3d39..4d21f5332 100644 --- a/docs/api-reference/interfaces/NewProfile.md +++ b/docs/api-reference/interfaces/NewProfile.md @@ -28,7 +28,7 @@ #### Defined in -[src/services/metadata/types.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L44) +[src/types/MetadataTypes.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L118) --- @@ -38,7 +38,7 @@ #### Defined in -[src/services/metadata/types.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L40) +[src/types/MetadataTypes.ts:114](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L114) --- @@ -48,7 +48,7 @@ #### Defined in -[src/services/metadata/types.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L43) +[src/types/MetadataTypes.ts:117](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L117) --- @@ -58,7 +58,7 @@ #### Defined in -[src/services/metadata/types.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L38) +[src/types/MetadataTypes.ts:112](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L112) --- @@ -68,7 +68,7 @@ #### Defined in -[src/services/metadata/types.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L42) +[src/types/MetadataTypes.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L116) --- @@ -78,7 +78,7 @@ #### Defined in -[src/services/metadata/types.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L41) +[src/types/MetadataTypes.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L115) --- @@ -88,4 +88,4 @@ #### Defined in -[src/services/metadata/types.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L39) +[src/types/MetadataTypes.ts:113](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L113) diff --git a/docs/api-reference/interfaces/NvmConfig.md b/docs/api-reference/interfaces/NvmConfig.md index 6579668e8..4ea6452d6 100644 --- a/docs/api-reference/interfaces/NvmConfig.md +++ b/docs/api-reference/interfaces/NvmConfig.md @@ -50,7 +50,7 @@ apps using the same marketplace api #### Defined in -[src/ddo/types.ts:508](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L508) +[src/types/DDOTypes.ts:559](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L559) --- @@ -66,7 +66,7 @@ Block networks where the asset is available. It is represented as a map of netwo #### Defined in -[src/ddo/types.ts:517](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L517) +[src/types/DDOTypes.ts:568](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L568) --- @@ -82,7 +82,7 @@ Used to identify a user in the marketplace api #### Defined in -[src/ddo/types.ts:499](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L499) +[src/types/DDOTypes.ts:550](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L550) --- @@ -94,4 +94,4 @@ The `versions` list stores the reference to all the changes done to the Metadata #### Defined in -[src/ddo/types.ts:512](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L512) +[src/types/DDOTypes.ts:563](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L563) diff --git a/docs/api-reference/interfaces/NvmConfigVersions.md b/docs/api-reference/interfaces/NvmConfigVersions.md index 9e5de2bf7..838d06103 100644 --- a/docs/api-reference/interfaces/NvmConfigVersions.md +++ b/docs/api-reference/interfaces/NvmConfigVersions.md @@ -22,7 +22,7 @@ The checksum of the document #### Defined in -[src/ddo/types.ts:542](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L542) +[src/types/DDOTypes.ts:593](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L593) --- @@ -38,7 +38,7 @@ This is a self incrementing number #### Defined in -[src/ddo/types.ts:534](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L534) +[src/types/DDOTypes.ts:585](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L585) --- @@ -50,7 +50,7 @@ The immutable solution to record the DDO #### Defined in -[src/ddo/types.ts:552](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L552) +[src/types/DDOTypes.ts:603](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L603) --- @@ -62,7 +62,7 @@ ID Hash of the metadata recorded in an immutable data store (IPFS, Filecoin, Arw #### Defined in -[src/ddo/types.ts:547](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L547) +[src/types/DDOTypes.ts:598](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L598) --- @@ -74,4 +74,4 @@ The date when the update occurred. #### Defined in -[src/ddo/types.ts:538](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L538) +[src/types/DDOTypes.ts:589](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L589) diff --git a/docs/api-reference/interfaces/OperationResult.md b/docs/api-reference/interfaces/OperationResult.md new file mode 100644 index 000000000..9f70985aa --- /dev/null +++ b/docs/api-reference/interfaces/OperationResult.md @@ -0,0 +1,30 @@ +[@nevermined-io/sdk](../code-reference.md) / OperationResult + +# Interface: OperationResult + +## Table of contents + +### Properties + +- [agreementId](OperationResult.md#agreementid) +- [success](OperationResult.md#success) + +## Properties + +### agreementId + +• `Optional` **agreementId**: `string` + +#### Defined in + +[src/nevermined/NvmApp.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L54) + +--- + +### success + +• **success**: `boolean` + +#### Defined in + +[src/nevermined/NvmApp.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L55) diff --git a/docs/api-reference/interfaces/PaymentAttributes.md b/docs/api-reference/interfaces/PaymentAttributes.md new file mode 100644 index 000000000..cd6c558df --- /dev/null +++ b/docs/api-reference/interfaces/PaymentAttributes.md @@ -0,0 +1,45 @@ +[@nevermined-io/sdk](../code-reference.md) / PaymentAttributes + +# Interface: PaymentAttributes + +## Table of contents + +### Properties + +- [additionalAttributes](PaymentAttributes.md#additionalattributes) +- [paymentEnabled](PaymentAttributes.md#paymentenabled) +- [paymentType](PaymentAttributes.md#paymenttype) + +## Properties + +### additionalAttributes + +• `Optional` **additionalAttributes**: `Object` + +#### Index signature + +▪ [key: `string`]: `string` + +#### Defined in + +[src/types/DDOTypes.ts:69](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L69) + +--- + +### paymentEnabled + +• **paymentEnabled**: `boolean` + +#### Defined in + +[src/types/DDOTypes.ts:68](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L68) + +--- + +### paymentType + +• **paymentType**: `"serviceAgreements"` \| `"stripe"` + +#### Defined in + +[src/types/DDOTypes.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L67) diff --git a/docs/api-reference/interfaces/PaymentData.md b/docs/api-reference/interfaces/PaymentData.md index 00dd9f7b9..fc712ce6e 100644 --- a/docs/api-reference/interfaces/PaymentData.md +++ b/docs/api-reference/interfaces/PaymentData.md @@ -19,7 +19,7 @@ #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:46](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L46) +[src/types/ContractTypes.ts:25](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L25) --- @@ -29,7 +29,7 @@ #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L47) +[src/types/ContractTypes.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L26) --- @@ -39,7 +39,7 @@ #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L44) +[src/types/ContractTypes.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L23) --- @@ -49,4 +49,4 @@ #### Defined in -[src/keeper/contracts/templates/AgreementTemplate.abstract.ts:45](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/templates/AgreementTemplate.abstract.ts#L45) +[src/types/ContractTypes.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/ContractTypes.ts#L24) diff --git a/docs/api-reference/interfaces/Permission.md b/docs/api-reference/interfaces/Permission.md index f4aa28c0c..37fac5aef 100644 --- a/docs/api-reference/interfaces/Permission.md +++ b/docs/api-reference/interfaces/Permission.md @@ -31,7 +31,7 @@ #### Defined in -[src/services/metadata/types.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L23) +[src/types/MetadataTypes.ts:97](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L97) --- @@ -41,7 +41,7 @@ #### Defined in -[src/services/metadata/types.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L27) +[src/types/MetadataTypes.ts:101](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L101) --- @@ -51,7 +51,7 @@ #### Defined in -[src/services/metadata/types.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L28) +[src/types/MetadataTypes.ts:102](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L102) --- @@ -65,7 +65,7 @@ #### Defined in -[src/services/metadata/types.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L22) +[src/types/MetadataTypes.ts:96](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L96) --- @@ -79,7 +79,7 @@ #### Defined in -[src/services/metadata/types.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L21) +[src/types/MetadataTypes.ts:95](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L95) --- @@ -93,4 +93,4 @@ #### Defined in -[src/services/metadata/types.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L20) +[src/types/MetadataTypes.ts:94](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L94) diff --git a/docs/api-reference/interfaces/PlatformKeeperTech.md b/docs/api-reference/interfaces/PlatformKeeperTech.md index f3ad88e85..82a348e16 100644 --- a/docs/api-reference/interfaces/PlatformKeeperTech.md +++ b/docs/api-reference/interfaces/PlatformKeeperTech.md @@ -33,7 +33,7 @@ #### Defined in -[src/nevermined/Versions.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L15) +[src/nevermined/Versions.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L15) --- @@ -47,7 +47,7 @@ #### Defined in -[src/nevermined/Versions.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L22) +[src/nevermined/Versions.ts:22](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L22) --- @@ -57,7 +57,7 @@ #### Defined in -[src/nevermined/Versions.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L21) +[src/nevermined/Versions.ts:21](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L21) --- @@ -71,7 +71,7 @@ #### Defined in -[src/nevermined/Versions.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L13) +[src/nevermined/Versions.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L13) --- @@ -81,7 +81,7 @@ #### Defined in -[src/nevermined/Versions.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L20) +[src/nevermined/Versions.ts:20](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L20) --- @@ -91,7 +91,7 @@ #### Defined in -[src/nevermined/Versions.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L23) +[src/nevermined/Versions.ts:23](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L23) --- @@ -105,7 +105,7 @@ #### Defined in -[src/nevermined/Versions.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L16) +[src/nevermined/Versions.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L16) --- @@ -119,4 +119,4 @@ #### Defined in -[src/nevermined/Versions.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L14) +[src/nevermined/Versions.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L14) diff --git a/docs/api-reference/interfaces/PlatformTech.md b/docs/api-reference/interfaces/PlatformTech.md index 6765eb25a..5d323c163 100644 --- a/docs/api-reference/interfaces/PlatformTech.md +++ b/docs/api-reference/interfaces/PlatformTech.md @@ -25,7 +25,7 @@ #### Defined in -[src/nevermined/Versions.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L15) +[src/nevermined/Versions.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L15) --- @@ -35,7 +35,7 @@ #### Defined in -[src/nevermined/Versions.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L13) +[src/nevermined/Versions.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L13) --- @@ -45,7 +45,7 @@ #### Defined in -[src/nevermined/Versions.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L16) +[src/nevermined/Versions.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L16) --- @@ -55,4 +55,4 @@ #### Defined in -[src/nevermined/Versions.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L14) +[src/nevermined/Versions.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L14) diff --git a/docs/api-reference/interfaces/PlatformVersions.md b/docs/api-reference/interfaces/PlatformVersions.md index 56ff9d33c..4381fbc72 100644 --- a/docs/api-reference/interfaces/PlatformVersions.md +++ b/docs/api-reference/interfaces/PlatformVersions.md @@ -19,7 +19,7 @@ #### Defined in -[src/nevermined/Versions.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L28) +[src/nevermined/Versions.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L28) --- @@ -29,7 +29,7 @@ #### Defined in -[src/nevermined/Versions.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L29) +[src/nevermined/Versions.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L29) --- @@ -39,7 +39,7 @@ #### Defined in -[src/nevermined/Versions.ts:27](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L27) +[src/nevermined/Versions.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L27) --- @@ -57,4 +57,4 @@ #### Defined in -[src/nevermined/Versions.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/Versions.ts#L30) +[src/nevermined/Versions.ts:30](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/Versions.ts#L30) diff --git a/docs/api-reference/interfaces/Profile.md b/docs/api-reference/interfaces/Profile.md index 9e3c8c5a8..cdcfa37da 100644 --- a/docs/api-reference/interfaces/Profile.md +++ b/docs/api-reference/interfaces/Profile.md @@ -35,7 +35,7 @@ #### Defined in -[src/services/metadata/types.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L44) +[src/types/MetadataTypes.ts:118](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L118) --- @@ -49,7 +49,7 @@ #### Defined in -[src/services/metadata/types.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L40) +[src/types/MetadataTypes.ts:114](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L114) --- @@ -59,7 +59,7 @@ #### Defined in -[src/services/metadata/types.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L49) +[src/types/MetadataTypes.ts:123](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L123) --- @@ -73,7 +73,7 @@ #### Defined in -[src/services/metadata/types.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L43) +[src/types/MetadataTypes.ts:117](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L117) --- @@ -87,7 +87,7 @@ #### Defined in -[src/services/metadata/types.ts:38](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L38) +[src/types/MetadataTypes.ts:112](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L112) --- @@ -101,7 +101,7 @@ #### Defined in -[src/services/metadata/types.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L42) +[src/types/MetadataTypes.ts:116](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L116) --- @@ -115,7 +115,7 @@ #### Defined in -[src/services/metadata/types.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L41) +[src/types/MetadataTypes.ts:115](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L115) --- @@ -129,7 +129,7 @@ #### Defined in -[src/services/metadata/types.ts:39](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L39) +[src/types/MetadataTypes.ts:113](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L113) --- @@ -139,7 +139,7 @@ #### Defined in -[src/services/metadata/types.ts:50](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L50) +[src/types/MetadataTypes.ts:124](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L124) --- @@ -149,4 +149,4 @@ #### Defined in -[src/services/metadata/types.ts:48](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/types.ts#L48) +[src/types/MetadataTypes.ts:122](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L122) diff --git a/docs/api-reference/interfaces/Proof.md b/docs/api-reference/interfaces/Proof.md index 4753f2759..2c9e8c938 100644 --- a/docs/api-reference/interfaces/Proof.md +++ b/docs/api-reference/interfaces/Proof.md @@ -20,7 +20,7 @@ #### Defined in -[src/ddo/types.ts:616](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L616) +[src/types/DDOTypes.ts:660](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L660) --- @@ -30,7 +30,7 @@ #### Defined in -[src/ddo/types.ts:613](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L613) +[src/types/DDOTypes.ts:657](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L657) --- @@ -40,7 +40,7 @@ #### Defined in -[src/ddo/types.ts:614](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L614) +[src/types/DDOTypes.ts:658](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L658) --- @@ -50,7 +50,7 @@ #### Defined in -[src/ddo/types.ts:615](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L615) +[src/types/DDOTypes.ts:659](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L659) --- @@ -60,4 +60,4 @@ #### Defined in -[src/ddo/types.ts:612](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L612) +[src/types/DDOTypes.ts:656](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L656) diff --git a/docs/api-reference/interfaces/ProvenanceAttributeRegisteredEvent.md b/docs/api-reference/interfaces/ProvenanceAttributeRegisteredEvent.md index 316b8aa63..fb0cf411c 100644 --- a/docs/api-reference/interfaces/ProvenanceAttributeRegisteredEvent.md +++ b/docs/api-reference/interfaces/ProvenanceAttributeRegisteredEvent.md @@ -25,7 +25,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L44) +[src/keeper/contracts/Provenance.ts:42](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L42) --- @@ -35,7 +35,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:43](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L43) +[src/keeper/contracts/Provenance.ts:41](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L41) --- @@ -45,7 +45,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:46](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L46) +[src/keeper/contracts/Provenance.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L44) --- @@ -55,7 +55,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:48](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L48) +[src/keeper/contracts/Provenance.ts:46](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L46) --- @@ -65,7 +65,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L49) +[src/keeper/contracts/Provenance.ts:47](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L47) --- @@ -75,7 +75,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:42](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L42) +[src/keeper/contracts/Provenance.ts:40](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L40) --- @@ -85,7 +85,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:40](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L40) +[src/keeper/contracts/Provenance.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L38) --- @@ -95,7 +95,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:47](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L47) +[src/keeper/contracts/Provenance.ts:45](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L45) --- @@ -105,7 +105,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:41](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L41) +[src/keeper/contracts/Provenance.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L39) --- @@ -115,4 +115,4 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:45](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L45) +[src/keeper/contracts/Provenance.ts:43](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L43) diff --git a/docs/api-reference/interfaces/ProvenanceBaseEvent.md b/docs/api-reference/interfaces/ProvenanceBaseEvent.md index fec025c78..3a8183d96 100644 --- a/docs/api-reference/interfaces/ProvenanceBaseEvent.md +++ b/docs/api-reference/interfaces/ProvenanceBaseEvent.md @@ -6,15 +6,15 @@ - **`ProvenanceBaseEvent`** - ↳ [`WasGeneratedByEvent`](WasGeneratedByEvent.md) + ↳ [`ActedOnBehalfEvent`](ActedOnBehalfEvent.md) ↳ [`UsedEvent`](UsedEvent.md) - ↳ [`WasDerivedFromEvent`](WasDerivedFromEvent.md) - ↳ [`WasAssociatedWithEvent`](WasAssociatedWithEvent.md) - ↳ [`ActedOnBehalfEvent`](ActedOnBehalfEvent.md) + ↳ [`WasDerivedFromEvent`](WasDerivedFromEvent.md) + + ↳ [`WasGeneratedByEvent`](WasGeneratedByEvent.md) ## Table of contents @@ -35,7 +35,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L55) +[src/keeper/contracts/Provenance.ts:53](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L53) --- @@ -45,7 +45,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L57) +[src/keeper/contracts/Provenance.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L55) --- @@ -55,7 +55,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:58](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L58) +[src/keeper/contracts/Provenance.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L56) --- @@ -65,7 +65,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:53](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L53) +[src/keeper/contracts/Provenance.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L51) --- @@ -75,7 +75,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L54) +[src/keeper/contracts/Provenance.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L52) --- @@ -85,4 +85,4 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:56](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L56) +[src/keeper/contracts/Provenance.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L54) diff --git a/docs/api-reference/interfaces/ProvenanceRegistry.md b/docs/api-reference/interfaces/ProvenanceRegistry.md index 1c3737af9..588bd4e5b 100644 --- a/docs/api-reference/interfaces/ProvenanceRegistry.md +++ b/docs/api-reference/interfaces/ProvenanceRegistry.md @@ -24,7 +24,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:31](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L31) +[src/keeper/contracts/Provenance.ts:29](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L29) --- @@ -34,7 +34,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L30) +[src/keeper/contracts/Provenance.ts:28](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L28) --- @@ -44,7 +44,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:32](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L32) +[src/keeper/contracts/Provenance.ts:30](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L30) --- @@ -54,7 +54,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:35](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L35) +[src/keeper/contracts/Provenance.ts:33](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L33) --- @@ -64,7 +64,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:34](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L34) +[src/keeper/contracts/Provenance.ts:32](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L32) --- @@ -74,7 +74,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L28) +[src/keeper/contracts/Provenance.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L26) --- @@ -84,7 +84,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:33](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L33) +[src/keeper/contracts/Provenance.ts:31](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L31) --- @@ -94,7 +94,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L29) +[src/keeper/contracts/Provenance.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L27) --- @@ -104,4 +104,4 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:36](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L36) +[src/keeper/contracts/Provenance.ts:34](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L34) diff --git a/docs/api-reference/interfaces/Provider.md b/docs/api-reference/interfaces/Provider.md index 88ce0cd06..e75ccc8ce 100644 --- a/docs/api-reference/interfaces/Provider.md +++ b/docs/api-reference/interfaces/Provider.md @@ -18,7 +18,7 @@ #### Defined in -[src/ddo/types.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L19) +[src/types/DDOTypes.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L14) --- @@ -28,17 +28,17 @@ #### Type declaration -| Name | Type | -| :-------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `cluster` | { `type`: `string` ; `url`: `string` } | -| `cluster.type` | `string` | -| `cluster.url` | `string` | -| `supportedContainers` | { `checksum`: `string` ; `image`: `string` ; `tag`: `string` }[] | -| `supportedServers` | { `cpu`: `string` ; `disk`: `string` ; `gpu`: `string` ; `maxExecutionTime`: `number` ; `memory`: `string` ; `price`: `string` ; `serverId`: `string` ; `serverType`: `string` }[] | +| Name | Type | +| :-------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `cluster` | \{ `type`: `string` ; `url`: `string` } | +| `cluster.type` | `string` | +| `cluster.url` | `string` | +| `supportedContainers` | \{ `checksum`: `string` ; `image`: `string` ; `tag`: `string` }[] | +| `supportedServers` | \{ `cpu`: `string` ; `disk`: `string` ; `gpu`: `string` ; `maxExecutionTime`: `number` ; `memory`: `string` ; `price`: `string` ; `serverId`: `string` ; `serverType`: `string` }[] | #### Defined in -[src/ddo/types.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L20) +[src/types/DDOTypes.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L15) --- @@ -48,4 +48,4 @@ #### Defined in -[src/ddo/types.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L18) +[src/types/DDOTypes.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L13) diff --git a/docs/api-reference/interfaces/PublicKey.md b/docs/api-reference/interfaces/PublicKey.md index ce7423d95..a740cde3b 100644 --- a/docs/api-reference/interfaces/PublicKey.md +++ b/docs/api-reference/interfaces/PublicKey.md @@ -31,7 +31,7 @@ ID of the key. #### Defined in -[src/ddo/types.ts:447](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L447) +[src/types/DDOTypes.ts:498](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L498) --- @@ -49,7 +49,7 @@ Key owner. #### Defined in -[src/ddo/types.ts:462](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L462) +[src/types/DDOTypes.ts:513](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L513) --- @@ -59,7 +59,7 @@ Key owner. #### Defined in -[src/ddo/types.ts:465](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L465) +[src/types/DDOTypes.ts:516](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L516) --- @@ -69,7 +69,7 @@ Key owner. #### Defined in -[src/ddo/types.ts:466](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L466) +[src/types/DDOTypes.ts:517](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L517) --- @@ -79,16 +79,16 @@ Key owner. #### Defined in -[src/ddo/types.ts:464](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L464) +[src/types/DDOTypes.ts:515](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L515) --- ### type -• **type**: `"Ed25519VerificationKey2018"` \| `"RsaVerificationKey2018"` \| `"EdDsaSAPublicKeySecp256k1"` \| `"EthereumECDSAKey"` +• **type**: `"EthereumECDSAKey"` \| `"Ed25519VerificationKey2018"` \| `"RsaVerificationKey2018"` \| `"EdDsaSAPublicKeySecp256k1"` Type of key. #### Defined in -[src/ddo/types.ts:452](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L452) +[src/types/DDOTypes.ts:503](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L503) diff --git a/docs/api-reference/interfaces/QueryResult.md b/docs/api-reference/interfaces/QueryResult.md index 0f6406cfd..c87ac2cd6 100644 --- a/docs/api-reference/interfaces/QueryResult.md +++ b/docs/api-reference/interfaces/QueryResult.md @@ -19,7 +19,7 @@ #### Defined in -[src/services/metadata/MetadataService.ts:11](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L11) +[src/services/metadata/MetadataService.ts:13](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L13) --- @@ -29,7 +29,7 @@ #### Defined in -[src/services/metadata/MetadataService.ts:10](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L10) +[src/services/metadata/MetadataService.ts:12](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L12) --- @@ -39,7 +39,7 @@ #### Defined in -[src/services/metadata/MetadataService.ts:12](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L12) +[src/services/metadata/MetadataService.ts:14](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L14) --- @@ -53,4 +53,4 @@ #### Defined in -[src/services/metadata/MetadataService.ts:13](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/metadata/MetadataService.ts#L13) +[src/services/metadata/MetadataService.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/metadata/MetadataService.ts#L15) diff --git a/docs/api-reference/interfaces/ReducedProfile.md b/docs/api-reference/interfaces/ReducedProfile.md new file mode 100644 index 000000000..2a7865f24 --- /dev/null +++ b/docs/api-reference/interfaces/ReducedProfile.md @@ -0,0 +1,41 @@ +[@nevermined-io/sdk](../code-reference.md) / ReducedProfile + +# Interface: ReducedProfile + +## Table of contents + +### Properties + +- [additionalInformation](ReducedProfile.md#additionalinformation) +- [nickname](ReducedProfile.md#nickname) +- [userId](ReducedProfile.md#userid) + +## Properties + +### additionalInformation + +• `Optional` **additionalInformation**: `unknown` + +#### Defined in + +[src/types/MetadataTypes.ts:130](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L130) + +--- + +### nickname + +• `Optional` **nickname**: `string` + +#### Defined in + +[src/types/MetadataTypes.ts:129](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L129) + +--- + +### userId + +• **userId**: `string` + +#### Defined in + +[src/types/MetadataTypes.ts:128](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L128) diff --git a/docs/api-reference/interfaces/ResourceAuthentication.md b/docs/api-reference/interfaces/ResourceAuthentication.md index 478afff32..0e6e98455 100644 --- a/docs/api-reference/interfaces/ResourceAuthentication.md +++ b/docs/api-reference/interfaces/ResourceAuthentication.md @@ -20,17 +20,17 @@ #### Defined in -[src/ddo/types.ts:207](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L207) +[src/types/DDOTypes.ts:235](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L235) --- ### privateParameters -• `Optional` **privateParameters**: { `[name: string]`: `string`; }[] +• `Optional` **privateParameters**: \{ `[name: string]`: `string`; }[] #### Defined in -[src/ddo/types.ts:209](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L209) +[src/types/DDOTypes.ts:237](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L237) --- @@ -40,17 +40,17 @@ #### Defined in -[src/ddo/types.ts:208](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L208) +[src/types/DDOTypes.ts:236](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L236) --- ### type -• **type**: `"none"` \| `"basic"` \| `"oauth"` +• **type**: `"none"` \| `"basic"` \| `"bearer"` \| `"oauth"` #### Defined in -[src/ddo/types.ts:204](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L204) +[src/types/DDOTypes.ts:232](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L232) --- @@ -60,4 +60,4 @@ #### Defined in -[src/ddo/types.ts:206](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L206) +[src/types/DDOTypes.ts:234](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L234) diff --git a/docs/api-reference/interfaces/RoyaltyAttributes.md b/docs/api-reference/interfaces/RoyaltyAttributes.md index 41fdf4435..b60ce91ab 100644 --- a/docs/api-reference/interfaces/RoyaltyAttributes.md +++ b/docs/api-reference/interfaces/RoyaltyAttributes.md @@ -20,7 +20,7 @@ Attributes defining the royalties model attached to the asset #### Defined in -[src/nevermined/api/AssetsApi.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L63) +[src/nevermined/api/AssetsApi.ts:38](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L38) --- @@ -30,7 +30,7 @@ Attributes defining the royalties model attached to the asset #### Defined in -[src/nevermined/api/AssetsApi.ts:61](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L61) +[src/nevermined/api/AssetsApi.ts:36](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L36) --- @@ -40,4 +40,4 @@ Attributes defining the royalties model attached to the asset #### Defined in -[src/nevermined/api/AssetsApi.ts:62](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/api/AssetsApi.ts#L62) +[src/nevermined/api/AssetsApi.ts:37](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/api/AssetsApi.ts#L37) diff --git a/docs/api-reference/interfaces/SearchQuery.md b/docs/api-reference/interfaces/SearchQuery.md index d9b69b219..92cda875c 100644 --- a/docs/api-reference/interfaces/SearchQuery.md +++ b/docs/api-reference/interfaces/SearchQuery.md @@ -22,7 +22,7 @@ #### Defined in -[src/common/interfaces.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/interfaces.ts#L20) +[src/types/MetadataTypes.ts:72](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L72) --- @@ -32,7 +32,7 @@ #### Defined in -[src/common/interfaces.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/interfaces.ts#L14) +[src/types/MetadataTypes.ts:66](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L66) --- @@ -42,7 +42,7 @@ #### Defined in -[src/common/interfaces.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/interfaces.ts#L15) +[src/types/MetadataTypes.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L67) --- @@ -52,7 +52,7 @@ #### Defined in -[src/common/interfaces.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/interfaces.ts#L17) +[src/types/MetadataTypes.ts:69](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L69) --- @@ -62,7 +62,7 @@ #### Defined in -[src/common/interfaces.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/interfaces.ts#L19) +[src/types/MetadataTypes.ts:71](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L71) --- @@ -72,7 +72,7 @@ #### Defined in -[src/common/interfaces.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/interfaces.ts#L18) +[src/types/MetadataTypes.ts:70](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L70) --- @@ -82,4 +82,4 @@ #### Defined in -[src/common/interfaces.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/common/interfaces.ts#L16) +[src/types/MetadataTypes.ts:68](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L68) diff --git a/docs/api-reference/interfaces/SearchResults.md b/docs/api-reference/interfaces/SearchResults.md new file mode 100644 index 000000000..37124856a --- /dev/null +++ b/docs/api-reference/interfaces/SearchResults.md @@ -0,0 +1,30 @@ +[@nevermined-io/sdk](../code-reference.md) / SearchResults + +# Interface: SearchResults + +## Table of contents + +### Properties + +- [relation](SearchResults.md#relation) +- [value](SearchResults.md#value) + +## Properties + +### relation + +• **relation**: `"eq"` \| `"gte"` + +#### Defined in + +[src/types/MetadataTypes.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L55) + +--- + +### value + +• **value**: `number` + +#### Defined in + +[src/types/MetadataTypes.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/MetadataTypes.ts#L54) diff --git a/docs/api-reference/interfaces/ServiceAaveCredit.md b/docs/api-reference/interfaces/ServiceAaveCredit.md deleted file mode 100644 index 9ffd27048..000000000 --- a/docs/api-reference/interfaces/ServiceAaveCredit.md +++ /dev/null @@ -1,104 +0,0 @@ -[@nevermined-io/sdk](../code-reference.md) / ServiceAaveCredit - -# Interface: ServiceAaveCredit - -## Hierarchy - -- [`ServiceCommon`](ServiceCommon.md) - - ↳ **`ServiceAaveCredit`** - -## Table of contents - -### Properties - -- [attributes](ServiceAaveCredit.md#attributes) -- [index](ServiceAaveCredit.md#index) -- [serviceEndpoint](ServiceAaveCredit.md#serviceendpoint) -- [templateId](ServiceAaveCredit.md#templateid) -- [type](ServiceAaveCredit.md#type) - -## Properties - -### attributes - -• **attributes**: `Object` - -#### Type declaration - -| Name | Type | -| :----------------------------------------------- | :--------------------------------------------------------------------------------------------------------------- | -| `additionalInformation` | { `description`: `string` ; `priceHighestDenomination`: `number` } | -| `additionalInformation.description` | `string` | -| `additionalInformation.priceHighestDenomination` | `number` | -| `main` | { `creator`: `string` ; `datePublished`: `string` ; `name`: `string` ; `price`: `string` ; `timeout`: `number` } | -| `main.creator` | `string` | -| `main.datePublished` | `string` | -| `main.name` | `string` | -| `main.price` | `string` | -| `main.timeout` | `number` | -| `serviceAgreementTemplate?` | [`ServiceAgreementTemplate`](ServiceAgreementTemplate.md) | - -#### Overrides - -[ServiceCommon](ServiceCommon.md).[attributes](ServiceCommon.md#attributes) - -#### Defined in - -[src/keeper/contracts/defi/Service.ts:30](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/Service.ts#L30) - ---- - -### index - -• **index**: `number` - -#### Inherited from - -[ServiceCommon](ServiceCommon.md).[index](ServiceCommon.md#index) - -#### Defined in - -[src/ddo/types.ts:592](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L592) - ---- - -### serviceEndpoint - -• `Optional` **serviceEndpoint**: `string` - -#### Inherited from - -[ServiceCommon](ServiceCommon.md).[serviceEndpoint](ServiceCommon.md#serviceendpoint) - -#### Defined in - -[src/ddo/types.ts:593](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L593) - ---- - -### templateId - -• `Optional` **templateId**: `string` - -#### Overrides - -[ServiceCommon](ServiceCommon.md).[templateId](ServiceCommon.md#templateid) - -#### Defined in - -[src/keeper/contracts/defi/Service.ts:29](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/Service.ts#L29) - ---- - -### type - -• **type**: `"aave-credit"` - -#### Overrides - -[ServiceCommon](ServiceCommon.md).[type](ServiceCommon.md#type) - -#### Defined in - -[src/keeper/contracts/defi/Service.ts:28](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/defi/Service.ts#L28) diff --git a/docs/api-reference/interfaces/ServiceAccess.md b/docs/api-reference/interfaces/ServiceAccess.md index 2f7a85b8c..2748b7c92 100644 --- a/docs/api-reference/interfaces/ServiceAccess.md +++ b/docs/api-reference/interfaces/ServiceAccess.md @@ -28,18 +28,18 @@ #### Type declaration -| Name | Type | -| :----------------------------------------------- | :--------------------------------------------------------------------------------------------------------------- | -| `additionalInformation` | { `description`: `string` ; `priceHighestDenomination`: `number` } | -| `additionalInformation.description` | `string` | -| `additionalInformation.priceHighestDenomination` | `number` | -| `main` | { `creator`: `string` ; `datePublished`: `string` ; `name`: `string` ; `price`: `string` ; `timeout`: `number` } | -| `main.creator` | `string` | -| `main.datePublished` | `string` | -| `main.name` | `string` | -| `main.price` | `string` | -| `main.timeout` | `number` | -| `serviceAgreementTemplate?` | [`ServiceAgreementTemplate`](ServiceAgreementTemplate.md) | +| Name | Type | +| :----------------------------------------------- | :---------------------------------------------------------------------------------------------------------------- | +| `additionalInformation` | \{ `description`: `string` ; `priceHighestDenomination`: `number` } | +| `additionalInformation.description` | `string` | +| `additionalInformation.priceHighestDenomination` | `number` | +| `main` | \{ `creator`: `string` ; `datePublished`: `string` ; `name`: `string` ; `price`: `string` ; `timeout`: `number` } | +| `main.creator` | `string` | +| `main.datePublished` | `string` | +| `main.name` | `string` | +| `main.price` | `string` | +| `main.timeout` | `number` | +| `serviceAgreementTemplate?` | [`ServiceAgreementTemplate`](ServiceAgreementTemplate.md) | #### Overrides @@ -47,7 +47,7 @@ #### Defined in -[src/ddo/types.ts:639](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L639) +[src/types/DDOTypes.ts:683](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L683) --- @@ -61,7 +61,7 @@ #### Defined in -[src/ddo/types.ts:592](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L592) +[src/types/DDOTypes.ts:636](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L636) --- @@ -75,7 +75,7 @@ #### Defined in -[src/ddo/types.ts:593](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L593) +[src/types/DDOTypes.ts:637](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L637) --- @@ -89,7 +89,7 @@ #### Defined in -[src/ddo/types.ts:638](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L638) +[src/types/DDOTypes.ts:682](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L682) --- @@ -103,4 +103,4 @@ #### Defined in -[src/ddo/types.ts:637](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L637) +[src/types/DDOTypes.ts:681](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L681) diff --git a/docs/api-reference/interfaces/ServiceAgreementTemplate.md b/docs/api-reference/interfaces/ServiceAgreementTemplate.md index fbe545c97..c8d8f7ad0 100644 --- a/docs/api-reference/interfaces/ServiceAgreementTemplate.md +++ b/docs/api-reference/interfaces/ServiceAgreementTemplate.md @@ -24,7 +24,7 @@ #### Defined in -[src/ddo/types.ts:796](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L796) +[src/types/DDOTypes.ts:840](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L840) --- @@ -34,7 +34,7 @@ #### Defined in -[src/ddo/types.ts:797](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L797) +[src/types/DDOTypes.ts:841](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L841) --- @@ -44,7 +44,7 @@ #### Defined in -[src/ddo/types.ts:793](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L793) +[src/types/DDOTypes.ts:837](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L837) --- @@ -54,7 +54,7 @@ #### Defined in -[src/ddo/types.ts:794](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L794) +[src/types/DDOTypes.ts:838](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L838) --- @@ -64,4 +64,4 @@ #### Defined in -[src/ddo/types.ts:795](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L795) +[src/types/DDOTypes.ts:839](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L839) diff --git a/docs/api-reference/interfaces/ServiceAgreementTemplateCondition.md b/docs/api-reference/interfaces/ServiceAgreementTemplateCondition.md index 11853e0d6..369153815 100644 --- a/docs/api-reference/interfaces/ServiceAgreementTemplateCondition.md +++ b/docs/api-reference/interfaces/ServiceAgreementTemplateCondition.md @@ -22,7 +22,7 @@ #### Defined in -[src/ddo/types.ts:786](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L786) +[src/types/DDOTypes.ts:830](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L830) --- @@ -32,7 +32,7 @@ #### Defined in -[src/ddo/types.ts:789](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L789) +[src/types/DDOTypes.ts:833](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L833) --- @@ -42,7 +42,7 @@ #### Defined in -[src/ddo/types.ts:787](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L787) +[src/types/DDOTypes.ts:831](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L831) --- @@ -52,7 +52,7 @@ #### Defined in -[src/ddo/types.ts:783](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L783) +[src/types/DDOTypes.ts:827](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L827) --- @@ -62,7 +62,7 @@ #### Defined in -[src/ddo/types.ts:788](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L788) +[src/types/DDOTypes.ts:832](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L832) --- @@ -72,7 +72,7 @@ #### Defined in -[src/ddo/types.ts:784](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L784) +[src/types/DDOTypes.ts:828](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L828) --- @@ -82,4 +82,4 @@ #### Defined in -[src/ddo/types.ts:785](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L785) +[src/types/DDOTypes.ts:829](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L829) diff --git a/docs/api-reference/interfaces/ServiceAgreementTemplateEvent.md b/docs/api-reference/interfaces/ServiceAgreementTemplateEvent.md index 0294496da..eaf6b9f2f 100644 --- a/docs/api-reference/interfaces/ServiceAgreementTemplateEvent.md +++ b/docs/api-reference/interfaces/ServiceAgreementTemplateEvent.md @@ -18,7 +18,7 @@ #### Defined in -[src/ddo/types.ts:774](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L774) +[src/types/DDOTypes.ts:818](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L818) --- @@ -36,7 +36,7 @@ #### Defined in -[src/ddo/types.ts:775](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L775) +[src/types/DDOTypes.ts:819](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L819) --- @@ -46,4 +46,4 @@ #### Defined in -[src/ddo/types.ts:773](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L773) +[src/types/DDOTypes.ts:817](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L817) diff --git a/docs/api-reference/interfaces/ServiceAgreementTemplateParameter.md b/docs/api-reference/interfaces/ServiceAgreementTemplateParameter.md index f6e479670..972cb4bcf 100644 --- a/docs/api-reference/interfaces/ServiceAgreementTemplateParameter.md +++ b/docs/api-reference/interfaces/ServiceAgreementTemplateParameter.md @@ -18,7 +18,7 @@ #### Defined in -[src/ddo/types.ts:767](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L767) +[src/types/DDOTypes.ts:811](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L811) --- @@ -28,7 +28,7 @@ #### Defined in -[src/ddo/types.ts:768](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L768) +[src/types/DDOTypes.ts:812](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L812) --- @@ -38,4 +38,4 @@ #### Defined in -[src/ddo/types.ts:769](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L769) +[src/types/DDOTypes.ts:813](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L813) diff --git a/docs/api-reference/interfaces/ServiceAttributes.md b/docs/api-reference/interfaces/ServiceAttributes.md index fe30f7a7b..fdd544eca 100644 --- a/docs/api-reference/interfaces/ServiceAttributes.md +++ b/docs/api-reference/interfaces/ServiceAttributes.md @@ -19,7 +19,7 @@ #### Defined in -[src/ddo/types.ts:623](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L623) +[src/types/DDOTypes.ts:667](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L667) --- @@ -29,7 +29,7 @@ #### Defined in -[src/ddo/types.ts:622](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L622) +[src/types/DDOTypes.ts:666](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L666) --- @@ -39,7 +39,7 @@ #### Defined in -[src/ddo/types.ts:621](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L621) +[src/types/DDOTypes.ts:665](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L665) --- @@ -49,4 +49,4 @@ #### Defined in -[src/ddo/types.ts:620](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L620) +[src/types/DDOTypes.ts:664](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L664) diff --git a/docs/api-reference/interfaces/ServiceAuthorization.md b/docs/api-reference/interfaces/ServiceAuthorization.md index f65f258c1..42586269c 100644 --- a/docs/api-reference/interfaces/ServiceAuthorization.md +++ b/docs/api-reference/interfaces/ServiceAuthorization.md @@ -31,7 +31,7 @@ #### Defined in -[src/ddo/types.ts:595](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L595) +[src/types/DDOTypes.ts:639](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L639) --- @@ -45,7 +45,7 @@ #### Defined in -[src/ddo/types.ts:592](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L592) +[src/types/DDOTypes.ts:636](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L636) --- @@ -55,7 +55,7 @@ #### Defined in -[src/ddo/types.ts:628](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L628) +[src/types/DDOTypes.ts:672](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L672) --- @@ -69,7 +69,7 @@ #### Defined in -[src/ddo/types.ts:593](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L593) +[src/types/DDOTypes.ts:637](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L637) --- @@ -83,7 +83,7 @@ #### Defined in -[src/ddo/types.ts:594](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L594) +[src/types/DDOTypes.ts:638](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L638) --- @@ -97,4 +97,4 @@ #### Defined in -[src/ddo/types.ts:627](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L627) +[src/types/DDOTypes.ts:671](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L671) diff --git a/docs/api-reference/interfaces/ServiceCommon.md b/docs/api-reference/interfaces/ServiceCommon.md index dd18ce3e2..585d31dd9 100644 --- a/docs/api-reference/interfaces/ServiceCommon.md +++ b/docs/api-reference/interfaces/ServiceCommon.md @@ -6,20 +6,18 @@ - **`ServiceCommon`** - ↳ [`ServiceMetadata`](ServiceMetadata.md) + ↳ [`ServiceAccess`](ServiceAccess.md) ↳ [`ServiceAuthorization`](ServiceAuthorization.md) - ↳ [`ServiceAccess`](ServiceAccess.md) - ↳ [`ServiceCompute`](ServiceCompute.md) + ↳ [`ServiceMetadata`](ServiceMetadata.md) + ↳ [`ServiceNFTAccess`](ServiceNFTAccess.md) ↳ [`ServiceNFTSales`](ServiceNFTSales.md) - ↳ [`ServiceAaveCredit`](ServiceAaveCredit.md) - ## Table of contents ### Properties @@ -38,7 +36,7 @@ #### Defined in -[src/ddo/types.ts:595](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L595) +[src/types/DDOTypes.ts:639](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L639) --- @@ -48,7 +46,7 @@ #### Defined in -[src/ddo/types.ts:592](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L592) +[src/types/DDOTypes.ts:636](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L636) --- @@ -58,7 +56,7 @@ #### Defined in -[src/ddo/types.ts:593](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L593) +[src/types/DDOTypes.ts:637](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L637) --- @@ -68,7 +66,7 @@ #### Defined in -[src/ddo/types.ts:594](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L594) +[src/types/DDOTypes.ts:638](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L638) --- @@ -78,4 +76,4 @@ #### Defined in -[src/ddo/types.ts:591](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L591) +[src/types/DDOTypes.ts:635](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L635) diff --git a/docs/api-reference/interfaces/ServiceCompute.md b/docs/api-reference/interfaces/ServiceCompute.md index 0a105ae0d..843a76243 100644 --- a/docs/api-reference/interfaces/ServiceCompute.md +++ b/docs/api-reference/interfaces/ServiceCompute.md @@ -28,18 +28,18 @@ #### Type declaration -| Name | Type | -| :----------------------------------------------- | :--------------------------------------------------------------------------------------------------------------- | -| `additionalInformation` | { `description`: `string` ; `priceHighestDenomination`: `number` } | -| `additionalInformation.description` | `string` | -| `additionalInformation.priceHighestDenomination` | `number` | -| `main` | { `creator`: `string` ; `datePublished`: `string` ; `name`: `string` ; `price`: `string` ; `timeout`: `number` } | -| `main.creator` | `string` | -| `main.datePublished` | `string` | -| `main.name` | `string` | -| `main.price` | `string` | -| `main.timeout` | `number` | -| `serviceAgreementTemplate?` | [`ServiceAgreementTemplate`](ServiceAgreementTemplate.md) | +| Name | Type | +| :----------------------------------------------- | :---------------------------------------------------------------------------------------------------------------- | +| `additionalInformation` | \{ `description`: `string` ; `priceHighestDenomination`: `number` } | +| `additionalInformation.description` | `string` | +| `additionalInformation.priceHighestDenomination` | `number` | +| `main` | \{ `creator`: `string` ; `datePublished`: `string` ; `name`: `string` ; `price`: `string` ; `timeout`: `number` } | +| `main.creator` | `string` | +| `main.datePublished` | `string` | +| `main.name` | `string` | +| `main.price` | `string` | +| `main.timeout` | `number` | +| `serviceAgreementTemplate?` | [`ServiceAgreementTemplate`](ServiceAgreementTemplate.md) | #### Overrides @@ -47,7 +47,7 @@ #### Defined in -[src/ddo/types.ts:658](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L658) +[src/types/DDOTypes.ts:702](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L702) --- @@ -61,7 +61,7 @@ #### Defined in -[src/ddo/types.ts:592](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L592) +[src/types/DDOTypes.ts:636](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L636) --- @@ -75,7 +75,7 @@ #### Defined in -[src/ddo/types.ts:593](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L593) +[src/types/DDOTypes.ts:637](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L637) --- @@ -89,7 +89,7 @@ #### Defined in -[src/ddo/types.ts:657](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L657) +[src/types/DDOTypes.ts:701](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L701) --- @@ -103,4 +103,4 @@ #### Defined in -[src/ddo/types.ts:656](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L656) +[src/types/DDOTypes.ts:700](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L700) diff --git a/docs/api-reference/interfaces/ServiceDefinition.md b/docs/api-reference/interfaces/ServiceDefinition.md index 4555be3e3..93318dd97 100644 --- a/docs/api-reference/interfaces/ServiceDefinition.md +++ b/docs/api-reference/interfaces/ServiceDefinition.md @@ -26,7 +26,7 @@ #### Defined in -[src/ddo/types.ts:84](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L84) +[src/types/DDOTypes.ts:94](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L94) --- @@ -45,4 +45,4 @@ #### Defined in -[src/ddo/types.ts:90](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L90) +[src/types/DDOTypes.ts:100](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L100) diff --git a/docs/api-reference/interfaces/ServiceMetadata.md b/docs/api-reference/interfaces/ServiceMetadata.md index b2fc94f92..c36275998 100644 --- a/docs/api-reference/interfaces/ServiceMetadata.md +++ b/docs/api-reference/interfaces/ServiceMetadata.md @@ -33,7 +33,7 @@ #### Defined in -[src/ddo/types.ts:633](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L633) +[src/types/DDOTypes.ts:677](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L677) --- @@ -43,7 +43,7 @@ #### Defined in -[src/ddo/types.ts:101](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L101) +[src/types/DDOTypes.ts:111](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L111) --- @@ -57,7 +57,7 @@ #### Defined in -[src/ddo/types.ts:592](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L592) +[src/types/DDOTypes.ts:636](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L636) --- @@ -71,7 +71,7 @@ #### Defined in -[src/ddo/types.ts:593](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L593) +[src/types/DDOTypes.ts:637](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L637) --- @@ -81,7 +81,7 @@ #### Defined in -[src/ddo/types.ts:99](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L99) +[src/types/DDOTypes.ts:109](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L109) --- @@ -91,7 +91,7 @@ #### Defined in -[src/ddo/types.ts:100](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L100) +[src/types/DDOTypes.ts:110](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L110) --- @@ -105,7 +105,7 @@ #### Defined in -[src/ddo/types.ts:594](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L594) +[src/types/DDOTypes.ts:638](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L638) --- @@ -119,4 +119,4 @@ #### Defined in -[src/ddo/types.ts:632](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L632) +[src/types/DDOTypes.ts:676](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L676) diff --git a/docs/api-reference/interfaces/ServiceNFTAccess.md b/docs/api-reference/interfaces/ServiceNFTAccess.md index 5a30c3fca..da741c1aa 100644 --- a/docs/api-reference/interfaces/ServiceNFTAccess.md +++ b/docs/api-reference/interfaces/ServiceNFTAccess.md @@ -26,18 +26,19 @@ #### Type declaration -| Name | Type | -| :---------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `additionalInformation` | { `description`: `string` } | -| `additionalInformation.description` | `string` | -| `main` | { `creator`: `string` ; `datePublished`: `string` ; `ercType`: [`ERCType`](../enums/ERCType.md) ; `name`: `string` ; `nftType`: [`NeverminedNFTType`](../code-reference.md#neverminednfttype) ; `timeout`: `number` } | -| `main.creator` | `string` | -| `main.datePublished` | `string` | -| `main.ercType` | [`ERCType`](../enums/ERCType.md) | -| `main.name` | `string` | -| `main.nftType` | [`NeverminedNFTType`](../code-reference.md#neverminednfttype) | -| `main.timeout` | `number` | -| `serviceAgreementTemplate?` | [`ServiceAgreementTemplate`](ServiceAgreementTemplate.md) | +| Name | Type | +| :---------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `additionalInformation` | \{ `description`: `string` } | +| `additionalInformation.description` | `string` | +| `main` | \{ `creator`: `string` ; `datePublished`: `string` ; `ercType`: [`ERCType`](../enums/ERCType.md) ; `name`: `string` ; `nftAttributes?`: [`NFTServiceAttributes`](../classes/NFTServiceAttributes.md) ; `nftType`: [`NeverminedNFTType`](../code-reference.md#neverminednfttype) ; `timeout`: `number` } | +| `main.creator` | `string` | +| `main.datePublished` | `string` | +| `main.ercType` | [`ERCType`](../enums/ERCType.md) | +| `main.name` | `string` | +| `main.nftAttributes?` | [`NFTServiceAttributes`](../classes/NFTServiceAttributes.md) | +| `main.nftType` | [`NeverminedNFTType`](../code-reference.md#neverminednfttype) | +| `main.timeout` | `number` | +| `serviceAgreementTemplate?` | [`ServiceAgreementTemplate`](ServiceAgreementTemplate.md) | #### Overrides @@ -45,7 +46,7 @@ #### Defined in -[src/ddo/types.ts:677](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L677) +[src/types/DDOTypes.ts:721](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L721) --- @@ -59,7 +60,7 @@ #### Defined in -[src/ddo/types.ts:592](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L592) +[src/types/DDOTypes.ts:636](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L636) --- @@ -73,7 +74,7 @@ #### Defined in -[src/ddo/types.ts:593](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L593) +[src/types/DDOTypes.ts:637](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L637) --- @@ -87,7 +88,7 @@ #### Defined in -[src/ddo/types.ts:676](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L676) +[src/types/DDOTypes.ts:720](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L720) --- @@ -101,4 +102,4 @@ #### Defined in -[src/ddo/types.ts:675](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L675) +[src/types/DDOTypes.ts:719](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L719) diff --git a/docs/api-reference/interfaces/ServiceNFTSales.md b/docs/api-reference/interfaces/ServiceNFTSales.md index 7adc8de62..73b6d0488 100644 --- a/docs/api-reference/interfaces/ServiceNFTSales.md +++ b/docs/api-reference/interfaces/ServiceNFTSales.md @@ -28,20 +28,21 @@ #### Type declaration -| Name | Type | -| :----------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `additionalInformation` | { `description`: `string` ; `priceHighestDenomination`: `number` } | -| `additionalInformation.description` | `string` | -| `additionalInformation.priceHighestDenomination` | `number` | -| `main` | { `creator`: `string` ; `datePublished`: `string` ; `ercType`: [`ERCType`](../enums/ERCType.md) ; `name`: `string` ; `nftType`: [`NeverminedNFTType`](../code-reference.md#neverminednfttype) ; `price`: `string` ; `timeout`: `number` } | -| `main.creator` | `string` | -| `main.datePublished` | `string` | -| `main.ercType` | [`ERCType`](../enums/ERCType.md) | -| `main.name` | `string` | -| `main.nftType` | [`NeverminedNFTType`](../code-reference.md#neverminednfttype) | -| `main.price` | `string` | -| `main.timeout` | `number` | -| `serviceAgreementTemplate?` | [`ServiceAgreementTemplate`](ServiceAgreementTemplate.md) | +| Name | Type | +| :----------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `additionalInformation` | \{ `description`: `string` ; `priceHighestDenomination`: `number` } | +| `additionalInformation.description` | `string` | +| `additionalInformation.priceHighestDenomination` | `number` | +| `main` | \{ `creator`: `string` ; `datePublished`: `string` ; `ercType`: [`ERCType`](../enums/ERCType.md) ; `name`: `string` ; `nftAttributes?`: [`NFTServiceAttributes`](../classes/NFTServiceAttributes.md) ; `nftType`: [`NeverminedNFTType`](../code-reference.md#neverminednfttype) ; `price`: `string` ; `timeout`: `number` } | +| `main.creator` | `string` | +| `main.datePublished` | `string` | +| `main.ercType` | [`ERCType`](../enums/ERCType.md) | +| `main.name` | `string` | +| `main.nftAttributes?` | [`NFTServiceAttributes`](../classes/NFTServiceAttributes.md) | +| `main.nftType` | [`NeverminedNFTType`](../code-reference.md#neverminednfttype) | +| `main.price` | `string` | +| `main.timeout` | `number` | +| `serviceAgreementTemplate?` | [`ServiceAgreementTemplate`](ServiceAgreementTemplate.md) | #### Overrides @@ -49,7 +50,7 @@ #### Defined in -[src/ddo/types.ts:696](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L696) +[src/types/DDOTypes.ts:741](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L741) --- @@ -63,7 +64,7 @@ #### Defined in -[src/ddo/types.ts:592](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L592) +[src/types/DDOTypes.ts:636](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L636) --- @@ -77,7 +78,7 @@ #### Defined in -[src/ddo/types.ts:593](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L593) +[src/types/DDOTypes.ts:637](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L637) --- @@ -91,7 +92,7 @@ #### Defined in -[src/ddo/types.ts:695](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L695) +[src/types/DDOTypes.ts:740](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L740) --- @@ -105,4 +106,4 @@ #### Defined in -[src/ddo/types.ts:694](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L694) +[src/types/DDOTypes.ts:739](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L739) diff --git a/docs/api-reference/interfaces/ServicePlugin.md b/docs/api-reference/interfaces/ServicePlugin.md index 36a83fce2..943faeeba 100644 --- a/docs/api-reference/interfaces/ServicePlugin.md +++ b/docs/api-reference/interfaces/ServicePlugin.md @@ -1,6 +1,6 @@ [@nevermined-io/sdk](../code-reference.md) / ServicePlugin -# Interface: ServicePlugin +# Interface: ServicePlugin\ ## Type parameters @@ -28,7 +28,7 @@ ### accept -▸ **accept**(`params`): `Promise`<`boolean`\> +▸ **accept**(`params`): `Promise`\<`boolean`\> #### Parameters @@ -38,26 +38,26 @@ #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Defined in -[src/ddo/types.ts:761](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L761) +[src/types/DDOTypes.ts:805](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L805) --- ### createService -▸ **createService**(`publisher`, `metadata`, `serviceAttributes`, `nftAttributes`, `pricedData?`): `T` +▸ **createService**(`publisher`, `metadata`, `serviceAttributes`, `nftAttributes?`, `pricedData?`): `T` #### Parameters | Name | Type | | :------------------ | :---------------------------------------------------------------------------- | -| `publisher` | [`Account`](../classes/Account.md) | +| `publisher` | [`NvmAccount`](../classes/NvmAccount.md) | | `metadata` | [`MetaData`](MetaData.md) | | `serviceAttributes` | [`ServiceAttributes`](ServiceAttributes.md) | -| `nftAttributes` | [`NFTAttributes`](../classes/NFTAttributes.md) | +| `nftAttributes?` | [`NFTAttributes`](../classes/NFTAttributes.md) | | `pricedData?` | [`PricedMetadataInformation`](../code-reference.md#pricedmetadatainformation) | #### Returns @@ -66,48 +66,48 @@ #### Defined in -[src/ddo/types.ts:751](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L751) +[src/types/DDOTypes.ts:795](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L795) --- ### process -▸ **process**(`params`, `from`, `txparams?`): `Promise`<`void`\> +▸ **process**(`params`, `from`, `txparams?`): `Promise`\<`void`\> #### Parameters | Name | Type | | :---------- | :---------------------------------------- | | `params` | [`ValidationParams`](ValidationParams.md) | -| `from` | [`Account`](../classes/Account.md) | +| `from` | [`NvmAccount`](../classes/NvmAccount.md) | | `txparams?` | [`TxParameters`](TxParameters.md) | #### Returns -`Promise`<`void`\> +`Promise`\<`void`\> #### Defined in -[src/ddo/types.ts:759](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L759) +[src/types/DDOTypes.ts:803](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L803) --- ### track -▸ **track**(`params`, `from`, `txparams?`): `Promise`<`boolean`\> +▸ **track**(`params`, `from`, `txparams?`): `Promise`\<`boolean`\> #### Parameters | Name | Type | | :---------- | :---------------------------------------- | | `params` | [`ValidationParams`](ValidationParams.md) | -| `from` | [`Account`](../classes/Account.md) | +| `from` | [`NvmAccount`](../classes/NvmAccount.md) | | `txparams?` | [`TxParameters`](TxParameters.md) | #### Returns -`Promise`<`boolean`\> +`Promise`\<`boolean`\> #### Defined in -[src/ddo/types.ts:763](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L763) +[src/types/DDOTypes.ts:807](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L807) diff --git a/docs/api-reference/interfaces/ServiceSecondary.md b/docs/api-reference/interfaces/ServiceSecondary.md index 1737f8842..b8d30d197 100644 --- a/docs/api-reference/interfaces/ServiceSecondary.md +++ b/docs/api-reference/interfaces/ServiceSecondary.md @@ -28,7 +28,7 @@ #### Defined in -[src/ddo/types.ts:715](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L715) +[src/types/DDOTypes.ts:761](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L761) --- @@ -42,7 +42,7 @@ Service.attributes #### Defined in -[src/ddo/types.ts:595](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L595) +[src/types/DDOTypes.ts:639](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L639) --- @@ -52,7 +52,7 @@ Service.attributes #### Defined in -[src/ddo/types.ts:716](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L716) +[src/types/DDOTypes.ts:762](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L762) --- @@ -66,7 +66,7 @@ Service.index #### Defined in -[src/ddo/types.ts:592](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L592) +[src/types/DDOTypes.ts:636](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L636) --- @@ -80,7 +80,7 @@ Service.serviceEndpoint #### Defined in -[src/ddo/types.ts:593](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L593) +[src/types/DDOTypes.ts:637](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L637) --- @@ -94,7 +94,7 @@ Service.templateId #### Defined in -[src/ddo/types.ts:594](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L594) +[src/types/DDOTypes.ts:638](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L638) --- @@ -108,4 +108,4 @@ Service.type #### Defined in -[src/ddo/types.ts:591](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L591) +[src/types/DDOTypes.ts:635](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L635) diff --git a/docs/api-reference/interfaces/Stage.md b/docs/api-reference/interfaces/Stage.md index cfaa58235..77bbe1a88 100644 --- a/docs/api-reference/interfaces/Stage.md +++ b/docs/api-reference/interfaces/Stage.md @@ -20,7 +20,7 @@ #### Defined in -[src/ddo/types.ts:59](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L59) +[src/types/DDOTypes.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L54) --- @@ -30,7 +30,7 @@ #### Defined in -[src/ddo/types.ts:61](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L61) +[src/types/DDOTypes.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L56) --- @@ -40,7 +40,7 @@ #### Defined in -[src/ddo/types.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L63) +[src/types/DDOTypes.ts:58](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L58) --- @@ -50,7 +50,7 @@ #### Defined in -[src/ddo/types.ts:60](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L60) +[src/types/DDOTypes.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L55) --- @@ -60,4 +60,4 @@ #### Defined in -[src/ddo/types.ts:62](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L62) +[src/types/DDOTypes.ts:57](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L57) diff --git a/docs/api-reference/interfaces/StageInput.md b/docs/api-reference/interfaces/StageInput.md index 2d0a790ee..f78dca9ae 100644 --- a/docs/api-reference/interfaces/StageInput.md +++ b/docs/api-reference/interfaces/StageInput.md @@ -17,7 +17,7 @@ #### Defined in -[src/ddo/types.ts:45](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L45) +[src/types/DDOTypes.ts:40](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L40) --- @@ -27,4 +27,4 @@ #### Defined in -[src/ddo/types.ts:44](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L44) +[src/types/DDOTypes.ts:39](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L39) diff --git a/docs/api-reference/interfaces/StageOutput.md b/docs/api-reference/interfaces/StageOutput.md index 5bc58419b..624fe8dfb 100644 --- a/docs/api-reference/interfaces/StageOutput.md +++ b/docs/api-reference/interfaces/StageOutput.md @@ -18,7 +18,7 @@ #### Defined in -[src/ddo/types.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L54) +[src/types/DDOTypes.ts:49](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L49) --- @@ -28,7 +28,7 @@ #### Defined in -[src/ddo/types.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L55) +[src/types/DDOTypes.ts:50](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L50) --- @@ -38,4 +38,4 @@ #### Defined in -[src/ddo/types.ts:53](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L53) +[src/types/DDOTypes.ts:48](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L48) diff --git a/docs/api-reference/interfaces/StageTransformation.md b/docs/api-reference/interfaces/StageTransformation.md index 76c9a7d7f..b48719c09 100644 --- a/docs/api-reference/interfaces/StageTransformation.md +++ b/docs/api-reference/interfaces/StageTransformation.md @@ -16,4 +16,4 @@ #### Defined in -[src/ddo/types.ts:49](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L49) +[src/types/DDOTypes.ts:44](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L44) diff --git a/docs/api-reference/interfaces/SubscriptionBalance.md b/docs/api-reference/interfaces/SubscriptionBalance.md new file mode 100644 index 000000000..c51c8393d --- /dev/null +++ b/docs/api-reference/interfaces/SubscriptionBalance.md @@ -0,0 +1,52 @@ +[@nevermined-io/sdk](../code-reference.md) / SubscriptionBalance + +# Interface: SubscriptionBalance + +## Table of contents + +### Properties + +- [balance](SubscriptionBalance.md#balance) +- [canAccess](SubscriptionBalance.md#canaccess) +- [isSubscriptionOwner](SubscriptionBalance.md#issubscriptionowner) +- [subscriptionType](SubscriptionBalance.md#subscriptiontype) + +## Properties + +### balance + +• **balance**: `bigint` + +#### Defined in + +[src/nevermined/NvmApp.ts:62](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L62) + +--- + +### canAccess + +• **canAccess**: `boolean` + +#### Defined in + +[src/nevermined/NvmApp.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L60) + +--- + +### isSubscriptionOwner + +• **isSubscriptionOwner**: `boolean` + +#### Defined in + +[src/nevermined/NvmApp.ts:61](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L61) + +--- + +### subscriptionType + +• **subscriptionType**: [`SubscriptionType`](../enums/SubscriptionType.md) + +#### Defined in + +[src/nevermined/NvmApp.ts:59](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/nevermined/NvmApp.ts#L59) diff --git a/docs/api-reference/interfaces/SubscriptionMetadata.md b/docs/api-reference/interfaces/SubscriptionMetadata.md new file mode 100644 index 000000000..13836eaae --- /dev/null +++ b/docs/api-reference/interfaces/SubscriptionMetadata.md @@ -0,0 +1,30 @@ +[@nevermined-io/sdk](../code-reference.md) / SubscriptionMetadata + +# Interface: SubscriptionMetadata + +## Table of contents + +### Properties + +- [subscriptionType](SubscriptionMetadata.md#subscriptiontype) +- [timeMeasure](SubscriptionMetadata.md#timemeasure) + +## Properties + +### subscriptionType + +• **subscriptionType**: [`SubscriptionType`](../enums/SubscriptionType.md) + +#### Defined in + +[src/types/DDOTypes.ts:221](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L221) + +--- + +### timeMeasure + +• `Optional` **timeMeasure**: `string` + +#### Defined in + +[src/types/DDOTypes.ts:222](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L222) diff --git a/docs/api-reference/interfaces/SubscriptionToken.md b/docs/api-reference/interfaces/SubscriptionToken.md index 1de8a29fe..d92c2ad73 100644 --- a/docs/api-reference/interfaces/SubscriptionToken.md +++ b/docs/api-reference/interfaces/SubscriptionToken.md @@ -17,7 +17,7 @@ #### Defined in -[src/services/node/NeverminedNode.ts:25](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L25) +[src/services/node/NeverminedNode.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L26) --- @@ -27,4 +27,4 @@ #### Defined in -[src/services/node/NeverminedNode.ts:26](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/services/node/NeverminedNode.ts#L26) +[src/services/node/NeverminedNode.ts:27](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/services/node/NeverminedNode.ts#L27) diff --git a/docs/api-reference/interfaces/TemplateMetadata.md b/docs/api-reference/interfaces/TemplateMetadata.md index de2d4949c..de3856d9a 100644 --- a/docs/api-reference/interfaces/TemplateMetadata.md +++ b/docs/api-reference/interfaces/TemplateMetadata.md @@ -19,7 +19,7 @@ #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L17) +[src/keeper/contracts/managers/TemplateStoreManager.ts:18](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L18) --- @@ -29,7 +29,7 @@ #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L16) +[src/keeper/contracts/managers/TemplateStoreManager.ts:17](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L17) --- @@ -39,7 +39,7 @@ #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L15) +[src/keeper/contracts/managers/TemplateStoreManager.ts:16](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L16) --- @@ -49,4 +49,4 @@ #### Defined in -[src/keeper/contracts/managers/TemplateStoreManager.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/managers/TemplateStoreManager.ts#L14) +[src/keeper/contracts/managers/TemplateStoreManager.ts:15](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/managers/TemplateStoreManager.ts#L15) diff --git a/docs/api-reference/interfaces/TxParameters.md b/docs/api-reference/interfaces/TxParameters.md index d566ff05c..52e04fd3a 100644 --- a/docs/api-reference/interfaces/TxParameters.md +++ b/docs/api-reference/interfaces/TxParameters.md @@ -13,9 +13,7 @@ - [maxPriorityFeePerGas](TxParameters.md#maxpriorityfeepergas) - [nonce](TxParameters.md#nonce) - [progress](TxParameters.md#progress) -- [signer](TxParameters.md#signer) - [value](TxParameters.md#value) -- [zeroDevSigner](TxParameters.md#zerodevsigner) ## Properties @@ -25,7 +23,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L16) +[src/models/Transactions.ts:3](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Transactions.ts#L3) --- @@ -35,7 +33,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:17](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L17) +[src/models/Transactions.ts:4](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Transactions.ts#L4) --- @@ -45,7 +43,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:18](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L18) +[src/models/Transactions.ts:5](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Transactions.ts#L5) --- @@ -55,7 +53,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L20) +[src/models/Transactions.ts:7](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Transactions.ts#L7) --- @@ -65,7 +63,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:19](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L19) +[src/models/Transactions.ts:6](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Transactions.ts#L6) --- @@ -75,7 +73,7 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:23](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L23) +[src/models/Transactions.ts:8](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Transactions.ts#L8) --- @@ -99,34 +97,14 @@ #### Defined in -[src/keeper/contracts/ContractBase.ts:24](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L24) - ---- - -### signer - -• `Optional` **signer**: `Signer` - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:21](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L21) +[src/models/Transactions.ts:9](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Transactions.ts#L9) --- ### value -• `Optional` **value**: `string` - -#### Defined in - -[src/keeper/contracts/ContractBase.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L15) - ---- - -### zeroDevSigner - -• `Optional` **zeroDevSigner**: `ZeroDevAccountSigner`<`"ECDSA"`\> +• `Optional` **value**: `bigint` #### Defined in -[src/keeper/contracts/ContractBase.ts:22](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/ContractBase.ts#L22) +[src/models/Transactions.ts:2](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/models/Transactions.ts#L2) diff --git a/docs/api-reference/interfaces/TypedDataDomain.md b/docs/api-reference/interfaces/TypedDataDomain.md index b516c7875..3156683c0 100644 --- a/docs/api-reference/interfaces/TypedDataDomain.md +++ b/docs/api-reference/interfaces/TypedDataDomain.md @@ -18,7 +18,7 @@ #### Defined in -[src/nevermined/utils/JwtUtils.ts:16](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L16) +[src/types/GeneralTypes.ts:83](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L83) --- @@ -28,7 +28,7 @@ #### Defined in -[src/nevermined/utils/JwtUtils.ts:14](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L14) +[src/types/GeneralTypes.ts:81](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L81) --- @@ -38,4 +38,4 @@ #### Defined in -[src/nevermined/utils/JwtUtils.ts:15](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L15) +[src/types/GeneralTypes.ts:82](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L82) diff --git a/docs/api-reference/interfaces/TypedDataTypes.md b/docs/api-reference/interfaces/TypedDataTypes.md index 4c04c80a2..b712afd95 100644 --- a/docs/api-reference/interfaces/TypedDataTypes.md +++ b/docs/api-reference/interfaces/TypedDataTypes.md @@ -12,8 +12,8 @@ ### Nevermined -• **Nevermined**: { `name`: `string` ; `type`: `string` }[] +• **Nevermined**: \{ `name`: `string` ; `type`: `string` }[] #### Defined in -[src/nevermined/utils/JwtUtils.ts:20](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/nevermined/utils/JwtUtils.ts#L20) +[src/types/GeneralTypes.ts:87](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L87) diff --git a/docs/api-reference/interfaces/UsedEvent.md b/docs/api-reference/interfaces/UsedEvent.md index a68de7335..783d768f3 100644 --- a/docs/api-reference/interfaces/UsedEvent.md +++ b/docs/api-reference/interfaces/UsedEvent.md @@ -33,7 +33,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L55) +[src/keeper/contracts/Provenance.ts:53](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L53) --- @@ -43,7 +43,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:66](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L66) +[src/keeper/contracts/Provenance.ts:64](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L64) --- @@ -57,7 +57,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L57) +[src/keeper/contracts/Provenance.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L55) --- @@ -71,7 +71,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:58](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L58) +[src/keeper/contracts/Provenance.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L56) --- @@ -81,7 +81,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:65](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L65) +[src/keeper/contracts/Provenance.ts:63](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L63) --- @@ -95,7 +95,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:53](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L53) +[src/keeper/contracts/Provenance.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L51) --- @@ -109,7 +109,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L54) +[src/keeper/contracts/Provenance.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L52) --- @@ -123,4 +123,4 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:56](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L56) +[src/keeper/contracts/Provenance.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L54) diff --git a/docs/api-reference/interfaces/ValidationParams.md b/docs/api-reference/interfaces/ValidationParams.md index 38a702631..f449d5db8 100644 --- a/docs/api-reference/interfaces/ValidationParams.md +++ b/docs/api-reference/interfaces/ValidationParams.md @@ -25,7 +25,7 @@ #### Defined in -[src/ddo/types.ts:738](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L738) +[src/types/DDOTypes.ts:782](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L782) --- @@ -35,7 +35,7 @@ #### Defined in -[src/ddo/types.ts:743](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L743) +[src/types/DDOTypes.ts:787](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L787) --- @@ -45,17 +45,17 @@ #### Defined in -[src/ddo/types.ts:742](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L742) +[src/types/DDOTypes.ts:786](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L786) --- ### consumer_address -• `Optional` **consumer_address**: `string` +• **consumer_address**: `string` #### Defined in -[src/ddo/types.ts:741](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L741) +[src/types/DDOTypes.ts:785](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L785) --- @@ -65,7 +65,7 @@ #### Defined in -[src/ddo/types.ts:739](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L739) +[src/types/DDOTypes.ts:783](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L783) --- @@ -75,7 +75,7 @@ #### Defined in -[src/ddo/types.ts:746](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L746) +[src/types/DDOTypes.ts:790](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L790) --- @@ -85,7 +85,7 @@ #### Defined in -[src/ddo/types.ts:747](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L747) +[src/types/DDOTypes.ts:791](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L791) --- @@ -95,7 +95,7 @@ #### Defined in -[src/ddo/types.ts:744](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L744) +[src/types/DDOTypes.ts:788](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L788) --- @@ -105,7 +105,7 @@ #### Defined in -[src/ddo/types.ts:745](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L745) +[src/types/DDOTypes.ts:789](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L789) --- @@ -115,4 +115,4 @@ #### Defined in -[src/ddo/types.ts:740](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L740) +[src/types/DDOTypes.ts:784](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L784) diff --git a/docs/api-reference/interfaces/ValuePair.md b/docs/api-reference/interfaces/ValuePair.md index bc0ffffc0..b283b5579 100644 --- a/docs/api-reference/interfaces/ValuePair.md +++ b/docs/api-reference/interfaces/ValuePair.md @@ -17,7 +17,7 @@ #### Defined in -[src/models/types.ts:62](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L62) +[src/types/GeneralTypes.ts:53](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L53) --- @@ -27,4 +27,4 @@ #### Defined in -[src/models/types.ts:63](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/models/types.ts#L63) +[src/types/GeneralTypes.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/GeneralTypes.ts#L54) diff --git a/docs/api-reference/interfaces/WasAssociatedWithEvent.md b/docs/api-reference/interfaces/WasAssociatedWithEvent.md index 3dc91fcd2..8c61c44d6 100644 --- a/docs/api-reference/interfaces/WasAssociatedWithEvent.md +++ b/docs/api-reference/interfaces/WasAssociatedWithEvent.md @@ -33,7 +33,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L55) +[src/keeper/contracts/Provenance.ts:53](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L53) --- @@ -43,7 +43,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:75](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L75) +[src/keeper/contracts/Provenance.ts:73](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L73) --- @@ -57,7 +57,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L57) +[src/keeper/contracts/Provenance.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L55) --- @@ -71,7 +71,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:58](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L58) +[src/keeper/contracts/Provenance.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L56) --- @@ -81,7 +81,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:74](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L74) +[src/keeper/contracts/Provenance.ts:72](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L72) --- @@ -95,7 +95,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:53](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L53) +[src/keeper/contracts/Provenance.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L51) --- @@ -109,7 +109,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L54) +[src/keeper/contracts/Provenance.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L52) --- @@ -123,4 +123,4 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:56](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L56) +[src/keeper/contracts/Provenance.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L54) diff --git a/docs/api-reference/interfaces/WasDerivedFromEvent.md b/docs/api-reference/interfaces/WasDerivedFromEvent.md index 342b311f7..a97593957 100644 --- a/docs/api-reference/interfaces/WasDerivedFromEvent.md +++ b/docs/api-reference/interfaces/WasDerivedFromEvent.md @@ -34,7 +34,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L55) +[src/keeper/contracts/Provenance.ts:53](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L53) --- @@ -44,7 +44,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:71](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L71) +[src/keeper/contracts/Provenance.ts:69](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L69) --- @@ -58,7 +58,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L57) +[src/keeper/contracts/Provenance.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L55) --- @@ -72,7 +72,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:58](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L58) +[src/keeper/contracts/Provenance.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L56) --- @@ -86,7 +86,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:53](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L53) +[src/keeper/contracts/Provenance.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L51) --- @@ -100,7 +100,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L54) +[src/keeper/contracts/Provenance.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L52) --- @@ -110,7 +110,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:69](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L69) +[src/keeper/contracts/Provenance.ts:67](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L67) --- @@ -124,7 +124,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:56](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L56) +[src/keeper/contracts/Provenance.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L54) --- @@ -134,4 +134,4 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:70](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L70) +[src/keeper/contracts/Provenance.ts:68](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L68) diff --git a/docs/api-reference/interfaces/WasGeneratedByEvent.md b/docs/api-reference/interfaces/WasGeneratedByEvent.md index 3430dac8d..b66e724fe 100644 --- a/docs/api-reference/interfaces/WasGeneratedByEvent.md +++ b/docs/api-reference/interfaces/WasGeneratedByEvent.md @@ -33,7 +33,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:55](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L55) +[src/keeper/contracts/Provenance.ts:53](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L53) --- @@ -43,7 +43,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:62](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L62) +[src/keeper/contracts/Provenance.ts:60](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L60) --- @@ -57,7 +57,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:57](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L57) +[src/keeper/contracts/Provenance.ts:55](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L55) --- @@ -71,7 +71,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:58](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L58) +[src/keeper/contracts/Provenance.ts:56](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L56) --- @@ -81,7 +81,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:61](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L61) +[src/keeper/contracts/Provenance.ts:59](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L59) --- @@ -95,7 +95,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:53](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L53) +[src/keeper/contracts/Provenance.ts:51](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L51) --- @@ -109,7 +109,7 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:54](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L54) +[src/keeper/contracts/Provenance.ts:52](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L52) --- @@ -123,4 +123,4 @@ #### Defined in -[src/keeper/contracts/Provenance.ts:56](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/keeper/contracts/Provenance.ts#L56) +[src/keeper/contracts/Provenance.ts:54](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/keeper/contracts/Provenance.ts#L54) diff --git a/docs/api-reference/interfaces/Web3Clients.md b/docs/api-reference/interfaces/Web3Clients.md new file mode 100644 index 000000000..0a1b713ef --- /dev/null +++ b/docs/api-reference/interfaces/Web3Clients.md @@ -0,0 +1,142 @@ +[@nevermined-io/sdk](../code-reference.md) / Web3Clients + +# Interface: Web3Clients + +## Table of contents + +### Properties + +- [chain](Web3Clients.md#chain) +- [public](Web3Clients.md#public) +- [wallet](Web3Clients.md#wallet) + +## Properties + +### chain + +• `Optional` **chain**: `Chain` + +#### Defined in + +[src/Instantiable.abstract.ts:26](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L26) + +--- + +### public + +• **public**: `Object` + +#### Type declaration + +| Name | Type | Description | +| :------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` | The Account of the Client. | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `call` | (`parameters`: `CallParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`CallReturnType`\> | - | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `createBlockFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"block"` }\> | - | +| `createContractEventFilter` | \(`args`: `CreateContractEventFilterParameters`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`CreateContractEventFilterReturnType`\<`TAbi`, `TEventName`, `TArgs`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `createEventFilter` | \(`args?`: `CreateEventFilterParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`, `_EventName`, `_Args`\>) => `Promise`\<\{ [K in string \| number \| symbol]: Filter\<"event", TAbiEvents, \_EventName, \_Args, TStrict, TFromBlock, TToBlock\>[K] }\> | - | +| `createPendingTransactionFilter` | () => `Promise`\<\{ `id`: \`0x$\{string}\` ; `request`: `EIP1193RequestFn`\ ; `type`: `"transaction"` }\> | - | +| `estimateContractGas` | \(`args`: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `TChain`\>) => `Promise`\<`bigint`\> | - | +| `estimateFeesPerGas` | \(`args?`: `EstimateFeesPerGasParameters`\<`undefined` \| `Chain`, `TChainOverride`, `TType`\>) => `Promise`\<`EstimateFeesPerGasReturnType`\> | - | +| `estimateGas` | (`args`: `EstimateGasParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `estimateMaxPriorityFeePerGas` | \(`args?`: \{ `chain`: `null` \| `TChainOverride` }) => `Promise`\<`bigint`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined`, `PublicRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `PublicActions`\<`Transport`, `undefined` \| `Chain`\>\> | - | +| `getBalance` | (`args`: `GetBalanceParameters`) => `Promise`\<`bigint`\> | - | +| `getBlobBaseFee` | () => `Promise`\<`bigint`\> | - | +| `getBlock` | \(`args?`: `GetBlockParameters`\<`TIncludeTransactions`, `TBlockTag`\>) => `Promise`\<\{ `baseFeePerGas`: `null` \| `bigint` ; `blobGasUsed`: `bigint` ; `difficulty`: `bigint` ; `excessBlobGas`: `bigint` ; `extraData`: \`0x$\{string}\` ; `gasLimit`: `bigint` ; `gasUsed`: `bigint` ; `hash`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `logsBloom`: `TBlockTag` extends `"pending"` ? `null` : \`0x$\{string}\` ; `miner`: \`0x$\{string}\` ; `mixHash`: \`0x$\{string}\` ; `nonce`: `TBlockTag` extends ``"pending"`` ? ``null`` : \`0x$\{string}\` ; `number`: `TBlockTag` extends `"pending"` ? `null` : `bigint` ; `parentHash`: \`0x$\{string}\` ; `receiptsRoot`: \`0x$\{string}\` ; `sealFields`: \`0x$\{string}\`[] ; `sha3Uncles`: \`0x$\{string}\` ; `size`: `bigint` ; `stateRoot`: \`0x$\{string}\` ; `timestamp`: `bigint` ; `totalDifficulty`: ``null`` \| `bigint` ; `transactions`: `TIncludeTransactions` extends ``true`` ? (\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"legacy"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip2930"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip1559"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip4844"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` })[] : \`0x$\{string}\`[] ; `transactionsRoot`: \`0x$\{string}\` ; `uncles`: \`0x$\{string}\`[] ; `withdrawals?`: `Withdrawal`[] ; `withdrawalsRoot?`: \`0x$\{string}\` }\> | - | +| `getBlockNumber` | (`args?`: `GetBlockNumberParameters`) => `Promise`\<`bigint`\> | - | +| `getBlockTransactionCount` | (`args?`: `GetBlockTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getBytecode` | (`args`: `GetBytecodeParameters`) => `Promise`\<`GetBytecodeReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getContractEvents` | \(`args`: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> | - | +| `getEnsAddress` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `coinType?`: `number` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAddressReturnType`\> | - | +| `getEnsAvatar` | (`args`: \{ `assetGatewayUrls?`: `AssetGatewayUrls` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsAvatarReturnType`\> | - | +| `getEnsName` | (`args`: \{ `address`: \`0x$\{string}\` ; `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsNameReturnType`\> | - | +| `getEnsResolver` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `name`: `string` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<\`0x$\{string}\`\> | - | +| `getEnsText` | (`args`: \{ `blockNumber?`: `bigint` ; `blockTag?`: `BlockTag` ; `gatewayUrls?`: `string`[] ; `key`: `string` ; `name`: `string` ; `strict?`: `boolean` ; `universalResolverAddress?`: \`0x$\{string}\` }) => `Promise`\<`GetEnsTextReturnType`\> | - | +| `getFeeHistory` | (`args`: `GetFeeHistoryParameters`) => `Promise`\<`GetFeeHistoryReturnType`\> | - | +| `getFilterChanges` | \(`args`: `GetFilterChangesParameters`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterChangesReturnType`\<`TFilterType`, `TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getFilterLogs` | \(`args`: `GetFilterLogsParameters`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetFilterLogsReturnType`\<`TAbi`, `TEventName`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getGasPrice` | () => `Promise`\<`bigint`\> | - | +| `getLogs` | \(`args?`: `GetLogsParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>) => `Promise`\<`GetLogsReturnType`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `TFromBlock`, `TToBlock`\>\> | - | +| `getProof` | (`args`: `GetProofParameters`) => `Promise`\<`GetProofReturnType`\> | - | +| `getStorageAt` | (`args`: `GetStorageAtParameters`) => `Promise`\<`GetStorageAtReturnType`\> | - | +| `getTransaction` | \(`args`: `GetTransactionParameters`\<`TBlockTag`\>) => `Promise`\<\{ `accessList?`: `undefined` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId?`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"legacy"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity?`: `undefined` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice`: `bigint` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas?`: `undefined` ; `maxPriorityFeePerGas?`: `undefined` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip2930"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes?`: `undefined` ; `blockHash`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas?`: `undefined` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: `null` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : `number` ; `type`: ``"eip1559"`` ; `typeHex`: ``null`` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` } \| \{ `accessList`: `AccessList` ; `blobVersionedHashes`: \`0x$\{string}\`[] ; `blockHash`: `TBlockTag` extends ``"pending"`` ? ``true`` : ``false`` extends ``true`` ? ``null`` : \`0x$\{string}\` ; `blockNumber`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `bigint` ; `chainId`: `number` ; `from`: \`0x$\{string}\` ; `gas`: `bigint` ; `gasPrice?`: `undefined` ; `hash`: \`0x$\{string}\` ; `input`: \`0x$\{string}\` ; `maxFeePerBlobGas`: `bigint` ; `maxFeePerGas`: `bigint` ; `maxPriorityFeePerGas`: `bigint` ; `nonce`: `number` ; `r`: \`0x$\{string}\` ; `s`: \`0x$\{string}\` ; `to`: ``null`` \| \`0x$\{string}\` ; `transactionIndex`: `TBlockTag` extends `"pending"` ? `true` : `false` extends `true` ? `null` : `number` ; `type`: `"eip4844"` ; `typeHex`: `null` \| \`0x$\{string}\` ; `v`: `bigint` ; `value`: `bigint` ; `yParity`: `number` }\> | - | +| `getTransactionConfirmations` | (`args`: `GetTransactionConfirmationsParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`bigint`\> | - | +| `getTransactionCount` | (`args`: `GetTransactionCountParameters`) => `Promise`\<`number`\> | - | +| `getTransactionReceipt` | (`args`: `GetTransactionReceiptParameters`) => `Promise`\<`TransactionReceipt`\> | - | +| `key` | `string` | A key for the client. | +| `multicall` | \(`args`: `MulticallParameters`\<`contracts`, `allowFailure`\>) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> | - | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `readContract` | \(`args`: `ReadContractParameters`\<`abi`, `functionName`, `args`\>) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> | - | +| `request` | `EIP1193RequestFn`\<`PublicRpcSchema`\> | Request function wrapped with friendly error handling | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `simulateContract` | \(`args`: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `chainOverride`, `accountOverride`\>) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `uninstallFilter` | (`args`: `UninstallFilterParameters`) => `Promise`\<`boolean`\> | - | +| `verifyMessage` | (`args`: `VerifyMessageParameters`) => `Promise`\<`boolean`\> | - | +| `verifyTypedData` | (`args`: `VerifyTypedDataParameters`) => `Promise`\<`boolean`\> | - | +| `waitForTransactionReceipt` | (`args`: `WaitForTransactionReceiptParameters`\<`undefined` \| `Chain`\>) => `Promise`\<`TransactionReceipt`\> | - | +| `watchBlockNumber` | (`args`: `WatchBlockNumberParameters`) => `WatchBlockNumberReturnType` | - | +| `watchBlocks` | \(`args`: `WatchBlocksParameters`\<`Transport`, `undefined` \| `Chain`, `TIncludeTransactions`, `TBlockTag`\>) => `WatchBlocksReturnType` | - | +| `watchContractEvent` | \(`args`: `WatchContractEventParameters`\<`TAbi`, `TEventName`, `TStrict`, `Transport`\>) => `WatchContractEventReturnType` | - | +| `watchEvent` | \(`args`: `WatchEventParameters`\<`TAbiEvent`, `TAbiEvents`, `TStrict`, `Transport`\>) => `WatchEventReturnType` | - | +| `watchPendingTransactions` | (`args`: `WatchPendingTransactionsParameters`\<`Transport`\>) => `WatchPendingTransactionsReturnType` | - | + +#### Defined in + +[src/Instantiable.abstract.ts:24](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L24) + +--- + +### wallet + +• **wallet**: `Object` + +#### Type declaration + +| Name | Type | Description | +| :-------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | +| `account` | `undefined` \| `Account` | The Account of the Client. | +| `addChain` | (`args`: `AddChainParameters`) => `Promise`\<`void`\> | - | +| `batch?` | \{ `multicall?`: `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } } | Flags for batch settings. | +| `batch.multicall?` | `boolean` \| \{ `batchSize?`: `number` ; `wait?`: `number` } | Toggle to enable `eth_call` multicall aggregation. | +| `cacheTime` | `number` | Time (in ms) that cached data will remain in memory. | +| `ccipRead?` | `false` \| \{ `request?`: (`parameters`: `CcipRequestParameters`) => `Promise`\<\`0x$\{string}\`\> } | [CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. | +| `chain` | `undefined` \| `Chain` | Chain for the client. | +| `deployContract` | \(`args`: `DeployContractParameters`\<`abi`, `undefined` \| `Chain`, `undefined` \| `Account`, `chainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `extend` | \(`fn`: (`client`: `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\>) => `client`) => `Client`\<`Transport`, `undefined` \| `Chain`, `undefined` \| `Account`, `WalletRpcSchema`, \{ [K in string \| number \| symbol]: client[K] } & `WalletActions`\<`undefined` \| `Chain`, `undefined` \| `Account`\>\> | - | +| `getAddresses` | () => `Promise`\<`GetAddressesReturnType`\> | - | +| `getChainId` | () => `Promise`\<`number`\> | - | +| `getPermissions` | () => `Promise`\<`GetPermissionsReturnType`\> | - | +| `key` | `string` | A key for the client. | +| `name` | `string` | A name for the client. | +| `pollingInterval` | `number` | Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. | +| `prepareTransactionRequest` | \(`args`: `PrepareTransactionRequestParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TAccountOverride`, `TRequest`\>) => `Promise`\<\{ [K in string \| number \| symbol]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends TRequest["kzg"] ? Object : Pick\))[K] }\> | - | +| `request` | `EIP1193RequestFn`\<`WalletRpcSchema`\> | Request function wrapped with friendly error handling | +| `requestAddresses` | () => `Promise`\<`RequestAddressesReturnType`\> | - | +| `requestPermissions` | (`args`: \{ `eth_accounts`: `Record`\<`string`, `any`\> }) => `Promise`\<`RequestPermissionsReturnType`\> | - | +| `sendRawTransaction` | (`args`: `SendRawTransactionParameters`) => `Promise`\<\`0x$\{string}\`\> | - | +| `sendTransaction` | \(`args`: `SendTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`, `TRequest`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signMessage` | (`args`: `SignMessageParameters`\<`undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `signTransaction` | \(`args`: `SignTransactionParameters`\<`undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x02$\{string}\` \| \`0x01$\{string}\` \| \`0x03$\{string}\` \| `TransactionSerializedLegacy`\> | - | +| `signTypedData` | \(`args`: `SignTypedDataParameters`\<`TTypedData`, `TPrimaryType`, `undefined` \| `Account`\>) => `Promise`\<\`0x$\{string}\`\> | - | +| `switchChain` | (`args`: `SwitchChainParameters`) => `Promise`\<`void`\> | - | +| `transport` | `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> | The RPC transport | +| `type` | `string` | The type of client. | +| `uid` | `string` | A unique ID for the client. | +| `watchAsset` | (`args`: `WatchAssetParams`) => `Promise`\<`boolean`\> | - | +| `writeContract` | \(`args`: `WriteContractParameters`\<`abi`, `functionName`, `args`, `undefined` \| `Chain`, `undefined` \| `Account`, `TChainOverride`\>) => `Promise`\<\`0x$\{string}\`\> | - | + +#### Defined in + +[src/Instantiable.abstract.ts:25](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/Instantiable.abstract.ts#L25) diff --git a/docs/api-reference/interfaces/WebService.md b/docs/api-reference/interfaces/WebService.md index eb6c01e21..0bb4c7660 100644 --- a/docs/api-reference/interfaces/WebService.md +++ b/docs/api-reference/interfaces/WebService.md @@ -8,6 +8,7 @@ Interface describing an asset of type `service` ### Properties +- [chargeType](WebService.md#chargetype) - [encryptedAttributes](WebService.md#encryptedattributes) - [endpoints](WebService.md#endpoints) - [internalAttributes](WebService.md#internalattributes) @@ -16,23 +17,33 @@ Interface describing an asset of type `service` ## Properties +### chargeType + +• `Optional` **chargeType**: [`ChargeType`](../enums/ChargeType.md) + +#### Defined in + +[src/types/DDOTypes.ts:206](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L206) + +--- + ### encryptedAttributes • `Optional` **encryptedAttributes**: `string` #### Defined in -[src/ddo/types.ts:194](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L194) +[src/types/DDOTypes.ts:204](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L204) --- ### endpoints -• `Optional` **endpoints**: { `[verb: string]`: `string`; }[] +• `Optional` **endpoints**: \{ `[verb: string]`: `string`; }[] #### Defined in -[src/ddo/types.ts:188](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L188) +[src/types/DDOTypes.ts:198](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L198) --- @@ -42,7 +53,7 @@ Interface describing an asset of type `service` #### Defined in -[src/ddo/types.ts:192](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L192) +[src/types/DDOTypes.ts:202](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L202) --- @@ -52,7 +63,7 @@ Interface describing an asset of type `service` #### Defined in -[src/ddo/types.ts:190](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L190) +[src/types/DDOTypes.ts:200](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L200) --- @@ -62,4 +73,4 @@ Interface describing an asset of type `service` #### Defined in -[src/ddo/types.ts:186](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L186) +[src/types/DDOTypes.ts:196](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L196) diff --git a/docs/api-reference/interfaces/WebServiceInternalAttributes.md b/docs/api-reference/interfaces/WebServiceInternalAttributes.md index 7bf0ebccc..9e3af23c2 100644 --- a/docs/api-reference/interfaces/WebServiceInternalAttributes.md +++ b/docs/api-reference/interfaces/WebServiceInternalAttributes.md @@ -17,14 +17,14 @@ #### Defined in -[src/ddo/types.ts:198](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L198) +[src/types/DDOTypes.ts:226](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L226) --- ### headers -• `Optional` **headers**: { `[verb: string]`: `string`; }[] +• `Optional` **headers**: \{ `[verb: string]`: `string`; }[] #### Defined in -[src/ddo/types.ts:200](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L200) +[src/types/DDOTypes.ts:228](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L228) diff --git a/docs/api-reference/interfaces/Workflow.md b/docs/api-reference/interfaces/Workflow.md index 2356b6c2f..7b6e838d7 100644 --- a/docs/api-reference/interfaces/Workflow.md +++ b/docs/api-reference/interfaces/Workflow.md @@ -17,7 +17,7 @@ #### Defined in -[src/ddo/types.ts:67](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L67) +[src/types/DDOTypes.ts:62](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L62) --- @@ -27,4 +27,4 @@ #### Defined in -[src/ddo/types.ts:68](https://github.com/nevermined-io/sdk-js/blob/bb26f8ab/src/ddo/types.ts#L68) +[src/types/DDOTypes.ts:63](https://github.com/nevermined-io/sdk-js/blob/49285bf856ebfc8d44ccb08cdf57963ec73b06d6/src/types/DDOTypes.ts#L63)