@thruputchain/client 0.28.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 +112 -17
  2. package/dist/{actions-B5-CjpEF.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-D77iA2iY.js → contract-BOlNskwd.js} +235 -87
  15. package/dist/contract-BOlNskwd.js.map +1 -0
  16. package/dist/{contract-DSu2UPPm.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-CAbOSrak.cjs → dev_wallet-BVChhV6j.cjs} +85 -6
  33. package/dist/dev_wallet-BVChhV6j.cjs.map +1 -0
  34. package/dist/{dev_wallet-CU3RpQLm.js → dev_wallet-D9LuPZ-h.js} +84 -5
  35. package/dist/dev_wallet-D9LuPZ-h.js.map +1 -0
  36. package/dist/{execution-J5jkXhV1.d.cts → execution-pSt6k620.d.cts} +23 -50
  37. package/dist/execution-pSt6k620.d.cts.map +1 -0
  38. package/dist/{execution-XJ0iwFaX.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-soFVQX9j.d.cts → index-B1efA-Y_.d.ts} +24 -21
  45. package/dist/index-B1efA-Y_.d.ts.map +1 -0
  46. package/dist/{index-C3HVRvQd.d.ts → index-BGmH_Sm7.d.cts} +12 -62
  47. package/dist/index-BGmH_Sm7.d.cts.map +1 -0
  48. package/dist/{index-Bb01ytjJ.d.ts → index-BZ5j5P5d.d.ts} +11 -9
  49. package/dist/index-BZ5j5P5d.d.ts.map +1 -0
  50. package/dist/{index-CedOvhGY.d.cts → index-BfYEEVHm.d.cts} +3 -13
  51. package/dist/index-BfYEEVHm.d.cts.map +1 -0
  52. package/dist/{index-CtjWsAXV.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-DeS1S0m-.d.ts → index-Btl_jMCT.d.ts} +3 -13
  57. package/dist/index-Btl_jMCT.d.ts.map +1 -0
  58. package/dist/{index-CtjZ61tl.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-DfmDUk5Y.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-Bxlt1gKO.js → readError-B3Rz7rgs.js} +359 -56
  81. package/dist/readError-B3Rz7rgs.js.map +1 -0
  82. package/dist/{codec-BcK8ASsg.cjs → readError-COcEDNoZ.cjs} +363 -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-DAucp6xg.cjs → signedOp-CVyeJ5ig.cjs} +3 -3
  97. package/dist/{signedOp-DAucp6xg.cjs.map → signedOp-CVyeJ5ig.cjs.map} +1 -1
  98. package/dist/{signedOp-DpmUpH-e.js → signedOp-D6WYZG9j.js} +3 -3
  99. package/dist/{signedOp-DpmUpH-e.js.map → signedOp-D6WYZG9j.js.map} +1 -1
  100. package/dist/{signed_op-_lR85dn2.cjs → signed_op-BBsDKOlD.cjs} +4 -4
  101. package/dist/{signed_op-_lR85dn2.cjs.map → signed_op-BBsDKOlD.cjs.map} +1 -1
  102. package/dist/{signed_op-D2usgASc.d.cts → signed_op-BvbOHWKK.d.ts} +3 -3
  103. package/dist/{signed_op-zGq4eBo8.d.ts.map → signed_op-BvbOHWKK.d.ts.map} +1 -1
  104. package/dist/{signed_op-zGq4eBo8.d.ts → signed_op-DoHFpSH4.d.cts} +3 -3
  105. package/dist/{signed_op-D2usgASc.d.cts.map → signed_op-DoHFpSH4.d.cts.map} +1 -1
  106. package/dist/{signed_op-CwN-_CXw.js → signed_op-h9X9-vBL.js} +3 -3
  107. package/dist/{signed_op-CwN-_CXw.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-BNKgOXrF.js → wallet-NlZiI4-3.js} +161 -77
  125. package/dist/wallet-NlZiI4-3.js.map +1 -0
  126. package/dist/{wallet-7R5M_7h4.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-B5-CjpEF.cjs.map +0 -1
  134. package/dist/actions-C1SMLWO5.js +0 -430
  135. package/dist/actions-C1SMLWO5.js.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-jOZxB8yW.d.cts +0 -798
  139. package/dist/client-jOZxB8yW.d.cts.map +0 -1
  140. package/dist/client-jOZxB8yW.d.ts +0 -798
  141. package/dist/client-jOZxB8yW.d.ts.map +0 -1
  142. package/dist/codec-BcK8ASsg.cjs.map +0 -1
  143. package/dist/codec-Bxlt1gKO.js.map +0 -1
  144. package/dist/contract-D77iA2iY.js.map +0 -1
  145. package/dist/contract-DSu2UPPm.cjs.map +0 -1
  146. package/dist/dev_wallet-CAbOSrak.cjs.map +0 -1
  147. package/dist/dev_wallet-CU3RpQLm.js.map +0 -1
  148. package/dist/execution-J5jkXhV1.d.cts.map +0 -1
  149. package/dist/execution-XJ0iwFaX.d.ts.map +0 -1
  150. package/dist/index-Bb01ytjJ.d.ts.map +0 -1
  151. package/dist/index-C3HVRvQd.d.ts.map +0 -1
  152. package/dist/index-CIHK7Ew9.d.cts +0 -303
  153. package/dist/index-CIHK7Ew9.d.cts.map +0 -1
  154. package/dist/index-CIHK7Ew9.d.ts +0 -303
  155. package/dist/index-CIHK7Ew9.d.ts.map +0 -1
  156. package/dist/index-CedOvhGY.d.cts.map +0 -1
  157. package/dist/index-CtjWsAXV.d.cts.map +0 -1
  158. package/dist/index-CtjZ61tl.d.cts.map +0 -1
  159. package/dist/index-DeS1S0m-.d.ts.map +0 -1
  160. package/dist/index-DfmDUk5Y.d.ts.map +0 -1
  161. package/dist/index-soFVQX9j.d.cts.map +0 -1
  162. package/dist/readError-CCVlmBhj.cjs +0 -624
  163. package/dist/readError-CCVlmBhj.cjs.map +0 -1
  164. package/dist/readError-D1dppovI.js +0 -571
  165. package/dist/readError-D1dppovI.js.map +0 -1
  166. package/dist/readViews-DbWELMMq.d.cts +0 -609
  167. package/dist/readViews-DbWELMMq.d.cts.map +0 -1
  168. package/dist/readViews-nV3jbpYc.d.ts +0 -609
  169. package/dist/readViews-nV3jbpYc.d.ts.map +0 -1
  170. package/dist/sendInvocation-Dsr9ij5P.cjs +0 -661
  171. package/dist/sendInvocation-Dsr9ij5P.cjs.map +0 -1
  172. package/dist/sendInvocation-tBmf8haQ.js +0 -505
  173. package/dist/sendInvocation-tBmf8haQ.js.map +0 -1
  174. package/dist/transport-5FPeNwuv.cjs +0 -279
  175. package/dist/transport-5FPeNwuv.cjs.map +0 -1
  176. package/dist/transport-IrhVlS4w.js +0 -261
  177. package/dist/transport-IrhVlS4w.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-7R5M_7h4.cjs.map +0 -1
  181. package/dist/wallet-BNKgOXrF.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"hex-DkGpiZ5e.cjs","names":["base32nopad"],"sources":["../src/encoding.ts","../src/actions/hex.ts"],"sourcesContent":["import { base32nopad } from \"@scure/base\";\nimport { fromBase58 } from \"@thruputchain/protocol/utils\";\nimport { contractAddress, sha256Hash } from \"@thruputchain/protocol\";\nimport type { ContractAddress, SHA256Hash } from \"@thruputchain/protocol\";\n\nconst ADDRESS_STRKEY_VERSION = 25 << 3;\n\nexport {\n toBase58,\n fromBase58,\n maxBase58Length,\n} from \"@thruputchain/protocol/utils\";\n\n/** Decode exactly the expected number of bytes, with no format fallback. */\nexport function fixedFromBase58(text: string, byteLength: number): Uint8Array {\n const bytes = fromBase58(text, byteLength);\n if (bytes.length !== byteLength) {\n bytes.fill(0);\n throw new Error(`Expected ${byteLength} bytes`);\n }\n return bytes;\n}\n\n/** Decode a canonical base58 Thruput address, without account derivation. */\nexport function addressFromBase58(text: string): ContractAddress {\n return contractAddress(fixedFromBase58(text, 32));\n}\n\n/** Decode a canonical base58 SHA-256 hash. */\nexport function hashFromBase58(text: string): SHA256Hash {\n return sha256Hash(fixedFromBase58(text, 32));\n}\n\n// SEP-23 CRC16-XModem: polynomial 0x1021, initial value zero, little-endian\n// checksum bytes. This is typo detection, not cryptographic authentication.\nfunction checksum(bytes: Uint8Array): number {\n let crc = 0;\n for (const byte of bytes) {\n crc ^= byte << 8;\n for (let bit = 0; bit < 8; bit++) {\n crc = ((crc << 1) ^ (crc & 0x8000 ? 0x1021 : 0)) & 0xffff;\n }\n }\n return crc;\n}\n\nfunction strkey(bytes: Uint8Array, version: number): string {\n if (bytes.length !== 32) throw new Error(\"Expected 32 bytes\");\n const encoded = new Uint8Array(35);\n try {\n encoded[0] = version;\n encoded.set(bytes, 1);\n const crc = checksum(encoded.subarray(0, 33));\n encoded[33] = crc & 0xff;\n encoded[34] = crc >>> 8;\n return base32nopad.encode(encoded);\n } finally {\n encoded.fill(0);\n }\n}\n\nfunction parseTyped(text: string, version: number, prefix: string): Uint8Array {\n // A 32-byte base58 value is at most 44 characters. Z/G/S StrKeys have 56.\n // Dispatch by full length, never by a prefix that valid base58 can share.\n if (typeof text === \"string\" && text.length === 56) {\n let decoded: Uint8Array | undefined;\n try {\n decoded = base32nopad.decode(text);\n if (\n decoded.length === 35 &&\n decoded[0] === version &&\n base32nopad.encode(decoded) === text &&\n checksum(decoded.subarray(0, 33)) ===\n (decoded[33]! | (decoded[34]! << 8))\n ) {\n return decoded.slice(1, 33);\n }\n } catch {\n // Return the same redacted error for malformed and wrong-type StrKeys.\n } finally {\n decoded?.fill(0);\n }\n } else {\n try {\n return fixedFromBase58(text, 32);\n } catch {\n // Do not expose input (which may be a secret seed) in errors.\n }\n }\n throw new Error(\n `Expected a 32-byte base58 value or a valid ${prefix} StrKey`,\n );\n}\n\n/**\n * Parse human address input: base58 or Thruput Z StrKey, without account derivation.\n * Stellar C addresses are rejected. Z does not identify a specific Thruput network.\n */\nexport function parseAddress(text: string): ContractAddress {\n return contractAddress(parseTyped(text, ADDRESS_STRKEY_VERSION, \"Z\"));\n}\n\n/** Parse human Ed25519 key input: base58 or G StrKey, never a wallet address. */\nexport function parsePublicKey(text: string): Uint8Array {\n return parseTyped(text, 6 << 3, \"G\");\n}\n\n/**\n * Explicitly import a 32-byte Ed25519 seed from base58 or S StrKey.\n * Callers must clear returned bytes after use. JavaScript input strings cannot\n * be reliably erased; do not log or persist them in diagnostics.\n */\nexport function parseSecretSeed(text: string): Uint8Array {\n return parseTyped(text, 18 << 3, \"S\");\n}\n\n/** Render address bytes as a Thruput Z StrKey, without a specific network identity. */\nexport function addressToStrkey(bytes: Uint8Array): string {\n return strkey(bytes, ADDRESS_STRKEY_VERSION);\n}\n\n/** Render an Ed25519 public key as a G StrKey, without deriving an address. */\nexport function publicKeyToStrkey(bytes: Uint8Array): string {\n return strkey(bytes, 6 << 3);\n}\n\n/** Explicitly export a seed as an S StrKey. Treat the returned string as secret. */\nexport function secretSeedToStrkey(bytes: Uint8Array): string {\n return strkey(bytes, 18 << 3);\n}\n","import type { SHA256Hash, ContractAddress } from \"@thruputchain/protocol\";\nimport {\n toHex,\n fromHex,\n sha256Hash,\n contractAddress,\n} from \"@thruputchain/protocol\";\n\nexport { toHex, fromHex } from \"@thruputchain/protocol\";\n\n/** Convert bytes to a `0x`-prefixed lowercase hex string. */\nexport function toHex0x(bytes: Uint8Array): string {\n return \"0x\" + toHex(bytes);\n}\n\n/** Decode a `0x`-prefixed hex string into bytes. */\nexport function fromHex0x(hex: string): Uint8Array {\n if (!hex.startsWith(\"0x\"))\n throw new Error(`Expected 0x-prefixed hex string, got: ${hex}`);\n return fromHex(hex.slice(2));\n}\n\n/** Decode a `0x`-prefixed hex string into a protocol SHA-256 hash. */\nexport function hashFromHex(hex: string): SHA256Hash {\n return sha256Hash(fromHex0x(hex));\n}\n\n/** Decode a `0x`-prefixed hex string into a contract address. */\nexport function addressFromHex(hex: string): ContractAddress {\n return contractAddress(fromHex0x(hex));\n}\n"],"mappings":";;;;AAKA,MAAM,yBAAyB;;AAS/B,SAAgB,gBAAgB,MAAc,YAAgC;CAC5E,MAAM,SAAA,GAAA,6BAAA,WAAA,CAAmB,MAAM,UAAU;CACzC,IAAI,MAAM,WAAW,YAAY;EAC/B,MAAM,KAAK,CAAC;EACZ,MAAM,IAAI,MAAM,YAAY,WAAW,OAAO;CAChD;CACA,OAAO;AACT;;AAGA,SAAgB,kBAAkB,MAA+B;CAC/D,QAAA,GAAA,uBAAA,gBAAA,CAAuB,gBAAgB,MAAM,EAAE,CAAC;AAClD;;AAGA,SAAgB,eAAe,MAA0B;CACvD,QAAA,GAAA,uBAAA,WAAA,CAAkB,gBAAgB,MAAM,EAAE,CAAC;AAC7C;AAIA,SAAS,SAAS,OAA2B;CAC3C,IAAI,MAAM;CACV,KAAK,MAAM,QAAQ,OAAO;EACxB,OAAO,QAAQ;EACf,KAAK,IAAI,MAAM,GAAG,MAAM,GAAG,OACzB,OAAQ,OAAO,KAAM,MAAM,QAAS,OAAS,MAAM;CAEvD;CACA,OAAO;AACT;AAEA,SAAS,OAAO,OAAmB,SAAyB;CAC1D,IAAI,MAAM,WAAW,IAAI,MAAM,IAAI,MAAM,mBAAmB;CAC5D,MAAM,UAAU,IAAI,WAAW,EAAE;CACjC,IAAI;EACF,QAAQ,KAAK;E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2B;CACjD,OAAO,QAAA,GAAA,uBAAA,MAAA,CAAa,KAAK;AAC3B;;AAGA,SAAgB,UAAU,KAAyB;CACjD,IAAI,CAAC,IAAI,WAAW,IAAI,GACtB,MAAM,IAAI,MAAM,yCAAyC,KAAK;CAChE,QAAA,GAAA,uBAAA,QAAA,CAAe,IAAI,MAAM,CAAC,CAAC;AAC7B;;AAGA,SAAgB,YAAY,KAAyB;CACnD,QAAA,GAAA,uBAAA,WAAA,CAAkB,UAAU,GAAG,CAAC;AAClC;;AAGA,SAAgB,eAAe,KAA8B;CAC3D,QAAA,GAAA,uBAAA,gBAAA,CAAuB,UAAU,GAAG,CAAC;AACvC"}
