@pizzaton/ton 0.0.0-stage → 0.1.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 (96) hide show
  1. package/CONTRACTS.md +239 -0
  2. package/README.md +481 -2
  3. package/dist/airdrop/index.d.mts +18 -0
  4. package/dist/airdrop/index.mjs +86 -0
  5. package/dist/connect/errors.d.mts +4 -0
  6. package/dist/connect/errors.mjs +21 -0
  7. package/dist/connect/index.d.mts +23 -0
  8. package/dist/connect/index.mjs +34 -0
  9. package/dist/contracts/catalog/index.d.mts +361 -0
  10. package/dist/contracts/catalog/index.mjs +403 -0
  11. package/dist/contracts/client.d.mts +18 -0
  12. package/dist/contracts/client.mjs +31 -0
  13. package/dist/contracts/codecs.d.mts +14 -0
  14. package/dist/contracts/codecs.mjs +61 -0
  15. package/dist/contracts/hipo.d.mts +138 -0
  16. package/dist/contracts/hipo.mjs +198 -0
  17. package/dist/contracts/index.d.mts +23 -0
  18. package/dist/contracts/index.mjs +20 -0
  19. package/dist/contracts/metadata.d.mts +38 -0
  20. package/dist/contracts/metadata.mjs +50 -0
  21. package/dist/contracts/module-client.d.mts +20 -0
  22. package/dist/contracts/module-client.mjs +34 -0
  23. package/dist/contracts/module.d.mts +8 -0
  24. package/dist/contracts/module.mjs +11 -0
  25. package/dist/contracts/wrappers/base.d.mts +18 -0
  26. package/dist/contracts/wrappers/base.mjs +31 -0
  27. package/dist/contracts/wrappers/index.d.mts +12 -0
  28. package/dist/contracts/wrappers/index.mjs +12 -0
  29. package/dist/contracts/wrappers/jvault-protocols.d.mts +206 -0
  30. package/dist/contracts/wrappers/jvault-protocols.mjs +432 -0
  31. package/dist/contracts/wrappers/jvault-support.d.mts +135 -0
  32. package/dist/contracts/wrappers/jvault-support.mjs +269 -0
  33. package/dist/contracts/wrappers/jvault.d.mts +123 -0
  34. package/dist/contracts/wrappers/jvault.mjs +258 -0
  35. package/dist/contracts/wrappers/memeland.d.mts +253 -0
  36. package/dist/contracts/wrappers/memeland.mjs +396 -0
  37. package/dist/contracts/wrappers/multix.d.mts +92 -0
  38. package/dist/contracts/wrappers/multix.mjs +156 -0
  39. package/dist/contracts/wrappers/pizzabox.d.mts +66 -0
  40. package/dist/contracts/wrappers/pizzabox.mjs +105 -0
  41. package/dist/contracts/wrappers/ton-raffles.d.mts +215 -0
  42. package/dist/contracts/wrappers/ton-raffles.mjs +398 -0
  43. package/dist/contracts/wrappers/tonresistor.d.mts +189 -0
  44. package/dist/contracts/wrappers/tonresistor.mjs +276 -0
  45. package/dist/core/address.d.mts +25 -0
  46. package/dist/core/address.mjs +45 -0
  47. package/dist/core/amount.d.mts +8 -0
  48. package/dist/core/amount.mjs +34 -0
  49. package/dist/core/bytes.d.mts +5 -0
  50. package/dist/core/bytes.mjs +18 -0
  51. package/dist/core/constants.d.mts +14 -0
  52. package/dist/core/constants.mjs +15 -0
  53. package/dist/core/errors.d.mts +9 -0
  54. package/dist/core/errors.mjs +16 -0
  55. package/dist/core/http.mjs +39 -0
  56. package/dist/core/index.d.mts +8 -0
  57. package/dist/core/index.mjs +8 -0
  58. package/dist/core/metadata.d.mts +12 -0
  59. package/dist/core/metadata.mjs +35 -0
  60. package/dist/core/network.d.mts +24 -0
  61. package/dist/core/network.mjs +41 -0
  62. package/dist/emulator/index.d.mts +20 -0
  63. package/dist/emulator/index.mjs +24 -0
  64. package/dist/index.d.mts +21 -0
  65. package/dist/index.mjs +19 -0
  66. package/dist/indexer/index.d.mts +90 -0
  67. package/dist/indexer/index.mjs +279 -0
  68. package/dist/jetton/details.d.mts +27 -0
  69. package/dist/jetton/details.mjs +116 -0
  70. package/dist/jetton/index.d.mts +54 -0
  71. package/dist/jetton/index.mjs +92 -0
  72. package/dist/jetton/versions.d.mts +12 -0
  73. package/dist/jetton/versions.mjs +50 -0
  74. package/dist/nft/collection.d.mts +57 -0
  75. package/dist/nft/collection.mjs +148 -0
  76. package/dist/nft/content.d.mts +34 -0
  77. package/dist/nft/content.mjs +142 -0
  78. package/dist/nft/index.d.mts +35 -0
  79. package/dist/nft/index.mjs +51 -0
  80. package/dist/nft/versions.d.mts +11 -0
  81. package/dist/nft/versions.mjs +29 -0
  82. package/dist/provider/index.d.mts +32 -0
  83. package/dist/provider/index.mjs +1 -0
  84. package/dist/react/index.d.mts +13 -0
  85. package/dist/react/index.mjs +48 -0
  86. package/dist/server/index.d.mts +11 -0
  87. package/dist/server/index.mjs +55 -0
  88. package/dist/simulation/index.d.mts +112 -0
  89. package/dist/simulation/index.mjs +310 -0
  90. package/dist/transactions/index.d.mts +33 -0
  91. package/dist/transactions/index.mjs +51 -0
  92. package/dist/vesting/index.d.mts +12 -0
  93. package/dist/vesting/index.mjs +25 -0
  94. package/dist/wallet/index.d.mts +23 -0
  95. package/dist/wallet/index.mjs +71 -0
  96. package/package.json +169 -5
