@thruputchain/client 0.0.0-stage → 0.25.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 (182) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +935 -2
  3. package/dist/actions-CdFSUTO2.js +298 -0
  4. package/dist/actions-CdFSUTO2.js.map +1 -0
  5. package/dist/actions-DxJZ3yIv.cjs +357 -0
  6. package/dist/actions-DxJZ3yIv.cjs.map +1 -0
  7. package/dist/actions.cjs +19 -0
  8. package/dist/actions.d.cts +4 -0
  9. package/dist/actions.d.ts +4 -0
  10. package/dist/actions.js +3 -0
  11. package/dist/client-BxB6ktQd.d.cts +690 -0
  12. package/dist/client-BxB6ktQd.d.cts.map +1 -0
  13. package/dist/client-BxB6ktQd.d.ts +690 -0
  14. package/dist/client-BxB6ktQd.d.ts.map +1 -0
  15. package/dist/codec-B7HJjMzI.cjs +8190 -0
  16. package/dist/codec-B7HJjMzI.cjs.map +1 -0
  17. package/dist/codec-CX-19jac.js +8130 -0
  18. package/dist/codec-CX-19jac.js.map +1 -0
  19. package/dist/contract-BpxjDMHw.js +1105 -0
  20. package/dist/contract-BpxjDMHw.js.map +1 -0
  21. package/dist/contract-D0wCFcAN.cjs +1219 -0
  22. package/dist/contract-D0wCFcAN.cjs.map +1 -0
  23. package/dist/contract.cjs +58 -0
  24. package/dist/contract.d.cts +3 -0
  25. package/dist/contract.d.ts +3 -0
  26. package/dist/contract.js +2 -0
  27. package/dist/contracts.cjs +1050 -0
  28. package/dist/contracts.cjs.map +1 -0
  29. package/dist/contracts.d.cts +397 -0
  30. package/dist/contracts.d.cts.map +1 -0
  31. package/dist/contracts.d.ts +397 -0
  32. package/dist/contracts.d.ts.map +1 -0
  33. package/dist/contracts.js +1030 -0
  34. package/dist/contracts.js.map +1 -0
  35. package/dist/dev_wallet-BXWK5KR6.cjs +530 -0
  36. package/dist/dev_wallet-BXWK5KR6.cjs.map +1 -0
  37. package/dist/dev_wallet-C9eMQROk.js +497 -0
  38. package/dist/dev_wallet-C9eMQROk.js.map +1 -0
  39. package/dist/domainSeparator-B_vU_zUD.cjs +102 -0
  40. package/dist/domainSeparator-B_vU_zUD.cjs.map +1 -0
  41. package/dist/domainSeparator-CBCvxIj-.js +79 -0
  42. package/dist/domainSeparator-CBCvxIj-.js.map +1 -0
  43. package/dist/execution-CRDyKu45.d.ts +227 -0
  44. package/dist/execution-CRDyKu45.d.ts.map +1 -0
  45. package/dist/execution-DyxaIG4v.d.cts +227 -0
  46. package/dist/execution-DyxaIG4v.d.cts.map +1 -0
  47. package/dist/hex-DIcaALXL.js +112 -0
  48. package/dist/hex-DIcaALXL.js.map +1 -0
  49. package/dist/hex-DkGpiZ5e.cjs +189 -0
  50. package/dist/hex-DkGpiZ5e.cjs.map +1 -0
  51. package/dist/index--5LsCotr.d.ts +192 -0
  52. package/dist/index--5LsCotr.d.ts.map +1 -0
  53. package/dist/index-B5KqSHeL.d.cts +192 -0
  54. package/dist/index-B5KqSHeL.d.cts.map +1 -0
  55. package/dist/index-BZ0O5jZG.d.cts +163 -0
  56. package/dist/index-BZ0O5jZG.d.cts.map +1 -0
  57. package/dist/index-BuPQcAK2.d.ts +23 -0
  58. package/dist/index-BuPQcAK2.d.ts.map +1 -0
  59. package/dist/index-ByNNqY7S.d.cts +83 -0
  60. package/dist/index-ByNNqY7S.d.cts.map +1 -0
  61. package/dist/index-C-M-4jMR.d.cts +263 -0
  62. package/dist/index-C-M-4jMR.d.cts.map +1 -0
  63. package/dist/index-C97zw2rk.d.ts +137 -0
  64. package/dist/index-C97zw2rk.d.ts.map +1 -0
  65. package/dist/index-CIHK7Ew9.d.cts +303 -0
  66. package/dist/index-CIHK7Ew9.d.cts.map +1 -0
  67. package/dist/index-CIHK7Ew9.d.ts +303 -0
  68. package/dist/index-CIHK7Ew9.d.ts.map +1 -0
  69. package/dist/index-CXuO2Zjx.d.ts +263 -0
  70. package/dist/index-CXuO2Zjx.d.ts.map +1 -0
  71. package/dist/index-DOEBWXY2.d.cts +137 -0
  72. package/dist/index-DOEBWXY2.d.cts.map +1 -0
  73. package/dist/index-DzrLv3EA.d.cts +82 -0
  74. package/dist/index-DzrLv3EA.d.cts.map +1 -0
  75. package/dist/index-DzrLv3EA.d.ts +82 -0
  76. package/dist/index-DzrLv3EA.d.ts.map +1 -0
  77. package/dist/index-fdTURpBk.d.ts +83 -0
  78. package/dist/index-fdTURpBk.d.ts.map +1 -0
  79. package/dist/index-sAzHHayu.d.ts +163 -0
  80. package/dist/index-sAzHHayu.d.ts.map +1 -0
  81. package/dist/index-uQqRk9Ww.d.cts +23 -0
  82. package/dist/index-uQqRk9Ww.d.cts.map +1 -0
  83. package/dist/index.cjs +478 -0
  84. package/dist/index.cjs.map +1 -0
  85. package/dist/index.d.cts +173 -0
  86. package/dist/index.d.cts.map +1 -0
  87. package/dist/index.d.ts +173 -0
  88. package/dist/index.d.ts.map +1 -0
  89. package/dist/index.js +231 -0
  90. package/dist/index.js.map +1 -0
  91. package/dist/provider.cjs +101 -0
  92. package/dist/provider.cjs.map +1 -0
  93. package/dist/provider.d.cts +2 -0
  94. package/dist/provider.d.ts +2 -0
  95. package/dist/provider.js +76 -0
  96. package/dist/provider.js.map +1 -0
  97. package/dist/readError-BVbfTMLv.cjs +604 -0
  98. package/dist/readError-BVbfTMLv.cjs.map +1 -0
  99. package/dist/readError-Dn_XN98x.js +551 -0
  100. package/dist/readError-Dn_XN98x.js.map +1 -0
  101. package/dist/readViews-BKJtE5J3.d.cts +594 -0
  102. package/dist/readViews-BKJtE5J3.d.cts.map +1 -0
  103. package/dist/readViews-C_FX8wby.d.ts +594 -0
  104. package/dist/readViews-C_FX8wby.d.ts.map +1 -0
  105. package/dist/rolldown-runtime-D6vf50IK.cjs +28 -0
  106. package/dist/sendInvocation-2EZanZZr.cjs +661 -0
  107. package/dist/sendInvocation-2EZanZZr.cjs.map +1 -0
  108. package/dist/sendInvocation-C4ruTC-9.js +505 -0
  109. package/dist/sendInvocation-C4ruTC-9.js.map +1 -0
  110. package/dist/sign-BewmV_EL.cjs +139 -0
  111. package/dist/sign-BewmV_EL.cjs.map +1 -0
  112. package/dist/sign-DVIRyW8Y.js +122 -0
  113. package/dist/sign-DVIRyW8Y.js.map +1 -0
  114. package/dist/sign-Ve0eetRO.d.ts +48 -0
  115. package/dist/sign-Ve0eetRO.d.ts.map +1 -0
  116. package/dist/sign-eUT0iGQG.d.cts +48 -0
  117. package/dist/sign-eUT0iGQG.d.cts.map +1 -0
  118. package/dist/signed-op.cjs +9 -0
  119. package/dist/signed-op.d.cts +3 -0
  120. package/dist/signed-op.d.ts +3 -0
  121. package/dist/signed-op.js +3 -0
  122. package/dist/signedOp-Bluo0OAd.cjs +183 -0
  123. package/dist/signedOp-Bluo0OAd.cjs.map +1 -0
  124. package/dist/signedOp-x4fakrr4.js +166 -0
  125. package/dist/signedOp-x4fakrr4.js.map +1 -0
  126. package/dist/signed_op-BzVbBgv4.js +154 -0
  127. package/dist/signed_op-BzVbBgv4.js.map +1 -0
  128. package/dist/signed_op-DFgQ2yFj.d.ts +58 -0
  129. package/dist/signed_op-DFgQ2yFj.d.ts.map +1 -0
  130. package/dist/signed_op-LwxrDud8.d.cts +58 -0
  131. package/dist/signed_op-LwxrDud8.d.cts.map +1 -0
  132. package/dist/signed_op-z_8fqAi1.cjs +175 -0
  133. package/dist/signed_op-z_8fqAi1.cjs.map +1 -0
  134. package/dist/signers-BFP84wJP.cjs +137 -0
  135. package/dist/signers-BFP84wJP.cjs.map +1 -0
  136. package/dist/signers-CzOSedwJ.js +120 -0
  137. package/dist/signers-CzOSedwJ.js.map +1 -0
  138. package/dist/signers.cjs +5 -0
  139. package/dist/signers.d.cts +3 -0
  140. package/dist/signers.d.ts +3 -0
  141. package/dist/signers.js +2 -0
  142. package/dist/size-506oTE28.js +91 -0
  143. package/dist/size-506oTE28.js.map +1 -0
  144. package/dist/size-OAFfOthl.cjs +108 -0
  145. package/dist/size-OAFfOthl.cjs.map +1 -0
  146. package/dist/transaction-CwkQxQOx.js +24 -0
  147. package/dist/transaction-CwkQxQOx.js.map +1 -0
  148. package/dist/transaction-DrSrCJ5y.cjs +47 -0
  149. package/dist/transaction-DrSrCJ5y.cjs.map +1 -0
  150. package/dist/transaction.cjs +13 -0
  151. package/dist/transaction.d.cts +3 -0
  152. package/dist/transaction.d.ts +3 -0
  153. package/dist/transaction.js +4 -0
  154. package/dist/transactionHash-CO9ajbvU.js +24 -0
  155. package/dist/transactionHash-CO9ajbvU.js.map +1 -0
  156. package/dist/transactionHash-D5yf4KoL.cjs +29 -0
  157. package/dist/transactionHash-D5yf4KoL.cjs.map +1 -0
  158. package/dist/transport-B-P16rs6.cjs +252 -0
  159. package/dist/transport-B-P16rs6.cjs.map +1 -0
  160. package/dist/transport-DqyoNtUy.js +234 -0
  161. package/dist/transport-DqyoNtUy.js.map +1 -0
  162. package/dist/transport.cjs +19 -0
  163. package/dist/transport.d.cts +3 -0
  164. package/dist/transport.d.ts +3 -0
  165. package/dist/transport.js +4 -0
  166. package/dist/types-BE40oD_Q.d.cts +18 -0
  167. package/dist/types-BE40oD_Q.d.cts.map +1 -0
  168. package/dist/types-BE40oD_Q.d.ts +18 -0
  169. package/dist/types-BE40oD_Q.d.ts.map +1 -0
  170. package/dist/validation-4w-vDGAi.cjs +543 -0
  171. package/dist/validation-4w-vDGAi.cjs.map +1 -0
  172. package/dist/validation-eXATmgO0.js +411 -0
  173. package/dist/validation-eXATmgO0.js.map +1 -0
  174. package/dist/wallet-Bthapk8i.cjs +709 -0
  175. package/dist/wallet-Bthapk8i.cjs.map +1 -0
  176. package/dist/wallet-CwWPYoHF.js +667 -0
  177. package/dist/wallet-CwWPYoHF.js.map +1 -0
  178. package/dist/wallet.cjs +27 -0
  179. package/dist/wallet.d.cts +3 -0
  180. package/dist/wallet.d.ts +3 -0
  181. package/dist/wallet.js +3 -0
  182. package/package.json +122 -4
