@tonappchain/sdk 0.5.0 → 0.5.3
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/README.md +228 -149
- package/dist/adapters/contractOpener.js +1 -1
- package/dist/sdk/OperationTracker.d.ts +3 -4
- package/dist/sdk/OperationTracker.js +30 -18
- package/dist/sdk/StartTracking.d.ts +8 -2
- package/dist/sdk/StartTracking.js +77 -40
- package/dist/sdk/TacSdk.d.ts +3 -3
- package/dist/sdk/TacSdk.js +24 -21
- package/dist/sender/SenderFactory.d.ts +8 -8
- package/dist/sender/SenderFactory.js +15 -11
- package/dist/sender/TonConnectSender.d.ts +2 -1
- package/dist/sender/TonConnectSender.js +2 -2
- package/dist/structs/InternalStruct.d.ts +6 -4
- package/dist/structs/InternalStruct.js +2 -2
- package/dist/structs/Struct.d.ts +37 -20
- package/dist/structs/Struct.js +30 -7
- package/package.json +2 -1
package/dist/structs/Struct.d.ts
CHANGED
|
@@ -11,14 +11,26 @@ export interface ContractOpener {
|
|
|
11
11
|
closeConnections?: () => unknown;
|
|
12
12
|
}
|
|
13
13
|
export declare enum SimplifiedStatuses {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
PENDING = "PENDING",
|
|
15
|
+
FAILED = "FAILED",
|
|
16
|
+
SUCCESSFUL = "SUCCESSFUL",
|
|
17
|
+
OPERATION_ID_NOT_FOUND = "OPERATION_ID_NOT_FOUND"
|
|
18
18
|
}
|
|
19
19
|
export declare enum Network {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
TESTNET = "testnet",
|
|
21
|
+
MAINNET = "mainnet"
|
|
22
|
+
}
|
|
23
|
+
export declare enum BlockchainType {
|
|
24
|
+
TAC = "TAC",
|
|
25
|
+
TON = "TON"
|
|
26
|
+
}
|
|
27
|
+
export declare enum OperationType {
|
|
28
|
+
PENDING = "PENDING",
|
|
29
|
+
TON_TAC_TON = "TON-TAC-TON",
|
|
30
|
+
ROLLBACK = "ROLLBACK",
|
|
31
|
+
TON_TAC = "TON-TAC",
|
|
32
|
+
TAC_TON = "TAC-TON",
|
|
33
|
+
UNKNOWN = "UNKNOWN"
|
|
22
34
|
}
|
|
23
35
|
export type TACParams = {
|
|
24
36
|
/**
|
|
@@ -124,23 +136,32 @@ export type TransactionLinker = {
|
|
|
124
136
|
timestamp: number;
|
|
125
137
|
sendTransactionResult?: unknown;
|
|
126
138
|
};
|
|
127
|
-
export type
|
|
128
|
-
|
|
139
|
+
export type TACSimulationRequest = {
|
|
140
|
+
tacCallParams: {
|
|
129
141
|
arguments: string;
|
|
130
142
|
methodName: string;
|
|
131
143
|
target: string;
|
|
132
144
|
};
|
|
133
145
|
extraData: string;
|
|
134
146
|
feeAssetAddress: string;
|
|
135
|
-
shardsKey:
|
|
136
|
-
|
|
147
|
+
shardsKey: string;
|
|
148
|
+
tonAssets: {
|
|
137
149
|
amount: string;
|
|
138
150
|
tokenAddress: string;
|
|
139
151
|
}[];
|
|
140
|
-
|
|
141
|
-
};
|
|
152
|
+
tonCaller: string;
|
|
153
|
+
};
|
|
154
|
+
export declare enum StageName {
|
|
155
|
+
COLLECTED_IN_TAC = "collectedInTAC",
|
|
156
|
+
INCLUDED_IN_TAC_CONSENSUS = "includedInTACConsensus",
|
|
157
|
+
EXECUTED_IN_TAC = "executedInTAC",
|
|
158
|
+
COLLECTED_IN_TON = "collectedInTON",
|
|
159
|
+
INCLUDED_IN_TON_CONSENSUS = "includedInTONConsensus",
|
|
160
|
+
EXECUTED_IN_TON = "executedInTON"
|
|
161
|
+
}
|
|
142
162
|
export type TransactionData = {
|
|
143
163
|
hash: string;
|
|
164
|
+
blockchainType: BlockchainType;
|
|
144
165
|
};
|
|
145
166
|
export type NoteInfo = {
|
|
146
167
|
content: string;
|
|
@@ -155,26 +176,22 @@ export type StageData = {
|
|
|
155
176
|
note: NoteInfo | null;
|
|
156
177
|
};
|
|
157
178
|
export type StatusInfo = StageData & {
|
|
158
|
-
stage:
|
|
179
|
+
stage: StageName;
|
|
159
180
|
};
|
|
160
181
|
export type ProfilingStageData = {
|
|
161
182
|
exists: boolean;
|
|
162
183
|
stageData: StageData | null;
|
|
163
184
|
};
|
|
164
185
|
export type ExecutionStages = {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
evmMerkleMsgExecuted: ProfilingStageData;
|
|
168
|
-
tvmMerkleMsgCollected: ProfilingStageData;
|
|
169
|
-
tvmMerkleMsgExecuted: ProfilingStageData;
|
|
170
|
-
};
|
|
186
|
+
operationType: OperationType;
|
|
187
|
+
} & Record<StageName, ProfilingStageData>;
|
|
171
188
|
export type ExecutionStagesByOperationId = Record<string, ExecutionStages>;
|
|
172
189
|
export type StatusInfosByOperationId = Record<string, StatusInfo>;
|
|
173
190
|
export type OperationIds = {
|
|
174
191
|
operationIds: string[];
|
|
175
192
|
};
|
|
176
193
|
export type OperationIdsByShardsKey = Record<string, OperationIds>;
|
|
177
|
-
export type
|
|
194
|
+
export type TACSimulationResults = {
|
|
178
195
|
estimatedGas: bigint;
|
|
179
196
|
estimatedJettonFeeAmount: string;
|
|
180
197
|
feeParams: {
|
package/dist/structs/Struct.js
CHANGED
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Network = exports.SimplifiedStatuses = void 0;
|
|
3
|
+
exports.StageName = exports.OperationType = exports.BlockchainType = exports.Network = exports.SimplifiedStatuses = void 0;
|
|
4
4
|
var SimplifiedStatuses;
|
|
5
5
|
(function (SimplifiedStatuses) {
|
|
6
|
-
SimplifiedStatuses[
|
|
7
|
-
SimplifiedStatuses[
|
|
8
|
-
SimplifiedStatuses[
|
|
9
|
-
SimplifiedStatuses[
|
|
6
|
+
SimplifiedStatuses["PENDING"] = "PENDING";
|
|
7
|
+
SimplifiedStatuses["FAILED"] = "FAILED";
|
|
8
|
+
SimplifiedStatuses["SUCCESSFUL"] = "SUCCESSFUL";
|
|
9
|
+
SimplifiedStatuses["OPERATION_ID_NOT_FOUND"] = "OPERATION_ID_NOT_FOUND";
|
|
10
10
|
})(SimplifiedStatuses || (exports.SimplifiedStatuses = SimplifiedStatuses = {}));
|
|
11
11
|
var Network;
|
|
12
12
|
(function (Network) {
|
|
13
|
-
Network["
|
|
14
|
-
Network["
|
|
13
|
+
Network["TESTNET"] = "testnet";
|
|
14
|
+
Network["MAINNET"] = "mainnet";
|
|
15
15
|
})(Network || (exports.Network = Network = {}));
|
|
16
|
+
var BlockchainType;
|
|
17
|
+
(function (BlockchainType) {
|
|
18
|
+
BlockchainType["TAC"] = "TAC";
|
|
19
|
+
BlockchainType["TON"] = "TON";
|
|
20
|
+
})(BlockchainType || (exports.BlockchainType = BlockchainType = {}));
|
|
21
|
+
var OperationType;
|
|
22
|
+
(function (OperationType) {
|
|
23
|
+
OperationType["PENDING"] = "PENDING";
|
|
24
|
+
OperationType["TON_TAC_TON"] = "TON-TAC-TON";
|
|
25
|
+
OperationType["ROLLBACK"] = "ROLLBACK";
|
|
26
|
+
OperationType["TON_TAC"] = "TON-TAC";
|
|
27
|
+
OperationType["TAC_TON"] = "TAC-TON";
|
|
28
|
+
OperationType["UNKNOWN"] = "UNKNOWN";
|
|
29
|
+
})(OperationType || (exports.OperationType = OperationType = {}));
|
|
30
|
+
var StageName;
|
|
31
|
+
(function (StageName) {
|
|
32
|
+
StageName["COLLECTED_IN_TAC"] = "collectedInTAC";
|
|
33
|
+
StageName["INCLUDED_IN_TAC_CONSENSUS"] = "includedInTACConsensus";
|
|
34
|
+
StageName["EXECUTED_IN_TAC"] = "executedInTAC";
|
|
35
|
+
StageName["COLLECTED_IN_TON"] = "collectedInTON";
|
|
36
|
+
StageName["INCLUDED_IN_TON_CONSENSUS"] = "includedInTONConsensus";
|
|
37
|
+
StageName["EXECUTED_IN_TON"] = "executedInTON";
|
|
38
|
+
})(StageName || (exports.StageName = StageName = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tonappchain/sdk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"repository": "https://github.com/TacBuild/tac-sdk.git",
|
|
5
5
|
"author": "TAC. <developers@tac>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"@tonappchain/ton-lite-client": "3.0.6",
|
|
25
25
|
"@tonconnect/ui": "^2.0.11",
|
|
26
26
|
"bn.js": "^5.2.1",
|
|
27
|
+
"cli-table3": "^0.6.5",
|
|
27
28
|
"dotenv": "^16.4.7",
|
|
28
29
|
"ethers": "^6.13.5",
|
|
29
30
|
"ton-crypto": "^3.2.0"
|