@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.
@@ -11,14 +11,26 @@ export interface ContractOpener {
11
11
  closeConnections?: () => unknown;
12
12
  }
13
13
  export declare enum SimplifiedStatuses {
14
- Pending = 0,
15
- Failed = 1,
16
- Successful = 2,
17
- OperationIdNotFound = 3
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
- Testnet = "testnet",
21
- Mainnet = "mainnet"
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 EVMSimulationRequest = {
128
- evmCallParams: {
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: number;
136
- tvmAssets: {
147
+ shardsKey: string;
148
+ tonAssets: {
137
149
  amount: string;
138
150
  tokenAddress: string;
139
151
  }[];
140
- tvmCaller: string;
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: string;
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
- evmMerkleMsgCollected: ProfilingStageData;
166
- evmMerkleRootSet: ProfilingStageData;
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 EVMSimulationResults = {
194
+ export type TACSimulationResults = {
178
195
  estimatedGas: bigint;
179
196
  estimatedJettonFeeAmount: string;
180
197
  feeParams: {
@@ -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[SimplifiedStatuses["Pending"] = 0] = "Pending";
7
- SimplifiedStatuses[SimplifiedStatuses["Failed"] = 1] = "Failed";
8
- SimplifiedStatuses[SimplifiedStatuses["Successful"] = 2] = "Successful";
9
- SimplifiedStatuses[SimplifiedStatuses["OperationIdNotFound"] = 3] = "OperationIdNotFound";
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["Testnet"] = "testnet";
14
- Network["Mainnet"] = "mainnet";
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.0",
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"