@arkiv-network/sdk 0.8.0-advanced.2 → 0.8.0-dev.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 (178) hide show
  1. package/README.md +0 -42
  2. package/dist/attr/index.cjs +33 -34
  3. package/dist/attr/index.d.cts +1 -1
  4. package/dist/attr/index.d.ts +1 -2
  5. package/dist/attr/index.js +1 -2
  6. package/dist/{attributes-Df9IsCVs.cjs → attr-BXTkpnoc.cjs} +13 -3
  7. package/dist/{attributes-BhY5DwJp.js → attr-tmyREHtw.js} +14 -4
  8. package/dist/attr-tmyREHtw.js.map +1 -0
  9. package/dist/chains/index.cjs +1 -1
  10. package/dist/chains/index.d.cts +3 -0
  11. package/dist/chains/index.d.cts.map +1 -1
  12. package/dist/chains/index.d.ts +3 -0
  13. package/dist/chains/index.d.ts.map +1 -1
  14. package/dist/chains/index.js +1 -1
  15. package/dist/{chains-BYRTTipa.cjs → chains-BfNQliHU.cjs} +3 -0
  16. package/dist/{chains-BJrZs6sG.js → chains-Du8tql7I.js} +4 -1
  17. package/dist/chains-Du8tql7I.js.map +1 -0
  18. package/dist/{arkivTransactions-NtGD6uk5.d.ts → changeOwnership-B0ar96ub.d.ts} +74 -123
  19. package/dist/changeOwnership-B0ar96ub.d.ts.map +1 -0
  20. package/dist/{arkivTransactions-D74gERHG.d.cts → changeOwnership-BofkLnXJ.d.cts} +74 -123
  21. package/dist/changeOwnership-BofkLnXJ.d.cts.map +1 -0
  22. package/dist/entity/index.cjs +9 -9
  23. package/dist/entity/index.d.cts +3 -3
  24. package/dist/entity/index.d.ts +4 -5
  25. package/dist/entity/index.js +5 -6
  26. package/dist/{entity-BYQR1uoe.js → entity-BIp_df9u.js} +1 -1
  27. package/dist/{entity-BYQR1uoe.js.map → entity-BIp_df9u.js.map} +1 -1
  28. package/dist/{key-D1Bh7MF0.js → entity-CniBgBSd.js} +31 -19
  29. package/dist/entity-CniBgBSd.js.map +1 -0
  30. package/dist/{key-WKhXnXuU.cjs → entity-DJ0Gml9c.cjs} +37 -19
  31. package/dist/{errors-LTe7bOYS.js → errors-D2E1GRjw.js} +2 -2
  32. package/dist/errors-D2E1GRjw.js.map +1 -0
  33. package/dist/{errors-BVbjKVMN.cjs → errors-DhV00966.cjs} +1 -1
  34. package/dist/{expiry-nDbCgZX4.d.ts → expiry-BxOlvVWC.d.ts} +1 -1
  35. package/dist/{expiry-nDbCgZX4.d.ts.map → expiry-BxOlvVWC.d.ts.map} +1 -1
  36. package/dist/{expiry-BELY2Kpw.cjs → expiry-CG9GhVXv.cjs} +1 -1
  37. package/dist/{expiry-BjpxZZQU.js → expiry-Cgdb_dbq.js} +2 -2
  38. package/dist/expiry-Cgdb_dbq.js.map +1 -0
  39. package/dist/expiry-DRV29F1r.d.cts.map +1 -1
  40. package/dist/{flags-CRjPpoh3.d.cts → flags-0Vl5rrHq.d.cts} +1 -1
  41. package/dist/{flags-CRjPpoh3.d.cts.map → flags-0Vl5rrHq.d.cts.map} +1 -1
  42. package/dist/{flags-kr276q6i.cjs → flags-DCD26uhe.cjs} +1 -1
  43. package/dist/{flags-DFBs2J94.js → flags-DUT2gHEU.js} +2 -2
  44. package/dist/{flags-DFBs2J94.js.map → flags-DUT2gHEU.js.map} +1 -1
  45. package/dist/{flags-5dTNRnow.d.ts → flags-wmcMoAnN.d.ts} +1 -1
  46. package/dist/{flags-5dTNRnow.d.ts.map → flags-wmcMoAnN.d.ts.map} +1 -1
  47. package/dist/{index-fX_XyqLp.d.ts → index-BGp2plHs.d.cts} +15 -13
  48. package/dist/index-BGp2plHs.d.cts.map +1 -0
  49. package/dist/{index-DHDud2hC.d.ts → index-BKB875Um.d.ts} +5 -7
  50. package/dist/{index-DHDud2hC.d.ts.map → index-BKB875Um.d.ts.map} +1 -1
  51. package/dist/{index-DvYvrkdk.d.ts → index-CIcHPx2j.d.cts} +110 -6
  52. package/dist/index-CIcHPx2j.d.cts.map +1 -0
  53. package/dist/{index-CV5zCdpa.d.cts → index-Cd2aaWme.d.ts} +13 -6
  54. package/dist/index-Cd2aaWme.d.ts.map +1 -0
  55. package/dist/{index-CA4V7Pdh.d.cts → index-ezMZ2-JH.d.ts} +15 -13
  56. package/dist/index-ezMZ2-JH.d.ts.map +1 -0
  57. package/dist/{index-BF7Mq9Is.d.cts → index-rINthNuU.d.cts} +5 -7
  58. package/dist/{index-BF7Mq9Is.d.cts.map → index-rINthNuU.d.cts.map} +1 -1
  59. package/dist/index.cjs +433 -139
  60. package/dist/index.d.cts +58 -164
  61. package/dist/index.d.cts.map +1 -1
  62. package/dist/index.d.ts +59 -166
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +376 -75
  65. package/dist/index.js.map +1 -1
  66. package/dist/{payload-CcUj85ys.d.ts → payload-CGvVPZQX.d.ts} +61 -2
  67. package/dist/payload-CGvVPZQX.d.ts.map +1 -0
  68. package/dist/{payload-Bz6651ax.js → payload-DE7wMztL.js} +28 -3
  69. package/dist/payload-DE7wMztL.js.map +1 -0
  70. package/dist/{payload-BNoud2KZ.d.cts → payload-Dfu30njp.d.cts} +60 -1
  71. package/dist/payload-Dfu30njp.d.cts.map +1 -0
  72. package/dist/{payload-KC14SDlN.cjs → payload-DqFweqiO.cjs} +27 -2
  73. package/dist/query/index.cjs +5 -7
  74. package/dist/query/index.d.cts +4 -4
  75. package/dist/query/index.d.ts +4 -5
  76. package/dist/query/index.js +5 -7
  77. package/dist/{queryBuilder-DM6AWCBa.js → queryBuilder-wvA8sn--.js} +169 -23
  78. package/dist/queryBuilder-wvA8sn--.js.map +1 -0
  79. package/dist/{queryBuilder-DbUMEZln.cjs → queryBuilder-zHGhDmaG.cjs} +215 -33
  80. package/dist/{selection-DPg0uyJf.d.cts → selection-Bv8_o-7i.d.cts} +76 -68
  81. package/dist/selection-Bv8_o-7i.d.cts.map +1 -0
  82. package/dist/{selection-C4UhsMOO.d.ts → selection-ox7zdtVm.d.ts} +76 -69
  83. package/dist/selection-ox7zdtVm.d.ts.map +1 -0
  84. package/dist/types/index.cjs +2 -2
  85. package/dist/types/index.d.cts +6 -6
  86. package/dist/types/index.d.ts +7 -8
  87. package/dist/types/index.js +2 -2
  88. package/dist/utils/index.cjs +3 -3
  89. package/dist/utils/index.d.cts +1 -1
  90. package/dist/utils/index.d.ts +2 -2
  91. package/dist/utils/index.js +3 -3
  92. package/package.json +1 -5
  93. package/src/actions/public/getEntity.ts +1 -0
  94. package/src/actions/public/predictEntityKeys.test.ts +17 -1
  95. package/src/actions/public/predictEntityKeys.ts +28 -14
  96. package/src/actions/public/query.ts +1 -5
  97. package/src/actions/wallet/createEntity.ts +7 -6
  98. package/src/actions/wallet/{mutateEntities.test.ts → executeBatch.test.ts} +7 -7
  99. package/src/actions/wallet/{mutateEntities.ts → executeBatch.ts} +26 -11
  100. package/src/actions/wallet/extendEntity.ts +1 -0
  101. package/src/actions/wallet/patchEntity.ts +3 -3
  102. package/src/attr/attributes.ts +8 -2
  103. package/src/attr/errors.ts +2 -2
  104. package/src/attr/types.ts +3 -3
  105. package/src/attr/values.ts +5 -1
  106. package/src/chains/localhost.ts +3 -0
  107. package/src/clients/createPublicClient.test.ts +1 -1
  108. package/src/clients/createPublicClient.ts +5 -5
  109. package/src/clients/createWalletClient.test.ts +2 -2
  110. package/src/clients/createWalletClient.ts +3 -5
  111. package/src/clients/decorators/arkivPublic.ts +13 -24
  112. package/src/clients/decorators/arkivWallet.ts +40 -47
  113. package/src/entity/create.test.ts +20 -1
  114. package/src/entity/errors.ts +4 -3
  115. package/src/entity/expiry.ts +1 -0
  116. package/src/entity/index.ts +2 -2
  117. package/src/entity/key.ts +23 -3
  118. package/src/entity/operations.ts +1 -0
  119. package/src/index.ts +0 -13
  120. package/src/query/engine.ts +0 -11
  121. package/src/query/errors.ts +1 -1
  122. package/src/query/expression.ts +14 -7
  123. package/src/query/queryBuilder.test.ts +1 -21
  124. package/src/query/queryBuilder.ts +3 -10
  125. package/src/types/index.ts +4 -4
  126. package/src/types/rpcSchema.ts +1 -0
  127. package/src/types/txParams.ts +8 -0
  128. package/src/utils/arkivTransactions.test.ts +7 -1
  129. package/src/utils/arkivTransactions.ts +114 -254
  130. package/src/utils/expirationTime.ts +39 -0
  131. package/src/utils/payload.ts +25 -0
  132. package/dist/actions/advanced/index.cjs +0 -13
  133. package/dist/actions/advanced/index.d.cts +0 -8
  134. package/dist/actions/advanced/index.d.ts +0 -9
  135. package/dist/actions/advanced/index.js +0 -9
  136. package/dist/advanced-8ZPTmmaN.js +0 -598
  137. package/dist/advanced-8ZPTmmaN.js.map +0 -1
  138. package/dist/advanced-fPImL6lW.cjs +0 -656
  139. package/dist/arkivTransactions-D74gERHG.d.cts.map +0 -1
  140. package/dist/arkivTransactions-NtGD6uk5.d.ts.map +0 -1
  141. package/dist/attributes-BhY5DwJp.js.map +0 -1
  142. package/dist/chains-BJrZs6sG.js.map +0 -1
  143. package/dist/codec-Car3KkFF.d.ts +0 -102
  144. package/dist/codec-Car3KkFF.d.ts.map +0 -1
  145. package/dist/entity-B7G8q_Eo.cjs +0 -0
  146. package/dist/entity-CD_qFF2M.js +0 -0
  147. package/dist/errors-LTe7bOYS.js.map +0 -1
  148. package/dist/expiry-BjpxZZQU.js.map +0 -1
  149. package/dist/index-B5j76711.d.ts +0 -184
  150. package/dist/index-B5j76711.d.ts.map +0 -1
  151. package/dist/index-CA4V7Pdh.d.cts.map +0 -1
  152. package/dist/index-CV5zCdpa.d.cts.map +0 -1
  153. package/dist/index-DvYvrkdk.d.ts.map +0 -1
  154. package/dist/index-EeUO0nnJ.d.cts +0 -184
  155. package/dist/index-EeUO0nnJ.d.cts.map +0 -1
  156. package/dist/index-fX_XyqLp.d.ts.map +0 -1
  157. package/dist/key-D1Bh7MF0.js.map +0 -1
  158. package/dist/logger-CVpvU8ik.js +0 -153
  159. package/dist/logger-CVpvU8ik.js.map +0 -1
  160. package/dist/logger-Cr15lPAQ.cjs +0 -188
  161. package/dist/payload-BNoud2KZ.d.cts.map +0 -1
  162. package/dist/payload-Bz6651ax.js.map +0 -1
  163. package/dist/payload-CcUj85ys.d.ts.map +0 -1
  164. package/dist/queryBuilder-DM6AWCBa.js.map +0 -1
  165. package/dist/selection-C4UhsMOO.d.ts.map +0 -1
  166. package/dist/selection-DPg0uyJf.d.cts.map +0 -1
  167. package/dist/types-Bu_ZwMbZ.js +0 -0
  168. package/dist/types-NRqymi6S.cjs +0 -0
  169. package/src/actions/advanced/advanced.test.ts +0 -258
  170. package/src/actions/advanced/buildMutation.ts +0 -104
  171. package/src/actions/advanced/getMutationResult.ts +0 -112
  172. package/src/actions/advanced/index.ts +0 -21
  173. package/src/actions/advanced/pingTransaction.ts +0 -43
  174. package/src/actions/advanced/sendMutation.ts +0 -59
  175. package/src/clients/decorators/arkivAdvanced.ts +0 -144
  176. /package/dist/{entity-B00Li04j.cjs → entity-B0t6sN7F.cjs} +0 -0
  177. /package/dist/{attr-DlmErkvR.cjs → types-Bx1EKe0v.js} +0 -0
  178. /package/dist/{attr-GcQKatub.js → types-CKPddlfS.cjs} +0 -0
