@nevermined-io/sdk - v3.1.2 / ComputeApi
Nevermined Compute API. It allows the registration execution of compute jobs on top of data registered in a Nevermined digital ecosystem.
You can find more information about the Nevermined compute solution here: https://docs.nevermined.io/docs/getting-started/remote-computation
↳ ComputeApi
• new ComputeApi(config): ComputeApi
Creates a new ComputeApi
| Name | Type | Description |
|---|---|---|
config |
InstantiableConfig |
Configuration of the Nevermined instance |
src/nevermined/api/ComputeApi.ts:29
• servicePlugin: Object
▪ [key: string]: ServicePlugin<Service>
src/nevermined/api/RegistryBaseApi.ts:39
• get artifactsFolder(): undefined | string
undefined | string
RegistryBaseApi.artifactsFolder
src/Instantiable.abstract.ts:136
• get circuitsFolder(): undefined | string
undefined | string
RegistryBaseApi.circuitsFolder
src/Instantiable.abstract.ts:140
• get client(): Web3Clients
RegistryBaseApi.client
src/Instantiable.abstract.ts:88
• get config(): NeverminedOptions
RegistryBaseApi.config
src/Instantiable.abstract.ts:119
• get instanceConfig(): InstantiableConfig
RegistryBaseApi.instanceConfig
src/Instantiable.abstract.ts:144
• get instantiableConfig(): undefined | InstantiableConfig
undefined | InstantiableConfig
RegistryBaseApi.instantiableConfig
src/Instantiable.abstract.ts:112
• get logger(): Logger
Logger
RegistryBaseApi.logger
src/Instantiable.abstract.ts:127
• get nevermined(): Nevermined
RegistryBaseApi.nevermined
src/Instantiable.abstract.ts:80
• get publicClient(): Object
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 configuration. |
chain |
undefined | Chain |
Chain for the client. |
createAccessList |
(parameters: CreateAccessListParameters<undefined | Chain>) => Promise<{ accessList: AccessList ; gasUsed: bigint }> |
- |
createBlockFilter |
() => Promise<{ id: `0x${string}` ; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges" ; Parameters: [filterId: `0x${string}`] ; ReturnType: `0x${string}`[] | RpcLog[] }, { Method: "eth_getFilterLogs" ; Parameters: [filterId: `0x${string}`] ; ReturnType: RpcLog[] }, { Method: "eth_uninstallFilter" ; Parameters: [filterId: `0x${string}`] ; ReturnType: boolean }]> ; type: "block" }> |
- |
createContractEventFilter |
<abi, eventName, args, strict, fromBlock, toBlock>(args: CreateContractEventFilterParameters<abi, eventName, args, strict, fromBlock, toBlock>) => Promise<CreateContractEventFilterReturnType<abi, eventName, args, strict, fromBlock, toBlock>> |
- |
createEventFilter |
<abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>(args?: CreateEventFilterParameters<abiEvent, abiEvents, strict, fromBlock, toBlock, _EventName, _Args>) => Promise<{ [K in string | number | symbol]: Filter<“event”, abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K] }> |
- |
createPendingTransactionFilter |
() => Promise<{ id: `0x${string}` ; request: EIP1193RequestFn<readonly [{ Method: "eth_getFilterChanges" ; Parameters: [filterId: `0x${string}`] ; ReturnType: `0x${string}`[] | RpcLog[] }, { Method: "eth_getFilterLogs" ; Parameters: [filterId: `0x${string}`] ; ReturnType: RpcLog[] }, { Method: "eth_uninstallFilter" ; Parameters: [filterId: `0x${string}`] ; ReturnType: boolean }]> ; type: "transaction" }> |
- |
estimateContractGas |
<chain, abi, functionName, args>(args: EstimateContractGasParameters<abi, functionName, args, chain>) => Promise<bigint> |
- |
estimateFeesPerGas |
<chainOverride, type>(args?: EstimateFeesPerGasParameters<undefined | Chain, chainOverride, type>) => Promise<EstimateFeesPerGasReturnType<type>> |
- |
estimateGas |
(args: EstimateGasParameters<undefined | Chain>) => Promise<bigint> |
- |
estimateMaxPriorityFeePerGas |
<chainOverride>(args?: { chain: null | chainOverride }) => Promise<bigint> |
- |
extend |
<client>(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 |
<includeTransactions, blockTag>(args?: GetBlockParameters<includeTransactions, blockTag>) => Promise<{ baseFeePerGas: null | bigint ; blobGasUsed: bigint ; difficulty: bigint ; excessBlobGas: bigint ; extraData: `0x${string}` ; gasLimit: bigint ; gasUsed: bigint ; hash: blockTag extends "pending" ? null : `0x${string}` ; logsBloom: blockTag extends "pending" ? null : `0x${string}` ; miner: `0x${string}` ; mixHash: `0x${string}` ; nonce: blockTag extends "pending" ? null : `0x${string}` ; number: blockTag extends "pending" ? null : bigint ; parentBeaconBlockRoot?: `0x${string}` ; parentHash: `0x${string}` ; receiptsRoot: `0x${string}` ; sealFields: `0x${string}`[] ; sha3Uncles: `0x${string}` ; size: bigint ; stateRoot: `0x${string}` ; timestamp: bigint ; totalDifficulty: null | bigint ; transactions: includeTransactions extends true ? ({ accessList?: undefined ; authorizationList?: undefined ; blobVersionedHashes?: undefined ; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}` ; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint ; chainId?: number ; from: `0x${string}` ; gas: bigint ; gasPrice: bigint ; hash: `0x${string}` ; input: `0x${string}` ; maxFeePerBlobGas?: undefined ; maxFeePerGas?: undefined ; maxPriorityFeePerGas?: undefined ; nonce: number ; r: `0x${string}` ; s: `0x${string}` ; to: null | `0x${string}` ; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number ; type: "legacy" ; typeHex: null | `0x${string}` ; v: bigint ; value: bigint ; yParity?: undefined } | { accessList: AccessList ; authorizationList?: undefined ; blobVersionedHashes?: undefined ; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}` ; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint ; chainId: number ; from: `0x${string}` ; gas: bigint ; gasPrice: bigint ; hash: `0x${string}` ; input: `0x${string}` ; maxFeePerBlobGas?: undefined ; maxFeePerGas?: undefined ; maxPriorityFeePerGas?: undefined ; nonce: number ; r: `0x${string}` ; s: `0x${string}` ; to: null | `0x${string}` ; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number ; type: "eip2930" ; typeHex: null | `0x${string}` ; v: bigint ; value: bigint ; yParity: number } | { accessList: AccessList ; authorizationList?: undefined ; blobVersionedHashes?: undefined ; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}` ; blockNumber: blockTag 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: blockTag extends "pending" ? true : false extends true ? null : number ; type: "eip1559" ; typeHex: null | `0x${string}` ; v: bigint ; value: bigint ; yParity: number } | { accessList: AccessList ; authorizationList?: undefined ; blobVersionedHashes: readonly `0x${string}`[] ; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}` ; blockNumber: blockTag 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: blockTag extends "pending" ? true : false extends true ? null : number ; type: "eip4844" ; typeHex: null | `0x${string}` ; v: bigint ; value: bigint ; yParity: number } | { accessList: AccessList ; authorizationList: SignedAuthorizationList ; blobVersionedHashes?: undefined ; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}` ; blockNumber: blockTag 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: blockTag extends "pending" ? true : false extends true ? null : number ; type: "eip7702" ; 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: GetCodeParameters) => Promise<GetCodeReturnType> |
- |
getChainId |
() => Promise<number> |
- |
getCode |
(args: GetCodeParameters) => Promise<GetCodeReturnType> |
- |
getContractEvents |
<abi, eventName, strict, fromBlock, toBlock>(args: GetContractEventsParameters<abi, eventName, strict, fromBlock, toBlock>) => Promise<GetContractEventsReturnType<abi, eventName, strict, fromBlock, toBlock>> |
- |
getEip712Domain |
(args: GetEip712DomainParameters) => Promise<GetEip712DomainReturnType> |
- |
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 |
<filterType, abi, eventName, strict, fromBlock, toBlock>(args: GetFilterChangesParameters<filterType, abi, eventName, strict, fromBlock, toBlock>) => Promise<GetFilterChangesReturnType<filterType, abi, eventName, strict, fromBlock, toBlock>> |
- |
getFilterLogs |
<abi, eventName, strict, fromBlock, toBlock>(args: GetFilterLogsParameters<abi, eventName, strict, fromBlock, toBlock>) => Promise<GetFilterLogsReturnType<abi, eventName, strict, fromBlock, toBlock>> |
- |
getGasPrice |
() => Promise<bigint> |
- |
getLogs |
<abiEvent, abiEvents, strict, fromBlock, toBlock>(args?: GetLogsParameters<abiEvent, abiEvents, strict, fromBlock, toBlock>) => Promise<GetLogsReturnType<abiEvent, abiEvents, strict, fromBlock, toBlock>> |
- |
getProof |
(args: GetProofParameters) => Promise<GetProofReturnType> |
- |
getStorageAt |
(args: GetStorageAtParameters) => Promise<GetStorageAtReturnType> |
- |
getTransaction |
<blockTag>(args: GetTransactionParameters<blockTag>) => Promise<{ accessList?: undefined ; authorizationList?: undefined ; blobVersionedHashes?: undefined ; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}` ; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint ; chainId?: number ; from: `0x${string}` ; gas: bigint ; gasPrice: bigint ; hash: `0x${string}` ; input: `0x${string}` ; maxFeePerBlobGas?: undefined ; maxFeePerGas?: undefined ; maxPriorityFeePerGas?: undefined ; nonce: number ; r: `0x${string}` ; s: `0x${string}` ; to: null | `0x${string}` ; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number ; type: "legacy" ; typeHex: null | `0x${string}` ; v: bigint ; value: bigint ; yParity?: undefined } | { accessList: AccessList ; authorizationList?: undefined ; blobVersionedHashes?: undefined ; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}` ; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint ; chainId: number ; from: `0x${string}` ; gas: bigint ; gasPrice: bigint ; hash: `0x${string}` ; input: `0x${string}` ; maxFeePerBlobGas?: undefined ; maxFeePerGas?: undefined ; maxPriorityFeePerGas?: undefined ; nonce: number ; r: `0x${string}` ; s: `0x${string}` ; to: null | `0x${string}` ; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number ; type: "eip2930" ; typeHex: null | `0x${string}` ; v: bigint ; value: bigint ; yParity: number } | { accessList: AccessList ; authorizationList?: undefined ; blobVersionedHashes?: undefined ; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}` ; blockNumber: blockTag 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: blockTag extends "pending" ? true : false extends true ? null : number ; type: "eip1559" ; typeHex: null | `0x${string}` ; v: bigint ; value: bigint ; yParity: number } | { accessList: AccessList ; authorizationList?: undefined ; blobVersionedHashes: readonly `0x${string}`[] ; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}` ; blockNumber: blockTag 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: blockTag extends "pending" ? true : false extends true ? null : number ; type: "eip4844" ; typeHex: null | `0x${string}` ; v: bigint ; value: bigint ; yParity: number } | { accessList: AccessList ; authorizationList: SignedAuthorizationList ; blobVersionedHashes?: undefined ; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}` ; blockNumber: blockTag 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: blockTag extends "pending" ? true : false extends true ? null : number ; type: "eip7702" ; 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 |
<contracts, allowFailure>(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 |
<request, chainOverride, accountOverride>(args: PrepareTransactionRequestParameters<undefined | Chain, undefined | Account, chainOverride, accountOverride, request>) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(…), (…)> & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)), IsNever<(…)> extends true ? unknown : ExactPartial<(…)>> & Object, ParameterTypeToParameters<request[“parameters”] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : “type” | “fees” | “gas” | “nonce” | “blobVersionedHashes” | “chainId”>> & (unknown extends request[“kzg”] ? Object : Pick<request, “kzg”>))[K] }> |
- |
readContract |
<abi, functionName, args>(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}`> |
- |
simulate |
<calls>(args: SimulateParameters<calls>) => Promise<SimulateReturnType<calls>> |
- |
simulateContract |
<abi, functionName, args, chainOverride, accountOverride>(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: { address: `0x${string}` ; blockNumber?: bigint ; blockTag?: BlockTag ; factory?: `0x${string}` ; factoryData?: `0x${string}` ; message: SignableMessage ; signature: `0x${string}` | Signature | Uint8Array ; universalSignatureVerifierAddress?: `0x${string}` }) => Promise<boolean> |
- |
verifySiweMessage |
(args: { address?: `0x${string}` ; blockNumber?: bigint ; blockTag?: BlockTag ; domain?: string ; message: string ; nonce?: string ; scheme?: string ; signature: `0x${string}` ; time?: Date }) => Promise<boolean> |
- |
verifyTypedData |
(args: VerifyTypedDataParameters) => Promise<boolean> |
- |
waitForTransactionReceipt |
(args: WaitForTransactionReceiptParameters<undefined | Chain>) => Promise<TransactionReceipt> |
- |
watchBlockNumber |
(args: WatchBlockNumberParameters) => WatchBlockNumberReturnType |
- |
watchBlocks |
<includeTransactions, blockTag>(args: WatchBlocksParameters<Transport, undefined | Chain, includeTransactions, blockTag>) => WatchBlocksReturnType |
- |
watchContractEvent |
<abi, eventName, strict>(args: WatchContractEventParameters<abi, eventName, strict, Transport>) => WatchContractEventReturnType |
- |
watchEvent |
<abiEvent, abiEvents, strict>(args: WatchEventParameters<abiEvent, abiEvents, strict, Transport>) => WatchEventReturnType |
- |
watchPendingTransactions |
(args: WatchPendingTransactionsParameters<Transport>) => WatchPendingTransactionsReturnType |
- |
RegistryBaseApi.publicClient
src/Instantiable.abstract.ts:96
• get walletClient(): Object
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 configuration. |
chain |
undefined | Chain |
Chain for the client. |
deployContract |
<abi, chainOverride>(args: DeployContractParameters<abi, undefined | Chain, undefined | Account, chainOverride>) => Promise<`0x${string}`> |
- |
extend |
<client>(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 |
<request, chainOverride, accountOverride>(args: PrepareTransactionRequestParameters<undefined | Chain, undefined | Account, chainOverride, accountOverride, request>) => Promise<{ [K in string | number | symbol]: (UnionRequiredBy<Extract<UnionOmit<(…), (…)> & ((…) extends (…) ? (…) : (…)) & ((…) extends (…) ? (…) : (…)), IsNever<(…)> extends true ? unknown : ExactPartial<(…)>> & Object, ParameterTypeToParameters<request[“parameters”] extends readonly PrepareTransactionRequestParameterType[] ? any[any][number] : “type” | “fees” | “gas” | “nonce” | “blobVersionedHashes” | “chainId”>> & (unknown extends request[“kzg”] ? Object : Pick<request, “kzg”>))[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 |
<request, chainOverride>(args: SendTransactionParameters<undefined | Chain, undefined | Account, chainOverride, request>) => Promise<`0x${string}`> |
- |
signMessage |
(args: SignMessageParameters<undefined | Account>) => Promise<`0x${string}`> |
- |
signTransaction |
<chainOverride, request>(args: SignTransactionParameters<undefined | Chain, undefined | Account, chainOverride, request>) => Promise<TransactionSerialized<GetTransactionType<request, request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends undefined | string ? Extract<any[any], string> : never>, GetTransactionType<request, request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends undefined | string ? Extract<any[any], string> : never> extends "eip1559" ? `0x02${string}` : never | GetTransactionType<request, request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends undefined | string ? Extract<any[any], string> : never> extends "eip2930" ? `0x01${string}` : never | GetTransactionType<request, request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends undefined | string ? Extract<any[any], string> : never> extends "eip4844" ? `0x03${string}` : never | GetTransactionType<request, request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends undefined | string ? Extract<any[any], string> : never> extends "eip7702" ? `0x04${string}` : never | GetTransactionType<request, request extends LegacyProperties ? "legacy" : never | request extends EIP1559Properties ? "eip1559" : never | request extends EIP2930Properties ? "eip2930" : never | request extends EIP4844Properties ? "eip4844" : never | request extends EIP7702Properties ? "eip7702" : never | request["type"] extends undefined | string ? Extract<any[any], string> : never> extends "legacy" ? TransactionSerializedLegacy : never>> |
- |
signTypedData |
<typedData, primaryType>(args: SignTypedDataParameters<typedData, primaryType, 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 |
<abi, functionName, args, chainOverride>(args: WriteContractParameters<abi, functionName, args, undefined | Chain, undefined | Account, chainOverride>) => Promise<`0x${string}`> |
- |
RegistryBaseApi.walletClient
src/Instantiable.abstract.ts:104
▸ addRating(did, newRating, numVotesAdded?, from, publishMetadata?, txParams?): SubscribablePromise<UpdateProgressStep, DDO>
Given a DID, it adds a vote to the asset curation information.
| Name | Type | Default value | Description |
|---|---|---|---|
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 |
from |
NvmAccount |
undefined |
Account of the user updating the metadata |
publishMetadata |
PublishMetadataOptions |
PublishMetadataOptions.OnlyMetadataAPI |
It allows to specify where to store the metadata |
txParams? |
TxParameters |
undefined |
Optional transaction parameters |
SubscribablePromise<UpdateProgressStep, DDO>
DDO The DDO updated
src/nevermined/api/RegistryBaseApi.ts:564
▸ create(assetAttributes, publisherAccount, publicationOptions?, txParams?): SubscribablePromise<CreateProgressStep, DDO>
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
| Name | Type | Description |
|---|---|---|
assetAttributes |
AssetAttributes |
Attributes describing the asset |
publisherAccount |
NvmAccount |
The account publishing the asset |
publicationOptions |
AssetPublicationOptions |
Allows to specify the publication options of the off-chain and the on-chain data. |
txParams? |
TxParameters |
Optional transaction parameters |
SubscribablePromise<CreateProgressStep, DDO>
The metadata of the asset created (DDO)
See
PublishOnChainOptions and PublishMetadataOptions
src/nevermined/api/ComputeApi.ts:48
▸ execute(agreementId, workflowDid, from): Promise<string>
It triggers the execution of a compute job
| 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 |
The account of the user triggering the computation |
Promise<string>
If the execution is correct it returns the response given by the Nevermined Node
src/nevermined/api/ComputeApi.ts:125
▸ list(did, list, from, publishMetadata?, txParams?): SubscribablePromise<UpdateProgressStep, DDO>
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.
| Name | Type | Default value | Description |
|---|---|---|---|
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 |
from |
NvmAccount |
undefined |
Account of the user updating the metadata |
publishMetadata |
PublishMetadataOptions |
PublishMetadataOptions.OnlyMetadataAPI |
It allows to specify where to store the metadata |
txParams? |
TxParameters |
undefined |
Optional transaction parameters |
SubscribablePromise<UpdateProgressStep, DDO>
DDO The DDO updated
src/nevermined/api/RegistryBaseApi.ts:512
▸ logs(agreementId, executionId, from): Promise<any>
It returns the logs resulted by the execution of a Job
| 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 |
The account of the user triggering the computation |
Promise<any>
The logs resulted of the execution of the job
src/nevermined/api/ComputeApi.ts:142
▸ order(did, from, txParams?): SubscribablePromise<OrderProgressStep, 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).
| Name | Type | Description |
|---|---|---|
did |
string |
Unique identifier of the asset to order |
from |
NvmAccount |
The account of the user ordering the asset |
txParams? |
TxParameters |
Optional transaction parameters |
SubscribablePromise<OrderProgressStep, string>
The agreement ID identifying the order
src/nevermined/api/ComputeApi.ts:110
▸ orderAsset(did, serviceReference, from, txParams?): SubscribablePromise<OrderProgressStep, 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).
| Name | Type | Description |
|---|---|---|
did |
string |
Decentralized ID. |
serviceReference |
number | ServiceType |
Service. |
from |
NvmAccount |
Consumer account. |
txParams? |
TxParameters |
Transaction parameters |
SubscribablePromise<OrderProgressStep, string>
The agreement ID.
src/nevermined/api/RegistryBaseApi.ts:615
▸ registerNeverminedAsset(assetAttributes, from, publicationOptions, nftAttributes?, txParams?): SubscribablePromise<CreateProgressStep, DDO>
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.
| Name | Type | Description |
|---|---|---|
assetAttributes |
AssetAttributes |
Attributes describing the asset |
from |
NvmAccount |
The account publishing the asset |
publicationOptions |
AssetPublicationOptions |
Allows to specify the publication options of the off-chain and the on-chain data. |
nftAttributes? |
NFTAttributes |
Attributes describing the NFT (ERC-721) associated to the asset |
txParams? |
TxParameters |
Optional transaction parameters |
SubscribablePromise<CreateProgressStep, DDO>
The metadata of the asset created (DDO)
See
PublishOnChainOptions and PublishMetadataOptions
RegistryBaseApi.registerNeverminedAsset
src/nevermined/api/RegistryBaseApi.ts:52
▸ resolveAsset(did, policy?): Promise<DDO>
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).
| Name | Type | Default value | Description |
|---|---|---|---|
did |
string |
undefined |
Decentralized ID. |
policy |
DIDResolvePolicy |
DIDResolvePolicy.MetadataAPIFirst |
It specifies the resolve policy to apply. It allows to select that priorities during the asset resolution via Metadata API or Immutable URLs (IPFS, Filecoin, etc) |
Promise<DDO>
src/nevermined/api/RegistryBaseApi.ts:349
▸ setInstanceConfig(config): void
| Name | Type |
|---|---|
config |
InstantiableConfig |
void
RegistryBaseApi.setInstanceConfig
src/Instantiable.abstract.ts:162
▸ status(agreementId, executionId, from): Promise<any>
It returns the status of a compute job
| 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 |
The account of the user triggering the computation |
Promise<any>
The status of the job
src/nevermined/api/ComputeApi.ts:153
▸ update(did, metadata, from, publishMetadata?, txParams?): SubscribablePromise<UpdateProgressStep, DDO>
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.
| Name | Type | Default value | Description |
|---|---|---|---|
did |
string |
undefined |
Decentralized ID representing the unique id of an asset in a Nevermined network. |
metadata |
MetaData |
undefined |
Metadata describing the asset |
from |
NvmAccount |
undefined |
Account of the user updating the metadata |
publishMetadata |
PublishMetadataOptions |
PublishMetadataOptions.OnlyMetadataAPI |
It allows to specify where to store the metadata |
txParams? |
TxParameters |
undefined |
Optional transaction parameters |
SubscribablePromise<UpdateProgressStep, DDO>
DDO The DDO updated
Example
const ddoUpdated = await nevermined.compute.update(
ddo.shortId(),
updatedMetadata,
publisher,
PublishMetadata.IPFS,
)
src/nevermined/api/ComputeApi.ts:92
▸ updateAsset(did, metadata, from, publishMetadataOptions?, txParams?): SubscribablePromise<UpdateProgressStep, DDO>
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.
| Name | Type | Default value | Description |
|---|---|---|---|
did |
string |
undefined |
Decentralized ID representing the unique id of an asset in a Nevermined network. |
metadata |
MetaData |
undefined |
Metadata describing the asset |
from |
NvmAccount |
undefined |
Account of the user updating the metadata |
publishMetadataOptions |
PublishMetadataOptions |
PublishMetadataOptions.OnlyMetadataAPI |
It allows to specify where to store the metadata |
txParams? |
TxParameters |
undefined |
Optional transaction parameters |
SubscribablePromise<UpdateProgressStep, DDO>
DDO The DDO updated
src/nevermined/api/RegistryBaseApi.ts:392
▸ getInstance(..._args): any
| Name | Type |
|---|---|
..._args |
any |
any
src/Instantiable.abstract.ts:149
▸ getServicePlugin(config): Object
Initializes the default Nevermined service plugins and return that instance
| Name | Type | Description |
|---|---|---|
config |
InstantiableConfig |
Nevermined config |
Object
The Nevermined Service Plugin instance
| Name | Type |
|---|---|
access |
AccessService |
compute |
EscrowComputeExecutionTemplate |
nft-access |
NFTAccessService |
nft-sales |
NFTSalesService |
RegistryBaseApi.getServicePlugin
src/nevermined/api/RegistryBaseApi.ts:670
▸ setInstanceConfig<T>(instance, instantiableConfig): void
| Name | Type |
|---|---|
T |
extends Instantiable |
| Name | Type |
|---|---|
instance |
T |
instantiableConfig |
InstantiableConfig |
void
RegistryBaseApi.setInstanceConfig