@@ -0,0 +1,234 @@
1
+ import { r as UnsupportedRpcValue } from "./codec-CX-19jac.js";
2
+ import { g as toBase58, n as fromHex0x } from "./hex-DIcaALXL.js";
3
+ import { t as hashSignedTransaction } from "./transactionHash-CO9ajbvU.js";
4
+ import { i as NativeRpcError } from "./readError-Dn_XN98x.js";
5
+ import { codec, deserialize } from "@thruputchain/protocol";
6
+ //#region src/transport/mock.ts
7
+ const methods = [
8
+ "getVersionInfo",
9
+ "getNetworkInfo",
10
+ "getChainTip",
11
+ "getChainConfig",
12
+ "getServerLimits",
13
+ "getBalance",
14
+ "getRegisteredAuth",
15
+ "getBlockByHeight",
16
+ "dev_getPendingTransactionCount",
17
+ "simulateInvocation",
18
+ "simulateInvocations",
19
+ "sendTransaction",
20
+ "getTransactionReceipt",
21
+ "getTransactionStatus",
22
+ "getTransactionsByRootAddress",
23
+ "getTransactionsByBlock",
24
+ "getEvents",
25
+ "getStorage",
26
+ "faucet_requestAirdrop"
27
+ ];
28
+ /** Deterministic native RPC transport for examples; it does not execute contract code. */
29
+ var MockTransport = class {
30
+ #height = 0n;
31
+ #transactions = /* @__PURE__ */ new Map();
32
+ async request(method, params = {}, options) {
33
+ options?.signal?.throwIfAborted();
34
+ if (Array.isArray(params)) throw new TypeError("Native RPC params must be a named object");
35
+ const stateBlockHeight = this.#height.toString();
36
+ const bounds = {
37
+ oldestIndexedBlockHeight: "0",
38
+ latestIndexedBlockHeight: stateBlockHeight,
39
+ nextCursor: null
40
+ };
41
+ const simulation = {
42
+ output: {
43
+ result: "return",
44
+ returnData: "0x"
45
+ },
46
+ events: [],
47
+ gasUsed: "0"
48
+ };
49
+ let result;
50
+ switch (method) {
51
+ case "getVersionInfo":
52
+ result = {
53
+ wireFormat: "14.1.1",
54
+ implementation: "mock",
55
+ supportedMethods: [...methods]
56
+ };
57
+ break;
58
+ case "getNetworkInfo":
59
+ result = { networkHash: "1".repeat(32) };
60
+ break;
61
+ case "getChainTip":
62
+ result = {
63
+ blockHeight: stateBlockHeight,
64
+ blockHash: this.#blockHash(this.#height)
65
+ };
66
+ break;
67
+ case "getChainConfig":
68
+ result = { stated: { maxNewContractsPerTx: 4 } };
69
+ break;
70
+ case "getServerLimits":
71
+ result = {
72
+ maxSimulationGas: "100000000",
73
+ maxSimulationCalldataBytes: "65536",
74
+ maxEventsPerPage: 200,
75
+ maxTransactionsPerPage: 200,
76
+ maxCursorBytes: "1024",
77
+ simulationBatch: {
78
+ maxInvocations: 16,
79
+ maxCalldataBytes: 65536,
80
+ maxGas: "1600000000",
81
+ maxBackendResponseBytes: 1e6,
82
+ timeoutMs: "3000"
83
+ }
84
+ };
85
+ break;
86
+ case "getBalance":
87
+ result = {
88
+ address: params.address,
89
+ rawBalance: "0",
90
+ stateBlockHeight
91
+ };
92
+ break;
93
+ case "getRegisteredAuth":
94
+ result = {
95
+ address: params.address,
96
+ configuration: null,
97
+ stateBlockHeight
98
+ };
99
+ break;
100
+ case "getStorage":
101
+ result = {
102
+ item: null,
103
+ stateBlockHeight
104
+ };
105
+ break;
106
+ case "dev_getPendingTransactionCount":
107
+ result = { count: "0" };
108
+ break;
109
+ case "simulateInvocation":
110
+ result = {
111
+ ...simulation,
112
+ stateBlockHeight
113
+ };
114
+ break;
115
+ case "simulateInvocations":
116
+ result = {
117
+ stateBlockHeight,
118
+ results: params.invocations.map(() => structuredClone(simulation))
119
+ };
120
+ break;
121
+ case "faucet_requestAirdrop":
122
+ result = {
123
+ attemptStatus: "succeeded",
124
+ recipient: params.recipient,
125
+ rawAmount: "100000000",
126
+ transactionHash: this.#blockHash(this.#height),
127
+ blockHeight: stateBlockHeight,
128
+ execution: {
129
+ result: "return",
130
+ returnData: "0x"
131
+ }
132
+ };
133
+ break;
134
+ case "sendTransaction": {
135
+ const hash = toBase58(hashSignedTransaction(deserialize(fromHex0x(String(params.signedTransaction)), codec.SignedTransaction)));
136
+ if (!this.#transactions.has(hash)) this.#transactions.set(hash, ++this.#height);
137
+ result = {
138
+ transactionHash: hash,
139
+ admission: "accepted"
140
+ };
141
+ break;
142
+ }
143
+ case "getTransactionReceipt": {
144
+ const height = this.#transactions.get(String(params.transactionHash));
145
+ result = height === void 0 ? null : {
146
+ transactionHash: params.transactionHash,
147
+ blockHeight: height.toString(),
148
+ execution: {
149
+ result: "return",
150
+ returnData: "0x"
151
+ },
152
+ events: [],
153
+ gasUsed: "0"
154
+ };
155
+ break;
156
+ }
157
+ case "getTransactionStatus": {
158
+ const height = this.#transactions.get(String(params.transactionHash));
159
+ result = height === void 0 ? { status: "unknown" } : {
160
+ status: "committed",
161
+ blockHeight: height.toString()
162
+ };
163
+ break;
164
+ }
165
+ case "getEvents":
166
+ result = {
167
+ ...bounds,
168
+ events: []
169
+ };
170
+ break;
171
+ case "getTransactionsByRootAddress":
172
+ case "getTransactionsByBlock":
173
+ result = {
174
+ ...bounds,
175
+ transactions: []
176
+ };
177
+ break;
178
+ case "getBlockByHeight": {
179
+ const height = BigInt(String(params.blockHeight));
180
+ result = height <= 0n || height > this.#height ? null : {
181
+ blockHash: this.#blockHash(height),
182
+ protocol: 0,
183
+ networkHash: "1".repeat(32),
184
+ proposer: "1".repeat(32),
185
+ blockTimepoint: "0",
186
+ blockHeight: height.toString(),
187
+ txsHash: this.#blockHash(height),
188
+ storageHash: this.#blockHash(height),
189
+ eventsHash: this.#blockHash(height),
190
+ configHash: this.#blockHash(height),
191
+ prevBlockHash: this.#blockHash(height - 1n),
192
+ proposalTxsHash: this.#blockHash(height),
193
+ upgrades: []
194
+ };
195
+ break;
196
+ }
197
+ default: throw new Error(`MockTransport: method not implemented: ${method}`);
198
+ }
199
+ return result;
200
+ }
201
+ #blockHash(height) {
202
+ const bytes = new Uint8Array(32);
203
+ new DataView(bytes.buffer).setBigUint64(24, height);
204
+ return toBase58(bytes);
205
+ }
206
+ };
207
+ //#endregion
208
+ //#region src/transport/txInvalidDetail.ts
209
+ /** Read known transaction-bound evidence without inferring retry permission. */
210
+ function txInvalidDetail(error) {
211
+ if (!(error instanceof NativeRpcError) || error.decoded.classification !== "known" || error.decoded.data.kind !== "transactionInvalid") return null;
212
+ const detail = error.decoded.data.detail;
213
+ return !detail || detail instanceof UnsupportedRpcValue ? null : detail;
214
+ }
215
+ //#endregion
216
+ //#region src/rpc/errors.ts
217
+ /** Native causes. Codes alone never grant write retry permission. */
218
+ const NativeRpcErrorCode = {
219
+ BackendDataInvalid: -32054,
220
+ BackendTimeout: -32051,
221
+ BackendUnavailable: -32050,
222
+ FundingAttemptStopped: -32030,
223
+ HistoryUnavailable: -32013,
224
+ InvalidParams: -32602,
225
+ LocalFundingUnresolved: -32031,
226
+ Overloaded: -32053,
227
+ StateHeightUnavailable: -32012,
228
+ TransactionInvalid: -32e3,
229
+ TransactionRejected: -32001
230
+ };
231
+ //#endregion
232
+ export { txInvalidDetail as n, MockTransport as r, NativeRpcErrorCode as t };
233
+
234
+ //# sourceMappingURL=transport-DqyoNtUy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport-DqyoNtUy.js","names":["#height","#blockHash","#transactions"],"sources":["../src/transport/mock.ts","../src/transport/txInvalidDetail.ts","../src/rpc/errors.ts"],"sourcesContent":["import type { Transport, RpcParams, TransportRequestOptions } from \"./types.js\";\nimport { codec, deserialize } from \"@thruputchain/protocol\";\nimport { toBase58 } from \"../encoding.js\";\nimport { fromHex0x } from \"../actions/hex.js\";\nimport { hashSignedTransaction } from \"../derivation/transactionHash.js\";\n\nconst methods = [\n \"getVersionInfo\",\n \"getNetworkInfo\",\n \"getChainTip\",\n \"getChainConfig\",\n \"getServerLimits\",\n \"getBalance\",\n \"getRegisteredAuth\",\n \"getBlockByHeight\",\n \"dev_getPendingTransactionCount\",\n \"simulateInvocation\",\n \"simulateInvocations\",\n \"sendTransaction\",\n \"getTransactionReceipt\",\n \"getTransactionStatus\",\n \"getTransactionsByRootAddress\",\n \"getTransactionsByBlock\",\n \"getEvents\",\n \"getStorage\",\n \"faucet_requestAirdrop\",\n];\n/** Deterministic native RPC transport for examples; it does not execute contract code. */\nexport class MockTransport implements Transport {\n #height = 0n;\n #transactions = new Map<string, bigint>();\n async request<T = unknown>(\n method: string,\n params: RpcParams = {},\n options?: TransportRequestOptions,\n ): Promise<T> {\n options?.signal?.throwIfAborted();\n if (Array.isArray(params))\n throw new TypeError(\"Native RPC params must be a named object\");\n const stateBlockHeight = this.#height.toString();\n const bounds = {\n oldestIndexedBlockHeight: \"0\",\n latestIndexedBlockHeight: stateBlockHeight,\n nextCursor: null,\n };\n const simulation = {\n output: { result: \"return\", returnData: \"0x\" },\n events: [],\n gasUsed: \"0\",\n };\n let result: unknown;\n switch (method) {\n case \"getVersionInfo\":\n result = {\n wireFormat: \"14.1.1\",\n implementation: \"mock\",\n supportedMethods: [...methods],\n };\n break;\n case \"getNetworkInfo\":\n result = { networkHash: \"1\".repeat(32) };\n break;\n case \"getChainTip\":\n result = {\n blockHeight: stateBlockHeight,\n blockHash: this.#blockHash(this.#height),\n };\n break;\n case \"getChainConfig\":\n result = { stated: { maxNewContractsPerTx: 4 } };\n break;\n case \"getServerLimits\":\n result = {\n maxSimulationGas: \"100000000\",\n maxSimulationCalldataBytes: \"65536\",\n maxEventsPerPage: 200,\n maxTransactionsPerPage: 200,\n maxCursorBytes: \"1024\",\n simulationBatch: {\n maxInvocations: 16,\n maxCalldataBytes: 65536,\n maxGas: \"1600000000\",\n maxBackendResponseBytes: 1000000,\n timeoutMs: \"3000\",\n },\n };\n break;\n case \"getBalance\":\n result = { address: params.address, rawBalance: \"0\", stateBlockHeight };\n break;\n case \"getRegisteredAuth\":\n result = {\n address: params.address,\n configuration: null,\n stateBlockHeight,\n };\n break;\n case \"getStorage\":\n result = { item: null, stateBlockHeight };\n break;\n case \"dev_getPendingTransactionCount\":\n result = { count: \"0\" };\n break;\n case \"simulateInvocation\":\n result = { ...simulation, stateBlockHeight };\n break;\n case \"simulateInvocations\":\n result = {\n stateBlockHeight,\n results: (params.invocations as unknown[]).map(() =>\n structuredClone(simulation),\n ),\n };\n break;\n case \"faucet_requestAirdrop\":\n result = {\n attemptStatus: \"succeeded\",\n recipient: params.recipient,\n rawAmount: \"100000000\",\n transactionHash: this.#blockHash(this.#height),\n blockHeight: stateBlockHeight,\n execution: { result: \"return\", returnData: \"0x\" },\n };\n break;\n case \"sendTransaction\": {\n const signed = deserialize(\n fromHex0x(String(params.signedTransaction)),\n codec.SignedTransaction,\n );\n const hash = toBase58(hashSignedTransaction(signed));\n if (!this.#transactions.has(hash))\n this.#transactions.set(hash, ++this.#height);\n result = { transactionHash: hash, admission: \"accepted\" };\n break;\n }\n case \"getTransactionReceipt\": {\n const height = this.#transactions.get(String(params.transactionHash));\n result =\n height === undefined\n ? null\n : {\n transactionHash: params.transactionHash,\n blockHeight: height.toString(),\n execution: { result: \"return\", returnData: \"0x\" },\n events: [],\n gasUsed: \"0\",\n };\n break;\n }\n case \"getTransactionStatus\": {\n const height = this.#transactions.get(String(params.transactionHash));\n result =\n height === undefined\n ? { status: \"unknown\" }\n : { status: \"committed\", blockHeight: height.toString() };\n break;\n }\n case \"getEvents\":\n result = { ...bounds, events: [] };\n break;\n case \"getTransactionsByRootAddress\":\n case \"getTransactionsByBlock\":\n result = { ...bounds, transactions: [] };\n break;\n case \"getBlockByHeight\": {\n const height = BigInt(String(params.blockHeight));\n result =\n height <= 0n || height > this.#height\n ? null\n : {\n blockHash: this.#blockHash(height),\n protocol: 0,\n networkHash: \"1\".repeat(32),\n proposer: \"1\".repeat(32),\n blockTimepoint: \"0\",\n blockHeight: height.toString(),\n txsHash: this.#blockHash(height),\n storageHash: this.#blockHash(height),\n eventsHash: this.#blockHash(height),\n configHash: this.#blockHash(height),\n prevBlockHash: this.#blockHash(height - 1n),\n proposalTxsHash: this.#blockHash(height),\n upgrades: [],\n };\n break;\n }\n default:\n throw new Error(`MockTransport: method not implemented: ${method}`);\n }\n return result as T;\n }\n #blockHash(height: bigint): string {\n const bytes = new Uint8Array(32);\n new DataView(bytes.buffer).setBigUint64(24, height);\n return toBase58(bytes);\n }\n}\n","import { NativeRpcError } from \"../rpc/errorReader.js\";\nimport { UnsupportedRpcValue } from \"../rpc/codec.js\";\nimport type { RpcErrorData } from \"../rpc/generated.js\";\n/** A validated native admission bound violation. Unknown details remain on the raw error. */\nexport type TxInvalidDetail = Exclude<\n NonNullable<Extract<RpcErrorData, { kind: \"transactionInvalid\" }>[\"detail\"]>,\n UnsupportedRpcValue\n>;\n/** Read known transaction-bound evidence without inferring retry permission. */\nexport function txInvalidDetail(error: unknown): TxInvalidDetail | null {\n if (\n !(error instanceof NativeRpcError) ||\n error.decoded.classification !== \"known\" ||\n error.decoded.data.kind !== \"transactionInvalid\"\n )\n return null;\n const detail = error.decoded.data.detail;\n return !detail || detail instanceof UnsupportedRpcValue ? null : detail;\n}\n","// Generated from the Rust-owned native OpenRPC fixture. Do not edit.\n/** Native causes. Codes alone never grant write retry permission. */\nexport const NativeRpcErrorCode = {\n BackendDataInvalid: -32054,\n BackendTimeout: -32051,\n BackendUnavailable: -32050,\n FundingAttemptStopped: -32030,\n HistoryUnavailable: -32013,\n InvalidParams: -32602,\n LocalFundingUnresolved: -32031,\n Overloaded: -32053,\n StateHeightUnavailable: -32012,\n TransactionInvalid: -32000,\n TransactionRejected: -32001,\n} as const;\n"],"mappings":"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"}
@@ -0,0 +1,19 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_codec = require("./codec-B7HJjMzI.cjs");
3
+ const require_readError = require("./readError-BVbfTMLv.cjs");
4
+ const require_transport = require("./transport-B-P16rs6.cjs");
5
+ exports.HttpRequestError = require_readError.HttpRequestError;
6
+ exports.HttpResponseError = require_readError.HttpResponseError;
7
+ exports.HttpTransport = require_readError.HttpTransport;
8
+ exports.JsonRpcError = require_readError.JsonRpcError;
9
+ exports.MockTransport = require_transport.MockTransport;
10
+ exports.NativeRpcError = require_readError.NativeRpcError;
11
+ exports.NativeRpcErrorCode = require_transport.NativeRpcErrorCode;
12
+ exports.RpcCompatibilityError = require_readError.RpcCompatibilityError;
13
+ exports.RpcDecodingError = require_codec.RpcDecodingError;
14
+ exports.RpcRequestValidationError = require_codec.RpcRequestValidationError;
15
+ exports.RpcResponseError = require_readError.RpcResponseError;
16
+ exports.UnsupportedRpcValue = require_codec.UnsupportedRpcValue;
17
+ exports.classifyReadError = require_readError.classifyReadError;
18
+ exports.createRpcClient = require_readError.createRpcClient;
19
+ exports.txInvalidDetail = require_transport.txInvalidDetail;
@@ -0,0 +1,3 @@
1
+ import { $ as RpcSchedulerError, A as RpcDecimalU64, B as RpcIdentifiedEvent, C as RpcChainConfig, D as RpcConflictDiagnostic, E as RpcConflictCode, F as RpcEventPage, G as RpcNetworkInfo, H as RpcInvocationOutput, I as RpcExecutionConfig, J as RpcReceiptExecution, K as RpcPendingTransactionCount, L as RpcFailureCause, M as RpcEmittedEvent, N as RpcErrorData, O as RpcContractRejectCode, P as RpcEventFilter, Q as RpcResults, R as RpcFundingSubmission, S as RpcBlockStart, T as RpcConfigLimits, U as RpcInvocationResult, V as RpcInvocation, W as RpcIterationOrder, X as RpcRegisteredAuthResult, Y as RpcRecentAttemptFailure, Z as RpcRequests, _ as RpcBase58_Ed25519PublicKey, _t as RpcRequestValidationError, a as RpcMethod, at as RpcSimulationResults, b as RpcBase58_ValidatorID, bt as Transport, c as RpcAdmission, ct as RpcStorageResult, d as RpcAscendingAnchor, dt as RpcTransactionRef, et as RpcSchedulerErrorSource, f as RpcAssumedAuth, ft as RpcTransactionRefPage, g as RpcBase58_ContractAddress, gt as RpcDecodingError, h as RpcBalanceResult, ht as RpcVersionInfo, i as RpcDiscovery, it as RpcSimulationResult, j as RpcDescendingAnchor, k as RpcDecimalTimePoint, l as RpcAirdropAttempt, lt as RpcTopicFilter, m as RpcAuthSigner, mt as RpcTxHash, n as RpcClientOptions, nt as RpcServerLimits, o as RpcMethods, ot as RpcStorageCosts, p as RpcAuthConfiguration, pt as RpcTransactionStatus, q as RpcPublicKey, r as RpcCompatibilityError, rt as RpcSimulationBatchLimits, s as createRpcClient, st as RpcStorageItem, t as RpcClient, tt as RpcSendTransactionResult, u as RpcAirdropExecution, ut as RpcTransactionReceipt, v as RpcBase58_PublicKeyHash, vt as UnsupportedRpcValue, w as RpcChainTip, x as RpcBlockInfo, xt as TransportRequestOptions, y as RpcBase58_SHA256Hash, yt as RpcParams, z as RpcHistoryStart } from "./client-BxB6ktQd.cjs";
2
+ 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-BZ0O5jZG.cjs";
3
+ export { type DecodedRpcError, type HttpBatchOptions, HttpRequestError, HttpResponseError, HttpTransport, type HttpTransportOptions, JsonRpcError, MockTransport, NativeRpcError, NativeRpcErrorCode, type ReadErrorKind, 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 RpcBlockInfo, type RpcBlockStart, type RpcChainConfig, type RpcChainTip, type RpcClient, type RpcClientOptions, RpcCompatibilityError, type RpcConfigLimits, type RpcConflictCode, type RpcConflictDiagnostic, type RpcContractRejectCode, type RpcDecimalTimePoint, type RpcDecimalU64, RpcDecodingError, type RpcDescendingAnchor, type RpcDiscovery, type RpcEmittedEvent, type RpcErrorData, type RpcEventFilter, type RpcEventPage, type RpcExecutionConfig, type RpcFailureCause, type RpcFundingSubmission, type RpcHistoryStart, type RpcIdentifiedEvent, type RpcInvocation, type RpcInvocationOutput, type RpcInvocationResult, type RpcIterationOrder, type RpcMethod, type RpcMethods, type RpcNetworkInfo, type RpcParams, type RpcPendingTransactionCount, 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 RpcTransactionReceipt, type RpcTransactionRef, type RpcTransactionRefPage, type RpcTransactionStatus, type RpcTxHash, type RpcVersionInfo, type Transport, type TransportRequestOptions, type TxInvalidDetail, UnsupportedRpcValue, classifyReadError, createRpcClient, txInvalidDetail };
@@ -0,0 +1,3 @@
1
+ import { $ as RpcSchedulerError, A as RpcDecimalU64, B as RpcIdentifiedEvent, C as RpcChainConfig, D as RpcConflictDiagnostic, E as RpcConflictCode, F as RpcEventPage, G as RpcNetworkInfo, H as RpcInvocationOutput, I as RpcExecutionConfig, J as RpcReceiptExecution, K as RpcPendingTransactionCount, L as RpcFailureCause, M as RpcEmittedEvent, N as RpcErrorData, O as RpcContractRejectCode, P as RpcEventFilter, Q as RpcResults, R as RpcFundingSubmission, S as RpcBlockStart, T as RpcConfigLimits, U as RpcInvocationResult, V as RpcInvocation, W as RpcIterationOrder, X as RpcRegisteredAuthResult, Y as RpcRecentAttemptFailure, Z as RpcRequests, _ as RpcBase58_Ed25519PublicKey, _t as RpcRequestValidationError, a as RpcMethod, at as RpcSimulationResults, b as RpcBase58_ValidatorID, bt as Transport, c as RpcAdmission, ct as RpcStorageResult, d as RpcAscendingAnchor, dt as RpcTransactionRef, et as RpcSchedulerErrorSource, f as RpcAssumedAuth, ft as RpcTransactionRefPage, g as RpcBase58_ContractAddress, gt as RpcDecodingError, h as RpcBalanceResult, ht as RpcVersionInfo, i as RpcDiscovery, it as RpcSimulationResult, j as RpcDescendingAnchor, k as RpcDecimalTimePoint, l as RpcAirdropAttempt, lt as RpcTopicFilter, m as RpcAuthSigner, mt as RpcTxHash, n as RpcClientOptions, nt as RpcServerLimits, o as RpcMethods, ot as RpcStorageCosts, p as RpcAuthConfiguration, pt as RpcTransactionStatus, q as RpcPublicKey, r as RpcCompatibilityError, rt as RpcSimulationBatchLimits, s as createRpcClient, st as RpcStorageItem, t as RpcClient, tt as RpcSendTransactionResult, u as RpcAirdropExecution, ut as RpcTransactionReceipt, v as RpcBase58_PublicKeyHash, vt as UnsupportedRpcValue, w as RpcChainTip, x as RpcBlockInfo, xt as TransportRequestOptions, y as RpcBase58_SHA256Hash, yt as RpcParams, z as RpcHistoryStart } from "./client-BxB6ktQd.js";
2
+ 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-sAzHHayu.js";
3
+ export { type DecodedRpcError, type HttpBatchOptions, HttpRequestError, HttpResponseError, HttpTransport, type HttpTransportOptions, JsonRpcError, MockTransport, NativeRpcError, NativeRpcErrorCode, type ReadErrorKind, 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 RpcBlockInfo, type RpcBlockStart, type RpcChainConfig, type RpcChainTip, type RpcClient, type RpcClientOptions, RpcCompatibilityError, type RpcConfigLimits, type RpcConflictCode, type RpcConflictDiagnostic, type RpcContractRejectCode, type RpcDecimalTimePoint, type RpcDecimalU64, RpcDecodingError, type RpcDescendingAnchor, type RpcDiscovery, type RpcEmittedEvent, type RpcErrorData, type RpcEventFilter, type RpcEventPage, type RpcExecutionConfig, type RpcFailureCause, type RpcFundingSubmission, type RpcHistoryStart, type RpcIdentifiedEvent, type RpcInvocation, type RpcInvocationOutput, type RpcInvocationResult, type RpcIterationOrder, type RpcMethod, type RpcMethods, type RpcNetworkInfo, type RpcParams, type RpcPendingTransactionCount, 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 RpcTransactionReceipt, type RpcTransactionRef, type RpcTransactionRefPage, type RpcTransactionStatus, type RpcTxHash, type RpcVersionInfo, type Transport, type TransportRequestOptions, type TxInvalidDetail, UnsupportedRpcValue, classifyReadError, createRpcClient, txInvalidDetail };
@@ -0,0 +1,4 @@
1
+ import { n as RpcRequestValidationError, r as UnsupportedRpcValue, t as RpcDecodingError } from "./codec-CX-19jac.js";
2
+ import { a as HttpRequestError, c as JsonRpcError, i as NativeRpcError, l as RpcResponseError, n as RpcCompatibilityError, o as HttpResponseError, r as createRpcClient, s as HttpTransport, t as classifyReadError } from "./readError-Dn_XN98x.js";
3
+ import { n as txInvalidDetail, r as MockTransport, t as NativeRpcErrorCode } from "./transport-DqyoNtUy.js";
4
+ export { HttpRequestError, HttpResponseError, HttpTransport, JsonRpcError, MockTransport, NativeRpcError, NativeRpcErrorCode, RpcCompatibilityError, RpcDecodingError, RpcRequestValidationError, RpcResponseError, UnsupportedRpcValue, classifyReadError, createRpcClient, txInvalidDetail };
@@ -0,0 +1,18 @@
1
+ import { PublicKey, Signature } from "@thruputchain/protocol";
2
+
3
+ //#region src/signers/types.d.ts
4
+ /**
5
+ * Interface for signing canonical transaction bytes.
6
+ *
7
+ * Implement this interface to connect the SDK to a wallet, hardware signer,
8
+ * remote signer, or custom key-management system.
9
+ */
10
+ interface Signer {
11
+ /** Sign an arbitrary byte message and return a protocol signature. */
12
+ sign(message: Uint8Array): Promise<Signature>;
13
+ /** Public key corresponding to signatures produced by this signer. */
14
+ publicKey: PublicKey;
15
+ }
16
+ //#endregion
17
+ export { Signer as t };
18
+ //# sourceMappingURL=types-BE40oD_Q.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-BE40oD_Q.d.cts","names":[],"sources":["../src/signers/types.ts"],"mappings":";;;;;AAQA;;;;UAAiB,MAAA;EAEY;EAA3B,IAAA,CAAK,OAAA,EAAS,UAAA,GAAa,OAAA,CAAQ,SAAA;EAGf;EAApB,SAAA,EAAW,SAAA;AAAA"}
@@ -0,0 +1,18 @@
1
+ import { PublicKey, Signature } from "@thruputchain/protocol";
2
+
3
+ //#region src/signers/types.d.ts
4
+ /**
5
+ * Interface for signing canonical transaction bytes.
6
+ *
7
+ * Implement this interface to connect the SDK to a wallet, hardware signer,
8
+ * remote signer, or custom key-management system.
9
+ */
10
+ interface Signer {
11
+ /** Sign an arbitrary byte message and return a protocol signature. */
12
+ sign(message: Uint8Array): Promise<Signature>;
13
+ /** Public key corresponding to signatures produced by this signer. */
14
+ publicKey: PublicKey;
15
+ }
16
+ //#endregion
17
+ export { Signer as t };
18
+ //# sourceMappingURL=types-BE40oD_Q.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-BE40oD_Q.d.ts","names":[],"sources":["../src/signers/types.ts"],"mappings":";;;;;AAQA;;;;UAAiB,MAAA;EAEY;EAA3B,IAAA,CAAK,OAAA,EAAS,UAAA,GAAa,OAAA,CAAQ,SAAA;EAGf;EAApB,SAAA,EAAW,SAAA;AAAA"}