@arkiv-network/sdk 0.7.0 → 0.8.0-advanced.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -16
- package/dist/actions/advanced/index.cjs +13 -0
- package/dist/actions/advanced/index.d.cts +8 -0
- package/dist/actions/advanced/index.d.ts +9 -0
- package/dist/actions/advanced/index.js +9 -0
- package/dist/advanced-Ds2XRflQ.cjs +656 -0
- package/dist/advanced-FZy7WoYR.js +598 -0
- package/dist/advanced-FZy7WoYR.js.map +1 -0
- package/dist/arkivTransactions-BpARZOsH.d.cts +584 -0
- package/dist/arkivTransactions-BpARZOsH.d.cts.map +1 -0
- package/dist/arkivTransactions-DfZ_yVDD.d.ts +584 -0
- package/dist/arkivTransactions-DfZ_yVDD.d.ts.map +1 -0
- package/dist/attr/index.cjs +35 -0
- package/dist/attr/index.d.cts +2 -0
- package/dist/attr/index.d.ts +3 -0
- package/dist/attr/index.js +4 -0
- package/dist/attributes-BJGuhsqp.js +819 -0
- package/dist/attributes-BJGuhsqp.js.map +1 -0
- package/dist/attributes-CMJlp1wn.cjs +1039 -0
- package/dist/chains/index.cjs +2 -3
- package/dist/chains/index.d.cts +41 -76
- package/dist/chains/index.d.cts.map +1 -1
- package/dist/chains/index.d.ts +24 -59
- package/dist/chains/index.d.ts.map +1 -1
- package/dist/chains/index.js +2 -2
- package/dist/chains-BfNQliHU.cjs +76 -0
- package/dist/chains-Du8tql7I.js +60 -0
- package/dist/chains-Du8tql7I.js.map +1 -0
- package/dist/codec-M74UR1_0.d.ts +101 -0
- package/dist/codec-M74UR1_0.d.ts.map +1 -0
- package/dist/entity/index.cjs +21 -0
- package/dist/entity/index.d.cts +4 -0
- package/dist/entity/index.d.ts +5 -0
- package/dist/entity/index.js +7 -0
- package/dist/entity-B00Li04j.cjs +71 -0
- package/dist/entity-B7G8q_Eo.cjs +0 -0
- package/dist/entity-BYQR1uoe.js +67 -0
- package/dist/entity-BYQR1uoe.js.map +1 -0
- package/dist/entity-CD_qFF2M.js +0 -0
- package/dist/errors-51znTSB1.cjs +56 -0
- package/dist/errors-CwPJ16bn.js +33 -0
- package/dist/errors-CwPJ16bn.js.map +1 -0
- package/dist/expiry-CZErShX6.js +95 -0
- package/dist/expiry-CZErShX6.js.map +1 -0
- package/dist/expiry-DRV29F1r.d.cts +79 -0
- package/dist/expiry-DRV29F1r.d.cts.map +1 -0
- package/dist/expiry-nDbCgZX4.d.ts +79 -0
- package/dist/expiry-nDbCgZX4.d.ts.map +1 -0
- package/dist/expiry-xr6mx4f7.cjs +135 -0
- package/dist/flags-5dTNRnow.d.ts +41 -0
- package/dist/flags-5dTNRnow.d.ts.map +1 -0
- package/dist/flags-Bh0HJldY.cjs +43 -0
- package/dist/flags-CRjPpoh3.d.cts +41 -0
- package/dist/flags-CRjPpoh3.d.cts.map +1 -0
- package/dist/flags-Cr76ldwF.js +33 -0
- package/dist/flags-Cr76ldwF.js.map +1 -0
- package/dist/index-CMeD8uEq.d.cts +280 -0
- package/dist/index-CMeD8uEq.d.cts.map +1 -0
- package/dist/index-CTDI5pXZ.d.ts +184 -0
- package/dist/index-CTDI5pXZ.d.ts.map +1 -0
- package/dist/index-CekGjkRx.d.cts +184 -0
- package/dist/index-CekGjkRx.d.cts.map +1 -0
- package/dist/index-D0IzFwMX.d.ts +328 -0
- package/dist/index-D0IzFwMX.d.ts.map +1 -0
- package/dist/index-DZxwz2Ky.d.cts +177 -0
- package/dist/index-DZxwz2Ky.d.cts.map +1 -0
- package/dist/index-Dz4SkQWg.d.ts +280 -0
- package/dist/index-Dz4SkQWg.d.ts.map +1 -0
- package/dist/index-JP31fjyM.d.ts +177 -0
- package/dist/index-JP31fjyM.d.ts.map +1 -0
- package/dist/index-NbfnXxgr.d.cts +424 -0
- package/dist/index-NbfnXxgr.d.cts.map +1 -0
- package/dist/index.cjs +434 -412
- package/dist/index.d.cts +401 -235
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +402 -235
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +370 -404
- package/dist/index.js.map +1 -1
- package/dist/key-E7mv0BYf.cjs +116 -0
- package/dist/key-XQkpw2xh.js +82 -0
- package/dist/key-XQkpw2xh.js.map +1 -0
- package/dist/logger-CVpvU8ik.js +153 -0
- package/dist/logger-CVpvU8ik.js.map +1 -0
- package/dist/logger-Cr15lPAQ.cjs +188 -0
- package/dist/payload-Cvrir3Q-.cjs +108 -0
- package/dist/payload-D53ms-Mg.d.ts +153 -0
- package/dist/payload-D53ms-Mg.d.ts.map +1 -0
- package/dist/payload-DaPzUvEh.js +92 -0
- package/dist/payload-DaPzUvEh.js.map +1 -0
- package/dist/payload-hluX1rc0.d.cts +153 -0
- package/dist/payload-hluX1rc0.d.cts.map +1 -0
- package/dist/query/index.cjs +26 -149
- package/dist/query/index.d.cts +5 -3
- package/dist/query/index.d.ts +6 -3
- package/dist/query/index.js +8 -137
- package/dist/queryBuilder-BXR-HxD9.cjs +947 -0
- package/dist/queryBuilder-BwauPaGO.js +823 -0
- package/dist/queryBuilder-BwauPaGO.js.map +1 -0
- package/dist/selection-C6KeWJ7g.d.cts +441 -0
- package/dist/selection-C6KeWJ7g.d.cts.map +1 -0
- package/dist/selection-mjiiAGDO.d.ts +442 -0
- package/dist/selection-mjiiAGDO.d.ts.map +1 -0
- package/dist/types/index.cjs +4 -1
- package/dist/types/index.d.cts +7 -2
- package/dist/types/index.d.ts +8 -2
- package/dist/types/index.js +4 -1
- package/dist/types-Bu_ZwMbZ.js +0 -0
- package/dist/types-NRqymi6S.cjs +0 -0
- package/dist/utils/index.cjs +4 -17
- package/dist/utils/index.d.cts +3 -17
- package/dist/utils/index.d.ts +3 -17
- package/dist/utils/index.js +4 -18
- package/package.json +26 -9
- package/src/actions/advanced/advanced.test.ts +258 -0
- package/src/actions/advanced/buildMutation.ts +104 -0
- package/src/actions/advanced/getMutationResult.ts +112 -0
- package/src/actions/advanced/index.ts +21 -0
- package/src/actions/advanced/pingTransaction.ts +43 -0
- package/src/actions/advanced/sendMutation.ts +59 -0
- package/src/actions/public/getEntity.ts +28 -43
- package/src/actions/public/getEntityNonce.ts +30 -0
- package/src/actions/public/predictEntityKeys.test.ts +159 -0
- package/src/actions/public/predictEntityKeys.ts +152 -0
- package/src/actions/public/query.ts +35 -67
- package/src/actions/public/watchEntityEvents.test.ts +414 -0
- package/src/actions/public/watchEntityEvents.ts +225 -0
- package/src/actions/wallet/changeOwnership.ts +8 -8
- package/src/actions/wallet/createEntity.ts +105 -26
- package/src/actions/wallet/deleteEntity.ts +2 -3
- package/src/actions/wallet/executeBatch.test.ts +76 -0
- package/src/actions/wallet/executeBatch.ts +51 -0
- package/src/actions/wallet/extendEntity.ts +40 -16
- package/src/actions/wallet/patchEntity.ts +90 -0
- package/src/attr/attributes.test.ts +120 -0
- package/src/attr/attributes.ts +196 -0
- package/src/attr/codec.test.ts +162 -0
- package/src/attr/codec.ts +220 -0
- package/src/attr/decimal.ts +86 -0
- package/src/attr/errors.ts +145 -0
- package/src/attr/index.ts +50 -0
- package/src/attr/names.ts +106 -0
- package/src/attr/types.ts +150 -0
- package/src/attr/values.test.ts +271 -0
- package/src/attr/values.ts +506 -0
- package/src/chains/cheesecake.ts +22 -0
- package/src/chains/index.ts +1 -2
- package/src/chains/localhost.ts +3 -0
- package/src/clients/createPublicClient.test.ts +4 -6
- package/src/clients/createPublicClient.ts +9 -8
- package/src/clients/createWalletClient.test.ts +4 -4
- package/src/clients/createWalletClient.ts +13 -9
- package/src/clients/decorators/arkivAdvanced.ts +144 -0
- package/src/clients/decorators/arkivPublic.ts +181 -147
- package/src/clients/decorators/arkivWallet.ts +141 -122
- package/src/consts.ts +2 -1
- package/src/entity/create.test.ts +203 -0
- package/src/entity/errors.ts +39 -0
- package/src/entity/events.ts +16 -0
- package/src/entity/expiry.test.ts +195 -0
- package/src/entity/expiry.ts +182 -0
- package/src/entity/flags.ts +65 -0
- package/src/entity/index.ts +16 -0
- package/src/entity/key.ts +88 -0
- package/src/entity/operations.ts +135 -0
- package/src/entity/params.ts +15 -0
- package/src/errors.ts +33 -28
- package/src/index.ts +19 -0
- package/src/query/engine.ts +68 -132
- package/src/query/errors.ts +151 -0
- package/src/query/expression.test.ts +286 -0
- package/src/query/expression.ts +500 -0
- package/src/query/index.ts +40 -4
- package/src/query/injection.test.ts +151 -0
- package/src/query/queryBuilder.test.ts +342 -637
- package/src/query/queryBuilder.ts +133 -359
- package/src/query/queryResult.ts +54 -51
- package/src/query/selection.test.ts +48 -98
- package/src/query/selection.ts +77 -65
- package/src/types/entity.test.ts +44 -155
- package/src/types/entity.ts +62 -44
- package/src/types/events.ts +64 -23
- package/src/types/index.ts +24 -20
- package/src/types/rpcSchema.ts +71 -33
- package/src/types/txParams.ts +8 -0
- package/src/utils/arkivTransactions.test.ts +687 -38
- package/src/utils/arkivTransactions.ts +400 -115
- package/src/utils/chains.test.ts +21 -24
- package/src/utils/compression.ts +1 -1
- package/src/utils/entities.test.ts +62 -0
- package/src/utils/entities.ts +111 -29
- package/src/utils/expirationTime.ts +153 -10
- package/src/utils/logger.ts +2 -2
- package/src/utils/payload.ts +29 -2
- package/src/utils/revert.test.ts +99 -0
- package/src/utils/revert.ts +145 -0
- package/dist/chains-BifaY04V.cjs +0 -108
- package/dist/chains-CrtkVbBh.js +0 -86
- package/dist/chains-CrtkVbBh.js.map +0 -1
- package/dist/consts-AUoL-v42.cjs +0 -18
- package/dist/consts-BV4PR-de.js +0 -7
- package/dist/consts-BV4PR-de.js.map +0 -1
- package/dist/entity-B6g_EPm1.d.cts +0 -382
- package/dist/entity-B6g_EPm1.d.cts.map +0 -1
- package/dist/entity-qoLMAuuk.d.ts +0 -382
- package/dist/entity-qoLMAuuk.d.ts.map +0 -1
- package/dist/index-DdspxNAA.d.ts +0 -481
- package/dist/index-DdspxNAA.d.ts.map +0 -1
- package/dist/index-Ds9dwqb5.d.cts +0 -481
- package/dist/index-Ds9dwqb5.d.cts.map +0 -1
- package/dist/payload-B2kFJyah.d.ts +0 -6
- package/dist/payload-B2kFJyah.d.ts.map +0 -1
- package/dist/payload-CJN8fTvX.d.cts +0 -6
- package/dist/payload-CJN8fTvX.d.cts.map +0 -1
- package/dist/payload-Claf2jUO.js +0 -13
- package/dist/payload-Claf2jUO.js.map +0 -1
- package/dist/payload-DpA5PA-w.cjs +0 -23
- package/dist/query/index.js.map +0 -1
- package/dist/queryBuilder-D2uwP9jI.js +0 -704
- package/dist/queryBuilder-D2uwP9jI.js.map +0 -1
- package/dist/queryBuilder-UW2MCaX4.cjs +0 -792
- package/dist/utils/index.d.cts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/src/actions/public/buildQuery.ts +0 -10
- package/src/actions/public/subscribeEntityEvents.ts +0 -119
- package/src/actions/wallet/mutateEntities.ts +0 -111
- package/src/actions/wallet/updateEntity.ts +0 -60
- package/src/chains/braga.ts +0 -26
- package/src/chains/kaolin.ts +0 -29
- package/src/query/engine.test.ts +0 -526
- package/src/query/predicate.test.ts +0 -461
- package/src/query/predicate.ts +0 -144
- package/src/query/queryResult.test.ts +0 -270
- package/src/query/selectQueryBuilder.test.ts +0 -210
- package/src/types/attributes.ts +0 -16
- package/src/utils/validation.test.ts +0 -60
- package/src/utils/validation.ts +0 -32
- /package/dist/{types-H-TSmRpm.js → attr-DlmErkvR.cjs} +0 -0
- /package/dist/{types-o3zWarRp.cjs → attr-GcQKatub.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,39 +1,145 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
1
|
+
import { F as RpcCreationFlags, I as RpcEntity, L as RpcQueryOptions, M as ArkivRpcSchema, N as RpcAttribute, P as RpcAttributeSchemaEntry, R as RpcSelect, c as EntityFields, i as SelectArg, j as ArkivClient, n as FullEntity, p as Expression, r as ProjectedEntity, s as Entity, t as EntitySelection } from "./selection-mjiiAGDO.js";
|
|
2
|
+
import { a as Bytes32Value, c as I32Value, d as TypeTag, f as U256Value, h as isArkivValue, i as BoolValue, l as KeyValue, m as UserTypeTag, n as AnyArkivValue, o as BytesValue, p as U64Value, r as ArkivValue, s as DecValue, t as AddrValue, u as StrValue } from "./codec-M74UR1_0.js";
|
|
3
|
+
import { a as ResolvedExpiry, i as Lifetime, n as Expiry, o as resolveExpiry, r as ExpiryContext, s as toBlocks, t as EncodedExpiry } from "./expiry-nDbCgZX4.js";
|
|
4
|
+
import { a as InvalidCreationFlagsError, c as NoRandomSourceError, d as SaltInput, f as predictEntityKey, i as EntityEventName, l as MAX_SALT, m as Operation, n as OperationType, o as InvalidExpiryError, p as randomSalt, r as ENTITY_EVENTS_ABI, s as InvalidSaltError, t as MAX_EXPIRES_AT, u as NO_SALT } from "./index-JP31fjyM.js";
|
|
5
|
+
import { A as PredictEntityKeysParameters, C as EntityEvent, D as OwnershipTransferredEvent, E as ExpiryExtendedEvent, M as PredictedEntityKey, N as GetBlockTimingReturnType, O as QueryOptions, S as EntityDeletedEvent, T as EntityPatchedEvent, _ as DeleteEntityReturnType, a as mutationNeedsBlockNumber, b as WatchEntityEventsParameters, c as TxParams, d as PatchEntityReturnType, f as ExtendEntityParameters, g as DeleteEntityParameters, h as ExecuteBatchReturnType, i as collectMutationEvents, j as PredictEntityKeysReturnType, k as QueryReturnType, l as MimeType, m as ExecuteBatchParameters, n as MutationEvents, o as ChangeOwnershipParameters, p as ExtendEntityReturnType, r as buildEntityOperations, s as ChangeOwnershipReturnType, t as EntityMutationOps, u as PatchEntityParameters, v as CreateEntityParameters, w as EntityEventContext, x as EntityCreatedEvent, y as CreateEntityReturnType } from "./arkivTransactions-DfZ_yVDD.js";
|
|
6
|
+
import { A as i32, C as ValueInput, D as dec, E as bytes32, F as u64, M as str, N as toValue, O as decFromUnits, P as u256, S as U64_MAX, T as bool, _ as MAX_PAYLOAD_BYTES, a as InvalidAttributeNameError, b as MAX_STRING_BYTES, c as TooManyAttributesError, d as DECIMAL_SCALE, f as DECIMAL_UNIT, g as MAX_ATTRIBUTES, h as Attributes, i as ConflictingMutationError, j as key, k as decUnits, l as UnknownAttributeTypeError, m as AttributeSchema, n as isValidAttributeName, o as InvalidValueError, p as AttributeInputs, r as validateAttributeName, s as MissingValueError, t as MAX_NAME_BYTES, u as UntypedValueError, v as I32_MAX, w as addr, x as U256_MAX, y as I32_MIN } from "./index-D0IzFwMX.js";
|
|
7
|
+
import { i as encodeCreationFlags, n as ResolvedCreationFlags, r as decodeCreationFlags, t as CreationFlags } from "./flags-5dTNRnow.js";
|
|
8
|
+
import { a as pingTransaction, c as decodeMutationResult, d as BuildMutationReturnType, f as buildMutation, i as PingTransactionReturnType, l as getMutationResult, n as SendMutationReturnType, o as GetMutationResultReturnType, r as sendMutation, s as MutationResult, t as SendMutationOptions, u as BuildMutationOptions } from "./index-CTDI5pXZ.js";
|
|
9
|
+
import { t as SelectQueryBuilder } from "./index-Dz4SkQWg.js";
|
|
10
|
+
import { i as ExpirationTime, n as stringToPayload, r as DeadlineOptions, t as jsonToPayload } from "./payload-D53ms-Mg.js";
|
|
11
|
+
import { Account, Address, Chain, Client, Hash, Hex, ParseAccount, Prettify, PublicActions, PublicClientConfig, RpcSchema, TransactionReceipt, Transport, WalletActions, WalletClientConfig } from "viem";
|
|
5
12
|
|
|
13
|
+
//#region src/clients/decorators/arkivAdvanced.d.ts
|
|
14
|
+
/**
|
|
15
|
+
* The read-only half of the advanced path — checking on a transaction and decoding its result —
|
|
16
|
+
* which needs no account, so a Public Client carries it too.
|
|
17
|
+
*
|
|
18
|
+
* Every action here costs at most one RPC call, and says exactly which.
|
|
19
|
+
*/
|
|
20
|
+
type PublicAdvancedActions = {
|
|
21
|
+
/**
|
|
22
|
+
* Asks the chain — once — whether a transaction has landed. Exactly one
|
|
23
|
+
* `eth_getTransactionReceipt`, never a poll: an unmined transaction comes back as
|
|
24
|
+
* `{ status: "pending" }` and the schedule stays yours.
|
|
25
|
+
*
|
|
26
|
+
* @param txHash - The transaction hash returned by `sendMutation` (or any other send)
|
|
27
|
+
* @returns `{ status: "pending" }`, or `{ status: "success" | "reverted", blockNumber }`
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const { status } = await client.advanced.pingTransaction(txHash)
|
|
31
|
+
* if (status === "pending") scheduleAnotherPing()
|
|
32
|
+
*/
|
|
33
|
+
pingTransaction: (txHash: Hash) => Promise<PingTransactionReturnType>;
|
|
34
|
+
/**
|
|
35
|
+
* Fetches a transaction's receipt — once — and decodes what the mutation did: created keys and
|
|
36
|
+
* expiries, plus the keys of everything patched, deleted, extended or handed over. One
|
|
37
|
+
* `eth_getTransactionReceipt`; `{ status: "pending" }` if not mined yet. No revert diagnosis is
|
|
38
|
+
* run on a `reverted` result — that extra call is yours to spend or skip.
|
|
39
|
+
*
|
|
40
|
+
* @param txHash - The transaction hash
|
|
41
|
+
* @returns The decoded {@link MutationResult}, or `{ status: "pending" }`
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* const result = await client.advanced.getMutationResult(txHash)
|
|
45
|
+
* if (result.status === "success") console.log(result.createdEntities)
|
|
46
|
+
*/
|
|
47
|
+
getMutationResult: (txHash: Hash) => Promise<GetMutationResultReturnType>;
|
|
48
|
+
/**
|
|
49
|
+
* Decodes a receipt you already hold into a {@link MutationResult}. **Zero RPC calls** — for
|
|
50
|
+
* receipts that reached you through your own `waitForTransactionReceipt`, a block watcher, or a
|
|
51
|
+
* webhook.
|
|
52
|
+
*
|
|
53
|
+
* @param receipt - The transaction receipt
|
|
54
|
+
* @returns The decoded {@link MutationResult}
|
|
55
|
+
*/
|
|
56
|
+
decodeMutationResult: (receipt: TransactionReceipt) => MutationResult;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* The advanced path on a Wallet Client: build, send, ping and read results as separate steps, each
|
|
60
|
+
* costing the minimum number of RPC calls — down to one per transaction when you supply what the
|
|
61
|
+
* SDK would otherwise look up.
|
|
62
|
+
*
|
|
63
|
+
* The everyday actions (`createEntity`, `executeBatch`, …) bundle send + wait + decode and are
|
|
64
|
+
* the right default. This namespace unbundles them for callers optimising their RPC budget.
|
|
65
|
+
*
|
|
66
|
+
* @example Minimal-call flow: one send, one ping, done.
|
|
67
|
+
* const { txHash } = await client.advanced.sendMutation(
|
|
68
|
+
* { creates: [{ payload, contentType: "application/json", expires }] },
|
|
69
|
+
* { currentBlock, txParams: { nonce, gas: 1_000_000n, maxFeePerGas, maxPriorityFeePerGas } },
|
|
70
|
+
* ) // exactly 1 RPC call: eth_sendRawTransaction
|
|
71
|
+
* // ... later, on your own schedule:
|
|
72
|
+
* const result = await client.advanced.getMutationResult(txHash) // 1 RPC call
|
|
73
|
+
* if (result.status === "success") console.log(result.createdEntities)
|
|
74
|
+
*/
|
|
75
|
+
type WalletAdvancedActions = PublicAdvancedActions & {
|
|
76
|
+
/**
|
|
77
|
+
* Encodes a mutation batch without sending anything: zero RPC calls with `currentBlock` supplied
|
|
78
|
+
* (or when no expiry is relative), at most one `eth_blockNumber` otherwise. Returns the
|
|
79
|
+
* operations for `writeContract`, and the `{ to, data }` calldata for offline signing.
|
|
80
|
+
*
|
|
81
|
+
* @param data - The batch (creates, patches, deletes, extensions, ownershipChanges)
|
|
82
|
+
* @param options - Optional `currentBlock` to avoid the `eth_blockNumber` lookup
|
|
83
|
+
*/
|
|
84
|
+
buildMutation: (data: EntityMutationOps, options?: BuildMutationOptions) => Promise<BuildMutationReturnType>;
|
|
85
|
+
/**
|
|
86
|
+
* Signs and sends a mutation batch, returning the hash as soon as the transaction is submitted —
|
|
87
|
+
* no waiting, no polling, no revert diagnosis. With `currentBlock` and full `txParams` (nonce,
|
|
88
|
+
* gas, fees) supplied this is exactly one `eth_sendRawTransaction`; each omitted piece adds only
|
|
89
|
+
* the lookup viem needs to fill it.
|
|
90
|
+
*
|
|
91
|
+
* @param data - The batch (creates, patches, deletes, extensions, ownershipChanges)
|
|
92
|
+
* @param options - Optional `currentBlock` and `txParams`
|
|
93
|
+
* @returns The transaction hash and the batch's per-kind operation counts
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* const { txHash } = await client.advanced.sendMutation({
|
|
97
|
+
* creates: [{ payload, contentType: "application/json", expires: ExpirationTime.atBlock(1_200_000n) }],
|
|
98
|
+
* })
|
|
99
|
+
*/
|
|
100
|
+
sendMutation: (data: EntityMutationOps, options?: SendMutationOptions) => Promise<SendMutationReturnType>;
|
|
101
|
+
};
|
|
102
|
+
//#endregion
|
|
6
103
|
//#region src/clients/decorators/arkivPublic.d.ts
|
|
7
104
|
type PublicArkivActions<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = Pick<PublicActions<transport, chain, account>, "getBalance" | "getBlock" | "getBlockNumber" | "getChainId" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "waitForTransactionReceipt" | "watchEvent"> & {
|
|
8
105
|
/**
|
|
9
106
|
* Returns the entity with the given key.
|
|
10
107
|
*
|
|
11
|
-
* -
|
|
108
|
+
* - JSON-RPC Methods: `arkiv_query`
|
|
12
109
|
*
|
|
13
110
|
* @param key - The entity key (hex string)
|
|
14
|
-
* @returns The entity with the given key. {@link
|
|
111
|
+
* @returns The entity with the given key, with every field populated. {@link FullEntity}
|
|
112
|
+
*
|
|
113
|
+
* @throws {InvalidValueError} If the key is not 32 bytes.
|
|
114
|
+
* @throws {NoEntityFoundError} If no live entity has that key — it never existed, or it was
|
|
115
|
+
* deleted or has expired.
|
|
15
116
|
*
|
|
16
117
|
* @example
|
|
17
|
-
* import { createPublicClient
|
|
18
|
-
* import {
|
|
118
|
+
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
119
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
120
|
+
* import { http } from "viem"
|
|
19
121
|
*
|
|
20
122
|
* const client = createPublicClient({
|
|
21
|
-
* chain:
|
|
123
|
+
* chain: cheesecake,
|
|
22
124
|
* transport: http(),
|
|
23
125
|
* })
|
|
24
|
-
* const entity = await client.getEntity(
|
|
25
|
-
* // {
|
|
26
|
-
* // key: "
|
|
27
|
-
* //
|
|
126
|
+
* const entity = await client.getEntity(entityKey)
|
|
127
|
+
* // Entity {
|
|
128
|
+
* // key: "0x9f2c…",
|
|
129
|
+
* // owner: "0xabc…",
|
|
130
|
+
* // contentType: "application/json",
|
|
131
|
+
* // payload: Uint8Array, // entity.toJson() / entity.toText() decode it
|
|
132
|
+
* // attributes: { category: { type: "str", value: "docs" } },
|
|
133
|
+
* // expiresAt: 1_297_000n,
|
|
28
134
|
* // }
|
|
29
135
|
*/
|
|
30
|
-
getEntity: (key: Hex) => Promise<
|
|
136
|
+
getEntity: (key: Hex) => Promise<FullEntity>;
|
|
31
137
|
/**
|
|
32
138
|
* Returns a SelectQueryBuilder for building and executing queries — the recommended way to
|
|
33
139
|
* read entities. You declare up front which parts of an entity you want returned, so results
|
|
34
140
|
* always contain exactly the data you asked for.
|
|
35
141
|
*
|
|
36
|
-
* -
|
|
142
|
+
* - JSON-RPC Methods: `arkiv_query`
|
|
37
143
|
*
|
|
38
144
|
* @param selection - What to include in the results. Omit it (or pass `"*"`) to select everything,
|
|
39
145
|
* or pass an object to select specific parts (at least one field is required). Every part is
|
|
@@ -42,12 +148,13 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
42
148
|
* @returns A SelectQueryBuilder instance for building and executing queries. {@link SelectQueryBuilder}
|
|
43
149
|
*
|
|
44
150
|
* @example
|
|
45
|
-
* import { createPublicClient
|
|
46
|
-
* import {
|
|
47
|
-
* import { eq } from
|
|
151
|
+
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
152
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
153
|
+
* import { eq } from "@arkiv-network/sdk/query"
|
|
154
|
+
* import { http } from "viem"
|
|
48
155
|
*
|
|
49
156
|
* const client = createPublicClient({
|
|
50
|
-
* chain:
|
|
157
|
+
* chain: cheesecake,
|
|
51
158
|
* transport: http(),
|
|
52
159
|
* })
|
|
53
160
|
* // select everything
|
|
@@ -55,7 +162,7 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
55
162
|
* await client.select("*").where(eq("category", "docs")).fetch()
|
|
56
163
|
* // only the key
|
|
57
164
|
* await client.select({ key: true }).where(eq("category", "docs")).fetch()
|
|
58
|
-
* // select specific fields — result typed { owner: Hex; attributes:
|
|
165
|
+
* // select specific fields — result typed { owner: Hex; attributes: Attributes }
|
|
59
166
|
* await client.select({ owner: true, attributes: true }).fetch()
|
|
60
167
|
* // a single field — result typed { owner: Hex }
|
|
61
168
|
* await client.select({ owner: true }).fetch()
|
|
@@ -67,9 +174,11 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
67
174
|
* Pick the entity fields to return. Set the ones you want to `true` (at least one is required);
|
|
68
175
|
* the result is typed to exactly those fields, so reading anything else is a compile error.
|
|
69
176
|
*
|
|
70
|
-
* Available fields: `key`, `owner`, `creator`, `
|
|
71
|
-
* `
|
|
72
|
-
*
|
|
177
|
+
* Available fields: `key`, `owner`, `creator`, `createdAt`, `updatedAt`, `expiresAt`,
|
|
178
|
+
* `creationFlags`, `contentType`, `payload`, `attributeSchema` and `attributes`.
|
|
179
|
+
*
|
|
180
|
+
* `attributes` also takes a map of names, to fetch only those:
|
|
181
|
+
* `select({ key: true, attributes: { projectId: true } })`.
|
|
73
182
|
*
|
|
74
183
|
* Pass the selection inline so its fields stay literal `true`. A selection stored in a `let`/
|
|
75
184
|
* `const` variable widens to `boolean` and the result type can no longer be narrowed — annotate
|
|
@@ -77,7 +186,8 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
77
186
|
*
|
|
78
187
|
* @example
|
|
79
188
|
* client.select({ owner: true, attributes: true }) // entities typed { owner, attributes }
|
|
80
|
-
* client.select({ key: true, payload: true })
|
|
189
|
+
* client.select({ key: true, payload: true }) // includes payload → toText()/toJson() too
|
|
190
|
+
* client.select({ key: true, attributeSchema: true }) // what shape is the data?
|
|
81
191
|
*/
|
|
82
192
|
<const S extends EntitySelection>(selection: S): SelectQueryBuilder<ProjectedEntity<S>>;
|
|
83
193
|
/**
|
|
@@ -87,87 +197,124 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
87
197
|
(selection: SelectArg): SelectQueryBuilder<FullEntity>;
|
|
88
198
|
};
|
|
89
199
|
/**
|
|
90
|
-
*
|
|
91
|
-
* The QueryBuilder object follows the Builder pattern, allowing you to chain methods to build a query and then execute it.
|
|
200
|
+
* Runs one query and returns one page, with no builder in between.
|
|
92
201
|
*
|
|
93
|
-
*
|
|
202
|
+
* Use {@link PublicArkivActions.select} for anything typed — this returns full {@link Entity} objects whatever the
|
|
203
|
+
* selection, and takes a raw string as an escape hatch for a query built elsewhere. A raw string
|
|
204
|
+
* goes to the node exactly as written, with none of the name, type or operator checks the
|
|
205
|
+
* expression combinators apply.
|
|
94
206
|
*
|
|
95
|
-
* @
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* compatibility and will be removed in a future release.
|
|
99
|
-
*
|
|
100
|
-
* @returns A QueryBuilder instance for building and executing queries. {@link QueryBuilder}
|
|
207
|
+
* @param query - An {@link Expression}, or the raw query string.
|
|
208
|
+
* @param queryOptions - Selection, page size, cursor and block. {@link QueryOptions}
|
|
209
|
+
* @returns One page of entities. {@link QueryReturnType}
|
|
101
210
|
*
|
|
102
211
|
* @example
|
|
103
|
-
* import { createPublicClient
|
|
104
|
-
* import {
|
|
212
|
+
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
213
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
214
|
+
* import { and, eq, gte } from "@arkiv-network/sdk/query"
|
|
215
|
+
* import { i32 } from "@arkiv-network/sdk/attr"
|
|
216
|
+
* import { http } from "viem"
|
|
105
217
|
*
|
|
106
218
|
* const client = createPublicClient({
|
|
107
|
-
* chain:
|
|
219
|
+
* chain: cheesecake,
|
|
108
220
|
* transport: http(),
|
|
109
221
|
* })
|
|
110
|
-
* const
|
|
111
|
-
*
|
|
222
|
+
* const page = await client.query(and(eq("category", "docs"), gte("level", i32(10))), {
|
|
223
|
+
* select: { key: true, attributes: true },
|
|
224
|
+
* limit: 100,
|
|
225
|
+
* })
|
|
226
|
+
* // { entities: [Entity], cursor: "b64:…", blockNumber: 32223n }
|
|
112
227
|
*
|
|
228
|
+
* // The raw form, unchecked:
|
|
229
|
+
* await client.query("category = str('docs') AND level >= i32(10)")
|
|
113
230
|
*/
|
|
114
|
-
|
|
231
|
+
query: (query: Expression | string, queryOptions?: QueryOptions) => Promise<QueryReturnType>;
|
|
115
232
|
/**
|
|
116
|
-
* Returns
|
|
117
|
-
*
|
|
118
|
-
* @param query - The raw query string
|
|
119
|
-
* @param queryOptions - The optional query options - {@link QueryOptions}
|
|
120
|
-
* @returns A QueryReturnType instance - {@link QueryReturnType}
|
|
233
|
+
* Returns the total number of entities on the chain.
|
|
234
|
+
* @returns The number of entities currently stored
|
|
121
235
|
*
|
|
122
236
|
* @example
|
|
123
|
-
* import { createPublicClient
|
|
124
|
-
* import {
|
|
237
|
+
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
238
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
239
|
+
* import { http } from "viem"
|
|
125
240
|
*
|
|
126
241
|
* const client = createPublicClient({
|
|
127
|
-
* chain:
|
|
242
|
+
* chain: cheesecake,
|
|
128
243
|
* transport: http(),
|
|
129
244
|
* })
|
|
130
|
-
* const
|
|
131
|
-
* //
|
|
132
|
-
* const queryResultWithOptions = client.query('key = value && $owner = 0x123', {
|
|
133
|
-
* includeData: {
|
|
134
|
-
* attributes: false,
|
|
135
|
-
* payload: true,
|
|
136
|
-
* metadata: true,
|
|
137
|
-
* },
|
|
138
|
-
* resultsPerPage: 10,
|
|
139
|
-
* cursor: undefined,
|
|
140
|
-
* atBlock: undefined,
|
|
141
|
-
* })
|
|
142
|
-
* // queryResultWithOptions = { entities: [{ key: "0x123", value: "0x123" }], cursor: "...", blockNumber: 32223n }
|
|
245
|
+
* const entityCount = await client.getEntityCount()
|
|
246
|
+
* // entityCount = 0
|
|
143
247
|
*/
|
|
144
|
-
|
|
248
|
+
getEntityCount: () => Promise<number>;
|
|
145
249
|
/**
|
|
146
|
-
* Returns
|
|
147
|
-
*
|
|
250
|
+
* Returns how many entities an account has created — its entity-minting nonce.
|
|
251
|
+
*
|
|
252
|
+
* Not the account's transaction nonce: the engine keeps its own counter per creator and mixes it
|
|
253
|
+
* into every key it mints, which is why two identical creates from one account never collide.
|
|
254
|
+
*
|
|
255
|
+
* @param owner - The account whose nonce to read.
|
|
256
|
+
* @returns The nonce the account's next create will use.
|
|
148
257
|
*
|
|
149
258
|
* @example
|
|
150
|
-
* import { createPublicClient
|
|
151
|
-
* import {
|
|
259
|
+
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
260
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
261
|
+
* import { http } from "viem"
|
|
152
262
|
*
|
|
153
263
|
* const client = createPublicClient({
|
|
154
|
-
* chain:
|
|
264
|
+
* chain: cheesecake,
|
|
155
265
|
* transport: http(),
|
|
156
266
|
* })
|
|
157
|
-
* const
|
|
158
|
-
* //
|
|
267
|
+
* const nonce = await client.getEntityNonce("0xabc…")
|
|
268
|
+
* // 7n — the next entity this account creates is its eighth
|
|
159
269
|
*/
|
|
160
|
-
|
|
270
|
+
getEntityNonce: (owner: Address) => Promise<bigint>;
|
|
271
|
+
/**
|
|
272
|
+
* Works out the keys an account's next creates will be given, before sending them.
|
|
273
|
+
*
|
|
274
|
+
* The engine derives a key from the chain, the registry, the owner, the owner's nonce and a
|
|
275
|
+
* salt — everything but the nonce is known to the caller, and the nonce is read here. This is
|
|
276
|
+
* what lets a batch reference an entity it is about to mint.
|
|
277
|
+
*
|
|
278
|
+
* Each key arrives paired with the salt that mints it, because a create defaults to a *random*
|
|
279
|
+
* salt: a predicted key only holds if the create carries the salt it was predicted with. And the
|
|
280
|
+
* prediction holds only while nothing else from this owner is in flight — for a key you can rely
|
|
281
|
+
* on unconditionally, read it back from the create instead.
|
|
282
|
+
*
|
|
283
|
+
* A literal `count` comes back as a fixed-length tuple, so the pairs destructure into names.
|
|
284
|
+
*
|
|
285
|
+
* @param parameters - Owner, and either a count or the salts. {@link PredictEntityKeysParameters}
|
|
286
|
+
* @returns One `{ key, salt }` pair per create, in batch order.
|
|
287
|
+
* {@link PredictEntityKeysReturnType}
|
|
288
|
+
*
|
|
289
|
+
* @example A batch whose second entity points at its first.
|
|
290
|
+
* import { key } from "@arkiv-network/sdk/attr"
|
|
291
|
+
*
|
|
292
|
+
* const [parent, child] = await client.predictEntityKeys({ owner: account.address, count: 2 })
|
|
293
|
+
* await wallet.executeBatch({
|
|
294
|
+
* creates: [
|
|
295
|
+
* { payload, contentType, expires, salt: parent.salt },
|
|
296
|
+
* {
|
|
297
|
+
* payload,
|
|
298
|
+
* contentType,
|
|
299
|
+
* expires,
|
|
300
|
+
* salt: child.salt,
|
|
301
|
+
* attributes: { parent: key(parent.key) },
|
|
302
|
+
* },
|
|
303
|
+
* ],
|
|
304
|
+
* })
|
|
305
|
+
*/
|
|
306
|
+
predictEntityKeys: <const TCount extends number = number, const TSalts extends readonly SaltInput[] | undefined = undefined>(parameters: PredictEntityKeysParameters<TCount, TSalts>) => Promise<PredictEntityKeysReturnType<TCount, TSalts>>;
|
|
161
307
|
/**
|
|
162
308
|
* Returns the current block timing.
|
|
163
309
|
* @returns The current block timing. {@link GetBlockTimingReturnType}
|
|
164
310
|
*
|
|
165
311
|
* @example
|
|
166
|
-
* import { createPublicClient
|
|
167
|
-
* import {
|
|
312
|
+
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
313
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
314
|
+
* import { http } from "viem"
|
|
168
315
|
*
|
|
169
316
|
* const client = createPublicClient({
|
|
170
|
-
* chain:
|
|
317
|
+
* chain: cheesecake,
|
|
171
318
|
* transport: http(),
|
|
172
319
|
* })
|
|
173
320
|
* const blockTiming = await client.getBlockTiming()
|
|
@@ -177,297 +324,317 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
177
324
|
* // blockDuration: 2, // in seconds
|
|
178
325
|
* // }
|
|
179
326
|
*/
|
|
180
|
-
getBlockTiming: () => Promise<
|
|
181
|
-
currentBlock: bigint;
|
|
182
|
-
currentBlockTime: number;
|
|
183
|
-
blockDuration: number;
|
|
184
|
-
}>;
|
|
327
|
+
getBlockTiming: () => Promise<GetBlockTimingReturnType>;
|
|
185
328
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
329
|
+
* Watches entity events, calling the handlers you pass as they arrive.
|
|
330
|
+
*
|
|
331
|
+
* All five are decoded from logs — `onEntityCreated`, `onEntityPatched`, `onExpiryExtended`,
|
|
332
|
+
* `onOwnershipTransferred`, `onEntityDeleted` — and each carries the block, transaction and log
|
|
333
|
+
* index it came from, which is the order the operations were applied in. `onEvent` receives all
|
|
334
|
+
* of them, whatever their type.
|
|
335
|
+
*
|
|
336
|
+
* @param parameters - Handlers and options, all optional. {@link WatchEntityEventsParameters}
|
|
337
|
+
* @returns A function that stops the watcher.
|
|
191
338
|
*
|
|
192
339
|
* @example
|
|
193
|
-
* import { createPublicClient
|
|
194
|
-
* import {
|
|
340
|
+
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
341
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
342
|
+
* import { http } from "viem"
|
|
195
343
|
*
|
|
196
344
|
* const client = createPublicClient({
|
|
197
|
-
* chain:
|
|
345
|
+
* chain: cheesecake,
|
|
198
346
|
* transport: http(),
|
|
199
347
|
* })
|
|
200
|
-
* const
|
|
201
|
-
*
|
|
348
|
+
* const unwatch = client.watchEntityEvents({
|
|
349
|
+
* onEntityCreated: ({ entityKey, expiresAt }) => console.log(entityKey, "until", expiresAt),
|
|
350
|
+
* onError: (error) => console.error("watchEntityEvents error", error),
|
|
202
351
|
* })
|
|
203
|
-
*
|
|
352
|
+
* unwatch() // stop watching
|
|
204
353
|
*/
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
onEntityDeleted?: (event: OnEntityDeletedEvent) => void;
|
|
216
|
-
onEntityExpired?: (event: OnEntityExpiredEvent) => void;
|
|
217
|
-
onEntityExpiresInExtended?: (event: OnEntityExpiresInExtendedEvent) => void;
|
|
218
|
-
}, pollingInterval?: number, fromBlock?: bigint) => Promise<() => void>;
|
|
354
|
+
watchEntityEvents: (parameters: WatchEntityEventsParameters) => () => void;
|
|
355
|
+
/**
|
|
356
|
+
* The read-only half of the advanced path: check on a transaction and decode its result with at
|
|
357
|
+
* most one RPC call per action — so a process that holds nothing but a transaction hash can
|
|
358
|
+
* follow it without a wallet. {@link PublicAdvancedActions}
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* const { status } = await client.advanced.pingTransaction(txHash) // 1 eth_getTransactionReceipt
|
|
362
|
+
*/
|
|
363
|
+
advanced: PublicAdvancedActions;
|
|
219
364
|
};
|
|
220
365
|
//#endregion
|
|
221
366
|
//#region src/clients/createPublicClient.d.ts
|
|
222
367
|
type PublicArkivClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | undefined = undefined, rpcSchema extends RpcSchema | undefined = ArkivRpcSchema> = Prettify<Client<transport, chain, accountOrAddress, rpcSchema, PublicArkivActions<transport, chain>>>;
|
|
223
368
|
/**
|
|
224
|
-
* Creates a Public Client with a given [Transport](https://viem.sh/docs/clients/intro) configured for a [Chain](https://viem.sh/docs/
|
|
225
|
-
*
|
|
226
|
-
* - Docs: https://docs.arkiv.network/ts-sdk/clients/public
|
|
369
|
+
* Creates a Public Client with a given [Transport](https://viem.sh/docs/clients/intro) configured for a [Chain](https://viem.sh/docs/chains/introduction).
|
|
227
370
|
*
|
|
228
|
-
* A Public Client is an interface to "public" [Ethereum JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/)
|
|
371
|
+
* A Public Client is an interface to the "public" [Ethereum JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/)
|
|
372
|
+
* and the Arkiv JSON-RPC API — retrieving block numbers and transactions, reading from
|
|
373
|
+
* contracts, and querying entities — through {@link PublicArkivActions}.
|
|
229
374
|
*
|
|
230
375
|
* @param parameters - Configuration object for the public client (chain, transport, etc.)
|
|
231
|
-
* @returns
|
|
376
|
+
* @returns An Arkiv Public Client. {@link PublicArkivClient}
|
|
232
377
|
*
|
|
233
378
|
* @example
|
|
234
|
-
* import { createPublicClient
|
|
235
|
-
* import {
|
|
379
|
+
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
380
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
381
|
+
* import { http } from "viem"
|
|
236
382
|
*
|
|
237
383
|
* const client = createPublicClient({
|
|
238
|
-
* chain:
|
|
384
|
+
* chain: cheesecake,
|
|
239
385
|
* transport: http(),
|
|
240
386
|
* })
|
|
241
387
|
*/
|
|
242
388
|
declare function createPublicClient<transport extends Transport, chain extends Chain | undefined = undefined, accountOrAddress extends Account | Address | undefined = undefined, rpcSchema extends RpcSchema | undefined = ArkivRpcSchema>(parameters: PublicClientConfig<transport, chain, accountOrAddress, rpcSchema>): PublicArkivClient<transport, chain, ParseAccount<accountOrAddress>, rpcSchema>;
|
|
243
389
|
//#endregion
|
|
244
390
|
//#region src/clients/decorators/arkivWallet.d.ts
|
|
245
|
-
type WalletArkivActions<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = Pick<PublicActions<transport, chain, account>, "waitForTransactionReceipt" | "call"> & Pick<WalletActions<chain, account>, "addChain" | "sendCalls" | "waitForCallsStatus" | "sendTransaction" | "sendRawTransaction" | "signMessage" | "signTransaction"> & {
|
|
391
|
+
type WalletArkivActions<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = Pick<PublicActions<transport, chain, account>, "waitForTransactionReceipt" | "call" | "simulateContract" | "readContract" | "getBlockNumber"> & Pick<WalletActions<chain, account>, "addChain" | "sendCalls" | "waitForCallsStatus" | "sendTransaction" | "sendRawTransaction" | "signMessage" | "signTransaction" | "writeContract"> & {
|
|
246
392
|
/**
|
|
247
393
|
* Creates a new entity.
|
|
248
394
|
*
|
|
249
|
-
* -
|
|
250
|
-
* - JSON-RPC Methods: [`eth_sendRawTransaction`](https://docs.arkiv.network/dev/json-rpc-api/#mutateEntities)
|
|
395
|
+
* - JSON-RPC Methods: `eth_sendRawTransaction`
|
|
251
396
|
*
|
|
252
397
|
* @param data - The entity creation parameters
|
|
253
398
|
* @param txParams - Optional transaction parameters
|
|
254
|
-
* @returns The
|
|
399
|
+
* @returns The new entity's key, the transaction hash, and the block it is expected to
|
|
400
|
+
* expire at. {@link CreateEntityReturnType}
|
|
255
401
|
*
|
|
256
|
-
* @throws {
|
|
257
|
-
*
|
|
258
|
-
* @throws {
|
|
259
|
-
*
|
|
402
|
+
* @throws {InvalidExpiryError} If the expiry exceeds a protocol bound or would leave the
|
|
403
|
+
* entity dead on arrival.
|
|
404
|
+
* @throws {InvalidValueError} If an attribute value does not fit the type it names.
|
|
405
|
+
* @throws {InvalidAttributeNameError} If a name violates the attribute-name grammar.
|
|
260
406
|
*
|
|
261
407
|
* @example
|
|
262
|
-
* import {
|
|
263
|
-
* import {
|
|
408
|
+
* import { createWalletClient, ExpirationTime, jsonToPayload } from "@arkiv-network/sdk"
|
|
409
|
+
* import { i32 } from "@arkiv-network/sdk/attr"
|
|
410
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
411
|
+
* import { http } from "viem"
|
|
412
|
+
* import { privateKeyToAccount } from "viem/accounts"
|
|
264
413
|
*
|
|
265
|
-
* const client =
|
|
266
|
-
*
|
|
414
|
+
* const client = createWalletClient({
|
|
415
|
+
* account: privateKeyToAccount("0x..."),
|
|
416
|
+
* chain: cheesecake,
|
|
267
417
|
* transport: http(),
|
|
268
418
|
* })
|
|
269
|
-
* const { entityKey, txHash } = await client.createEntity({
|
|
270
|
-
* payload:
|
|
271
|
-
*
|
|
272
|
-
*
|
|
419
|
+
* const { entityKey, txHash, expiresAt } = await client.createEntity({
|
|
420
|
+
* payload: jsonToPayload({ entityType: "testType", entityId: "testId" }),
|
|
421
|
+
* contentType: "application/json",
|
|
422
|
+
* attributes: { testKey: "testValue", level: i32(3) },
|
|
423
|
+
* expires: ExpirationTime.fromDays(30),
|
|
273
424
|
* })
|
|
274
|
-
* console.log("entityKey", entityKey)
|
|
275
|
-
* console.log("txHash", txHash)
|
|
276
|
-
* // {
|
|
277
|
-
* // entityKey: "0x123",
|
|
278
|
-
* // txHash: "0x123",
|
|
279
|
-
* // }
|
|
280
425
|
*/
|
|
281
426
|
createEntity: (data: CreateEntityParameters, txParams?: TxParams) => Promise<CreateEntityReturnType>;
|
|
282
427
|
/**
|
|
283
|
-
*
|
|
428
|
+
* Applies a patch to the entity with the given key: sets some fields, unsets others, and leaves
|
|
429
|
+
* everything it does not name alone.
|
|
284
430
|
*
|
|
285
|
-
* -
|
|
286
|
-
* - JSON-RPC Methods: [`eth_sendRawTransaction`](https://docs.arkiv.network/dev/json-rpc-api/#mutateEntities)
|
|
431
|
+
* - JSON-RPC Methods: `eth_sendRawTransaction`
|
|
287
432
|
*
|
|
288
|
-
* @param data - The entity
|
|
433
|
+
* @param data - The entity key and the mutations to apply
|
|
289
434
|
* @param txParams - Optional transaction parameters
|
|
290
|
-
* @returns The
|
|
435
|
+
* @returns The patched entity's key and the transaction hash. {@link PatchEntityReturnType}
|
|
291
436
|
*
|
|
292
|
-
* @throws {
|
|
293
|
-
*
|
|
294
|
-
* @throws {
|
|
295
|
-
*
|
|
437
|
+
* @throws {EmptyPatchError} If the patch has nothing to apply.
|
|
438
|
+
* @throws {ConflictingMutationError} If a name appears in both `set` and `unset`.
|
|
439
|
+
* @throws {InvalidValueError} If an attribute value does not fit the type it names.
|
|
440
|
+
* @throws {InvalidAttributeNameError} If a name violates the attribute-name grammar.
|
|
296
441
|
*
|
|
297
442
|
* @example
|
|
298
|
-
* import { createWalletClient,
|
|
299
|
-
* import {
|
|
443
|
+
* import { createWalletClient, jsonToPayload } from "@arkiv-network/sdk"
|
|
444
|
+
* import { i32 } from "@arkiv-network/sdk/attr"
|
|
445
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
446
|
+
* import { http } from "viem"
|
|
447
|
+
* import { privateKeyToAccount } from "viem/accounts"
|
|
300
448
|
*
|
|
301
449
|
* const client = createWalletClient({
|
|
302
|
-
*
|
|
450
|
+
* account: privateKeyToAccount("0x..."),
|
|
451
|
+
* chain: cheesecake,
|
|
303
452
|
* transport: http(),
|
|
304
453
|
* })
|
|
454
|
+
* // Publish the entity: one attribute changes, one goes away, the payload is replaced.
|
|
455
|
+
* const { txHash } = await client.patchEntity({
|
|
456
|
+
* entityKey,
|
|
457
|
+
* set: { status: "published", revision: i32(2) },
|
|
458
|
+
* unset: ["draft"],
|
|
459
|
+
* payload: jsonToPayload({ title: "Hello" }),
|
|
460
|
+
* })
|
|
305
461
|
*/
|
|
306
|
-
|
|
462
|
+
patchEntity: (data: PatchEntityParameters, txParams?: TxParams) => Promise<PatchEntityReturnType>;
|
|
307
463
|
/**
|
|
308
464
|
* Deletes the entity with the given key.
|
|
309
465
|
*
|
|
310
|
-
* -
|
|
311
|
-
* - JSON-RPC Methods: [`eth_sendRawTransaction`](https://docs.arkiv.network/dev/json-rpc-api/#mutateEntities)
|
|
466
|
+
* - JSON-RPC Methods: `eth_sendRawTransaction`
|
|
312
467
|
*
|
|
313
468
|
* @param data - The entity deletion parameters
|
|
314
469
|
* @param txParams - Optional transaction parameters
|
|
315
|
-
* @returns The deleted entity
|
|
470
|
+
* @returns The deleted entity's key and the transaction hash. {@link DeleteEntityReturnType}
|
|
316
471
|
*
|
|
317
472
|
* @example
|
|
318
|
-
* import { createWalletClient
|
|
319
|
-
* import {
|
|
473
|
+
* import { createWalletClient } from "@arkiv-network/sdk"
|
|
474
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
475
|
+
* import { http } from "viem"
|
|
476
|
+
* import { privateKeyToAccount } from "viem/accounts"
|
|
320
477
|
*
|
|
321
478
|
* const client = createWalletClient({
|
|
322
|
-
*
|
|
479
|
+
* account: privateKeyToAccount("0x..."),
|
|
480
|
+
* chain: cheesecake,
|
|
323
481
|
* transport: http(),
|
|
324
482
|
* })
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
* console.log("txHash", txHash)
|
|
328
|
-
* // {
|
|
329
|
-
* // entityKey: "0x123",
|
|
330
|
-
* // txHash: "0x123",
|
|
331
|
-
* // }
|
|
483
|
+
* // entityKey is the bytes32 key returned by createEntity.
|
|
484
|
+
* const { txHash } = await client.deleteEntity({ entityKey })
|
|
332
485
|
*/
|
|
333
486
|
deleteEntity: (data: DeleteEntityParameters, txParams?: TxParams) => Promise<DeleteEntityReturnType>;
|
|
334
487
|
/**
|
|
335
|
-
*
|
|
488
|
+
* Sets a new expiry on the entity with the given key.
|
|
336
489
|
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
490
|
+
* The new lifetime is resolved the same way a create's is: a duration counts from now rather
|
|
491
|
+
* than adding to what the entity has left, and `atBlock` / `atDate` pin an absolute deadline.
|
|
492
|
+
* The engine rejects an extension that would not move the expiry later.
|
|
339
493
|
*
|
|
340
|
-
*
|
|
494
|
+
* - JSON-RPC Methods: `eth_sendRawTransaction`
|
|
495
|
+
*
|
|
496
|
+
* @param data - The entity key and its new lifetime
|
|
341
497
|
* @param txParams - Optional transaction parameters
|
|
342
|
-
* @returns The
|
|
498
|
+
* @returns The entity's key, the transaction hash, and the block it is now expected to expire
|
|
499
|
+
* at. {@link ExtendEntityReturnType}
|
|
343
500
|
*
|
|
344
|
-
* @throws {
|
|
345
|
-
*
|
|
501
|
+
* @throws {InvalidExpiryError} If the expiry is malformed, exceeds a protocol bound, or would
|
|
502
|
+
* leave the entity dead on arrival.
|
|
346
503
|
*
|
|
347
504
|
* @example
|
|
348
|
-
* import { createWalletClient,
|
|
349
|
-
* import {
|
|
505
|
+
* import { createWalletClient, ExpirationTime } from "@arkiv-network/sdk"
|
|
506
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
507
|
+
* import { http } from "viem"
|
|
508
|
+
* import { privateKeyToAccount } from "viem/accounts"
|
|
350
509
|
*
|
|
351
510
|
* const client = createWalletClient({
|
|
352
|
-
*
|
|
511
|
+
* account: privateKeyToAccount("0x..."),
|
|
512
|
+
* chain: cheesecake,
|
|
353
513
|
* transport: http(),
|
|
354
514
|
* })
|
|
355
|
-
* const {
|
|
356
|
-
*
|
|
515
|
+
* const { txHash, expiresAt } = await client.extendEntity({
|
|
516
|
+
* entityKey,
|
|
517
|
+
* expires: ExpirationTime.fromDays(30),
|
|
357
518
|
* })
|
|
358
|
-
* console.log("entityKey", entityKey)
|
|
359
|
-
* console.log("txHash", txHash)
|
|
360
|
-
* // {
|
|
361
|
-
* // entityKey: "0x123",
|
|
362
|
-
* // txHash: "0x123",
|
|
363
|
-
* // }
|
|
364
519
|
*/
|
|
365
520
|
extendEntity: (data: ExtendEntityParameters, txParams?: TxParams) => Promise<ExtendEntityReturnType>;
|
|
366
521
|
/**
|
|
367
|
-
*
|
|
522
|
+
* Hands the entity with the given key to a new owner.
|
|
368
523
|
*
|
|
369
|
-
* -
|
|
370
|
-
* - JSON-RPC Methods: [`eth_sendRawTransaction`](https://docs.arkiv.network/dev/json-rpc-api/#mutateEntities)
|
|
524
|
+
* - JSON-RPC Methods: `eth_sendRawTransaction`
|
|
371
525
|
*
|
|
372
526
|
* @param data - The ownership change parameters
|
|
373
527
|
* @param txParams - Optional transaction parameters
|
|
374
|
-
* @returns The entity
|
|
528
|
+
* @returns The entity's key and the transaction hash. {@link ChangeOwnershipReturnType}
|
|
375
529
|
*/
|
|
376
530
|
changeOwnership: (data: ChangeOwnershipParameters, txParams?: TxParams) => Promise<ChangeOwnershipReturnType>;
|
|
377
531
|
/**
|
|
378
|
-
*
|
|
532
|
+
* Applies a batch of entity operations — creates, patches, deletes, extensions and ownership
|
|
533
|
+
* transfers — in one transaction.
|
|
379
534
|
*
|
|
380
|
-
* -
|
|
381
|
-
* - JSON-RPC Methods: [`eth_sendRawTransaction`](https://docs.arkiv.network/dev/json-rpc-api/#mutateEntities)
|
|
535
|
+
* - JSON-RPC Methods: `eth_sendRawTransaction`
|
|
382
536
|
*
|
|
383
|
-
*
|
|
537
|
+
* Every operation lands in one transaction, so the whole batch applies or none of it does.
|
|
538
|
+
* At least one operation is required.
|
|
539
|
+
*
|
|
540
|
+
* @param data - The batch parameters (creates, patches, deletes, extensions, ownershipChanges)
|
|
384
541
|
* @param txParams - Optional transaction parameters
|
|
385
|
-
* @returns The
|
|
542
|
+
* @returns The transaction hash, plus the keys touched by each kind of operation.
|
|
543
|
+
* {@link ExecuteBatchReturnType}
|
|
386
544
|
*
|
|
387
|
-
* @throws {
|
|
388
|
-
*
|
|
389
|
-
* @throws {
|
|
390
|
-
* integer.
|
|
545
|
+
* @throws {InvalidExpiryError} If an expiry exceeds a protocol bound or would leave the entity
|
|
546
|
+
* dead on arrival.
|
|
547
|
+
* @throws {InvalidValueError} If an attribute value does not fit the type it names.
|
|
391
548
|
*
|
|
392
549
|
* @example
|
|
393
|
-
* import { createWalletClient,
|
|
394
|
-
* import {
|
|
550
|
+
* import { createWalletClient, ExpirationTime, jsonToPayload } from "@arkiv-network/sdk"
|
|
551
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
552
|
+
* import { http } from "viem"
|
|
553
|
+
* import { privateKeyToAccount } from "viem/accounts"
|
|
395
554
|
*
|
|
396
555
|
* const client = createWalletClient({
|
|
397
|
-
*
|
|
556
|
+
* account: privateKeyToAccount("0x..."),
|
|
557
|
+
* chain: cheesecake,
|
|
398
558
|
* transport: http(),
|
|
399
559
|
* })
|
|
400
|
-
* const {
|
|
560
|
+
* const { txHash, createdEntities } = await client.executeBatch({
|
|
401
561
|
* creates: [{
|
|
402
|
-
* payload:
|
|
403
|
-
*
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
* updates: [{
|
|
407
|
-
* entityKey: "0x123",
|
|
408
|
-
* payload: toBytes(JSON.stringify({ entity: { entityType: "testType", entityId: "testId" } })),
|
|
409
|
-
* attributes: [{ key: "testKey", value: "testValue" }],
|
|
410
|
-
* expiresIn: 1000,
|
|
411
|
-
* }],
|
|
412
|
-
* deletes: [{
|
|
413
|
-
* entityKey: "0x321",
|
|
562
|
+
* payload: jsonToPayload({ entityType: "testType", entityId: "testId" }),
|
|
563
|
+
* contentType: "application/json",
|
|
564
|
+
* attributes: { testKey: "testValue" },
|
|
565
|
+
* expires: ExpirationTime.fromDays(30),
|
|
414
566
|
* }],
|
|
567
|
+
* patches: [{ entityKey: keyToRevise, set: { status: "archived" }, unset: ["draft"] }],
|
|
568
|
+
* deletes: [{ entityKey: staleKey }],
|
|
415
569
|
* extensions: [{
|
|
416
|
-
* entityKey:
|
|
417
|
-
*
|
|
570
|
+
* entityKey: keyToKeepAlive,
|
|
571
|
+
* expires: ExpirationTime.atBlock(1_200_000n),
|
|
418
572
|
* }],
|
|
573
|
+
* ownershipChanges: [{ entityKey: keyToHandOver, newOwner }],
|
|
419
574
|
* })
|
|
420
|
-
* console.log("entityKey", entityKey)
|
|
421
|
-
* console.log("txHash", txHash)
|
|
422
|
-
* // {
|
|
423
|
-
* // entityKey: "0x123",
|
|
424
|
-
* // txHash: "0x123",
|
|
425
|
-
* // }
|
|
426
575
|
*/
|
|
427
|
-
|
|
576
|
+
executeBatch: (data: ExecuteBatchParameters, txParams?: TxParams) => Promise<ExecuteBatchReturnType>;
|
|
577
|
+
/**
|
|
578
|
+
* The advanced path: build, send, ping and read mutation results as separate steps, each
|
|
579
|
+
* costing the minimum number of RPC calls. Use it when you are optimising your RPC budget;
|
|
580
|
+
* the everyday actions above remain the right default. {@link WalletAdvancedActions}
|
|
581
|
+
*
|
|
582
|
+
* @example
|
|
583
|
+
* const { txHash } = await client.advanced.sendMutation({ creates: [entity] }) // no waiting
|
|
584
|
+
* // ... later, one eth_getTransactionReceipt on your own schedule:
|
|
585
|
+
* const result = await client.advanced.getMutationResult(txHash)
|
|
586
|
+
* if (result.status === "success") console.log(result.createdEntities)
|
|
587
|
+
*/
|
|
588
|
+
advanced: WalletAdvancedActions;
|
|
428
589
|
};
|
|
429
590
|
//#endregion
|
|
430
591
|
//#region src/clients/createWalletClient.d.ts
|
|
431
592
|
type WalletArkivClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined, rpcSchema extends RpcSchema | undefined = ArkivRpcSchema> = Prettify<Client<transport, chain, account, rpcSchema, WalletArkivActions<transport, chain, account>>>;
|
|
432
593
|
/**
|
|
433
|
-
* Creates a
|
|
434
|
-
*
|
|
435
|
-
* - Docs: https://docs.arkiv.network/ts-sdk/clients/public
|
|
594
|
+
* Creates a Wallet Client with a given [Transport](https://viem.sh/docs/clients/intro) configured
|
|
595
|
+
* for a [Chain](https://viem.sh/docs/chains/introduction) and an account.
|
|
436
596
|
*
|
|
437
|
-
* A
|
|
597
|
+
* A Wallet Client signs and sends transactions, so it carries an `account` and exposes everything
|
|
598
|
+
* that mutates state — `createEntity`, `patchEntity`, `deleteEntity`, `extendEntity`,
|
|
599
|
+
* `changeOwnership` and `executeBatch` — on top of the read actions a Public Client has.
|
|
438
600
|
*
|
|
439
601
|
* @param parameters - Configuration object for the wallet client (chain, transport, account, etc.)
|
|
440
|
-
* @returns
|
|
602
|
+
* @returns An Arkiv Wallet Client. {@link WalletArkivClient}
|
|
441
603
|
*
|
|
442
604
|
* @example
|
|
443
|
-
* import {
|
|
444
|
-
* import {
|
|
605
|
+
* import { createWalletClient } from "@arkiv-network/sdk"
|
|
606
|
+
* import { cheesecake } from "@arkiv-network/sdk/chains"
|
|
607
|
+
* import { http } from "viem"
|
|
608
|
+
* import { privateKeyToAccount } from "viem/accounts"
|
|
445
609
|
*
|
|
446
|
-
* const client =
|
|
447
|
-
* chain:
|
|
610
|
+
* const client = createWalletClient({
|
|
611
|
+
* chain: cheesecake,
|
|
448
612
|
* transport: http(),
|
|
613
|
+
* account: privateKeyToAccount("0x..."),
|
|
449
614
|
* })
|
|
450
615
|
*/
|
|
451
616
|
declare function createWalletClient<transport extends Transport, chain extends Chain | undefined = undefined, accountOrAddress extends Account | Address | undefined = undefined, rpcSchema extends RpcSchema | undefined = ArkivRpcSchema>(parameters: WalletClientConfig<transport, chain, accountOrAddress, rpcSchema>): WalletArkivClient<transport, chain, ParseAccount<accountOrAddress>, rpcSchema>;
|
|
452
617
|
//#endregion
|
|
453
618
|
//#region src/errors.d.ts
|
|
454
619
|
declare class EntityMutationError extends Error {
|
|
455
|
-
constructor(message: string
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
constructor(expiresIn: unknown);
|
|
459
|
-
}
|
|
460
|
-
declare class InvalidAttributeError extends Error {
|
|
461
|
-
constructor(key: string, value: number);
|
|
620
|
+
constructor(message: string, options?: {
|
|
621
|
+
cause?: unknown;
|
|
622
|
+
});
|
|
462
623
|
}
|
|
463
624
|
declare class NoMoreResultsError extends Error {
|
|
464
625
|
constructor();
|
|
465
626
|
}
|
|
466
|
-
declare class NoCursorOrLimitError extends Error {
|
|
467
|
-
constructor();
|
|
468
|
-
}
|
|
469
627
|
declare class NoEntityFoundError extends Error {
|
|
470
|
-
|
|
628
|
+
/** The key that matched nothing, when the lookup was by key. */
|
|
629
|
+
readonly entityKey: string | undefined;
|
|
630
|
+
constructor(entityKey?: string);
|
|
631
|
+
}
|
|
632
|
+
declare class EmptyPatchError extends Error {
|
|
633
|
+
readonly entityKey: string;
|
|
634
|
+
constructor(entityKey: string);
|
|
635
|
+
}
|
|
636
|
+
declare class InvalidContentTypeError extends Error {
|
|
637
|
+
constructor(contentType: string);
|
|
471
638
|
}
|
|
472
639
|
//#endregion
|
|
473
640
|
//#region src/utils/chains.d.ts
|
|
@@ -479,5 +646,5 @@ declare class NoEntityFoundError extends Error {
|
|
|
479
646
|
*/
|
|
480
647
|
declare function chainFromName(name: string): Chain;
|
|
481
648
|
//#endregion
|
|
482
|
-
export { type ArkivClient, ArkivRpcSchema,
|
|
649
|
+
export { AddrValue, AnyArkivValue, type ArkivClient, ArkivRpcSchema, ArkivValue, AttributeInputs, AttributeSchema, Attributes, BoolValue, BuildMutationOptions, BuildMutationReturnType, Bytes32Value, BytesValue, ChangeOwnershipParameters, ChangeOwnershipReturnType, ConflictingMutationError, CreateEntityParameters, CreateEntityReturnType, CreationFlags, DECIMAL_SCALE, DECIMAL_UNIT, type DeadlineOptions, DecValue, DeleteEntityParameters, DeleteEntityReturnType, ENTITY_EVENTS_ABI, EmptyPatchError, EncodedExpiry, Entity, EntityCreatedEvent, EntityDeletedEvent, EntityEvent, EntityEventContext, EntityEventName, EntityFields, EntityMutationError, type EntityMutationOps, EntityPatchedEvent, ExecuteBatchParameters, ExecuteBatchReturnType, ExpirationTime, Expiry, ExpiryContext, ExpiryExtendedEvent, ExtendEntityParameters, ExtendEntityReturnType, GetBlockTimingReturnType, GetMutationResultReturnType, I32Value, I32_MAX, I32_MIN, InvalidAttributeNameError, InvalidContentTypeError, InvalidCreationFlagsError, InvalidExpiryError, InvalidSaltError, InvalidValueError, KeyValue, Lifetime, MAX_ATTRIBUTES, MAX_EXPIRES_AT, MAX_NAME_BYTES, MAX_PAYLOAD_BYTES, MAX_SALT, MAX_STRING_BYTES, MimeType, MissingValueError, type MutationEvents, MutationResult, NO_SALT, NoEntityFoundError, NoMoreResultsError, NoRandomSourceError, Operation, OperationType, OwnershipTransferredEvent, PatchEntityParameters, PatchEntityReturnType, PingTransactionReturnType, PredictEntityKeysParameters, PredictEntityKeysReturnType, PredictedEntityKey, type PublicAdvancedActions, type PublicArkivActions, type PublicArkivClient, QueryOptions, QueryReturnType, ResolvedCreationFlags, ResolvedExpiry, RpcAttribute, RpcAttributeSchemaEntry, RpcCreationFlags, RpcEntity, RpcQueryOptions, RpcSelect, SaltInput, SendMutationOptions, SendMutationReturnType, StrValue, TooManyAttributesError, TxParams, TypeTag, U256Value, U256_MAX, U64Value, U64_MAX, UnknownAttributeTypeError, UntypedValueError, UserTypeTag, ValueInput, type WalletAdvancedActions, type WalletArkivActions, type WalletArkivClient, WatchEntityEventsParameters, addr, bool, buildEntityOperations, buildMutation, bytes32, chainFromName, collectMutationEvents, createPublicClient, createWalletClient, dec, decFromUnits, decUnits, decodeCreationFlags, decodeMutationResult, encodeCreationFlags, getMutationResult, i32, isArkivValue, isValidAttributeName, jsonToPayload, key, mutationNeedsBlockNumber, pingTransaction, predictEntityKey, randomSalt, resolveExpiry, sendMutation, str, stringToPayload, toBlocks, toValue, u256, u64, validateAttributeName };
|
|
483
650
|
//# sourceMappingURL=index.d.ts.map
|