@ton-wallet/create 14.0.2 → 14.0.4

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 (123) hide show
  1. package/dist/client/TonClient.d.ts +228 -0
  2. package/dist/client/TonClient.js +441 -0
  3. package/dist/client/TonClient.spec.d.ts +1 -0
  4. package/dist/client/TonClient.spec.js +45 -0
  5. package/dist/client/TonClient4.d.ts +1130 -0
  6. package/dist/client/TonClient4.js +687 -0
  7. package/dist/client/TonClient4.spec.d.ts +1 -0
  8. package/dist/client/TonClient4.spec.js +42 -0
  9. package/dist/client/api/HttpApi.d.ts +764 -0
  10. package/dist/client/api/HttpApi.js +306 -0
  11. package/dist/client/api/TonCache.d.ts +16 -0
  12. package/dist/client/api/TonCache.js +33 -0
  13. package/dist/config/ConfigParser.d.ts +622 -0
  14. package/dist/config/ConfigParser.js +711 -0
  15. package/dist/config/ConfigParser.spec.d.ts +8 -0
  16. package/dist/config/ConfigParser.spec.js +97 -0
  17. package/dist/elector/ElectorContract.d.ts +51 -0
  18. package/dist/elector/ElectorContract.js +192 -0
  19. package/dist/elector/ElectorContract.spec.d.ts +8 -0
  20. package/dist/elector/ElectorContract.spec.js +104 -0
  21. package/dist/index.d.ts +33 -0
  22. package/dist/index.js +129 -0
  23. package/dist/jetton/JettonMaster.d.ts +21 -0
  24. package/dist/jetton/JettonMaster.js +39 -0
  25. package/dist/jetton/JettonMaster.spec.d.ts +8 -0
  26. package/dist/jetton/JettonMaster.spec.js +27 -0
  27. package/dist/jetton/JettonWallet.d.ts +14 -0
  28. package/dist/jetton/JettonWallet.js +27 -0
  29. package/dist/multisig/MultisigOrder.d.ts +17 -0
  30. package/dist/multisig/MultisigOrder.js +73 -0
  31. package/dist/multisig/MultisigOrder.spec.d.ts +1 -0
  32. package/dist/multisig/MultisigOrder.spec.js +139 -0
  33. package/dist/multisig/MultisigOrderBuilder.d.ts +13 -0
  34. package/dist/multisig/MultisigOrderBuilder.js +37 -0
  35. package/dist/multisig/MultisigWallet.d.ts +27 -0
  36. package/dist/multisig/MultisigWallet.js +134 -0
  37. package/dist/multisig/MultisigWallet.spec.d.ts +1 -0
  38. package/dist/multisig/MultisigWallet.spec.js +248 -0
  39. package/dist/utils/createTestClient.d.ts +9 -0
  40. package/dist/utils/createTestClient.js +18 -0
  41. package/dist/utils/createTestClient4.d.ts +9 -0
  42. package/dist/utils/createTestClient4.js +15 -0
  43. package/dist/utils/fees.d.ts +25 -0
  44. package/dist/utils/fees.js +105 -0
  45. package/dist/utils/fees.spec.d.ts +1 -0
  46. package/dist/utils/fees.spec.js +83 -0
  47. package/dist/utils/maybe.d.ts +8 -0
  48. package/dist/utils/maybe.js +9 -0
  49. package/dist/utils/randomTestKey.d.ts +8 -0
  50. package/dist/utils/randomTestKey.js +24 -0
  51. package/dist/utils/time.d.ts +15 -0
  52. package/dist/utils/time.js +63 -0
  53. package/dist/utils/toUrlSafe.d.ts +8 -0
  54. package/dist/utils/toUrlSafe.js +23 -0
  55. package/dist/wallets/WalletContractV1R1.d.ts +58 -0
  56. package/dist/wallets/WalletContractV1R1.js +100 -0
  57. package/dist/wallets/WalletContractV1R1.spec.d.ts +8 -0
  58. package/dist/wallets/WalletContractV1R1.spec.js +44 -0
  59. package/dist/wallets/WalletContractV1R2.d.ts +58 -0
  60. package/dist/wallets/WalletContractV1R2.js +101 -0
  61. package/dist/wallets/WalletContractV1R2.spec.d.ts +8 -0
  62. package/dist/wallets/WalletContractV1R2.spec.js +44 -0
  63. package/dist/wallets/WalletContractV1R3.d.ts +58 -0
  64. package/dist/wallets/WalletContractV1R3.js +101 -0
  65. package/dist/wallets/WalletContractV1R3.spec.d.ts +8 -0
  66. package/dist/wallets/WalletContractV1R3.spec.js +44 -0
  67. package/dist/wallets/WalletContractV2R1.d.ts +60 -0
  68. package/dist/wallets/WalletContractV2R1.js +102 -0
  69. package/dist/wallets/WalletContractV2R1.spec.d.ts +8 -0
  70. package/dist/wallets/WalletContractV2R1.spec.js +44 -0
  71. package/dist/wallets/WalletContractV2R2.d.ts +60 -0
  72. package/dist/wallets/WalletContractV2R2.js +102 -0
  73. package/dist/wallets/WalletContractV2R2.spec.d.ts +8 -0
  74. package/dist/wallets/WalletContractV2R2.spec.js +44 -0
  75. package/dist/wallets/WalletContractV3R1.d.ts +57 -0
  76. package/dist/wallets/WalletContractV3R1.js +104 -0
  77. package/dist/wallets/WalletContractV3R1.spec.d.ts +8 -0
  78. package/dist/wallets/WalletContractV3R1.spec.js +44 -0
  79. package/dist/wallets/WalletContractV3R2.d.ts +57 -0
  80. package/dist/wallets/WalletContractV3R2.js +104 -0
  81. package/dist/wallets/WalletContractV3R2.spec.d.ts +8 -0
  82. package/dist/wallets/WalletContractV3R2.spec.js +44 -0
  83. package/dist/wallets/WalletContractV3Types.d.ts +12 -0
  84. package/dist/wallets/WalletContractV3Types.js +2 -0
  85. package/dist/wallets/WalletContractV4.d.ts +65 -0
  86. package/dist/wallets/WalletContractV4.js +105 -0
  87. package/dist/wallets/WalletContractV4.spec.d.ts +8 -0
  88. package/dist/wallets/WalletContractV4.spec.js +48 -0
  89. package/dist/wallets/WalletContractV5Beta.d.ts +3 -0
  90. package/dist/wallets/WalletContractV5Beta.js +19 -0
  91. package/dist/wallets/WalletContractV5R1.d.ts +3 -0
  92. package/dist/wallets/WalletContractV5R1.js +19 -0
  93. package/dist/wallets/signing/createWalletTransfer.d.ts +48 -0
  94. package/dist/wallets/signing/createWalletTransfer.js +190 -0
  95. package/dist/wallets/signing/singer.d.ts +9 -0
  96. package/dist/wallets/signing/singer.js +21 -0
  97. package/dist/wallets/v5beta/WalletContractV5Beta.d.ts +130 -0
  98. package/dist/wallets/v5beta/WalletContractV5Beta.js +211 -0
  99. package/dist/wallets/v5beta/WalletContractV5Beta.spec.d.ts +8 -0
  100. package/dist/wallets/v5beta/WalletContractV5Beta.spec.js +298 -0
  101. package/dist/wallets/v5beta/WalletV5BetaActions.d.ts +6 -0
  102. package/dist/wallets/v5beta/WalletV5BetaActions.js +92 -0
  103. package/dist/wallets/v5beta/WalletV5BetaActions.spec.d.ts +1 -0
  104. package/dist/wallets/v5beta/WalletV5BetaActions.spec.js +166 -0
  105. package/dist/wallets/v5beta/WalletV5BetaWalletId.d.ts +13 -0
  106. package/dist/wallets/v5beta/WalletV5BetaWalletId.js +31 -0
  107. package/dist/wallets/v5beta/WalletV5BetaWalletId.spec.d.ts +1 -0
  108. package/dist/wallets/v5beta/WalletV5BetaWalletId.spec.js +68 -0
  109. package/dist/wallets/v5beta/WalletV5OutActions.d.ts +17 -0
  110. package/dist/wallets/v5beta/WalletV5OutActions.js +11 -0
  111. package/dist/wallets/v5r1/WalletContractV5R1.d.ts +125 -0
  112. package/dist/wallets/v5r1/WalletContractV5R1.js +207 -0
  113. package/dist/wallets/v5r1/WalletContractV5R1.spec.d.ts +8 -0
  114. package/dist/wallets/v5r1/WalletContractV5R1.spec.js +321 -0
  115. package/dist/wallets/v5r1/WalletV5R1Actions.d.ts +12 -0
  116. package/dist/wallets/v5r1/WalletV5R1Actions.js +128 -0
  117. package/dist/wallets/v5r1/WalletV5R1Actions.spec.d.ts +1 -0
  118. package/dist/wallets/v5r1/WalletV5R1Actions.spec.js +262 -0
  119. package/dist/wallets/v5r1/WalletV5R1WalletId.d.ts +47 -0
  120. package/dist/wallets/v5r1/WalletV5R1WalletId.js +69 -0
  121. package/dist/wallets/v5r1/WalletV5R1WalletId.spec.d.ts +1 -0
  122. package/dist/wallets/v5r1/WalletV5R1WalletId.spec.js +72 -0
  123. package/package.json +5 -2