@@ -0,0 +1,403 @@
1
+ import { createContractDescriptor } from "../metadata.mjs";
2
+ const CONTRACT_CATALOG = Object.freeze(Object.fromEntries([
3
+ {
4
+ id: "official/jetton",
5
+ version: 1,
6
+ family: "token",
7
+ readiness: "official-reference",
8
+ source: {
9
+ repositoryUrl: "https://github.com/ton-blockchain/jetton-contract",
10
+ commit: "d55f228edb0eb477cb4845d67e0dacc6489c6b57",
11
+ commitUrl: "https://github.com/ton-blockchain/jetton-contract/commit/d55f228edb0eb477cb4845d67e0dacc6489c6b57",
12
+ license: "MIT"
13
+ },
14
+ upgradePolicy: "admin-controlled",
15
+ privilegedRoles: ["jetton admin"],
16
+ warnings: ["The reference minter permits admin code and data upgrades; verify and govern the admin key."]
17
+ },
18
+ {
19
+ id: "official/nft",
20
+ version: 1,
21
+ family: "nft",
22
+ readiness: "official-reference",
23
+ source: {
24
+ repositoryUrl: "https://github.com/ton-blockchain/nft-contract",
25
+ commit: "0b493104cd547d0fd52b7e6fd3c046fc365fe3d4",
26
+ commitUrl: "https://github.com/ton-blockchain/nft-contract/commit/0b493104cd547d0fd52b7e6fd3c046fc365fe3d4",
27
+ license: "MIT"
28
+ },
29
+ upgradePolicy: "unknown",
30
+ privilegedRoles: ["collection owner"],
31
+ warnings: ["Select immutable or editable collection behavior explicitly."]
32
+ },
33
+ {
34
+ id: "official/vesting",
35
+ version: 1,
36
+ family: "vesting",
37
+ readiness: "audit-evidence",
38
+ source: {
39
+ repositoryUrl: "https://github.com/ton-blockchain/vesting-contract",
40
+ commit: "2a63cb96942332abf92ed8425b37645fe4f41f86",
41
+ commitUrl: "https://github.com/ton-blockchain/vesting-contract/commit/2a63cb96942332abf92ed8425b37645fe4f41f86",
42
+ license: "MIT"
43
+ },
44
+ upgradePolicy: "unknown",
45
+ privilegedRoles: ["vesting owner", "vesting sender"],
46
+ warnings: ["Audit scope and deployed artifact must match before reuse."]
47
+ },
48
+ {
49
+ id: "ton-raffles/nft-launchpad",
50
+ version: 1,
51
+ family: "launchpad",
52
+ readiness: "research-only",
53
+ source: {
54
+ repositoryUrl: "https://github.com/Ton-Raffles/nft_launchpad_v1",
55
+ commit: "983a668dae2c5fd0b71a4c8c42c47392ecf5a9bd",
56
+ commitUrl: "https://github.com/Ton-Raffles/nft_launchpad_v1/commit/983a668dae2c5fd0b71a4c8c42c47392ecf5a9bd",
57
+ license: "MIT"
58
+ },
59
+ upgradePolicy: "unknown",
60
+ privilegedRoles: ["sale admin", "admin signing key"],
61
+ warnings: ["Admin can change sale parameters, collection ownership, active state, and remaining-balance destination.", "Purchase signatures should bind the complete sale intent and replay domain."]
62
+ },
63
+ {
64
+ id: "ton-raffles/staking",
65
+ version: 1,
66
+ family: "staking",
67
+ readiness: "research-only",
68
+ source: {
69
+ repositoryUrl: "https://github.com/Ton-Raffles/NFT_staking_individual_awards",
70
+ commit: "c87ca8facddb4ade5b28064a8b3bbc599b09c8e0",
71
+ commitUrl: "https://github.com/Ton-Raffles/NFT_staking_individual_awards/commit/c87ca8facddb4ade5b28064a8b3bbc599b09c8e0",
72
+ license: "MIT"
73
+ },
74
+ upgradePolicy: "unknown",
75
+ privilegedRoles: ["staking admin"],
76
+ warnings: ["Reward accounting, item management, and admin withdrawals require review."]
77
+ },
78
+ {
79
+ id: "ton-raffles/nft-lending",
80
+ version: 1,
81
+ family: "lending",
82
+ readiness: "research-only",
83
+ source: {
84
+ repositoryUrl: "https://github.com/Ton-Raffles/nft_p2p_lending",
85
+ commit: "0f49303d2fd4fe2f2387d55d294f868f58751ccb",
86
+ commitUrl: "https://github.com/Ton-Raffles/nft_p2p_lending/commit/0f49303d2fd4fe2f2387d55d294f868f58751ccb",
87
+ license: "MIT"
88
+ },
89
+ upgradePolicy: "unknown",
90
+ privilegedRoles: ["offer owner", "platform"],
91
+ warnings: ["Collateral, liquidation, repayment, and cancellation are asynchronous flows."]
92
+ },
93
+ {
94
+ id: "ton-raffles/nft-sale-modern",
95
+ version: 1,
96
+ family: "sale",
97
+ readiness: "research-only",
98
+ source: {
99
+ repositoryUrl: "https://github.com/Ton-Raffles/nft_sale_modern_v1",
100
+ commit: "4be2729f122b4f67013a32bd11ce4a86b0d79efa",
101
+ commitUrl: "https://github.com/Ton-Raffles/nft_sale_modern_v1/commit/4be2729f122b4f67013a32bd11ce4a86b0d79efa",
102
+ license: "MIT"
103
+ },
104
+ upgradePolicy: "unknown",
105
+ privilegedRoles: ["sale owner"],
106
+ warnings: ["Fee and refund behavior must be verified against the exact source revision."]
107
+ },
108
+ {
109
+ id: "ton-raffles/nft-sale-jettons",
110
+ version: 1,
111
+ family: "sale",
112
+ readiness: "research-only",
113
+ source: {
114
+ repositoryUrl: "https://github.com/Ton-Raffles/nft_sale_jettons_v1",
115
+ commit: "d65f5348a748b0c3567fa59b7594ca0b7218f368",
116
+ commitUrl: "https://github.com/Ton-Raffles/nft_sale_jettons_v1/commit/d65f5348a748b0c3567fa59b7594ca0b7218f368",
117
+ license: "ISC"
118
+ },
119
+ upgradePolicy: "unknown",
120
+ privilegedRoles: ["sale owner"],
121
+ warnings: ["The repository README and package metadata declare different licenses."]
122
+ },
123
+ {
124
+ id: "ton-raffles/nft-shopping-cart",
125
+ version: 1,
126
+ family: "sale",
127
+ readiness: "research-only",
128
+ source: {
129
+ repositoryUrl: "https://github.com/Ton-Raffles/NFT_shopping_cart",
130
+ commit: "78b9b18de1fda2fb2360e10e6dd54877defc906f",
131
+ commitUrl: "https://github.com/Ton-Raffles/NFT_shopping_cart/commit/78b9b18de1fda2fb2360e10e6dd54877defc906f",
132
+ license: "MIT"
133
+ },
134
+ upgradePolicy: "unknown",
135
+ privilegedRoles: ["cart owner", "sale owner"],
136
+ warnings: ["Batch purchase and refund paths require full trace testing."]
137
+ },
138
+ {
139
+ id: "ton-raffles/scalable-airdrop",
140
+ version: 1,
141
+ family: "airdrop",
142
+ readiness: "research-only",
143
+ source: {
144
+ repositoryUrl: "https://github.com/Ton-Raffles/scalable_airdrops_with_date_start",
145
+ commit: "47b8fb00163af2755b413c16cd815672c5cdeae2",
146
+ commitUrl: "https://github.com/Ton-Raffles/scalable_airdrops_with_date_start/commit/47b8fb00163af2755b413c16cd815672c5cdeae2",
147
+ license: "MIT"
148
+ },
149
+ upgradePolicy: "unknown",
150
+ privilegedRoles: ["airdrop admin"],
151
+ warnings: ["The documented claim flow depends on an exotic-cell Merkle proof and two transactions."]
152
+ },
153
+ {
154
+ id: "ton-raffles/offchain-proofs",
155
+ version: 2,
156
+ family: "proof",
157
+ readiness: "research-only",
158
+ source: {
159
+ repositoryUrl: "https://github.com/Ton-Raffles/offchain_proofs",
160
+ commit: "467815bdcbb58e604d6b82e22bfb1aa16ce6282a",
161
+ commitUrl: "https://github.com/Ton-Raffles/offchain_proofs/commit/467815bdcbb58e604d6b82e22bfb1aa16ce6282a",
162
+ ref: "offchain_prooofs_v2",
163
+ license: "MIT"
164
+ },
165
+ upgradePolicy: "unknown",
166
+ privilegedRoles: ["task admin", "proof signing key"],
167
+ warnings: ["Claims depend on backend signatures; key custody, domain separation, and replay controls are critical."]
168
+ },
169
+ {
170
+ id: "ton-raffles/nft-auction",
171
+ version: 2,
172
+ family: "auction",
173
+ readiness: "research-only",
174
+ source: {
175
+ repositoryUrl: "https://github.com/Ton-Raffles/nft_auction_v2",
176
+ commit: "b2bc3755c79d43f6cc2b361210362d4a1672b1dd",
177
+ commitUrl: "https://github.com/Ton-Raffles/nft_auction_v2/commit/b2bc3755c79d43f6cc2b361210362d4a1672b1dd",
178
+ license: "MIT"
179
+ },
180
+ upgradePolicy: "unknown",
181
+ privilegedRoles: ["auction owner", "market service"],
182
+ warnings: ["Bid refunds, expiry, cancellation, and market service messages require adversarial testing."]
183
+ },
184
+ {
185
+ id: "ton-raffles/nft-swap",
186
+ version: 2,
187
+ family: "swap",
188
+ readiness: "research-only",
189
+ source: {
190
+ repositoryUrl: "https://github.com/Ton-Raffles/nft_swap_v2",
191
+ commit: "8e262604c56f0be2753be254772df4a3fed03882",
192
+ commitUrl: "https://github.com/Ton-Raffles/nft_swap_v2/commit/8e262604c56f0be2753be254772df4a3fed03882",
193
+ license: "MIT"
194
+ },
195
+ upgradePolicy: "unknown",
196
+ privilegedRoles: ["swap participants", "market service"],
197
+ warnings: ["Two-sided asset custody and cancellation are asynchronous and must be state-machine tested."]
198
+ },
199
+ {
200
+ id: "tonresistor/bonding-curve",
201
+ version: 1,
202
+ family: "launchpad",
203
+ readiness: "experimental",
204
+ source: {
205
+ repositoryUrl: "https://github.com/TONresistor/bonding-curve-contracts",
206
+ commit: "5dbb20575fde5144d00c63f9d3099c0ac71bab95",
207
+ commitUrl: "https://github.com/TONresistor/bonding-curve-contracts/commit/5dbb20575fde5144d00c63f9d3099c0ac71bab95",
208
+ license: "MIT"
209
+ },
210
+ upgradePolicy: "admin-controlled",
211
+ privilegedRoles: ["master admin", "treasury"],
212
+ warnings: ["The upstream project explicitly states that it is unaudited and not validated at production scale."]
213
+ },
214
+ {
215
+ id: "pizzaton/memeland",
216
+ version: 1,
217
+ family: "launchpad",
218
+ readiness: "research-only",
219
+ source: {
220
+ repositoryUrl: "https://github.com/PizzaTon/memeland-contracts",
221
+ commit: "a7e132be091585b80cb6ffc6b7b50c8f0bdc53a2",
222
+ commitUrl: "https://github.com/PizzaTon/memeland-contracts/commit/a7e132be091585b80cb6ffc6b7b50c8f0bdc53a2"
223
+ },
224
+ upgradePolicy: "admin-controlled",
225
+ privilegedRoles: [
226
+ "factory admin",
227
+ "coin admin",
228
+ "fee collector admin"
229
+ ],
230
+ warnings: ["The source contains privileged code/data replacement paths and is an old Blueprint/FunC implementation."]
231
+ },
232
+ {
233
+ id: "pizzaton/jetton-locker",
234
+ version: 1,
235
+ family: "locker",
236
+ readiness: "research-only",
237
+ source: {
238
+ repositoryUrl: "https://github.com/PizzaTon/jetton-locker",
239
+ commit: "cd1574f52b413c2aea6255a08110c8fad3b5616e",
240
+ commitUrl: "https://github.com/PizzaTon/jetton-locker/commit/cd1574f52b413c2aea6255a08110c8fad3b5616e"
241
+ },
242
+ upgradePolicy: "admin-controlled",
243
+ privilegedRoles: ["locker owner", "collection upgrader"],
244
+ warnings: ["The upstream revision is marked work in progress and supports mutable self/child contract upgrades."]
245
+ },
246
+ {
247
+ id: "ton-raffles/lock",
248
+ version: 1,
249
+ family: "locker",
250
+ readiness: "research-only",
251
+ source: {
252
+ repositoryUrl: "https://github.com/Ton-Raffles/audit-raff-and-locker",
253
+ commit: "c14f60c6cbc3146d31648638c33ba4154306ff80",
254
+ commitUrl: "https://github.com/Ton-Raffles/audit-raff-and-locker/commit/c14f60c6cbc3146d31648638c33ba4154306ff80"
255
+ },
256
+ upgradePolicy: "unknown",
257
+ privilegedRoles: ["lock owner"],
258
+ warnings: ["The public audit link must be matched to the actual lock source and deployed code before reuse."],
259
+ audit: {
260
+ auditor: "Continuation Team",
261
+ reportUrl: "https://github.com/Ton-Raffles/audit-raff-and-locker/blob/main/tonraffles-security-assessment.pdf",
262
+ auditedCommits: [],
263
+ scope: "Audit report repository revision; the corresponding lock contract source revision is not included."
264
+ }
265
+ },
266
+ {
267
+ id: "multix/dao",
268
+ version: 1,
269
+ family: "launchpad",
270
+ readiness: "research-only",
271
+ source: {
272
+ repositoryUrl: "https://github.com/multixcrypto/dao-contract",
273
+ commit: "dd03da038d8eecb72141eda77e231d536e5e3cd7",
274
+ commitUrl: "https://github.com/multixcrypto/dao-contract/commit/dd03da038d8eecb72141eda77e231d536e5e3cd7"
275
+ },
276
+ upgradePolicy: "unknown",
277
+ privilegedRoles: ["contract creator", "DAO veto authority"],
278
+ warnings: ["The repository prohibits commercial modification; obtain and preserve the upstream license terms before deployment.", "The wrapper accepts generated Tact cells for nested sale and vesting records to preserve ABI parity."]
279
+ },
280
+ {
281
+ id: "jvault/staking-v2",
282
+ version: 2,
283
+ family: "staking",
284
+ readiness: "research-only",
285
+ source: {
286
+ repositoryUrl: "https://github.com/JVault-app/staking-v2",
287
+ commit: "f7e83860ba7138c88bf63da13884f54d04589191",
288
+ commitUrl: "https://github.com/JVault-app/staking-v2/commit/f7e83860ba7138c88bf63da13884f54d04589191",
289
+ license: "MIT"
290
+ },
291
+ upgradePolicy: "admin-controlled",
292
+ privilegedRoles: ["pool creator", "factory admin"],
293
+ warnings: ["Pool creation and staking operate on exact jetton-wallet addresses; never substitute jetton master addresses where the contract expects pool-owned wallets.", "The upstream source contains mutable factory and wallet code paths; pin the deployed code hash and govern upgrade authority."]
294
+ },
295
+ {
296
+ id: "jvault/vesting",
297
+ version: 1,
298
+ family: "vesting",
299
+ readiness: "research-only",
300
+ source: {
301
+ repositoryUrl: "https://github.com/JVault-app/jettons-vesting",
302
+ commit: "b6d80efdbbeeeda4113ebc9d08c942b543b6b6b6",
303
+ commitUrl: "https://github.com/JVault-app/jettons-vesting/commit/b6d80efdbbeeeda4113ebc9d08c942b543b6b6b6",
304
+ license: "MIT"
305
+ },
306
+ upgradePolicy: "admin-controlled",
307
+ privilegedRoles: ["vesting owner", "factory admin"],
308
+ warnings: ["Verify the factory code dictionary and every vesting schedule before deployment."]
309
+ },
310
+ {
311
+ id: "jvault/airdrop",
312
+ version: 1,
313
+ family: "airdrop",
314
+ readiness: "research-only",
315
+ source: {
316
+ repositoryUrl: "https://github.com/JVault-app/jettons-airdrop",
317
+ commit: "54edd36d242295699278b5668514dd6f2b10260d",
318
+ commitUrl: "https://github.com/JVault-app/jettons-airdrop/commit/54edd36d242295699278b5668514dd6f2b10260d",
319
+ license: "MIT"
320
+ },
321
+ upgradePolicy: "unknown",
322
+ privilegedRoles: ["airdrop admin", "claim-signing key"],
323
+ warnings: ["Claim signatures are over the exact body state; protect key custody and campaign domain separation."]
324
+ },
325
+ {
326
+ id: "jvault/decentralized-launchpad",
327
+ version: 1,
328
+ family: "launchpad",
329
+ readiness: "research-only",
330
+ source: {
331
+ repositoryUrl: "https://github.com/JVault-app/decentralized-launchpad",
332
+ commit: "83f59e126e5e885f2d7da792998a5d569c0aa944",
333
+ commitUrl: "https://github.com/JVault-app/decentralized-launchpad/commit/83f59e126e5e885f2d7da792998a5d569c0aa944",
334
+ license: "MIT"
335
+ },
336
+ upgradePolicy: "admin-controlled",
337
+ privilegedRoles: [
338
+ "sale owner",
339
+ "sale admin",
340
+ "signature authority"
341
+ ],
342
+ warnings: ["Validate the complete sale signature domain, whitelist configuration, and refund path before production use."]
343
+ },
344
+ {
345
+ id: "jvault/floating-staking",
346
+ version: 1,
347
+ family: "staking",
348
+ readiness: "research-only",
349
+ source: {
350
+ repositoryUrl: "https://github.com/JVault-app/floating-staking-contracts",
351
+ commit: "51c86b4469fd99b3e2ebdff6f8cdad9fee067b4c",
352
+ commitUrl: "https://github.com/JVault-app/floating-staking-contracts/commit/51c86b4469fd99b3e2ebdff6f8cdad9fee067b4c",
353
+ license: "MIT"
354
+ },
355
+ upgradePolicy: "admin-controlled",
356
+ privilegedRoles: ["pool admin", "pool creator"],
357
+ warnings: ["The repository includes a security assessment, but production approval still requires matching deployed code hashes."]
358
+ },
359
+ {
360
+ id: "jvault/fixed-staking",
361
+ version: 1,
362
+ family: "staking",
363
+ readiness: "research-only",
364
+ source: {
365
+ repositoryUrl: "https://github.com/JVault-app/fixed-staking-contracts",
366
+ commit: "63cbc8137a7dca0269bcdd9089a9dcc37acbb727",
367
+ commitUrl: "https://github.com/JVault-app/fixed-staking-contracts/commit/63cbc8137a7dca0269bcdd9089a9dcc37acbb727",
368
+ license: "MIT"
369
+ },
370
+ upgradePolicy: "unknown",
371
+ privilegedRoles: ["pool admin", "pool creator"],
372
+ warnings: ["Fixed staking uses custom NFT state and reward accounting; validate all boundary timestamps and withdrawal paths."]
373
+ },
374
+ {
375
+ id: "hipo/liquid-staking",
376
+ version: 1,
377
+ family: "staking",
378
+ readiness: "official-reference",
379
+ source: {
380
+ repositoryUrl: "https://github.com/HipoFinance/contract",
381
+ commit: "f7ca3db515b72b0f8e3fe63ffc64ca749e9765e0",
382
+ commitUrl: "https://github.com/HipoFinance/contract/commit/f7ca3db515b72b0f8e3fe63ffc64ca749e9765e0",
383
+ license: "MIT"
384
+ },
385
+ upgradePolicy: "admin-controlled",
386
+ privilegedRoles: [
387
+ "governor",
388
+ "halter",
389
+ "treasury and parent upgrade authorities"
390
+ ],
391
+ warnings: [
392
+ "The upstream treasury and parent support privileged upgrades; verify current authorities and deployed code hashes before production use.",
393
+ "The pinned upstream source is an ABI reference; it does not prove that a particular mainnet deployment matches this revision.",
394
+ "Mainnet addresses are published upstream; no testnet deployment is included in this integration."
395
+ ]
396
+ }
397
+ ].map((descriptor) => [descriptor.id, createContractDescriptor(descriptor)])));
398
+ function getContractDescriptor(id, version) {
399
+ const descriptor = CONTRACT_CATALOG[id];
400
+ return descriptor && (version === void 0 || descriptor.version === version) ? descriptor : void 0;
401
+ }
402
+ //#endregion
403
+ export { CONTRACT_CATALOG, getContractDescriptor };
@@ -0,0 +1,18 @@
1
+ import { Cell, Contract, ContractProvider, SendMode, Sender, TupleItem, TupleReader } from "@ton/core";
2
+ //#region src/contracts/client.d.ts
3
+ export interface ContractSendOptions {
4
+ readonly value: bigint;
5
+ readonly body?: Cell;
6
+ readonly bounce?: boolean;
7
+ readonly sendMode?: SendMode;
8
+ }
9
+ export declare class TonContractClient<TContract extends Contract> {
10
+ readonly contract: TContract;
11
+ readonly provider: ContractProvider;
12
+ readonly sender?: Sender | undefined;
13
+ constructor(contract: TContract, provider: ContractProvider, sender?: Sender | undefined);
14
+ get(method: string | number, args?: readonly TupleItem[]): Promise<TupleReader>;
15
+ send(options: ContractSendOptions): Promise<void>;
16
+ withSender(sender: Sender): TonContractClient<TContract>;
17
+ }
18
+ //#endregion
@@ -0,0 +1,31 @@
1
+ import { TonPackageError } from "../core/errors.mjs";
2
+ import { assertTonAmount } from "../core/amount.mjs";
3
+ //#region src/contracts/client.ts
4
+ var TonContractClient = class TonContractClient {
5
+ contract;
6
+ provider;
7
+ sender;
8
+ constructor(contract, provider, sender) {
9
+ this.contract = contract;
10
+ this.provider = provider;
11
+ this.sender = sender;
12
+ }
13
+ async get(method, args = []) {
14
+ return (await this.provider.get(method, [...args])).stack;
15
+ }
16
+ async send(options) {
17
+ if (!this.sender) throw new TonPackageError("INVALID_TRANSACTION", "A sender is required for contract writes");
18
+ assertTonAmount(options.value, "Contract message value");
19
+ await this.provider.internal(this.sender, {
20
+ value: options.value,
21
+ ...options.bounce === void 0 ? {} : { bounce: options.bounce },
22
+ ...options.sendMode === void 0 ? {} : { sendMode: options.sendMode },
23
+ ...options.body === void 0 ? {} : { body: options.body }
24
+ });
25
+ }
26
+ withSender(sender) {
27
+ return new TonContractClient(this.contract, this.provider, sender);
28
+ }
29
+ };
30
+ //#endregion
31
+ export { TonContractClient };
@@ -0,0 +1,14 @@
1
+ import { Address, Dictionary } from "@ton/core";
2
+ //#region src/contracts/codecs.d.ts
3
+ /** Computes the unsigned CRC-32 used by FunC/Tolk string-derived opcodes. */
4
+ export declare function crc32(value: string | Uint8Array): number;
5
+ /** Canonical HashmapE(267, Unit) used by whitelist and claim messages. */
6
+ export declare function addressFlagDictionary(addresses: readonly Address[]): Dictionary<Address, boolean>;
7
+ /** Canonical HashmapE(32, Unit) used by request-time cancellation messages. */
8
+ export declare function uint32FlagDictionary(values: readonly number[]): Dictionary<number, boolean>;
9
+ /** Canonical HashmapE(256, coins) used by jetton airdrop claim messages. */
10
+ export declare function uint256CoinsDictionary(entries: readonly Readonly<{
11
+ readonly key: bigint;
12
+ readonly amount: bigint;
13
+ }>[]): Dictionary<bigint, bigint>;
14
+ //#endregion
@@ -0,0 +1,61 @@
1
+ import { Dictionary } from "@ton/core";
2
+ //#region src/contracts/codecs.ts
3
+ const CRC32_POLYNOMIAL = 3988292384;
4
+ let crc32Table;
5
+ function getCrc32Table() {
6
+ if (crc32Table) return crc32Table;
7
+ const table = /* @__PURE__ */ new Uint32Array(256);
8
+ for (let index = 0; index < table.length; index += 1) {
9
+ let value = index;
10
+ for (let bit = 0; bit < 8; bit += 1) value = (value & 1) === 1 ? value >>> 1 ^ CRC32_POLYNOMIAL : value >>> 1;
11
+ table[index] = value >>> 0;
12
+ }
13
+ crc32Table = table;
14
+ return table;
15
+ }
16
+ /** Computes the unsigned CRC-32 used by FunC/Tolk string-derived opcodes. */
17
+ function crc32(value) {
18
+ const bytes = typeof value === "string" ? new TextEncoder().encode(value) : value;
19
+ let checksum = 4294967295;
20
+ const table = getCrc32Table();
21
+ for (const byte of bytes) {
22
+ const entry = table[(checksum ^ byte) & 255];
23
+ if (entry === void 0) throw new Error("CRC-32 table lookup failed");
24
+ checksum = entry ^ checksum >>> 8;
25
+ }
26
+ return (checksum ^ 4294967295) >>> 0;
27
+ }
28
+ const COINS_VALUE = {
29
+ serialize: (value, builder) => builder.storeCoins(value),
30
+ parse: (slice) => slice.loadCoins()
31
+ };
32
+ /** Canonical HashmapE(267, Unit) used by whitelist and claim messages. */
33
+ function addressFlagDictionary(addresses) {
34
+ const dictionary = Dictionary.empty(Dictionary.Keys.Address(), {
35
+ serialize: (_value, builder) => builder.storeBit(1).endCell(),
36
+ parse: (slice) => slice.loadBit()
37
+ });
38
+ for (const address of addresses) dictionary.set(address, true);
39
+ return dictionary;
40
+ }
41
+ /** Canonical HashmapE(32, Unit) used by request-time cancellation messages. */
42
+ function uint32FlagDictionary(values) {
43
+ const dictionary = Dictionary.empty(Dictionary.Keys.Uint(32), {
44
+ serialize: (_value, builder) => builder.storeBit(1).endCell(),
45
+ parse: (slice) => slice.loadBit()
46
+ });
47
+ for (const value of values) dictionary.set(value, true);
48
+ return dictionary;
49
+ }
50
+ /** Canonical HashmapE(256, coins) used by jetton airdrop claim messages. */
51
+ function uint256CoinsDictionary(entries) {
52
+ const dictionary = Dictionary.empty(Dictionary.Keys.BigUint(256), COINS_VALUE);
53
+ for (const entry of entries) {
54
+ if (entry.key < 0n || entry.key >= 1n << 256n) throw new RangeError("key must fit in an unsigned 256-bit integer");
55
+ if (entry.amount < 0n || entry.amount >= 1n << 120n) throw new RangeError("amount must fit in TON coins");
56
+ dictionary.set(entry.key, entry.amount);
57
+ }
58
+ return dictionary;
59
+ }
60
+ //#endregion
61
+ export { addressFlagDictionary, crc32, uint256CoinsDictionary, uint32FlagDictionary };
@@ -0,0 +1,138 @@
1
+ import { JettonTransferInput, JettonWalletData } from "../jetton/index.mjs";
2
+ import { ContractWrapper } from "./wrappers/base.mjs";
3
+ import { Address, Cell, ContractProvider, Sender, TupleReader } from "@ton/core";
4
+ //#region src/contracts/wrappers/hipo.d.ts
5
+ /** Hipo Finance contract source revision pinned for this integration. */
6
+ export declare const HIPO_CONTRACT_COMMIT = "f7ca3db515b72b0f8e3fe63ffc64ca749e9765e0";
7
+ export declare const HIPO_OPCODES: {
8
+ readonly depositCoins: 1027039654;
9
+ readonly unstakeTokens: 1499400124;
10
+ };
11
+ export declare const HIPO_UNSTAKE_MODES: {
12
+ readonly auto: 0;
13
+ readonly instant: 1;
14
+ readonly best: 2;
15
+ };
16
+ export type HipoUnstakeMode = (typeof HIPO_UNSTAKE_MODES)[keyof typeof HIPO_UNSTAKE_MODES];
17
+ export declare const HIPO_MAINNET_ADDRESSES: {
18
+ readonly treasury: "EQCLyZHP4Xe8fpchQz76O-_RmUhaVc_9BAoGyJrwJrcbz2eZ";
19
+ readonly parent: "EQDPdq8xjAhytYqfGSX8KcFWIReCufsB9Wdg0pLlYSO_h76w";
20
+ readonly hpoJetton: "EQDQEUr0LPi8m6D6F0Wrvuok7tZbAcr0yn2Y7hK291MMzMjM";
21
+ readonly burner: "EQDcjZDWvotoVE0X4HSdt2pR3b2sBZ4XikzSVSdPiqdQMLRK";
22
+ };
23
+ export interface HipoDepositInput {
24
+ readonly queryId?: bigint;
25
+ /** `null` encodes `addr_none`, which makes the sender the hGRAM owner. */
26
+ readonly owner?: Address | null;
27
+ /** Zero asks Hipo to use the attached value after its dynamic fee. */
28
+ readonly coins?: bigint;
29
+ readonly ownershipAssignedAmount?: bigint;
30
+ readonly referrer?: Address | null;
31
+ }
32
+ export interface HipoUnstakeInput {
33
+ readonly tokens: bigint;
34
+ readonly queryId?: bigint;
35
+ /** Hipo accepts only the wallet owner or `addr_none` for excess return. */
36
+ readonly returnExcess?: Address | null;
37
+ readonly mode?: HipoUnstakeMode;
38
+ readonly ownershipAssignedAmount?: bigint;
39
+ }
40
+ export interface HipoTreasuryFees {
41
+ readonly requestLoanFee: bigint;
42
+ readonly depositCoinsFee: bigint;
43
+ readonly unstakeAllTokensFee: bigint;
44
+ }
45
+ export interface HipoWalletFees {
46
+ readonly sendTokensFee: bigint;
47
+ readonly unstakeTokensFee: bigint;
48
+ readonly upgradeWalletFee: bigint;
49
+ readonly walletStorageFee: bigint;
50
+ }
51
+ export interface HipoWalletState {
52
+ readonly tokens: bigint;
53
+ /** Raw HashmapE cell; Hipo currently does not use this dictionary. */
54
+ readonly staking: Cell | null;
55
+ readonly unstaking: bigint;
56
+ }
57
+ /** Stable leading fields and append-only optional fields from get_treasury_state. */
58
+ export interface HipoTreasuryState {
59
+ readonly totalCoins: bigint;
60
+ readonly totalTokens: bigint;
61
+ readonly totalStaking: bigint;
62
+ readonly totalUnstaking: bigint;
63
+ readonly totalBorrowersStake: bigint;
64
+ readonly deficit: bigint;
65
+ readonly parent: Address | null;
66
+ readonly participations: Cell | null;
67
+ readonly roundsImbalance: bigint;
68
+ readonly stopped: boolean;
69
+ readonly instantMint: boolean;
70
+ readonly loanCodes: Cell;
71
+ readonly previousRate: bigint;
72
+ readonly currentRate: bigint;
73
+ readonly windowDuration: bigint;
74
+ readonly lastSettledRound: bigint;
75
+ readonly halter: Address;
76
+ readonly governor: Address;
77
+ /** Raw Maybe ^Cell returned by Hipo; it may contain proposed-governor data. */
78
+ readonly proposedGovernor: Cell | null;
79
+ readonly governanceFee: bigint;
80
+ readonly borrowerFee: bigint;
81
+ readonly collectionCodes: Cell;
82
+ readonly billCodes: Cell;
83
+ readonly oldParents: Cell | null;
84
+ readonly midRate?: bigint;
85
+ readonly midRound?: bigint;
86
+ readonly rewardShare?: bigint;
87
+ readonly totalRequestFees?: bigint;
88
+ readonly minEfficiency?: bigint;
89
+ readonly minRequestStake?: bigint;
90
+ readonly stakeCapFloor?: bigint;
91
+ /** Count of future append-only tuple values this SDK does not yet decode. */
92
+ readonly unknownAppendValueCount: number;
93
+ }
94
+ export interface HipoJettonData {
95
+ readonly totalSupply: bigint;
96
+ readonly mintable: boolean;
97
+ readonly adminAddress: Address;
98
+ readonly content: Cell;
99
+ readonly walletCode: Cell;
100
+ }
101
+ /** Build Hipo's treasury deposit message from the pinned TL-B schema. */
102
+ export declare function buildHipoDepositBody(input?: HipoDepositInput): Cell;
103
+ /** Build the optional mode/notification payload from Hipo's integration ABI. */
104
+ export declare function buildHipoUnstakeCustomPayload(input?: Pick<HipoUnstakeInput, "mode" | "ownershipAssignedAmount">): Cell | null;
105
+ /** Build the Hipo-specific Jetton burn/unstake message. */
106
+ export declare function buildHipoUnstakeBody(input: HipoUnstakeInput): Cell;
107
+ /** Decode Hipo's stable 24-field prefix and any known append-only tail fields. */
108
+ export declare function parseHipoTreasuryState(stack: TupleReader): HipoTreasuryState;
109
+ /** Hipo's liquid-staking treasury. */
110
+ export declare class HipoTreasury extends ContractWrapper {
111
+ private constructor();
112
+ static createFromAddress(address: Address): HipoTreasury;
113
+ static createMainnet(): HipoTreasury;
114
+ sendDepositCoins(provider: ContractProvider, via: Sender, input: HipoDepositInput, attachedValue: bigint): Promise<void>;
115
+ getTreasuryState(provider: ContractProvider): Promise<HipoTreasuryState>;
116
+ getTreasuryFees(provider: ContractProvider, ownershipAssignedAmount?: bigint): Promise<HipoTreasuryFees>;
117
+ }
118
+ /** hGRAM Jetton master/parent. */
119
+ export declare class HipoParent extends ContractWrapper {
120
+ private constructor();
121
+ static createFromAddress(address: Address): HipoParent;
122
+ static createMainnet(): HipoParent;
123
+ getWalletAddress(provider: ContractProvider, owner: Address): Promise<Address>;
124
+ getJettonData(provider: ContractProvider): Promise<HipoJettonData>;
125
+ }
126
+ /** User hGRAM Jetton wallet; unstake messages are sent by the wallet owner. */
127
+ export declare class HipoWallet extends ContractWrapper {
128
+ private readonly jettonWallet;
129
+ private constructor();
130
+ static createFromAddress(address: Address): HipoWallet;
131
+ getBalance(provider: ContractProvider): Promise<bigint>;
132
+ getWalletData(provider: ContractProvider): Promise<JettonWalletData>;
133
+ sendTransfer(provider: ContractProvider, via: Sender, input: JettonTransferInput, attachedValue: bigint): Promise<void>;
134
+ getWalletState(provider: ContractProvider): Promise<HipoWalletState>;
135
+ getWalletFees(provider: ContractProvider): Promise<HipoWalletFees>;
136
+ sendUnstakeTokens(provider: ContractProvider, via: Sender, input: HipoUnstakeInput, attachedValue: bigint): Promise<void>;
137
+ }
138
+ //#endregion