@thruputchain/client 0.27.0 → 0.29.0

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 (181) hide show
  1. package/README.md +120 -22
  2. package/dist/{actions-DK_XBeVy.cjs → actions-B2gV8Vzr.cjs} +297 -73
  3. package/dist/actions-B2gV8Vzr.cjs.map +1 -0
  4. package/dist/actions-UEYKD22C.js +653 -0
  5. package/dist/actions-UEYKD22C.js.map +1 -0
  6. package/dist/actions.cjs +4 -8
  7. package/dist/actions.d.cts +4 -4
  8. package/dist/actions.d.ts +4 -4
  9. package/dist/actions.js +3 -3
  10. package/dist/{artifact-BM_MVzhL.d.ts → artifact-RIAPVmVX.d.cts} +4 -3
  11. package/dist/artifact-RIAPVmVX.d.cts.map +1 -0
  12. package/dist/{artifact-BM_MVzhL.d.cts → artifact-RIAPVmVX.d.ts} +4 -3
  13. package/dist/artifact-RIAPVmVX.d.ts.map +1 -0
  14. package/dist/{contract-Cu8Qv94_.js → contract-BOlNskwd.js} +235 -87
  15. package/dist/contract-BOlNskwd.js.map +1 -0
  16. package/dist/{contract-DPm2BJTu.cjs → contract-D_vxUudr.cjs} +281 -109
  17. package/dist/contract-D_vxUudr.cjs.map +1 -0
  18. package/dist/contract.cjs +1 -5
  19. package/dist/contract.d.cts +4 -4
  20. package/dist/contract.d.ts +4 -4
  21. package/dist/contract.js +2 -2
  22. package/dist/contracts.cjs +5 -5
  23. package/dist/contracts.d.cts +19 -4
  24. package/dist/contracts.d.cts.map +1 -1
  25. package/dist/contracts.d.ts +19 -4
  26. package/dist/contracts.d.ts.map +1 -1
  27. package/dist/contracts.js +4 -4
  28. package/dist/decimal-BX7abv5J.cjs +171 -0
  29. package/dist/decimal-BX7abv5J.cjs.map +1 -0
  30. package/dist/decimal-CoHOISys.js +124 -0
  31. package/dist/decimal-CoHOISys.js.map +1 -0
  32. package/dist/{dev_wallet-BcvX_xT4.cjs → dev_wallet-BVChhV6j.cjs} +85 -6
  33. package/dist/dev_wallet-BVChhV6j.cjs.map +1 -0
  34. package/dist/{dev_wallet-B5R5JJaw.js → dev_wallet-D9LuPZ-h.js} +84 -5
  35. package/dist/dev_wallet-D9LuPZ-h.js.map +1 -0
  36. package/dist/{execution-C8oQgpO3.d.cts → execution-pSt6k620.d.cts} +23 -50
  37. package/dist/execution-pSt6k620.d.cts.map +1 -0
  38. package/dist/{execution-DsZzqv_C.d.ts → execution-uiuFPV0d.d.ts} +23 -50
  39. package/dist/execution-uiuFPV0d.d.ts.map +1 -0
  40. package/dist/{hex-DIcaALXL.js → hex-B8D-jBgz.js} +2 -2
  41. package/dist/{hex-DIcaALXL.js.map → hex-B8D-jBgz.js.map} +1 -1
  42. package/dist/{hex-DkGpiZ5e.cjs → hex-CSDZ9d6z.cjs} +2 -2
  43. package/dist/{hex-DkGpiZ5e.cjs.map → hex-CSDZ9d6z.cjs.map} +1 -1
  44. package/dist/{index-rrP1HJ2Z.d.cts → index-B1efA-Y_.d.ts} +24 -21
  45. package/dist/index-B1efA-Y_.d.ts.map +1 -0
  46. package/dist/{index-Zaz-e8Sy.d.ts → index-BGmH_Sm7.d.cts} +12 -62
  47. package/dist/index-BGmH_Sm7.d.cts.map +1 -0
  48. package/dist/{index-CHnfHuQo.d.ts → index-BZ5j5P5d.d.ts} +11 -9
  49. package/dist/index-BZ5j5P5d.d.ts.map +1 -0
  50. package/dist/{index-BmQN3jAS.d.cts → index-BfYEEVHm.d.cts} +3 -13
  51. package/dist/index-BfYEEVHm.d.cts.map +1 -0
  52. package/dist/{index-CuzB95QT.d.cts → index-BhOeIyrZ.d.cts} +11 -9
  53. package/dist/index-BhOeIyrZ.d.cts.map +1 -0
  54. package/dist/{index-B5KqSHeL.d.cts → index-BsvYcU_Y.d.cts} +2 -2
  55. package/dist/{index-B5KqSHeL.d.cts.map → index-BsvYcU_Y.d.cts.map} +1 -1
  56. package/dist/{index-hqEnT64w.d.ts → index-Btl_jMCT.d.ts} +3 -13
  57. package/dist/index-Btl_jMCT.d.ts.map +1 -0
  58. package/dist/{index-C3qDR1J5.d.cts → index-CG-q0j9w.d.ts} +12 -62
  59. package/dist/index-CG-q0j9w.d.ts.map +1 -0
  60. package/dist/index-CPtBvHE8.d.ts +145 -0
  61. package/dist/index-CPtBvHE8.d.ts.map +1 -0
  62. package/dist/{index-CKqC9N4o.d.ts → index-DBKsOzCN.d.cts} +24 -21
  63. package/dist/index-DBKsOzCN.d.cts.map +1 -0
  64. package/dist/index-Xre-0Jka.d.cts +145 -0
  65. package/dist/index-Xre-0Jka.d.cts.map +1 -0
  66. package/dist/index.cjs +39 -68
  67. package/dist/index.cjs.map +1 -1
  68. package/dist/index.d.cts +12 -17
  69. package/dist/index.d.cts.map +1 -1
  70. package/dist/index.d.ts +12 -17
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +27 -38
  73. package/dist/index.js.map +1 -1
  74. package/dist/provider.cjs +3 -3
  75. package/dist/provider.cjs.map +1 -1
  76. package/dist/provider.d.cts +2 -1
  77. package/dist/provider.d.ts +2 -1
  78. package/dist/provider.js +3 -3
  79. package/dist/provider.js.map +1 -1
  80. package/dist/{codec-BOjoJjC5.js → readError-B3Rz7rgs.js} +673 -56
  81. package/dist/readError-B3Rz7rgs.js.map +1 -0
  82. package/dist/{codec-C4LJ0g8v.cjs → readError-COcEDNoZ.cjs} +677 -96
  83. package/dist/readError-COcEDNoZ.cjs.map +1 -0
  84. package/dist/requestAirdrop-DBCOST2B.d.ts +1818 -0
  85. package/dist/requestAirdrop-DBCOST2B.d.ts.map +1 -0
  86. package/dist/requestAirdrop-T1eVn3l5.d.cts +1818 -0
  87. package/dist/requestAirdrop-T1eVn3l5.d.cts.map +1 -0
  88. package/dist/sendInvocation-185ZJrta.cjs +583 -0
  89. package/dist/sendInvocation-185ZJrta.cjs.map +1 -0
  90. package/dist/sendInvocation-DBaNWhr3.js +439 -0
  91. package/dist/sendInvocation-DBaNWhr3.js.map +1 -0
  92. package/dist/signed-op.cjs +2 -2
  93. package/dist/signed-op.d.cts +2 -2
  94. package/dist/signed-op.d.ts +1 -1
  95. package/dist/signed-op.js +2 -2
  96. package/dist/{signedOp-BDUZhfJn.cjs → signedOp-CVyeJ5ig.cjs} +3 -3
  97. package/dist/{signedOp-BDUZhfJn.cjs.map → signedOp-CVyeJ5ig.cjs.map} +1 -1
  98. package/dist/{signedOp-Kx8u8_3I.js → signedOp-D6WYZG9j.js} +3 -3
  99. package/dist/{signedOp-Kx8u8_3I.js.map → signedOp-D6WYZG9j.js.map} +1 -1
  100. package/dist/{signed_op-CAcYYRm6.cjs → signed_op-BBsDKOlD.cjs} +4 -4
  101. package/dist/{signed_op-CAcYYRm6.cjs.map → signed_op-BBsDKOlD.cjs.map} +1 -1
  102. package/dist/{signed_op-BrLxDrDb.d.cts → signed_op-BvbOHWKK.d.ts} +3 -3
  103. package/dist/{signed_op-DbRq3_Hb.d.ts.map → signed_op-BvbOHWKK.d.ts.map} +1 -1
  104. package/dist/{signed_op-DbRq3_Hb.d.ts → signed_op-DoHFpSH4.d.cts} +3 -3
  105. package/dist/{signed_op-BrLxDrDb.d.cts.map → signed_op-DoHFpSH4.d.cts.map} +1 -1
  106. package/dist/{signed_op-Dxn7-lRu.js → signed_op-h9X9-vBL.js} +3 -3
  107. package/dist/{signed_op-Dxn7-lRu.js.map → signed_op-h9X9-vBL.js.map} +1 -1
  108. package/dist/transport-BhWZxHcz.cjs +528 -0
  109. package/dist/transport-BhWZxHcz.cjs.map +1 -0
  110. package/dist/transport-EyDYuibb.js +504 -0
  111. package/dist/transport-EyDYuibb.js.map +1 -0
  112. package/dist/transport.cjs +6 -13
  113. package/dist/transport.d.cts +3 -3
  114. package/dist/transport.d.ts +3 -3
  115. package/dist/transport.js +4 -4
  116. package/dist/types-VYjJcTip.d.cts +161 -0
  117. package/dist/types-VYjJcTip.d.cts.map +1 -0
  118. package/dist/types-VYjJcTip.d.ts +161 -0
  119. package/dist/types-VYjJcTip.d.ts.map +1 -0
  120. package/dist/{validation-eXATmgO0.js → validation-BLQ64Dfh.js} +3 -3
  121. package/dist/validation-BLQ64Dfh.js.map +1 -0
  122. package/dist/{validation-4w-vDGAi.cjs → validation-CZqtmMLJ.cjs} +3 -3
  123. package/dist/validation-CZqtmMLJ.cjs.map +1 -0
  124. package/dist/{wallet-5wt9wLG3.js → wallet-NlZiI4-3.js} +161 -77
  125. package/dist/wallet-NlZiI4-3.js.map +1 -0
  126. package/dist/{wallet-Blh7oas7.cjs → wallet-UvyXtxh5.cjs} +161 -77
  127. package/dist/wallet-UvyXtxh5.cjs.map +1 -0
  128. package/dist/wallet.cjs +2 -8
  129. package/dist/wallet.d.cts +4 -3
  130. package/dist/wallet.d.ts +4 -3
  131. package/dist/wallet.js +3 -3
  132. package/package.json +2 -2
  133. package/dist/actions-1LmkZcfS.js +0 -430
  134. package/dist/actions-1LmkZcfS.js.map +0 -1
  135. package/dist/actions-DK_XBeVy.cjs.map +0 -1
  136. package/dist/artifact-BM_MVzhL.d.cts.map +0 -1
  137. package/dist/artifact-BM_MVzhL.d.ts.map +0 -1
  138. package/dist/client-DocSdzOL.d.cts +0 -790
  139. package/dist/client-DocSdzOL.d.cts.map +0 -1
  140. package/dist/client-DocSdzOL.d.ts +0 -790
  141. package/dist/client-DocSdzOL.d.ts.map +0 -1
  142. package/dist/codec-BOjoJjC5.js.map +0 -1
  143. package/dist/codec-C4LJ0g8v.cjs.map +0 -1
  144. package/dist/contract-Cu8Qv94_.js.map +0 -1
  145. package/dist/contract-DPm2BJTu.cjs.map +0 -1
  146. package/dist/dev_wallet-B5R5JJaw.js.map +0 -1
  147. package/dist/dev_wallet-BcvX_xT4.cjs.map +0 -1
  148. package/dist/execution-C8oQgpO3.d.cts.map +0 -1
  149. package/dist/execution-DsZzqv_C.d.ts.map +0 -1
  150. package/dist/index-BmQN3jAS.d.cts.map +0 -1
  151. package/dist/index-C3qDR1J5.d.cts.map +0 -1
  152. package/dist/index-CHnfHuQo.d.ts.map +0 -1
  153. package/dist/index-CIHK7Ew9.d.cts +0 -303
  154. package/dist/index-CIHK7Ew9.d.cts.map +0 -1
  155. package/dist/index-CIHK7Ew9.d.ts +0 -303
  156. package/dist/index-CIHK7Ew9.d.ts.map +0 -1
  157. package/dist/index-CKqC9N4o.d.ts.map +0 -1
  158. package/dist/index-CuzB95QT.d.cts.map +0 -1
  159. package/dist/index-Zaz-e8Sy.d.ts.map +0 -1
  160. package/dist/index-hqEnT64w.d.ts.map +0 -1
  161. package/dist/index-rrP1HJ2Z.d.cts.map +0 -1
  162. package/dist/readError-Cz3bveZa.cjs +0 -622
  163. package/dist/readError-Cz3bveZa.cjs.map +0 -1
  164. package/dist/readError-Z5zuylri.js +0 -569
  165. package/dist/readError-Z5zuylri.js.map +0 -1
  166. package/dist/readViews-BvMHbiaF.d.ts +0 -609
  167. package/dist/readViews-BvMHbiaF.d.ts.map +0 -1
  168. package/dist/readViews-CQOY5v4o.d.cts +0 -609
  169. package/dist/readViews-CQOY5v4o.d.cts.map +0 -1
  170. package/dist/sendInvocation-8TEMrJ_M.cjs +0 -661
  171. package/dist/sendInvocation-8TEMrJ_M.cjs.map +0 -1
  172. package/dist/sendInvocation-CkeMyLk1.js +0 -505
  173. package/dist/sendInvocation-CkeMyLk1.js.map +0 -1
  174. package/dist/transport-DqlfAsuH.cjs +0 -279
  175. package/dist/transport-DqlfAsuH.cjs.map +0 -1
  176. package/dist/transport-PstrCcBv.js +0 -261
  177. package/dist/transport-PstrCcBv.js.map +0 -1
  178. package/dist/validation-4w-vDGAi.cjs.map +0 -1
  179. package/dist/validation-eXATmgO0.js.map +0 -1
  180. package/dist/wallet-5wt9wLG3.js.map +0 -1
  181. package/dist/wallet-Blh7oas7.cjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,19 +1,19 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_decimal = require("./decimal-BX7abv5J.cjs");