1
+ {"version":3,"file":"hex-CSDZ9d6z.cjs","names":["base32nopad"],"sources":["../src/encoding.ts","../src/actions/hex.ts"],"sourcesContent":["import { base32nopad } from \"@scure/base\";\nimport { fromBase58 } from \"@thruputchain/protocol/utils\";\nimport { contractAddress, sha256Hash } from \"@thruputchain/protocol\";\nimport type { ContractAddress, SHA256Hash } from \"@thruputchain/protocol\";\n\nconst ADDRESS_STRKEY_VERSION = 25 << 3;\n\nexport {\n toBase58,\n fromBase58,\n maxBase58Length,\n} from \"@thruputchain/protocol/utils\";\n\n/** Decode exactly the expected number of bytes, with no format fallback. */\nexport function fixedFromBase58(text: string, byteLength: number): Uint8Array {\n const bytes = fromBase58(text, byteLength);\n if (bytes.length !== byteLength) {\n bytes.fill(0);\n throw new Error(`Expected ${byteLength} bytes`);\n }\n return bytes;\n}\n\n/** Decode a canonical base58 Thruput address, without account derivation. */\nexport function addressFromBase58(text: string): ContractAddress {\n return contractAddress(fixedFromBase58(text, 32));\n}\n\n/** Decode a canonical base58 SHA-256 hash. */\nexport function hashFromBase58(text: string): SHA256Hash {\n return sha256Hash(fixedFromBase58(text, 32));\n}\n\n// SEP-23 CRC16-XModem: polynomial 0x1021, initial value zero, little-endian\n// checksum bytes. This is typo detection, not cryptographic authentication.\nfunction checksum(bytes: Uint8Array): number {\n let crc = 0;\n for (const byte of bytes) {\n crc ^= byte << 8;\n for (let bit = 0; bit < 8; bit++) {\n crc = ((crc << 1) ^ (crc & 0x8000 ? 0x1021 : 0)) & 0xffff;\n }\n }\n return crc;\n}\n\nfunction strkey(bytes: Uint8Array, version: number): string {\n if (bytes.length !== 32) throw new Error(\"Expected 32 bytes\");\n const encoded = new Uint8Array(35);\n try {\n encoded[0] = version;\n encoded.set(bytes, 1);\n const crc = checksum(encoded.subarray(0, 33));\n encoded[33] = crc & 0xff;\n encoded[34] = crc >>> 8;\n return base32nopad.encode(encoded);\n } finally {\n encoded.fill(0);\n }\n}\n\nfunction parseTyped(text: string, version: number, prefix: string): Uint8Array {\n // A 32-byte base58 value is at most 44 characters. Z/G/S StrKeys have 56.\n // Dispatch by full length, never by a prefix that valid base58 can share.\n if (typeof text === \"string\" && text.length === 56) {\n let decoded: Uint8Array | undefined;\n try {\n decoded = base32nopad.decode(text);\n if (\n decoded.length === 35 &&\n decoded[0] === version &&\n base32nopad.encode(decoded) === text &&\n checksum(decoded.subarray(0, 33)) ===\n (decoded[33]! | (decoded[34]! << 8))\n ) {\n return decoded.slice(1, 33);\n }\n } catch {\n // Return the same redacted error for malformed and wrong-type StrKeys.\n } finally {\n decoded?.fill(0);\n }\n } else {\n try {\n return fixedFromBase58(text, 32);\n } catch {\n // Do not expose input (which may be a secret seed) in errors.\n }\n }\n throw new Error(\n `Expected a 32-byte base58 value or a valid ${prefix} StrKey`,\n );\n}\n\n/**\n * Parse human address input: base58 or Thruput Z StrKey, without account derivation.\n * Stellar C addresses are rejected. Z does not identify a specific Thruput network.\n */\nexport function parseAddress(text: string): ContractAddress {\n return contractAddress(parseTyped(text, ADDRESS_STRKEY_VERSION, \"Z\"));\n}\n\n/** Parse human Ed25519 key input: base58 or G StrKey, never a wallet address. */\nexport function parsePublicKey(text: string): Uint8Array {\n return parseTyped(text, 6 << 3, \"G\");\n}\n\n/**\n * Explicitly import a 32-byte Ed25519 seed from base58 or S StrKey.\n * Callers must clear returned bytes after use. JavaScript input strings cannot\n * be reliably erased; do not log or persist them in diagnostics.\n */\nexport function parseSecretSeed(text: string): Uint8Array {\n return parseTyped(text, 18 << 3, \"S\");\n}\n\n/** Render address bytes as a Thruput Z StrKey, without a specific network identity. */\nexport function addressToStrkey(bytes: Uint8Array): string {\n return strkey(bytes, ADDRESS_STRKEY_VERSION);\n}\n\n/** Render an Ed25519 public key as a G StrKey, without deriving an address. */\nexport function publicKeyToStrkey(bytes: Uint8Array): string {\n return strkey(bytes, 6 << 3);\n}\n\n/** Explicitly export a seed as an S StrKey. Treat the returned string as secret. */\nexport function secretSeedToStrkey(bytes: Uint8Array): string {\n return strkey(bytes, 18 << 3);\n}\n","import type { SHA256Hash, ContractAddress } from \"@thruputchain/protocol\";\nimport {\n toHex,\n fromHex,\n sha256Hash,\n contractAddress,\n} from \"@thruputchain/protocol\";\n\nexport { toHex, fromHex } from \"@thruputchain/protocol\";\n\n/** Convert bytes to a `0x`-prefixed lowercase hex string. */\nexport function toHex0x(bytes: Uint8Array): string {\n return \"0x\" + toHex(bytes);\n}\n\n/** Decode a `0x`-prefixed hex string into bytes. */\nexport function fromHex0x(hex: string): Uint8Array {\n if (!hex.startsWith(\"0x\"))\n throw new Error(`Expected 0x-prefixed hex string, got: ${hex}`);\n return fromHex(hex.slice(2));\n}\n\n/** Decode a `0x`-prefixed hex string into a protocol SHA-256 hash. */\nexport function hashFromHex(hex: string): SHA256Hash {\n return sha256Hash(fromHex0x(hex));\n}\n\n/** Decode a `0x`-prefixed hex string into a contract address. */\nexport function addressFromHex(hex: string): ContractAddress {\n return contractAddress(fromHex0x(hex));\n}\n"],"mappings":";;;;AAKA,MAAM,yBAAyB;;AAS/B,SAAgB,gBAAgB,MAAc,YAAgC;CAC5E,MAAM,SAAA,GAAA,6BAAA,WAAA,CAAmB,MAAM,UAAU;CACzC,IAAI,MAAM,WAAW,YAAY;EAC/B,MAAM,KAAK,CAAC;EACZ,MAAM,IAAI,MAAM,YAAY,WAAW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IAAI;EACF,OAAO,gBAAgB,MAAM,EAAE;CACjC,QAAQ,CAER;CAEF,MAAM,IAAI,MACR,8CAA8C,OAAO,QACvD;AACF;;;;;AAMA,SAAgB,aAAa,MAA+B;CAC1D,QAAA,GAAA,uBAAA,gBAAA,CAAuB,WAAW,MAAM,wBAAwB,GAAG,CAAC;AACtE;;AAGA,SAAgB,eAAe,MAA0B;CACvD,OAAO,WAAW,MAAM,IAAQ,GAAG;AACrC;;;;;;AAOA,SAAgB,gBAAgB,MAA0B;CACxD,OAAO,WAAW,MAAM,KAAS,GAAG;AACtC;;AAGA,SAAgB,gBAAgB,OAA2B;CACzD,OAAO,OAAO,OAAO,sBAAsB;AAC7C;;AAGA,SAAgB,kBAAkB,OAA2B;CAC3D,OAAO,OAAO,OAAO,EAAM;AAC7B;;AAGA,SAAgB,mBAAmB,OAA2B;CAC5D,OAAO,OAAO,OAAO,GAAO;AAC9B;;;;ACtHA,SAAgB,QAAQ,OAA2B;CACjD,OAAO,QAAA,GAAA,uBAAA,MAAA,CAAa,KAAK;AAC3B;;AAGA,SAAgB,UAAU,KAAyB;CACjD,IAAI,CAAC,IAAI,WAAW,IAAI,GACtB,MAAM,IAAI,MAAM,yCAAyC,KAAK;CAChE,QAAA,GAAA,uBAAA,QAAA,CAAe,IAAI,MAAM,CAAC,CAAC;AAC7B;;AAGA,SAAgB,YAAY,KAAyB;CACnD,QAAA,GAAA,uBAAA,WAAA,CAAkB,UAAU,GAAG,CAAC;AAClC;;AAGA,SAAgB,eAAe,KAA8B;CAC3D,QAAA,GAAA,uBAAA,gBAAA,CAAuB,UAAU,GAAG,CAAC;AACvC"}
@@ -1,7 +1,6 @@
1
- import { Ft as TransportRequestOptions } from "./client-jOZxB8yW.cjs";
2
- import { $t as WaitForTransactionReceiptOptions, E as AirdropActions, Kt as RequestAirdropOptions, a as ContractCall, k as CoreThruputClient, sn as AirdropSucceeded, un as BalanceResponse } from "./readViews-DbWELMMq.cjs";
3
- import { F as WalletAccount, N as PubkeyAccount, P as SourceAddressAccount, T as DeploymentOptions, _ as WalletBatchExecutionRequest, a as SubmissionEvidence, k as PrepareTransactionRequest, r as ExecutionResult, t as CallResults, v as WalletExecutionRequest, w as ContractDeployment, y as WalletInvocationAdapter } from "./execution-J5jkXhV1.cjs";
4
- import { A as WalletProvider, D as SubmitTransactionResult, E as SignTransactionResult, O as WalletAccount$1, k as WalletCapabilities } from "./index-CIHK7Ew9.cjs";
1
+ import { $ as AirdropActions, Fn as BalanceResponse, Mn as AirdropSucceeded, N as ContractCall, b as SubmissionEvidence, cn as TransportRequestOptions, nt as CoreThruputClient, t as RequestAirdropOptions, wn as WaitForTransactionReceiptOptions } from "./requestAirdrop-DBCOST2B.js";
2
+ import { a as WalletCapabilities, i as WalletAccount, n as SignTransactionResult, o as WalletProvider, r as SubmitTransactionResult } from "./types-VYjJcTip.js";
3
+ import { D as WalletAccount$1, E as SourceAddressAccount, T as PubkeyAccount, _ as DeploymentOptions, d as WalletInvocationAdapter, g as ContractDeployment, l as WalletBatchExecutionRequest, n as ExecutionResult, t as CallResults, u as WalletExecutionRequest, x as PrepareTransactionRequest } from "./execution-uiuFPV0d.js";
5
4
  import { ContractAddress, GasAmount, NetworkHash, SHA256Hash, SignedTransaction, Transaction } from "@thruputchain/protocol";
