@arkiv-network/sdk 0.7.0 → 0.8.0-advanced.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) 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-Ds2XRflQ.cjs +656 -0
  7. package/dist/advanced-FZy7WoYR.js +598 -0
  8. package/dist/advanced-FZy7WoYR.js.map +1 -0
  9. package/dist/arkivTransactions-BpARZOsH.d.cts +584 -0
  10. package/dist/arkivTransactions-BpARZOsH.d.cts.map +1 -0
  11. package/dist/arkivTransactions-DfZ_yVDD.d.ts +584 -0
  12. package/dist/arkivTransactions-DfZ_yVDD.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-BJGuhsqp.js +819 -0
  18. package/dist/attributes-BJGuhsqp.js.map +1 -0
  19. package/dist/attributes-CMJlp1wn.cjs +1039 -0
  20. package/dist/chains/index.cjs +2 -3
  21. package/dist/chains/index.d.cts +41 -76
  22. package/dist/chains/index.d.cts.map +1 -1
  23. package/dist/chains/index.d.ts +24 -59
  24. package/dist/chains/index.d.ts.map +1 -1
  25. package/dist/chains/index.js +2 -2
  26. package/dist/chains-BfNQliHU.cjs +76 -0
  27. package/dist/chains-Du8tql7I.js +60 -0
  28. package/dist/chains-Du8tql7I.js.map +1 -0
  29. package/dist/codec-M74UR1_0.d.ts +101 -0
  30. package/dist/codec-M74UR1_0.d.ts.map +1 -0
  31. package/dist/entity/index.cjs +21 -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-51znTSB1.cjs +56 -0
  41. package/dist/errors-CwPJ16bn.js +33 -0
  42. package/dist/errors-CwPJ16bn.js.map +1 -0
  43. package/dist/expiry-CZErShX6.js +95 -0
  44. package/dist/expiry-CZErShX6.js.map +1 -0
  45. package/dist/expiry-DRV29F1r.d.cts +79 -0
  46. package/dist/expiry-DRV29F1r.d.cts.map +1 -0
  47. package/dist/expiry-nDbCgZX4.d.ts +79 -0
  48. package/dist/expiry-nDbCgZX4.d.ts.map +1 -0
  49. package/dist/expiry-xr6mx4f7.cjs +135 -0
  50. package/dist/flags-5dTNRnow.d.ts +41 -0
  51. package/dist/flags-5dTNRnow.d.ts.map +1 -0
  52. package/dist/flags-Bh0HJldY.cjs +43 -0
  53. package/dist/flags-CRjPpoh3.d.cts +41 -0
  54. package/dist/flags-CRjPpoh3.d.cts.map +1 -0
  55. package/dist/flags-Cr76ldwF.js +33 -0
  56. package/dist/flags-Cr76ldwF.js.map +1 -0
  57. package/dist/index-CMeD8uEq.d.cts +280 -0
  58. package/dist/index-CMeD8uEq.d.cts.map +1 -0
  59. package/dist/index-CTDI5pXZ.d.ts +184 -0
  60. package/dist/index-CTDI5pXZ.d.ts.map +1 -0
  61. package/dist/index-CekGjkRx.d.cts +184 -0
  62. package/dist/index-CekGjkRx.d.cts.map +1 -0
  63. package/dist/index-D0IzFwMX.d.ts +328 -0
  64. package/dist/index-D0IzFwMX.d.ts.map +1 -0
  65. package/dist/index-DZxwz2Ky.d.cts +177 -0
  66. package/dist/index-DZxwz2Ky.d.cts.map +1 -0
  67. package/dist/index-Dz4SkQWg.d.ts +280 -0
  68. package/dist/index-Dz4SkQWg.d.ts.map +1 -0
  69. package/dist/index-JP31fjyM.d.ts +177 -0
  70. package/dist/index-JP31fjyM.d.ts.map +1 -0
  71. package/dist/index-NbfnXxgr.d.cts +424 -0
  72. package/dist/index-NbfnXxgr.d.cts.map +1 -0
  73. package/dist/index.cjs +434 -412
  74. package/dist/index.d.cts +401 -235
  75. package/dist/index.d.cts.map +1 -1
  76. package/dist/index.d.ts +402 -235
  77. package/dist/index.d.ts.map +1 -1
  78. package/dist/index.js +370 -404
  79. package/dist/index.js.map +1 -1
  80. package/dist/key-E7mv0BYf.cjs +116 -0
  81. package/dist/key-XQkpw2xh.js +82 -0
  82. package/dist/key-XQkpw2xh.js.map +1 -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-Cvrir3Q-.cjs +108 -0
  87. package/dist/payload-D53ms-Mg.d.ts +153 -0
  88. package/dist/payload-D53ms-Mg.d.ts.map +1 -0
  89. package/dist/payload-DaPzUvEh.js +92 -0
  90. package/dist/payload-DaPzUvEh.js.map +1 -0
  91. package/dist/payload-hluX1rc0.d.cts +153 -0
  92. package/dist/payload-hluX1rc0.d.cts.map +1 -0
  93. package/dist/query/index.cjs +26 -149
  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 -137
  97. package/dist/queryBuilder-BXR-HxD9.cjs +947 -0
  98. package/dist/queryBuilder-BwauPaGO.js +823 -0
  99. package/dist/queryBuilder-BwauPaGO.js.map +1 -0
  100. package/dist/selection-C6KeWJ7g.d.cts +441 -0
  101. package/dist/selection-C6KeWJ7g.d.cts.map +1 -0
  102. package/dist/selection-mjiiAGDO.d.ts +442 -0
  103. package/dist/selection-mjiiAGDO.d.ts.map +1 -0
  104. package/dist/types/index.cjs +4 -1
  105. package/dist/types/index.d.cts +7 -2
  106. package/dist/types/index.d.ts +8 -2
  107. package/dist/types/index.js +4 -1
  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 -9
  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 +28 -43
  122. package/src/actions/public/getEntityNonce.ts +30 -0
  123. package/src/actions/public/predictEntityKeys.test.ts +159 -0
  124. package/src/actions/public/predictEntityKeys.ts +152 -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 +8 -8
  129. package/src/actions/wallet/createEntity.ts +105 -26
  130. package/src/actions/wallet/deleteEntity.ts +2 -3
  131. package/src/actions/wallet/executeBatch.test.ts +76 -0
  132. package/src/actions/wallet/executeBatch.ts +51 -0
  133. package/src/actions/wallet/extendEntity.ts +40 -16
  134. package/src/actions/wallet/patchEntity.ts +90 -0
  135. package/src/attr/attributes.test.ts +120 -0
  136. package/src/attr/attributes.ts +196 -0
  137. package/src/attr/codec.test.ts +162 -0
  138. package/src/attr/codec.ts +220 -0
  139. package/src/attr/decimal.ts +86 -0
  140. package/src/attr/errors.ts +145 -0
  141. package/src/attr/index.ts +50 -0
  142. package/src/attr/names.ts +106 -0
  143. package/src/attr/types.ts +150 -0
  144. package/src/attr/values.test.ts +271 -0
  145. package/src/attr/values.ts +506 -0
  146. package/src/chains/cheesecake.ts +22 -0
  147. package/src/chains/index.ts +1 -2
  148. package/src/chains/localhost.ts +3 -0
  149. package/src/clients/createPublicClient.test.ts +4 -6
  150. package/src/clients/createPublicClient.ts +9 -8
  151. package/src/clients/createWalletClient.test.ts +4 -4
  152. package/src/clients/createWalletClient.ts +13 -9
  153. package/src/clients/decorators/arkivAdvanced.ts +144 -0
  154. package/src/clients/decorators/arkivPublic.ts +181 -147
  155. package/src/clients/decorators/arkivWallet.ts +141 -122
  156. package/src/consts.ts +2 -1
  157. package/src/entity/create.test.ts +203 -0
  158. package/src/entity/errors.ts +39 -0
  159. package/src/entity/events.ts +16 -0
  160. package/src/entity/expiry.test.ts +195 -0
  161. package/src/entity/expiry.ts +182 -0
  162. package/src/entity/flags.ts +65 -0
  163. package/src/entity/index.ts +16 -0
  164. package/src/entity/key.ts +88 -0
  165. package/src/entity/operations.ts +135 -0
  166. package/src/entity/params.ts +15 -0
  167. package/src/errors.ts +33 -28
  168. package/src/index.ts +19 -0
  169. package/src/query/engine.ts +68 -132
  170. package/src/query/errors.ts +151 -0
  171. package/src/query/expression.test.ts +286 -0
  172. package/src/query/expression.ts +500 -0
  173. package/src/query/index.ts +40 -4
  174. package/src/query/injection.test.ts +151 -0
  175. package/src/query/queryBuilder.test.ts +342 -637
  176. package/src/query/queryBuilder.ts +133 -359
  177. package/src/query/queryResult.ts +54 -51
  178. package/src/query/selection.test.ts +48 -98
  179. package/src/query/selection.ts +77 -65
  180. package/src/types/entity.test.ts +44 -155
  181. package/src/types/entity.ts +62 -44
  182. package/src/types/events.ts +64 -23
  183. package/src/types/index.ts +24 -20
  184. package/src/types/rpcSchema.ts +71 -33
  185. package/src/types/txParams.ts +8 -0
  186. package/src/utils/arkivTransactions.test.ts +687 -38
  187. package/src/utils/arkivTransactions.ts +400 -115
  188. package/src/utils/chains.test.ts +21 -24
  189. package/src/utils/compression.ts +1 -1
  190. package/src/utils/entities.test.ts +62 -0
  191. package/src/utils/entities.ts +111 -29
  192. package/src/utils/expirationTime.ts +153 -10
  193. package/src/utils/logger.ts +2 -2
  194. package/src/utils/payload.ts +29 -2
  195. package/src/utils/revert.test.ts +99 -0
  196. package/src/utils/revert.ts +145 -0
  197. package/dist/chains-BifaY04V.cjs +0 -108
  198. package/dist/chains-CrtkVbBh.js +0 -86
  199. package/dist/chains-CrtkVbBh.js.map +0 -1
  200. package/dist/consts-AUoL-v42.cjs +0 -18
  201. package/dist/consts-BV4PR-de.js +0 -7
  202. package/dist/consts-BV4PR-de.js.map +0 -1
  203. package/dist/entity-B6g_EPm1.d.cts +0 -382
  204. package/dist/entity-B6g_EPm1.d.cts.map +0 -1
  205. package/dist/entity-qoLMAuuk.d.ts +0 -382
  206. package/dist/entity-qoLMAuuk.d.ts.map +0 -1
  207. package/dist/index-DdspxNAA.d.ts +0 -481
  208. package/dist/index-DdspxNAA.d.ts.map +0 -1
  209. package/dist/index-Ds9dwqb5.d.cts +0 -481
  210. package/dist/index-Ds9dwqb5.d.cts.map +0 -1
  211. package/dist/payload-B2kFJyah.d.ts +0 -6
  212. package/dist/payload-B2kFJyah.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-Claf2jUO.js +0 -13
  216. package/dist/payload-Claf2jUO.js.map +0 -1
  217. package/dist/payload-DpA5PA-w.cjs +0 -23
  218. package/dist/query/index.js.map +0 -1
  219. package/dist/queryBuilder-D2uwP9jI.js +0 -704
  220. package/dist/queryBuilder-D2uwP9jI.js.map +0 -1
  221. package/dist/queryBuilder-UW2MCaX4.cjs +0 -792
  222. package/dist/utils/index.d.cts.map +0 -1
  223. package/dist/utils/index.d.ts.map +0 -1
  224. package/dist/utils/index.js.map +0 -1
  225. package/src/actions/public/buildQuery.ts +0 -10
  226. package/src/actions/public/subscribeEntityEvents.ts +0 -119
  227. package/src/actions/wallet/mutateEntities.ts +0 -111
  228. package/src/actions/wallet/updateEntity.ts +0 -60
  229. package/src/chains/braga.ts +0 -26
  230. package/src/chains/kaolin.ts +0 -29
  231. package/src/query/engine.test.ts +0 -526
  232. package/src/query/predicate.test.ts +0 -461
  233. package/src/query/predicate.ts +0 -144
  234. package/src/query/queryResult.test.ts +0 -270
  235. package/src/query/selectQueryBuilder.test.ts +0 -210
  236. package/src/types/attributes.ts +0 -16
  237. package/src/utils/validation.test.ts +0 -60
  238. package/src/utils/validation.ts +0 -32
  239. /package/dist/{types-H-TSmRpm.js → attr-DlmErkvR.cjs} +0 -0
  240. /package/dist/{types-o3zWarRp.cjs → attr-GcQKatub.js} +0 -0
