@arkiv-network/sdk 0.8.1-dev.1 → 0.9.0-next.2
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 +180 -61
- package/dist/chains/index.d.ts +17 -17
- package/dist/changeOwnership-Cy9gfyjN.d.cts +1160 -0
- package/dist/changeOwnership-Cy9gfyjN.d.cts.map +1 -0
- package/dist/changeOwnership-gXf-lBqI.d.ts +1160 -0
- package/dist/changeOwnership-gXf-lBqI.d.ts.map +1 -0
- package/dist/entity/index.cjs +4 -10
- package/dist/entity/index.d.cts +3 -3
- package/dist/entity/index.d.ts +3 -3
- package/dist/entity/index.js +3 -4
- package/dist/entity-BM1unrQf.cjs +41 -0
- package/dist/{entity-DJ0Gml9c.cjs → entity-BgaFJSaV.cjs} +4 -4
- package/dist/entity-CFAI1KyG.js +36 -0
- package/dist/entity-CFAI1KyG.js.map +1 -0
- package/dist/{entity-CniBgBSd.js → entity-CGqx_AU0.js} +4 -4
- package/dist/entity-CGqx_AU0.js.map +1 -0
- package/dist/{payload-AfUfSctb.d.ts → expirationTime-C7PZK49K.d.ts} +8 -37
- package/dist/expirationTime-C7PZK49K.d.ts.map +1 -0
- package/dist/expirationTime-CkIGNAg8.cjs +140 -0
- package/dist/{payload-D167BlJR.d.cts → expirationTime-DOB8V4B8.d.cts} +8 -37
- package/dist/expirationTime-DOB8V4B8.d.cts.map +1 -0
- package/dist/{expiry-Cgdb_dbq.js → expirationTime-UKPuA-LM.js} +62 -27
- package/dist/expirationTime-UKPuA-LM.js.map +1 -0
- package/dist/expiry-B48I-yTA.d.cts +40 -0
- package/dist/expiry-B48I-yTA.d.cts.map +1 -0
- package/dist/expiry-S2PUL8Hg.d.ts +40 -0
- package/dist/expiry-S2PUL8Hg.d.ts.map +1 -0
- package/dist/index-C-mMF5WZ.d.cts +735 -0
- package/dist/index-C-mMF5WZ.d.cts.map +1 -0
- package/dist/{index-BkqSnGJH.d.ts → index-C4zZqJ9S.d.ts} +5 -27
- package/dist/index-C4zZqJ9S.d.ts.map +1 -0
- package/dist/{index-CLhsFyVH.d.cts → index-CcVWYB6v.d.cts} +5 -27
- package/dist/index-CcVWYB6v.d.cts.map +1 -0
- package/dist/index-DCx2XC6S.d.ts +489 -0
- package/dist/index-DCx2XC6S.d.ts.map +1 -0
- package/dist/index-DLb7BfIw.d.ts +735 -0
- package/dist/index-DLb7BfIw.d.ts.map +1 -0
- package/dist/index-DzriOUm8.d.cts +489 -0
- package/dist/index-DzriOUm8.d.cts.map +1 -0
- package/dist/index.cjs +162 -146
- package/dist/index.d.cts +180 -133
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +180 -133
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +93 -83
- package/dist/index.js.map +1 -1
- package/dist/params-BuIrJA9a.cjs +45 -0
- package/dist/params-DDJOnsNi.js +22 -0
- package/dist/params-DDJOnsNi.js.map +1 -0
- package/dist/query/index.cjs +9 -4
- package/dist/query/index.d.cts +6 -6
- package/dist/query/index.d.ts +6 -6
- package/dist/query/index.js +4 -5
- package/dist/query-D0KtuFh2.cjs +1625 -0
- package/dist/query-DpRDozmj.js +1417 -0
- package/dist/query-DpRDozmj.js.map +1 -0
- package/dist/schema/index.cjs +46 -0
- package/dist/schema/index.d.cts +2 -0
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/index.js +3 -0
- package/dist/{attr-BXTkpnoc.cjs → schema-B9AyXcgU.cjs} +513 -246
- package/dist/{attr-tmyREHtw.js → schema-DY4sqehl.js} +427 -244
- package/dist/schema-DY4sqehl.js.map +1 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +5 -5
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.js +1 -1
- package/dist/utils/index.cjs +3 -5
- package/dist/utils/index.d.cts +3 -3
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/index.js +3 -3
- package/package.json +9 -12
- package/src/actions/public/getEntity.test.ts +69 -0
- package/src/actions/public/getEntity.ts +34 -20
- package/src/actions/public/predictEntityKeys.ts +8 -7
- package/src/actions/public/query.test.ts +58 -0
- package/src/actions/public/query.ts +41 -13
- package/src/actions/wallet/createEntity.ts +34 -63
- package/src/actions/wallet/executeBatch.test.ts +38 -0
- package/src/actions/wallet/executeBatch.ts +26 -9
- package/src/actions/wallet/extendEntity.ts +9 -8
- package/src/actions/wallet/patchEntity.ts +43 -52
- package/src/clients/createPublicClient.test.ts +10 -2
- package/src/clients/createWalletClient.ts +4 -1
- package/src/clients/decorators/arkivPublic.ts +123 -80
- package/src/clients/decorators/arkivWallet.ts +113 -65
- package/src/entity/create.test.ts +25 -21
- package/src/entity/expiry.ts +8 -6
- package/src/entity/flags.ts +1 -1
- package/src/entity/index.ts +2 -4
- package/src/entity/key.ts +3 -3
- package/src/entity/operations.ts +1 -1
- package/src/errors.ts +2 -11
- package/src/index.ts +18 -6
- package/src/query/builderBase.ts +166 -0
- package/src/query/countBuilder.test.ts +91 -0
- package/src/query/countBuilder.ts +67 -0
- package/src/query/engine.ts +9 -3
- package/src/query/errors.ts +24 -14
- package/src/query/expression.test.ts +129 -21
- package/src/query/expression.ts +323 -94
- package/src/query/index.ts +26 -4
- package/src/query/injection.test.ts +5 -11
- package/src/query/queryBuilder.test.ts +467 -58
- package/src/query/queryBuilder.ts +191 -98
- package/src/query/queryResult.ts +35 -9
- package/src/query/selection.test.ts +278 -24
- package/src/query/selection.ts +427 -86
- package/src/schema/attributes.test.ts +266 -0
- package/src/schema/attributes.ts +212 -0
- package/src/{attr → schema}/codec.test.ts +37 -5
- package/src/{attr → schema}/codec.ts +40 -11
- package/src/schema/column.ts +193 -0
- package/src/{attr → schema}/errors.ts +67 -10
- package/src/schema/index.ts +76 -0
- package/src/{attr → schema}/names.ts +4 -2
- package/src/schema/schema.test.ts +171 -0
- package/src/schema/schema.ts +250 -0
- package/src/{attr → schema}/types.ts +36 -30
- package/src/{attr → schema}/values.test.ts +62 -3
- package/src/{attr → schema}/values.ts +246 -65
- package/src/types/entity.test.ts +1 -44
- package/src/types/entity.ts +9 -55
- package/src/types/events.ts +1 -1
- package/src/types/index.ts +11 -4
- package/src/types/rpcSchema.ts +22 -16
- package/src/utils/arkivTransactions.test.ts +356 -116
- package/src/utils/arkivTransactions.ts +30 -38
- package/src/utils/entities.ts +10 -9
- package/src/utils/expirationTime.ts +5 -5
- package/src/utils/index.ts +0 -1
- package/src/utils/logger.test.ts +45 -0
- package/src/utils/logger.ts +5 -39
- package/src/utils/revert.test.ts +25 -0
- package/src/utils/revert.ts +28 -3
- package/dist/attr/index.cjs +0 -34
- package/dist/attr/index.d.cts +0 -2
- package/dist/attr/index.d.ts +0 -2
- package/dist/attr/index.js +0 -3
- package/dist/attr-tmyREHtw.js.map +0 -1
- package/dist/entity-B0t6sN7F.cjs +0 -71
- package/dist/entity-BIp_df9u.js +0 -67
- package/dist/entity-BIp_df9u.js.map +0 -1
- package/dist/entity-CniBgBSd.js.map +0 -1
- package/dist/expiry-BxOlvVWC.d.ts +0 -79
- package/dist/expiry-BxOlvVWC.d.ts.map +0 -1
- package/dist/expiry-CG9GhVXv.cjs +0 -135
- package/dist/expiry-Cgdb_dbq.js.map +0 -1
- package/dist/expiry-DRV29F1r.d.cts +0 -79
- package/dist/expiry-DRV29F1r.d.cts.map +0 -1
- package/dist/flags-DCD26uhe.cjs +0 -43
- package/dist/flags-DUT2gHEU.js +0 -33
- package/dist/flags-DUT2gHEU.js.map +0 -1
- package/dist/index-BkqSnGJH.d.ts.map +0 -1
- package/dist/index-C7fbakoI.d.cts +0 -278
- package/dist/index-C7fbakoI.d.cts.map +0 -1
- package/dist/index-CIcHPx2j.d.cts +0 -424
- package/dist/index-CIcHPx2j.d.cts.map +0 -1
- package/dist/index-CLhsFyVH.d.cts.map +0 -1
- package/dist/index-Cd2aaWme.d.ts +0 -424
- package/dist/index-Cd2aaWme.d.ts.map +0 -1
- package/dist/index-Cq6fa8AI.d.ts +0 -278
- package/dist/index-Cq6fa8AI.d.ts.map +0 -1
- package/dist/index-DaNeJUw8.d.ts +0 -955
- package/dist/index-DaNeJUw8.d.ts.map +0 -1
- package/dist/index-Dv16LO2s.d.cts +0 -955
- package/dist/index-Dv16LO2s.d.cts.map +0 -1
- package/dist/payload-AfUfSctb.d.ts.map +0 -1
- package/dist/payload-D167BlJR.d.cts.map +0 -1
- package/dist/payload-DE7wMztL.js +0 -92
- package/dist/payload-DE7wMztL.js.map +0 -1
- package/dist/payload-DqFweqiO.cjs +0 -108
- package/dist/query-9oojUdM7.cjs +0 -1128
- package/dist/query-Ber-lOJQ.js +0 -968
- package/dist/query-Ber-lOJQ.js.map +0 -1
- package/src/actions/public/getEntityCount.ts +0 -10
- package/src/attr/attributes.test.ts +0 -120
- package/src/attr/attributes.ts +0 -196
- package/src/attr/index.ts +0 -50
- package/src/types/mimeTypes.ts +0 -27
- package/src/utils/compression.test.ts +0 -32
- package/src/utils/compression.ts +0 -102
- package/src/utils/payload.ts +0 -36
- /package/src/{attr → schema}/decimal.ts +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
4
|
-
import { C as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { a as predictEntityKey, c as ResolvedCreationFlags, d as InvalidCreationFlagsError, f as InvalidExpiryError, i as SaltInput, l as ENTITY_EVENTS_ABI, m as NoRandomSourceError, n as MAX_SALT, o as randomSalt, p as InvalidSaltError, r as NO_SALT, s as CreationFlags, t as MAX_EXPIRES_AT, u as EntityEventName } from "./index-C4zZqJ9S.js";
|
|
2
|
+
import { n as Lifetime, t as Expiry } from "./expiry-S2PUL8Hg.js";
|
|
3
|
+
import { A as FullRow, At as ArkivClient, B as Selection, C as OwnershipTransferredEvent, Dt as PredictEntityKeysReturnType, E as QueryRow, Et as PredictEntityKeysParameters, F as ResultOf, Ft as RpcEntity, H as SelectionOf, I as Row, It as RpcQueryOptions, J as Entity, L as SYSTEM_FIELDS, Lt as RpcSelect, M as NonEmptySelection, Mt as RpcAttribute, N as PartialRow, Nt as RpcAttributeSchemaEntry, O as DynamicSelection, Ot as PredictedEntityKey, Pt as RpcCreationFlags, R as SelectArg, S as ExpiryExtendedEvent, T as QueryReturnType, U as SystemField, Y as EntityFields, Z as AttributeRef, _ as EntityCreatedEvent, a as ExecuteBatchReturnType, b as EntityEventContext, c as PatchEntityReturnType, d as DeleteEntityParameters, f as DeleteEntityReturnType, g as WatchEntityEventsParameters, h as CreateEntityReturnType, i as ExecuteBatchParameters, j as KnownSystemFields, jt as ArkivRpcSchema, k as FullEntity, kt as GetBlockTimingReturnType, l as ExtendEntityParameters, m as CreateEntityParameters, n as ChangeOwnershipReturnType, nt as Expression, o as PatchEntityChanges, p as CreateEntityOptions, r as TxParams, s as PatchEntityParameters, st as SchemaRef, t as ChangeOwnershipParameters, u as ExtendEntityReturnType, v as EntityDeletedEvent, w as QueryOptions, x as EntityPatchedEvent, y as EntityEvent, z as Selected } from "./changeOwnership-gXf-lBqI.js";
|
|
4
|
+
import { $ as u256, A as describeColumns, B as U64_MAX, C as IndexedColumnName, D as SCHEMA_ATTRIBUTE, E as PatchEntityValues, F as I32_MIN, G as bytes32, H as addr, I as MAX_BYTES_LENGTH, J as decUnits, K as dec, L as MAX_STRING_BYTES, M as lookupColumn, N as BareOf, O as Schema, P as I32_MAX, Q as toValue, R as TagOf, S as CreateEntityValues, T as OptionalColumnName, U as bool, V as ValueInput, W as bytes, X as key, Y as i32, Z as str, _ as Attributes, _t as TypeTag, a as EntityTooLargeError, at as AddrValue, b as Columns, bt as ValueOf, c as MissingValueError, ct as Bytes32Value, d as TooManyAttributesError, dt as I32Value, et as u64, f as UnknownAttributeTypeError, ft as INDEXED_FLAG, g as AttributeSchema, gt as StrValue, h as DECIMAL_UNIT, ht as KeyValue, i as ConflictingMutationError, it as isColumn, j as isSchema, k as defineSchema, l as SchemaDefinitionError, lt as BytesValue, m as DECIMAL_SCALE, mt as IndexableValue, n as isValidAttributeName, nt as Column, o as InvalidAttributeNameError, ot as ArkivValue, p as UntypedValueError, pt as IndexableTypeTag, q as decFromUnits, r as validateAttributeName, rt as ValueArgument, s as InvalidValueError, st as BoolValue, t as MAX_NAME_BYTES, tt as AnyColumn, u as SchemaMismatchError, ut as DecValue, v as MAX_ENTITY_BYTES, vt as U256Value, w as MAX_ATTRIBUTES, x as ColumnsOf, xt as isArkivValue, y as ColumnInput, yt as U64Value, z as U256_MAX } from "./index-DLb7BfIw.js";
|
|
5
|
+
import { d as QueryResult, f as CountQueryBuilder, l as FromOptions, p as QueryBuilderBase, u as SelectQueryBuilder } from "./index-DCx2XC6S.js";
|
|
6
|
+
import { n as ExpirationTime, t as DeadlineOptions } from "./expirationTime-C7PZK49K.js";
|
|
7
7
|
import { Account, Address, Chain, Client, Hex, ParseAccount, Prettify, PublicActions, PublicClientConfig, RpcSchema, Transport, WalletActions, WalletClientConfig } from "viem";
|
|
8
8
|
|
|
9
9
|
//#region src/clients/decorators/arkivPublic.d.ts
|
|
@@ -12,14 +12,21 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
12
12
|
/**
|
|
13
13
|
* Returns the entity with the given key.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* Given a schema, it is read through it: the result is a flat row of every entity field and
|
|
16
|
+
* every column, each typed as the schema declares and checked against it.
|
|
17
|
+
*
|
|
18
|
+
* - JSON-RPC Methods: `arkiv_getEntity`
|
|
16
19
|
*
|
|
17
20
|
* @param key - The entity key (hex string)
|
|
18
|
-
* @
|
|
21
|
+
* @param schema - Optionally, the schema to read the entity through.
|
|
22
|
+
* @returns The entity with the given key, with every field populated — a {@link FullEntity}, or
|
|
23
|
+
* a {@link FullRow} through a schema.
|
|
19
24
|
*
|
|
20
25
|
* @throws {InvalidValueError} If the key is not 32 bytes.
|
|
21
26
|
* @throws {NoEntityFoundError} If no live entity has that key — it never existed, or it was
|
|
22
27
|
* deleted or has expired.
|
|
28
|
+
* @throws {SchemaMismatchError} If, given a schema, the entity does not fit it.
|
|
29
|
+
* @throws {SchemaDefinitionError} If the schema given was not built with `defineSchema`.
|
|
23
30
|
*
|
|
24
31
|
* @example
|
|
25
32
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
@@ -31,83 +38,115 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
31
38
|
* transport: http(),
|
|
32
39
|
* })
|
|
33
40
|
* const entity = await client.getEntity(entityKey)
|
|
34
|
-
* //
|
|
35
|
-
* // key: "0x9f2c…",
|
|
36
|
-
* // owner: "0xabc…",
|
|
37
|
-
* //
|
|
38
|
-
* //
|
|
39
|
-
* //
|
|
40
|
-
* // expiresAt: 1_297_000n,
|
|
41
|
+
* // {
|
|
42
|
+
* // $key: "0x9f2c…",
|
|
43
|
+
* // $owner: "0xabc…",
|
|
44
|
+
* // $expiresAt: 1_297_000n,
|
|
45
|
+
* // $attributes: { category: { type: "str", value: "docs" } },
|
|
46
|
+
* // ...
|
|
41
47
|
* // }
|
|
48
|
+
*
|
|
49
|
+
* const post = await client.getEntity(entityKey, Posts)
|
|
50
|
+
* // { $key: "0x9f2c…", $owner: "0xabc…", ..., category: { type: "str", value: "docs" }, ... }
|
|
42
51
|
*/
|
|
43
|
-
getEntity:
|
|
52
|
+
getEntity: {
|
|
53
|
+
(key: Hex): Promise<FullEntity>;
|
|
54
|
+
<S extends Schema>(key: Hex, schema: S): Promise<FullRow<S>>;
|
|
55
|
+
};
|
|
44
56
|
/**
|
|
45
57
|
* Returns a SelectQueryBuilder for building and executing queries — the recommended way to
|
|
46
58
|
* read entities. You declare up front which parts of an entity you want returned, so results
|
|
47
59
|
* always contain exactly the data you asked for.
|
|
48
60
|
*
|
|
61
|
+
* The selection names entity fields and attributes side by side, and each result is a flat row.
|
|
62
|
+
* Chain `.from(schema)` to read through a schema: the selection keeps its meaning, but each
|
|
63
|
+
* attribute comes back typed and checked as the schema declares, and `where` may only filter on
|
|
64
|
+
* the schema's indexed columns.
|
|
65
|
+
*
|
|
49
66
|
* - JSON-RPC Methods: `arkiv_query`
|
|
50
67
|
*
|
|
51
68
|
* @param selection - What to include in the results. Omit it (or pass `"*"`) to select everything,
|
|
52
69
|
* or pass an object to select specific parts (at least one field is required). Every part is
|
|
53
|
-
* opt-in, including the
|
|
70
|
+
* opt-in, including the `$key`. The selection is flat — each field maps to a field of the result.
|
|
54
71
|
* {@link SelectArg}
|
|
55
72
|
* @returns A SelectQueryBuilder instance for building and executing queries. {@link SelectQueryBuilder}
|
|
56
73
|
*
|
|
57
74
|
* @example
|
|
58
75
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
59
76
|
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
60
|
-
* import { eq } from "@arkiv-network/sdk/query"
|
|
77
|
+
* import { and, eq, gt } from "@arkiv-network/sdk/query"
|
|
78
|
+
* import { dec } from "@arkiv-network/sdk/schema"
|
|
61
79
|
* import { http } from "viem"
|
|
62
80
|
*
|
|
63
81
|
* const client = createPublicClient({
|
|
64
82
|
* chain: tiramisu,
|
|
65
83
|
* transport: http(),
|
|
66
84
|
* })
|
|
67
|
-
* //
|
|
68
|
-
* await client
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
85
|
+
* // through a schema — rows typed { $key: Hex; author: AddrValue; title: StrValue }
|
|
86
|
+
* await client
|
|
87
|
+
* .select({ $key: true, author: true, title: true })
|
|
88
|
+
* .from(Posts)
|
|
89
|
+
* .where(and(eq("category", "docs"), gt("score", dec("4.0"))))
|
|
90
|
+
* .fetch()
|
|
91
|
+
* // every field and column
|
|
92
|
+
* await client.select().from(Posts).where(eq("category", "docs")).fetch()
|
|
93
|
+
*
|
|
94
|
+
* // the same selection without a schema — rows typed
|
|
95
|
+
* // { $key: Hex; author: ArkivValue | undefined; title: ArkivValue | undefined }
|
|
96
|
+
* await client.select({ $key: true, author: true, title: true }).where(eq("category", "docs")).fetch()
|
|
76
97
|
*/
|
|
77
98
|
select: {
|
|
78
|
-
/** Select every field. Pass nothing or `"*"`; the returned entities contain all fields. */
|
|
79
|
-
(selection?: "*"): SelectQueryBuilder<FullEntity>;
|
|
80
99
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
100
|
+
* Select every field — and every column through a schema, or the `$attributes` map without
|
|
101
|
+
* one. Pass nothing or `"*"`. The `$attributeSchema` is not included: select it by name.
|
|
102
|
+
*/
|
|
103
|
+
(selection?: "*"): SelectQueryBuilder<"*">;
|
|
104
|
+
/**
|
|
105
|
+
* Pick the fields to return. Set the ones you want to `true` (at least one is required); the
|
|
106
|
+
* result is typed to exactly those fields, so reading anything else is a compile error.
|
|
86
107
|
*
|
|
87
|
-
*
|
|
88
|
-
* `
|
|
108
|
+
* Entity fields start with `$`: `$key`, `$owner`, `$creator`, `$createdAt`, `$updatedAt`,
|
|
109
|
+
* `$expiresAt` and `$creationFlags`. `$attributes` reads every attribute as a map, and
|
|
110
|
+
* `$attributeSchema` their names, types and indexing without the values — a cheap way to find
|
|
111
|
+
* out what entities hold before fetching values that may be too large for one response. Any
|
|
112
|
+
* other name is an attribute, read as a field
|
|
113
|
+
* of its own: untyped without a schema, and through one typed and checked as the column it
|
|
114
|
+
* must be. An attribute name cannot start with `$`, so the two never collide.
|
|
89
115
|
*
|
|
90
116
|
* Pass the selection inline so its fields stay literal `true`. A selection stored in a `let`/
|
|
91
|
-
* `const` variable widens to `boolean
|
|
92
|
-
*
|
|
117
|
+
* `const` variable widens to `boolean`, and one typed {@link SelectArg} is only known at
|
|
118
|
+
* runtime: which fields come back is then decided at runtime, so every field of the result is
|
|
119
|
+
* optional — a {@link PartialRow}. Annotate a stored selection `as const` to keep it narrow.
|
|
93
120
|
*
|
|
94
121
|
* @example
|
|
95
|
-
* client.select({
|
|
96
|
-
* client.select({ key: true,
|
|
97
|
-
* client.select({
|
|
122
|
+
* client.select({ $key: true, title: true }) // { $key: Hex; title: ArkivValue | undefined }
|
|
123
|
+
* client.select({ $key: true, title: true }).from(Posts) // { $key: Hex; title: StrValue }
|
|
124
|
+
* client.select({ $owner: true, $attributes: true }) // { $owner: Hex; $attributes: Attributes }
|
|
125
|
+
* client.select({ $key: true, $attributeSchema: true }) // what do they hold? no values
|
|
98
126
|
*/
|
|
99
|
-
<const S extends
|
|
100
|
-
/**
|
|
101
|
-
* Dynamic selection: accepts a value typed {@link SelectArg} (e.g. built at runtime). The
|
|
102
|
-
* result cannot be narrowed in this case, so the entities are typed as the full entity.
|
|
103
|
-
*/
|
|
104
|
-
(selection: SelectArg): SelectQueryBuilder<FullEntity>;
|
|
127
|
+
<const S extends SelectArg>(selection: S & NonEmptySelection<S> & KnownSystemFields<S>): SelectQueryBuilder<SelectionOf<S>>;
|
|
105
128
|
};
|
|
129
|
+
/**
|
|
130
|
+
* Returns a CountQueryBuilder: counts the entities a query matches, without fetching any of them.
|
|
131
|
+
*
|
|
132
|
+
* It filters exactly as {@link select} does — `.from(schema)`, `.where(...)`, `.ownedBy(...)`,
|
|
133
|
+
* `.createdBy(...)` and `.atBlock(...)` — and `.fetch()` resolves to a `bigint`. To show the total
|
|
134
|
+
* next to a page of rows, use `select(...).withCount()` instead.
|
|
135
|
+
*
|
|
136
|
+
* - JSON-RPC Methods: `arkiv_query`, with the `count` projection
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* const total = await client.count().from(Posts).ownedBy(account.address).fetch()
|
|
140
|
+
* const news = await client.count().from(Posts).where(eq("category", "news")).fetch()
|
|
141
|
+
*/
|
|
142
|
+
count: () => CountQueryBuilder;
|
|
106
143
|
/**
|
|
107
144
|
* Runs one query and returns one page, with no builder in between.
|
|
108
145
|
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
146
|
+
* The selection means what it does in {@link PublicArkivActions.select}, and the results are the
|
|
147
|
+
* same flat rows a query without a schema returns, typed from the selection. Use `select()` to
|
|
148
|
+
* read through a schema. This also takes a raw string as an escape hatch for a query built
|
|
149
|
+
* elsewhere. A raw string
|
|
111
150
|
* goes to the node exactly as written, with none of the name, type or operator checks the
|
|
112
151
|
* expression combinators apply.
|
|
113
152
|
*
|
|
@@ -119,7 +158,7 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
119
158
|
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
120
159
|
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
121
160
|
* import { and, eq, gte } from "@arkiv-network/sdk/query"
|
|
122
|
-
* import { i32 } from "@arkiv-network/sdk/
|
|
161
|
+
* import { i32 } from "@arkiv-network/sdk/schema"
|
|
123
162
|
* import { http } from "viem"
|
|
124
163
|
*
|
|
125
164
|
* const client = createPublicClient({
|
|
@@ -127,32 +166,15 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
127
166
|
* transport: http(),
|
|
128
167
|
* })
|
|
129
168
|
* const page = await client.query(and(eq("category", "docs"), gte("level", i32(10))), {
|
|
130
|
-
* select: { key: true,
|
|
169
|
+
* select: { $key: true, title: true },
|
|
131
170
|
* limit: 100,
|
|
132
171
|
* })
|
|
133
|
-
* // { entities: [
|
|
172
|
+
* // { entities: [{ $key: Hex; title: ArkivValue | undefined }], cursor: "b64:…", blockNumber: 32223n }
|
|
134
173
|
*
|
|
135
174
|
* // The raw form, unchecked:
|
|
136
175
|
* await client.query("category = str('docs') AND level >= i32(10)")
|
|
137
176
|
*/
|
|
138
|
-
query: (query: Expression | string, queryOptions?: QueryOptions) => Promise<QueryReturnType
|
|
139
|
-
/**
|
|
140
|
-
* Returns the total number of entities on the chain.
|
|
141
|
-
* @returns The number of entities currently stored
|
|
142
|
-
*
|
|
143
|
-
* @example
|
|
144
|
-
* import { createPublicClient } from "@arkiv-network/sdk"
|
|
145
|
-
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
146
|
-
* import { http } from "viem"
|
|
147
|
-
*
|
|
148
|
-
* const client = createPublicClient({
|
|
149
|
-
* chain: tiramisu,
|
|
150
|
-
* transport: http(),
|
|
151
|
-
* })
|
|
152
|
-
* const entityCount = await client.getEntityCount()
|
|
153
|
-
* // entityCount = 0
|
|
154
|
-
*/
|
|
155
|
-
getEntityCount: () => Promise<number>;
|
|
177
|
+
query: <const S extends SelectArg = "*">(query: Expression | string, queryOptions?: QueryOptions<S>) => Promise<QueryReturnType<QueryRow<S>>>;
|
|
156
178
|
/**
|
|
157
179
|
* Returns how many entities an account has created — its entity-minting nonce.
|
|
158
180
|
*
|
|
@@ -194,18 +216,19 @@ type PublicArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
194
216
|
* {@link PredictEntityKeysReturnType}
|
|
195
217
|
*
|
|
196
218
|
* @example A batch whose second entity points at its first.
|
|
197
|
-
* import { key } from "@arkiv-network/sdk/
|
|
219
|
+
* import { defineSchema, key, str } from "@arkiv-network/sdk/schema"
|
|
220
|
+
*
|
|
221
|
+
* const Nodes = defineSchema("nodes", { name: str(), parent: key().indexed().optional() })
|
|
198
222
|
*
|
|
199
223
|
* const [parent, child] = await client.predictEntityKeys({ owner: account.address, count: 2 })
|
|
200
224
|
* await wallet.executeBatch({
|
|
201
225
|
* creates: [
|
|
202
|
-
* {
|
|
226
|
+
* { schema: Nodes, values: { name: "root" }, expiration, salt: parent.salt },
|
|
203
227
|
* {
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
228
|
+
* schema: Nodes,
|
|
229
|
+
* values: { name: "leaf", parent: key(parent.key) },
|
|
230
|
+
* expiration,
|
|
207
231
|
* salt: child.salt,
|
|
208
|
-
* attributes: { parent: key(parent.key) },
|
|
209
232
|
* },
|
|
210
233
|
* ],
|
|
211
234
|
* })
|
|
@@ -288,76 +311,90 @@ declare function createPublicClient<transport extends Transport, chain extends C
|
|
|
288
311
|
//#region src/clients/decorators/arkivWallet.d.ts
|
|
289
312
|
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"> & {
|
|
290
313
|
/**
|
|
291
|
-
* Creates a new entity
|
|
314
|
+
* Creates a new entity through a schema: each column becomes an attribute, written with the
|
|
315
|
+
* type and indexed flag the schema declares.
|
|
292
316
|
*
|
|
293
317
|
* - JSON-RPC Methods: `eth_sendRawTransaction`
|
|
294
318
|
*
|
|
295
|
-
* @param
|
|
319
|
+
* @param schema - The schema the entity is written through, built with `defineSchema`.
|
|
320
|
+
* @param values - The entity's values, keyed by column. Required columns must be given;
|
|
321
|
+
* defaulted ones left out are written with their default. {@link CreateEntityValues}
|
|
322
|
+
* @param options - The entity's lifetime, plus its flags and salt. {@link CreateEntityOptions}
|
|
296
323
|
* @param txParams - Optional transaction parameters
|
|
297
|
-
* @returns The new entity's key, the transaction hash, and the block it
|
|
298
|
-
*
|
|
324
|
+
* @returns The new entity's key, the transaction hash, and the block it expires at, as the
|
|
325
|
+
* engine recorded it. {@link CreateEntityReturnType}
|
|
299
326
|
*
|
|
300
327
|
* @throws {InvalidExpiryError} If the expiry exceeds a protocol bound or would leave the
|
|
301
328
|
* entity dead on arrival.
|
|
302
|
-
* @throws {
|
|
303
|
-
* @throws {
|
|
329
|
+
* @throws {SchemaMismatchError} If the values do not fit the schema.
|
|
330
|
+
* @throws {InvalidValueError} If a value does not fit its type.
|
|
331
|
+
* @throws {EntityTooLargeError} If the `bytes` values add up to more than `MAX_ENTITY_BYTES`.
|
|
332
|
+
* @throws {EntityMutationError} If the transaction fails or reverts.
|
|
304
333
|
*
|
|
305
334
|
* @example
|
|
306
|
-
* import { createWalletClient, ExpirationTime
|
|
307
|
-
* import {
|
|
335
|
+
* import { createWalletClient, ExpirationTime } from "@arkiv-network/sdk"
|
|
336
|
+
* import { addr, bytes, dec, defineSchema, str } from "@arkiv-network/sdk/schema"
|
|
308
337
|
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
309
338
|
* import { http } from "viem"
|
|
310
339
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
311
340
|
*
|
|
341
|
+
* const Posts = defineSchema("posts", {
|
|
342
|
+
* author: addr().indexed(),
|
|
343
|
+
* category: str().indexed(),
|
|
344
|
+
* score: dec().indexed(),
|
|
345
|
+
* title: str(),
|
|
346
|
+
* body: bytes(),
|
|
347
|
+
* thumbnail: bytes().optional(),
|
|
348
|
+
* mimeType: str().default("text/markdown"),
|
|
349
|
+
* })
|
|
350
|
+
*
|
|
312
351
|
* const client = createWalletClient({
|
|
313
352
|
* account: privateKeyToAccount("0x..."),
|
|
314
353
|
* chain: tiramisu,
|
|
315
354
|
* transport: http(),
|
|
316
355
|
* })
|
|
317
|
-
* const { entityKey, txHash, expiresAt } = await client.createEntity(
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
*
|
|
356
|
+
* const { entityKey, txHash, expiresAt } = await client.createEntity(
|
|
357
|
+
* Posts,
|
|
358
|
+
* {
|
|
359
|
+
* author: addr(client.account.address),
|
|
360
|
+
* category: "docs",
|
|
361
|
+
* score: dec("4.1"),
|
|
362
|
+
* title: "Cells, not entities",
|
|
363
|
+
* body: new TextEncoder().encode("# Hello"),
|
|
364
|
+
* },
|
|
365
|
+
* { expiration: ExpirationTime.fromDays(30) },
|
|
366
|
+
* )
|
|
323
367
|
*/
|
|
324
|
-
createEntity: (
|
|
368
|
+
createEntity: <S extends Schema>(schema: S, values: CreateEntityValues<S>, options: CreateEntityOptions, txParams?: TxParams) => Promise<CreateEntityReturnType>;
|
|
325
369
|
/**
|
|
326
|
-
*
|
|
327
|
-
* everything it does not name alone.
|
|
370
|
+
* Patches the entity with the given key through a schema: sets some columns, unsets optional
|
|
371
|
+
* ones, and leaves everything it does not name alone.
|
|
328
372
|
*
|
|
329
373
|
* - JSON-RPC Methods: `eth_sendRawTransaction`
|
|
330
374
|
*
|
|
331
|
-
* @param
|
|
375
|
+
* @param schema - The schema the changes are typed by.
|
|
376
|
+
* @param entityKey - The entity to patch.
|
|
377
|
+
* @param changes - The columns to set and the optional columns to unset. {@link PatchEntityChanges}
|
|
332
378
|
* @param txParams - Optional transaction parameters
|
|
333
379
|
* @returns The patched entity's key and the transaction hash. {@link PatchEntityReturnType}
|
|
334
380
|
*
|
|
335
381
|
* @throws {EmptyPatchError} If the patch has nothing to apply.
|
|
336
382
|
* @throws {ConflictingMutationError} If a name appears in both `set` and `unset`.
|
|
337
|
-
* @throws {
|
|
338
|
-
* @throws {
|
|
383
|
+
* @throws {SchemaMismatchError} If the changes do not fit the schema.
|
|
384
|
+
* @throws {InvalidValueError} If a value does not fit its type.
|
|
385
|
+
* @throws {EntityTooLargeError} If the `bytes` values in `set` add up to more than
|
|
386
|
+
* `MAX_ENTITY_BYTES`.
|
|
387
|
+
* @throws {EntityMutationError} If the transaction fails or reverts.
|
|
339
388
|
*
|
|
340
389
|
* @example
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
* const client = createWalletClient({
|
|
348
|
-
* account: privateKeyToAccount("0x..."),
|
|
349
|
-
* chain: tiramisu,
|
|
350
|
-
* transport: http(),
|
|
351
|
-
* })
|
|
352
|
-
* // Publish the entity: one attribute changes, one goes away, the payload is replaced.
|
|
353
|
-
* const { txHash } = await client.patchEntity({
|
|
354
|
-
* entityKey,
|
|
355
|
-
* set: { status: "published", revision: i32(2) },
|
|
356
|
-
* unset: ["draft"],
|
|
357
|
-
* payload: jsonToPayload({ title: "Hello" }),
|
|
390
|
+
* // Posts is the schema from the createEntity example.
|
|
391
|
+
* // One column changes, an optional one goes away.
|
|
392
|
+
* const { txHash } = await client.patchEntity(Posts, entityKey, {
|
|
393
|
+
* set: { score: dec("4.5") },
|
|
394
|
+
* unset: ["thumbnail"],
|
|
358
395
|
* })
|
|
359
396
|
*/
|
|
360
|
-
patchEntity: (
|
|
397
|
+
patchEntity: <S extends Schema>(schema: S, entityKey: Hex, changes: PatchEntityChanges<S>, txParams?: TxParams) => Promise<PatchEntityReturnType>;
|
|
361
398
|
/**
|
|
362
399
|
* Deletes the entity with the given key.
|
|
363
400
|
*
|
|
@@ -387,14 +424,15 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
387
424
|
*
|
|
388
425
|
* The new lifetime is resolved the same way a create's is: a duration counts from now rather
|
|
389
426
|
* than adding to what the entity has left, and `atBlock` / `atDate` pin an absolute deadline.
|
|
390
|
-
* The engine rejects an extension that would
|
|
427
|
+
* The engine rejects an extension that would move the expiry earlier; one that resolves to the
|
|
428
|
+
* current expiry changes nothing.
|
|
391
429
|
*
|
|
392
430
|
* - JSON-RPC Methods: `eth_sendRawTransaction`
|
|
393
431
|
*
|
|
394
432
|
* @param data - The entity key and its new lifetime
|
|
395
433
|
* @param txParams - Optional transaction parameters
|
|
396
|
-
* @returns The entity's key, the transaction hash, and the block it
|
|
397
|
-
*
|
|
434
|
+
* @returns The entity's key, the transaction hash, and the block it now expires at, as the
|
|
435
|
+
* engine recorded it. {@link ExtendEntityReturnType}
|
|
398
436
|
*
|
|
399
437
|
* @throws {InvalidExpiryError} If the expiry is malformed, exceeds a protocol bound, or would
|
|
400
438
|
* leave the entity dead on arrival.
|
|
@@ -412,7 +450,7 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
412
450
|
* })
|
|
413
451
|
* const { txHash, expiresAt } = await client.extendEntity({
|
|
414
452
|
* entityKey,
|
|
415
|
-
*
|
|
453
|
+
* expiration: ExpirationTime.fromDays(30),
|
|
416
454
|
* })
|
|
417
455
|
*/
|
|
418
456
|
extendEntity: (data: ExtendEntityParameters, txParams?: TxParams) => Promise<ExtendEntityReturnType>;
|
|
@@ -433,19 +471,28 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
433
471
|
* - JSON-RPC Methods: `eth_sendRawTransaction`
|
|
434
472
|
*
|
|
435
473
|
* Every operation lands in one transaction, so the whole batch applies or none of it does.
|
|
436
|
-
* At least one operation is required.
|
|
474
|
+
* At least one operation is required. Each create and patch names its own schema and is typed
|
|
475
|
+
* by it, so one batch can write entities of several schemas.
|
|
437
476
|
*
|
|
438
477
|
* @param data - The batch parameters (creates, patches, deletes, extensions, ownershipChanges)
|
|
439
478
|
* @param txParams - Optional transaction parameters
|
|
440
479
|
* @returns The transaction hash, plus the keys touched by each kind of operation.
|
|
441
480
|
* {@link ExecuteBatchReturnType}
|
|
442
481
|
*
|
|
482
|
+
* @throws {Error} If the batch has no operations.
|
|
443
483
|
* @throws {InvalidExpiryError} If an expiry exceeds a protocol bound or would leave the entity
|
|
444
484
|
* dead on arrival.
|
|
445
|
-
* @throws {
|
|
485
|
+
* @throws {SchemaMismatchError} If a create's or patch's values do not fit its schema.
|
|
486
|
+
* @throws {InvalidValueError} If a value does not fit its type.
|
|
487
|
+
* @throws {EmptyPatchError} If a patch has nothing to apply.
|
|
488
|
+
* @throws {ConflictingMutationError} If a patch names a column in both `set` and `unset`.
|
|
489
|
+
* @throws {EntityTooLargeError} If the `bytes` values of one create or patch add up to more
|
|
490
|
+
* than `MAX_ENTITY_BYTES`.
|
|
491
|
+
* @throws {EntityMutationError} If the transaction fails or reverts.
|
|
446
492
|
*
|
|
447
493
|
* @example
|
|
448
|
-
* import { createWalletClient, ExpirationTime
|
|
494
|
+
* import { createWalletClient, ExpirationTime } from "@arkiv-network/sdk"
|
|
495
|
+
* import { dec } from "@arkiv-network/sdk/schema"
|
|
449
496
|
* import { tiramisu } from "@arkiv-network/sdk/chains"
|
|
450
497
|
* import { http } from "viem"
|
|
451
498
|
* import { privateKeyToAccount } from "viem/accounts"
|
|
@@ -455,23 +502,23 @@ type WalletArkivActions<transport extends Transport = Transport, chain extends C
|
|
|
455
502
|
* chain: tiramisu,
|
|
456
503
|
* transport: http(),
|
|
457
504
|
* })
|
|
505
|
+
* // Posts is the schema from the createEntity example.
|
|
458
506
|
* const { txHash, createdEntities } = await client.executeBatch({
|
|
459
507
|
* creates: [{
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
* expires: ExpirationTime.fromDays(30),
|
|
508
|
+
* schema: Posts,
|
|
509
|
+
* values: { author, category: "docs", score: dec("4.1"), title: "Hi", body: new Uint8Array() },
|
|
510
|
+
* expiration: ExpirationTime.fromDays(30),
|
|
464
511
|
* }],
|
|
465
|
-
* patches: [{ entityKey: keyToRevise, set: {
|
|
512
|
+
* patches: [{ schema: Posts, entityKey: keyToRevise, set: { category: "archive" } }],
|
|
466
513
|
* deletes: [{ entityKey: staleKey }],
|
|
467
514
|
* extensions: [{
|
|
468
515
|
* entityKey: keyToKeepAlive,
|
|
469
|
-
*
|
|
516
|
+
* expiration: ExpirationTime.atBlock(1_200_000n),
|
|
470
517
|
* }],
|
|
471
518
|
* ownershipChanges: [{ entityKey: keyToHandOver, newOwner }],
|
|
472
519
|
* })
|
|
473
520
|
*/
|
|
474
|
-
executeBatch: (data: ExecuteBatchParameters, txParams?: TxParams) => Promise<ExecuteBatchReturnType>;
|
|
521
|
+
executeBatch: <const TCreates extends readonly Schema[] = [], const TPatches extends readonly Schema[] = []>(data: ExecuteBatchParameters<TCreates, TPatches>, txParams?: TxParams) => Promise<ExecuteBatchReturnType>;
|
|
475
522
|
};
|
|
476
523
|
//#endregion
|
|
477
524
|
//#region src/clients/createWalletClient.d.ts
|
|
@@ -482,7 +529,10 @@ type WalletArkivClient<transport extends Transport = Transport, chain extends Ch
|
|
|
482
529
|
*
|
|
483
530
|
* A Wallet Client signs and sends transactions, so it carries an `account` and exposes everything
|
|
484
531
|
* that mutates state — `createEntity`, `patchEntity`, `deleteEntity`, `extendEntity`,
|
|
485
|
-
* `changeOwnership` and `executeBatch` —
|
|
532
|
+
* `changeOwnership` and `executeBatch` — alongside the viem actions those need, such as
|
|
533
|
+
* `getBlockNumber`, `readContract` and `waitForTransactionReceipt`. It does not have the Arkiv
|
|
534
|
+
* read actions (`getEntity`, `query`, `select`, `watchEntityEvents`, `predictEntityKeys`); read
|
|
535
|
+
* through a Public Client from `createPublicClient` for those.
|
|
486
536
|
*
|
|
487
537
|
* @param parameters - Configuration object for the wallet client (chain, transport, account, etc.)
|
|
488
538
|
* @returns An Arkiv Wallet Client. {@link WalletArkivClient}
|
|
@@ -521,9 +571,6 @@ declare class EmptyPatchError extends Error {
|
|
|
521
571
|
readonly entityKey: string;
|
|
522
572
|
constructor(entityKey: string);
|
|
523
573
|
}
|
|
524
|
-
declare class InvalidContentTypeError extends Error {
|
|
525
|
-
constructor(contentType: string);
|
|
526
|
-
}
|
|
527
574
|
//#endregion
|
|
528
575
|
//#region src/utils/chains.d.ts
|
|
529
576
|
/**
|
|
@@ -534,5 +581,5 @@ declare class InvalidContentTypeError extends Error {
|
|
|
534
581
|
*/
|
|
535
582
|
declare function chainFromName(name: string): Chain;
|
|
536
583
|
//#endregion
|
|
537
|
-
export { AddrValue,
|
|
584
|
+
export { AddrValue, AnyColumn, type ArkivClient, ArkivRpcSchema, ArkivValue, type AttributeRef, AttributeSchema, Attributes, BareOf, BoolValue, Bytes32Value, BytesValue, ChangeOwnershipParameters, ChangeOwnershipReturnType, Column, ColumnInput, Columns, ColumnsOf, ConflictingMutationError, CountQueryBuilder, CreateEntityOptions, CreateEntityParameters, CreateEntityReturnType, CreateEntityValues, CreationFlags, DECIMAL_SCALE, DECIMAL_UNIT, type DeadlineOptions, DecValue, DeleteEntityParameters, DeleteEntityReturnType, type DynamicSelection, ENTITY_EVENTS_ABI, EmptyPatchError, Entity, EntityCreatedEvent, EntityDeletedEvent, EntityEvent, EntityEventContext, EntityEventName, EntityFields, EntityMutationError, EntityPatchedEvent, EntityTooLargeError, ExecuteBatchParameters, ExecuteBatchReturnType, ExpirationTime, Expiry, ExpiryExtendedEvent, type Expression, ExtendEntityParameters, ExtendEntityReturnType, type FromOptions, type FullEntity, type FullRow, GetBlockTimingReturnType, I32Value, I32_MAX, I32_MIN, INDEXED_FLAG, IndexableTypeTag, IndexableValue, IndexedColumnName, InvalidAttributeNameError, InvalidCreationFlagsError, InvalidExpiryError, InvalidSaltError, InvalidValueError, KeyValue, type KnownSystemFields, Lifetime, MAX_ATTRIBUTES, MAX_BYTES_LENGTH, MAX_ENTITY_BYTES, MAX_EXPIRES_AT, MAX_NAME_BYTES, MAX_SALT, MAX_STRING_BYTES, MissingValueError, NO_SALT, NoEntityFoundError, NoMoreResultsError, NoRandomSourceError, type NonEmptySelection, OptionalColumnName, OwnershipTransferredEvent, type PartialRow, PatchEntityChanges, PatchEntityParameters, PatchEntityReturnType, PatchEntityValues, PredictEntityKeysParameters, PredictEntityKeysReturnType, PredictedEntityKey, type PublicArkivActions, type PublicArkivClient, type QueryBuilderBase, QueryOptions, type QueryResult, QueryReturnType, QueryRow, ResolvedCreationFlags, type ResultOf, type Row, RpcAttribute, RpcAttributeSchemaEntry, RpcCreationFlags, RpcEntity, RpcQueryOptions, RpcSelect, SCHEMA_ATTRIBUTE, SYSTEM_FIELDS, SaltInput, Schema, SchemaDefinitionError, SchemaMismatchError, type SchemaRef, type SelectArg, SelectQueryBuilder, type Selected, type Selection, type SelectionOf, StrValue, type SystemField, TagOf, TooManyAttributesError, TxParams, TypeTag, U256Value, U256_MAX, U64Value, U64_MAX, UnknownAttributeTypeError, UntypedValueError, ValueArgument, ValueInput, ValueOf, type WalletArkivActions, type WalletArkivClient, WatchEntityEventsParameters, addr, bool, bytes, bytes32, chainFromName, createPublicClient, createWalletClient, dec, decFromUnits, decUnits, defineSchema, describeColumns, i32, isArkivValue, isColumn, isSchema, isValidAttributeName, key, lookupColumn, predictEntityKey, randomSalt, str, toValue, u256, u64, validateAttributeName };
|
|
538
585
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/clients/decorators/arkivPublic.ts","../src/clients/createPublicClient.ts","../src/clients/decorators/arkivWallet.ts","../src/clients/createWalletClient.ts","../src/errors.ts","../src/utils/chains.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/clients/decorators/arkivPublic.ts","../src/clients/createPublicClient.ts","../src/clients/decorators/arkivWallet.ts","../src/clients/createWalletClient.ts","../src/errors.ts","../src/utils/chains.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAmCgC,KADpB,kBACoB,CAAA,kBAAZ,SAAY,GAAA,SAAA,EAAA,cAChB,KADgB,GAAA,SAAA,GACI,KADJ,GAAA,SAAA,EAAA,gBAEd,OAFc,GAAA,SAAA,GAEQ,OAFR,GAAA,SAAA,CAAA,GAG5B,IAH4B,CAI9B,aAJ8B,CAIhB,SAJgB,EAIL,KAJK,EAIE,OAJF,CAAA,EAAA,YAAA,GAAA,UAAA,GAAA,gBAAA,GAAA,YAAA,GAAA,SAAA,GAAA,gBAAA,GAAA,qBAAA,GAAA,uBAAA,GAAA,2BAAA,GAAA,YAAA,CAAA,GAAA;EAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6P4B,SAAA,EAAA;IAAQ,CAAA,GAAA,EArM1C,GAqM0C,CAAA,EArMpC,OAqMoC,CArM5B,UAqM4B,CAAA;IAApC,CAAA,UApMD,MAoMC,CAAA,CAAA,GAAA,EApMY,GAoMZ,EAAA,MAAA,EApMyB,CAoMzB,CAAA,EApM6B,OAoM7B,CApMqC,OAoMrC,CApM6C,CAoM7C,CAAA,CAAA;EAC2B,CAAA;EAAQ;;;;;;;;;;ACnRnD;;;;;;;;;;;;;;;;;;AA6BA;;;;;;;;;;;;;;EAOoD,MAAA,EAAA;IAAb;;;;uBD4FhB;;;AE7GvB;;;;;;;;;;;;;;;;;;;;;IA8EiB,CAA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