@@ -0,0 +1,1130 @@
1
+ /**
2
+ * Copyright (c) Whales Corp.
3
+ * All Rights Reserved.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ /// <reference types="node" />
9
+ import { AxiosAdapter, InternalAxiosRequestConfig } from "axios";
10
+ import { Address, Contract, ContractProvider, OpenedContract, StateInit, Transaction, TupleItem, TupleReader } from "@ton/core";
11
+ import { z } from 'zod';
12
+ export type TonClient4Parameters = {
13
+ /**
14
+ * API endpoint
15
+ */
16
+ endpoint: string;
17
+ /**
18
+ * HTTP request timeout in milliseconds.
19
+ */
20
+ timeout?: number;
21
+ /**
22
+ * HTTP Adapter for axios
23
+ */
24
+ httpAdapter?: AxiosAdapter;
25
+ /**
26
+ * HTTP request interceptor for axios
27
+ */
28
+ requestInterceptor?: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig;
29
+ };
30
+ export declare class TonClient4 {
31
+ #private;
32
+ constructor(args: TonClient4Parameters);
33
+ /**
34
+ * Get Last Block
35
+ * @returns last block info
36
+ */
37
+ getLastBlock(): Promise<{
38
+ last: {
39
+ workchain: number;
40
+ shard: string;
41
+ seqno: number;
42
+ fileHash: string;
43
+ rootHash: string;
44
+ };
45
+ init: {
46
+ fileHash: string;
47
+ rootHash: string;
48
+ };
49
+ stateRootHash: string;
50
+ now: number;
51
+ }>;
52
+ /**
53
+ * Get block info
54
+ * @param seqno block sequence number
55
+ * @returns block info
56
+ */
57
+ getBlock(seqno: number): Promise<{
58
+ shards: {
59
+ workchain: number;
60
+ shard: string;
61
+ seqno: number;
62
+ transactions: {
63
+ lt: string;
64
+ hash: string;
65
+ account: string;
66
+ }[];
67
+ fileHash: string;
68
+ rootHash: string;
69
+ }[];
70
+ }>;
71
+ /**
72
+ * Get block info by unix timestamp
73
+ * @param ts unix timestamp
74
+ * @returns block info
75
+ */
76
+ getBlockByUtime(ts: number): Promise<{
77
+ shards: {
78
+ workchain: number;
79
+ shard: string;
80
+ seqno: number;
81
+ transactions: {
82
+ lt: string;
83
+ hash: string;
84
+ account: string;
85
+ }[];
86
+ fileHash: string;
87
+ rootHash: string;
88
+ }[];
89
+ }>;
90
+ /**
91
+ * Get block info by unix timestamp
92
+ * @param seqno block sequence number
93
+ * @param address account address
94
+ * @returns account info
95
+ */
96
+ getAccount(seqno: number, address: Address): Promise<{
97
+ account: {
98
+ balance: {
99
+ coins: string;
100
+ };
101
+ state: {
102
+ type: "uninit";
103
+ } | {
104
+ data: string | null;
105
+ code: string | null;
106
+ type: "active";
107
+ } | {
108
+ type: "frozen";
109
+ stateHash: string;
110
+ };
111
+ last: {
112
+ lt: string;
113
+ hash: string;
114
+ } | null;
115
+ storageStat: {
116
+ lastPaid: number;
117
+ duePayment: string | null;
118
+ used: {
119
+ bits: number;
120
+ cells: number;
121
+ publicCells: number;
122
+ };
123
+ } | null;
124
+ };
125
+ block: {
126
+ workchain: number;
127
+ shard: string;
128
+ seqno: number;
129
+ fileHash: string;
130
+ rootHash: string;
131
+ };
132
+ }>;
133
+ /**
134
+ * Get account lite info (without code and data)
135
+ * @param seqno block sequence number
136
+ * @param address account address
137
+ * @returns account lite info
138
+ */
139
+ getAccountLite(seqno: number, address: Address): Promise<{
140
+ account: {
141
+ balance: {
142
+ coins: string;
143
+ };
144
+ state: {
145
+ type: "uninit";
146
+ } | {
147
+ type: "active";
148
+ codeHash: string;
149
+ dataHash: string;
150
+ } | {
151
+ type: "frozen";
152
+ stateHash: string;
153
+ };
154
+ last: {
155
+ lt: string;
156
+ hash: string;
157
+ } | null;
158
+ storageStat: {
159
+ lastPaid: number;
160
+ duePayment: string | null;
161
+ used: {
162
+ bits: number;
163
+ cells: number;
164
+ publicCells: number;
165
+ };
166
+ } | null;
167
+ };
168
+ }>;
169
+ /**
170
+ * Check if contract is deployed
171
+ * @param address addres to check
172
+ * @returns true if contract is in active state
173
+ */
174
+ isContractDeployed(seqno: number, address: Address): Promise<boolean>;
175
+ /**
176
+ * Check if account was updated since
177
+ * @param seqno block sequence number
178
+ * @param address account address
179
+ * @param lt account last transaction lt
180
+ * @returns account change info
181
+ */
182
+ isAccountChanged(seqno: number, address: Address, lt: bigint): Promise<{
183
+ block: {
184
+ workchain: number;
185
+ shard: string;
186
+ seqno: number;
187
+ fileHash: string;
188
+ rootHash: string;
189
+ };
190
+ changed: boolean;
191
+ }>;
192
+ /**
193
+ * Load unparsed account transactions
194
+ * @param address address
195
+ * @param lt last transaction lt
196
+ * @param hash last transaction hash
197
+ * @returns unparsed transactions
198
+ */
199
+ getAccountTransactions(address: Address, lt: bigint, hash: Buffer): Promise<{
200
+ block: {
201
+ workchain: number;
202
+ seqno: number;
203
+ shard: string;
204
+ rootHash: string;
205
+ fileHash: string;
206
+ };
207
+ tx: Transaction;
208
+ }[]>;
209
+ /**
210
+ * Load parsed account transactions
211
+ * @param address address
212
+ * @param lt last transaction lt
213
+ * @param hash last transaction hash
214
+ * @param count number of transactions to load
215
+ * @returns parsed transactions
216
+ */
217
+ getAccountTransactionsParsed(address: Address, lt: bigint, hash: Buffer, count?: number): Promise<ParsedTransactions>;
218
+ /**
219
+ * Get network config
220
+ * @param seqno block sequence number
221
+ * @param ids optional config ids
222
+ * @returns network config
223
+ */
224
+ getConfig(seqno: number, ids?: number[]): Promise<{
225
+ config: {
226
+ cell: string;
227
+ address: string;
228
+ globalBalance: {
229
+ coins: string;
230
+ };
231
+ };
232
+ }>;
233
+ /**
234
+ * Execute run method
235
+ * @param seqno block sequence number
236
+ * @param address account address
237
+ * @param name method name
238
+ * @param args method arguments
239
+ * @returns method result
240
+ */
241
+ runMethod(seqno: number, address: Address, name: string, args?: TupleItem[]): Promise<{
242
+ exitCode: number;
243
+ result: TupleItem[];
244
+ resultRaw: string | null;
245
+ block: {
246
+ workchain: number;
247
+ shard: string;
248
+ seqno: number;
249
+ fileHash: string;
250
+ rootHash: string;
251
+ };
252
+ shardBlock: {
253
+ workchain: number;
254
+ shard: string;
255
+ seqno: number;
256
+ fileHash: string;
257
+ rootHash: string;
258
+ };
259
+ reader: TupleReader;
260
+ }>;
261
+ /**
262
+ * Send external message
263
+ * @param message message boc
264
+ * @returns message status
265
+ */
266
+ sendMessage(message: Buffer): Promise<{
267
+ status: any;
268
+ }>;
269
+ /**
270
+ * Open smart contract
271
+ * @param contract contract
272
+ * @returns opened contract
273
+ */
274
+ open<T extends Contract>(contract: T): OpenedContract<T>;
275
+ /**
276
+ * Open smart contract
277
+ * @param block block number
278
+ * @param contract contract
279
+ * @returns opened contract
280
+ */
281
+ openAt<T extends Contract>(block: number, contract: T): OpenedContract<T>;
282
+ /**
283
+ * Create provider
284
+ * @param address address
285
+ * @param init optional init data
286
+ * @returns provider
287
+ */
288
+ provider(address: Address, init?: StateInit | null): ContractProvider;
289
+ /**
290
+ * Create provider at specified block number
291
+ * @param block block number
292
+ * @param address address
293
+ * @param init optional init data
294
+ * @returns provider
295
+ */
296
+ providerAt(block: number, address: Address, init?: StateInit | null): ContractProvider;
297
+ }
298
+ declare const blocksCodec: z.ZodArray<z.ZodObject<{
299
+ workchain: z.ZodNumber;
300
+ seqno: z.ZodNumber;
301
+ shard: z.ZodString;
302
+ rootHash: z.ZodString;
303
+ fileHash: z.ZodString;
304
+ }, "strip", z.ZodTypeAny, {
305
+ workchain: number;
306
+ shard: string;
307
+ seqno: number;
308
+ fileHash: string;
309
+ rootHash: string;
310
+ }, {
311
+ workchain: number;
312
+ shard: string;
313
+ seqno: number;
314
+ fileHash: string;
315
+ rootHash: string;
316
+ }>, "many">;
317
+ declare const parsedTransactionCodec: z.ZodObject<{
318
+ address: z.ZodString;
319
+ lt: z.ZodString;
320
+ hash: z.ZodString;
321
+ prevTransaction: z.ZodObject<{
322
+ lt: z.ZodString;
323
+ hash: z.ZodString;
324
+ }, "strip", z.ZodTypeAny, {
325
+ lt: string;
326
+ hash: string;
327
+ }, {
328
+ lt: string;
329
+ hash: string;
330
+ }>;
331
+ time: z.ZodNumber;
332
+ outMessagesCount: z.ZodNumber;
333
+ oldStatus: z.ZodUnion<[z.ZodLiteral<"uninitialized">, z.ZodLiteral<"frozen">, z.ZodLiteral<"active">, z.ZodLiteral<"non-existing">]>;
334
+ newStatus: z.ZodUnion<[z.ZodLiteral<"uninitialized">, z.ZodLiteral<"frozen">, z.ZodLiteral<"active">, z.ZodLiteral<"non-existing">]>;
335
+ fees: z.ZodString;
336
+ update: z.ZodObject<{
337
+ oldHash: z.ZodString;
338
+ newHash: z.ZodString;
339
+ }, "strip", z.ZodTypeAny, {
340
+ oldHash: string;
341
+ newHash: string;
342
+ }, {
343
+ oldHash: string;
344
+ newHash: string;
345
+ }>;
346
+ inMessage: z.ZodUnion<[z.ZodObject<{
347
+ body: z.ZodString;
348
+ info: z.ZodUnion<[z.ZodObject<{
349
+ type: z.ZodLiteral<"internal">;
350
+ value: z.ZodString;
351
+ dest: z.ZodString;
352
+ src: z.ZodString;
353
+ bounced: z.ZodBoolean;
354
+ bounce: z.ZodBoolean;
355
+ ihrDisabled: z.ZodBoolean;
356
+ createdAt: z.ZodNumber;
357
+ createdLt: z.ZodString;
358
+ fwdFee: z.ZodString;
359
+ ihrFee: z.ZodString;
360
+ }, "strip", z.ZodTypeAny, {
361
+ value: string;
362
+ type: "internal";
363
+ dest: string;
364
+ src: string;
365
+ bounced: boolean;
366
+ bounce: boolean;
367
+ ihrDisabled: boolean;
368
+ createdAt: number;
369
+ createdLt: string;
370
+ fwdFee: string;
371
+ ihrFee: string;
372
+ }, {
373
+ value: string;
374
+ type: "internal";
375
+ dest: string;
376
+ src: string;
377
+ bounced: boolean;
378
+ bounce: boolean;
379
+ ihrDisabled: boolean;
380
+ createdAt: number;
381
+ createdLt: string;
382
+ fwdFee: string;
383
+ ihrFee: string;
384
+ }>, z.ZodObject<{
385
+ type: z.ZodLiteral<"external-in">;
386
+ dest: z.ZodString;
387
+ src: z.ZodUnion<[z.ZodObject<{
388
+ bits: z.ZodNumber;
389
+ data: z.ZodString;
390
+ }, "strip", z.ZodTypeAny, {
391
+ data: string;
392
+ bits: number;
393
+ }, {
394
+ data: string;
395
+ bits: number;
396
+ }>, z.ZodNull]>;
397
+ importFee: z.ZodString;
398
+ }, "strip", z.ZodTypeAny, {
399
+ type: "external-in";
400
+ dest: string;
401
+ src: {
402
+ data: string;
403
+ bits: number;
404
+ } | null;
405
+ importFee: string;
406
+ }, {
407
+ type: "external-in";
408
+ dest: string;
409
+ src: {
410
+ data: string;
411
+ bits: number;
412
+ } | null;
413
+ importFee: string;
414
+ }>, z.ZodObject<{
415
+ type: z.ZodLiteral<"external-out">;
416
+ dest: z.ZodUnion<[z.ZodObject<{
417
+ bits: z.ZodNumber;
418
+ data: z.ZodString;
419
+ }, "strip", z.ZodTypeAny, {
420
+ data: string;
421
+ bits: number;
422
+ }, {
423
+ data: string;
424
+ bits: number;
425
+ }>, z.ZodNull]>;
426
+ }, "strip", z.ZodTypeAny, {
427
+ type: "external-out";
428
+ dest: {
429
+ data: string;
430
+ bits: number;
431
+ } | null;
432
+ }, {
433
+ type: "external-out";
434
+ dest: {
435
+ data: string;
436
+ bits: number;
437
+ } | null;
438
+ }>]>;
439
+ init: z.ZodUnion<[z.ZodObject<{
440
+ splitDepth: z.ZodUnion<[z.ZodNumber, z.ZodNull]>;
441
+ code: z.ZodUnion<[z.ZodString, z.ZodNull]>;
442
+ data: z.ZodUnion<[z.ZodString, z.ZodNull]>;
443
+ special: z.ZodUnion<[z.ZodObject<{
444
+ tick: z.ZodBoolean;
445
+ tock: z.ZodBoolean;
446
+ }, "strip", z.ZodTypeAny, {
447
+ tick: boolean;
448
+ tock: boolean;
449
+ }, {
450
+ tick: boolean;
451
+ tock: boolean;
452
+ }>, z.ZodNull]>;
453
+ }, "strip", z.ZodTypeAny, {
454
+ data: string | null;
455
+ code: string | null;
456
+ splitDepth: number | null;
457
+ special: {
458
+ tick: boolean;
459
+ tock: boolean;
460
+ } | null;
461
+ }, {
462
+ data: string | null;
463
+ code: string | null;
464
+ splitDepth: number | null;
465
+ special: {
466
+ tick: boolean;
467
+ tock: boolean;
468
+ } | null;
469
+ }>, z.ZodNull]>;
470
+ }, "strip", z.ZodTypeAny, {
471
+ body: string;
472
+ init: {
473
+ data: string | null;
474
+ code: string | null;
475
+ splitDepth: number | null;
476
+ special: {
477
+ tick: boolean;
478
+ tock: boolean;
479
+ } | null;
480
+ } | null;
481
+ info: {
482
+ value: string;
483
+ type: "internal";
484
+ dest: string;
485
+ src: string;
486
+ bounced: boolean;
487
+ bounce: boolean;
488
+ ihrDisabled: boolean;
489
+ createdAt: number;
490
+ createdLt: string;
491
+ fwdFee: string;
492
+ ihrFee: string;
493
+ } | {
494
+ type: "external-in";
495
+ dest: string;
496
+ src: {
497
+ data: string;
498
+ bits: number;
499
+ } | null;
500
+ importFee: string;
501
+ } | {
502
+ type: "external-out";
503
+ dest: {
504
+ data: string;
505
+ bits: number;
506
+ } | null;
507
+ };
508
+ }, {
509
+ body: string;
510
+ init: {
511
+ data: string | null;
512
+ code: string | null;
513
+ splitDepth: number | null;
514
+ special: {
515
+ tick: boolean;
516
+ tock: boolean;
517
+ } | null;
518
+ } | null;
519
+ info: {
520
+ value: string;
521
+ type: "internal";
522
+ dest: string;
523
+ src: string;
524
+ bounced: boolean;
525
+ bounce: boolean;
526
+ ihrDisabled: boolean;
527
+ createdAt: number;
528
+ createdLt: string;
529
+ fwdFee: string;
530
+ ihrFee: string;
531
+ } | {
532
+ type: "external-in";
533
+ dest: string;
534
+ src: {
535
+ data: string;
536
+ bits: number;
537
+ } | null;
538
+ importFee: string;
539
+ } | {
540
+ type: "external-out";
541
+ dest: {
542
+ data: string;
543
+ bits: number;
544
+ } | null;
545
+ };
546
+ }>, z.ZodNull]>;
547
+ outMessages: z.ZodArray<z.ZodObject<{
548
+ body: z.ZodString;
549
+ info: z.ZodUnion<[z.ZodObject<{
550
+ type: z.ZodLiteral<"internal">;
551
+ value: z.ZodString;
552
+ dest: z.ZodString;
553
+ src: z.ZodString;
554
+ bounced: z.ZodBoolean;
555
+ bounce: z.ZodBoolean;
556
+ ihrDisabled: z.ZodBoolean;
557
+ createdAt: z.ZodNumber;
558
+ createdLt: z.ZodString;
559
+ fwdFee: z.ZodString;
560
+ ihrFee: z.ZodString;
561
+ }, "strip", z.ZodTypeAny, {
562
+ value: string;
563
+ type: "internal";
564
+ dest: string;
565
+ src: string;
566
+ bounced: boolean;
567
+ bounce: boolean;
568
+ ihrDisabled: boolean;
569
+ createdAt: number;
570
+ createdLt: string;
571
+ fwdFee: string;
572
+ ihrFee: string;
573
+ }, {
574
+ value: string;
575
+ type: "internal";
576
+ dest: string;
577
+ src: string;
578
+ bounced: boolean;
579
+ bounce: boolean;
580
+ ihrDisabled: boolean;
581
+ createdAt: number;
582
+ createdLt: string;
583
+ fwdFee: string;
584
+ ihrFee: string;
585
+ }>, z.ZodObject<{
586
+ type: z.ZodLiteral<"external-in">;
587
+ dest: z.ZodString;
588
+ src: z.ZodUnion<[z.ZodObject<{
589
+ bits: z.ZodNumber;
590
+ data: z.ZodString;
591
+ }, "strip", z.ZodTypeAny, {
592
+ data: string;
593
+ bits: number;
594
+ }, {
595
+ data: string;
596
+ bits: number;
597
+ }>, z.ZodNull]>;
598
+ importFee: z.ZodString;
599
+ }, "strip", z.ZodTypeAny, {
600
+ type: "external-in";
601
+ dest: string;
602
+ src: {
603
+ data: string;
604
+ bits: number;
605
+ } | null;
606
+ importFee: string;
607
+ }, {
608
+ type: "external-in";
609
+ dest: string;
610
+ src: {
611
+ data: string;
612
+ bits: number;
613
+ } | null;
614
+ importFee: string;
615
+ }>, z.ZodObject<{
616
+ type: z.ZodLiteral<"external-out">;
617
+ dest: z.ZodUnion<[z.ZodObject<{
618
+ bits: z.ZodNumber;
619
+ data: z.ZodString;
620
+ }, "strip", z.ZodTypeAny, {
621
+ data: string;
622
+ bits: number;
623
+ }, {
624
+ data: string;
625
+ bits: number;
626
+ }>, z.ZodNull]>;
627
+ }, "strip", z.ZodTypeAny, {
628
+ type: "external-out";
629
+ dest: {
630
+ data: string;
631
+ bits: number;
632
+ } | null;
633
+ }, {
634
+ type: "external-out";
635
+ dest: {
636
+ data: string;
637
+ bits: number;
638
+ } | null;
639
+ }>]>;
640
+ init: z.ZodUnion<[z.ZodObject<{
641
+ splitDepth: z.ZodUnion<[z.ZodNumber, z.ZodNull]>;
642
+ code: z.ZodUnion<[z.ZodString, z.ZodNull]>;
643
+ data: z.ZodUnion<[z.ZodString, z.ZodNull]>;
644
+ special: z.ZodUnion<[z.ZodObject<{
645
+ tick: z.ZodBoolean;
646
+ tock: z.ZodBoolean;
647
+ }, "strip", z.ZodTypeAny, {
648
+ tick: boolean;
649
+ tock: boolean;
650
+ }, {
651
+ tick: boolean;
652
+ tock: boolean;
653
+ }>, z.ZodNull]>;
654
+ }, "strip", z.ZodTypeAny, {
655
+ data: string | null;
656
+ code: string | null;
657
+ splitDepth: number | null;
658
+ special: {
659
+ tick: boolean;
660
+ tock: boolean;
661
+ } | null;
662
+ }, {
663
+ data: string | null;
664
+ code: string | null;
665
+ splitDepth: number | null;
666
+ special: {
667
+ tick: boolean;
668
+ tock: boolean;
669
+ } | null;
670
+ }>, z.ZodNull]>;
671
+ }, "strip", z.ZodTypeAny, {
672
+ body: string;
673
+ init: {
674
+ data: string | null;
675
+ code: string | null;
676
+ splitDepth: number | null;
677
+ special: {
678
+ tick: boolean;
679
+ tock: boolean;
680
+ } | null;
681
+ } | null;
682
+ info: {
683
+ value: string;
684
+ type: "internal";
685
+ dest: string;
686
+ src: string;
687
+ bounced: boolean;
688
+ bounce: boolean;
689
+ ihrDisabled: boolean;
690
+ createdAt: number;
691
+ createdLt: string;
692
+ fwdFee: string;
693
+ ihrFee: string;
694
+ } | {
695
+ type: "external-in";
696
+ dest: string;
697
+ src: {
698
+ data: string;
699
+ bits: number;
700
+ } | null;
701
+ importFee: string;
702
+ } | {
703
+ type: "external-out";
704
+ dest: {
705
+ data: string;
706
+ bits: number;
707
+ } | null;
708
+ };
709
+ }, {
710
+ body: string;
711
+ init: {
712
+ data: string | null;
713
+ code: string | null;
714
+ splitDepth: number | null;
715
+ special: {
716
+ tick: boolean;
717
+ tock: boolean;
718
+ } | null;
719
+ } | null;
720
+ info: {
721
+ value: string;
722
+ type: "internal";
723
+ dest: string;
724
+ src: string;
725
+ bounced: boolean;
726
+ bounce: boolean;
727
+ ihrDisabled: boolean;
728
+ createdAt: number;
729
+ createdLt: string;
730
+ fwdFee: string;
731
+ ihrFee: string;
732
+ } | {
733
+ type: "external-in";
734
+ dest: string;
735
+ src: {
736
+ data: string;
737
+ bits: number;
738
+ } | null;
739
+ importFee: string;
740
+ } | {
741
+ type: "external-out";
742
+ dest: {
743
+ data: string;
744
+ bits: number;
745
+ } | null;
746
+ };
747
+ }>, "many">;
748
+ parsed: z.ZodObject<{
749
+ seqno: z.ZodUnion<[z.ZodNumber, z.ZodNull]>;
750
+ body: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
751
+ type: z.ZodLiteral<"comment">;
752
+ comment: z.ZodString;
753
+ }, "strip", z.ZodTypeAny, {
754
+ type: "comment";
755
+ comment: string;
756
+ }, {
757
+ type: "comment";
758
+ comment: string;
759
+ }>, z.ZodObject<{
760
+ type: z.ZodLiteral<"payload">;
761
+ cell: z.ZodString;
762
+ }, "strip", z.ZodTypeAny, {
763
+ type: "payload";
764
+ cell: string;
765
+ }, {
766
+ type: "payload";
767
+ cell: string;
768
+ }>]>, z.ZodNull]>;
769
+ status: z.ZodUnion<[z.ZodLiteral<"success">, z.ZodLiteral<"failed">, z.ZodLiteral<"pending">]>;
770
+ dest: z.ZodUnion<[z.ZodString, z.ZodNull]>;
771
+ kind: z.ZodUnion<[z.ZodLiteral<"out">, z.ZodLiteral<"in">]>;
772
+ amount: z.ZodString;
773
+ resolvedAddress: z.ZodString;
774
+ bounced: z.ZodBoolean;
775
+ mentioned: z.ZodArray<z.ZodString, "many">;
776
+ }, "strip", z.ZodTypeAny, {
777
+ status: "success" | "failed" | "pending";
778
+ seqno: number | null;
779
+ body: {
780
+ type: "comment";
781
+ comment: string;
782
+ } | {
783
+ type: "payload";
784
+ cell: string;
785
+ } | null;
786
+ dest: string | null;
787
+ bounced: boolean;
788
+ kind: "out" | "in";
789
+ amount: string;
790
+ resolvedAddress: string;
791
+ mentioned: string[];
792
+ }, {
793
+ status: "success" | "failed" | "pending";
794
+ seqno: number | null;
795
+ body: {
796
+ type: "comment";
797
+ comment: string;
798
+ } | {
799
+ type: "payload";
800
+ cell: string;
801
+ } | null;
802
+ dest: string | null;
803
+ bounced: boolean;
804
+ kind: "out" | "in";
805
+ amount: string;
806
+ resolvedAddress: string;
807
+ mentioned: string[];
808
+ }>;
809
+ operation: z.ZodObject<{
810
+ address: z.ZodString;
811
+ comment: z.ZodOptional<z.ZodString>;
812
+ items: z.ZodArray<z.ZodUnion<[z.ZodObject<{
813
+ kind: z.ZodLiteral<"ton">;
814
+ amount: z.ZodString;
815
+ }, "strip", z.ZodTypeAny, {
816
+ kind: "ton";
817
+ amount: string;
818
+ }, {
819
+ kind: "ton";
820
+ amount: string;
821
+ }>, z.ZodObject<{
822
+ kind: z.ZodLiteral<"token">;
823
+ amount: z.ZodString;
824
+ }, "strip", z.ZodTypeAny, {
825
+ kind: "token";
826
+ amount: string;
827
+ }, {
828
+ kind: "token";
829
+ amount: string;
830
+ }>]>, "many">;
831
+ op: z.ZodOptional<z.ZodObject<{
832
+ type: z.ZodUnion<[z.ZodLiteral<"jetton::excesses">, z.ZodLiteral<"jetton::transfer">, z.ZodLiteral<"jetton::transfer_notification">, z.ZodLiteral<"deposit">, z.ZodLiteral<"deposit::ok">, z.ZodLiteral<"withdraw">, z.ZodLiteral<"withdraw::all">, z.ZodLiteral<"withdraw::delayed">, z.ZodLiteral<"withdraw::ok">, z.ZodLiteral<"airdrop">]>;
833
+ options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
834
+ }, "strip", z.ZodTypeAny, {
835
+ type: "jetton::excesses" | "jetton::transfer" | "jetton::transfer_notification" | "deposit" | "deposit::ok" | "withdraw" | "withdraw::all" | "withdraw::delayed" | "withdraw::ok" | "airdrop";
836
+ options?: Record<string, string> | undefined;
837
+ }, {
838
+ type: "jetton::excesses" | "jetton::transfer" | "jetton::transfer_notification" | "deposit" | "deposit::ok" | "withdraw" | "withdraw::all" | "withdraw::delayed" | "withdraw::ok" | "airdrop";
839
+ options?: Record<string, string> | undefined;
840
+ }>>;
841
+ }, "strip", z.ZodTypeAny, {
842
+ items: ({
843
+ kind: "ton";
844
+ amount: string;
845
+ } | {
846
+ kind: "token";
847
+ amount: string;
848
+ })[];
849
+ address: string;
850
+ comment?: string | undefined;
851
+ op?: {
852
+ type: "jetton::excesses" | "jetton::transfer" | "jetton::transfer_notification" | "deposit" | "deposit::ok" | "withdraw" | "withdraw::all" | "withdraw::delayed" | "withdraw::ok" | "airdrop";
853
+ options?: Record<string, string> | undefined;
854
+ } | undefined;
855
+ }, {
856
+ items: ({
857
+ kind: "ton";
858
+ amount: string;
859
+ } | {
860
+ kind: "token";
861
+ amount: string;
862
+ })[];
863
+ address: string;
864
+ comment?: string | undefined;
865
+ op?: {
866
+ type: "jetton::excesses" | "jetton::transfer" | "jetton::transfer_notification" | "deposit" | "deposit::ok" | "withdraw" | "withdraw::all" | "withdraw::delayed" | "withdraw::ok" | "airdrop";
867
+ options?: Record<string, string> | undefined;
868
+ } | undefined;
869
+ }>;
870
+ }, "strip", z.ZodTypeAny, {
871
+ lt: string;
872
+ hash: string;
873
+ fees: string;
874
+ address: string;
875
+ prevTransaction: {
876
+ lt: string;
877
+ hash: string;
878
+ };
879
+ time: number;
880
+ outMessagesCount: number;
881
+ oldStatus: "active" | "uninitialized" | "frozen" | "non-existing";
882
+ newStatus: "active" | "uninitialized" | "frozen" | "non-existing";
883
+ update: {
884
+ oldHash: string;
885
+ newHash: string;
886
+ };
887
+ inMessage: {
888
+ body: string;
889
+ init: {
890
+ data: string | null;
891
+ code: string | null;
892
+ splitDepth: number | null;
893
+ special: {
894
+ tick: boolean;
895
+ tock: boolean;
896
+ } | null;
897
+ } | null;
898
+ info: {
899
+ value: string;
900
+ type: "internal";
901
+ dest: string;
902
+ src: string;
903
+ bounced: boolean;
904
+ bounce: boolean;
905
+ ihrDisabled: boolean;
906
+ createdAt: number;
907
+ createdLt: string;
908
+ fwdFee: string;
909
+ ihrFee: string;
910
+ } | {
911
+ type: "external-in";
912
+ dest: string;
913
+ src: {
914
+ data: string;
915
+ bits: number;
916
+ } | null;
917
+ importFee: string;
918
+ } | {
919
+ type: "external-out";
920
+ dest: {
921
+ data: string;
922
+ bits: number;
923
+ } | null;
924
+ };
925
+ } | null;
926
+ outMessages: {
927
+ body: string;
928
+ init: {
929
+ data: string | null;
930
+ code: string | null;
931
+ splitDepth: number | null;
932
+ special: {
933
+ tick: boolean;
934
+ tock: boolean;
935
+ } | null;
936
+ } | null;
937
+ info: {
938
+ value: string;
939
+ type: "internal";
940
+ dest: string;
941
+ src: string;
942
+ bounced: boolean;
943
+ bounce: boolean;
944
+ ihrDisabled: boolean;
945
+ createdAt: number;
946
+ createdLt: string;
947
+ fwdFee: string;
948
+ ihrFee: string;
949
+ } | {
950
+ type: "external-in";
951
+ dest: string;
952
+ src: {
953
+ data: string;
954
+ bits: number;
955
+ } | null;
956
+ importFee: string;
957
+ } | {
958
+ type: "external-out";
959
+ dest: {
960
+ data: string;
961
+ bits: number;
962
+ } | null;
963
+ };
964
+ }[];
965
+ parsed: {
966
+ status: "success" | "failed" | "pending";
967
+ seqno: number | null;
968
+ body: {
969
+ type: "comment";
970
+ comment: string;
971
+ } | {
972
+ type: "payload";
973
+ cell: string;
974
+ } | null;
975
+ dest: string | null;
976
+ bounced: boolean;
977
+ kind: "out" | "in";
978
+ amount: string;
979
+ resolvedAddress: string;
980
+ mentioned: string[];
981
+ };
982
+ operation: {
983
+ items: ({
984
+ kind: "ton";
985
+ amount: string;
986
+ } | {
987
+ kind: "token";
988
+ amount: string;
989
+ })[];
990
+ address: string;
991
+ comment?: string | undefined;
992
+ op?: {
993
+ type: "jetton::excesses" | "jetton::transfer" | "jetton::transfer_notification" | "deposit" | "deposit::ok" | "withdraw" | "withdraw::all" | "withdraw::delayed" | "withdraw::ok" | "airdrop";
994
+ options?: Record<string, string> | undefined;
995
+ } | undefined;
996
+ };
997
+ }, {
998
+ lt: string;
999
+ hash: string;
1000
+ fees: string;
1001
+ address: string;
1002
+ prevTransaction: {
1003
+ lt: string;
1004
+ hash: string;
1005
+ };
1006
+ time: number;
1007
+ outMessagesCount: number;
1008
+ oldStatus: "active" | "uninitialized" | "frozen" | "non-existing";
1009
+ newStatus: "active" | "uninitialized" | "frozen" | "non-existing";
1010
+ update: {
1011
+ oldHash: string;
1012
+ newHash: string;
1013
+ };
1014
+ inMessage: {
1015
+ body: string;
1016
+ init: {
1017
+ data: string | null;
1018
+ code: string | null;
1019
+ splitDepth: number | null;
1020
+ special: {
1021
+ tick: boolean;
1022
+ tock: boolean;
1023
+ } | null;
1024
+ } | null;
1025
+ info: {
1026
+ value: string;
1027
+ type: "internal";
1028
+ dest: string;
1029
+ src: string;
1030
+ bounced: boolean;
1031
+ bounce: boolean;
1032
+ ihrDisabled: boolean;
1033
+ createdAt: number;
1034
+ createdLt: string;
1035
+ fwdFee: string;
1036
+ ihrFee: string;
1037
+ } | {
1038
+ type: "external-in";
1039
+ dest: string;
1040
+ src: {
1041
+ data: string;
1042
+ bits: number;
1043
+ } | null;
1044
+ importFee: string;
1045
+ } | {
1046
+ type: "external-out";
1047
+ dest: {
1048
+ data: string;
1049
+ bits: number;
1050
+ } | null;
1051
+ };
1052
+ } | null;
1053
+ outMessages: {
1054
+ body: string;
1055
+ init: {
1056
+ data: string | null;
1057
+ code: string | null;
1058
+ splitDepth: number | null;
1059
+ special: {
1060
+ tick: boolean;
1061
+ tock: boolean;
1062
+ } | null;
1063
+ } | null;
1064
+ info: {
1065
+ value: string;
1066
+ type: "internal";
1067
+ dest: string;
1068
+ src: string;
1069
+ bounced: boolean;
1070
+ bounce: boolean;
1071
+ ihrDisabled: boolean;
1072
+ createdAt: number;
1073
+ createdLt: string;
1074
+ fwdFee: string;
1075
+ ihrFee: string;
1076
+ } | {
1077
+ type: "external-in";
1078
+ dest: string;
1079
+ src: {
1080
+ data: string;
1081
+ bits: number;
1082
+ } | null;
1083
+ importFee: string;
1084
+ } | {
1085
+ type: "external-out";
1086
+ dest: {
1087
+ data: string;
1088
+ bits: number;
1089
+ } | null;
1090
+ };
1091
+ }[];
1092
+ parsed: {
1093
+ status: "success" | "failed" | "pending";
1094
+ seqno: number | null;
1095
+ body: {
1096
+ type: "comment";
1097
+ comment: string;
1098
+ } | {
1099
+ type: "payload";
1100
+ cell: string;
1101
+ } | null;
1102
+ dest: string | null;
1103
+ bounced: boolean;
1104
+ kind: "out" | "in";
1105
+ amount: string;
1106
+ resolvedAddress: string;
1107
+ mentioned: string[];
1108
+ };
1109
+ operation: {
1110
+ items: ({
1111
+ kind: "ton";
1112
+ amount: string;
1113
+ } | {
1114
+ kind: "token";
1115
+ amount: string;
1116
+ })[];
1117
+ address: string;
1118
+ comment?: string | undefined;
1119
+ op?: {
1120
+ type: "jetton::excesses" | "jetton::transfer" | "jetton::transfer_notification" | "deposit" | "deposit::ok" | "withdraw" | "withdraw::all" | "withdraw::delayed" | "withdraw::ok" | "airdrop";
1121
+ options?: Record<string, string> | undefined;
1122
+ } | undefined;
1123
+ };
1124
+ }>;
1125
+ export type ParsedTransaction = z.infer<typeof parsedTransactionCodec>;
1126
+ export type ParsedTransactions = {
1127
+ blocks: z.infer<typeof blocksCodec>;
1128
+ transactions: ParsedTransaction[];
1129
+ };
1130
+ export {};