6
5
 
7
6
  //#region src/wallet/providerClient.d.ts
@@ -9,7 +8,7 @@ import { ContractAddress, GasAmount, NetworkHash, SHA256Hash, SignedTransaction,
9
8
  type PrepareBatchExecutionRequest = WalletBatchExecutionRequest & Omit<PrepareExecutionRequest, "invocation">;
10
9
  /** Exact signed evidence available before broadcasting. Persist on the original network. */
11
10
  interface PendingWalletTransaction extends SignTransactionResult {
12
- readonly account: WalletAccount$1;
11
+ readonly account: WalletAccount;
13
12
  readonly networkHash: string;
14
13
  }
15
14
  /** Lifecycle controls. Cancellation can prevent dispatch; it never cancels a broadcast already sent. */
@@ -37,18 +36,21 @@ interface CreateProviderWalletClientOptions {
37
36
  /** Live external provider with an already authorized session. */
38
37
  provider: WalletProvider;
39
38
  /** Wire pubkey account from the provider subpath, snapshotted at construction. */
40
- account: WalletAccount$1;
39
+ account: WalletAccount;
41
40
  /** Trusted application network identity: 32-byte base58; must match the session exactly. */
42
41
  networkHash: string;
43
42
  }
44
43
  /**
45
44
  * Explicit prepare/sign/persist/submit flow without access to a raw signer.
46
- * Allows one in-flight operation; concurrent calls fail with code -32002. Checks
45
+ * Errors are `ThruputError`s with named codes: provider code 4001 becomes
46
+ * `userRejected`, and the others become `wallet*` codes, with the wire code in
47
+ * `context.providerCode`. Allows one in-flight operation; concurrent calls fail
48
+ * with code `walletRequestPending` (provider code -32002). Checks
47
49
  * `getSession` before each operation and permanently invalidates on every `change`,
48
50
  * a failed session read, or a mismatched session. Dispose and recreate after a
49
51
  * change or reconnect; there is no automatic reconnect or retry.
50
52
  *
51
- * @see https://docs.thruput.network/tools/wallet-integration/
53
+ * @see https://www.thruput.network/docs/typescript/wallet-integration/
52
54
  */
53
55
  interface ProviderWalletClient {
54
56
  /** Prepare a root deployment, preserving the explicit signing boundary. */
@@ -63,7 +65,7 @@ interface ProviderWalletClient {
63
65
  executeCallsAndWait<T extends readonly ContractCall[]>(request: ExecuteCallsRequest<T>, options: ProviderExecutionOptions): Promise<ExecutionResult & {
64
66
  values: CallResults<T>;
65
67
  }>;
66
- /** Read fresh account/network capabilities; only 4200 falls back to unsupported. */
68
+ /** Read fresh account/network capabilities; only provider code 4200 falls back to unsupported. */
67
69
  getCapabilities(): Promise<WalletCapabilities>;
68
70
  /** Prepare one atomic batch after checking support. Does not sign or submit. */
69
71
  prepareBatchExecution(request: PrepareBatchExecutionRequest): Promise<Transaction>;
@@ -92,10 +94,11 @@ interface ProviderWalletClient {
92
94
  * fails; the adapter never retries. Returns a broadcast acknowledgement, not an
93
95
  * execution receipt, and verifies its hash against the approved result.
94
96
  *
95
- * Treat a submit failure as potentially broadcast. Keep the previously persisted
96
- * hash and query status/receipt on the original network; do not automatically
97
- * prepare, sign, or execute a replacement transaction. A timeout, session change,
98
- * or invalid response can occur after broadcast. See the factory's persistence example.
97
+ * Every failure has `transaction` facts. When `transaction.outcome` is
98
+ * `unknown`, the bytes may have been broadcast: keep the persisted hash and
99
+ * query status/receipt on the original network; do not automatically prepare,
100
+ * sign, or execute a replacement transaction. A timeout, session change, or
101
+ * invalid response can occur after broadcast. See the factory's persistence example.
99
102
  */
100
103
  submitTransaction(signed: SignTransactionResult): Promise<SubmitTransactionResult>;
101
104
  /**
@@ -171,8 +174,8 @@ interface ProviderWalletClient {
171
174
  * }
172
175
  * ```
173
176
  *
174
- * @see https://docs.thruput.network/tools/wallet-integration/
175
- * @see https://docs.thruput.network/tools/wallet-provider/
177
+ * @see https://www.thruput.network/docs/typescript/wallet-integration/
178
+ * @see https://www.thruput.network/docs/typescript/reference/wallet-provider/
176
179
  */
177
180
  declare function createProviderWalletClient(options: CreateProviderWalletClientOptions): ProviderWalletClient;
178
181
  //#endregion
@@ -182,7 +185,7 @@ type WalletRequestAirdropOptions = Omit<RequestAirdropOptions, "recipient"> & {
182
185
  readonly recipient?: ContractAddress;
183
186
  };
184
187
  /** Signer-bound transaction and account actions. */
185
- interface WalletActions<TAccount extends WalletAccount = WalletAccount> {
188
+ interface WalletActions<TAccount extends WalletAccount$1 = WalletAccount$1> {
186
189
  readonly account: TAccount;
187
190
  getBalance(request?: {
188
191
  address?: Uint8Array;
@@ -220,9 +223,9 @@ interface WalletAirdropActions {
220
223
  requestAirdrop(options?: WalletRequestAirdropOptions): Promise<AirdropSucceeded>;
221
224
  }
222
225
  /** Existing client methods plus signer-bound wallet actions. */
223
- type WalletClient<TClient extends CoreThruputClient, TAccount extends WalletAccount = WalletAccount> = Omit<TClient, "getBalance" | "requestAirdrop" | "account" | "prepareTransaction" | "signTransaction" | "sendInvocation" | "prepareExecution" | "execute"> & WalletActions<TAccount> & (TClient extends AirdropActions ? WalletAirdropActions : object);
226
+ type WalletClient<TClient extends CoreThruputClient, TAccount extends WalletAccount$1 = WalletAccount$1> = Omit<TClient, "getBalance" | "requestAirdrop" | "account" | "prepareTransaction" | "signTransaction" | "sendInvocation" | "prepareExecution" | "execute"> & WalletActions<TAccount> & (TClient extends AirdropActions ? WalletAirdropActions : object);
224
227
  /** Wallet client with adapter-aware inner invocation execution. */
225
- type ExecutableWalletClient<TClient extends CoreThruputClient, TAccount extends WalletAccount = WalletAccount, TRequest extends WalletExecutionRequest = WalletExecutionRequest> = WalletClient<TClient, TAccount> & WalletExecutionActions<TRequest>;
228
+ type ExecutableWalletClient<TClient extends CoreThruputClient, TAccount extends WalletAccount$1 = WalletAccount$1, TRequest extends WalletExecutionRequest = WalletExecutionRequest> = WalletClient<TClient, TAccount> & WalletExecutionActions<TRequest>;
226
229
  /** Signing-network input inferred from whether a client has validated identity. */
227
230
  type WalletNetworkOptions<TClient extends CoreThruputClient> = TClient extends {
228
231
  readonly network: {
@@ -234,7 +237,7 @@ type WalletNetworkOptions<TClient extends CoreThruputClient> = TClient extends {
234
237
  /** Signing network required when the client has no validated identity. */readonly networkHash: NetworkHash;
235
238
  };
236
239
  /** Decorate an existing client with signer-bound wallet behavior. */
237
- declare function createWalletClient<TClient extends CoreThruputClient, TAccount extends WalletAccount, TRequest extends WalletExecutionRequest>(options: {
240
+ declare function createWalletClient<TClient extends CoreThruputClient, TAccount extends WalletAccount$1, TRequest extends WalletExecutionRequest>(options: {
238
241
  readonly client: TClient;
239
242
  readonly account: TAccount;
240
243
  readonly onSigned?: (submission: SubmissionEvidence) => void | Promise<void>;
@@ -252,7 +255,7 @@ declare function createWalletClient<TClient extends CoreThruputClient, TAccount
252
255
  readonly onSigned?: (submission: SubmissionEvidence) => void | Promise<void>;
253
256
  readonly invocationAdapter?: undefined;
254
257
  } & WalletNetworkOptions<TClient>): WalletClient<TClient, TAccount>;
255
- declare function createWalletClient<TClient extends CoreThruputClient, TAccount extends WalletAccount>(options: {
258
+ declare function createWalletClient<TClient extends CoreThruputClient, TAccount extends WalletAccount$1>(options: {
256
259
  readonly client: TClient;
257
260
  readonly account: TAccount;
258
261
  readonly onSigned?: (submission: SubmissionEvidence) => void | Promise<void>;
@@ -260,4 +263,4 @@ declare function createWalletClient<TClient extends CoreThruputClient, TAccount
260
263
  } & WalletNetworkOptions<TClient>): WalletClient<TClient, TAccount>;
261
264
  //#endregion
262
265
  export { WalletClient as a, WalletRequestAirdropOptions as c, ExecuteCallsRequest as d, PendingWalletTransaction as f, createProviderWalletClient as g, ProviderWalletClient as h, WalletAirdropActions as i, createWalletClient as l, ProviderExecutionOptions as m, PrepareExecutionRequest as n, WalletExecutionActions as o, PrepareBatchExecutionRequest as p, WalletActions as r, WalletNetworkOptions as s, ExecutableWalletClient as t, CreateProviderWalletClientOptions as u };
263
- //# sourceMappingURL=index-soFVQX9j.d.cts.map
266
+ //# sourceMappingURL=index-B1efA-Y_.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-B1efA-Y_.d.ts","names":[],"sources":["../src/wallet/providerClient.ts","../src/wallet/client.ts"],"mappings":";;;;;;;KAyEY,4BAAA,GAA+B,2BAAA,GACzC,IAAA,CAAK,uBAAA;;UAGU,wBAAA,SAAiC,qBAAqB;EAAA,SAC5D,OAAA,EAAS,aAAA;EAAA,SACT,WAAA;AAAA;;UAIM,wBAAA;EATa;EAW5B,QAAA,GAAW,OAAA,EAAS,wBAAA,YAAoC,OAAA;EARzC;EAUf,IAAA,GAAO,gCAAA;AAAA;;UAIQ,mBAAA,oBAAuC,YAAA;EACtD,KAAA,EAAO,CAAA;EACP,QAAA,EAAU,SAAA;EACV,iBAAA,GAAoB,uBAAA;EACpB,YAAA;AAAA;AAZF;AAAA,UAgBiB,iCAAA;;;;;;EAMf,MAAA,EAAQ,iBAAA;EApBR;EAsBA,QAAA,EAAU,cAAA;EAtBC;EAwBX,OAAA,EAAS,aAAA;EAtBT;EAwBA,WAAA;AAAA;AAxBuC;AAIzC;;;;;;;;;;;AAJyC,UAuCxB,oBAAA;EAlCR;EAoCP,iBAAA,CACE,UAAA,EA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AA;AAAA,IACP,oBAAA,CAAqB,OAAA,IACxB,YAAA,CAAa,OAAA,EAAS,QAAA;AAAA,iBACT,kBAAA,iBACE,iBAAA,mBACC,eAAA,EAEjB,OAAA;EAAA,SACW,MAAA,EAAQ,OAAA;EAAA,SACR,OAAA,EAAS,QAAA;EAAA,SACT,QAAA,IACP,UAAA,EAAY,kBAAA,YACF,OAAA;EAAA,SACH,iBAAA;AAAA,IACP,oBAAA,CAAqB,OAAA,IACxB,YAAA,CAAa,OAAA,EAAS,QAAA"}
@@ -1,37 +1,6 @@
1
- import { Ft as TransportRequestOptions, Mt as UnsupportedRpcValue, Nt as RpcParams, Pt as Transport, U as RpcErrorData } from "./client-jOZxB8yW.js";
1
+ import { Wi as UnsupportedRpcValue, cn as TransportRequestOptions, on as RpcParams, ri as RpcErrorData, sn as Transport } from "./requestAirdrop-T1eVn3l5.cjs";
2
2
 
3
3
  //#region src/transport/http.d.ts
4
- /**
5
- * Error thrown when a JSON-RPC response contains an `error` object.
6
- *
7
- * Malformed envelopes throw `RpcResponseError`, preserving the raw reply.
8
- */
9
- declare class JsonRpcError extends Error {
10
- /** JSON-RPC numeric error code. */
11
- code: number;
12
- /** Optional JSON-RPC error data returned by the gateway. */
13
- data?: unknown;
14
- /** JSON-RPC method associated with the failed request, when known. */
15
- method?: string;
16
- /** Complete original JSON-RPC error object, including additive fields. */
17
- readonly raw: unknown;
18
- readonly rpcMessage: string;
19
- constructor(code: number, message: string, data?: unknown, method?: string, raw?: unknown);
20
- }
21
- /** Error thrown when an HTTP response has a non-successful status. */
22
- declare class HttpResponseError extends Error {
23
- readonly endpoint?: string | undefined;
24
- readonly method?: string | undefined;
25
- readonly status: number;
26
- readonly statusText: string;
27
- constructor(status: number, statusText: string, endpoint?: string | undefined, method?: string | undefined);
28
- }
29
- /** Network failure with sanitized endpoint and method context. */
30
- declare class HttpRequestError extends TypeError {
31
- readonly endpoint: string;
32
- readonly method: string;
33
- constructor(endpoint: string, method: string, cause: unknown);
34
- }
35
4
  /** Limits for opt-in HTTP JSON-RPC batching. */
36
5
  interface HttpBatchOptions {
37
6
  /** Maximum calls per HTTP request (1–1,000). Defaults to 100. Full batches send immediately. */
@@ -70,7 +39,9 @@ interface HttpTransportOptions {
70
39
  *
71
40
  * `HttpTransport` handles request IDs, JSON-RPC envelopes, optional custom
72
41
  * headers, optional timeout cancellation, and conversion of JSON-RPC error
73
- * responses into {@link JsonRpcError}.
42
+ * responses into `ThruputError` with code `rpcError`. Network failures use
43
+ * `httpRequestFailed`, failed HTTP statuses use `httpResponseError`, and
44
+ * malformed replies use `rpcResponseInvalid`.
74
45
  *
75
46
  * @example
76
47
  * ```ts
@@ -105,11 +76,12 @@ type ReadErrorKind = "transient" | "permanent" | "cancelled" | "unknown";
105
76
  * Classify an infrastructure read failure without replacing the original error.
106
77
  *
107
78
  * Pass the caller's signal to distinguish explicit cancellation from a transport
108
- * timeout. Plain Error wrappers are inspected through their causes; domain errors
109
- * and unrecognized failures remain unknown. A bare TypeError is not evidence of
110
- * a network failure. Custom transports should use HttpRequestError for that case.
111
- * Transaction-not-found remains operation-specific rather than a general retry.
112
- * This classification never authorizes transaction resubmission.
79
+ * timeout. Plain Error wrappers are inspected through their causes; other
80
+ * `ThruputError` codes and unrecognized failures remain unknown. A bare TypeError
81
+ * is not evidence of a network failure. Custom transports should throw code
82
+ * `httpRequestFailed` for that case. Transaction-not-found remains
83
+ * operation-specific rather than a general retry. This classification never
84
+ * authorizes transaction resubmission.
113
85
  */
114
86
  declare function classifyReadError(error: unknown, options?: TransportRequestOptions): ReadErrorKind;
115
87
  //#endregion
@@ -138,27 +110,5 @@ declare const NativeRpcErrorCode: {
138
110
  readonly TransactionRejected: -32001;
139
111
  };
140
112
  //#endregion
141
- //#region src/rpc/errorReader.d.ts
142
- type DecodedRpcError = {
143
- classification: "known";
144
- data: RpcErrorData;
145
- raw: unknown;
146
- } | {
147
- classification: "unclassified";
148
- raw: unknown;
149
- };
150
- /** A native RPC failure retains the transport error and a conservative typed interpretation. */
151
- declare class NativeRpcError extends JsonRpcError {
152
- readonly decoded: DecodedRpcError;
153
- constructor(error: JsonRpcError, method: string, expectedTransactionHash?: Uint8Array);
154
- }
155
- //#endregion
156
- //#region src/transport/responseError.d.ts
157
- /** Malformed JSON-RPC reply after dispatch. Raw data is retained; write outcome is unknown. */
158
- declare class RpcResponseError extends Error {
159
- readonly raw: unknown;
160
- constructor(message: string, raw: unknown);
161
- }
162
- //#endregion
163
- export { TxInvalidDetail as a, classifyReadError as c, HttpRequestError as d, HttpResponseError as f, JsonRpcError as h, NativeRpcErrorCode as i, MockTransport as l, HttpTransportOptions as m, DecodedRpcError as n, txInvalidDetail as o, HttpTransport as p, NativeRpcError as r, ReadErrorKind as s, RpcResponseError as t, HttpBatchOptions as u };
164
- //# sourceMappingURL=index-C3HVRvQd.d.ts.map
113
+ export { classifyReadError as a, HttpTransport as c, ReadErrorKind as i, HttpTransportOptions as l, TxInvalidDetail as n, MockTransport as o, txInvalidDetail as r, HttpBatchOptions as s, NativeRpcErrorCode as t };
114
+ //# sourceMappingURL=index-BGmH_Sm7.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BGmH_Sm7.d.cts","names":[],"sources":["../src/transport/http.ts","../src/transport/mock.ts","../src/transport/readError.ts","../src/transport/txInvalidDetail.ts","../src/rpc/errors.ts"],"mappings":";;;;UAWiB,gBAAA;EAAA;EAEf,OAAA;;EAEA,MAAM;AAAA;AAIR;AAAA,UAAiB,oBAAA;;EAEf,OAAA,GAAU,MAAA;EAGK;EAAf,KAAA,UAAe,KAAA;EAqBmB;EAlBlC,SAAA;EANA;;;;;;;;AAwBkC;AAuBpC;;;;;;;EAvBE,KAAA,aAAkB,gBAAA;AAAA;;;;;;;;;;;;;;;;;;;AA0DN;;cAnCD,aAAA,YAAyB,SAAA;EAAA;ECnCzB;cD4CC,GAAA,UAAa,OAAA,GAAS,oBAAA;EC5CT;EDkEnB,OAAA,cACJ,MAAA,UACA,MAAA,GAAS,SAAA,EACT,OAAA,GAAS,uBAAA,GACR,OAAA,CAAQ,CAAA;AAAA;;;;cCtEA,aAAA,YAAyB,SAAA;EAAA;EAG9B,OAAA,cACJ,MAAA,UACA,MAAA,GAAQ,SAAA,EACR,OAAA,GAAU,uBAAA,GACT,OAAA,CAAQ,CAAA;AAAA;;;;KCpCD,aAAA;AFOZ;;;;AAIQ;AAIR;;;;;;AARA,iBEMgB,iBAAA,CACd,KAAA,WACA,OAAA,GAAS,uBAAA,GACR,aAAa;;;;KCbJ,eAAA,GAAkB,OAAA,CAC5B,WAAA,CAAY,OAAA,CAAQ,YAAA;EAAgB,IAAA;AAAA,eACpC,mBAAA;;iBAGc,eAAA,CAAgB,KAAA,YAAiB,eAAe;;;;cCVnD,kBAAA;EAAA"}
@@ -1,7 +1,6 @@
1
- import { F as RpcContractDeploymentResult, Ft as TransportRequestOptions, Mt as UnsupportedRpcValue, V as RpcEffectiveContractResult, t as RpcClient } from "./client-jOZxB8yW.js";
2
- import { Ot as ContractSpec, k as CoreThruputClient } from "./readViews-nV3jbpYc.js";
3
- import { t as ContractArtifactSpec } from "./artifact-BM_MVzhL.js";
4
- import { F as WalletAccount, a as SubmissionEvidence, k as PrepareTransactionRequest } from "./execution-XJ0iwFaX.js";
1
+ import { Bt as ContractSpec, Wi as UnsupportedRpcValue, Yr as RpcContractDeploymentResult, b as SubmissionEvidence, cn as TransportRequestOptions, i as RpcClient, nt as CoreThruputClient, ti as RpcEffectiveContractResult } from "./requestAirdrop-DBCOST2B.js";
2
+ import { t as ContractArtifactSpec } from "./artifact-RIAPVmVX.js";
3
+ import { D as WalletAccount, x as PrepareTransactionRequest } from "./execution-uiuFPV0d.js";
5
4
  import { Invocation, NetworkHash, SHA256Hash, SignedTransaction, Transaction } from "@thruputchain/protocol";
6
5
 
7
6
  //#region src/actions/public/getContractSpec.d.ts
@@ -46,7 +45,8 @@ interface WalletRequests {
46
45
  /**
47
46
  * Interpret a known DefaultWallet root using built-in binding descriptors.
48
47
  * Call only after identifying the root as DefaultWallet; matching selectors
49
- * alone do not establish wallet identity. Malformed recognized inputs throw.
48
+ * alone do not establish wallet identity. Malformed recognized inputs throw,
49
+ * as does an `execute` that mints or forwards auth tokens.
50
50
  */
51
51
  declare function decodeDefaultWalletRequests(root: Invocation): WalletRequests | null;
52
52
  //#endregion
@@ -73,9 +73,11 @@ declare function readTransactionInput(client: RpcClient, request: {
73
73
  //#region src/actions/wallet/sendTransaction.d.ts
74
74
  /**
75
75
  * Serialize and submit once through the native RPC boundary.
76
- * Unknown admission throws TransactionObservationError with the signed bytes and
77
- * destination discovery network; that network does not prove the signing network
78
- * of an already-signed envelope. RPC and transport failures propagate unchanged.
76
+ * Every failure has `transaction` facts with the signed bytes and destination
77
+ * discovery network; that network does not prove the signing network of an
78
+ * already-signed envelope. Unknown admission throws code
79
+ * `transactionAdmissionUnsupported`. RPC and transport failures keep their
80
+ * code, with outcome `unknown`, or `notSubmitted` for a local request error.
79
81
  */
80
82
  declare function sendTransaction(client: Pick<RpcClient, "sendTransaction" | "discovery">, signedTx: SignedTransaction, options?: TransportRequestOptions): Promise<SHA256Hash>;
81
83
  //#endregion
@@ -87,4 +89,4 @@ declare function sendInvocation(client: Pick<CoreThruputClient, "getChainTip" |
87
89
  }): Promise<SHA256Hash>;
88
90
  //#endregion
89
91
  export { WalletRequests as a, getEffectiveContractSpec as c, readTransactionInput as i, ContractSpecResult as l, sendTransaction as n, decodeDefaultWalletRequests as o, VerifiedTransactionInput as r, EffectiveContractSpecResult as s, sendInvocation as t, getContractSpec as u };
90
- //# sourceMappingURL=index-Bb01ytjJ.d.ts.map
92
+ //# sourceMappingURL=index-BZ5j5P5d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BZ5j5P5d.d.ts","names":[],"sources":["../src/actions/public/getContractSpec.ts","../src/actions/public/getEffectiveContractSpec.ts","../src/actions/public/decodeWalletRequests.ts","../src/actions/public/readTransactionInput.ts","../src/actions/wallet/sendTransaction.ts","../src/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AA;EACE,MAAA,GAAS,WAAA;EACT,QAAA,IAAY,QAAA,EAAU,kBAAA,YAA8B,OAAA;AAAA,IAErD,OAAA,CAAQ,UAAA"}
@@ -1,4 +1,4 @@
1
- import { A as ThruputClient, Ft as ContractTypeDef, Ot as ContractSpec, Pt as ContractType, l as ContractMethod, y as ContractViewOptions } from "./readViews-DbWELMMq.cjs";
1
+ import { Bt as ContractSpec, K as ContractViewOptions, Kt as ContractType, R as ContractMethod, qt as ContractTypeDef, rt as ThruputClient } from "./requestAirdrop-T1eVn3l5.cjs";
2
2
  import { Calldata, Contract, ContractAddress, Invocation, SHA256Hash } from "@thruputchain/protocol";
3
3
  import { FixedArray, FixedBytes as FixedBytes$1, XdrCodec, fixedArray, fixedBytes } from "@thruputchain/xdr";
4
4
 
@@ -102,16 +102,6 @@ declare function hashContract(contract: Contract): SHA256Hash;
102
102
  */
103
103
  declare function deriveContractAddress(deployer: ContractAddress, nonce: SHA256Hash, contractHash: SHA256Hash): ContractAddress;
104
104
  //#endregion
105
- //#region src/contract/errors.d.ts
106
- /** Error raised when contract bytes do not match their declared ABI type. */
107
- declare class ContractDecodeError extends Error {
108
- constructor(message: string, options?: ErrorOptions);
109
- }
110
- /** Retrieved bytes or response metadata failed identity/canonical validation. */
111
- declare class ContractVerificationError extends Error {
112
- constructor(message: string, options?: ErrorOptions);
113
- }
114
- //#endregion
115
105
  //#region src/contract/signedToken.d.ts
116
106
  declare const signedTokenPreimageBrand: unique symbol;
117
107
  /**
@@ -160,5 +150,5 @@ declare function getContract<T extends Record<string, ContractMethod<any, unknow
160
150
  client: Pick<ThruputClient, "simulateInvocation">;
161
151
  }): ContractInstance<T>;
162
152
  //#endregion
163
- export { SpecDecodedCall as _, BoundContractMethod as a, encodeCalldata as b, SignedToken as c, ContractDecodeError as d, ContractVerificationError as f, SpecDeclaredException as g, buildNamedCodecs as h, fixedBytes as i, isSignedToken as l, hashContract as m, FixedBytes$1 as n, ContractInstance as o, deriveContractAddress as p, fixedArray as r, getContract as s, FixedArray as t, signedToken as u, createContractCallDecoder as v, resolveCodec as x, decodeCalldata as y };
164
- //# sourceMappingURL=index-CedOvhGY.d.cts.map
153
+ export { decodeCalldata as _, BoundContractMethod as a, SignedToken as c, deriveContractAddress as d, hashContract as f, createContractCallDecoder as g, SpecDecodedCall as h, fixedBytes as i, isSignedToken as l, SpecDeclaredException as m, FixedBytes$1 as n, ContractInstance as o, buildNamedCodecs as p, fixedArray as r, getContract as s, FixedArray as t, signedToken as u, encodeCalldata as v, resolveCodec as y };
154
+ //# sourceMappingURL=index-BfYEEVHm.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BfYEEVHm.d.cts","names":[],"sources":["../src/contract/encode.ts","../src/contract/specMethod.ts","../src/contract/codegen.ts","../src/contract/hash.ts","../src/derivation/contractAddress.ts","../src/contract/signedToken.ts","../src/contract/instance.ts"],"mappings":";;;;;;AAuKA;;;;;iBAAgB,YAAA,CACd,EAAA,EAAI,YAAA,EACJ,WAAA,GAAc,MAAA,SAAe,QAAA,aAC5B,QAAA;;;;;;;;;;;AAAQ;AAoKX;;;;;;;iBAAgB,cAAA,CACd,IAAA,EAAM,YAAA,EACN,aAAA,UACA,UAAA,UACA,IAAA,aACA,WAAA,EAAa,MAAA,SAAe,QAAA,aAC3B,QAAA;;;;;;;iBAwBa,cAAA,CACd,IAAA,EAAM,YAAA,EACN,aAAA,UACA,UAAA,UACA,IAAA,EAAM,UAAA,EACN,WAAA,EAAa,MAAA,SAAe,QAAA,aAC3B,MAAA;;;;UCtWc,qBAAA;EACf,IAAA;EACA,QAAA;EACA,IAAA;EACA,KAAA;AAAA;;UAIe,eAAA;EACf,aAAA;EACA,gBAAA;EACA,UAAA;EACA,IAAA,EAAM,MAAA;EACN,MAAA,EAAQ,cAAA,CACN,MAAA,mCAEA,qBAAA;AAAA;;;;;AD8IO;iBCrIK,yBAAA,CACd,IAAA,EAAM,YAAA,IAEN,UAAA,EAAY,IAAA,CAAK,UAAA,iCACd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AA;;;;;;;;;AN6IrB;AAoKX;;;iBMjSgB,WAAA,WAEJ,MAAA,SAAe,cAAA,0BACzB,OAAA;EACA,OAAA,EAAS,CAAA;EACT,OAAA,EAAS,eAAA;EACT,MAAA,EAAQ,IAAA,CAAK,aAAA;AAAA,IACX,gBAAA,CAAiB,CAAA"}
@@ -1,7 +1,6 @@
1
- import { F as RpcContractDeploymentResult, Ft as TransportRequestOptions, Mt as UnsupportedRpcValue, V as RpcEffectiveContractResult, t as RpcClient } from "./client-jOZxB8yW.cjs";
2
- import { Ot as ContractSpec, k as CoreThruputClient } from "./readViews-DbWELMMq.cjs";
3
- import { t as ContractArtifactSpec } from "./artifact-BM_MVzhL.cjs";
4
- import { F as WalletAccount, a as SubmissionEvidence, k as PrepareTransactionRequest } from "./execution-J5jkXhV1.cjs";
1
+ import { Bt as ContractSpec, Wi as UnsupportedRpcValue, Yr as RpcContractDeploymentResult, b as SubmissionEvidence, cn as TransportRequestOptions, i as RpcClient, nt as CoreThruputClient, ti as RpcEffectiveContractResult } from "./requestAirdrop-T1eVn3l5.cjs";
2
+ import { t as ContractArtifactSpec } from "./artifact-RIAPVmVX.cjs";
3
+ import { D as WalletAccount, x as PrepareTransactionRequest } from "./execution-pSt6k620.cjs";
5
4
  import { Invocation, NetworkHash, SHA256Hash, SignedTransaction, Transaction } from "@thruputchain/protocol";
6
5
 
7
6
  //#region src/actions/public/getContractSpec.d.ts
@@ -46,7 +45,8 @@ interface WalletRequests {
46
45
  /**
47
46
  * Interpret a known DefaultWallet root using built-in binding descriptors.
48
47
  * Call only after identifying the root as DefaultWallet; matching selectors
49
- * alone do not establish wallet identity. Malformed recognized inputs throw.
48
+ * alone do not establish wallet identity. Malformed recognized inputs throw,
49
+ * as does an `execute` that mints or forwards auth tokens.
50
50
  */
51
51
  declare function decodeDefaultWalletRequests(root: Invocation): WalletRequests | null;
52
52
  //#endregion
@@ -73,9 +73,11 @@ declare function readTransactionInput(client: RpcClient, request: {
73
73
  //#region src/actions/wallet/sendTransaction.d.ts
74
74
  /**
75
75
  * Serialize and submit once through the native RPC boundary.
76
- * Unknown admission throws TransactionObservationError with the signed bytes and
77
- * destination discovery network; that network does not prove the signing network
78
- * of an already-signed envelope. RPC and transport failures propagate unchanged.
76
+ * Every failure has `transaction` facts with the signed bytes and destination
77
+ * discovery network; that network does not prove the signing network of an
78
+ * already-signed envelope. Unknown admission throws code
79
+ * `transactionAdmissionUnsupported`. RPC and transport failures keep their
80
+ * code, with outcome `unknown`, or `notSubmitted` for a local request error.
79
81
  */
80
82
  declare function sendTransaction(client: Pick<RpcClient, "sendTransaction" | "discovery">, signedTx: SignedTransaction, options?: TransportRequestOptions): Promise<SHA256Hash>;
81
83
  //#endregion
@@ -87,4 +89,4 @@ declare function sendInvocation(client: Pick<CoreThruputClient, "getChainTip" |
87
89
  }): Promise<SHA256Hash>;
88
90
  //#endregion
89
91
  export { WalletRequests as a, getEffectiveContractSpec as c, readTransactionInput as i, ContractSpecResult as l, sendTransaction as n, decodeDefaultWalletRequests as o, VerifiedTransactionInput as r, EffectiveContractSpecResult as s, sendInvocation as t, getContractSpec as u };
90
- //# sourceMappingURL=index-CtjWsAXV.d.cts.map
92
+ //# sourceMappingURL=index-BhOeIyrZ.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BhOeIyrZ.d.cts","names":[],"sources":["../src/actions/public/getContractSpec.ts","../src/actions/public/getEffectiveContractSpec.ts","../src/actions/public/decodeWalletRequests.ts","../src/actions/public/readTransactionInput.ts","../src/actions/wallet/sendTransaction.ts","../src/actions/wallet/sendInvocation.ts"],"mappings":";;;;;;;UAoBiB,kBAAA,SAA2B,2BAA2B;EACrE,YAAA,EAAc,oBAAA;AAAA;;;;;;iBAQM,eAAA,CACpB,MAAA,EAAQ,SAAA,EACR,OAAA;EAAW,OAAA,EAAS,UAAA;AAAA,GACpB,OAAA,GAAU,uBAAA,GACT,OAAA,CAAQ,kBAAA;;;UCVM,2BAAA,SAAoC,0BAAA;EACnD,YAAA,EAAc,oBAAA;EDJoB;ECMlC,eAAA;IAAmB,IAAA;IAAuB,IAAA,EAAM,YAAA;EAAA;AAAA;;ADLd;AAQpC;;;iBCKsB,wBAAA,CACpB,MAAA,EAAQ,SAAA,EACR,OAAA;EAAW,OAAA,EAAS,UAAA;EAAY,OAAA;AAAA,GAChC,OAAA,GAAU,uBAAA,GACT,OAAA,CAAQ,2BAAA;;;;UC1BM,cAAA;EACf,OAAA;EACA,cAAA,EAAgB,UAAU;AAAA;AFM5B;;;;;;AAAA,iBEGgB,2BAAA,CACd,IAAA,EAAM,UAAA,GACL,cAAc;;;;KCRL,wBAAA;EAEN,MAAA;EACA,eAAA,EAAiB,UAAA;EACjB,WAAA;EACA,cAAA,EAAgB,UAAA;EAChB,WAAA,EAAa,WAAA;AAAA;EAEb,MAAA;AAAA,IACF,mBAAA;AHLgC;AAQpC;;;;AARoC,iBGYd,oBAAA,CACpB,MAAA,EAAQ,SAAA,EACR,OAAA;EAAW,eAAA,EAAiB,UAAA;AAAA,GAC5B,OAAA,GAAU,uBAAA,GACT,OAAA,CAAQ,wBAAA;;;;;;AHjBX;;;;;iBIWsB,eAAA,CACpB,MAAA,EAAQ,IAAA,CAAK,SAAA,oCACb,QAAA,EAAU,iBAAA,EACV,OAAA,GAAU,uBAAA,GACT,OAAA,CAAQ,UAAA;;;;iBCGW,cAAA,CACpB,MAAA,EAAQ,IAAA,CACN,iBAAA,uEAGF,OAAA,EAAS,aAAA,EACT,WAAA,EAAa,WAAA,EACb,OAAA,EAAS,yBAAA,EACT,QAAA;EACE,MAAA,GAAS,WAAA;EACT,QAAA,IAAY,QAAA,EAAU,kBAAA,YAA8B,OAAA;AAAA,IAErD,OAAA,CAAQ,UAAA"}
@@ -1,7 +1,7 @@
1
1
  import { t as Signer } from "./types-BE40oD_Q.cjs";
2
2
  import { BlockHeight, ContractAddress, NetworkHash } from "@thruputchain/protocol";
3
- import { FixedBytes } from "@thruputchain/xdr";
4
3
  import { ContractTypeDef } from "@thruputchain/contract-spec";
4
+ import { FixedBytes } from "@thruputchain/xdr";
5
5
 
6
6
  //#region src/signedOp/operation.d.ts
7
7
  /**
@@ -189,4 +189,4 @@ interface SignedOperationPreimage {
189
189
  declare function signedOperationPreimage(preimage: SignedOperationPreimage): Uint8Array;
190
190
  //#endregion
191
191
  export { Operation as a, SignedOperationType as c, DefineSignedOperationOptions as i, defineSignedOperation as l, signedOperationPreimage as n, SignedOperation as o, ContractTypeSelector as r, SignedOperationRequest as s, SignedOperationPreimage as t, randomNonce as u };
192
- //# sourceMappingURL=index-B5KqSHeL.d.cts.map
192
+ //# sourceMappingURL=index-BsvYcU_Y.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-B5KqSHeL.d.cts","names":[],"sources":["../src/signedOp/operation.ts","../src/signedOp/preimage.ts"],"mappings":";;;;;;;;;AAmCA;;;;;;;;;AAakB;UAbD,SAAA;EAiBe;EAf9B,mBAAA;EAiB8B;;;;;;AAAA;AAIhC;EAZE,KAAA;EAYqC;EAVrC,IAAA,EAAM,UAAU;AAAA;;UAID,eAAA;EAAA,SACN,EAAA,EAAI,SAAA;EAAA,SACJ,SAAA,EAAW,UAAU;AAAA;;UAIf,sBAAA;EAIa;EAAA,SAFnB,OAAA,EAAS,WAAA;EAST;EAAA,SAPA,iBAAA,EAAmB,eAAA;EASb;EAAA,SAPN,iBAAA;EAOW;AAItB;;;EAJsB,SAFX,KAAA;EAeQ;EAAA,SAbR,IAAA,EAAM,KAAA;AAAA;;UAIA,mBAAA;EAcL;;;;EAAA,SATD,QAAA;EAWC;EAAA,SATD,OAAA,EAAS,eAAA;EAPiB;EASnC,UAAA,CAAW,IAAA,EAAM,KAAA,GAAQ,UAAA;EAFhB;EAIT,QAAA,CAAS,OAAA,EAAS,sBAAA,CAAuB,KAAA,IAAS,UAAA;EAFlD;EAIA,IAAA,CACE,MAAA,EAAQ,MAAA,EACR,OAAA,EAAS,sBAAA,CAAuB,KAAA,IAC/B,OAAA,CAAQ,e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AAA;AAAA;;UAIA,mBAAA;EAcL;;;;EAAA,SATD,QAAA;EAWC;EAAA,SATD,OAAA,EAAS,eAAA;EAPiB;EASnC,UAAA,CAAW,IAAA,EAAM,KAAA,GAAQ,UAAA;EAFhB;EAIT,QAAA,CAAS,OAAA,EAAS,sBAAA,CAAuB,KAAA,IAAS,UAAA;EAFlD;EAIA,IAAA,CACE,MAAA,EAAQ,MAAA,EACR,OAAA,EAAS,sBAAA,CAAuB,KAAA,IAC/B,OAAA,CAAQ,eAAA;AAAA;;UAII,4BAAA;EATG;;;;;EAAA,SAeT,QAAA,WAAmB,eAAA;EAZ1B;;;;;;EAAA,SAmBO,QAAA,WAAmB,oBAAoB;AAAA;AAblD;;;;AAAA,UAoBiB,oBAAA;EAAA,SACN,UAAA;EAAA,SACA,KAAA;EAAA,SACA,WAAA;EAAA,SACA,QAAA;AAAA;AAJX;;;;;;;;AAAA,iBAegB,WAAA;AAXG;AAWnB;;;;AAA2B;AA8C3B;;;;;;;;;;;;;;AAE4B;;;;ACrK5B;;;;;;;;;;;;;;AD0GmB,iBAyDH,qBAAA,QACd,OAAA,EAAS,4BAAA,GACR,mBAAA,CAAoB,KAAA;;;;UCrKN,uBAAA;;WAEN,OAAA,EAAS,WAAA;;WAET,iBAAA,EAAmB,eAAA;EDkBJ;;;;;EAAA,SCZf,OAAA,EAAS,eAAA;EDyBZ;EAAA,SCvBG,iBAAA,EAAmB,WAAA;EDuBZ;AAIlB;;;EAJkB,SClBP,KAAA;EDuBA;EAAA,SCrBA,IAAA,EAAM,UAAA;AAAA;;;ADsBe;AAIhC;;;;;;;;;;;;;;;;iBCJgB,uBAAA,CACd,QAAA,EAAU,uBAAA,GACT,UAAU"}
@@ -1,4 +1,4 @@
1
- import { A as ThruputClient, Ft as ContractTypeDef, Ot as ContractSpec, Pt as ContractType$1, l as ContractMethod, y as ContractViewOptions } from "./readViews-nV3jbpYc.js";
1
+ import { Bt as ContractSpec, K as ContractViewOptions, Kt as ContractType$1, R as ContractMethod, qt as ContractTypeDef, rt as ThruputClient } from "./requestAirdrop-DBCOST2B.js";
2
2
  import { Calldata, Contract, ContractAddress, Invocation, SHA256Hash } from "@thruputchain/protocol";
3
3
  import { FixedArray, FixedBytes as FixedBytes$1, XdrCodec, fixedArray as fixedArray$1, fixedBytes as fixedBytes$1 } from "@thruputchain/xdr";
4
4
 
@@ -102,16 +102,6 @@ declare function hashContract(contract: Contract): SHA256Hash;
102
102
  */
103
103
  declare function deriveContractAddress(deployer: ContractAddress, nonce: SHA256Hash, contractHash: SHA256Hash): ContractAddress;
104
104
  //#endregion
105
- //#region src/contract/errors.d.ts
106
- /** Error raised when contract bytes do not match their declared ABI type. */
107
- declare class ContractDecodeError extends Error {
108
- constructor(message: string, options?: ErrorOptions);
109
- }
110
- /** Retrieved bytes or response metadata failed identity/canonical validation. */
111
- declare class ContractVerificationError extends Error {
112
- constructor(message: string, options?: ErrorOptions);
113
- }
114
- //#endregion
115
105
  //#region src/contract/signedToken.d.ts
116
106
  declare const signedTokenPreimageBrand: unique symbol;
117
107
  /**
@@ -160,5 +150,5 @@ declare function getContract<T extends Record<string, ContractMethod<any, unknow
160
150
  client: Pick<ThruputClient, "simulateInvocation">;
161
151
  }): ContractInstance<T>;
162
152
  //#endregion
163
- export { SpecDecodedCall as _, BoundContractMethod as a, encodeCalldata as b, SignedToken as c, ContractDecodeError as d, ContractVerificationError as f, SpecDeclaredException as g, buildNamedCodecs as h, fixedBytes$1 as i, isSignedToken as l, hashContract as m, FixedBytes$1 as n, ContractInstance as o, deriveContractAddress as p, fixedArray$1 as r, getContract as s, FixedArray as t, signedToken as u, createContractCallDecoder as v, resolveCodec as x, decodeCalldata as y };
164
- //# sourceMappingURL=index-DeS1S0m-.d.ts.map
153
+ export { decodeCalldata as _, BoundContractMethod as a, SignedToken as c, deriveContractAddress as d, hashContract as f, createContractCallDecoder as g, SpecDecodedCall as h, fixedBytes$1 as i, isSignedToken as l, SpecDeclaredException as m, FixedBytes$1 as n, ContractInstance as o, buildNamedCodecs as p, fixedArray$1 as r, getContract as s, FixedArray as t, signedToken as u, encodeCalldata as v, resolveCodec as y };
154
+ //# sourceMappingURL=index-Btl_jMCT.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-Btl_jMCT.d.ts","names":[],"sources":["../src/contract/encode.ts","../src/contract/specMethod.ts","../src/contract/codegen.ts","../src/contract/hash.ts","../src/derivation/contractAddress.ts","../src/contract/signedToken.ts","../src/contract/instance.ts"],"mappings":";;;;;;AAuKA;;;;;iBAAgB,YAAA,CACd,EAAA,EAAI,cAAA,EACJ,WAAA,GAAc,MAAA,SAAe,QAAA,aAC5B,QAAA;;;;;;;;;;;AAAQ;AAoKX;;;;;;;iBAAgB,cAAA,CACd,IAAA,EAAM,YAAA,EACN,aAAA,UACA,UAAA,UACA,IAAA,aACA,WAAA,EAAa,MAAA,SAAe,QAAA,aAC3B,QAAA;;;;;;;iBAwBa,cAAA,CACd,IAAA,EAAM,YAAA,EACN,aAAA,UACA,UAAA,UACA,IAAA,EAAM,UAAA,EACN,WAAA,EAAa,MAAA,SAAe,QAAA,aAC3B,MAAA;;;;UCtWc,qBAAA;EACf,IAAA;EACA,QAAA;EACA,IAAA;EACA,KAAA;AAAA;;UAIe,eAAA;EACf,aAAA;EACA,gBAAA;EACA,UAAA;EACA,IAAA,EAAM,MAAA;EACN,MAAA,EAAQ,cAAA,CACN,MAAA,mCAEA,qBAAA;AAAA;;;;;AD8IO;iBCrIK,yBAAA,CACd,IAAA,EAAM,YAAA,IAEN,UAAA,EAAY,IAAA,CAAK,UAAA,iCACd,eAAA;;;;;;;AD8HL;;;;;;iBE9IgB,gBAAA,CACd,QAAA,EAAU,eAAA,KACT,MAAA,SAAe,QAAA;;;;;;;;AF4IlB;;;;;;;;;;;;;iBGjJgB,YAAA,CAAa,QAAA,EAAU,QAAA,GAAW,UAAU;;;;;;;;iBCb5C,qBAAA,CACd,QAAA,EAAU,eAAA,EACV,KAAA,EAAO,UAAA,EACP,Y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nsupportedRpcValue, Nt as RpcParams, Pt as Transport, U as RpcErrorData } from "./client-jOZxB8yW.cjs";
1
+ import { Wi as UnsupportedRpcValue, cn as TransportRequestOptions, on as RpcParams, ri as RpcErrorData, sn as Transport } from "./requestAirdrop-DBCOST2B.js";
2
2
 
3
3
  //#region src/transport/http.d.ts
4
- /**
5
- * Error thrown when a JSON-RPC response contains an `error` object.
6
- *
7
- * Malformed envelopes throw `RpcResponseError`, preserving the raw reply.
8
- */
9
- declare class JsonRpcError extends Error {
10
- /** JSON-RPC numeric error code. */
11
- code: number;
12
- /** Optional JSON-RPC error data returned by the gateway. */
13
- data?: unknown;
14
- /** JSON-RPC method associated with the failed request, when known. */
15
- method?: string;
16
- /** Complete original JSON-RPC error object, including additive fields. */
17
- readonly raw: unknown;
18
- readonly rpcMessage: string;
19
- constructor(code: number, message: string, data?: unknown, method?: string, raw?: unknown);
20
- }
21
- /** Error thrown when an HTTP response has a non-successful status. */
22
- declare class HttpResponseError extends Error {
23
- readonly endpoint?: string | undefined;
24
- readonly method?: string | undefined;
25
- readonly status: number;
26
- readonly statusText: string;
27
- constructor(status: number, statusText: string, endpoint?: string | undefined, method?: string | undefined);
28
- }
29
- /** Network failure with sanitized endpoint and method context. */
30
- declare class HttpRequestError extends TypeError {
31
- readonly endpoint: string;
32
- readonly method: string;
33
- constructor(endpoint: string, method: string, cause: unknown);
34
- }
35
4
  /** Limits for opt-in HTTP JSON-RPC batching. */
36
5
  interface HttpBatchOptions {
37
6
  /** Maximum calls per HTTP request (1–1,000). Defaults to 100. Full batches send immediately. */
@@ -70,7 +39,9 @@ interface HttpTransportOptions {
70
39
  *
71
40
  * `HttpTransport` handles request IDs, JSON-RPC envelopes, optional custom
72
41
  * headers, optional timeout cancellation, and conversion of JSON-RPC error
73
- * responses into {@link JsonRpcError}.
42
+ * responses into `ThruputError` with code `rpcError`. Network failures use
43
+ * `httpRequestFailed`, failed HTTP statuses use `httpResponseError`, and
44
+ * malformed replies use `rpcResponseInvalid`.
74
45
  *
75
46
  * @example
76
47
  * ```ts
@@ -105,11 +76,12 @@ type ReadErrorKind = "transient" | "permanent" | "cancelled" | "unknown";
105
76
  * Classify an infrastructure read failure without replacing the original error.
106
77
  *
107
78
  * Pass the caller's signal to distinguish explicit cancellation from a transport
108
- * timeout. Plain Error wrappers are inspected through their causes; domain errors
109
- * and unrecognized failures remain unknown. A bare TypeError is not evidence of
110
- * a network failure. Custom transports should use HttpRequestError for that case.
111
- * Transaction-not-found remains operation-specific rather than a general retry.
112
- * This classification never authorizes transaction resubmission.
79
+ * timeout. Plain Error wrappers are inspected through their causes; other
80
+ * `ThruputError` codes and unrecognized failures remain unknown. A bare TypeError
81
+ * is not evidence of a network failure. Custom transports should throw code
82
+ * `httpRequestFailed` for that case. Transaction-not-found remains
83
+ * operation-specific rather than a general retry. This classification never
84
+ * authorizes transaction resubmission.
113
85
  */
114
86
  declare function classifyReadError(error: unknown, options?: TransportRequestOptions): ReadErrorKind;
115
87
  //#endregion
@@ -138,27 +110,5 @@ declare const NativeRpcErrorCode: {
138
110
  readonly TransactionRejected: -32001;
139
111
  };
140
112
  //#endregion
141
- //#region src/rpc/errorReader.d.ts
142
- type DecodedRpcError = {
143
- classification: "known";
144
- data: RpcErrorData;
145
- raw: unknown;
146
- } | {
147
- classification: "unclassified";
148
- raw: unknown;
149
- };
150
- /** A native RPC failure retains the transport error and a conservative typed interpretation. */
151
- declare class NativeRpcError extends JsonRpcError {
152
- readonly decoded: DecodedRpcError;
153
- constructor(error: JsonRpcError, method: string, expectedTransactionHash?: Uint8Array);
154
- }
155
- //#endregion
156
- //#region src/transport/responseError.d.ts
157
- /** Malformed JSON-RPC reply after dispatch. Raw data is retained; write outcome is unknown. */
158
- declare class RpcResponseError extends Error {
159
- readonly raw: unknown;
160
- constructor(message: string, raw: unknown);
161
- }
162
- //#endregion
163
- export { TxInvalidDetail as a, classifyReadError as c, HttpRequestError as d, HttpResponseError as f, JsonRpcError as h, NativeRpcErrorCode as i, MockTransport as l, HttpTransportOptions as m, DecodedRpcError as n, txInvalidDetail as o, HttpTransport as p, NativeRpcError as r, ReadErrorKind as s, RpcResponseError as t, HttpBatchOptions as u };
164
- //# sourceMappingURL=index-CtjZ61tl.d.cts.map
113
+ export { classifyReadError as a, HttpTransport as c, ReadErrorKind as i, HttpTransportOptions as l, TxInvalidDetail as n, MockTransport as o, txInvalidDetail as r, HttpBatchOptions as s, NativeRpcErrorCode as t };
114
+ //# sourceMappingURL=index-CG-q0j9w.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CG-q0j9w.d.ts","names":[],"sources":["../src/transport/http.ts","../src/transport/mock.ts","../src/transport/readError.ts","../src/transport/txInvalidDetail.ts","../src/rpc/errors.ts"],"mappings":";;;;UAWiB,gBAAA;EAAA;EAEf,OAAA;;EAEA,MAAM;AAAA;AAIR;AAAA,UAAiB,oBAAA;;EAEf,OAAA,GAAU,MAAA;EAGK;EAAf,KAAA,UAAe,KAAA;EAqBmB;EAlBlC,SAAA;EANA;;;;;;;;AAwBkC;AAuBpC;;;;;;;EAvBE,KAAA,aAAkB,gBAAA;AAAA;;;;;;;;;;;;;;;;;;;AA0DN;;cAnCD,aAAA,YAAyB,SAAA;EAAA;ECnCzB;cD4CC,GAAA,UAAa,OAAA,GAAS,oBAAA;EC5CT;EDkEnB,OAAA,cACJ,MAAA,UACA,MAAA,GAAS,SAAA,EACT,OAAA,GAAS,uBAAA,GACR,OAAA,CAAQ,CAAA;AAAA;;;;cCtEA,aAAA,YAAyB,SAAA;EAAA;EAG9B,OAAA,cACJ,MAAA,UACA,MAAA,GAAQ,SAAA,EACR,OAAA,GAAU,uBAAA,GACT,OAAA,CAAQ,CAAA;AAAA;;;;KCpCD,aAAA;AFOZ;;;;AAIQ;AAIR;;;;;;AARA,iBEMgB,iBAAA,CACd,KAAA,WACA,OAAA,GAAS,uBAAA,GACR,aAAa;;;;KCbJ,eAAA,GAAkB,OAAA,CAC5B,WAAA,CAAY,OAAA,CAAQ,YAAA;EAAgB,IAAA;AAAA,eACpC,mBAAA;;iBAGc,eAAA,CAAgB,KAAA,YAAiB,eAAe;;;;cCVnD,kBAAA;EAAA"}