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