@@ -1,5 +1,5 @@
1
- import { C as ValueInput, G as StrValue, R as ArkivValue, Y as UserTypeTag, h as Attributes, m as AttributeSchema } from "./index-CV5zCdpa.cjs";
2
- import { n as ResolvedCreationFlags } from "./flags-CRjPpoh3.cjs";
1
+ import { C as ValueInput, G as StrValue, R as ArkivValue, Y as UserTypeTag, h as Attributes, m as AttributeSchema } from "./index-CIcHPx2j.cjs";
2
+ import { n as ResolvedCreationFlags } from "./flags-0Vl5rrHq.cjs";
3
3
  import { Account, Chain, Client, Hex, RpcSchema, Transport } from "viem";
4
4
 
5
5
  //#region src/types/rpcSchema.d.ts
@@ -68,6 +68,7 @@ type RpcSelect = {
68
68
  attributeSchema?: boolean;
69
69
  attributes?: boolean | Record<string, boolean>;
70
70
  };
71
+ /** The second parameter of `arkiv_query` — what to return, and where in the results to start. */
71
72
  type RpcQueryOptions = {
72
73
  /** Block height to read at, as a hex quantity. Defaults to the head, and must be within the node's retained range. */
73
74
  atBlock?: Hex;
@@ -104,7 +105,69 @@ type ArkivRpcSchema = [{
104
105
  //#region src/clients/baseClient.d.ts
105
106
  type ArkivClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | undefined = Account | undefined, rpcSchema extends RpcSchema | undefined = ArkivRpcSchema> = Client<transport, chain, accountOrAddress, rpcSchema>;
106
107
  //#endregion
108
+ //#region src/types/entity.d.ts
109
+ /**
110
+ * The fields an {@link Entity} can carry. Every one is optional: a query returns exactly the parts
111
+ * it selected, and `undefined` means "not asked for" rather than "empty".
112
+ */
113
+ type EntityFields = {
114
+ key?: Hex | undefined;
115
+ owner?: Hex | undefined;
116
+ creator?: Hex | undefined;
117
+ /** Block the entity was created at. */
118
+ createdAt?: bigint | undefined;
119
+ /** Block the entity was last patched at. */
120
+ updatedAt?: bigint | undefined;
121
+ /** Block the entity expires at. */
122
+ expiresAt?: bigint | undefined;
123
+ /** The immutable properties the entity was created with. */
124
+ creationFlags?: ResolvedCreationFlags | undefined;
125
+ contentType?: string | undefined;
126
+ payload?: Uint8Array | undefined;
127
+ /** Attribute names and types, with no values. */
128
+ attributeSchema?: AttributeSchema | undefined;
129
+ /** Attribute names, types and values. */
130
+ attributes?: Attributes | undefined;
131
+ };
132
+ /**
133
+ * An entity as it comes back from a query.
134
+ *
135
+ * Which fields are populated is decided by the query's selection — `select({ key: true })` gives
136
+ * back an entity carrying only its key. The static type of a `select()` result is narrowed to
137
+ * exactly the selected fields, so in typed code the `undefined`s here are not reachable.
138
+ */
139
+ declare class Entity implements EntityFields {
140
+ key: Hex | undefined;
141
+ owner: Hex | undefined;
142
+ creator: Hex | undefined;
143
+ createdAt: bigint | undefined;
144
+ updatedAt: bigint | undefined;
145
+ expiresAt: bigint | undefined;
146
+ creationFlags: ResolvedCreationFlags | undefined;
147
+ contentType: string | undefined;
148
+ payload: Uint8Array | undefined;
149
+ attributeSchema: AttributeSchema | undefined;
150
+ attributes: Attributes | undefined;
151
+ constructor(fields?: EntityFields);
152
+ /**
153
+ * The payload decoded as UTF-8 text.
154
+ *
155
+ * @throws If the payload was not selected, or is not valid UTF-8.
156
+ */
157
+ toText(): string;
158
+ /**
159
+ * The payload parsed as JSON.
160
+ *
161
+ * @throws If the payload was not selected, is empty, or is not valid JSON.
162
+ */
163
+ toJson(): any;
164
+ }
165
+ //#endregion
107
166
  //#region src/query/expression.d.ts
167
+ /**
168
+ * The comparison operators the query language defines. `<` `<=` `>` `>=` need an ordered type —
169
+ * `i32`, `u64`, `u256` or `dec`; every type accepts `=` and `!=`.
170
+ */
108
171
  type ComparisonOperator = "=" | "!=" | "<" | "<=" | ">" | ">=";
109
172
  /** A comparison between an attribute and a typed literal. */
110
173
  type ComparisonNode = {
@@ -181,7 +244,7 @@ declare function eq(name: string, value: ValueInput): ComparisonNode;
181
244
  */
182
245
  declare function ne(name: string, value: ValueInput): ComparisonNode;
183
246
  /**
184
- * Attribute is greater than value. Ordered types only (`i32`, `u256`, `dec`).
247
+ * Attribute is greater than value. Ordered types only (`i32`, `u64`, `u256`, `dec`).
185
248
  *
186
249
  * @throws {UnsupportedOperatorError} If the value's type carries no ordered index.
187
250
  *
@@ -191,7 +254,7 @@ declare function ne(name: string, value: ValueInput): ComparisonNode;
191
254
  */
192
255
  declare function gt(name: string, value: ValueInput): ComparisonNode;
193
256
  /**
194
- * Attribute is greater than or equal to value. Ordered types only (`i32`, `u256`, `dec`).
257
+ * Attribute is greater than or equal to value. Ordered types only (`i32`, `u64`, `u256`, `dec`).
195
258
  *
196
259
  * @throws {UnsupportedOperatorError} If the value's type carries no ordered index.
197
260
  *
@@ -200,7 +263,7 @@ declare function gt(name: string, value: ValueInput): ComparisonNode;
200
263
  */
201
264
  declare function gte(name: string, value: ValueInput): ComparisonNode;
202
265
  /**
203
- * Attribute is less than value. Ordered types only (`i32`, `u256`, `dec`).
266
+ * Attribute is less than value. Ordered types only (`i32`, `u64`, `u256`, `dec`).
204
267
  *
205
268
  * @throws {UnsupportedOperatorError} If the value's type carries no ordered index.
206
269
  *
@@ -209,7 +272,7 @@ declare function gte(name: string, value: ValueInput): ComparisonNode;
209
272
  */
210
273
  declare function lt(name: string, value: ValueInput): ComparisonNode;
211
274
  /**
212
- * Attribute is less than or equal to value. Ordered types only (`i32`, `u256`, `dec`).
275
+ * Attribute is less than or equal to value. Ordered types only (`i32`, `u64`, `u256`, `dec`).
213
276
  *
214
277
  * @throws {UnsupportedOperatorError} If the value's type carries no ordered index.
215
278
  *
@@ -224,7 +287,9 @@ declare function lte(name: string, value: ValueInput): ComparisonNode;
224
287
  * `startsWith("name", "é")` matches only the same byte sequence, not another normal form of it.
225
288
  *
226
289
  * @param prefix - The prefix, as a bare string or a `str` value.
227
- * @throws {UnsupportedOperatorError} If given a value that is not a `str`.
290
+ * @throws {InvalidPredicateError} If the name is not a queryable attribute.
291
+ * @throws {UnsupportedOperatorError} If given a value that is not a `str`, or a system attribute
292
+ * (none of which is a `str`).
228
293
  *
229
294
  * @example
230
295
  * startsWith("desc", "ab") // desc STARTSWITH str('ab')
@@ -247,7 +312,8 @@ declare function exists(name: string): ExistsNode;
247
312
  * Useful when the same name is written with different types across entities — a comparison already
248
313
  * asserts the type, so this is for asking about the type alone.
249
314
  *
250
- * @param tag - The type tag: `bool`, `i32`, `u256`, `dec`, `bytes32`, `str`, `addr` or `key`.
315
+ * @param tag - The type tag: `bool`, `i32`, `u64`, `u256`, `dec`, `bytes32`, `str`, `addr` or
316
+ * `key`.
251
317
  * @throws {InvalidPredicateError} If the tag is not a settable type, or the name is a system
252
318
  * attribute (whose type is fixed).
253
319
  *
@@ -301,64 +367,6 @@ declare function or(...expressions: Expression[]): Expression;
301
367
  */
302
368
  declare function render(expression: Expression): string;
303
369
  //#endregion
304
- //#region src/types/entity.d.ts
305
- /**
306
- * The fields an {@link Entity} can carry. Every one is optional: a query returns exactly the parts
307
- * it selected, and `undefined` means "not asked for" rather than "empty".
308
- */
309
- type EntityFields = {
310
- key?: Hex | undefined;
311
- owner?: Hex | undefined;
312
- creator?: Hex | undefined;
313
- /** Block the entity was created at. */
314
- createdAt?: bigint | undefined;
315
- /** Block the entity was last patched at. */
316
- updatedAt?: bigint | undefined;
317
- /** Block the entity expires at. */
318
- expiresAt?: bigint | undefined;
319
- /** The immutable properties the entity was created with. */
320
- creationFlags?: ResolvedCreationFlags | undefined;
321
- contentType?: string | undefined;
322
- payload?: Uint8Array | undefined;
323
- /** Attribute names and types, with no values. */
324
- attributeSchema?: AttributeSchema | undefined;
325
- /** Attribute names, types and values. */
326
- attributes?: Attributes | undefined;
327
- };
328
- /**
329
- * An entity as it comes back from a query.
330
- *
331
- * Which fields are populated is decided by the query's selection — `select({ key: true })` gives
332
- * back an entity carrying only its key. The static type of a `select()` result is narrowed to
333
- * exactly the selected fields, so in typed code the `undefined`s here are not reachable.
334
- */
335
- declare class Entity implements EntityFields {
336
- key: Hex | undefined;
337
- owner: Hex | undefined;
338
- creator: Hex | undefined;
339
- createdAt: bigint | undefined;
340
- updatedAt: bigint | undefined;
341
- expiresAt: bigint | undefined;
342
- creationFlags: ResolvedCreationFlags | undefined;
343
- contentType: string | undefined;
344
- payload: Uint8Array | undefined;
345
- attributeSchema: AttributeSchema | undefined;
346
- attributes: Attributes | undefined;
347
- constructor(fields?: EntityFields);
348
- /**
349
- * The payload decoded as UTF-8 text.
350
- *
351
- * @throws If the payload was not selected, or is not valid UTF-8.
352
- */
353
- toText(): string;
354
- /**
355
- * The payload parsed as JSON.
356
- *
357
- * @throws If the payload was not selected, is empty, or is not valid JSON.
358
- */
359
- toJson(): any;
360
- }
361
- //#endregion
362
370
  //#region src/query/selection.d.ts
363
371
  /**
364
372
  * The entity fields a query can select. Each maps one-to-one onto a field of {@link Entity}.
@@ -429,5 +437,5 @@ type FullEntity = ProjectedEntity<AllSelected>;
429
437
  */
430
438
  declare function toRpcSelect(selection?: SelectArg): RpcSelect;
431
439
  //#endregion
432
- export { startsWith as A, hasType as C, not as D, ne as E, RpcCreationFlags as F, RpcEntity as I, RpcQueryOptions as L, ArkivRpcSchema as M, RpcAttribute as N, or as O, RpcAttributeSchemaEntry as P, RpcSelect as R, gte as S, lte as T, TypeOfNode as _, SelectionFields as a, exists as b, EntityFields as c, ComparisonOperator as d, ExistsNode as f, StartsWithNode as g, OrNode as h, SelectArg as i, ArkivClient as j, render as k, AndNode as l, NotNode as m, FullEntity as n, toRpcSelect as o, Expression as p, ProjectedEntity as r, Entity as s, EntitySelection as t, ComparisonNode as u, and as v, lt as w, gt as x, eq as y };
433
- //# sourceMappingURL=selection-DPg0uyJf.d.cts.map
440
+ export { EntityFields as A, lte as C, render as D, or as E, RpcCreationFlags as F, RpcEntity as I, RpcQueryOptions as L, ArkivRpcSchema as M, RpcAttribute as N, startsWith as O, RpcAttributeSchemaEntry as P, RpcSelect as R, lt as S, not as T, eq as _, SelectionFields as a, gte as b, ComparisonNode as c, Expression as d, NotNode as f, and as g, TypeOfNode as h, SelectArg as i, ArkivClient as j, Entity as k, ComparisonOperator as l, StartsWithNode as m, FullEntity as n, toRpcSelect as o, OrNode as p, ProjectedEntity as r, AndNode as s, EntitySelection as t, ExistsNode as u, exists as v, ne as w, hasType as x, gt as y };
441
+ //# sourceMappingURL=selection-Bv8_o-7i.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-Bv8_o-7i.d.cts","names":[],"sources":["../src/types/rpcSchema.ts","../src/clients/baseClient.ts","../src/types/entity.ts","../src/query/expression.ts","../src/query/selection.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAWA;AAOA;AAQA;AAUA;;AAEU,KA3BE,YAAA,GA2BF;EACE,IAAA,EAAA,MAAA;EACE,IAAA,EAAA,MAAA;EACA,KAAA,EAAA,OAAA;CACA;;AAGF,KA3BA,uBAAA,GA2BA;EACQ,IAAA,EAAA,MAAA;EACL,IAAA,EAAA,MAAA;CAAY;AAU3B;AAeA;;AAIW,KAlDC,gBAAA,GAkDD;EAED,QAAA,CAAA,EAAA,OAAA;EAAG,uBAAA,CAAA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A,GAAA,KAAA,GAAA,IAAA;;;;;;;;;AAEjB,KG4DE,eH5DF,CAAA,CAAA,CAAA,GAAA,uBG6Da,KAAK,SAAS,EAAE,mBAAmB,YAAY,gBAAgB,SAChF,YAAY,OAAO,iBAEpB;;AFhEL,CAAA,GEgEmC,IFhEvB,CEgE4B,MFhE5B,EAAA,QAAY,GAAA,QAAA,CAAA,GAAA,OAAA,CAAA;;KEmEnB,WAAA,GFjEK,QACE,CAAA,OEgEuB,cFhEvB,CAAA,CAAA,MAAA,CAAA,GAAA,IAAA,EAQM;;AAIE,KEuDR,UAAA,GAAa,eFvDL,CEuDqB,WFvDrB,CAAA;;;AAYpB;;;;;;;;;;;;;;ACjBY,iBC8EI,WAAA,CD9Ec,SAAA,CAAA,EC8EU,SD9EV,CAAA,EC8EsB,SD9EtB"}
@@ -1,6 +1,5 @@
1
- import { m as UserTypeTag, r as ArkivValue, u as StrValue } from "./codec-Car3KkFF.js";
2
- import { C as ValueInput, h as Attributes, m as AttributeSchema } from "./index-DvYvrkdk.js";
3
- import { n as ResolvedCreationFlags } from "./flags-5dTNRnow.js";
1
+ import { C as ValueInput, G as StrValue, R as ArkivValue, Y as UserTypeTag, h as Attributes, m as AttributeSchema } from "./index-Cd2aaWme.js";
2
+ import { n as ResolvedCreationFlags } from "./flags-wmcMoAnN.js";
4
3
  import { Account, Chain, Client, Hex, RpcSchema, Transport } from "viem";
5
4
 
6
5
  //#region src/types/rpcSchema.d.ts
@@ -69,6 +68,7 @@ type RpcSelect = {
69
68
  attributeSchema?: boolean;
70
69
  attributes?: boolean | Record<string, boolean>;
71
70
  };
71
+ /** The second parameter of `arkiv_query` — what to return, and where in the results to start. */
72
72
  type RpcQueryOptions = {
73
73
  /** Block height to read at, as a hex quantity. Defaults to the head, and must be within the node's retained range. */
74
74
  atBlock?: Hex;
@@ -105,7 +105,69 @@ type ArkivRpcSchema = [{
105
105
  //#region src/clients/baseClient.d.ts
106
106
  type ArkivClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, accountOrAddress extends Account | undefined = Account | undefined, rpcSchema extends RpcSchema | undefined = ArkivRpcSchema> = Client<transport, chain, accountOrAddress, rpcSchema>;
107
107
  //#endregion
108
+ //#region src/types/entity.d.ts
109
+ /**
110
+ * The fields an {@link Entity} can carry. Every one is optional: a query returns exactly the parts
111
+ * it selected, and `undefined` means "not asked for" rather than "empty".
112
+ */
113
+ type EntityFields = {
114
+ key?: Hex | undefined;
115
+ owner?: Hex | undefined;
116
+ creator?: Hex | undefined;
117
+ /** Block the entity was created at. */
118
+ createdAt?: bigint | undefined;
119
+ /** Block the entity was last patched at. */
120
+ updatedAt?: bigint | undefined;
121
+ /** Block the entity expires at. */
122
+ expiresAt?: bigint | undefined;
123
+ /** The immutable properties the entity was created with. */
124
+ creationFlags?: ResolvedCreationFlags | undefined;
125
+ contentType?: string | undefined;
126
+ payload?: Uint8Array | undefined;
127
+ /** Attribute names and types, with no values. */
128
+ attributeSchema?: AttributeSchema | undefined;
129
+ /** Attribute names, types and values. */
130
+ attributes?: Attributes | undefined;
131
+ };
132
+ /**
133
+ * An entity as it comes back from a query.
134
+ *
135
+ * Which fields are populated is decided by the query's selection — `select({ key: true })` gives
136
+ * back an entity carrying only its key. The static type of a `select()` result is narrowed to
137
+ * exactly the selected fields, so in typed code the `undefined`s here are not reachable.
138
+ */
139
+ declare class Entity implements EntityFields {
140
+ key: Hex | undefined;
141
+ owner: Hex | undefined;
142
+ creator: Hex | undefined;
143
+ createdAt: bigint | undefined;
144
+ updatedAt: bigint | undefined;
145
+ expiresAt: bigint | undefined;
146
+ creationFlags: ResolvedCreationFlags | undefined;
147
+ contentType: string | undefined;
148
+ payload: Uint8Array | undefined;
149
+ attributeSchema: AttributeSchema | undefined;
150
+ attributes: Attributes | undefined;
151
+ constructor(fields?: EntityFields);
152
+ /**
153
+ * The payload decoded as UTF-8 text.
154
+ *
155
+ * @throws If the payload was not selected, or is not valid UTF-8.
156
+ */
157
+ toText(): string;
158
+ /**
159
+ * The payload parsed as JSON.
160
+ *
161
+ * @throws If the payload was not selected, is empty, or is not valid JSON.
162
+ */
163
+ toJson(): any;
164
+ }
165
+ //#endregion
108
166
  //#region src/query/expression.d.ts
167
+ /**
168
+ * The comparison operators the query language defines. `<` `<=` `>` `>=` need an ordered type —
169
+ * `i32`, `u64`, `u256` or `dec`; every type accepts `=` and `!=`.
170
+ */
109
171
  type ComparisonOperator = "=" | "!=" | "<" | "<=" | ">" | ">=";
110
172
  /** A comparison between an attribute and a typed literal. */
111
173
  type ComparisonNode = {
@@ -182,7 +244,7 @@ declare function eq(name: string, value: ValueInput): ComparisonNode;
182
244
  */
183
245
  declare function ne(name: string, value: ValueInput): ComparisonNode;
184
246
  /**
185
- * Attribute is greater than value. Ordered types only (`i32`, `u256`, `dec`).
247
+ * Attribute is greater than value. Ordered types only (`i32`, `u64`, `u256`, `dec`).
186
248
  *
187
249
  * @throws {UnsupportedOperatorError} If the value's type carries no ordered index.
188
250
  *
@@ -192,7 +254,7 @@ declare function ne(name: string, value: ValueInput): ComparisonNode;
192
254
  */
193
255
  declare function gt(name: string, value: ValueInput): ComparisonNode;
194
256
  /**
195
- * Attribute is greater than or equal to value. Ordered types only (`i32`, `u256`, `dec`).
257
+ * Attribute is greater than or equal to value. Ordered types only (`i32`, `u64`, `u256`, `dec`).
196
258
  *
197
259
  * @throws {UnsupportedOperatorError} If the value's type carries no ordered index.
198
260
  *
@@ -201,7 +263,7 @@ declare function gt(name: string, value: ValueInput): ComparisonNode;
201
263
  */
202
264
  declare function gte(name: string, value: ValueInput): ComparisonNode;
203
265
  /**
204
- * Attribute is less than value. Ordered types only (`i32`, `u256`, `dec`).
266
+ * Attribute is less than value. Ordered types only (`i32`, `u64`, `u256`, `dec`).
205
267
  *
206
268
  * @throws {UnsupportedOperatorError} If the value's type carries no ordered index.
207
269
  *
@@ -210,7 +272,7 @@ declare function gte(name: string, value: ValueInput): ComparisonNode;
210
272
  */
211
273
  declare function lt(name: string, value: ValueInput): ComparisonNode;
212
274
  /**
213
- * Attribute is less than or equal to value. Ordered types only (`i32`, `u256`, `dec`).
275
+ * Attribute is less than or equal to value. Ordered types only (`i32`, `u64`, `u256`, `dec`).
214
276
  *
215
277
  * @throws {UnsupportedOperatorError} If the value's type carries no ordered index.
216
278
  *
@@ -225,7 +287,9 @@ declare function lte(name: string, value: ValueInput): ComparisonNode;
225
287
  * `startsWith("name", "é")` matches only the same byte sequence, not another normal form of it.
226
288
  *
227
289
  * @param prefix - The prefix, as a bare string or a `str` value.
228
- * @throws {UnsupportedOperatorError} If given a value that is not a `str`.
290
+ * @throws {InvalidPredicateError} If the name is not a queryable attribute.
291
+ * @throws {UnsupportedOperatorError} If given a value that is not a `str`, or a system attribute
292
+ * (none of which is a `str`).
229
293
  *
230
294
  * @example
231
295
  * startsWith("desc", "ab") // desc STARTSWITH str('ab')
@@ -248,7 +312,8 @@ declare function exists(name: string): ExistsNode;
248
312
  * Useful when the same name is written with different types across entities — a comparison already
249
313
  * asserts the type, so this is for asking about the type alone.
250
314
  *
251
- * @param tag - The type tag: `bool`, `i32`, `u256`, `dec`, `bytes32`, `str`, `addr` or `key`.
315
+ * @param tag - The type tag: `bool`, `i32`, `u64`, `u256`, `dec`, `bytes32`, `str`, `addr` or
316
+ * `key`.
252
317
  * @throws {InvalidPredicateError} If the tag is not a settable type, or the name is a system
253
318
  * attribute (whose type is fixed).
254
319
  *
@@ -302,64 +367,6 @@ declare function or(...expressions: Expression[]): Expression;
302
367
  */
303
368
  declare function render(expression: Expression): string;
304
369
  //#endregion
305
- //#region src/types/entity.d.ts
306
- /**
307
- * The fields an {@link Entity} can carry. Every one is optional: a query returns exactly the parts
308
- * it selected, and `undefined` means "not asked for" rather than "empty".
309
- */
310
- type EntityFields = {
311
- key?: Hex | undefined;
312
- owner?: Hex | undefined;
313
- creator?: Hex | undefined;
314
- /** Block the entity was created at. */
315
- createdAt?: bigint | undefined;
316
- /** Block the entity was last patched at. */
317
- updatedAt?: bigint | undefined;
318
- /** Block the entity expires at. */
319
- expiresAt?: bigint | undefined;
320
- /** The immutable properties the entity was created with. */
321
- creationFlags?: ResolvedCreationFlags | undefined;
322
- contentType?: string | undefined;
323
- payload?: Uint8Array | undefined;
324
- /** Attribute names and types, with no values. */
325
- attributeSchema?: AttributeSchema | undefined;
326
- /** Attribute names, types and values. */
327
- attributes?: Attributes | undefined;
328
- };
329
- /**
330
- * An entity as it comes back from a query.
331
- *
332
- * Which fields are populated is decided by the query's selection — `select({ key: true })` gives
333
- * back an entity carrying only its key. The static type of a `select()` result is narrowed to
334
- * exactly the selected fields, so in typed code the `undefined`s here are not reachable.
335
- */
336
- declare class Entity implements EntityFields {
337
- key: Hex | undefined;
338
- owner: Hex | undefined;
339
- creator: Hex | undefined;
340
- createdAt: bigint | undefined;
341
- updatedAt: bigint | undefined;
342
- expiresAt: bigint | undefined;
343
- creationFlags: ResolvedCreationFlags | undefined;
344
- contentType: string | undefined;
345
- payload: Uint8Array | undefined;
346
- attributeSchema: AttributeSchema | undefined;
347
- attributes: Attributes | undefined;
348
- constructor(fields?: EntityFields);
349
- /**
350
- * The payload decoded as UTF-8 text.
351
- *
352
- * @throws If the payload was not selected, or is not valid UTF-8.
353
- */
354
- toText(): string;
355
- /**
356
- * The payload parsed as JSON.
357
- *
358
- * @throws If the payload was not selected, is empty, or is not valid JSON.
359
- */
360
- toJson(): any;
361
- }
362
- //#endregion
363
370
  //#region src/query/selection.d.ts
364
371
  /**
365
372
  * The entity fields a query can select. Each maps one-to-one onto a field of {@link Entity}.
@@ -430,5 +437,5 @@ type FullEntity = ProjectedEntity<AllSelected>;
430
437
  */
431
438
  declare function toRpcSelect(selection?: SelectArg): RpcSelect;
432
439
  //#endregion
433
- export { startsWith as A, hasType as C, not as D, ne as E, RpcCreationFlags as F, RpcEntity as I, RpcQueryOptions as L, ArkivRpcSchema as M, RpcAttribute as N, or as O, RpcAttributeSchemaEntry as P, RpcSelect as R, gte as S, lte as T, TypeOfNode as _, SelectionFields as a, exists as b, EntityFields as c, ComparisonOperator as d, ExistsNode as f, StartsWithNode as g, OrNode as h, SelectArg as i, ArkivClient as j, render as k, AndNode as l, NotNode as m, FullEntity as n, toRpcSelect as o, Expression as p, ProjectedEntity as r, Entity as s, EntitySelection as t, ComparisonNode as u, and as v, lt as w, gt as x, eq as y };
434
- //# sourceMappingURL=selection-C4UhsMOO.d.ts.map
440
+ export { EntityFields as A, lte as C, render as D, or as E, RpcCreationFlags as F, RpcEntity as I, RpcQueryOptions as L, ArkivRpcSchema as M, RpcAttribute as N, startsWith as O, RpcAttributeSchemaEntry as P, RpcSelect as R, lt as S, not as T, eq as _, SelectionFields as a, gte as b, ComparisonNode as c, Expression as d, NotNode as f, and as g, TypeOfNode as h, SelectArg as i, ArkivClient as j, Entity as k, ComparisonOperator as l, StartsWithNode as m, FullEntity as n, toRpcSelect as o, OrNode as p, ProjectedEntity as r, AndNode as s, EntitySelection as t, ExistsNode as u, exists as v, ne as w, hasType as x, gt as y };
441
+ //# sourceMappingURL=selection-ox7zdtVm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-ox7zdtVm.d.ts","names":[],"sources":["../src/types/rpcSchema.ts","../src/clients/baseClient.ts","../src/types/entity.ts","../src/query/expression.ts","../src/query/selection.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;AAWA;AAOA;AAQA;AAUA;;AAEU,KA3BE,YAAA,GA2BF;EACE,IAAA,EAAA,MAAA;EACE,IAAA,EAAA,MAAA;EACA,KAAA,EAAA,OAAA;CACA;;AAGF,KA3BA,uBAAA,GA2BA;EACQ,IAAA,EAAA,MAAA;EACL,IAAA,EAAA,MAAA;CAAY;AAU3B;AAeA;;AAIW,KAlDC,gBAAA,GAkDD;EAED,QAAA,CAAA,EAAA,OAAA;EAAG,uBAAA,CAAA,EAAA,OAAA;EAKD,GAAA,EAAA,MAAA;CAGoC;;;;;KAlDpC,SAAA;QACJ;EClCI,KAAA,CAAA,EDmCF,GCnCE;EACQ,OAAA,CAAA,E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,gBAAgB,SAChF,YAAY,OAAO,iBAEpB;;AFhEL,CAAA,GEgEmC,IFhEvB,CEgE4B,MFhE5B,EAAA,QAAY,GAAA,QAAA,CAAA,GAAA,OAAA,CAAA;;KEmEnB,WAAA,GFjEK,QACE,CAAA,OEgEuB,cFhEvB,CAAA,CAAA,MAAA,CAAA,GAAA,IAAA,EAQM;;AAIE,KEuDR,UAAA,GAAa,eFvDL,CEuDqB,WFvDrB,CAAA;;;AAYpB;;;;;;;;;;;;;;ACjBY,iBC8EI,WAAA,CD9Ec,SAAA,CAAA,EC8EU,SD9EV,CAAA,EC8EsB,SD9EtB"}
@@ -1,4 +1,4 @@
1
- const require_entity = require('../entity-B00Li04j.cjs');
2
- require('../types-NRqymi6S.cjs');
1
+ const require_entity = require('../entity-B0t6sN7F.cjs');
2
+ require('../types-CKPddlfS.cjs');
3
3
 
4
4
  exports.Entity = require_entity.Entity;
@@ -1,7 +1,7 @@
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, s as Entity } from "../selection-DPg0uyJf.cjs";
2
- import "../index-CV5zCdpa.cjs";
1
+ import "../index-CIcHPx2j.cjs";
2
+ import "../index-BGp2plHs.cjs";
3
3
  import "../expiry-DRV29F1r.cjs";
4
- import "../index-CA4V7Pdh.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, b as WatchEntityEventsParameters, c as TxParams, d as PatchEntityReturnType, f as MutateEntitiesParameters, g as DeleteEntityParameters, h as ExtendEntityReturnType, j as PredictEntityKeysReturnType, k as QueryReturnType, l as MimeType, m as ExtendEntityParameters, o as ChangeOwnershipParameters, p as MutateEntitiesReturnType, s as ChangeOwnershipReturnType, u as PatchEntityParameters, v as CreateEntityParameters, w as EntityEventContext, x as EntityCreatedEvent, y as CreateEntityReturnType } from "../arkivTransactions-D74gERHG.cjs";
6
- import "../flags-CRjPpoh3.cjs";
7
- export { ArkivRpcSchema, ChangeOwnershipParameters, ChangeOwnershipReturnType, CreateEntityParameters, CreateEntityReturnType, DeleteEntityParameters, DeleteEntityReturnType, Entity, EntityCreatedEvent, EntityDeletedEvent, EntityEvent, EntityEventContext, EntityFields, EntityPatchedEvent, ExpiryExtendedEvent, ExtendEntityParameters, ExtendEntityReturnType, GetBlockTimingReturnType, MimeType, MutateEntitiesParameters, MutateEntitiesReturnType, OwnershipTransferredEvent, PatchEntityParameters, PatchEntityReturnType, PredictEntityKeysParameters, PredictEntityKeysReturnType, PredictedEntityKey, QueryOptions, QueryReturnType, RpcAttribute, RpcAttributeSchemaEntry, RpcCreationFlags, RpcEntity, RpcQueryOptions, RpcSelect, TxParams, WatchEntityEventsParameters };
4
+ import "../flags-0Vl5rrHq.cjs";
5
+ import { A as EntityFields, F as RpcCreationFlags, I as RpcEntity, L as RpcQueryOptions, M as ArkivRpcSchema, N as RpcAttribute, P as RpcAttributeSchemaEntry, R as RpcSelect, k as Entity } from "../selection-Bv8_o-7i.cjs";
6
+ import { C as QueryOptions, D as PredictedEntityKey, E as PredictEntityKeysReturnType, O as GetBlockTimingReturnType, S as OwnershipTransferredEvent, T as PredictEntityKeysParameters, _ as EntityDeletedEvent, a as ExecuteBatchParameters, b as EntityPatchedEvent, c as PatchEntityReturnType, d as DeleteEntityParameters, f as DeleteEntityReturnType, g as EntityCreatedEvent, h as WatchEntityEventsParameters, i as MimeType, l as ExtendEntityParameters, m as CreateEntityReturnType, n as ChangeOwnershipReturnType, o as ExecuteBatchReturnType, p as CreateEntityParameters, r as TxParams, s as PatchEntityParameters, t as ChangeOwnershipParameters, u as ExtendEntityReturnType, v as EntityEvent, w as QueryReturnType, x as ExpiryExtendedEvent, y as EntityEventContext } from "../changeOwnership-BofkLnXJ.cjs";
7
+ export { ArkivRpcSchema, ChangeOwnershipParameters, ChangeOwnershipReturnType, CreateEntityParameters, CreateEntityReturnType, DeleteEntityParameters, DeleteEntityReturnType, Entity, EntityCreatedEvent, EntityDeletedEvent, EntityEvent, EntityEventContext, EntityFields, EntityPatchedEvent, ExecuteBatchParameters, ExecuteBatchReturnType, ExpiryExtendedEvent, ExtendEntityParameters, ExtendEntityReturnType, GetBlockTimingReturnType, MimeType, OwnershipTransferredEvent, PatchEntityParameters, PatchEntityReturnType, PredictEntityKeysParameters, PredictEntityKeysReturnType, PredictedEntityKey, QueryOptions, QueryReturnType, RpcAttribute, RpcAttributeSchemaEntry, RpcCreationFlags, RpcEntity, RpcQueryOptions, RpcSelect, TxParams, WatchEntityEventsParameters };
@@ -1,8 +1,7 @@
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, s as Entity } from "../selection-C4UhsMOO.js";
2
- import "../codec-Car3KkFF.js";
3
- import "../expiry-nDbCgZX4.js";
4
- import "../index-fX_XyqLp.js";
5
- import { A as PredictEntityKeysParameters, C as EntityEvent, D as OwnershipTransferredEvent, E as ExpiryExtendedEvent, M as PredictedEntityKey, N as GetBlockTimingReturnType, O as QueryOptions, S as EntityDeletedEvent, T as EntityPatchedEvent, _ as DeleteEntityReturnType, b as WatchEntityEventsParameters, c as TxParams, d as PatchEntityReturnType, f as MutateEntitiesParameters, g as DeleteEntityParameters, h as ExtendEntityReturnType, j as PredictEntityKeysReturnType, k as QueryReturnType, l as MimeType, m as ExtendEntityParameters, o as ChangeOwnershipParameters, p as MutateEntitiesReturnType, s as ChangeOwnershipReturnType, u as PatchEntityParameters, v as CreateEntityParameters, w as EntityEventContext, x as EntityCreatedEvent, y as CreateEntityReturnType } from "../arkivTransactions-NtGD6uk5.js";
6
- import "../index-DvYvrkdk.js";
7
- import "../flags-5dTNRnow.js";
8
- export { ArkivRpcSchema, ChangeOwnershipParameters, ChangeOwnershipReturnType, CreateEntityParameters, CreateEntityReturnType, DeleteEntityParameters, DeleteEntityReturnType, Entity, EntityCreatedEvent, EntityDeletedEvent, EntityEvent, EntityEventContext, EntityFields, EntityPatchedEvent, ExpiryExtendedEvent, ExtendEntityParameters, ExtendEntityReturnType, GetBlockTimingReturnType, MimeType, MutateEntitiesParameters, MutateEntitiesReturnType, OwnershipTransferredEvent, PatchEntityParameters, PatchEntityReturnType, PredictEntityKeysParameters, PredictEntityKeysReturnType, PredictedEntityKey, QueryOptions, QueryReturnType, RpcAttribute, RpcAttributeSchemaEntry, RpcCreationFlags, RpcEntity, RpcQueryOptions, RpcSelect, TxParams, WatchEntityEventsParameters };
1
+ import "../index-Cd2aaWme.js";
2
+ import "../index-ezMZ2-JH.js";
3
+ import "../expiry-BxOlvVWC.js";
4
+ import "../flags-wmcMoAnN.js";
5
+ import { A as EntityFields, F as RpcCreationFlags, I as RpcEntity, L as RpcQueryOptions, M as ArkivRpcSchema, N as RpcAttribute, P as RpcAttributeSchemaEntry, R as RpcSelect, k as Entity } from "../selection-ox7zdtVm.js";
6
+ import { C as QueryOptions, D as PredictedEntityKey, E as PredictEntityKeysReturnType, O as GetBlockTimingReturnType, S as OwnershipTransferredEvent, T as PredictEntityKeysParameters, _ as EntityDeletedEvent, a as ExecuteBatchParameters, b as EntityPatchedEvent, c as PatchEntityReturnType, d as DeleteEntityParameters, f as DeleteEntityReturnType, g as EntityCreatedEvent, h as WatchEntityEventsParameters, i as MimeType, l as ExtendEntityParameters, m as CreateEntityReturnType, n as ChangeOwnershipReturnType, o as ExecuteBatchReturnType, p as CreateEntityParameters, r as TxParams, s as PatchEntityParameters, t as ChangeOwnershipParameters, u as ExtendEntityReturnType, v as EntityEvent, w as QueryReturnType, x as ExpiryExtendedEvent, y as EntityEventContext } from "../changeOwnership-B0ar96ub.js";
7
+ export { ArkivRpcSchema, ChangeOwnershipParameters, ChangeOwnershipReturnType, CreateEntityParameters, CreateEntityReturnType, DeleteEntityParameters, DeleteEntityReturnType, Entity, EntityCreatedEvent, EntityDeletedEvent, EntityEvent, EntityEventContext, EntityFields, EntityPatchedEvent, ExecuteBatchParameters, ExecuteBatchReturnType, ExpiryExtendedEvent, ExtendEntityParameters, ExtendEntityReturnType, GetBlockTimingReturnType, MimeType, OwnershipTransferredEvent, PatchEntityParameters, PatchEntityReturnType, PredictEntityKeysParameters, PredictEntityKeysReturnType, PredictedEntityKey, QueryOptions, QueryReturnType, RpcAttribute, RpcAttributeSchemaEntry, RpcCreationFlags, RpcEntity, RpcQueryOptions, RpcSelect, TxParams, WatchEntityEventsParameters };
@@ -1,4 +1,4 @@
1
- import { t as Entity } from "../entity-BYQR1uoe.js";
2
- import "../types-Bu_ZwMbZ.js";
1
+ import { t as Entity } from "../entity-BIp_df9u.js";
2
+ import "../types-Bx1EKe0v.js";
3
3
 
4
4
  export { Entity };
@@ -1,6 +1,6 @@
1
- require('../expiry-BELY2Kpw.cjs');
2
- require('../errors-BVbjKVMN.cjs');
3
- const require_payload = require('../payload-KC14SDlN.cjs');
1
+ require('../errors-DhV00966.cjs');
2
+ require('../expiry-CG9GhVXv.cjs');
3
+ const require_payload = require('../payload-DqFweqiO.cjs');
4
4
 
5
5
  exports.ExpirationTime = require_payload.ExpirationTime;
6
6
  exports.jsonToPayload = require_payload.jsonToPayload;
@@ -1,3 +1,3 @@
1
1
  import "../expiry-DRV29F1r.cjs";
2
- import { i as ExpirationTime, n as stringToPayload, r as DeadlineOptions, t as jsonToPayload } from "../payload-BNoud2KZ.cjs";
2
+ import { i as ExpirationTime, n as stringToPayload, r as DeadlineOptions, t as jsonToPayload } from "../payload-Dfu30njp.cjs";
3
3
  export { DeadlineOptions, ExpirationTime, jsonToPayload, stringToPayload };
@@ -1,3 +1,3 @@
1
- import "../expiry-nDbCgZX4.js";
2
- import { i as ExpirationTime, n as stringToPayload, r as DeadlineOptions, t as jsonToPayload } from "../payload-CcUj85ys.js";
1
+ import "../expiry-BxOlvVWC.js";
2
+ import { i as ExpirationTime, n as stringToPayload, r as DeadlineOptions, t as jsonToPayload } from "../payload-CGvVPZQX.js";
3
3
  export { DeadlineOptions, ExpirationTime, jsonToPayload, stringToPayload };
@@ -1,5 +1,5 @@
1
- import "../expiry-BjpxZZQU.js";
2
- import "../errors-LTe7bOYS.js";
3
- import { n as stringToPayload, r as ExpirationTime, t as jsonToPayload } from "../payload-Bz6651ax.js";
1
+ import "../errors-D2E1GRjw.js";
2
+ import "../expiry-Cgdb_dbq.js";
3
+ import { n as stringToPayload, r as ExpirationTime, t as jsonToPayload } from "../payload-DE7wMztL.js";
4
4
 
5
5
  export { ExpirationTime, jsonToPayload, stringToPayload };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkiv-network/sdk",
3
- "version": "0.8.0-advanced.2",
3
+ "version": "0.8.0-dev.2",
4
4
  "description": "TypeScript client library for Arkiv's blockchains interactions",
5
5
  "type": "module",
6
6
  "target": "esnext",
@@ -85,8 +85,6 @@
85
85
  "lint": "biome check src/",
86
86
  "lint:fix": "biome check --write src/",
87
87
  "test:unit": "bun test src/**/*",
88
- "docs": "bunx typedoc --plugin typedoc-plugin-markdown",
89
- "docs:verify": "bunx typedoc --emit none --plugin typedoc-plugin-markdown",
90
88
  "package": "rimraf arkiv-network-sdk-*.tgz && bun run build && bun pm pack --no-cache",
91
89
  "package:test": "bun run package && mv arkiv-network-sdk-*.tgz arkiv-network-sdk-latest.tgz",
92
90
  "prepublishOnly": "bun run build && bun run package && mv arkiv-network-sdk-*.tgz arkiv-network-sdk-latest.tgz",
@@ -102,8 +100,6 @@
102
100
  "@types/bun": "latest",
103
101
  "rimraf": "^6.0.1",
104
102
  "tsdown": "^0.16.0",
105
- "typedoc": "^0.28.14",
106
- "typedoc-plugin-markdown": "^4.9.0",
107
103
  "typescript": "^5.9.2",
108
104
  "viem": "^2.38.2"
109
105
  },
@@ -5,6 +5,7 @@ import { NoEntityFoundError } from "../../errors"
5
5
  import { runQuery } from "../../query/engine"
6
6
  import { eq } from "../../query/expression"
7
7
  import { type FullEntity, toRpcSelect } from "../../query/selection"
8
+ import type { Entity } from "../../types/entity"
8
9
 
9
10
  /**
10
11
  * Reads one entity by key, with every field selected.
@@ -2,7 +2,7 @@ import { describe, expect, it, vi } from "bun:test"
2
2
  import { encodeFunctionResult, type Hex } from "viem"
3
3
  import type { ArkivClient } from "../../clients/baseClient"
4
4
  import { ARKIV_ADDRESS } from "../../consts"
5
- import { predictEntityKey } from "../../entity/key"
5
+ import { NO_SALT, predictEntityKey } from "../../entity/key"
6
6
  import { ENTITY_NONCE_ABI } from "../../entity/operations"
7
7
  import { getEntityNonce } from "./getEntityNonce"
8
8
  import { predictEntityKeys } from "./predictEntityKeys"
@@ -105,6 +105,22 @@ describe("predictEntityKeys", () => {
105
105
  )
106
106
  })
107
107
 
108
+ it("takes NO_SALT in a slot, and pairs the key with the zero it resolves to", async () => {
109
+ const { client } = makeClient(4n)
110
+ const [first, second] = await predictEntityKeys(client, {
111
+ owner: OWNER,
112
+ salts: [NO_SALT, 5n],
113
+ })
114
+ expect(first).toEqual({
115
+ salt: 0n,
116
+ key: predictEntityKey({ owner: OWNER, nonce: 4n, salt: 0n, chainId: CHAIN_ID }),
117
+ })
118
+ expect(second).toEqual({
119
+ salt: 5n,
120
+ key: predictEntityKey({ owner: OWNER, nonce: 5n, salt: 5n, chainId: CHAIN_ID }),
121
+ })
122
+ })
123
+
108
124
  it("prefers the salts it was given over the count", async () => {
109
125
  const { client } = makeClient(0n)
110
126
  const pairs = await predictEntityKeys(client, { owner: OWNER, count: 5, salts: [9n] })