WalletArkivActions
WalletArkivActions<
transport,chain,account> =Pick<PublicActions<transport,chain,account>,"waitForTransactionReceipt"|"call"> &Pick<WalletActions<chain,account>,"addChain"|"sendCalls"|"waitForCallsStatus"|"sendTransaction"|"sendRawTransaction"|"signMessage"|"signTransaction"> &object
Defined in: src/clients/decorators/arkivWallet.ts:34
Type Declaration
Section titled “Type Declaration”changeOwnership()
Section titled “changeOwnership()”changeOwnership: (
data,txParams?) =>Promise<ChangeOwnershipReturnType>
Changes the ownership of the entity with the given address.
- Docs: https://docs.arkiv.network/ts-sdk/actions/wallet/changeOwnership
- JSON-RPC Methods:
eth_sendRawTransaction
Parameters
Section titled “Parameters”The ownership change parameters
txParams?
Section titled “txParams?”Optional transaction parameters
Returns
Section titled “Returns”Promise<ChangeOwnershipReturnType>
The entity with updated ownership and transaction hash
createEntity()
Section titled “createEntity()”createEntity: (
data,txParams?) =>Promise<CreateEntityReturnType>
Creates a new entity.
- Docs: https://docs.arkiv.network/ts-sdk/actions/wallet/createEntity
- JSON-RPC Methods:
eth_sendRawTransaction
Parameters
Section titled “Parameters”The entity creation parameters
txParams?
Section titled “txParams?”Optional transaction parameters
Returns
Section titled “Returns”Promise<CreateEntityReturnType>
The created entity with transaction hash
Example
Section titled “Example”import { createPublicClient, http } from 'arkiv'import { braga } from 'arkiv/chains'
const client = createPublicClient({ chain: braga, transport: http(),})const { entityKey, txHash } = await client.createEntity({ payload: toBytes(JSON.stringify({ entity: { entityType: "testType", entityId: "testId" } })), attributes: [{ key: "testKey", value: "testValue" }], expiresIn: 1000,})console.log("entityKey", entityKey)console.log("txHash", txHash)// {// entityKey: "0x123",// txHash: "0x123",// }deleteEntity()
Section titled “deleteEntity()”deleteEntity: (
data,txParams?) =>Promise<DeleteEntityReturnType>
Deletes the entity with the given key.
- Docs: https://docs.arkiv.network/ts-sdk/actions/wallet/deleteEntity
- JSON-RPC Methods:
eth_sendRawTransaction
Parameters
Section titled “Parameters”The entity deletion parameters
txParams?
Section titled “txParams?”Optional transaction parameters
Returns
Section titled “Returns”Promise<DeleteEntityReturnType>
The deleted entity with transaction hash
Example
Section titled “Example”import { createWalletClient, http } from 'arkiv'import { braga } from 'arkiv/chains'
const client = createWalletClient({ chain: braga, transport: http(),})const { entityKey, txHash } = await client.deleteEntity({ entityKey: "0x123" })console.log("entityKey", entityKey)console.log("txHash", txHash)// {// entityKey: "0x123",// txHash: "0x123",// }extendEntity()
Section titled “extendEntity()”extendEntity: (
data,txParams?) =>Promise<ExtendEntityReturnType>
Extends the entity with the given key.
- Docs: https://docs.arkiv.network/ts-sdk/actions/wallet/extendEntity
- JSON-RPC Methods:
eth_sendRawTransaction
Parameters
Section titled “Parameters”The entity update parameters
txParams?
Section titled “txParams?”Optional transaction parameters
Returns
Section titled “Returns”Promise<ExtendEntityReturnType>
The updated entity with transaction hash
Example
Section titled “Example”import { createWalletClient, http } from 'arkiv'import { braga } from 'arkiv/chains'
const client = createWalletClient({ chain: braga, transport: http(),})const { entityKey, txHash } = await client.extendEntity("0x123", { expiresIn: 1000,})console.log("entityKey", entityKey)console.log("txHash", txHash)// {// entityKey: "0x123",// txHash: "0x123",// }mutateEntities()
Section titled “mutateEntities()”mutateEntities: (
data,txParams?) =>Promise<MutateEntitiesReturnType>
Mutates the entities with the given keys.
- Docs: https://docs.arkiv.network/ts-sdk/actions/wallet/mutateEntities
- JSON-RPC Methods:
eth_sendRawTransaction
Parameters
Section titled “Parameters”The mutation parameters (creates, updates, deletes, extensions)
txParams?
Section titled “txParams?”Optional transaction parameters
Returns
Section titled “Returns”Promise<MutateEntitiesReturnType>
The mutation result with transaction hash
Example
Section titled “Example”import { createWalletClient, http } from 'arkiv'import { braga } from 'arkiv/chains'
const client = createWalletClient({ chain: braga, transport: http(),})const { entityKey, txHash } = await client.mutateEntities({ creates: [{ payload: toBytes(JSON.stringify({ entity: { entityType: "testType", entityId: "testId" } })), attriubutes: [{ key: "testKey", value: "testValue" }], expiresIn: 1000, }], updates: [{ entityKey: "0x123", payload: toBytes(JSON.stringify({ entity: { entityType: "testType", entityId: "testId" } })), attributes: [{ key: "testKey", value: "testValue" }], expiresIn: 1000, }], deletes: [{ entityKey: "0x321", }], extensions: [{ entityKey: "0x1234", expiresIn: 1000, }],})console.log("entityKey", entityKey)console.log("txHash", txHash)// {// entityKey: "0x123",// txHash: "0x123",// }updateEntity()
Section titled “updateEntity()”updateEntity: (
data,txParams?) =>Promise<UpdateEntityReturnType>
Updates the entity with the given key.
- Docs: https://docs.arkiv.network/ts-sdk/actions/wallet/updateEntity
- JSON-RPC Methods:
eth_sendRawTransaction
Parameters
Section titled “Parameters”The entity update parameters
txParams?
Section titled “txParams?”Optional transaction parameters
Returns
Section titled “Returns”Promise<UpdateEntityReturnType>
The updated entity with transaction hash
Example
Section titled “Example”import { createWalletClient, http } from 'arkiv'import { braga } from 'arkiv/chains'
const client = createWalletClient({ chain: braga, transport: http(),})Type Parameters
Section titled “Type Parameters”transport
Section titled “transport”transport extends Transport = Transport
chain extends Chain | undefined = Chain | undefined
account
Section titled “account”account extends Account | undefined = Account | undefined