@arkiv-network/sdk 0.7.0-dev.1 → 0.8.0-advanced.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.
Files changed (237) hide show
  1. package/README.md +71 -16
  2. package/dist/actions/advanced/index.cjs +13 -0
  3. package/dist/actions/advanced/index.d.cts +8 -0
  4. package/dist/actions/advanced/index.d.ts +9 -0
  5. package/dist/actions/advanced/index.js +9 -0
  6. package/dist/advanced-8ZPTmmaN.js +598 -0
  7. package/dist/advanced-8ZPTmmaN.js.map +1 -0
  8. package/dist/advanced-fPImL6lW.cjs +656 -0
  9. package/dist/arkivTransactions-D74gERHG.d.cts +571 -0
  10. package/dist/arkivTransactions-D74gERHG.d.cts.map +1 -0
  11. package/dist/arkivTransactions-NtGD6uk5.d.ts +571 -0
  12. package/dist/arkivTransactions-NtGD6uk5.d.ts.map +1 -0
  13. package/dist/attr/index.cjs +35 -0
  14. package/dist/attr/index.d.cts +2 -0
  15. package/dist/attr/index.d.ts +3 -0
  16. package/dist/attr/index.js +4 -0
  17. package/dist/attributes-BhY5DwJp.js +809 -0
  18. package/dist/attributes-BhY5DwJp.js.map +1 -0
  19. package/dist/attributes-Df9IsCVs.cjs +1029 -0
  20. package/dist/chains/index.cjs +2 -3
  21. package/dist/chains/index.d.cts +22 -60
  22. package/dist/chains/index.d.cts.map +1 -1
  23. package/dist/chains/index.d.ts +22 -60
  24. package/dist/chains/index.d.ts.map +1 -1
  25. package/dist/chains/index.js +2 -2
  26. package/dist/chains-BJrZs6sG.js +57 -0
  27. package/dist/chains-BJrZs6sG.js.map +1 -0
  28. package/dist/chains-BYRTTipa.cjs +73 -0
  29. package/dist/codec-Car3KkFF.d.ts +102 -0
  30. package/dist/codec-Car3KkFF.d.ts.map +1 -0
  31. package/dist/entity/index.cjs +20 -0
  32. package/dist/entity/index.d.cts +4 -0
  33. package/dist/entity/index.d.ts +5 -0
  34. package/dist/entity/index.js +7 -0
  35. package/dist/entity-B00Li04j.cjs +71 -0
  36. package/dist/entity-B7G8q_Eo.cjs +0 -0
  37. package/dist/entity-BYQR1uoe.js +67 -0
  38. package/dist/entity-BYQR1uoe.js.map +1 -0
  39. package/dist/entity-CD_qFF2M.js +0 -0
  40. package/dist/errors-BVbjKVMN.cjs +56 -0
  41. package/dist/errors-LTe7bOYS.js +33 -0
  42. package/dist/errors-LTe7bOYS.js.map +1 -0
  43. package/dist/expiry-BELY2Kpw.cjs +135 -0
  44. package/dist/expiry-BjpxZZQU.js +95 -0
  45. package/dist/expiry-BjpxZZQU.js.map +1 -0
  46. package/dist/expiry-DRV29F1r.d.cts +79 -0
  47. package/dist/expiry-DRV29F1r.d.cts.map +1 -0
  48. package/dist/expiry-nDbCgZX4.d.ts +79 -0
  49. package/dist/expiry-nDbCgZX4.d.ts.map +1 -0
  50. package/dist/flags-5dTNRnow.d.ts +41 -0
  51. package/dist/flags-5dTNRnow.d.ts.map +1 -0
  52. package/dist/flags-CRjPpoh3.d.cts +41 -0
  53. package/dist/flags-CRjPpoh3.d.cts.map +1 -0
  54. package/dist/flags-DFBs2J94.js +33 -0
  55. package/dist/flags-DFBs2J94.js.map +1 -0
  56. package/dist/flags-kr276q6i.cjs +43 -0
  57. package/dist/index-B5j76711.d.ts +184 -0
  58. package/dist/index-B5j76711.d.ts.map +1 -0
  59. package/dist/index-BF7Mq9Is.d.cts +280 -0
  60. package/dist/index-BF7Mq9Is.d.cts.map +1 -0
  61. package/dist/index-CA4V7Pdh.d.cts +167 -0
  62. package/dist/index-CA4V7Pdh.d.cts.map +1 -0
  63. package/dist/index-CV5zCdpa.d.cts +417 -0
  64. package/dist/index-CV5zCdpa.d.cts.map +1 -0
  65. package/dist/index-DHDud2hC.d.ts +280 -0
  66. package/dist/index-DHDud2hC.d.ts.map +1 -0
  67. package/dist/index-DvYvrkdk.d.ts +320 -0
  68. package/dist/index-DvYvrkdk.d.ts.map +1 -0
  69. package/dist/index-EeUO0nnJ.d.cts +184 -0
  70. package/dist/index-EeUO0nnJ.d.cts.map +1 -0
  71. package/dist/index-fX_XyqLp.d.ts +167 -0
  72. package/dist/index-fX_XyqLp.d.ts.map +1 -0
  73. package/dist/index.cjs +411 -405
  74. package/dist/index.d.cts +360 -209
  75. package/dist/index.d.cts.map +1 -1
  76. package/dist/index.d.ts +361 -209
  77. package/dist/index.d.ts.map +1 -1
  78. package/dist/index.js +342 -387
  79. package/dist/index.js.map +1 -1
  80. package/dist/key-D1Bh7MF0.js +70 -0
  81. package/dist/key-D1Bh7MF0.js.map +1 -0
  82. package/dist/key-WKhXnXuU.cjs +98 -0
  83. package/dist/logger-CVpvU8ik.js +153 -0
  84. package/dist/logger-CVpvU8ik.js.map +1 -0
  85. package/dist/logger-Cr15lPAQ.cjs +188 -0
  86. package/dist/payload-BNoud2KZ.d.cts +94 -0
  87. package/dist/payload-BNoud2KZ.d.cts.map +1 -0
  88. package/dist/payload-Bz6651ax.js +67 -0
  89. package/dist/payload-Bz6651ax.js.map +1 -0
  90. package/dist/payload-CcUj85ys.d.ts +94 -0
  91. package/dist/payload-CcUj85ys.d.ts.map +1 -0
  92. package/dist/payload-KC14SDlN.cjs +83 -0
  93. package/dist/query/index.cjs +26 -150
  94. package/dist/query/index.d.cts +5 -3
  95. package/dist/query/index.d.ts +6 -3
  96. package/dist/query/index.js +8 -138
  97. package/dist/queryBuilder-DM6AWCBa.js +820 -0
  98. package/dist/queryBuilder-DM6AWCBa.js.map +1 -0
  99. package/dist/queryBuilder-DbUMEZln.cjs +944 -0
  100. package/dist/selection-C4UhsMOO.d.ts +434 -0
  101. package/dist/selection-C4UhsMOO.d.ts.map +1 -0
  102. package/dist/selection-DPg0uyJf.d.cts +433 -0
  103. package/dist/selection-DPg0uyJf.d.cts.map +1 -0
  104. package/dist/types/index.cjs +3 -3
  105. package/dist/types/index.d.cts +7 -2
  106. package/dist/types/index.d.ts +8 -2
  107. package/dist/types/index.js +3 -3
  108. package/dist/types-Bu_ZwMbZ.js +0 -0
  109. package/dist/types-NRqymi6S.cjs +0 -0
  110. package/dist/utils/index.cjs +4 -17
  111. package/dist/utils/index.d.cts +3 -17
  112. package/dist/utils/index.d.ts +3 -17
  113. package/dist/utils/index.js +4 -18
  114. package/package.json +26 -5
  115. package/src/actions/advanced/advanced.test.ts +258 -0
  116. package/src/actions/advanced/buildMutation.ts +104 -0
  117. package/src/actions/advanced/getMutationResult.ts +112 -0
  118. package/src/actions/advanced/index.ts +21 -0
  119. package/src/actions/advanced/pingTransaction.ts +43 -0
  120. package/src/actions/advanced/sendMutation.ts +59 -0
  121. package/src/actions/public/getEntity.ts +27 -43
  122. package/src/actions/public/getEntityNonce.ts +30 -0
  123. package/src/actions/public/predictEntityKeys.test.ts +143 -0
  124. package/src/actions/public/predictEntityKeys.ts +138 -0
  125. package/src/actions/public/query.ts +35 -67
  126. package/src/actions/public/watchEntityEvents.test.ts +414 -0
  127. package/src/actions/public/watchEntityEvents.ts +225 -0
  128. package/src/actions/wallet/changeOwnership.ts +2 -2
  129. package/src/actions/wallet/createEntity.ts +99 -24
  130. package/src/actions/wallet/extendEntity.ts +37 -13
  131. package/src/actions/wallet/mutateEntities.test.ts +76 -0
  132. package/src/actions/wallet/mutateEntities.ts +16 -33
  133. package/src/actions/wallet/patchEntity.ts +90 -0
  134. package/src/attr/attributes.test.ts +120 -0
  135. package/src/attr/attributes.ts +190 -0
  136. package/src/attr/codec.test.ts +162 -0
  137. package/src/attr/codec.ts +220 -0
  138. package/src/attr/decimal.ts +86 -0
  139. package/src/attr/errors.ts +145 -0
  140. package/src/attr/index.ts +50 -0
  141. package/src/attr/names.ts +106 -0
  142. package/src/attr/types.ts +150 -0
  143. package/src/attr/values.test.ts +271 -0
  144. package/src/attr/values.ts +502 -0
  145. package/src/chains/cheesecake.ts +22 -0
  146. package/src/chains/index.ts +1 -2
  147. package/src/clients/createPublicClient.test.ts +3 -5
  148. package/src/clients/createPublicClient.ts +5 -4
  149. package/src/clients/createWalletClient.test.ts +2 -2
  150. package/src/clients/createWalletClient.ts +13 -7
  151. package/src/clients/decorators/arkivAdvanced.ts +144 -0
  152. package/src/clients/decorators/arkivPublic.ts +172 -139
  153. package/src/clients/decorators/arkivWallet.ts +101 -94
  154. package/src/entity/create.test.ts +184 -0
  155. package/src/entity/errors.ts +38 -0
  156. package/src/entity/events.ts +16 -0
  157. package/src/entity/expiry.test.ts +195 -0
  158. package/src/entity/expiry.ts +181 -0
  159. package/src/entity/flags.ts +65 -0
  160. package/src/entity/index.ts +15 -0
  161. package/src/entity/key.ts +68 -0
  162. package/src/entity/operations.ts +134 -0
  163. package/src/entity/params.ts +15 -0
  164. package/src/errors.ts +26 -49
  165. package/src/index.ts +19 -0
  166. package/src/query/engine.ts +68 -137
  167. package/src/query/errors.ts +151 -0
  168. package/src/query/expression.test.ts +286 -0
  169. package/src/query/expression.ts +493 -0
  170. package/src/query/index.ts +40 -4
  171. package/src/query/injection.test.ts +151 -0
  172. package/src/query/queryBuilder.test.ts +342 -637
  173. package/src/query/queryBuilder.ts +133 -359
  174. package/src/query/queryResult.ts +54 -51
  175. package/src/query/selection.test.ts +48 -98
  176. package/src/query/selection.ts +77 -65
  177. package/src/types/entity.test.ts +44 -155
  178. package/src/types/entity.ts +60 -52
  179. package/src/types/events.ts +59 -16
  180. package/src/types/index.ts +20 -17
  181. package/src/types/rpcSchema.ts +69 -37
  182. package/src/utils/arkivTransactions.test.ts +600 -155
  183. package/src/utils/arkivTransactions.ts +350 -219
  184. package/src/utils/chains.test.ts +21 -24
  185. package/src/utils/compression.ts +1 -1
  186. package/src/utils/entities.test.ts +62 -0
  187. package/src/utils/entities.ts +109 -37
  188. package/src/utils/expirationTime.ts +114 -10
  189. package/src/utils/logger.ts +2 -2
  190. package/src/utils/revert.test.ts +99 -0
  191. package/src/utils/revert.ts +145 -0
  192. package/dist/chains-BifaY04V.cjs +0 -108
  193. package/dist/chains-CrtkVbBh.js +0 -86
  194. package/dist/chains-CrtkVbBh.js.map +0 -1
  195. package/dist/consts-Bz0LZQZY.js +0 -7
  196. package/dist/consts-Bz0LZQZY.js.map +0 -1
  197. package/dist/consts-CxT1-RXU.cjs +0 -18
  198. package/dist/entity-BhSXaB23.cjs +0 -81
  199. package/dist/entity-CN41IOrq.d.cts +0 -401
  200. package/dist/entity-CN41IOrq.d.cts.map +0 -1
  201. package/dist/entity-DGfVyB-a.js +0 -71
  202. package/dist/entity-DGfVyB-a.js.map +0 -1
  203. package/dist/entity-NnEVlePN.d.ts +0 -401
  204. package/dist/entity-NnEVlePN.d.ts.map +0 -1
  205. package/dist/index-ClkpS6s_.d.ts +0 -481
  206. package/dist/index-ClkpS6s_.d.ts.map +0 -1
  207. package/dist/index-w4qop0Pe.d.cts +0 -481
  208. package/dist/index-w4qop0Pe.d.cts.map +0 -1
  209. package/dist/payload-BpNUPOnY.js +0 -13
  210. package/dist/payload-BpNUPOnY.js.map +0 -1
  211. package/dist/payload-C2KHOUoj.d.ts +0 -6
  212. package/dist/payload-C2KHOUoj.d.ts.map +0 -1
  213. package/dist/payload-CJN8fTvX.d.cts +0 -6
  214. package/dist/payload-CJN8fTvX.d.cts.map +0 -1
  215. package/dist/payload-D8YLKcJj.cjs +0 -23
  216. package/dist/query/index.js.map +0 -1
  217. package/dist/queryBuilder-BE_XhLLa.js +0 -735
  218. package/dist/queryBuilder-BE_XhLLa.js.map +0 -1
  219. package/dist/queryBuilder-J37buGCi.cjs +0 -865
  220. package/dist/utils/index.d.cts.map +0 -1
  221. package/dist/utils/index.d.ts.map +0 -1
  222. package/dist/utils/index.js.map +0 -1
  223. package/src/actions/public/buildQuery.ts +0 -10
  224. package/src/actions/public/subscribeEntityEvents.ts +0 -93
  225. package/src/actions/wallet/updateEntity.ts +0 -59
  226. package/src/chains/braga.ts +0 -26
  227. package/src/chains/kaolin.ts +0 -29
  228. package/src/query/engine.test.ts +0 -571
  229. package/src/query/predicate.test.ts +0 -461
  230. package/src/query/predicate.ts +0 -144
  231. package/src/query/queryResult.test.ts +0 -270
  232. package/src/query/selectQueryBuilder.test.ts +0 -213
  233. package/src/types/attributes.ts +0 -28
  234. package/src/utils/validation.test.ts +0 -106
  235. package/src/utils/validation.ts +0 -80
  236. /package/dist/{types-Ci4BRClw.js → attr-DlmErkvR.cjs} +0 -0
  237. /package/dist/{types-a8gm_IaQ.cjs → attr-GcQKatub.js} +0 -0