3
+ const require_hex = require("./hex-CSDZ9d6z.cjs");
4
+ const require_contract = require("./contract-D_vxUudr.cjs");
2
5
  const require_sign = require("./sign-BewmV_EL.cjs");
3
6
  const require_transaction = require("./transaction-DrSrCJ5y.cjs");
4
7
  const require_size = require("./size-OAFfOthl.cjs");
5
- const require_contract = require("./contract-DPm2BJTu.cjs");
6
- const require_codec = require("./codec-C4LJ0g8v.cjs");
7
- const require_hex = require("./hex-DkGpiZ5e.cjs");
8
8
  const require_transactionHash = require("./transactionHash-D5yf4KoL.cjs");
9
- const require_readError = require("./readError-Cz3bveZa.cjs");
10
- const require_sendInvocation = require("./sendInvocation-8TEMrJ_M.cjs");
11
- const require_validation = require("./validation-4w-vDGAi.cjs");
12
- const require_actions = require("./actions-DK_XBeVy.cjs");
13
- const require_wallet = require("./wallet-Blh7oas7.cjs");
14
- const require_signedOp = require("./signedOp-BDUZhfJn.cjs");
15
- const require_signed_op = require("./signed_op-CAcYYRm6.cjs");
16
- const require_transport = require("./transport-DqlfAsuH.cjs");
9
+ const require_readError = require("./readError-COcEDNoZ.cjs");
10
+ const require_sendInvocation = require("./sendInvocation-185ZJrta.cjs");
11
+ const require_actions = require("./actions-B2gV8Vzr.cjs");
12
+ const require_validation = require("./validation-CZqtmMLJ.cjs");
13
+ const require_wallet = require("./wallet-UvyXtxh5.cjs");
14
+ const require_signedOp = require("./signedOp-CVyeJ5ig.cjs");
15
+ const require_signed_op = require("./signed_op-BBsDKOlD.cjs");
16
+ const require_transport = require("./transport-BhWZxHcz.cjs");
17
17
  const require_signers = require("./signers-BFP84wJP.cjs");
18
18
  let _thruputchain_protocol = require("@thruputchain/protocol");
19
19
  let _thruputchain_protocol_utils = require("@thruputchain/protocol/utils");
@@ -72,21 +72,12 @@ function localnet(options = {}) {
72
72
  capabilities: ["airdrop"]
73
73
  });
74
74
  }
75
- /** Error thrown when an RPC endpoint does not match its declared cluster. */
76
- var NetworkMismatchError = class extends Error {
77
- cluster;
78
- actual;
79
- constructor(cluster, actual) {
80
- const expected = cluster.networkHash === void 0 ? "an unpinned network" : `network ${(0, _thruputchain_protocol_utils.toBase58)(cluster.networkHash)}`;
81
- super(`Network mismatch${cluster.name ? ` for ${cluster.name}` : ""}: expected ${expected}, received network ${(0, _thruputchain_protocol_utils.toBase58)(actual.networkHash)}`);
82
- this.name = "NetworkMismatchError";
83
- this.cluster = cluster;
84
- this.actual = actual;
85
- }
86
- };
87
- /** Assert that runtime network information matches a cluster descriptor. */
75
+ /** Assert that runtime network information matches a cluster descriptor. Throws code `networkMismatch`. */
88
76
  function assertNetworkMatchesCluster(cluster, actual) {
89
- if (cluster.networkHash !== void 0 && !bytesEqual$1(actual.networkHash, cluster.networkHash)) throw new NetworkMismatchError(cluster, actual);
77
+ if (cluster.networkHash !== void 0 && !bytesEqual$1(actual.networkHash, cluster.networkHash)) throw new require_decimal.ThruputError("networkMismatch", `Network mismatch${cluster.name ? ` for ${cluster.name}` : ""}: expected network ${(0, _thruputchain_protocol_utils.toBase58)(cluster.networkHash)}, received network ${(0, _thruputchain_protocol_utils.toBase58)(actual.networkHash)}`, { context: {
78
+ cluster,
79
+ actual
80
+ } });
90
81
  }