@@ -0,0 +1,584 @@
1
+ import { i as SelectArg, s as Entity } from "./selection-C6KeWJ7g.cjs";
2
+ import { p as AttributeInputs } from "./index-NbfnXxgr.cjs";
3
+ import { n as Expiry, r as ExpiryContext } from "./expiry-DRV29F1r.cjs";
4
+ import { d as SaltInput, m as Operation } from "./index-DZxwz2Ky.cjs";
5
+ import { n as ResolvedCreationFlags, t as CreationFlags } from "./flags-CRjPpoh3.cjs";
6
+ import { Address, Hash, Hex, TransactionReceipt } from "viem";
7
+
8
+ //#region src/actions/public/getBlockTiming.d.ts
9
+ type GetBlockTimingReturnType = {
10
+ currentBlock: bigint;
11
+ currentBlockTime: number;
12
+ blockDuration: number;
13
+ };
14
+ //#endregion
15
+ //#region src/actions/public/predictEntityKeys.d.ts
16
+ /**
17
+ * A key a create will be given, together with the salt that mints it.
18
+ *
19
+ * The two travel as a pair because neither is any use alone: a create defaults to a *random* salt,
20
+ * so the key only comes out as predicted if that same create carries this salt.
21
+ */
22
+ type PredictedEntityKey = {
23
+ /** The key the create will be given. */
24
+ key: Hex;
25
+ /**
26
+ * The salt the create must carry for its key to come out as {@link PredictedEntityKey.key}.
27
+ * Always a plain `uint128` — a requested {@link NO_SALT} comes back as the `0n` it resolves to,
28
+ * which a create accepts just the same.
29
+ */
30
+ salt: bigint;
31
+ };
32
+ /** Parameters for `client.predictEntityKeys`. */
33
+ type PredictEntityKeysParameters<TCount extends number = number, TSalts extends readonly SaltInput[] | undefined = readonly SaltInput[] | undefined> = {
34
+ /** The account that will sign the creates. Its nonce is what the keys are derived from. */
35
+ owner: Address;
36
+ /**
37
+ * How many creates the batch will carry. Ignored when `salts` is given, which already says how
38
+ * many there are.
39
+ *
40
+ * A literal count comes back as a fixed-length tuple, so `count: 2` destructures into two named
41
+ * pairs without a cast.
42
+ */
43
+ count?: TCount | undefined;
44
+ /**
45
+ * The salt each create will carry, in batch order. Defaults to `count` fresh random salts —
46
+ * either way each key comes back paired with the salt that mints it. Pass {@link NO_SALT} in a
47
+ * slot whose create opts out of salting.
48
+ */
49
+ salts?: TSalts;
50
+ };
51
+ /**
52
+ * The keys a batch would mint, in batch order, each paired with its salt.
53
+ *
54
+ * The length follows the request whenever it is known statically: a literal `count`, or a `salts`
55
+ * tuple, gives a fixed-length tuple; a count computed at runtime gives a plain array.
56
+ *
57
+ * `TSalts` is wrapped in a tuple to stop the conditional distributing over it. Left naked, the
58
+ * `readonly SaltInput[] | undefined` default would take both branches and union a tuple with an
59
+ * array, which widens the length straight back to `number`.
60
+ */
61
+ type PredictEntityKeysReturnType<TCount extends number = number, TSalts extends readonly SaltInput[] | undefined = readonly SaltInput[] | undefined> = [TSalts] extends [readonly SaltInput[]] ? { -readonly [Index in keyof TSalts]: PredictedEntityKey } : Repeat<PredictedEntityKey, TCount>;
62
+ /**
63
+ * A tuple of `TLength` × `T`, or a plain array when the length is only known at runtime.
64
+ *
65
+ * Written tail-recursively so TypeScript can build the batch sizes anyone would actually send.
66
+ */
67
+ type Repeat<T, TLength extends number, TAcc extends T[] = []> = number extends TLength ? T[] : TAcc["length"] extends TLength ? TAcc : Repeat<T, TLength, [...TAcc, T]>;
68
+ /**
69
+ * Works out the keys an account's next creates will be given, before sending them.
70
+ *
71
+ * A key is `keccak256(chainId ++ registry ++ owner ++ nonce ++ salt)`. Everything but the nonce is
72
+ * known to the caller, and the nonce is read here — so a batch can reference a key it is about to
73
+ * mint, storing it as a `key` attribute on a sibling entity created in the same transaction.
74
+ *
75
+ * Each key arrives paired with its salt, and the create must be given that salt: a create left to
76
+ * pick its own salt picks a random one, which mints a different key.
77
+ *
78
+ * The prediction is valid only while nothing else from this owner is in flight. Every create that
79
+ * lands first takes the nonce with it and moves these keys. For a key you can rely on
80
+ * unconditionally, read it back from the create instead — `createEntity` and `executeBatch`
81
+ * report the keys the engine actually minted.
82
+ *
83
+ * @param parameters - Owner, and either a count or the salts. {@link PredictEntityKeysParameters}
84
+ * @returns One `{ key, salt }` pair per create, in batch order. {@link PredictEntityKeysReturnType}
85
+ *
86
+ * @example A batch whose second entity points at its first.
87
+ * import { key } from "@arkiv-network/sdk/attr"
88
+ *
89
+ * const [parent, child] = await client.predictEntityKeys({ owner: account.address, count: 2 })
90
+ * await client.executeBatch({
91
+ * creates: [
92
+ * { payload, contentType, expires, salt: parent.salt },
93
+ * {
94
+ * payload,
95
+ * contentType,
96
+ * expires,
97
+ * salt: child.salt,
98
+ * attributes: { parent: key(parent.key) },
99
+ * },
100
+ * ],
101
+ * })
102
+ */
103
+ //#endregion
104
+ //#region src/actions/public/query.d.ts
105
+ type QueryOptions = {
106
+ /** What to return. Defaults to everything. */
107
+ select?: SelectArg | undefined;
108
+ /** Block height to read at. Defaults to the head. */
109
+ atBlock?: bigint | undefined;
110
+ /** Page size, up to the node maximum of 200. */
111
+ limit?: number | undefined;
112
+ /**
113
+ * Cursor from a previous page. Requires that page's `blockNumber` as {@link atBlock} alongside
114
+ * it — the cursor is bound to the block it was issued at, so persist the two together. A cursor
115
+ * without a block is rejected locally rather than left to fail whenever a block lands mid-walk.
116
+ */
117
+ cursor?: string | undefined;
118
+ };
119
+ type QueryReturnType = {
120
+ entities: Entity[];
121
+ /** The cursor for the next page, or `undefined` when no pages remain. */
122
+ cursor: string | undefined;
123
+ /** The block the page was read at. */
124
+ blockNumber: bigint;
125
+ };
126
+ //#endregion
127
+ //#region src/types/events.d.ts
128
+ /**
129
+ * Where an event sits in the chain — carried by every on-chain entity event.
130
+ *
131
+ * Operations apply in batch order and emit one event each, so `blockNumber` and `logIndex` together
132
+ * are the order the operations were applied in. A replica that replays them in that order sees
133
+ * exactly what the engine did.
134
+ */
135
+ type EntityEventContext = {
136
+ /** The block the operation was applied in. */
137
+ blockNumber: bigint;
138
+ /** The transaction the operation was part of. */
139
+ transactionHash: Hex;
140
+ /** The event's position within its block. */
141
+ logIndex: number;
142
+ };
143
+ /** An entity was created. */
144
+ type EntityCreatedEvent = EntityEventContext & {
145
+ type: "EntityCreated";
146
+ entityKey: Hex;
147
+ owner: Address;
148
+ /** The block the entity is set to expire at. */
149
+ expiresAt: bigint;
150
+ /**
151
+ * The immutable properties the entity was created with, decoded from its `creationFlags` byte.
152
+ */
153
+ creationFlags: ResolvedCreationFlags;
154
+ };
155
+ /**
156
+ * An entity's attributes or payload changed.
157
+ *
158
+ * The event says *that* it changed, not what to — read the entity to see the new state.
159
+ */
160
+ type EntityPatchedEvent = EntityEventContext & {
161
+ type: "EntityPatched";
162
+ entityKey: Hex;
163
+ owner: Address;
164
+ };
165
+ /** An entity's expiry moved further out. */
166
+ type ExpiryExtendedEvent = EntityEventContext & {
167
+ type: "ExpiryExtended";
168
+ entityKey: Hex;
169
+ /**
170
+ * The entity's owner — **not** whoever extended it. An entity created with
171
+ * `permissionlessExtension` can be extended by anyone, and the event does not say by whom; read
172
+ * the transaction's sender if you need that.
173
+ */
174
+ owner: Address;
175
+ /** The block the entity is now set to expire at. */
176
+ expiresAt: bigint;
177
+ };
178
+ /** An entity changed hands. */
179
+ type OwnershipTransferredEvent = EntityEventContext & {
180
+ type: "OwnershipTransferred";
181
+ entityKey: Hex;
182
+ previousOwner: Address;
183
+ newOwner: Address;
184
+ };
185
+ /** An entity was deleted by its owner, before its expiry. */
186
+ type EntityDeletedEvent = EntityEventContext & {
187
+ type: "EntityDeleted";
188
+ entityKey: Hex;
189
+ owner: Address;
190
+ };
191
+ /**
192
+ * Every event the engine emits, discriminated by `type`.
193
+ */
194
+ type EntityEvent = EntityCreatedEvent | EntityPatchedEvent | ExpiryExtendedEvent | OwnershipTransferredEvent | EntityDeletedEvent;
195
+ //#endregion
196
+ //#region src/actions/public/watchEntityEvents.d.ts
197
+ /**
198
+ * Handlers and options for `client.watchEntityEvents`. Every handler is optional; the watcher does
199
+ * the work for the ones you pass.
200
+ */
201
+ type WatchEntityEventsParameters = {
202
+ onEntityCreated?: ((event: EntityCreatedEvent) => void) | undefined;
203
+ onEntityPatched?: ((event: EntityPatchedEvent) => void) | undefined;
204
+ onExpiryExtended?: ((event: ExpiryExtendedEvent) => void) | undefined;
205
+ onOwnershipTransferred?: ((event: OwnershipTransferredEvent) => void) | undefined;
206
+ onEntityDeleted?: ((event: EntityDeletedEvent) => void) | undefined;
207
+ /**
208
+ * Every event, in application order, whatever its type. Runs *before* the per-event handler for
209
+ * the same event.
210
+ *
211
+ * This is the replay seam: operations apply in batch order and emit one event each, so an
212
+ * off-chain replica that consumes this in order sees exactly what the engine did.
213
+ */
214
+ onEvent?: ((event: EntityEvent) => void) | undefined;
215
+ /**
216
+ * Transport failures, logs that will not decode, and anything one of your own handlers throws.
217
+ *
218
+ * Defaults to `console.error`. A watcher whose filter the node dropped otherwise just goes quiet,
219
+ * and a quiet watcher is indistinguishable from a quiet chain.
220
+ */
221
+ onError?: ((error: Error) => void) | undefined;
222
+ /** Replay from this block before following the head. Defaults to the head. */
223
+ fromBlock?: bigint | undefined;
224
+ /** How often to poll, in milliseconds. Defaults to half a block. */
225
+ pollingInterval?: number | undefined;
226
+ };
227
+ //#endregion
228
+ //#region src/actions/wallet/createEntity.d.ts
229
+ /**
230
+ * Parameters for creating an entity.
231
+ *
232
+ * An entity always carries contents and a type for them, plus a lifetime. Attributes, flags and a
233
+ * salt are optional on top of that.
234
+ *
235
+ * @example
236
+ * const { entityKey } = await client.createEntity({
237
+ * attributes: {
238
+ * level: i32(10),
239
+ * balance: u256(1_000_000n),
240
+ * score: dec("3.5"),
241
+ * name: "Bob", // bare string -> str
242
+ * flagged: true, // bare boolean -> bool
243
+ * },
244
+ * payload: jsonToPayload({ hello: "world" }),
245
+ * contentType: "application/json",
246
+ * expires: ExpirationTime.fromDays(30),
247
+ * flags: { readonly: true },
248
+ * })
249
+ *
250
+ * @example Pin an absolute deadline, but refuse to create something nearly dead:
251
+ * await client.createEntity({
252
+ * payload, contentType: "application/json",
253
+ * expires: ExpirationTime.atDate(someDeadline, {
254
+ * atLeast: ExpirationTime.fromDays(1), // ...but live at least a day regardless
255
+ * }),
256
+ * })
257
+ *
258
+ * @example An entity that is nothing but queryable attributes still declares its (empty) contents:
259
+ * await client.createEntity({
260
+ * attributes: { parent: key(parentKey), rank: i32(3) },
261
+ * payload: new Uint8Array(),
262
+ * contentType: "application/octet-stream",
263
+ * expires: ExpirationTime.fromDays(30),
264
+ * })
265
+ */
266
+ type CreateEntityParameters = {
267
+ /**
268
+ * How long the entity should live, built with {@link ExpirationTime}.
269
+ *
270
+ * `ExpirationTime.fromDays(30)` is the everyday form. `atBlock` / `atDate` pin an absolute
271
+ * deadline instead, and either can carry `{ atLeast }` to guarantee a minimum life on top of it.
272
+ */
273
+ expires: Expiry;
274
+ /**
275
+ * The entity's opaque payload. Travels to the engine as the `$payload` system attribute; on this
276
+ * surface it is just the entity's contents.
277
+ *
278
+ * Pass an empty `Uint8Array` for an entity that is nothing but queryable attributes — it is
279
+ * written as an empty payload rather than left unset, so what you pass is what is stored.
280
+ */
281
+ payload: Uint8Array;
282
+ /** The payload's MIME type, e.g. `"application/json"`. Sent as the `$contentType` cell. */
283
+ contentType: MimeType | (string & {});
284
+ /**
285
+ * The entity's queryable attributes, keyed by name. Values are the tagged constructors from
286
+ * `@arkiv-network/sdk/attr` — `i32`, `u64`, `u256`, `dec`, `str`, `addr`, `key`, `bytes32`,
287
+ * `bool` — or a bare `boolean`, `number`, `bigint` or `string` where the type is unambiguous.
288
+ *
289
+ * @throws {InvalidAttributeNameError} If a name violates the attribute-name grammar.
290
+ * @throws {InvalidValueError} If a value does not fit the type it names or defaults to.
291
+ */
292
+ attributes?: AttributeInputs | undefined;
293
+ /**
294
+ * Properties fixed at creation: `readonly` and `permissionlessExtension`. No operation changes
295
+ * them afterwards, so an entity is whatever it was created as for life. Both default to `false`.
296
+ */
297
+ flags?: CreationFlags | undefined;
298
+ /**
299
+ * The salt mixed into the entity key. Defaults to 128 random bits, which makes the key
300
+ * unpredictable to everyone but the creator.
301
+ *
302
+ * Pass {@link NO_SALT} for a key derived from the owner and nonce alone — predictable by anyone,
303
+ * which is what you want only when a third party must be able to compute the key in advance.
304
+ */
305
+ salt?: SaltInput | undefined;
306
+ };
307
+ /**
308
+ * The result of creating an entity.
309
+ */
310
+ type CreateEntityReturnType = {
311
+ /** The new entity's key. */
312
+ entityKey: Hex;
313
+ txHash: Hash;
314
+ /**
315
+ * The block the entity is expected to expire at, resolved against the block the transaction was
316
+ * built on.
317
+ *
318
+ * The engine resolves a duration against the block the transaction actually lands in, so for
319
+ * `ExpirationTime.fromDays(30)` and friends this is a lower bound: the real expiry is later by
320
+ * however many blocks passed between building and inclusion. An `atBlock` deadline is exact.
321
+ */
322
+ expiresAt: bigint;
323
+ };
324
+ //#endregion
325
+ //#region src/actions/wallet/deleteEntity.d.ts
326
+ /**
327
+ * Parameters for the deleteEntity function.
328
+ * - entityKey: The key of the entity to delete.
329
+ */
330
+ type DeleteEntityParameters = {
331
+ entityKey: Hex;
332
+ };
333
+ /**
334
+ * Return type for the deleteEntity function.
335
+ * - entityKey: The key of the entity.
336
+ * - txHash: The transaction hash.
337
+ */
338
+ type DeleteEntityReturnType = {
339
+ entityKey: Hex;
340
+ txHash: Hash;
341
+ };
342
+ //#endregion
343
+ //#region src/actions/wallet/executeBatch.d.ts
344
+ /**
345
+ * Parameters for the executeBatch function — the same batch shape the advanced path takes
346
+ * ({@link EntityMutationOps}), so the two surfaces cannot drift apart.
347
+ *
348
+ * At least one operation is required; a batch with nothing in it throws rather than spending gas on
349
+ * an empty transaction.
350
+ */
351
+ type ExecuteBatchParameters = EntityMutationOps;
352
+ /** Return type for the executeBatch function. */
353
+ type ExecuteBatchReturnType = {
354
+ /** The transaction hash. */
355
+ txHash: Hash;
356
+ /** The keys of the created entities, in batch order. */
357
+ createdEntities: Hex[];
358
+ /** The keys of the patched entities. */
359
+ patchedEntities: Hex[];
360
+ /** The keys of the deleted entities. */
361
+ deletedEntities: Hex[];
362
+ /** The keys of the extended entities. */
363
+ extendedEntities: Hex[];
364
+ /** The keys of the entities handed to a new owner. */
365
+ ownershipChanges: Hex[];
366
+ };
367
+ //#endregion
368
+ //#region src/actions/wallet/extendEntity.d.ts
369
+ /**
370
+ * Parameters for extending an entity's life.
371
+ *
372
+ * An extension **sets a new expiry**; it does not add to the existing one. It is resolved exactly
373
+ * as a create's is — a duration counts from now, not from the entity's current expiry — so
374
+ * `ExpirationTime.fromDays(30)` means "alive for thirty more days from now" whatever the entity's
375
+ * remaining life happened to be.
376
+ *
377
+ * The engine rejects an extension that would not move the expiry later, so extending an entity by
378
+ * less than it already has left is an error rather than a silent shortening.
379
+ *
380
+ * @example
381
+ * await client.extendEntity({ entityKey, expires: ExpirationTime.fromDays(30) })
382
+ * await client.extendEntity({ entityKey, expires: ExpirationTime.atBlock(1_200_000n) })
383
+ */
384
+ type ExtendEntityParameters = {
385
+ entityKey: Hex;
386
+ /** The entity's new lifetime, built with {@link ExpirationTime}. */
387
+ expires: Expiry;
388
+ };
389
+ /**
390
+ * The result of extending an entity.
391
+ */
392
+ type ExtendEntityReturnType = {
393
+ entityKey: Hex;
394
+ txHash: Hash;
395
+ /**
396
+ * The block the entity is now expected to expire at, resolved against the block the transaction
397
+ * was built on. Durations are approximate, so treat this as the estimate the operation was built
398
+ * from rather than the block the engine settled on.
399
+ */
400
+ expiresAt: bigint;
401
+ };
402
+ //#endregion
403
+ //#region src/actions/wallet/patchEntity.d.ts
404
+ /**
405
+ * Parameters for patching an entity.
406
+ *
407
+ * A patch names only what changes. Attributes it does not mention keep whatever value they have, and
408
+ * the payload and content type stay as they are unless given — so a caller can change one field
409
+ * without first reading the entity to learn what the others are, and without racing anyone else who
410
+ * is changing a different field.
411
+ *
412
+ * The entity's identity is fixed: a patch never moves the key, the owner, the creation flags or the
413
+ * expiry. Use `extendEntity` for the expiry and `changeOwnership` for the owner.
414
+ *
415
+ * @example Change one attribute and remove another, leaving the payload alone:
416
+ * await client.patchEntity({
417
+ * entityKey,
418
+ * set: { status: "published", level: i32(11) },
419
+ * unset: ["draft"],
420
+ * })
421
+ *
422
+ * @example Replace the contents without touching a single attribute:
423
+ * await client.patchEntity({
424
+ * entityKey,
425
+ * payload: jsonToPayload({ hello: "again" }),
426
+ * })
427
+ */
428
+ type PatchEntityParameters = {
429
+ /** The entity to patch. */
430
+ entityKey: Hex;
431
+ /**
432
+ * Attributes to write, keyed by name. An existing attribute is overwritten — including with a
433
+ * different type — and a name the entity does not carry yet is added.
434
+ *
435
+ * Values are the tagged constructors from `@arkiv-network/sdk/attr` — `i32`, `u64`, `u256`,
436
+ * `dec`, `str`, `addr`, `key`, `bytes32`, `bool` — or a bare `boolean`, `number`, `bigint` or
437
+ * `string` where the type is unambiguous.
438
+ *
439
+ * @throws {InvalidAttributeNameError} If a name violates the attribute-name grammar.
440
+ * @throws {InvalidValueError} If a value does not fit the type it names or defaults to.
441
+ */
442
+ set?: AttributeInputs | undefined;
443
+ /**
444
+ * Attribute names to remove. Naming one the entity does not carry is not an error — the outcome
445
+ * is the same either way, and a caller clearing a field should not have to know whether it was
446
+ * ever set.
447
+ *
448
+ * @throws {ConflictingMutationError} If a name also appears in `set`.
449
+ */
450
+ unset?: readonly string[] | undefined;
451
+ /**
452
+ * The entity's new payload. Omit it to leave the current contents untouched; pass an empty
453
+ * `Uint8Array` to replace them with nothing.
454
+ */
455
+ payload?: Uint8Array | undefined;
456
+ /**
457
+ * The payload's new MIME type. Omit it to keep the current one — which is what you want when the
458
+ * new payload is the same kind of thing as the old.
459
+ */
460
+ contentType?: MimeType | (string & {}) | undefined;
461
+ };
462
+ /** The result of patching an entity. */
463
+ type PatchEntityReturnType = {
464
+ /** The patched entity's key — unchanged, since a patch never moves it. */
465
+ entityKey: Hex;
466
+ txHash: Hash;
467
+ };
468
+ //#endregion
469
+ //#region src/types/mimeTypes.d.ts
470
+ type MimeType = "text/plain" | "text/html" | "text/css" | "text/csv" | "text/xml" | "text/javascript" | "application/json" | "application/xml" | "application/pdf" | "application/zip" | "application/gzip" | "application/octet-stream" | "application/javascript" | "application/x-www-form-urlencoded" | "image/png" | "image/jpeg" | "image/webp" | "image/gif" | "image/svg+xml" | "audio/mpeg" | "audio/wav" | "audio/ogg" | "video/mp4" | "video/webm" | "video/ogg" | "multipart/form-data";
471
+ //#endregion
472
+ //#region src/types/txParams.d.ts
473
+ /**
474
+ * Transaction fields a write action passes through to the wallet, for the cases where the defaults
475
+ * are not what you want.
476
+ *
477
+ * Fee style is either/or: give `gasPrice` for a legacy transaction, or `maxFeePerGas` /
478
+ * `maxPriorityFeePerGas` for an EIP-1559 one. Mixing the two does not typecheck. Anything left out
479
+ * is estimated.
480
+ */
481
+ type TxParams = {
482
+ gas?: bigint;
483
+ nonce?: number;
484
+ gasPrice?: bigint;
485
+ maxFeePerGas?: never;
486
+ maxPriorityFeePerGas?: never;
487
+ } | {
488
+ gas?: bigint;
489
+ nonce?: number;
490
+ maxFeePerGas?: bigint;
491
+ maxPriorityFeePerGas?: bigint;
492
+ gasPrice?: never;
493
+ };
494
+ //#endregion
495
+ //#region src/actions/wallet/changeOwnership.d.ts
496
+ /**
497
+ * Parameters for the changeOwnership function.
498
+ * - entityKey: The key of the entity.
499
+ * - newOwner: The address of the new owner.
500
+ */
501
+ type ChangeOwnershipParameters = {
502
+ entityKey: Hex;
503
+ newOwner: Hex;
504
+ };
505
+ /**
506
+ * Return type for the changeOwnership function.
507
+ * - entityKey: The key of the entity.
508
+ * - txHash: The transaction hash.
509
+ */
510
+ type ChangeOwnershipReturnType = {
511
+ entityKey: Hex;
512
+ txHash: Hash;
513
+ };
514
+ //#endregion
515
+ //#region src/utils/arkivTransactions.d.ts
516
+
517
+ /** The five kinds of entity operation one Arkiv transaction can batch. */
518
+ type EntityMutationOps = {
519
+ /** The entities to create. */
520
+ creates?: CreateEntityParameters[];
521
+ /** The patches to apply. */
522
+ patches?: PatchEntityParameters[];
523
+ /** The entities to delete. */
524
+ deletes?: DeleteEntityParameters[];
525
+ /** The expiries to set. */
526
+ extensions?: ExtendEntityParameters[];
527
+ /** The ownership transfers to perform. */
528
+ ownershipChanges?: ChangeOwnershipParameters[];
529
+ };
530
+ /**
531
+ * Whether encoding the batch actually requires the chain head.
532
+ *
533
+ * Only a relative lifetime (`minLifetime > 0`) or a wall-clock deadline (a `Date`) is measured
534
+ * from the current block. A purely absolute `atBlock(n)` expiry encodes the same bytes whatever
535
+ * the head is, so a batch of those — or one with no expiries at all — needs no `eth_blockNumber`.
536
+ */
537
+ declare function mutationNeedsBlockNumber(ops: EntityMutationOps): boolean;
538
+ /**
539
+ * Encodes a batch into the `execute` operations, in the order the engine applies them: creates,
540
+ * patches, deletes, extensions, ownership transfers.
541
+ *
542
+ * Pure — every check here is local (content types, salts, expiry bounds, non-empty patches and a
543
+ * non-empty batch), so the only chain input is `context.currentBlock`. Callers that carry no
544
+ * relative expiry (see {@link mutationNeedsBlockNumber}) can pass `0n`, which disables the
545
+ * dead-on-arrival pre-check and leaves that to the engine.
546
+ */
547
+ declare function buildEntityOperations(ops: EntityMutationOps, context: ExpiryContext): Operation[];
548
+ /** Everything the batch's events say happened, one entry per applied operation, per kind. */
549
+ type MutationEvents = {
550
+ created: {
551
+ entityKey: Hex;
552
+ owner: Address;
553
+ expiresAt: bigint;
554
+ }[];
555
+ patched: {
556
+ entityKey: Hex;
557
+ owner: Address;
558
+ }[];
559
+ deleted: {
560
+ entityKey: Hex;
561
+ owner: Address;
562
+ }[];
563
+ extended: {
564
+ entityKey: Hex;
565
+ owner: Address;
566
+ expiresAt: bigint;
567
+ }[];
568
+ ownershipTransferred: {
569
+ entityKey: Hex;
570
+ previousOwner: Address;
571
+ newOwner: Address;
572
+ }[];
573
+ };
574
+ /**
575
+ * Reads the entity events out of a receipt's logs, exactly as they were emitted.
576
+ *
577
+ * Lenient by design: it reports what the events say and nothing else — no counting against what
578
+ * was asked for (the caller may not have the request at hand) and no error for a receipt with no
579
+ * entity events at all. Logs from other contracts and events this SDK has no name for are skipped.
580
+ */
581
+ declare function collectMutationEvents(logs: TransactionReceipt["logs"]): MutationEvents;
582
+ //#endregion
583
+ export { PredictEntityKeysParameters as A, EntityEvent as C, OwnershipTransferredEvent as D, ExpiryExtendedEvent as E, PredictedEntityKey as M, GetBlockTimingReturnType as N, QueryOptions as O, EntityDeletedEvent as S, EntityPatchedEvent as T, DeleteEntityReturnType as _, mutationNeedsBlockNumber as a, WatchEntityEventsParameters as b, TxParams as c, PatchEntityReturnType as d, ExtendEntityParameters as f, DeleteEntityParameters as g, ExecuteBatchReturnType as h, collectMutationEvents as i, PredictEntityKeysReturnType as j, QueryReturnType as k, MimeType as l, ExecuteBatchParameters as m, MutationEvents as n, ChangeOwnershipParameters as o, ExtendEntityReturnType as p, buildEntityOperations as r, ChangeOwnershipReturnType as s, EntityMutationOps as t, PatchEntityParameters as u, CreateEntityParameters as v, EntityEventContext as w, EntityCreatedEvent as x, CreateEntityReturnType as y };
584
+ //# sourceMappingURL=arkivTransactions-BpARZOsH.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arkivTransactions-BpARZOsH.d.cts","names":[],"sources":["../src/actions/public/getBlockTiming.ts","../src/actions/public/predictEntityKeys.ts","../src/actions/public/query.ts","../src/types/events.ts","../src/actions/public/watchEntityEvents.ts","../src/actions/wallet/createEntity.ts","../src/actions/wallet/deleteEntity.ts","../src/actions/wallet/executeBatch.ts","../src/actions/wallet/extendEntity.ts","../src/actions/wallet/patchEntity.ts","../src/types/mimeTypes.ts","../src/types/txParams.ts","../src/actions/wallet/changeOwnership.ts","../src/utils/arkivTransactions.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAKY,wBAAA;;;;;;;;;;;;AAAZ;KCaY,kBAAA;;OAEL;EAFK;AAYZ;;;;EAaU,IAAA,EAAA,MAAA;CAMA;;AAa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