@@ -0,0 +1,280 @@
1
+ import { R as RpcSelect, i as SelectArg, j as ArkivClient, p as Expression, s as Entity } from "./selection-C4UhsMOO.js";
2
+ import { d as TypeTag } from "./codec-Car3KkFF.js";
3
+ import { Hex } from "viem";
4
+
5
+ //#region src/query/engine.d.ts
6
+ declare const MAX_LIMIT = 200;
7
+ /** One `arkiv_query` call. */
8
+ type QueryRequest = {
9
+ /** The query expression, already rendered. */
10
+ query: string;
11
+ /** What to return. */
12
+ select: RpcSelect;
13
+ /** Page size, up to {@link MAX_LIMIT}. Defaults to the node's own page size. */
14
+ limit?: number | undefined;
15
+ /** Cursor from a previous page. */
16
+ cursor?: string | undefined;
17
+ /** Block height to read at. Defaults to the head. */
18
+ atBlock?: bigint | undefined;
19
+ };
20
+ /** One page of results. */
21
+ type QueryResponse = {
22
+ entities: Entity[];
23
+ /** The block the page was read at — the same for every page of a paginated query. */
24
+ blockNumber: bigint;
25
+ /** The cursor for the next page, or `undefined` when this was the last one. */
26
+ cursor: string | undefined;
27
+ };
28
+ /**
29
+ * Runs one query and decodes the page it returns.
30
+ *
31
+ * @throws {QueryError} If the node rejects the query.
32
+ */
33
+ declare function runQuery(client: ArkivClient, request: QueryRequest): Promise<QueryResponse>;
34
+ //#endregion
35
+ //#region src/query/errors.d.ts
36
+ /**
37
+ * A predicate asked for an operator the query language does not define for that type.
38
+ *
39
+ * The operator × type matrix is part of the language, not a policy: a range comparison on an
40
+ * equality-only type is a **parse error** at the node, not an empty result. Catching it here turns
41
+ * a round trip and an RPC error code into a stack trace pointing at the call site.
42
+ *
43
+ * | | `=` `!=` | `<` `<=` `>` `>=` | `STARTSWITH` |
44
+ * | --- | --- | --- | --- |
45
+ * | `bool` | yes | no | no |
46
+ * | `i32` `u256` `dec` | yes | yes | no |
47
+ * | `str` | yes | no | yes |
48
+ * | `addr` `key` `bytes32` | yes | no | no |
49
+ */
50
+ declare class UnsupportedOperatorError extends Error {
51
+ /** The attribute the predicate names. */
52
+ readonly attributeName: string;
53
+ /** The operator, as it would have been written in the query. */
54
+ readonly operator: string;
55
+ /** The type of the value it was applied to. */
56
+ readonly tag: TypeTag;
57
+ constructor(attributeName: string, operator: string, tag: TypeTag, hint?: string);
58
+ }
59
+ /**
60
+ * A predicate could not be expressed in the query language for a reason other than its operator —
61
+ * a system attribute that is returned in results but cannot be filtered on, a system attribute
62
+ * compared against the wrong type, or a combinator with nothing to combine.
63
+ */
64
+ declare class InvalidPredicateError extends Error {
65
+ /** The attribute the predicate names, where there is one. */
66
+ readonly attributeName: string | undefined;
67
+ constructor(message: string, attributeName?: string);
68
+ }
69
+ /**
70
+ * What a node rejected a query for. Part of the frozen RPC surface, so it is safe to branch on —
71
+ * a `"cursor"` failure means start the query again, a `"block"` failure means the node no longer
72
+ * retains that height, and the rest mean the query itself needs fixing.
73
+ */
74
+ type QueryErrorKind = /** The query string does not parse. `data` locates it: `{ position, expected, got }`. */
75
+ "parse"
76
+ /** A predicate is well-formed but ill-typed — a range operator on an equality-only type, an unknown tag. */ | "type"
77
+ /** A literal failed validation — an `i32` out of range, a bad EIP-55 checksum, more than 18 decimal places. */ | "literal"
78
+ /** A node budget was exceeded — query length, predicate count, nesting depth, bitmap operations. */ | "limits"
79
+ /** The cursor expired, is malformed, or belongs to a different query, block or selection. */ | "cursor"
80
+ /** `atBlock` is outside the range the node retains. */ | "block";
81
+ /**
82
+ * The node rejected a query.
83
+ *
84
+ * These codes are part of the frozen `arkiv_query` surface, so {@link kind} and {@link data} are
85
+ * stable enough to branch on — which the underlying JSON-RPC error is not, because the codes
86
+ * overlap Ethereum's own EIP-1474 numbering and get wrapped accordingly on the way up.
87
+ *
88
+ * @example
89
+ * try {
90
+ * await result.next()
91
+ * } catch (error) {
92
+ * if (error instanceof QueryError && error.kind === "cursor") {
93
+ * // The page is gone — start the query over.
94
+ * }
95
+ * }
96
+ */
97
+ declare class QueryError extends Error {
98
+ /** Which failure this is. */
99
+ readonly kind: QueryErrorKind;
100
+ /** The JSON-RPC error code. */
101
+ readonly code: number;
102
+ /** The machine-readable detail the node sent, if any — e.g. `{ position, expected, got }`. */
103
+ readonly data: unknown;
104
+ /** The query string that was rejected. */
105
+ readonly query: string;
106
+ constructor(kind: QueryErrorKind, code: number, query: string, data: unknown, detail?: string);
107
+ }
108
+ //#endregion
109
+ //#region src/query/queryResult.d.ts
110
+ /** Fetches the page a cursor points at. */
111
+ type FetchPage<TEntity> = (cursor: string) => Promise<QueryResult<TEntity>>;
112
+ /**
113
+ * One page of query results.
114
+ *
115
+ * A page is immutable: {@link next} returns the following page rather than mutating this one, so a
116
+ * page that has been read stays readable.
117
+ *
118
+ * @typeParam TEntity - The shape of each entity, inferred from the selection by `client.select()`.
119
+ *
120
+ * @example
121
+ * let page = await client.select({ key: true }).where(eq("category", "docs")).limit(100).fetch()
122
+ * while (page.hasNextPage()) {
123
+ * page = await page.next()
124
+ * }
125
+ */
126
+ declare class QueryResult<TEntity = Entity> {
127
+ /** The entities on this page. */
128
+ readonly entities: readonly TEntity[];
129
+ /**
130
+ * The block this page was read at.
131
+ *
132
+ * Every page of one walk reads the same block — the cursor is bound to it — so results cannot
133
+ * shift under a paginating reader.
134
+ */
135
+ readonly blockNumber: bigint;
136
+ /** The cursor for the next page, or `undefined` when this was the last one. */
137
+ readonly cursor: string | undefined;
138
+ private readonly fetchPage;
139
+ constructor(entities: readonly TEntity[], blockNumber: bigint, cursor: string | undefined, fetchPage: FetchPage<TEntity>);
140
+ /**
141
+ * Whether another page follows.
142
+ *
143
+ * The node omits the cursor once nothing remains, so this is an answer rather than the guess a
144
+ * short final page would be — a full last page is reported correctly.
145
+ */
146
+ hasNextPage(): boolean;
147
+ /**
148
+ * Fetches the next page.
149
+ *
150
+ * @throws {NoMoreResultsError} If this was the last page — check {@link hasNextPage} first.
151
+ * @throws {QueryError} If the node rejects the request; `kind === "cursor"` means the cursor
152
+ * expired and the walk has to start again.
153
+ */
154
+ next(): Promise<QueryResult<TEntity>>;
155
+ }
156
+ //#endregion
157
+ //#region src/query/queryBuilder.d.ts
158
+ /**
159
+ * Builds and runs a query.
160
+ *
161
+ * The selection is fixed when the builder is created and the filter is added by chaining, so the
162
+ * result type is known before a single predicate is written. Create one with `client.select(...)`
163
+ * rather than constructing it directly — that is what infers the entity shape from the selection.
164
+ *
165
+ * Every filter added with {@link where}, {@link ownedBy} and {@link createdBy} must hold; use
166
+ * {@link or} for alternatives inside one call.
167
+ *
168
+ * @typeParam TEntity - The projected entity shape, inferred from the selection by `client.select()`.
169
+ *
170
+ * @example
171
+ * import { createPublicClient } from "@arkiv-network/sdk"
172
+ * import { i32 } from "@arkiv-network/sdk/attr"
173
+ * import { cheesecake } from "@arkiv-network/sdk/chains"
174
+ * import { eq, gte, or } from "@arkiv-network/sdk/query"
175
+ * import { http } from "viem"
176
+ *
177
+ * const client = createPublicClient({ chain: cheesecake, transport: http() })
178
+ *
179
+ * const page = await client
180
+ * .select({ key: true, attributes: true })
181
+ * .where(gte("level", i32(10)), or(eq("status", "open"), eq("status", "review")))
182
+ * .ownedBy(owner)
183
+ * .limit(100)
184
+ * .fetch()
185
+ *
186
+ * for (const entity of page.entities) console.log(entity.key, entity.attributes)
187
+ */
188
+ declare class SelectQueryBuilder<TEntity = Entity> {
189
+ private readonly _client;
190
+ private readonly _select;
191
+ private readonly _filters;
192
+ private _ownedBy;
193
+ private _createdBy;
194
+ private _limit;
195
+ private _cursor;
196
+ private _atBlock;
197
+ constructor(client: ArkivClient, selection?: SelectArg);
198
+ /**
199
+ * Adds filters. Everything passed here, and across repeated calls, must hold.
200
+ *
201
+ * @param expressions - The expressions, as separate arguments or one array.
202
+ *
203
+ * @example
204
+ * builder.where(eq("category", "docs"))
205
+ * builder.where(gte("level", i32(10)), lt("level", i32(20)))
206
+ * builder.where(or(eq("status", "open"), not(exists("closedAt"))))
207
+ */
208
+ where(expressions: readonly Expression[]): this;
209
+ where(...expressions: Expression[]): this;
210
+ /**
211
+ * Restricts the results to entities this account owns — shorthand for
212
+ * `where(eq("$owner", addr(owner)))`. Calling it again replaces the filter.
213
+ *
214
+ * @example
215
+ * builder.ownedBy("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")
216
+ */
217
+ ownedBy(owner: Hex): this;
218
+ /**
219
+ * Restricts the results to entities this account created — shorthand for
220
+ * `where(eq("$creator", addr(creator)))`. Calling it again replaces the filter.
221
+ *
222
+ * The creator never changes; the owner does, so these differ after a transfer.
223
+ */
224
+ createdBy(creator: Hex): this;
225
+ /**
226
+ * Sets the page size, up to the node maximum of 200. Without it the node picks the page size.
227
+ *
228
+ * @example
229
+ * builder.limit(100)
230
+ */
231
+ limit(limit: number): this;
232
+ /**
233
+ * Starts from a cursor returned by an earlier page.
234
+ *
235
+ * Pagination normally goes through {@link QueryResult.next}, which carries the cursor for you;
236
+ * this is for resuming a walk in a later process. A cursor is bound to the query, block and
237
+ * selection it came from, so it must be used with an identically-built query — {@link atBlock}
238
+ * set to the `blockNumber` of the page the cursor came from is required (persist the two
239
+ * together), and a fetch with a cursor but no block rejects locally.
240
+ */
241
+ cursor(cursor: string): this;
242
+ /**
243
+ * Reads the state as of a given block rather than the head. The block must be within the range
244
+ * the node retains.
245
+ *
246
+ * @example
247
+ * builder.atBlock(1_297_000n)
248
+ */
249
+ atBlock(block: bigint): this;
250
+ /**
251
+ * The query string this builder will send — the same text the node parses.
252
+ *
253
+ * @throws {InvalidPredicateError} If no filter has been added.
254
+ */
255
+ toString(): string;
256
+ /**
257
+ * Runs the query and returns the first page.
258
+ *
259
+ * @throws {InvalidPredicateError} If no filter has been added.
260
+ * @throws {QueryError} If the node rejects the query.
261
+ *
262
+ * @example
263
+ * const page = await client.select({ key: true }).where(eq("category", "docs")).fetch()
264
+ * page.entities // this page
265
+ * await page.next() // the next one
266
+ */
267
+ fetch(): Promise<QueryResult<TEntity>>;
268
+ /**
269
+ * Walks every page, yielding one entity at a time.
270
+ *
271
+ * @example
272
+ * for await (const entity of client.select({ key: true }).where(eq("category", "docs"))) {
273
+ * console.log(entity.key)
274
+ * }
275
+ */
276
+ [Symbol.asyncIterator](): AsyncGenerator<TEntity>;
277
+ }
278
+ //#endregion
279
+ export { QueryErrorKind as a, QueryRequest as c, QueryError as i, QueryResponse as l, QueryResult as n, UnsupportedOperatorError as o, InvalidPredicateError as r, MAX_LIMIT as s, SelectQueryBuilder as t, runQuery as u };
280
+ //# sourceMappingURL=index-DHDud2hC.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DHDud2hC.d.ts","names":[],"sources":["../src/query/engine.ts","../src/query/errors.ts","../src/query/queryResult.ts","../src/query/queryBuilder.ts"],"sourcesContent":[],"mappings":";;;;;cAUa,SAAA;;AAAA,KAGD,YAAA,GAHU;EAGV;EAcA,KAAA,EAAA,MAAA;EAaU;EAAiB,MAAA,EAvB7B,SAuB6B;EAAsB;EAAuB,KAAA,CAAA,EAAA,MAAA,GAAA,SAAA;EAAR;EAAO,MAAA,CAAA,EAAA,MAAA,GAAA,SAAA;;;;ACxBnF;AAMgB,KDKJ,aAAA,GCLI;EAE4C,QAAA,EDIhD,MCJgD,EAAA;EARd;EAAK,WAAA,EAAA,MAAA;EAyBtC;EAgBD,MAAA,EAAA,MAAA,GAAc,SAAA;AAwC1B,CAAA;;;;;;iBDzDsB,QAAA,SAAiB,sBAAsB,eAAe,QAAQ;;;;;;;AA9BpF;AAGA;AAcA;AAaA;;;;;;;cCxBa,wBAAA,SAAiC,KAAA;;EAAjC,SAAA,aAAA,EAAA,MAAyB;EAMtB;EAE4C,SAAA,QAAA,EAAA,MAAA;EARd;EAAK,SAAA,GAAA,EAMnC,OANmC;EAyBtC,WAAA,CAAA,aAAsB,EAAA,MAAA,EAAA,QAAa,EAAA,MAAA,EA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WI,KAAA,CAAA,GAAA,WAAA,EAxBG,UAwBH,EAAA,CAAA,EAAA,IAAA;EAyEgB;;;;;;;iBApFpB;;;;;;;qBAWI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAyEJ,QAAQ,YAAY;;;;;;;;;GAqB3B,MAAA,CAAO,aAAA,KAAkB,eAAe"}
@@ -0,0 +1,320 @@
1
+ import { a as Bytes32Value, c as I32Value, d as TypeTag, f as U256Value, i as BoolValue, l as KeyValue, n as AnyArkivValue, p as U64Value, r as ArkivValue, s as DecValue, t as AddrValue, u as StrValue } from "./codec-Car3KkFF.js";
2
+ import { Hex } from "viem";
3
+
4
+ //#region src/attr/values.d.ts
5
+ /** The widest `i32`. */
6
+ declare const I32_MAX = 2147483647;
7
+ /** The narrowest `i32`. */
8
+ declare const I32_MIN = -2147483648;
9
+ /** The widest `u64`. */
10
+ declare const U64_MAX: bigint;
11
+ /** The widest `u256`. */
12
+ declare const U256_MAX: bigint;
13
+ /**
14
+ * The longest `str`, in UTF-8 bytes
15
+ */
16
+ declare const MAX_STRING_BYTES = 128;
17
+ /**
18
+ * A boolean.
19
+ *
20
+ * `bool` is the one type that may also be written bare — `{ flagged: true }` and
21
+ * `{ flagged: bool(true) }` are the same attribute.
22
+ *
23
+ * @example
24
+ * bool(true) // { type: "bool", value: true }
25
+ */
26
+ declare function bool(value: boolean): BoolValue;
27
+ /**
28
+ * A 32-bit signed integer, indexed for equality and range queries. This is the default type for a
29
+ * bare number, so `{ level: 10 }` and `{ level: i32(10) }` are the same attribute.
30
+ *
31
+ * @param value - An integer in [-2147483648, 2147483647].
32
+ * @throws {InvalidValueError} If the value is not an integer, or does not fit an `i32`.
33
+ *
34
+ * @example
35
+ * i32(10) // { type: "i32", value: 10 }
36
+ * i32(-42) // negative values are fine — i32 is the signed integer
37
+ */
38
+ declare function i32(value: number | bigint): I32Value;
39
+ /**
40
+ * A 256-bit unsigned integer, indexed for equality and range queries. The type for token amounts
41
+ * and anything else that can outgrow 2⁶⁴ — reach for {@link u64} first for counters, timestamps
42
+ * and block heights.
43
+ *
44
+ * @param value - A non-negative integer, as a `bigint`, a safe `number`, or a decimal or `0x` hex
45
+ * string.
46
+ * @throws {InvalidValueError} If the value is negative, non-integral, or wider than 256 bits.
47
+ *
48
+ * @example
49
+ * u256(1_000_000n)
50
+ * u256(Date.now()) // safe integers are accepted
51
+ * u256("0xf4240") // hex, as it comes back over JSON-RPC
52
+ */
53
+ declare function u256(value: bigint | number | string): U256Value;
54
+ /**
55
+ * A 64-bit unsigned integer, indexed for equality and range queries.
56
+ *
57
+ * This is the width the protocol counts in: block heights, `$expiresAt` and the entity-nonce are
58
+ * all `u64`, so it is the type to reach for when a value has to line up with one of them. Use
59
+ * {@link u256} for token amounts and anything else that can exceed 2⁶⁴.
60
+ *
61
+ * @param value - A non-negative integer, as a `bigint`, a safe `number`, or a decimal or `0x` hex
62
+ * string.
63
+ * @throws {InvalidValueError} If the value is negative, non-integral, or wider than 64 bits.
64
+ *
65
+ * @example
66
+ * u64(1_200_000n) // a block height
67
+ * u64(Date.now()) // safe integers are accepted
68
+ * u64("0x124f80") // hex, as it comes back over JSON-RPC
69
+ */
70
+ declare function u64(value: bigint | number | string): U64Value;
71
+ /**
72
+ * A signed fixed-point decimal with exactly 18 decimal places, indexed for equality and range
73
+ * queries.
74
+ *
75
+ * Pass fractional values as **strings**. A JavaScript number cannot represent most decimals
76
+ * exactly, so accepting `dec(0.1 + 0.2)` would quietly store `0.30000000000000004`; requiring the
77
+ * string keeps what you write and what is stored the same thing. Excess precision is likewise an
78
+ * error rather than a rounding.
79
+ *
80
+ * @param value - A decimal string, or an integral `number` / `bigint`.
81
+ * @throws {InvalidValueError} If the value is malformed, has more than 18 fractional digits, or
82
+ * falls outside the `int256` range.
83
+ *
84
+ * @example
85
+ * dec("3.5")
86
+ * dec("-0.000000000000000001") // the smallest step
87
+ * dec(5) // integers may be passed bare
88
+ */
89
+ declare function dec(value: string | number | bigint): DecValue;
90
+ /**
91
+ * The exact scaled integer behind a `dec` — the value multiplied by 10 ** 18, which is what the
92
+ * protocol stores and compares. Use it when you need exact arithmetic; JavaScript has no native
93
+ * decimal type, so the SDK carries the canonical string and leaves the maths to you.
94
+ *
95
+ * @example
96
+ * decUnits(dec("3.5")) // 3500000000000000000n
97
+ */
98
+ declare function decUnits(value: DecValue): bigint;
99
+ /**
100
+ * A `dec` built from its scaled integer units — the inverse of {@link decUnits}.
101
+ *
102
+ * @example
103
+ * decFromUnits(3_500_000_000_000_000_000n) // dec("3.5")
104
+ */
105
+ declare function decFromUnits(units: bigint): DecValue;
106
+ /**
107
+ * A UTF-8 string of at most 128 bytes, indexed for equality and prefix (`STARTSWITH`) matching.
108
+ *
109
+ * The limit is on **bytes**, not characters: a string of 128 emoji does not fit.
110
+ *
111
+ * @throws {InvalidValueError} If the string exceeds 128 UTF-8 bytes.
112
+ *
113
+ * @example
114
+ * str("Bob")
115
+ */
116
+ declare function str(value: string): StrValue;
117
+ /**
118
+ * A 20-byte Ethereum address, indexed for equality.
119
+ *
120
+ * All-lowercase and all-uppercase input carries no checksum and is accepted as-is; mixed-case
121
+ * input is checked against its EIP-55 checksum, so a mistyped address is caught here rather than
122
+ * being written to a wrong account. The stored value is always EIP-55 checksummed.
123
+ *
124
+ * @throws {InvalidValueError} If the value is not 20 hex bytes, or fails its EIP-55 checksum.
125
+ *
126
+ * @example
127
+ * addr("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")
128
+ */
129
+ declare function addr(value: string): AddrValue;
130
+ /**
131
+ * A reference to another entity, indexed for equality.
132
+ *
133
+ * References are **weak**: nothing checks that the target exists when you write it, and a
134
+ * reference to a deleted or expired entity is allowed to dangle.
135
+ *
136
+ * @param value - A 32-byte entity key, as `0x` hex or raw bytes.
137
+ * @throws {InvalidValueError} If the value is not exactly 32 bytes.
138
+ *
139
+ * @example
140
+ * key(parentEntityKey)
141
+ */
142
+ declare function key(value: Hex | Uint8Array): KeyValue;
143
+ /**
144
+ * 32 opaque bytes — a hash, a digest, an identifier from another system — indexed for equality.
145
+ *
146
+ * Use {@link key} instead when the bytes are an Arkiv entity key: same wire width, but the
147
+ * distinct type makes the reference visible to readers and to the query language.
148
+ *
149
+ * @param value - 32 bytes, as `0x` hex or raw bytes.
150
+ * @throws {InvalidValueError} If the value is not exactly 32 bytes.
151
+ *
152
+ * @example
153
+ * bytes32(keccak256(toBytes("hello")))
154
+ */
155
+ declare function bytes32(value: Hex | Uint8Array): Bytes32Value;
156
+ /**
157
+ * A JavaScript value accepted wherever a typed value is expected: either a tagged value, or one of
158
+ * the four bare forms that map unambiguously onto a single type.
159
+ *
160
+ * | bare form | type |
161
+ * | --------- | ------- |
162
+ * | `boolean` | `bool` |
163
+ * | `number` | `i32` |
164
+ * | `bigint` | `u256` |
165
+ * | `string` | `str` |
166
+ *
167
+ * Anything else — a large number, a decimal, an address, an entity key — must name its type, which
168
+ * is what keeps `"0x1234..."` a string rather than silently becoming a key.
169
+ *
170
+ * These defaults apply identically when writing and when querying, so a value written bare and
171
+ * queried bare always agrees with itself. The mismatch to watch for is mixing the two: an attribute
172
+ * written as {@link u64} does not match a bare `bigint` predicate, because that predicate asserts
173
+ * `u256`. A type mismatch is not an error to the engine — it simply matches nothing.
174
+ */
175
+ type ValueInput = ArkivValue | boolean | number | bigint | string;
176
+ /**
177
+ * Resolves a {@link ValueInput} to a typed value, applying the bare-form defaults above. Tagged
178
+ * values pass through untouched.
179
+ *
180
+ * @param input - The value to resolve.
181
+ * @param attributeName - The attribute this value belongs to, used to make errors name it.
182
+ *
183
+ * @throws {MissingValueError} If the input is `undefined` or `null` — an attribute is either set
184
+ * with a value and a type, or not set at all.
185
+ * @throws {UntypedValueError} If the input is not a tagged value or a bare boolean, number, bigint
186
+ * or string.
187
+ * @throws {InvalidValueError} If a bare value does not fit the type it defaults to.
188
+ *
189
+ * @example
190
+ * toValue(10) // i32(10)
191
+ * toValue(10n) // u256(10n)
192
+ * toValue("hello") // str("hello")
193
+ * toValue(dec("3.5")) // unchanged
194
+ */
195
+ declare function toValue(input: ValueInput, attributeName?: string): ArkivValue;
196
+ //#endregion
197
+ //#region src/attr/attributes.d.ts
198
+ /**
199
+ * The most attribute cells one operation may carry.
200
+ */
201
+ declare const MAX_ATTRIBUTES = 32;
202
+ declare const MAX_PAYLOAD_BYTES: number;
203
+ /**
204
+ * The attributes written on an entity, as a plain object keyed by attribute name.
205
+ *
206
+ * Values may be tagged ({@link ValueInput}) or bare where the type is unambiguous — see
207
+ * {@link toValue} for the bare-form defaults.
208
+ *
209
+ * @example
210
+ * const attributes = {
211
+ * level: i32(10),
212
+ * balance: u256(1_000_000n),
213
+ * score: dec("3.5"),
214
+ * parent: key(parentKey),
215
+ * name: "Bob", // bare string -> str
216
+ * flagged: true, // bare boolean -> bool
217
+ * } satisfies AttributeInputs
218
+ */
219
+ type AttributeInputs = Readonly<Record<string, ValueInput>>;
220
+ /**
221
+ * The attributes read back from an entity: the same shape, with every value typed.
222
+ *
223
+ * A value read from here drops straight back into an {@link AttributeInputs} — the vocabulary is the
224
+ * same in both directions.
225
+ */
226
+ type Attributes = Readonly<Record<string, AnyArkivValue>>;
227
+ /**
228
+ * The names and types of an entity's attributes, with no values — what the `attributeSchema`
229
+ * projection returns.
230
+ *
231
+ * Useful for asking what shape the data has without paying to transfer it, and for telling apart
232
+ * two entities that use the same name with different types.
233
+ */
234
+ type AttributeSchema = Readonly<Record<string, TypeTag>>;
235
+ //#endregion
236
+ //#region src/attr/decimal.d.ts
237
+ /**
238
+ * Decimal places a `dec` value is scaled by. Fixed by the protocol, so any two decimals are
239
+ * directly comparable — and range-indexable — as plain integers.
240
+ */
241
+ declare const DECIMAL_SCALE = 18;
242
+ /** 10 ** {@link DECIMAL_SCALE} — the scaling factor between a `dec` and its integer units. */
243
+ declare const DECIMAL_UNIT: bigint;
244
+ //#endregion
245
+ //#region src/attr/errors.d.ts
246
+ /**
247
+ * A value was rejected by its tagged constructor — out of range, wrong length, bad checksum, too
248
+ * much precision, and so on.
249
+ *
250
+ * The message names the offending value and, where there is one, the type that *would* hold it, so
251
+ * the fix is in the error rather than in the docs.
252
+ */
253
+ declare class InvalidValueError extends Error {
254
+ /** The type tag whose constructor rejected the value. */
255
+ readonly tag: TypeTag;
256
+ /** The rejected input, as given. */
257
+ readonly input: unknown;
258
+ constructor(tag: TypeTag, input: unknown, reason: string, hint?: string);
259
+ }
260
+ /**
261
+ * A bare JavaScript value could not be given a type. Raised when an attribute or predicate is
262
+ * handed something that is neither a tagged value nor one of the four bare forms
263
+ * (`boolean`, `number`, `bigint`, `string`).
264
+ */
265
+ declare class UntypedValueError extends Error {
266
+ readonly input: unknown;
267
+ constructor(input: unknown);
268
+ }
269
+ /**
270
+ * An attribute was given `undefined` or `null` as its value.
271
+ *
272
+ * There is no such thing as an attribute with no value: an attribute either exists with a type, or
273
+ * is not set. The fix is always to leave the name out of the map rather than to write an empty
274
+ * value, so this is called out separately from {@link UntypedValueError} — the remedy is different.
275
+ */
276
+ declare class MissingValueError extends Error {
277
+ /** The attribute whose value was missing, when raised from an attribute map. */
278
+ readonly attributeName: string | undefined;
279
+ constructor(input: null | undefined, attributeName?: string);
280
+ }
281
+ /** An attribute name violated the on-chain name grammar. */
282
+ declare class InvalidAttributeNameError extends Error {
283
+ readonly attributeName: string;
284
+ constructor(attributeName: string, reason: string);
285
+ }
286
+ /**
287
+ * One patch tried to both write and remove the same attribute.
288
+ */
289
+ declare class ConflictingMutationError extends Error {
290
+ readonly attributeName: string;
291
+ constructor(attributeName: string);
292
+ }
293
+ /** More attributes were supplied than an entity operation can carry. */
294
+ declare class TooManyAttributesError extends Error {
295
+ constructor(count: number, max: number);
296
+ }
297
+ /** The node sent back an attribute this SDK cannot decode. */
298
+ declare class UnknownAttributeTypeError extends Error {
299
+ /** The type as the node named it — a tag over JSON-RPC, a typeId on the wire. */
300
+ readonly type: string | number;
301
+ constructor(type: string | number);
302
+ }
303
+ //#endregion
304
+ //#region src/attr/names.d.ts
305
+ /** The longest attribute name, in bytes — the width of the on-chain `Ident32` name cell. */
306
+ declare const MAX_NAME_BYTES = 32;
307
+ /**
308
+ * Validates an attribute name against the engine's `Ident32` grammar and the query language's
309
+ * reserved words.
310
+ *
311
+ * @param name - The attribute name.
312
+ * @throws {InvalidAttributeNameError} If the name is empty, too long, uses characters outside the
313
+ * grammar, or collides with a reserved word.
314
+ */
315
+ declare function validateAttributeName(name: string): void;
316
+ /** Whether `name` is a valid attribute name — the non-throwing form of {@link validateAttributeName}. */
317
+ declare function isValidAttributeName(name: string): boolean;
318
+ //#endregion
319
+ export { i32 as A, ValueInput as C, dec as D, bytes32 as E, u64 as F, str as M, toValue as N, decFromUnits as O, u256 as P, U64_MAX as S, bool as T, MAX_PAYLOAD_BYTES as _, InvalidAttributeNameError as a, MAX_STRING_BYTES as b, TooManyAttributesError as c, DECIMAL_SCALE as d, DECIMAL_UNIT as f, MAX_ATTRIBUTES as g, Attributes as h, ConflictingMutationError as i, key as j, decUnits as k, UnknownAttributeTypeError as l, AttributeSchema as m, isValidAttributeName as n, InvalidValueError as o, AttributeInputs as p, validateAttributeName as r, MissingValueError as s, MAX_NAME_BYTES as t, UntypedValueError as u, I32_MAX as v, addr as w, U256_MAX as x, I32_MIN as y };
320
+ //# sourceMappingURL=index-DvYvrkdk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DvYvrkdk.d.ts","names":[],"sources":["../src/attr/values.ts","../src/attr/attributes.ts","../src/attr/decimal.ts","../src/attr/errors.ts","../src/attr/names.ts"],"sourcesContent":[],"mappings":";;;;;cA6Ba,OAAA;AAAb;AAEa,cAAA,OAAA,GAAO,CAAA,UAAA;AAEpB;AAEa,cAFA,OAE0B,EAAA,MAAA;AAIvC;AAsBgB,cA1BH,QA0ByB,EAAA,MAAS;AAkB/C;AA8CA;AAoBA;AAgFgB,cA1LH,gBAAA,GA0LiD,GAAA;AA6B9D;AAUA;AAcA;AAwCA;AA8BA;;;;;AAgBgB,iBA/SA,IAAA,CA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