91
82
  function withNetworkHash(options) {
92
83
  return options.networkHash === void 0 ? {} : { networkHash: options.networkHash };
@@ -111,7 +102,7 @@ function bytesEqual$1(left, right) {
111
102
  //#region src/client.ts
112
103
  async function createThruputClient(options) {
113
104
  const cluster = options.cluster === void 0 ? void 0 : defineCluster(options.cluster);
114
- const transport = options.transport ?? (cluster?.rpcUrl ? new require_readError.HttpTransport(cluster.rpcUrl) : void 0);
105
+ const transport = options.transport ?? (cluster?.rpcUrl ? new require_transport.HttpTransport(cluster.rpcUrl) : void 0);
115
106
  if (!transport) throw new Error("Cluster has no default RPC URL; provide a transport or rpcUrl");
116
107
  const requiredMethods = [...options.requiredMethods ?? []];
117
108
  if (cluster?.capabilities.includes("airdrop")) requiredMethods.push("faucet_requestAirdrop");
@@ -122,8 +113,8 @@ async function createThruputClient(options) {
122
113
  signal: options.signal
123
114
  });
124
115
  const client = Object.assign(rpc, {
125
- waitForTransactionReceipt: (hash, wait) => require_sendInvocation.waitForTransactionReceipt(rpc, hash, wait),
126
- waitForCommitment: (hash, wait) => require_sendInvocation.waitForCommitment(rpc, hash, wait),
116
+ waitForTransactionReceipt: (hash, wait) => require_actions.waitForTransactionReceipt(rpc, hash, wait),
117
+ waitForCommitment: (hash, wait) => require_actions.waitForCommitment(rpc, hash, wait),
127
118
  readViews: (request, control) => require_actions.readViews(rpc, request, control),
128
119
  getContractEvents: (query, control) => require_actions.getContractEvents(rpc, query, control),
129
120
  iterateTransactionsByRootAddress: (query, options) => require_actions.iterateTransactionsByRootAddress(rpc, query, options),
@@ -141,30 +132,28 @@ async function createThruputClient(options) {
141
132
  }
142
133
  //#endregion
143
134
  //#region src/units.ts
144
- /** Invalid decimal input to {@link parseUnits}. */
145
- var ParseUnitsError = class extends Error {
146
- code;
147
- constructor(code, decimals) {
148
- super(code === "malformed" ? "Use a plain decimal amount" : `Use at most ${decimals} decimal places`);
149
- this.code = code;
150
- this.name = "ParseUnitsError";
151
- }
152
- };
135
+ function amountInvalid(kind, decimals) {
136
+ return new require_decimal.ThruputError("amountInvalid", kind === "malformed" ? "Use a plain decimal amount" : `Use at most ${decimals} decimal places`, { context: {
137
+ kind,
138
+ decimals
139
+ } });
140
+ }
153
141
  /**
154
142
  * Convert a plain decimal string to raw units without rounding.
155
143
  *
156
144
  * Accepts a leading minus sign. Rejects whitespace, exponent notation, and
157
145
  * excess fractional digits, including zeroes. Decimals must be 0–255.
158
- * Token positivity and ABI bounds are separate validation steps.
146
+ * Token positivity and ABI bounds are separate validation steps. Invalid text
147
+ * throws code `amountInvalid`, with `context.kind` `malformed` or `precision`.
159
148
  *
160
149
  * @example `parseUnits("12.05", 2)` returns `1205n`.
161
150
  */
162
151
  function parseUnits(text, decimals) {
163
152
  assertDecimals(decimals);
164
- if (typeof text !== "string" || text.trim() !== text || !/^-?[0-9]+(?:\.[0-9]+)?$/.test(text)) throw new ParseUnitsError("malformed", decimals);
153
+ if (typeof text !== "string" || text.trim() !== text || !/^-?[0-9]+(?:\.[0-9]+)?$/.test(text)) throw amountInvalid("malformed", decimals);
165
154
  const negative = text.startsWith("-");
166
155
  const [whole, fraction = ""] = (negative ? text.slice(1) : text).split(".");
167
- if (fraction.length > decimals) throw new ParseUnitsError("precision", decimals);
156
+ if (fraction.length > decimals) throw amountInvalid("precision", decimals);
168
157
  const units = BigInt(whole + fraction.padEnd(decimals, "0"));
169
158
  return negative ? -units : units;
170
159
  }
@@ -188,14 +177,12 @@ function assertDecimals(decimals) {
188
177
  if (!Number.isInteger(decimals) || decimals < 0 || decimals > 255) throw new RangeError("decimals must be an integer between 0 and 255");
189
178
  }
190
179
  //#endregion
191
- exports.ContractDecodeError = require_contract.ContractDecodeError;
192
180
  Object.defineProperty(exports, "ContractMethodEffect", {
193
181
  enumerable: true,
194
182
  get: function() {
195
183
  return _thruputchain_contract_spec.ContractMethodEffect;
196
184
  }
197
185
  });
198
- exports.ContractReceiptError = require_contract.ContractReceiptError;
199
186
  Object.defineProperty(exports, "ContractTypeDefKind", {
200
187
  enumerable: true,
201
188
  get: function() {
@@ -214,8 +201,6 @@ Object.defineProperty(exports, "ContractUnionCaseKind", {
214
201
  return _thruputchain_contract_spec.ContractUnionCaseKind;
215
202
  }
216
203
  });
217
- exports.ContractVerificationError = require_contract.ContractVerificationError;
218
- exports.ContractViewError = require_contract.ContractViewError;
219
204
  exports.DEVNET_RPC_URL = DEVNET_RPC_URL;
220
205
  exports.Ed25519Signer = require_signers.Ed25519Signer;
221
206
  Object.defineProperty(exports, "ExecResult", {
@@ -224,41 +209,22 @@ Object.defineProperty(exports, "ExecResult", {
224
209
  return _thruputchain_protocol.ExecResult;
225
210
  }
226
211
  });
227
- exports.ExecutionDecodeError = require_sendInvocation.ExecutionDecodeError;
228
- exports.ExecutionReturnUnavailableError = require_sendInvocation.ExecutionReturnUnavailableError;
229
212
  exports.FUTURENET_RPC_URL = FUTURENET_RPC_URL;
230
- exports.FundingObservationError = require_actions.FundingObservationError;
231
- exports.HistoryWalkError = require_actions.HistoryWalkError;
232
- exports.HttpRequestError = require_readError.HttpRequestError;
233
- exports.HttpResponseError = require_readError.HttpResponseError;
234
- exports.HttpTransport = require_readError.HttpTransport;
213
+ exports.HttpTransport = require_transport.HttpTransport;
235
214
  Object.defineProperty(exports, "InvokeFlag", {
236
215
  enumerable: true,
237
216
  get: function() {
238
217
  return _thruputchain_protocol.InvokeFlag;
239
218
  }
240
219
  });
241
- exports.JsonRpcError = require_readError.JsonRpcError;
242
220
  exports.LOCALNET_RPC_URL = LOCALNET_RPC_URL;
243
221
  exports.MlDsa65Signer = require_signers.MlDsa65Signer;
244
222
  exports.MockTransport = require_transport.MockTransport;
245
- exports.NativeRpcError = require_readError.NativeRpcError;
246
223
  exports.NativeRpcErrorCode = require_transport.NativeRpcErrorCode;
247
- exports.NetworkMismatchError = NetworkMismatchError;
248
- exports.ParseUnitsError = ParseUnitsError;
249
- exports.RpcCompatibilityError = require_readError.RpcCompatibilityError;
250
- exports.RpcDecodingError = require_codec.RpcDecodingError;
251
- exports.RpcRequestValidationError = require_codec.RpcRequestValidationError;
252
- exports.RpcResponseError = require_readError.RpcResponseError;
253
224
  exports.SignedOp = require_signed_op.SignedOp;
254
225
  exports.SignedOpSpec = require_signed_op.spec;
255
- exports.TransactionExecutionError = require_sendInvocation.TransactionExecutionError;
256
- exports.TransactionObservationError = require_sendInvocation.TransactionObservationError;
257
- exports.TransactionReceiptObservationError = require_sendInvocation.TransactionReceiptObservationError;
258
- exports.TransactionReceiptTimeoutError = require_sendInvocation.TransactionReceiptTimeoutError;
259
- exports.UnsupportedRpcValue = require_codec.UnsupportedRpcValue;
260
- exports.UnsupportedTransactionAdmissionError = require_sendInvocation.UnsupportedTransactionAdmissionError;
261
- exports.UnsupportedTransactionOutcomeError = require_sendInvocation.UnsupportedTransactionOutcomeError;
226
+ exports.ThruputError = require_decimal.ThruputError;
227
+ exports.UnsupportedRpcValue = require_decimal.UnsupportedRpcValue;
262
228
  exports.addressFromBase58 = require_hex.addressFromBase58;
263
229
  exports.addressFromHex = require_hex.addressFromHex;
264
230
  exports.addressToStrkey = require_hex.addressToStrkey;
@@ -368,6 +334,8 @@ Object.defineProperty(exports, "invokeFlagSet", {
368
334
  }
369
335
  });
370
336
  exports.isSignedToken = require_contract.isSignedToken;
337
+ exports.isThruputError = require_decimal.isThruputError;
338
+ exports.isUnsupportedRpcValue = require_decimal.isUnsupportedRpcValue;
371
339
  exports.iterateEventPages = require_actions.iterateEventPages;
372
340
  exports.iterateTransactionsByBlock = require_actions.iterateTransactionsByBlock;
373
341
  exports.iterateTransactionsByRootAddress = require_actions.iterateTransactionsByRootAddress;
@@ -434,12 +402,15 @@ Object.defineProperty(exports, "toBase58", {
434
402
  });
435
403
  exports.toHex0x = require_hex.toHex0x;
436
404
  exports.topicRepresentation = require_contract.topicRepresentation;
405
+ exports.transactionErrorCodes = require_decimal.transactionErrorCodes;
406
+ exports.transactionOutcomes = require_contract.transactionOutcomes;
407
+ exports.transactionReasons = require_contract.transactionReasons;
437
408
  exports.transactionSignaturePreimage = require_size.transactionSignaturePreimage;
438
409
  exports.txInvalidDetail = require_transport.txInvalidDetail;
439
410
  exports.verifyMlDsa65 = require_signers.verifyMlDsa65;
440
- exports.waitForCommitment = require_sendInvocation.waitForCommitment;
411
+ exports.waitForCommitment = require_actions.waitForCommitment;
441
412
  exports.waitForExecution = require_sendInvocation.waitForExecution;
442
- exports.waitForTransactionReceipt = require_sendInvocation.waitForTransactionReceipt;
413
+ exports.waitForTransactionReceipt = require_actions.waitForTransactionReceipt;
443
414
  exports.walletGasLimit = require_sendInvocation.walletGasLimit;
444
415
 
445
416
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["bytesEqual","HttpTransport","createRpcClient","waitForTransactionReceipt","waitForCommitment","readViews","getContractEvents","iterateTransactionsByRootAddress","iterateTransactionsByBlock","iterateEventPages","requestAirdrop","requestAirdropAttempt"],"sources":["../src/cluster.ts","../src/client.ts","../src/units.ts"],"sourcesContent":["import {\n networkHash as toNetworkHash,\n sha256Hash,\n type NetworkHash,\n} from \"@thruputchain/protocol\";\nimport type { NetworkInfo } from \"./types/rpc.js\";\nimport { toBase58 } from \"./encoding.js\";\n\n/** Public Thruput Futurenet JSON-RPC endpoint. */\nexport const FUTURENET_RPC_URL = \"https://rpc.thruput.network\";\n\n/** @deprecated Use {@link FUTURENET_RPC_URL}. */\nexport const DEVNET_RPC_URL = FUTURENET_RPC_URL;\n\n/** Default JSON-RPC endpoint for `thruput node`. */\nexport const LOCALNET_RPC_URL = \"http://127.0.0.1:9545\";\n\n/** Optional feature exposed by a Thruput cluster. */\nexport type ClusterCapability = \"airdrop\";\n\n/** Network identity and optional features expected at an RPC endpoint. */\nexport interface Cluster<\n TCapabilities extends readonly ClusterCapability[] =\n readonly ClusterCapability[],\n> {\n /** Optional human-readable cluster name. */\n readonly name?: string;\n\n /** Optional protocol network identity pin. */\n readonly networkHash?: NetworkHash;\n\n /** Default JSON-RPC endpoint, when the cluster has one. */\n readonly rpcUrl?: string;\n\n /** Optional RPC features expected to be available on the cluster. */\n readonly capabilities: TCapabilities;\n}\n\n/** Whether every possible cluster descriptor declares an optional feature. */\nexport type ClusterHasCapability<\n TCluster extends Cluster,\n TCapability extends ClusterCapability,\n> = false extends (\n TCluster extends Cluster<infer TCapabilities>\n ? TCapabilities extends readonly ClusterCapability[]\n ? number extends TCapabilities[\"length\"]\n ? false\n : TCapability extends TCapabilities[number]\n ? true\n : false\n : false\n : false\n)\n ? false\n : true;\n\n/** Options shared by predefined cluster descriptors. */\nexport interface PredefinedClusterOptions {\n /** Override the cluster's default JSON-RPC endpoint. */\n readonly rpcUrl?: string;\n\n /** Pin the endpoint to one protocol signing network. */\n readonly networkHash?: NetworkHash;\n}\n\n/** Define a reusable cluster while preserving its literal capability types. */\nexport function defineCluster<const TCluster extends Cluster>(\n cluster: TCluster & { readonly genesisHash?: never },\n): TCluster {\n if (cluster.rpcUrl !== undefined) validateRpcUrl(cluster.rpcUrl);\n return Object.freeze({\n ...cluster,\n ...(cluster.networkHash === undefined\n ? {}\n : {\n networkHash: toNetworkHash(\n sha256Hash(new Uint8Array(cluster.networkHash)),\n ),\n }),\n capabilities: Object.freeze([\n ...cluster.capabilities,\n ]) as unknown as TCluster[\"capabilities\"],\n }) as TCluster;\n}\n\n/** Define the canonical Thruput mainnet cluster. */\nexport function mainnet(\n options: PredefinedClusterOptions = {},\n): Cluster<readonly []> & { readonly name: \"mainnet\" } {\n return defineCluster({\n name: \"mainnet\",\n capabilities: [] as const,\n ...withOptionalRpcUrl(options),\n ...withNetworkHash(options),\n });\n}\n\n/** Define Futurenet, the resettable public development network, unpinned unless `networkHash` is supplied. */\nexport function futurenet(\n options: PredefinedClusterOptions = {},\n): Cluster<readonly [\"airdrop\"]> & { readonly name: \"futurenet\" } {\n return defineCluster({\n name: \"futurenet\",\n rpcUrl: options.rpcUrl ?? FUTURENET_RPC_URL,\n capabilities: [\"airdrop\"] as const,\n ...withNetworkHash(options),\n });\n}\n\n/**\n * Compatibility alias for {@link futurenet}, retaining the legacy cluster name.\n * @deprecated Use {@link futurenet}.\n */\nexport function devnet(\n options: PredefinedClusterOptions = {},\n): Cluster<readonly [\"airdrop\"]> & { readonly name: \"devnet\" } {\n return defineCluster({ ...futurenet(options), name: \"devnet\" });\n}\n\n/** Define a local `thruput node` development network. */\nexport function localnet(\n options: PredefinedClusterOptions = {},\n): Cluster<readonly [\"airdrop\"]> & { readonly name: \"localnet\" } {\n return defineCluster({\n name: \"localnet\",\n networkHash:\n options.networkHash ?? toNetworkHash(sha256Hash(new Uint8Array(32))),\n rpcUrl: options.rpcUrl ?? LOCALNET_RPC_URL,\n capabilities: [\"airdrop\"] as const,\n });\n}\n\n/** Error thrown when an RPC endpoint does not match its declared cluster. */\nexport class NetworkMismatchError extends Error {\n readonly cluster: Cluster;\n readonly actual: NetworkInfo;\n\n constructor(cluster: Cluster, actual: NetworkInfo) {\n const expected =\n cluster.networkHash === undefined\n ? \"an unpinned network\"\n : `network ${toBase58(cluster.networkHash)}`;\n super(\n `Network mismatch${cluster.name ? ` for ${cluster.name}` : \"\"}: expected ${expected}, received network ${toBase58(actual.networkHash)}`,\n );\n this.name = \"NetworkMismatchError\";\n this.cluster = cluster;\n this.actual = actual;\n }\n}\n\n/** Assert that runtime network information matches a cluster descriptor. */\nexport function assertNetworkMatchesCluster(\n cluster: Cluster,\n actual: NetworkInfo,\n): void {\n if (\n cluster.networkHash !== undefined &&\n !bytesEqual(actual.networkHash, cluster.networkHash)\n ) {\n throw new NetworkMismatchError(cluster, actual);\n }\n}\n\nfunction withNetworkHash(options: PredefinedClusterOptions): {\n networkHash?: NetworkHash;\n} {\n return options.networkHash === undefined\n ? {}\n : { networkHash: options.networkHash };\n}\n\nfunction withOptionalRpcUrl(options: PredefinedClusterOptions): {\n rpcUrl?: string;\n} {\n return options.rpcUrl === undefined ? {} : { rpcUrl: options.rpcUrl };\n}\n\nfunction validateRpcUrl(rpcUrl: string): void {\n let url: URL;\n try {\n url = new URL(rpcUrl);\n } catch {\n throw new Error(`Cluster rpcUrl must be an absolute HTTP URL: ${rpcUrl}`);\n }\n if (url.protocol !== \"http:\" && url.protocol !== \"https:\") {\n throw new Error(`Cluster rpcUrl must use HTTP or HTTPS: ${rpcUrl}`);\n }\n}\n\nfunction bytesEqual(left: Uint8Array, right: Uint8Array): boolean {\n if (left.length !== right.length) return false;\n return left.every((byte, index) => byte === right[index]);\n}\n","import type { Transport } from \"./transport/types.js\";\nimport { HttpTransport } from \"./transport/http.js\";\nimport {\n createRpcClient,\n type RpcClient,\n type RpcMethod,\n} from \"./rpc/client.js\";\nimport type { Cluster, ClusterHasCapability } from \"./cluster.js\";\nimport { defineCluster } from \"./cluster.js\";\nimport type {\n AirdropAttemptRequest,\n AirdropResponse,\n AirdropSucceeded,\n EventQuery,\n EventPage,\n NetworkInfo,\n TransactionReceipt,\n} from \"./types/rpc.js\";\nimport type { TransportRequestOptions } from \"./transport/types.js\";\nimport {\n requestAirdrop,\n requestAirdropAttempt,\n type RequestAirdropOptions,\n} from \"./actions/public/requestAirdrop.js\";\nimport {\n waitForTransactionReceipt,\n waitForCommitment,\n type KnownCommitment,\n type WaitForTransactionReceiptOptions,\n} from \"./actions/public/waitForTransactionReceipt.js\";\nimport {\n readViews,\n type ReadViewsRequest,\n type ReadViewsResponse,\n} from \"./actions/public/readViews.js\";\nimport type { ContractViewRequest } from \"./contract/method.js\";\nimport {\n getContractEvents,\n type ContractEventQuery,\n type ContractEventPage,\n} from \"./actions/public/getContractEvents.js\";\nimport {\n iterateTransactionsByRootAddress,\n iterateTransactionsByBlock,\n type RootAddressWalkQuery,\n type BlockTransactionWalkQuery,\n} from \"./actions/public/iterateTransactionPages.js\";\nimport type { HistoryCompletion } from \"./actions/public/historyWalk.js\";\nimport type { TransactionRefPage } from \"./types/rpc.js\";\nimport {\n iterateEventPages,\n type EventWalkQuery,\n} from \"./actions/public/iterateEventPages.js\";\n\n/** Native RPC methods plus workflows that never sign, replace or repeat writes. */\nexport interface CoreThruputClient extends RpcClient {\n iterateTransactionsByRootAddress(\n query: RootAddressWalkQuery,\n options?: TransportRequestOptions,\n ): AsyncGenerator<TransactionRefPage, HistoryCompletion, unknown>;\n iterateTransactionsByBlock(\n query: BlockTransactionWalkQuery,\n options?: TransportRequestOptions,\n ): AsyncGenerator<TransactionRefPage, void, unknown>;\n waitForTransactionReceipt(\n transactionHash: Uint8Array,\n options?: WaitForTransactionReceiptOptions,\n ): Promise<TransactionReceipt>;\n waitForCommitment(\n transactionHash: Uint8Array,\n options?: WaitForTransactionReceiptOptions,\n ): Promise<KnownCommitment>;\n readViews<const TCalls extends readonly ContractViewRequest[]>(\n request: ReadViewsRequest<TCalls>,\n options?: TransportRequestOptions,\n ): Promise<ReadViewsResponse<TCalls>>;\n getContractEvents<TName extends string, TTopics, TFields, TFilter>(\n query: ContractEventQuery<TName, TTopics, TFields, TFilter>,\n options?: TransportRequestOptions,\n ): Promise<ContractEventPage<TName, TTopics, TFields>>;\n iterateEventPages(\n query: EventWalkQuery,\n options?: TransportRequestOptions,\n ): AsyncGenerator<EventPage, HistoryCompletion, unknown>;\n}\n\n/** Optional one-call faucet workflow, gated by endpoint discovery. */\nexport interface AirdropActions {\n requestAirdrop(options: RequestAirdropOptions): Promise<AirdropSucceeded>;\n requestAirdropAttempt(\n request: AirdropAttemptRequest,\n options?: TransportRequestOptions,\n ): Promise<AirdropResponse>;\n}\nexport interface ThruputClient extends CoreThruputClient, AirdropActions {}\nexport type ConnectedThruputClient<TCluster extends Cluster = Cluster> =\n CoreThruputClient & {\n readonly cluster: TCluster & { readonly genesisHash?: never };\n readonly network: NetworkInfo;\n } & (ClusterHasCapability<TCluster, \"airdrop\"> extends true\n ? AirdropActions\n : {});\n\nexport interface ThruputClientOptions {\n readonly transport: Transport;\n readonly cluster?: never;\n readonly requiredMethods?: readonly RpcMethod[];\n readonly signal?: AbortSignal;\n}\nexport interface ClusterThruputClientOptions<\n TCluster extends Cluster = Cluster,\n> {\n readonly cluster: TCluster & { readonly genesisHash?: never };\n readonly transport?: Transport;\n readonly requiredMethods?: readonly RpcMethod[];\n readonly signal?: AbortSignal;\n}\n\n/** Connect once, validate wire/network/capabilities, and bind native methods and workflows. */\nexport function createThruputClient<const TCluster extends Cluster>(\n options: ClusterThruputClientOptions<TCluster>,\n): Promise<ConnectedThruputClient<TCluster>>;\nexport function createThruputClient(\n options: ThruputClientOptions,\n): Promise<ThruputClient>;\nexport async function createThruputClient(\n options: ThruputClientOptions | ClusterThruputClientOptions,\n): Promise<ThruputClient | ConnectedThruputClient> {\n const cluster =\n options.cluster === undefined ? undefined : defineCluster(options.cluster);\n const transport =\n options.transport ??\n (cluster?.rpcUrl ? new HttpTransport(cluster.rpcUrl) : undefined);\n if (!transport)\n throw new Error(\n \"Cluster has no default RPC URL; provide a transport or rpcUrl\",\n );\n const requiredMethods = [...(options.requiredMethods ?? [])];\n if (cluster?.capabilities.includes(\"airdrop\"))\n requiredMethods.push(\"faucet_requestAirdrop\");\n const rpc = await createRpcClient({\n transport,\n expectedNetworkHash: cluster?.networkHash,\n requiredMethods,\n signal: options.signal,\n });\n const client = Object.assign(rpc, {\n waitForTransactionReceipt: (\n hash: Uint8Array,\n wait?: WaitForTransactionReceiptOptions,\n ) => waitForTransactionReceipt(rpc, hash, wait),\n waitForCommitment: (\n hash: Uint8Array,\n wait?: WaitForTransactionReceiptOptions,\n ) => waitForCommitment(rpc, hash, wait),\n readViews: <const T extends readonly ContractViewRequest[]>(\n request: ReadViewsRequest<T>,\n control?: TransportRequestOptions,\n ) => readViews(rpc, request, control),\n getContractEvents: <N extends string, T, F, Q>(\n query: ContractEventQuery<N, T, F, Q>,\n control?: TransportRequestOptions,\n ) => getContractEvents(rpc, query, control),\n iterateTransactionsByRootAddress: (\n query: RootAddressWalkQuery,\n options?: TransportRequestOptions,\n ) => iterateTransactionsByRootAddress(rpc, query, options),\n iterateTransactionsByBlock: (\n query: BlockTransactionWalkQuery,\n options?: TransportRequestOptions,\n ) => iterateTransactionsByBlock(rpc, query, options),\n iterateEventPages: (\n query: EventWalkQuery,\n control?: TransportRequestOptions,\n ) => iterateEventPages(rpc, query, control),\n });\n if (!cluster || cluster.capabilities.includes(\"airdrop\"))\n Object.assign(client, {\n requestAirdrop: (request: RequestAirdropOptions) =>\n requestAirdrop(rpc, request),\n requestAirdropAttempt: (\n request: AirdropAttemptRequest,\n control?: TransportRequestOptions,\n ) => requestAirdropAttempt(rpc, request, control),\n });\n return (\n cluster\n ? Object.assign(client, { cluster, network: rpc.discovery.network })\n : client\n ) as ThruputClient | ConnectedThruputClient;\n}\n","/** Invalid decimal input to {@link parseUnits}. */\nexport class ParseUnitsError extends Error {\n constructor(\n readonly code: \"malformed\" | \"precision\",\n decimals: number,\n ) {\n super(\n code === \"malformed\"\n ? \"Use a plain decimal amount\"\n : `Use at most ${decimals} decimal places`,\n );\n this.name = \"ParseUnitsError\";\n }\n}\n\n/**\n * Convert a plain decimal string to raw units without rounding.\n *\n * Accepts a leading minus sign. Rejects whitespace, exponent notation, and\n * excess fractional digits, including zeroes. Decimals must be 0–255.\n * Token positivity and ABI bounds are separate validation steps.\n *\n * @example `parseUnits(\"12.05\", 2)` returns `1205n`.\n */\nexport function parseUnits(text: string, decimals: number): bigint {\n assertDecimals(decimals);\n if (\n typeof text !== \"string\" ||\n text.trim() !== text ||\n !/^-?[0-9]+(?:\\.[0-9]+)?$/.test(text)\n ) {\n throw new ParseUnitsError(\"malformed\", decimals);\n }\n const negative = text.startsWith(\"-\");\n const [whole, fraction = \"\"] = (negative ? text.slice(1) : text).split(\".\");\n if (fraction.length > decimals)\n throw new ParseUnitsError(\"precision\", decimals);\n const units = BigInt(whole! + fraction.padEnd(decimals, \"0\"));\n return negative ? -units : units;\n}\n\n/**\n * Format raw units exactly, omitting redundant fractional zeroes.\n *\n * Decimals must be 0–255. Uses no floating-point conversion or display rounding.\n * @example `formatUnits(-1205n, 2)` returns `\"-12.05\"`.\n */\nexport function formatUnits(value: bigint, decimals: number): string {\n assertDecimals(decimals);\n if (typeof value !== \"bigint\") throw new TypeError(\"value must be a bigint\");\n if (decimals === 0) return value.toString();\n const negative = value < 0n;\n const digits = (negative ? -value : value)\n .toString()\n .padStart(decimals + 1, \"0\");\n const whole = digits.slice(0, -decimals);\n const fraction = digits.slice(-decimals).replace(/0+$/, \"\");\n return `${negative ? \"-\" : \"\"}${whole}${fraction ? `.${fraction}` : \"\"}`;\n}\n\nfunction assertDecimals(decimals: number): void {\n if (!Number.isInteger(decimals) || decimals < 0 || decimals > 255) {\n throw new RangeError(\"decimals must be an integer between 0 and 255\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AASA,MAAa,oBAAoB;;AAGjC,MAAa,iBAAiB;;AAG9B,MAAa,mBAAmB;;AAmDhC,SAAgB,cACd,SACU;CACV,IAAI,QAAQ,WAAW,KAAA,GAAW,eAAe,QAAQ,MAAM;CAC/D,OAAO,OAAO,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AAS,SAAS,UACpB,MAAM,IAAI,gBAAgB,aAAa,QAAQ;CACjD,MAAM,QAAQ,OAAO,QAAS,SAAS,OAAO,UAAU,GAAG,CAAC;CAC5D,OAAO,WAAW,CAAC,QAAQ;AAC7B;;;;;;;AAQA,SAAgB,YAAY,OAAe,UAA0B;CACnE,eAAe,QAAQ;CACvB,IAAI,OAAO,UAAU,UAAU,MAAM,IAAI,UAAU,wBAAwB;CAC3E,IAAI,aAAa,GAAG,OAAO,MAAM,SAAS;CAC1C,MAAM,WAAW,QAAQ;CACzB,MAAM,UAAU,WAAW,CAAC,QAAQ,MAAA,CACjC,SAAS,CAAC,CACV,SAAS,WAAW,GAAG,GAAG;CAC7B,MAAM,QAAQ,OAAO,MAAM,GAAG,CAAC,QAAQ;CACvC,MAAM,WAAW,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,OAAO,EAAE;CAC1D,OAAO,GAAG,WAAW,MAAM,KAAK,QAAQ,WAAW,IAAI,aAAa;AACtE;AAEA,SAAS,eAAe,UAAwB;CAC9C,IAAI,CAAC,OAAO,UAAU,QAAQ,KAAK,WAAW,KAAK,WAAW,KAC5D,MAAM,IAAI,WAAW,+CAA+C;AAExE"}
1
+ {"version":3,"file":"index.cjs","names":["bytesEqual","ThruputError","HttpTransport","createRpcClient","waitForTransactionReceipt","waitForCommitment","readViews","getContractEvents","iterateTransactionsByRootAddress","iterateTransactionsByBlock","iterateEventPages","requestAirdrop","requestAirdropAttempt","ThruputError"],"sources":["../src/cluster.ts","../src/client.ts","../src/units.ts"],"sourcesContent":["import {\n networkHash as toNetworkHash,\n sha256Hash,\n type NetworkHash,\n} from \"@thruputchain/protocol\";\nimport type { NetworkInfo } from \"./types/rpc.js\";\nimport { toBase58 } from \"./encoding.js\";\nimport { ThruputError } from \"./errors/thruputError.js\";\n\n/** Public Thruput Futurenet JSON-RPC endpoint. */\nexport const FUTURENET_RPC_URL = \"https://rpc.thruput.network\";\n\n/** @deprecated Use {@link FUTURENET_RPC_URL}. */\nexport const DEVNET_RPC_URL = FUTURENET_RPC_URL;\n\n/** Default JSON-RPC endpoint for `thruput node`. */\nexport const LOCALNET_RPC_URL = \"http://127.0.0.1:9545\";\n\n/** Optional feature exposed by a Thruput cluster. */\nexport type ClusterCapability = \"airdrop\";\n\n/** Network identity and optional features expected at an RPC endpoint. */\nexport interface Cluster<\n TCapabilities extends readonly ClusterCapability[] =\n readonly ClusterCapability[],\n> {\n /** Optional human-readable cluster name. */\n readonly name?: string;\n\n /** Optional protocol network identity pin. */\n readonly networkHash?: NetworkHash;\n\n /** Default JSON-RPC endpoint, when the cluster has one. */\n readonly rpcUrl?: string;\n\n /** Optional RPC features expected to be available on the cluster. */\n readonly capabilities: TCapabilities;\n}\n\n/** Whether every possible cluster descriptor declares an optional feature. */\nexport type ClusterHasCapability<\n TCluster extends Cluster,\n TCapability extends ClusterCapability,\n> = false extends (\n TCluster extends Cluster<infer TCapabilities>\n ? TCapabilities extends readonly ClusterCapability[]\n ? number extends TCapabilities[\"length\"]\n ? false\n : TCapability extends TCapabilities[number]\n ? true\n : false\n : false\n : false\n)\n ? false\n : true;\n\n/** Options shared by predefined cluster descriptors. */\nexport interface PredefinedClusterOptions {\n /** Override the cluster's default JSON-RPC endpoint. */\n readonly rpcUrl?: string;\n\n /** Pin the endpoint to one protocol signing network. */\n readonly networkHash?: NetworkHash;\n}\n\n/** Define a reusable cluster while preserving its literal capability types. */\nexport function defineCluster<const TCluster extends Cluster>(\n cluster: TCluster & { readonly genesisHash?: never },\n): TCluster {\n if (cluster.rpcUrl !== undefined) validateRpcUrl(cluster.rpcUrl);\n return Object.freeze({\n ...cluster,\n ...(cluster.networkHash === undefined\n ? {}\n : {\n networkHash: toNetworkHash(\n sha256Hash(new Uint8Array(cluster.networkHash)),\n ),\n }),\n capabilities: Object.freeze([\n ...cluster.capabilities,\n ]) as unknown as TCluster[\"capabilities\"],\n }) as TCluster;\n}\n\n/** Define the canonical Thruput mainnet cluster. */\nexport function mainnet(\n options: PredefinedClusterOptions = {},\n): Cluster<readonly []> & { readonly name: \"mainnet\" } {\n return defineCluster({\n name: \"mainnet\",\n capabilities: [] as const,\n ...withOptionalRpcUrl(options),\n ...withNetworkHash(options),\n });\n}\n\n/** Define Futurenet, the resettable public development network, unpinned unless `networkHash` is supplied. */\nexport function futurenet(\n options: PredefinedClusterOptions = {},\n): Cluster<readonly [\"airdrop\"]> & { readonly name: \"futurenet\" } {\n return defineCluster({\n name: \"futurenet\",\n rpcUrl: options.rpcUrl ?? FUTURENET_RPC_URL,\n capabilities: [\"airdrop\"] as const,\n ...withNetworkHash(options),\n });\n}\n\n/**\n * Compatibility alias for {@link futurenet}, retaining the legacy cluster name.\n * @deprecated Use {@link futurenet}.\n */\nexport function devnet(\n options: PredefinedClusterOptions = {},\n): Cluster<readonly [\"airdrop\"]> & { readonly name: \"devnet\" } {\n return defineCluster({ ...futurenet(options), name: \"devnet\" });\n}\n\n/** Define a local `thruput node` development network. */\nexport function localnet(\n options: PredefinedClusterOptions = {},\n): Cluster<readonly [\"airdrop\"]> & { readonly name: \"localnet\" } {\n return defineCluster({\n name: \"localnet\",\n networkHash:\n options.networkHash ?? toNetworkHash(sha256Hash(new Uint8Array(32))),\n rpcUrl: options.rpcUrl ?? LOCALNET_RPC_URL,\n capabilities: [\"airdrop\"] as const,\n });\n}\n\n/** Assert that runtime network information matches a cluster descriptor. Throws code `networkMismatch`. */\nexport function assertNetworkMatchesCluster(\n cluster: Cluster,\n actual: NetworkInfo,\n): void {\n if (\n cluster.networkHash !== undefined &&\n !bytesEqual(actual.networkHash, cluster.networkHash)\n ) {\n throw new ThruputError(\n \"networkMismatch\",\n `Network mismatch${cluster.name ? ` for ${cluster.name}` : \"\"}: expected network ${toBase58(cluster.networkHash)}, received network ${toBase58(actual.networkHash)}`,\n { context: { cluster, actual } },\n );\n }\n}\n\nfunction withNetworkHash(options: PredefinedClusterOptions): {\n networkHash?: NetworkHash;\n} {\n return options.networkHash === undefined\n ? {}\n : { networkHash: options.networkHash };\n}\n\nfunction withOptionalRpcUrl(options: PredefinedClusterOptions): {\n rpcUrl?: string;\n} {\n return options.rpcUrl === undefined ? {} : { rpcUrl: options.rpcUrl };\n}\n\nfunction validateRpcUrl(rpcUrl: string): void {\n let url: URL;\n try {\n url = new URL(rpcUrl);\n } catch {\n throw new Error(`Cluster rpcUrl must be an absolute HTTP URL: ${rpcUrl}`);\n }\n if (url.protocol !== \"http:\" && url.protocol !== \"https:\") {\n throw new Error(`Cluster rpcUrl must use HTTP or HTTPS: ${rpcUrl}`);\n }\n}\n\nfunction bytesEqual(left: Uint8Array, right: Uint8Array): boolean {\n if (left.length !== right.length) return false;\n return left.every((byte, index) => byte === right[index]);\n}\n","import type { Transport } from \"./transport/types.js\";\nimport { HttpTransport } from \"./transport/http.js\";\nimport {\n createRpcClient,\n type RpcClient,\n type RpcMethod,\n} from \"./rpc/client.js\";\nimport type { Cluster, ClusterHasCapability } from \"./cluster.js\";\nimport { defineCluster } from \"./cluster.js\";\nimport type {\n AirdropAttemptRequest,\n AirdropResponse,\n AirdropSucceeded,\n EventQuery,\n EventPage,\n NetworkInfo,\n TransactionReceipt,\n} from \"./types/rpc.js\";\nimport type { TransportRequestOptions } from \"./transport/types.js\";\nimport {\n requestAirdrop,\n requestAirdropAttempt,\n type RequestAirdropOptions,\n} from \"./actions/public/requestAirdrop.js\";\nimport {\n waitForTransactionReceipt,\n waitForCommitment,\n type KnownCommitment,\n type WaitForTransactionReceiptOptions,\n} from \"./actions/public/waitForTransactionReceipt.js\";\nimport {\n readViews,\n type ReadViewsRequest,\n type ReadViewsResponse,\n} from \"./actions/public/readViews.js\";\nimport type { ContractViewRequest } from \"./contract/method.js\";\nimport {\n getContractEvents,\n type ContractEventQuery,\n type ContractEventPage,\n} from \"./actions/public/getContractEvents.js\";\nimport {\n iterateTransactionsByRootAddress,\n iterateTransactionsByBlock,\n type RootAddressWalkQuery,\n type BlockTransactionWalkQuery,\n} from \"./actions/public/iterateTransactionPages.js\";\nimport type { HistoryCompletion } from \"./actions/public/historyWalk.js\";\nimport type { TransactionRefPage } from \"./types/rpc.js\";\nimport {\n iterateEventPages,\n type EventWalkQuery,\n} from \"./actions/public/iterateEventPages.js\";\n\n/** Native RPC methods plus workflows that never sign, replace or repeat writes. */\nexport interface CoreThruputClient extends RpcClient {\n iterateTransactionsByRootAddress(\n query: RootAddressWalkQuery,\n options?: TransportRequestOptions,\n ): AsyncGenerator<TransactionRefPage, HistoryCompletion, unknown>;\n iterateTransactionsByBlock(\n query: BlockTransactionWalkQuery,\n options?: TransportRequestOptions,\n ): AsyncGenerator<TransactionRefPage, void, unknown>;\n waitForTransactionReceipt(\n transactionHash: Uint8Array,\n options?: WaitForTransactionReceiptOptions,\n ): Promise<TransactionReceipt>;\n waitForCommitment(\n transactionHash: Uint8Array,\n options?: WaitForTransactionReceiptOptions,\n ): Promise<KnownCommitment>;\n readViews<const TCalls extends readonly ContractViewRequest[]>(\n request: ReadViewsRequest<TCalls>,\n options?: TransportRequestOptions,\n ): Promise<ReadViewsResponse<TCalls>>;\n getContractEvents<TName extends string, TTopics, TFields, TFilter>(\n query: ContractEventQuery<TName, TTopics, TFields, TFilter>,\n options?: TransportRequestOptions,\n ): Promise<ContractEventPage<TName, TTopics, TFields>>;\n iterateEventPages(\n query: EventWalkQuery,\n options?: TransportRequestOptions,\n ): AsyncGenerator<EventPage, HistoryCompletion, unknown>;\n}\n\n/** Optional one-call faucet workflow, gated by endpoint discovery. */\nexport interface AirdropActions {\n requestAirdrop(options: RequestAirdropOptions): Promise<AirdropSucceeded>;\n requestAirdropAttempt(\n request: AirdropAttemptRequest,\n options?: TransportRequestOptions,\n ): Promise<AirdropResponse>;\n}\nexport interface ThruputClient extends CoreThruputClient, AirdropActions {}\nexport type ConnectedThruputClient<TCluster extends Cluster = Cluster> =\n CoreThruputClient & {\n readonly cluster: TCluster & { readonly genesisHash?: never };\n readonly network: NetworkInfo;\n } & (ClusterHasCapability<TCluster, \"airdrop\"> extends true\n ? AirdropActions\n : {});\n\nexport interface ThruputClientOptions {\n readonly transport: Transport;\n readonly cluster?: never;\n readonly requiredMethods?: readonly RpcMethod[];\n readonly signal?: AbortSignal;\n}\nexport interface ClusterThruputClientOptions<\n TCluster extends Cluster = Cluster,\n> {\n readonly cluster: TCluster & { readonly genesisHash?: never };\n readonly transport?: Transport;\n readonly requiredMethods?: readonly RpcMethod[];\n readonly signal?: AbortSignal;\n}\n\n/** Connect once, validate wire/network/capabilities, and bind native methods and workflows. */\nexport function createThruputClient<const TCluster extends Cluster>(\n options: ClusterThruputClientOptions<TCluster>,\n): Promise<ConnectedThruputClient<TCluster>>;\nexport function createThruputClient(\n options: ThruputClientOptions,\n): Promise<ThruputClient>;\nexport async function createThruputClient(\n options: ThruputClientOptions | ClusterThruputClientOptions,\n): Promise<ThruputClient | ConnectedThruputClient> {\n const cluster =\n options.cluster === undefined ? undefined : defineCluster(options.cluster);\n const transport =\n options.transport ??\n (cluster?.rpcUrl ? new HttpTransport(cluster.rpcUrl) : undefined);\n if (!transport)\n throw new Error(\n \"Cluster has no default RPC URL; provide a transport or rpcUrl\",\n );\n const requiredMethods = [...(options.requiredMethods ?? [])];\n if (cluster?.capabilities.includes(\"airdrop\"))\n requiredMethods.push(\"faucet_requestAirdrop\");\n const rpc = await createRpcClient({\n transport,\n expectedNetworkHash: cluster?.networkHash,\n requiredMethods,\n signal: options.signal,\n });\n const client = Object.assign(rpc, {\n waitForTransactionReceipt: (\n hash: Uint8Array,\n wait?: WaitForTransactionReceiptOptions,\n ) => waitForTransactionReceipt(rpc, hash, wait),\n waitForCommitment: (\n hash: Uint8Array,\n wait?: WaitForTransactionReceiptOptions,\n ) => waitForCommitment(rpc, hash, wait),\n readViews: <const T extends readonly ContractViewRequest[]>(\n request: ReadViewsRequest<T>,\n control?: TransportRequestOptions,\n ) => readViews(rpc, request, control),\n getContractEvents: <N extends string, T, F, Q>(\n query: ContractEventQuery<N, T, F, Q>,\n control?: TransportRequestOptions,\n ) => getContractEvents(rpc, query, control),\n iterateTransactionsByRootAddress: (\n query: RootAddressWalkQuery,\n options?: TransportRequestOptions,\n ) => iterateTransactionsByRootAddress(rpc, query, options),\n iterateTransactionsByBlock: (\n query: BlockTransactionWalkQuery,\n options?: TransportRequestOptions,\n ) => iterateTransactionsByBlock(rpc, query, options),\n iterateEventPages: (\n query: EventWalkQuery,\n control?: TransportRequestOptions,\n ) => iterateEventPages(rpc, query, control),\n });\n if (!cluster || cluster.capabilities.includes(\"airdrop\"))\n Object.assign(client, {\n requestAirdrop: (request: RequestAirdropOptions) =>\n requestAirdrop(rpc, request),\n requestAirdropAttempt: (\n request: AirdropAttemptRequest,\n control?: TransportRequestOptions,\n ) => requestAirdropAttempt(rpc, request, control),\n });\n return (\n cluster\n ? Object.assign(client, { cluster, network: rpc.discovery.network })\n : client\n ) as ThruputClient | ConnectedThruputClient;\n}\n","import { ThruputError } from \"./errors/thruputError.js\";\n\nfunction amountInvalid(\n kind: \"malformed\" | \"precision\",\n decimals: number,\n): ThruputError<\"amountInvalid\"> {\n return new ThruputError(\n \"amountInvalid\",\n kind === \"malformed\"\n ? \"Use a plain decimal amount\"\n : `Use at most ${decimals} decimal places`,\n { context: { kind, decimals } },\n );\n}\n\n/**\n * Convert a plain decimal string to raw units without rounding.\n *\n * Accepts a leading minus sign. Rejects whitespace, exponent notation, and\n * excess fractional digits, including zeroes. Decimals must be 0–255.\n * Token positivity and ABI bounds are separate validation steps. Invalid text\n * throws code `amountInvalid`, with `context.kind` `malformed` or `precision`.\n *\n * @example `parseUnits(\"12.05\", 2)` returns `1205n`.\n */\nexport function parseUnits(text: string, decimals: number): bigint {\n assertDecimals(decimals);\n if (\n typeof text !== \"string\" ||\n text.trim() !== text ||\n !/^-?[0-9]+(?:\\.[0-9]+)?$/.test(text)\n ) {\n throw amountInvalid(\"malformed\", decimals);\n }\n const negative = text.startsWith(\"-\");\n const [whole, fraction = \"\"] = (negative ? text.slice(1) : text).split(\".\");\n if (fraction.length > decimals) throw amountInvalid(\"precision\", decimals);\n const units = BigInt(whole! + fraction.padEnd(decimals, \"0\"));\n return negative ? -units : units;\n}\n\n/**\n * Format raw units exactly, omitting redundant fractional zeroes.\n *\n * Decimals must be 0–255. Uses no floating-point conversion or display rounding.\n * @example `formatUnits(-1205n, 2)` returns `\"-12.05\"`.\n */\nexport function formatUnits(value: bigint, decimals: number): string {\n assertDecimals(decimals);\n if (typeof value !== \"bigint\") throw new TypeError(\"value must be a bigint\");\n if (decimals === 0) return value.toString();\n const negative = value < 0n;\n const digits = (negative ? -value : value)\n .toString()\n .padStart(decimals + 1, \"0\");\n const whole = digits.slice(0, -decimals);\n const fraction = digits.slice(-decimals).replace(/0+$/, \"\");\n return `${negative ? \"-\" : \"\"}${whole}${fraction ? `.${fraction}` : \"\"}`;\n}\n\nfunction assertDecimals(decimals: number): void {\n if (!Number.isInteger(decimals) || decimals < 0 || decimals > 255) {\n throw new RangeError(\"decimals must be an integer between 0 and 255\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAa,oBAAoB;;AAGjC,MAAa,iBAAiB;;AAG9B,MAAa,mBAAmB;;AAmDhC,SAAgB,cACd,SACU;CACV,IAAI,QAAQ,WAAW,KAAA,GAAW,eAAe,QAAQ,MAAM;CAC/D,OAAO,OAAO,OAAO;EACnB,GAAG;EACH,GAAI,QAAQ,gBAAgB,KAAA,IACxB,CAAC,IACD,EACE,cAAA,GAAA,uBAAA,YAAA,EAAA,GAAA,uBAAA,WAAA,CACa,IAAI,WAAW,QAAQ,WAAW,CAAC,CAChD,EACF;EACJ,cAAc,OAAO,OAAO,CAC1B,GAAG,QAAQ,YACb,CAAC;CACH,CAAC;AACH;;AAGA,SAAgB,QACd,UAAoC,CAAC,GACgB;CACrD,OAAO,cAAc;EACnB,MAAM;EACN,cAAc,CAAC;EACf,GAAG,mBAAmB,OAAO;EAC7B,GAAG,gBAAgB,OAAO;CAC5B,CAAC;AACH;;AAGA,SAAgB,UACd,UAAoC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WAAW,IAAI,aAAa;AACtE;AAEA,SAAS,eAAe,UAAwB;CAC9C,IAAI,CAAC,OAAO,UAAU,QAAQ,KAAK,WAAW,KAAK,WAAW,KAC5D,MAAM,IAAI,WAAW,+CAA+C;AAExE"}
package/dist/index.d.cts CHANGED
@@ -1,16 +1,15 @@
1
- import { $ as RpcInvocationResult, A as RpcConflictCode, At as RpcRequestValidationError, B as RpcEffectiveContractResult, C as RpcBlockDriverMode, Ct as RpcTransactionReceipt, D as RpcChainConfig, Dt as RpcTxHash, E as RpcBlockStart, Et as RpcTransactionStatus, F as RpcContractRejectCode, G as RpcExecutionConfig, H as RpcErrorData, I as RpcDecimalTimePoint, J as RpcHistoryStart, K as RpcFailureCause, L as RpcDecimalU64, M as RpcContractArtifactResult, Mt as RpcParams, N as RpcContractDeployment, Nt as Transport, O as RpcChainTip, Ot as RpcVersionInfo, P as RpcContractDeploymentResult, Pt as TransportRequestOptions, Q as RpcInvocationOutput, R as RpcDescendingAnchor, S as RpcBlockClock, St as RpcTransactionInputResult, T as RpcBlockInfo, Tt as RpcTransactionRefPage, U as RpcEventFilter, V as RpcEmittedEvent, W as RpcEventPage, X as RpcInvocation, Y as RpcIdentifiedEvent, Z as RpcInvocationContext, _ as RpcBase58_ContractAddress, _t as RpcSimulationResults, a as RpcMethod, at as RpcPublicKey, b as RpcBase58_SHA256Hash, bt as RpcStorageResult, c as RpcActiveBlockDriverMode, ct as RpcRegisteredAuthResult, d as RpcAirdropExecution, dt as RpcSchedulerError, et as RpcIterationOrder, f as RpcAscendingAnchor, ft as RpcSchedulerErrorSource, g as RpcBalanceResult, gt as RpcSimulationResult, h as RpcAuthSigner, ht as RpcSimulationBatchLimits, i as RpcDiscovery, it as RpcProducedBlocks, j as RpcConflictDiagnostic, jt as UnsupportedRpcValue, k as RpcConfigLimits, kt as RpcDecodingError, l as RpcAdmission, lt as RpcRequests, m as RpcAuthConfiguration, mt as RpcServerLimits, n as RpcClientOptions, nt as RpcPendingTransactionCount, o as RpcMethods, ot as RpcReceiptExecution, p as RpcAssumedAuth, pt as RpcSendTransactionResult, q as RpcFundingSubmission, r as RpcCompatibilityError, rt as RpcProducedBlock, s as createRpcClient, st as RpcRecentAttemptFailure, t as RpcClient, tt as RpcNetworkInfo, u as RpcAirdropAttempt, ut as RpcResults, v as RpcBase58_Ed25519PublicKey, vt as RpcStorageCosts, w as RpcBlockDriverStatus, wt as RpcTransactionRef, x as RpcBase58_ValidatorID, xt as RpcTopicFilter, y as RpcBase58_PublicKeyHash, yt as RpcStorageItem, z as RpcEffectiveContract } from "./client-DocSdzOL.cjs";
2
- import { $ as HistoryCompletion, $t as WaitForTransactionReceiptOptions, A as ThruputClient, An as RecentAttemptFailure, At as ContractSpecInterface, B as DEVNET_RPC_URL, Bn as TransactionReceipt, Bt as ContractUnionCaseType, C as MethodArgs, Cn as FundAccountRequest, Ct as ContractEnumDef, D as ClusterThruputClientOptions, Dn as IterationOrder, Dt as ContractMethodEffect, E as AirdropActions, En as IdentifiedEvent, Et as ContractField, F as iterateTransactionsByBlock, Fn as SimulationBatchLimits, Ft as ContractTypeDef, G as assertNetworkMatchesCluster, Gn as ViewBatchRequest, Gt as FundingObservationError, H as LOCALNET_RPC_URL, Hn as TransactionRefPage, Ht as ContractVectorType, I as iterateTransactionsByRootAddress, In as StorageCosts, It as ContractTypeDefKind, J as futurenet, Jn as ViewOutput, Jt as requestAirdropAttempt, K as defineCluster, Kn as ViewBatchResponse, Kt as RequestAirdropOptions, L as Cluster, Ln as StorageItemInfo, Lt as ContractTypeKind, M as createThruputClient, Mn as RootAddressTransactionQuery, Mt as ContractSpecString, N as BlockTransactionWalkQuery, Nn as SchedulerTransactionError, Nt as ContractStructDef, O as ConnectedThruputClient, On as NetworkConfigParams, Ot as ContractSpec, P as RootAddressWalkQuery, Pn as ServerLimits, Pt as ContractType, Q as iterateEventPages, Qt as TransactionReceiptTimeoutError, R as ClusterCapability, Rn as StorageItemRead, Rt as ContractUnionCase, S as ContractViewRequestOptions, Sn as ExecutionConfig, St as ContractArrayType, T as defineContractMethod, Tn as HistoryStart, Tt as ContractExceptionType, U as NetworkMismatchError, Un as TransactionStatus, Ut as formatSpecId, V as FUTURENET_RPC_URL, Vn as TransactionRef, Vt as ContractUnionDef, W as PredefinedClusterOptions, Wn as VersionInfo, Wt as specIdKey, X as mainnet, Xn as ViewResponse, Xt as ReceiptObserver, Y as localnet, Yn as ViewRequest, Yt as KnownCommitment, Z as EventWalkQuery, Zt as TransactionReceiptObservationError, _ as ContractViewError, _n as ContractRejectCode, _t as defineContractEvent, a as ContractCall, an as AirdropPending, at as ContractEvent, b as ContractViewOutcome, bn as EventPage, bt as ContractCodecContext, c as ContractExceptionMetadata, cn as AuthPublicKey, ct as ContractEventFilterInput, d as ContractMethodInputs, dn as BlockInfo, dt as ContractEventTopicMetadata, en as waitForCommitment, et as HistoryWalkError, f as ContractReceipt, fn as BlockTransactionQuery, ft as ContractReceiptEvent, g as ContractView, gn as ConflictDiagnostic, gt as createContractEventDecoder, h as ContractReceiptOutcome, hn as ConflictCode, ht as bytesEqual, i as ContractArgumentMetadata, in as AirdropExecutionStatus, it as getContractEvents, j as ThruputClientOptions, jn as RegisteredAuthResult, jt as ContractSpecMethod, k as CoreThruputClient, kn as NetworkInfo, kt as ContractSpecId, l as ContractMethod, ln as AuthSigner, lt as ContractEventFilterValue, m as ContractReceiptFailure, mn as ChainTip, mt as SpecDecodedEvent, n as ReadViewsResponse, nn as AddressAuthDataInfo, nt as ContractEventQuery, o as ContractCallOptions, on as AirdropResponse, ot as ContractEventDefinition, p as ContractReceiptError, pn as ChainConfig, pt as DecodedContractEvent, q as devnet, qn as ViewCall, qt as requestAirdrop, r as readViews, rn as AirdropAttemptRequest, rt as IdentifiedContractEvent, s as ContractException, sn as AirdropSucceeded, st as ContractEventFieldMetadata, t as ReadViewsRequest, tn as waitForTransactionReceipt, tt as ContractEventPage, u as ContractMethodDefinition, un as BalanceResponse, ut as ContractEventReceiptOptions, v as ContractViewFailure, vn as EmittedEvent, vt as topicRepresentation, w as UnknownContractException, wn as FundAccountResponse, wt as ContractEnumVariant, x as ContractViewRequest, xn as EventQuery, xt as createContractCodecContext, y as ContractViewOptions, yn as EventFilter, yt as ContractCodec, z as ClusterHasCapability, zn as TransactionFailureCause, zt as ContractUnionCaseKind } from "./readViews-CQOY5v4o.cjs";
3
- import { n as readContractArtifactSpec, t as ContractArtifactSpec } from "./artifact-BM_MVzhL.cjs";
4
- import { a as WalletRequests, c as getEffectiveContractSpec, i as readTransactionInput, l as ContractSpecResult, n as sendTransaction, o as decodeDefaultWalletRequests, r as VerifiedTransactionInput, s as EffectiveContractSpecResult, t as sendInvocation, u as getContractSpec } from "./index-CuzB95QT.cjs";
1
+ import { $ as AirdropActions, $n as NetworkConfigParams, $r as RpcDescendingAnchor, $t as ContractUnionDef, A as WalletErrorContext, Ai as RpcSimulationBatchLimits, An as AirdropPending, Ar as RpcBalanceResult, At as topicRepresentation, B as ContractMethodInputs, Bi as RpcTransactionRefPage, Bn as ConflictCode, Br as RpcBlockStart, Bt as ContractSpec, C as NativeRpcErrorContext, Ci as RpcRegisteredAuthResult, Cn as ReceiptObserver, Cr as RpcAdmission, Ct as ContractEventTopicMetadata, D as ThruputErrorContext, Di as RpcSchedulerErrorSource, Dn as AddressAuthDataInfo, Dr as RpcAssumedAuth, Dt as bytesEqual, E as ThruputErrorCode, Ei as RpcSchedulerError, En as waitForTransactionReceipt, Er as RpcAscendingAnchor, Et as SpecDecodedEvent, F as ContractException, Fi as RpcStorageResult, Fn as BalanceResponse, Fr as RpcBase58_ValidatorID, Ft as ContractEnumDef, G as ContractViewFailure, Gi as isUnsupportedRpcValue, Gn as EventPage, Gr as RpcConflictCode, Gt as ContractStructDef, H as ContractReceiptFailure, Hi as RpcTxHash, Hn as ContractRejectCode, Hr as RpcChainConfig, Ht as ContractSpecInterface, I as ContractExceptionMetadata, Ii as RpcTopicFilter, In as BlockInfo, Ir as RpcBlockClock, It as ContractEnumVariant, J as ContractViewRequest, Jn as FundAccountRequest, Jr as RpcContractDeployment, Jt as ContractTypeDefKind, K as ContractViewOptions, Kn as EventQuery, Kr as RpcConflictDiagnostic, Kt as ContractType, L as ContractFailure, Li as RpcTransactionInputResult, Ln as BlockTransactionQuery, Lr as RpcBlockDriverMode, Lt as ContractExceptionType, M as ContractArgumentMetadata, Mi as RpcSimulationResults, Mn as AirdropSucceeded, Mr as RpcBase58_Ed25519PublicKey, Mt as ContractCodecContext, N as ContractCall, Ni as RpcStorageCosts, Nn as AuthPublicKey, Nr as RpcBase58_PublicKeyHash, Nt as createContractCodecContext, O as TransactionErrorCode, Oi as RpcSendTransactionResult, On as AirdropAttemptRequest, Or as RpcAuthConfiguration, Ot as createContractEventDecoder, P as ContractCallOptions, Pi as RpcStorageItem, Pn as AuthSigner, Pr as RpcBase58_SHA256Hash, Pt as ContractArrayType, Q as defineContractMethod, Qn as IterationOrder, Qr as RpcDecimalU64, Qt as ContractUnionCaseType, R as ContractMethod, Ri as RpcTransactionReceipt, Rn as ChainConfig, Rr as RpcBlockDriverStatus, Rt as ContractField, S as FundingStoppedContext, Si as RpcRecentAttemptFailure, Sn as KnownCommitment, Sr as RpcActiveBlockDriverMode, St as ContractEventReceiptOptions, T as RpcIncompatibleKind, Ti as RpcResults, Tn as waitForCommitment, Tr as RpcAirdropExecution, Tt as DecodedContractEvent, U as ContractReceiptOutcome, Ui as RpcVersionInfo, Un as EmittedEvent, Ur as RpcChainTip, Ut as ContractSpecMethod, V as ContractReceipt, Vi as RpcTransactionStatus, Vn as ConflictDiagnostic, Vr as RpcBlockTimeStep, Vt as ContractSpecId, W as ContractView, Wi as UnsupportedRpcValue, Wn as EventFilter, Wr as RpcConfigLimits, Wt as ContractSpecString, X as MethodArgs, Xn as HistoryStart, Xr as RpcContractRejectCode, Xt as ContractUnionCase, Y as ContractViewRequestOptions, Yn as FundAccountResponse, Yr as RpcContractDeploymentResult, Yt as ContractTypeKind, Z as UnknownContractException, Zn as IdentifiedEvent, Zr as RpcDecimalTimePoint, Zt as ContractUnionCaseKind, _ as TransactionReason, _i as RpcPendingTransactionCount, _n as defineCluster, _r as ViewBatchResponse, _t as ContractEvent, a as RpcClientOptions, ai as RpcEventPage, an as readViews, ar as ServerLimits, at as createThruputClient, b as SubmissionEvidence, bi as RpcPublicKey, bn as localnet, br as ViewRequest, bt as ContractEventFilterInput, c as RpcMethods, ci as RpcFundingSubmission, cn as TransportRequestOptions, cr as StorageItemInfo, ct as BlockTransactionWalkQuery, d as ThruputErrorOf, di as RpcInvocation, dn as ClusterHasCapability, dr as TransactionReceipt, dt as iterateTransactionsByRootAddress, ei as RpcEffectiveContract, en as ContractVectorType, er as NetworkInfo, et as ClusterThruputClientOptions, f as ThruputErrorOptions, fi as RpcInvocationContext, fn as DEVNET_RPC_URL, fr as TransactionRef, ft as HistoryCompletion, g as TransactionOutcome, gi as RpcNetworkInfo, gn as assertNetworkMatchesCluster, gr as ViewBatchRequest, gt as getContractEvents, h as TransactionFactsInput, hi as RpcIterationOrder, hn as PredefinedClusterOptions, hr as VersionInfo, ht as IdentifiedContractEvent, i as RpcClient, ii as RpcEventFilter, in as ReadViewsResponse, ir as SchedulerTransactionError, it as ThruputClientOptions, j as transactionErrorCodes, ji as RpcSimulationResult, jn as AirdropResponse, jr as RpcBase58_ContractAddress, jt as ContractCodec, k as TransactionOutcomeUnknownContext, ki as RpcServerLimits, kn as AirdropExecutionStatus, kr as RpcAuthSigner, kt as defineContractEvent, l as createRpcClient, li as RpcHistoryStart, ln as Cluster, lr as StorageItemRead, lt as RootAddressWalkQuery, m as TransactionFacts, mi as RpcInvocationResult, mn as LOCALNET_RPC_URL, mr as TransactionStatus, mt as ContractEventQuery, n as requestAirdrop, ni as RpcEmittedEvent, nn as specIdKey, nr as RegisteredAuthResult, nt as CoreThruputClient, o as RpcDiscovery, oi as RpcExecutionConfig, on as RpcParams, or as SimulationBatchLimits, ot as EventWalkQuery, p as isThruputError, pi as RpcInvocationOutput, pn as FUTURENET_RPC_URL, pr as TransactionRefPage, pt as ContractEventPage, q as ContractViewOutcome, qn as ExecutionConfig, qr as RpcContractArtifactResult, qt as ContractTypeDef, r as requestAirdropAttempt, ri as RpcErrorData, rn as ReadViewsRequest, rr as RootAddressTransactionQuery, rt as ThruputClient, s as RpcMethod, si as RpcFailureCause, sn as Transport, sr as StorageCosts, st as iterateEventPages, t as RequestAirdropOptions, ti as RpcEffectiveContractResult, tn as formatSpecId, tr as RecentAttemptFailure, tt as ConnectedThruputClient, u as ThruputError, ui as RpcIdentifiedEvent, un as ClusterCapability, ur as TransactionFailureCause, ut as iterateTransactionsByBlock, v as transactionOutcomes, vi as RpcProducedBlock, vn as devnet, vr as ViewCall, vt as ContractEventDefinition, w as RpcErrorFields, wi as RpcRequests, wn as WaitForTransactionReceiptOptions, wr as RpcAirdropAttempt, wt as ContractReceiptEvent, x as createSubmissionEvidence, xi as RpcReceiptExecution, xn as mainnet, xr as ViewResponse, xt as ContractEventFilterValue, y as transactionReasons, yi as RpcProducedBlocks, yn as futurenet, yr as ViewOutput, yt as ContractEventFieldMetadata, z as ContractMethodDefinition, zi as RpcTransactionRef, zn as ChainTip, zr as RpcBlockInfo, zt as ContractMethodEffect } from "./requestAirdrop-T1eVn3l5.cjs";
2
+ import { n as readContractArtifactSpec, t as ContractArtifactSpec } from "./artifact-RIAPVmVX.cjs";
3
+ import { a as WalletRequests, c as getEffectiveContractSpec, i as readTransactionInput, l as ContractSpecResult, n as sendTransaction, o as decodeDefaultWalletRequests, r as VerifiedTransactionInput, s as EffectiveContractSpecResult, t as sendInvocation, u as getContractSpec } from "./index-BhOeIyrZ.cjs";
5
4
  import { t as Signer } from "./types-BE40oD_Q.cjs";
6
5
  import { n as signTransaction, t as SignerEntry } from "./sign-eUT0iGQG.cjs";
7
- import { A as prepareTransaction, C as devWalletAdapter, D as prepareContractDeployment, E as decodeDeployment, F as WalletAccount, I as createPubkeyAccount, L as createSourceAddressAccount, M as CreateSourceAddressAccountOptions, N as PubkeyAccount, O as rv32Contract, P as SourceAddressAccount, S as defineWalletInvocationAdapter, T as DeploymentOptions, _ as WalletBatchExecutionRequest, a as SubmissionEvidence, b as createDefaultWalletBatchInvocation, c as UnsupportedTransactionAdmissionError, d as assertTransactionSuccess, f as createSubmissionEvidence, g as walletGasLimit, h as waitForExecution, i as ExecutionReturnUnavailableError, j as CreatePubkeyAccountOptions, k as PrepareTransactionRequest, l as UnsupportedTransactionOutcomeError, m as submitAndObserve, n as ExecutionDecodeError, o as TransactionExecutionError, p as decodeExecution, r as ExecutionResult, s as TransactionObservationError, t as CallResults, u as assertTransactionAdmission, v as WalletExecutionRequest, w as ContractDeployment, x as defaultWalletAdapter, y as WalletInvocationAdapter } from "./execution-C8oQgpO3.cjs";
8
- import { _ as SpecDecodedCall, a as BoundContractMethod, b as encodeCalldata, c as SignedToken, d as ContractDecodeError, f as ContractVerificationError, g as SpecDeclaredException, h as buildNamedCodecs, i as fixedBytes, l as isSignedToken, m as hashContract, n as FixedBytes, o as ContractInstance, p as deriveContractAddress, r as fixedArray, s as getContract, t as FixedArray, u as signedToken, v as createContractCallDecoder, x as resolveCodec, y as decodeCalldata } from "./index-BmQN3jAS.cjs";
9
- import { n as spec, r as thruput_signed_op_if, t as SignedOp } from "./signed_op-BrLxDrDb.cjs";
6
+ import { C as CreatePubkeyAccountOptions, D as WalletAccount, E as SourceAddressAccount, O as createPubkeyAccount, S as prepareTransaction, T as PubkeyAccount, _ as DeploymentOptions, a as decodeExecution, b as rv32Contract, c as walletGasLimit, d as WalletInvocationAdapter, f as createDefaultWalletBatchInvocation, g as ContractDeployment, h as devWalletAdapter, i as assertTransactionSuccess, k as createSourceAddressAccount, l as WalletBatchExecutionRequest, m as defineWalletInvocationAdapter, n as ExecutionResult, o as submitAndObserve, p as defaultWalletAdapter, r as assertTransactionAdmission, s as waitForExecution, t as CallResults, u as WalletExecutionRequest, v as decodeDeployment, w as CreateSourceAddressAccountOptions, x as PrepareTransactionRequest, y as prepareContractDeployment } from "./execution-pSt6k620.cjs";
7
+ import { _ as decodeCalldata, a as BoundContractMethod, c as SignedToken, d as deriveContractAddress, f as hashContract, g as createContractCallDecoder, h as SpecDecodedCall, i as fixedBytes, l as isSignedToken, m as SpecDeclaredException, n as FixedBytes, o as ContractInstance, p as buildNamedCodecs, r as fixedArray, s as getContract, t as FixedArray, u as signedToken, v as encodeCalldata, y as resolveCodec } from "./index-BfYEEVHm.cjs";
8
+ import { n as spec, r as thruput_signed_op_if, t as SignedOp } from "./signed_op-DoHFpSH4.cjs";
10
9
  import { a as serializeSignedTransaction, c as createTransaction, i as deserializeTransaction, n as transactionSignaturePreimage, o as serializeTransaction, r as deserializeSignedTransaction, s as createInvocation, t as pubkeySignatureEnvelopeBytes } from "./index-DzrLv3EA.cjs";
11
- import { a as WalletClient, c as WalletRequestAirdropOptions, d as ExecuteCallsRequest, f as PendingWalletTransaction, g as createProviderWalletClient, h as ProviderWalletClient, i as WalletAirdropActions, l as createWalletClient, m as ProviderExecutionOptions, n as PrepareExecutionRequest, o as WalletExecutionActions, p as PrepareBatchExecutionRequest, r as WalletActions, s as WalletNetworkOptions, t as ExecutableWalletClient, u as CreateProviderWalletClientOptions } from "./index-rrP1HJ2Z.cjs";
12
- import { a as Operation, c as SignedOperationType, i as DefineSignedOperationOptions, l as defineSignedOperation, n as signedOperationPreimage, o as SignedOperation, r as ContractTypeSelector, s as SignedOperationRequest, t as SignedOperationPreimage, u as randomNonce } from "./index-B5KqSHeL.cjs";
13
- import { a as TxInvalidDetail, c as classifyReadError, d as HttpRequestError, f as HttpResponseError, h as JsonRpcError, i as NativeRpcErrorCode, l as MockTransport, m as HttpTransportOptions, n as DecodedRpcError, o as txInvalidDetail, p as HttpTransport, r as NativeRpcError, s as ReadErrorKind, t as RpcResponseError, u as HttpBatchOptions } from "./index-C3qDR1J5.cjs";
10
+ import { a as WalletClient, c as WalletRequestAirdropOptions, d as ExecuteCallsRequest, f as PendingWalletTransaction, g as createProviderWalletClient, h as ProviderWalletClient, i as WalletAirdropActions, l as createWalletClient, m as ProviderExecutionOptions, n as PrepareExecutionRequest, o as WalletExecutionActions, p as PrepareBatchExecutionRequest, r as WalletActions, s as WalletNetworkOptions, t as ExecutableWalletClient, u as CreateProviderWalletClientOptions } from "./index-DBKsOzCN.cjs";
11
+ import { a as Operation, c as SignedOperationType, i as DefineSignedOperationOptions, l as defineSignedOperation, n as signedOperationPreimage, o as SignedOperation, r as ContractTypeSelector, s as SignedOperationRequest, t as SignedOperationPreimage, u as randomNonce } from "./index-BsvYcU_Y.cjs";
12
+ import { a as classifyReadError, c as HttpTransport, i as ReadErrorKind, l as HttpTransportOptions, n as TxInvalidDetail, o as MockTransport, r as txInvalidDetail, s as HttpBatchOptions, t as NativeRpcErrorCode } from "./index-BGmH_Sm7.cjs";
14
13
  import { n as verifyMlDsa65, r as Ed25519Signer, t as MlDsa65Signer } from "./index-ByNNqY7S.cjs";
15
14
  import { BlockHeight, Calldata, ContractAddress, ContractAddress as ContractAddress$1, ContractEntrypointID, ContractEntrypointID as ContractEntrypointID$1, ExecResult, GasAmount, Invocation, InvokeFlag, InvokeFlagSet, NetworkHash, PubkeyAccountPreimage, PublicKey, PublicKeyHash, SHA256Hash, SHA256Hash as SHA256Hash$1, SignedTransaction, SignedTransaction as SignedTransaction$1, TimePoint, Transaction, blockHeight, calldata, contractAddress, contractEntrypointID, gasAmount, invokeFlagSet, networkHash, sha256Hash, timePoint } from "@thruputchain/protocol";
16
15
  import { fromBase58, maxBase58Length, toBase58 } from "@thruputchain/protocol/utils";
@@ -120,17 +119,13 @@ declare function majorVersionFromSemver(versionStr: string): string;
120
119
  declare function deriveEntrypointID(interfaceName: string | null, versionStr: string, methodName: string): ContractEntrypointID$1;
121
120
  //#endregion
122
121
  //#region src/units.d.ts
123
- /** Invalid decimal input to {@link parseUnits}. */
124
- declare class ParseUnitsError extends Error {
125
- readonly code: "malformed" | "precision";
126
- constructor(code: "malformed" | "precision", decimals: number);
127
- }
128
122
  /**
129
123
  * Convert a plain decimal string to raw units without rounding.
130
124
  *
131
125
  * Accepts a leading minus sign. Rejects whitespace, exponent notation, and
132
126
  * excess fractional digits, including zeroes. Decimals must be 0–255.
133
- * Token positivity and ABI bounds are separate validation steps.
127
+ * Token positivity and ABI bounds are separate validation steps. Invalid text
128
+ * throws code `amountInvalid`, with `context.kind` `malformed` or `precision`.
134
129
  *
135
130
  * @example `parseUnits("12.05", 2)` returns `1205n`.
136
131
  */
@@ -170,5 +165,5 @@ declare function publicKeyToStrkey(bytes: Uint8Array): string;
170
165
  /** Explicitly export a seed as an S StrKey. Treat the returned string as secret. */
171
166
  declare function secretSeedToStrkey(bytes: Uint8Array): string;
172
167
  //#endregion
173
- export { type AddressAuthDataInfo, type AirdropActions, type AirdropAttemptRequest, type AirdropExecutionStatus, type AirdropPending, type AirdropResponse, type AirdropSucceeded, type AuthPublicKey, type AuthSigner, type BalanceResponse, type BlockHeight, type BlockInfo, type BlockTransactionQuery, type BlockTransactionWalkQuery, type BoundContractMethod, CallResults, type Calldata, type ChainConfig, type ChainTip, type Cluster, type ClusterCapability, type ClusterHasCapability, type ClusterThruputClientOptions, type ConflictCode, type ConflictDiagnostic, type ConnectedThruputClient, type ContractAddress, type ContractArgumentMetadata, type ContractArrayType, type ContractArtifactSpec, type ContractCall, type ContractCallOptions, type ContractCodec, type ContractCodecContext, ContractDecodeError, type ContractDeployment, type ContractEntrypointID, type ContractEnumDef, type ContractEnumVariant, type ContractEvent, type ContractEventDefinition, type ContractEventFieldMetadata, type ContractEventFilterInput, type ContractEventFilterValue, type ContractEventPage, type ContractEventQuery, type ContractEventReceiptOptions, type ContractEventTopicMetadata, type ContractException, type ContractExceptionMetadata, type ContractExceptionType, type ContractField, type ContractInstance, type ContractMethod, type ContractMethodDefinition, ContractMethodEffect, type ContractMethodInputs, type ContractReceipt, ContractReceiptError, type ContractReceiptEvent, type ContractReceiptFailure, type ContractReceiptOutcome, type ContractRejectCode, type ContractSpec, type ContractSpecId, type ContractSpecInterface, type ContractSpecMethod, type ContractSpecResult, type ContractSpecString, type ContractStructDef, type ContractType, type ContractTypeDef, ContractTypeDefKind, ContractTypeKind, type ContractTypeSelector, type ContractUnionCase, ContractUnionCaseKind, type ContractUnionCaseType, type ContractUnionDef, type ContractVectorType, ContractVerificationError, type ContractView, ContractViewError, type ContractViewFailure, type ContractViewOptions, type ContractViewOutcome, type ContractViewRequest, type ContractViewRequestOptions, type CoreThruputClient, type CreateProviderWalletClientOptions, type CreatePubkeyAccountOptions, type CreateSourceAddressAccountOptions, DEVNET_RPC_URL, type DecodedContractEvent, type DecodedRpcError, type DefineSignedOperationOptions, type DeploymentOptions, Ed25519Signer, type EffectiveContractSpecResult, type EmittedEvent, type EventFilter, type EventPage, type EventQuery, type EventWalkQuery, ExecResult, type ExecutableWalletClient, type ExecuteCallsRequest, type ExecutionConfig, ExecutionDecodeError, ExecutionResult, ExecutionReturnUnavailableError, FUTURENET_RPC_URL, type FixedArray, type FixedBytes, type FundAccountRequest, type FundAccountResponse, FundingObservationError, type GasAmount, type HistoryCompletion, type HistoryStart, HistoryWalkError, type HttpBatchOptions, HttpRequestError, HttpResponseError, HttpTransport, type HttpTransportOptions, type IdentifiedContractEvent, type IdentifiedEvent, type Invocation, InvokeFlag, type InvokeFlagSet, type IterationOrder, JsonRpcError, type KnownCommitment, LOCALNET_RPC_URL, type MethodArgs, MlDsa65Signer, MockTransport, NativeRpcError, NativeRpcErrorCode, type NetworkConfigParams, type NetworkHash, type NetworkInfo, NetworkMismatchError, type Operation, ParseUnitsError, type PendingWalletTransaction, type PredefinedClusterOptions, type PrepareBatchExecutionRequest, type PrepareExecutionRequest, type PrepareTransactionRequest, type ProviderExecutionOptions, type ProviderWalletClient, type PubkeyAccount, type ReadErrorKind, type ReadViewsRequest, type ReadViewsResponse, type ReceiptObserver, type RecentAttemptFailure, type RegisteredAuthResult, type RequestAirdropOptions, type RootAddressTransactionQuery, type RootAddressWalkQuery, type RpcActiveBlockDriverMode, type RpcAdmission, type RpcAirdropAttempt, type RpcAirdropExecution, type RpcAscendingAnchor, type RpcAssumedAuth, type RpcAuthConfiguration, type RpcAuthSigner, type RpcBalanceResult, type RpcBase58_ContractAddress, type RpcBase58_Ed25519PublicKey, type RpcBase58_PublicKeyHash, type RpcBase58_SHA256Hash, type RpcBase58_ValidatorID, type RpcBlockClock, type RpcBlockDriverMode, type RpcBlockDriverStatus, type RpcBlockInfo, type RpcBlockStart, type RpcChainConfig, type RpcChainTip, type RpcClient, type RpcClientOptions, RpcCompatibilityError, type RpcConfigLimits, type RpcConflictCode, type RpcConflictDiagnostic, type RpcContractArtifactResult, type RpcContractDeployment, type RpcContractDeploymentResult, type RpcContractRejectCode, type RpcDecimalTimePoint, type RpcDecimalU64, RpcDecodingError, type RpcDescendingAnchor, type RpcDiscovery, type RpcEffectiveContract, type RpcEffectiveContractResult, type RpcEmittedEvent, type RpcErrorData, type RpcEventFilter, type RpcEventPage, type RpcExecutionConfig, type RpcFailureCause, type RpcFundingSubmission, type RpcHistoryStart, type RpcIdentifiedEvent, type RpcInvocation, type RpcInvocationContext, type RpcInvocationOutput, type RpcInvocationResult, type RpcIterationOrder, type RpcMethod, type RpcMethods, type RpcNetworkInfo, type RpcParams, type RpcPendingTransactionCount, type RpcProducedBlock, type RpcProducedBlocks, type RpcPublicKey, type RpcReceiptExecution, type RpcRecentAttemptFailure, type RpcRegisteredAuthResult, RpcRequestValidationError, type RpcRequests, RpcResponseError, type RpcResults, type RpcSchedulerError, type RpcSchedulerErrorSource, type RpcSendTransactionResult, type RpcServerLimits, type RpcSimulationBatchLimits, type RpcSimulationResult, type RpcSimulationResults, type RpcStorageCosts, type RpcStorageItem, type RpcStorageResult, type RpcTopicFilter, type RpcTransactionInputResult, type RpcTransactionReceipt, type RpcTransactionRef, type RpcTransactionRefPage, type RpcTransactionStatus, type RpcTxHash, type RpcVersionInfo, type SHA256Hash, type SchedulerTransactionError, type ServerLimits, SignedOp, spec as SignedOpSpec, type SignedOperation, type SignedOperationPreimage, type SignedOperationRequest, type SignedOperationType, type SignedToken, type SignedTransaction, type Signer, type SignerEntry, type SimulationBatchLimits, type SourceAddressAccount, type SpecDeclaredException, type SpecDecodedCall, type SpecDecodedEvent, type StorageCosts, type StorageItemInfo, type StorageItemRead, SubmissionEvidence, type ThruputClient, type ThruputClientOptions, type TimePoint, type Transaction, TransactionExecutionError, type TransactionFailureCause, TransactionObservationError, type TransactionReceipt, TransactionReceiptObservationError, TransactionReceiptTimeoutError, type TransactionRef, type TransactionRefPage, type TransactionStatus, type Transport, type TransportRequestOptions, type TxInvalidDetail, type UnknownContractException, UnsupportedRpcValue, UnsupportedTransactionAdmissionError, UnsupportedTransactionOutcomeError, type VerifiedTransactionInput, type VersionInfo, type ViewBatchRequest, type ViewBatchResponse, type ViewCall, type ViewOutput, type ViewRequest, type ViewResponse, type WaitForTransactionReceiptOptions, type WalletAccount, type WalletActions, type WalletAirdropActions, type WalletBatchExecutionRequest, type WalletClient, type WalletExecutionActions, type WalletExecutionRequest, type WalletInvocationAdapter, type WalletNetworkOptions, type WalletRequestAirdropOptions, type WalletRequests, addressFromBase58, addressFromHex, addressToStrkey, assertNetworkMatchesCluster, assertTransactionAdmission, assertTransactionSuccess, blockHeight, buildNamedCodecs, bytesEqual, calldata, classifyReadError, contractAddress, contractEntrypointID, createContractCallDecoder, createContractCodecContext, createContractEventDecoder, createDefaultWalletBatchInvocation, createInvocation, createProviderWalletClient, createPubkeyAccount, createRpcClient, createSourceAddressAccount, createSubmissionEvidence, createThruputClient, createTransaction, createWalletClient, decodeCalldata, decodeDefaultWalletRequests, decodeDeployment, decodeExecution, defaultWalletAdapter, defineCluster, defineContractEvent, defineContractMethod, defineSignedOperation, defineWalletInvocationAdapter, deriveContractAddress, deriveEntrypointID, derivePubkeyAccountAddress, derivePublicKeyHash, deserializeSignedTransaction, deserializeTransaction, devWalletAdapter, devnet, encodeCalldata, fixedArray, fixedBytes, fixedFromBase58, formatSpecId, formatUnits, fromBase58, fromHex0x, futurenet, gasAmount, getContract, getContractEvents, getContractSpec, getEffectiveContractSpec, hashContract, hashFromBase58, hashFromHex, hashSignedTransaction, invokeFlagSet, isSignedToken, iterateEventPages, iterateTransactionsByBlock, iterateTransactionsByRootAddress, localnet, mainnet, majorVersionFromSemver, maxBase58Length, networkHash, parseAddress, parsePublicKey, parseSecretSeed, parseUnits, prepareContractDeployment, prepareTransaction, pubkeyAccountPreimage, pubkeySignatureEnvelopeBytes, publicKeyToStrkey, randomNonce, readContractArtifactSpec, readTransactionInput, readViews, requestAirdrop, requestAirdropAttempt, resolveCodec, rv32Contract, secretSeedToStrkey, sendInvocation, sendTransaction, serializeSignedTransaction, serializeTransaction, sha256Hash, signTransaction, signedOperationPreimage, signedToken, specIdKey, submitAndObserve, thruput_signed_op_if, timePoint, toBase58, toHex0x, topicRepresentation, transactionSignaturePreimage, txInvalidDetail, verifyMlDsa65, waitForCommitment, waitForExecution, waitForTransactionReceipt, walletGasLimit };
168
+ export { type AddressAuthDataInfo, type AirdropActions, type AirdropAttemptRequest, type AirdropExecutionStatus, type AirdropPending, type AirdropResponse, type AirdropSucceeded, type AuthPublicKey, type AuthSigner, type BalanceResponse, type BlockHeight, type BlockInfo, type BlockTransactionQuery, type BlockTransactionWalkQuery, type BoundContractMethod, CallResults, type Calldata, type ChainConfig, type ChainTip, type Cluster, type ClusterCapability, type ClusterHasCapability, type ClusterThruputClientOptions, type ConflictCode, type ConflictDiagnostic, type ConnectedThruputClient, type ContractAddress, type ContractArgumentMetadata, type ContractArrayType, type ContractArtifactSpec, type ContractCall, type ContractCallOptions, type ContractCodec, type ContractCodecContext, type ContractDeployment, type ContractEntrypointID, type ContractEnumDef, type ContractEnumVariant, type ContractEvent, type ContractEventDefinition, type ContractEventFieldMetadata, type ContractEventFilterInput, type ContractEventFilterValue, type ContractEventPage, type ContractEventQuery, type ContractEventReceiptOptions, type ContractEventTopicMetadata, type ContractException, type ContractExceptionMetadata, type ContractExceptionType, type ContractFailure, type ContractField, type ContractInstance, type ContractMethod, type ContractMethodDefinition, ContractMethodEffect, type ContractMethodInputs, type ContractReceipt, type ContractReceiptEvent, type ContractReceiptFailure, type ContractReceiptOutcome, type ContractRejectCode, type ContractSpec, type ContractSpecId, type ContractSpecInterface, type ContractSpecMethod, type ContractSpecResult, type ContractSpecString, type ContractStructDef, type ContractType, type ContractTypeDef, ContractTypeDefKind, ContractTypeKind, type ContractTypeSelector, type ContractUnionCase, ContractUnionCaseKind, type ContractUnionCaseType, type ContractUnionDef, type ContractVectorType, type ContractView, type ContractViewFailure, type ContractViewOptions, type ContractViewOutcome, type ContractViewRequest, type ContractViewRequestOptions, type CoreThruputClient, type CreateProviderWalletClientOptions, type CreatePubkeyAccountOptions, type CreateSourceAddressAccountOptions, DEVNET_RPC_URL, type DecodedContractEvent, type DefineSignedOperationOptions, type DeploymentOptions, Ed25519Signer, type EffectiveContractSpecResult, type EmittedEvent, type EventFilter, type EventPage, type EventQuery, type EventWalkQuery, ExecResult, type ExecutableWalletClient, type ExecuteCallsRequest, type ExecutionConfig, ExecutionResult, FUTURENET_RPC_URL, type FixedArray, type FixedBytes, type FundAccountRequest, type FundAccountResponse, type FundingStoppedContext, type GasAmount, type HistoryCompletion, type HistoryStart, type HttpBatchOptions, HttpTransport, type HttpTransportOptions, type IdentifiedContractEvent, type IdentifiedEvent, type Invocation, InvokeFlag, type InvokeFlagSet, type IterationOrder, type KnownCommitment, LOCALNET_RPC_URL, type MethodArgs, MlDsa65Signer, MockTransport, NativeRpcErrorCode, type NativeRpcErrorContext, type NetworkConfigParams, type NetworkHash, type NetworkInfo, type Operation, type PendingWalletTransaction, type PredefinedClusterOptions, type PrepareBatchExecutionRequest, type PrepareExecutionRequest, type PrepareTransactionRequest, type ProviderExecutionOptions, type ProviderWalletClient, type PubkeyAccount, type ReadErrorKind, type ReadViewsRequest, type ReadViewsResponse, type ReceiptObserver, type RecentAttemptFailure, type RegisteredAuthResult, type RequestAirdropOptions, type RootAddressTransactionQuery, type RootAddressWalkQuery, type RpcActiveBlockDriverMode, type RpcAdmission, type RpcAirdropAttempt, type RpcAirdropExecution, type RpcAscendingAnchor, type RpcAssumedAuth, type RpcAuthConfiguration, type RpcAuthSigner, type RpcBalanceResult, type RpcBase58_ContractAddress, type RpcBase58_Ed25519PublicKey, type RpcBase58_PublicKeyHash, type RpcBase58_SHA256Hash, type RpcBase58_ValidatorID, type RpcBlockClock, type RpcBlockDriverMode, type RpcBlockDriverStatus, type RpcBlockInfo, type RpcBlockStart, type RpcBlockTimeStep, type RpcChainConfig, type RpcChainTip, type RpcClient, type RpcClientOptions, type RpcConfigLimits, type RpcConflictCode, type RpcConflictDiagnostic, type RpcContractArtifactResult, type RpcContractDeployment, type RpcContractDeploymentResult, type RpcContractRejectCode, type RpcDecimalTimePoint, type RpcDecimalU64, type RpcDescendingAnchor, type RpcDiscovery, type RpcEffectiveContract, type RpcEffectiveContractResult, type RpcEmittedEvent, type RpcErrorData, type RpcErrorFields, type RpcEventFilter, type RpcEventPage, type RpcExecutionConfig, type RpcFailureCause, type RpcFundingSubmission, type RpcHistoryStart, type RpcIdentifiedEvent, type RpcIncompatibleKind, type RpcInvocation, type RpcInvocationContext, type RpcInvocationOutput, type RpcInvocationResult, type RpcIterationOrder, type RpcMethod, type RpcMethods, type RpcNetworkInfo, type RpcParams, type RpcPendingTransactionCount, type RpcProducedBlock, type RpcProducedBlocks, type RpcPublicKey, type RpcReceiptExecution, type RpcRecentAttemptFailure, type RpcRegisteredAuthResult, type RpcRequests, type RpcResults, type RpcSchedulerError, type RpcSchedulerErrorSource, type RpcSendTransactionResult, type RpcServerLimits, type RpcSimulationBatchLimits, type RpcSimulationResult, type RpcSimulationResults, type RpcStorageCosts, type RpcStorageItem, type RpcStorageResult, type RpcTopicFilter, type RpcTransactionInputResult, type RpcTransactionReceipt, type RpcTransactionRef, type RpcTransactionRefPage, type RpcTransactionStatus, type RpcTxHash, type RpcVersionInfo, type SHA256Hash, type SchedulerTransactionError, type ServerLimits, SignedOp, spec as SignedOpSpec, type SignedOperation, type SignedOperationPreimage, type SignedOperationRequest, type SignedOperationType, type SignedToken, type SignedTransaction, type Signer, type SignerEntry, type SimulationBatchLimits, type SourceAddressAccount, type SpecDeclaredException, type SpecDecodedCall, type SpecDecodedEvent, type StorageCosts, type StorageItemInfo, type StorageItemRead, type SubmissionEvidence, type ThruputClient, type ThruputClientOptions, ThruputError, type ThruputErrorCode, type ThruputErrorContext, type ThruputErrorOf, type ThruputErrorOptions, type TimePoint, type Transaction, type TransactionErrorCode, type TransactionFacts, type TransactionFactsInput, type TransactionFailureCause, type TransactionOutcome, type TransactionOutcomeUnknownContext, type TransactionReason, type TransactionReceipt, type TransactionRef, type TransactionRefPage, type TransactionStatus, type Transport, type TransportRequestOptions, type TxInvalidDetail, type UnknownContractException, UnsupportedRpcValue, type VerifiedTransactionInput, type VersionInfo, type ViewBatchRequest, type ViewBatchResponse, type ViewCall, type ViewOutput, type ViewRequest, type ViewResponse, type WaitForTransactionReceiptOptions, type WalletAccount, type WalletActions, type WalletAirdropActions, type WalletBatchExecutionRequest, type WalletClient, type WalletErrorContext, type WalletExecutionActions, type WalletExecutionRequest, type WalletInvocationAdapter, type WalletNetworkOptions, type WalletRequestAirdropOptions, type WalletRequests, addressFromBase58, addressFromHex, addressToStrkey, assertNetworkMatchesCluster, assertTransactionAdmission, assertTransactionSuccess, blockHeight, buildNamedCodecs, bytesEqual, calldata, classifyReadError, contractAddress, contractEntrypointID, createContractCallDecoder, createContractCodecContext, createContractEventDecoder, createDefaultWalletBatchInvocation, createInvocation, createProviderWalletClient, createPubkeyAccount, createRpcClient, createSourceAddressAccount, createSubmissionEvidence, createThruputClient, createTransaction, createWalletClient, decodeCalldata, decodeDefaultWalletRequests, decodeDeployment, decodeExecution, defaultWalletAdapter, defineCluster, defineContractEvent, defineContractMethod, defineSignedOperation, defineWalletInvocationAdapter, deriveContractAddress, deriveEntrypointID, derivePubkeyAccountAddress, derivePublicKeyHash, deserializeSignedTransaction, deserializeTransaction, devWalletAdapter, devnet, encodeCalldata, fixedArray, fixedBytes, fixedFromBase58, formatSpecId, formatUnits, fromBase58, fromHex0x, futurenet, gasAmount, getContract, getContractEvents, getContractSpec, getEffectiveContractSpec, hashContract, hashFromBase58, hashFromHex, hashSignedTransaction, invokeFlagSet, isSignedToken, isThruputError, isUnsupportedRpcValue, iterateEventPages, iterateTransactionsByBlock, iterateTransactionsByRootAddress, localnet, mainnet, majorVersionFromSemver, maxBase58Length, networkHash, parseAddress, parsePublicKey, parseSecretSeed, parseUnits, prepareContractDeployment, prepareTransaction, pubkeyAccountPreimage, pubkeySignatureEnvelopeBytes, publicKeyToStrkey, randomNonce, readContractArtifactSpec, readTransactionInput, readViews, requestAirdrop, requestAirdropAttempt, resolveCodec, rv32Contract, secretSeedToStrkey, sendInvocation, sendTransaction, serializeSignedTransaction, serializeTransaction, sha256Hash, signTransaction, signedOperationPreimage, signedToken, specIdKey, submitAndObserve, thruput_signed_op_if, timePoint, toBase58, toHex0x, topicRepresentation, transactionErrorCodes, transactionOutcomes, transactionReasons, transactionSignaturePreimage, txInvalidDetail, verifyMlDsa65, waitForCommitment, waitForExecution, waitForTransactionReceipt, walletGasLimit };
174
169
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/actions/hex.ts","../src/derivation/pubkeyAccount.ts","../src/derivation/publicKeyHash.ts","../src/derivation/transactionHash.ts","../src/derivation/entrypointId.ts","../src/units.ts","../src/encoding.ts"],"mappings":";;;;;;;;;;;;;;;;;;;iBAWgB,OAAA,CAAQ,KAAiB,EAAV,UAAU;;iBAKzB,SAAA,CAAU,GAAA,WAAc,UAAU;;iBAOlC,WAAA,CAAY,GAAA,WAAc,YAAU;;iBAKpC,cAAA,CAAe,GAAA,WAAc,iBAAe;;;;;;;;;;iBCZ5C,qBAAA,CACd,MAAA,EAAQ,SAAA,EACR,KAAA,YACC,qBAAqB;;;;;;;;;;ADRxB;;;;AAAyC;AAKzC;;;;AAAkD;AAOlD;iBCoBgB,0BAAA,CACd,QAAA,EAAU,qBAAA,GACT,iBAAe;;;;;;;;;;;;;;;;;;;iBCzBF,mBAAA,CAAoB,MAAA,EAAQ,SAAA,GAAY,aAAa;;;;;;;;;;;;;;;;;iBCFrD,qBAAA,CAAsB,GAAA,EAAK,mBAAA,GAAoB,YAAU;;;;;;;;;;;;;;;iBCFzD,sBAAA,CAAuB,UAAkB;;;;;AJLzD;;;;AAAyC;AAKzC;;iBI6BgB,kBAAA,CACd,aAAA,iBACA,UAAA,UACA,UAAA,WACC,sBAAoB;;;;cChDV,eAAA,SAAwB,KAAK;EAAA,SAE7B,IAAA;cAAA,IAAA,6BACT,QAAA;AAAA;;;;;;;;;;iBAoBY,UAAA,CAAW,IAAA,UAAc,QAAgB;;;;ALbzD;;;iBKoCgB,WAAA,CAAY,KAAA,UAAe,QAAgB;;;;iBCjC3C,eAAA,CAAgB,IAAA,UAAc,UAAA,WAAqB,UAAU;;iBAU7D,iBAAA,CAAkB,IAAA,WAAe,iBAAe;;iBAKhD,cAAA,CAAe,IAAA,WAAe,YAAU;;;;;iBAqExC,YAAA,CAAa,IAAA,WAAe,iBAAe;;iBAK3C,cAAA,CAAe,IAAA,WAAe,UAAU;;;;AN5FxD;;iBMqGgB,eAAA,CAAgB,IAAA,WAAe,UAAU;;iBAKzC,eAAA,CAAgB,KAAiB,EAAV,UAAU;ANrGjD;AAAA,iBM0GgB,iBAAA,CAAkB,KAAiB,EAAV,UAAU;;iBAKnC,kBAAA,CAAmB,KAAiB,EAAV,UAAU"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/actions/hex.ts","../src/derivation/pubkeyAccount.ts","../src/derivation/publicKeyHash.ts","../src/derivation/transactionHash.ts","../src/derivation/entrypointId.ts","../src/units.ts","../src/encoding.ts"],"mappings":";;;;;;;;;;;;;;;;;;iBAWgB,OAAA,CAAQ,KAAiB,EAAV,UAAU;;iBAKzB,SAAA,CAAU,GAAA,WAAc,UAAU;;iBAOlC,WAAA,CAAY,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