@tonappchain/sdk 0.7.3-rc1 → 0.7.3-rc2
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.
- package/dist/artifacts/dev/index.d.ts +2 -2
- package/dist/artifacts/dev/index.js +2 -1
- package/dist/artifacts/dev/ton/endpoints.d.ts +1 -0
- package/dist/artifacts/dev/ton/endpoints.js +2 -1
- package/dist/artifacts/mainnet/index.d.ts +2 -2
- package/dist/artifacts/mainnet/index.js +2 -1
- package/dist/artifacts/mainnet/ton/endpoints.d.ts +1 -0
- package/dist/artifacts/mainnet/ton/endpoints.js +2 -1
- package/dist/artifacts/testnet/index.d.ts +2 -2
- package/dist/artifacts/testnet/index.js +2 -1
- package/dist/artifacts/testnet/ton/endpoints.d.ts +1 -0
- package/dist/artifacts/testnet/ton/endpoints.js +2 -1
- package/dist/src/adapters/RetryableContractOpener.d.ts +6 -1
- package/dist/src/adapters/RetryableContractOpener.js +35 -8
- package/dist/src/adapters/ToncenterV3Indexer.d.ts +34 -0
- package/dist/src/adapters/ToncenterV3Indexer.js +123 -0
- package/dist/src/adapters/index.d.ts +1 -0
- package/dist/src/adapters/index.js +1 -0
- package/dist/src/assets/FT.js +1 -1
- package/dist/src/errors/index.d.ts +1 -1
- package/dist/src/errors/index.js +3 -1
- package/dist/src/errors/instances.d.ts +2 -0
- package/dist/src/errors/instances.js +5 -1
- package/dist/src/interfaces/ContractOpener.d.ts +1 -1
- package/dist/src/interfaces/ILiteSequencerClient.d.ts +5 -1
- package/dist/src/interfaces/IOperationTracker.d.ts +6 -0
- package/dist/src/interfaces/ITACTransactionManager.d.ts +4 -3
- package/dist/src/interfaces/ITacSDK.d.ts +26 -5
- package/dist/src/interfaces/IToncenterV3Indexer.d.ts +35 -0
- package/dist/src/interfaces/IToncenterV3Indexer.js +2 -0
- package/dist/src/interfaces/index.d.ts +1 -0
- package/dist/src/interfaces/index.js +1 -0
- package/dist/src/sdk/Consts.d.ts +2 -0
- package/dist/src/sdk/Consts.js +3 -1
- package/dist/src/sdk/LiteSequencerClient.d.ts +2 -1
- package/dist/src/sdk/LiteSequencerClient.js +22 -1
- package/dist/src/sdk/OperationTracker.d.ts +1 -0
- package/dist/src/sdk/OperationTracker.js +18 -0
- package/dist/src/sdk/TACTransactionManager.d.ts +3 -2
- package/dist/src/sdk/TACTransactionManager.js +45 -35
- package/dist/src/sdk/TacSdk.d.ts +6 -2
- package/dist/src/sdk/TacSdk.js +36 -2
- package/dist/src/sdk/Utils.js +2 -2
- package/dist/src/structs/InternalStruct.d.ts +8 -3
- package/dist/src/structs/Struct.d.ts +55 -2
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { Cell, OpenedContract } from '@ton/ton';
|
|
|
3
3
|
import { AbstractProvider } from 'ethers';
|
|
4
4
|
import { JettonMinter, JettonMinterData } from '../../artifacts/tonTypes';
|
|
5
5
|
import type { FT, NFT } from '../assets';
|
|
6
|
-
import type { Asset, ContractOpener, ILogger } from '../interfaces';
|
|
6
|
+
import type { Asset, ContractOpener, ILogger, IToncenterV3Indexer } from '../interfaces';
|
|
7
7
|
import { SendResult } from './InternalStruct';
|
|
8
8
|
export type ContractState = {
|
|
9
9
|
balance: bigint;
|
|
@@ -61,6 +61,11 @@ export type TONParams = {
|
|
|
61
61
|
* Provider for TON side. Use your own provider for tests or to increase ratelimit
|
|
62
62
|
*/
|
|
63
63
|
contractOpener?: ContractOpener;
|
|
64
|
+
/**
|
|
65
|
+
* Indexed Toncenter v3 client used to resolve TON transaction context by hash.
|
|
66
|
+
* Use your own implementation for tests or custom indexed backends.
|
|
67
|
+
*/
|
|
68
|
+
tonIndexer?: IToncenterV3Indexer;
|
|
64
69
|
/**
|
|
65
70
|
* Address of TON settings contract. Use only for tests.
|
|
66
71
|
*/
|
|
@@ -182,6 +187,54 @@ export type StageData = {
|
|
|
182
187
|
export type StatusInfo = StageData & {
|
|
183
188
|
stage: StageName;
|
|
184
189
|
};
|
|
190
|
+
/**
|
|
191
|
+
* Indexed transaction returned by Toncenter v3 `/transactions` and `/adjacentTransactions` endpoints.
|
|
192
|
+
*/
|
|
193
|
+
export type ToncenterV3IndexedTransaction = {
|
|
194
|
+
/** Account address that owns the transaction. */
|
|
195
|
+
account: string;
|
|
196
|
+
/** Indexed TON transaction hash. */
|
|
197
|
+
hash: string;
|
|
198
|
+
/** Optional trace identifier returned by Toncenter v3. */
|
|
199
|
+
traceId?: string;
|
|
200
|
+
/** Incoming message of the indexed transaction, when present in the response. */
|
|
201
|
+
inMsg?: {
|
|
202
|
+
/** Message source address. */
|
|
203
|
+
source?: string | null;
|
|
204
|
+
/** Message destination address. */
|
|
205
|
+
destination?: string | null;
|
|
206
|
+
/** Opcode reported by Toncenter v3 for the incoming message. */
|
|
207
|
+
opcode?: string | null;
|
|
208
|
+
/** Raw message content returned by Toncenter v3. */
|
|
209
|
+
messageContent?: {
|
|
210
|
+
/** BOC-encoded message body in base64 form. */
|
|
211
|
+
body?: string | null;
|
|
212
|
+
} | null;
|
|
213
|
+
} | null;
|
|
214
|
+
/** Outgoing messages of the indexed transaction. */
|
|
215
|
+
outMsgs: Array<{
|
|
216
|
+
/** Message destination address. `null` means external outbound log message. */
|
|
217
|
+
destination?: string | null;
|
|
218
|
+
/** Raw message content returned by Toncenter v3. */
|
|
219
|
+
messageContent?: {
|
|
220
|
+
/** BOC-encoded message body in base64 form. */
|
|
221
|
+
body?: string | null;
|
|
222
|
+
} | null;
|
|
223
|
+
}>;
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* Traversal settings for indexed search through a linked TON transaction chain in Toncenter v3.
|
|
227
|
+
*/
|
|
228
|
+
export type ToncenterV3TraversalParams = {
|
|
229
|
+
/**
|
|
230
|
+
* Maximum traversal depth from the starting transaction in the linked TON transaction chain.
|
|
231
|
+
*/
|
|
232
|
+
maxDepth?: number;
|
|
233
|
+
/**
|
|
234
|
+
* Maximum number of unique indexed transactions to inspect.
|
|
235
|
+
*/
|
|
236
|
+
maxScannedTransactions?: number;
|
|
237
|
+
};
|
|
185
238
|
export type ProfilingStageData = {
|
|
186
239
|
exists: boolean;
|
|
187
240
|
stageData: StageData | null;
|
|
@@ -419,7 +472,7 @@ export type CrossChainTransactionsOptions = {
|
|
|
419
472
|
waitOperationIds?: boolean;
|
|
420
473
|
waitOptions?: WaitOptions<OperationIdsByShardsKey>;
|
|
421
474
|
};
|
|
422
|
-
export type
|
|
475
|
+
export type CrossChainTransactionToTONOptions = {
|
|
423
476
|
/**
|
|
424
477
|
* Optional explicit TON-side executor fee.
|
|
425
478
|
* When omitted, the SDK calls OperationTracker.getTVMExecutorFee().
|