@tonappchain/sdk 0.5.6 → 0.6.1-v3.0.1

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 (49) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +189 -1276
  3. package/package.json +67 -67
  4. package/dist/adapters/contractOpener.d.ts +0 -19
  5. package/dist/adapters/contractOpener.js +0 -94
  6. package/dist/errors/errors.d.ts +0 -34
  7. package/dist/errors/errors.js +0 -80
  8. package/dist/errors/index.d.ts +0 -2
  9. package/dist/errors/index.js +0 -30
  10. package/dist/errors/instances.d.ts +0 -16
  11. package/dist/errors/instances.js +0 -28
  12. package/dist/index.d.ts +0 -10
  13. package/dist/index.js +0 -35
  14. package/dist/sdk/Consts.d.ts +0 -6
  15. package/dist/sdk/Consts.js +0 -10
  16. package/dist/sdk/OperationTracker.d.ts +0 -14
  17. package/dist/sdk/OperationTracker.js +0 -151
  18. package/dist/sdk/StartTracking.d.ts +0 -8
  19. package/dist/sdk/StartTracking.js +0 -126
  20. package/dist/sdk/TacSdk.d.ts +0 -36
  21. package/dist/sdk/TacSdk.js +0 -364
  22. package/dist/sdk/Utils.d.ts +0 -18
  23. package/dist/sdk/Utils.js +0 -126
  24. package/dist/sender/RawSender.d.ts +0 -13
  25. package/dist/sender/RawSender.js +0 -37
  26. package/dist/sender/SenderAbstraction.d.ts +0 -19
  27. package/dist/sender/SenderAbstraction.js +0 -5
  28. package/dist/sender/SenderFactory.d.ts +0 -33
  29. package/dist/sender/SenderFactory.js +0 -55
  30. package/dist/sender/TonConnectSender.d.ts +0 -11
  31. package/dist/sender/TonConnectSender.js +0 -33
  32. package/dist/sender/index.d.ts +0 -2
  33. package/dist/sender/index.js +0 -18
  34. package/dist/structs/InternalStruct.d.ts +0 -54
  35. package/dist/structs/InternalStruct.js +0 -8
  36. package/dist/structs/Struct.d.ts +0 -227
  37. package/dist/structs/Struct.js +0 -38
  38. package/dist/wrappers/ContentUtils.d.ts +0 -25
  39. package/dist/wrappers/ContentUtils.js +0 -160
  40. package/dist/wrappers/HighloadQueryId.d.ts +0 -17
  41. package/dist/wrappers/HighloadQueryId.js +0 -72
  42. package/dist/wrappers/HighloadWalletV3.d.ts +0 -61
  43. package/dist/wrappers/HighloadWalletV3.js +0 -161
  44. package/dist/wrappers/JettonMaster.d.ts +0 -24
  45. package/dist/wrappers/JettonMaster.js +0 -53
  46. package/dist/wrappers/JettonWallet.d.ts +0 -46
  47. package/dist/wrappers/JettonWallet.js +0 -103
  48. package/dist/wrappers/Settings.d.ts +0 -10
  49. package/dist/wrappers/Settings.js +0 -38
package/package.json CHANGED
@@ -1,67 +1,67 @@
1
- {
2
- "name": "@tonappchain/sdk",
3
- "version": "0.5.6",
4
- "repository": "https://github.com/TacBuild/tac-sdk.git",
5
- "author": "TAC. <developers@tac>",
6
- "license": "MIT",
7
- "main": "dist/index.js",
8
- "files": [
9
- "dist"
10
- ],
11
- "scripts": {
12
- "build": "rm -rf dist && tsc --declaration",
13
- "test": "jest --verbose --runInBand",
14
- "release": "yarn build && yarn release-it --npm.yarn1",
15
- "lint": "eslint .",
16
- "lint:fix": "eslint . --fix",
17
- "prettier": "prettier --ignore-path .gitignore --write \"./src/**/*.+(js|ts|json)\""
18
- },
19
- "dependencies": {
20
- "@aws-crypto/sha256-js": "^5.2.0",
21
- "@orbs-network/ton-access": "^2.3.3",
22
- "@ton/ton": "15.1.0",
23
- "@tonappchain/artifacts": "0.0.16-v2",
24
- "@tonappchain/ton-lite-client": "3.0.6",
25
- "@tonconnect/ui": "^2.0.11",
26
- "bn.js": "^5.2.1",
27
- "cli-table3": "^0.6.5",
28
- "dotenv": "^16.4.7",
29
- "ethers": "^6.13.5",
30
- "ton-crypto": "^3.2.0"
31
- },
32
- "keywords": [],
33
- "description": "",
34
- "devDependencies": {
35
- "@eslint/js": "^9.21.0",
36
- "@jest/globals": "^29.7.0",
37
- "@release-it/keep-a-changelog": "^6.0.0",
38
- "@ton/sandbox": "^0.27.1",
39
- "@ton/test-utils": "^0.5.0",
40
- "@types/bn.js": "^5.1.6",
41
- "@types/jest": "^29.5.14",
42
- "eslint": "^9.21.0",
43
- "eslint-config-prettier": "^10.0.2",
44
- "eslint-plugin-simple-import-sort": "^12.1.1",
45
- "jest": "^29.7.0",
46
- "prettier": "^3.5.3",
47
- "ts-jest": "^29.2.6",
48
- "ts-node": "^10.9.2",
49
- "typescript": "^5.7.2",
50
- "typescript-eslint": "^8.17.0"
51
- },
52
- "publishConfig": {
53
- "access": "public",
54
- "registry": "https://registry.npmjs.org/"
55
- },
56
- "release-it": {
57
- "plugins": {
58
- "@release-it/keep-a-changelog": {
59
- "filename": "CHANGELOG.md"
60
- }
61
- },
62
- "npm": {
63
- "publish": false
64
- }
65
- },
66
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
67
- }
1
+ {
2
+ "name": "@tonappchain/sdk",
3
+ "version": "0.6.1-v3.0.1",
4
+ "repository": "https://github.com/TacBuild/tac-sdk.git",
5
+ "author": "TAC. <developers@tac>",
6
+ "license": "MIT",
7
+ "main": "dist/index.js",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "rm -rf dist && tsc --declaration",
13
+ "test": "jest --verbose --runInBand",
14
+ "release": "yarn build && yarn release-it --npm.yarn1",
15
+ "lint": "eslint .",
16
+ "lint:fix": "eslint . --fix",
17
+ "prettier": "prettier --ignore-path .gitignore --write \"./src/**/*.+(js|ts|json)\""
18
+ },
19
+ "dependencies": {
20
+ "@aws-crypto/sha256-js": "^5.2.0",
21
+ "@orbs-network/ton-access": "^2.3.3",
22
+ "@ton/ton": "15.1.0",
23
+ "@tonappchain/artifacts": "0.0.17-v3.0.1",
24
+ "@tonappchain/ton-lite-client": "3.0.6",
25
+ "@tonconnect/ui": "^2.0.11",
26
+ "bn.js": "^5.2.1",
27
+ "cli-table3": "^0.6.5",
28
+ "dotenv": "^16.4.7",
29
+ "ethers": "^6.13.5",
30
+ "ton-crypto": "^3.2.0"
31
+ },
32
+ "keywords": [],
33
+ "description": "",
34
+ "devDependencies": {
35
+ "@eslint/js": "^9.21.0",
36
+ "@jest/globals": "^29.7.0",
37
+ "@release-it/keep-a-changelog": "^6.0.0",
38
+ "@ton/sandbox": "^0.27.1",
39
+ "@ton/test-utils": "^0.5.0",
40
+ "@types/bn.js": "^5.1.6",
41
+ "@types/jest": "^29.5.14",
42
+ "eslint": "^9.21.0",
43
+ "eslint-config-prettier": "^10.0.2",
44
+ "eslint-plugin-simple-import-sort": "^12.1.1",
45
+ "jest": "^29.7.0",
46
+ "prettier": "^3.5.3",
47
+ "ts-jest": "^29.2.6",
48
+ "ts-node": "^10.9.2",
49
+ "typescript": "^5.7.2",
50
+ "typescript-eslint": "^8.17.0"
51
+ },
52
+ "publishConfig": {
53
+ "access": "public",
54
+ "registry": "https://registry.npmjs.org/"
55
+ },
56
+ "release-it": {
57
+ "plugins": {
58
+ "@release-it/keep-a-changelog": {
59
+ "filename": "CHANGELOG.md"
60
+ }
61
+ },
62
+ "npm": {
63
+ "publish": false
64
+ }
65
+ },
66
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
67
+ }
@@ -1,19 +0,0 @@
1
- import { ContractOpener, Network } from '../structs/Struct';
2
- import { Blockchain } from '@ton/sandbox';
3
- type LiteServer = {
4
- ip: number;
5
- port: number;
6
- id: {
7
- '@type': string;
8
- key: string;
9
- };
10
- };
11
- export declare function liteClientOpener(options: {
12
- liteservers: LiteServer[];
13
- } | {
14
- network: Network;
15
- }): Promise<ContractOpener>;
16
- export declare function sandboxOpener(blockchain: Blockchain): ContractOpener;
17
- export declare function orbsOpener(network: Network): Promise<ContractOpener>;
18
- export declare function orbsOpener4(network: Network, timeout?: number): Promise<ContractOpener>;
19
- export {};
@@ -1,94 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.liteClientOpener = liteClientOpener;
4
- exports.sandboxOpener = sandboxOpener;
5
- exports.orbsOpener = orbsOpener;
6
- exports.orbsOpener4 = orbsOpener4;
7
- const ton_lite_client_1 = require("@tonappchain/ton-lite-client");
8
- const Struct_1 = require("../structs/Struct");
9
- const ton_access_1 = require("@orbs-network/ton-access");
10
- const ton_1 = require("@ton/ton");
11
- const artifacts_1 = require("@tonappchain/artifacts");
12
- function intToIP(int) {
13
- var part1 = int & 255;
14
- var part2 = (int >> 8) & 255;
15
- var part3 = (int >> 16) & 255;
16
- var part4 = (int >> 24) & 255;
17
- return part4 + '.' + part3 + '.' + part2 + '.' + part1;
18
- }
19
- async function getDefaultLiteServers(network) {
20
- const url = network === Struct_1.Network.TESTNET ? artifacts_1.testnet.DEFAULT_LITESERVERS : artifacts_1.mainnet.DEFAULT_LITESERVERS;
21
- const resp = await fetch(url);
22
- const liteClients = await resp.json();
23
- return liteClients.liteservers;
24
- }
25
- async function liteClientOpener(options) {
26
- const liteservers = 'liteservers' in options ? options.liteservers : await getDefaultLiteServers(options.network);
27
- const engines = [];
28
- for (const server of liteservers) {
29
- const engine = await ton_lite_client_1.LiteSingleEngine.create({
30
- host: `tcp://${intToIP(server.ip)}:${server.port}`,
31
- publicKey: Buffer.from(server.id.key, 'base64'),
32
- });
33
- engines.push(engine);
34
- }
35
- const engine = new ton_lite_client_1.LiteRoundRobinEngine(engines);
36
- const client = new ton_lite_client_1.LiteClient({ engine });
37
- const closeConnections = () => {
38
- engine.close();
39
- };
40
- return {
41
- getContractState: async (addr) => {
42
- const block = await client.getMasterchainInfo();
43
- const state = await client.getAccountState(addr, block.last);
44
- const accountState = state.state?.storage?.state;
45
- const code = accountState?.type === 'active' ? accountState?.state?.code?.toBoc() : null;
46
- return {
47
- balance: state.balance.coins,
48
- state: state.state.storage.state.type === 'uninit' ? 'uninitialized' : state.state.storage.state.type,
49
- code: code ?? null,
50
- };
51
- },
52
- open: (contract) => client.open(contract),
53
- closeConnections,
54
- };
55
- }
56
- function sandboxOpener(blockchain) {
57
- return {
58
- open: (contract) => blockchain.openContract(contract),
59
- getContractState: async (address) => {
60
- const state = await blockchain.provider(address).getState();
61
- return {
62
- balance: state.balance,
63
- code: 'code' in state.state ? (state.state.code ?? null) : null,
64
- state: state.state.type === 'uninit' ? 'uninitialized' : state.state.type,
65
- };
66
- },
67
- };
68
- }
69
- async function orbsOpener(network) {
70
- const endpoint = await (0, ton_access_1.getHttpEndpoint)({
71
- network,
72
- });
73
- const client = new ton_1.TonClient({ endpoint });
74
- return client;
75
- }
76
- async function orbsOpener4(network, timeout = 10000) {
77
- const endpoint = await (0, ton_access_1.getHttpV4Endpoint)({ network });
78
- const client4 = new ton_1.TonClient4({ endpoint, timeout });
79
- return {
80
- open: (contract) => client4.open(contract),
81
- getContractState: async (address) => {
82
- const latestBlock = await client4.getLastBlock();
83
- const latestBlockNumber = latestBlock.last.seqno;
84
- const state = await client4.getAccount(latestBlockNumber, address);
85
- return {
86
- balance: BigInt(state.account.balance.coins),
87
- code: 'code' in state.account.state && state.account.state.code !== null
88
- ? Buffer.from(state.account.state.code, 'base64')
89
- : null,
90
- state: state.account.state.type === 'uninit' ? 'uninitialized' : state.account.state.type,
91
- };
92
- },
93
- };
94
- }
@@ -1,34 +0,0 @@
1
- export declare class ErrorWithStatusCode extends Error {
2
- readonly errorCode: number;
3
- constructor(message: string, errorCode: number);
4
- }
5
- export declare class ContractError extends ErrorWithStatusCode {
6
- constructor(message: string, errorCode: number);
7
- }
8
- export declare class FetchError extends ErrorWithStatusCode {
9
- constructor(message: string, errorCode: number);
10
- }
11
- export declare class AddressError extends ErrorWithStatusCode {
12
- constructor(message: string, errorCode: number);
13
- }
14
- export declare class WalletError extends ErrorWithStatusCode {
15
- constructor(message: string, errorCode: number);
16
- }
17
- export declare class KeyError extends ErrorWithStatusCode {
18
- constructor(message: string, errorCode: number);
19
- }
20
- export declare class FormatError extends ErrorWithStatusCode {
21
- constructor(message: string, errorCode: number);
22
- }
23
- export declare class BitError extends ErrorWithStatusCode {
24
- constructor(message: string, errorCode: number);
25
- }
26
- export declare class MetadataError extends ErrorWithStatusCode {
27
- constructor(message: string, errorCode: number);
28
- }
29
- export declare class SettingError extends ErrorWithStatusCode {
30
- constructor(message: string, errorCode: number);
31
- }
32
- export declare class EVMCallError extends ErrorWithStatusCode {
33
- constructor(message: string, errorCode: number);
34
- }
@@ -1,80 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EVMCallError = exports.SettingError = exports.MetadataError = exports.BitError = exports.FormatError = exports.KeyError = exports.WalletError = exports.AddressError = exports.FetchError = exports.ContractError = exports.ErrorWithStatusCode = void 0;
4
- class ErrorWithStatusCode extends Error {
5
- constructor(message, errorCode) {
6
- super(message);
7
- this.errorCode = errorCode;
8
- }
9
- }
10
- exports.ErrorWithStatusCode = ErrorWithStatusCode;
11
- class ContractError extends ErrorWithStatusCode {
12
- constructor(message, errorCode) {
13
- super(message, errorCode);
14
- this.name = 'ContractError';
15
- }
16
- }
17
- exports.ContractError = ContractError;
18
- class FetchError extends ErrorWithStatusCode {
19
- constructor(message, errorCode) {
20
- super(message, errorCode);
21
- this.name = 'FetchError';
22
- }
23
- }
24
- exports.FetchError = FetchError;
25
- class AddressError extends ErrorWithStatusCode {
26
- constructor(message, errorCode) {
27
- super(message, errorCode);
28
- this.name = 'AddressError';
29
- }
30
- }
31
- exports.AddressError = AddressError;
32
- class WalletError extends ErrorWithStatusCode {
33
- constructor(message, errorCode) {
34
- super(message, errorCode);
35
- this.name = 'WalletError';
36
- }
37
- }
38
- exports.WalletError = WalletError;
39
- class KeyError extends ErrorWithStatusCode {
40
- constructor(message, errorCode) {
41
- super(message, errorCode);
42
- this.name = 'KeyError';
43
- }
44
- }
45
- exports.KeyError = KeyError;
46
- class FormatError extends ErrorWithStatusCode {
47
- constructor(message, errorCode) {
48
- super(message, errorCode);
49
- this.name = 'FormatError';
50
- }
51
- }
52
- exports.FormatError = FormatError;
53
- class BitError extends ErrorWithStatusCode {
54
- constructor(message, errorCode) {
55
- super(message, errorCode);
56
- this.name = 'BitError';
57
- }
58
- }
59
- exports.BitError = BitError;
60
- class MetadataError extends ErrorWithStatusCode {
61
- constructor(message, errorCode) {
62
- super(message, errorCode);
63
- this.name = 'MetadataError';
64
- }
65
- }
66
- exports.MetadataError = MetadataError;
67
- class SettingError extends ErrorWithStatusCode {
68
- constructor(message, errorCode) {
69
- super(message, errorCode);
70
- this.name = 'SettingError';
71
- }
72
- }
73
- exports.SettingError = SettingError;
74
- class EVMCallError extends ErrorWithStatusCode {
75
- constructor(message, errorCode) {
76
- super(message, errorCode);
77
- this.name = 'EVMCallError';
78
- }
79
- }
80
- exports.EVMCallError = EVMCallError;
@@ -1,2 +0,0 @@
1
- export { emptyContractError, operationFetchError, statusFetchError, tvmAddressError, evmAddressError, unknownWalletError, unsupportedKeyError, unsupportedFormatError, notMultiplyOf8Error, prefixError, emptySettingError, invalidMethodNameError, simulationError, emptyArrayError, profilingFetchError, } from './instances';
2
- export { ContractError, FetchError, AddressError, WalletError, KeyError, FormatError, BitError, MetadataError, SettingError, EVMCallError, } from './errors';
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EVMCallError = exports.SettingError = exports.MetadataError = exports.BitError = exports.FormatError = exports.KeyError = exports.WalletError = exports.AddressError = exports.FetchError = exports.ContractError = exports.profilingFetchError = exports.emptyArrayError = exports.simulationError = exports.invalidMethodNameError = exports.emptySettingError = exports.prefixError = exports.notMultiplyOf8Error = exports.unsupportedFormatError = exports.unsupportedKeyError = exports.unknownWalletError = exports.evmAddressError = exports.tvmAddressError = exports.statusFetchError = exports.operationFetchError = exports.emptyContractError = void 0;
4
- var instances_1 = require("./instances");
5
- Object.defineProperty(exports, "emptyContractError", { enumerable: true, get: function () { return instances_1.emptyContractError; } });
6
- Object.defineProperty(exports, "operationFetchError", { enumerable: true, get: function () { return instances_1.operationFetchError; } });
7
- Object.defineProperty(exports, "statusFetchError", { enumerable: true, get: function () { return instances_1.statusFetchError; } });
8
- Object.defineProperty(exports, "tvmAddressError", { enumerable: true, get: function () { return instances_1.tvmAddressError; } });
9
- Object.defineProperty(exports, "evmAddressError", { enumerable: true, get: function () { return instances_1.evmAddressError; } });
10
- Object.defineProperty(exports, "unknownWalletError", { enumerable: true, get: function () { return instances_1.unknownWalletError; } });
11
- Object.defineProperty(exports, "unsupportedKeyError", { enumerable: true, get: function () { return instances_1.unsupportedKeyError; } });
12
- Object.defineProperty(exports, "unsupportedFormatError", { enumerable: true, get: function () { return instances_1.unsupportedFormatError; } });
13
- Object.defineProperty(exports, "notMultiplyOf8Error", { enumerable: true, get: function () { return instances_1.notMultiplyOf8Error; } });
14
- Object.defineProperty(exports, "prefixError", { enumerable: true, get: function () { return instances_1.prefixError; } });
15
- Object.defineProperty(exports, "emptySettingError", { enumerable: true, get: function () { return instances_1.emptySettingError; } });
16
- Object.defineProperty(exports, "invalidMethodNameError", { enumerable: true, get: function () { return instances_1.invalidMethodNameError; } });
17
- Object.defineProperty(exports, "simulationError", { enumerable: true, get: function () { return instances_1.simulationError; } });
18
- Object.defineProperty(exports, "emptyArrayError", { enumerable: true, get: function () { return instances_1.emptyArrayError; } });
19
- Object.defineProperty(exports, "profilingFetchError", { enumerable: true, get: function () { return instances_1.profilingFetchError; } });
20
- var errors_1 = require("./errors");
21
- Object.defineProperty(exports, "ContractError", { enumerable: true, get: function () { return errors_1.ContractError; } });
22
- Object.defineProperty(exports, "FetchError", { enumerable: true, get: function () { return errors_1.FetchError; } });
23
- Object.defineProperty(exports, "AddressError", { enumerable: true, get: function () { return errors_1.AddressError; } });
24
- Object.defineProperty(exports, "WalletError", { enumerable: true, get: function () { return errors_1.WalletError; } });
25
- Object.defineProperty(exports, "KeyError", { enumerable: true, get: function () { return errors_1.KeyError; } });
26
- Object.defineProperty(exports, "FormatError", { enumerable: true, get: function () { return errors_1.FormatError; } });
27
- Object.defineProperty(exports, "BitError", { enumerable: true, get: function () { return errors_1.BitError; } });
28
- Object.defineProperty(exports, "MetadataError", { enumerable: true, get: function () { return errors_1.MetadataError; } });
29
- Object.defineProperty(exports, "SettingError", { enumerable: true, get: function () { return errors_1.SettingError; } });
30
- Object.defineProperty(exports, "EVMCallError", { enumerable: true, get: function () { return errors_1.EVMCallError; } });
@@ -1,16 +0,0 @@
1
- import { ContractError, FetchError, AddressError, WalletError, KeyError, FormatError, BitError, MetadataError, SettingError, EVMCallError } from './errors';
2
- export declare const emptyContractError: ContractError;
3
- export declare const operationFetchError: FetchError;
4
- export declare const statusFetchError: (msg: string) => FetchError;
5
- export declare const tvmAddressError: (addr: string) => AddressError;
6
- export declare const evmAddressError: (addr: string) => AddressError;
7
- export declare const unknownWalletError: (version: string) => WalletError;
8
- export declare const unsupportedKeyError: (key: string) => KeyError;
9
- export declare const unsupportedFormatError: FormatError;
10
- export declare const notMultiplyOf8Error: BitError;
11
- export declare const prefixError: MetadataError;
12
- export declare const emptySettingError: (setting: string) => SettingError;
13
- export declare const invalidMethodNameError: (methodName: string) => EVMCallError;
14
- export declare const simulationError: FetchError;
15
- export declare const profilingFetchError: (msg: string) => FetchError;
16
- export declare const emptyArrayError: (msg: string) => FetchError;
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.emptyArrayError = exports.profilingFetchError = exports.simulationError = exports.invalidMethodNameError = exports.emptySettingError = exports.prefixError = exports.notMultiplyOf8Error = exports.unsupportedFormatError = exports.unsupportedKeyError = exports.unknownWalletError = exports.evmAddressError = exports.tvmAddressError = exports.statusFetchError = exports.operationFetchError = exports.emptyContractError = void 0;
4
- const errors_1 = require("./errors");
5
- exports.emptyContractError = new errors_1.ContractError('unexpected empty contract code of given jetton.', 100);
6
- exports.operationFetchError = new errors_1.FetchError('failed to fetch OperationId', 101);
7
- const statusFetchError = (msg) => new errors_1.FetchError(`failed to fetch status transaction: ${msg}`, 102);
8
- exports.statusFetchError = statusFetchError;
9
- const tvmAddressError = (addr) => new errors_1.AddressError(`invalid tvm address ${addr}`, 103);
10
- exports.tvmAddressError = tvmAddressError;
11
- const evmAddressError = (addr) => new errors_1.AddressError(`invalid evm address ${addr}`, 104);
12
- exports.evmAddressError = evmAddressError;
13
- const unknownWalletError = (version) => new errors_1.WalletError(`Unknown wallet version ${version}`, 105);
14
- exports.unknownWalletError = unknownWalletError;
15
- const unsupportedKeyError = (key) => new errors_1.KeyError(`Unsupported onchain key: ${key}`, 106);
16
- exports.unsupportedKeyError = unsupportedKeyError;
17
- exports.unsupportedFormatError = new errors_1.FormatError('Only snake format is supported', 107);
18
- exports.notMultiplyOf8Error = new errors_1.BitError('Number remaining of bits is not multiply of 8', 108);
19
- exports.prefixError = new errors_1.MetadataError('Unexpected wrappers metadata content prefix', 109);
20
- const emptySettingError = (setting) => new errors_1.SettingError(`unexpected empty ${setting}. Make sure the settings contract is valid.`, 110);
21
- exports.emptySettingError = emptySettingError;
22
- const invalidMethodNameError = (methodName) => new errors_1.EVMCallError(`Invalid Solidity method name: "${methodName}". Method must be either a valid identifier or have parameters (bytes,bytes).`, 111);
23
- exports.invalidMethodNameError = invalidMethodNameError;
24
- exports.simulationError = new errors_1.FetchError('Failed to simulate EVM call', 112);
25
- const profilingFetchError = (msg) => new errors_1.FetchError(`failed to fetch stage profiling: ${msg}`, 113);
26
- exports.profilingFetchError = profilingFetchError;
27
- const emptyArrayError = (msg) => new errors_1.FetchError(`empty array: ${msg}`, 114);
28
- exports.emptyArrayError = emptyArrayError;
package/dist/index.d.ts DELETED
@@ -1,10 +0,0 @@
1
- export { TacSdk } from './sdk/TacSdk';
2
- export { OperationTracker } from './sdk/OperationTracker';
3
- export { startTracking } from './sdk/StartTracking';
4
- export * from './sender';
5
- export * from './structs/Struct';
6
- export { Network, SimplifiedStatuses } from './structs/Struct';
7
- export type { JettonWalletData } from './wrappers/JettonWallet';
8
- export { JettonWallet, JettonWalletOpCodes } from './wrappers/JettonWallet';
9
- export { orbsOpener, liteClientOpener } from './adapters/contractOpener';
10
- export * from './errors';
package/dist/index.js DELETED
@@ -1,35 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.liteClientOpener = exports.orbsOpener = exports.JettonWalletOpCodes = exports.JettonWallet = exports.SimplifiedStatuses = exports.Network = exports.startTracking = exports.OperationTracker = exports.TacSdk = void 0;
18
- var TacSdk_1 = require("./sdk/TacSdk");
19
- Object.defineProperty(exports, "TacSdk", { enumerable: true, get: function () { return TacSdk_1.TacSdk; } });
20
- var OperationTracker_1 = require("./sdk/OperationTracker");
21
- Object.defineProperty(exports, "OperationTracker", { enumerable: true, get: function () { return OperationTracker_1.OperationTracker; } });
22
- var StartTracking_1 = require("./sdk/StartTracking");
23
- Object.defineProperty(exports, "startTracking", { enumerable: true, get: function () { return StartTracking_1.startTracking; } });
24
- __exportStar(require("./sender"), exports);
25
- __exportStar(require("./structs/Struct"), exports);
26
- var Struct_1 = require("./structs/Struct");
27
- Object.defineProperty(exports, "Network", { enumerable: true, get: function () { return Struct_1.Network; } });
28
- Object.defineProperty(exports, "SimplifiedStatuses", { enumerable: true, get: function () { return Struct_1.SimplifiedStatuses; } });
29
- var JettonWallet_1 = require("./wrappers/JettonWallet");
30
- Object.defineProperty(exports, "JettonWallet", { enumerable: true, get: function () { return JettonWallet_1.JettonWallet; } });
31
- Object.defineProperty(exports, "JettonWalletOpCodes", { enumerable: true, get: function () { return JettonWallet_1.JettonWalletOpCodes; } });
32
- var contractOpener_1 = require("./adapters/contractOpener");
33
- Object.defineProperty(exports, "orbsOpener", { enumerable: true, get: function () { return contractOpener_1.orbsOpener; } });
34
- Object.defineProperty(exports, "liteClientOpener", { enumerable: true, get: function () { return contractOpener_1.liteClientOpener; } });
35
- __exportStar(require("./errors"), exports);
@@ -1,6 +0,0 @@
1
- export declare const TRANSACTION_TON_AMOUNT: bigint;
2
- export declare const JETTON_TRANSFER_FORWARD_TON_AMOUNT: bigint;
3
- export declare const MAX_ITERATION_COUNT = 120;
4
- export declare const DEFAULT_DELAY = 0;
5
- export declare const SOLIDITY_SIGNATURE_REGEX: RegExp;
6
- export declare const SOLIDITY_METHOD_NAME_REGEX: RegExp;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SOLIDITY_METHOD_NAME_REGEX = exports.SOLIDITY_SIGNATURE_REGEX = exports.DEFAULT_DELAY = exports.MAX_ITERATION_COUNT = exports.JETTON_TRANSFER_FORWARD_TON_AMOUNT = exports.TRANSACTION_TON_AMOUNT = void 0;
4
- const ton_1 = require("@ton/ton");
5
- exports.TRANSACTION_TON_AMOUNT = (0, ton_1.toNano)(0.35);
6
- exports.JETTON_TRANSFER_FORWARD_TON_AMOUNT = (0, ton_1.toNano)(0.2);
7
- exports.MAX_ITERATION_COUNT = 120;
8
- exports.DEFAULT_DELAY = 0;
9
- exports.SOLIDITY_SIGNATURE_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]*(\((bytes,bytes)\))?$/;
10
- exports.SOLIDITY_METHOD_NAME_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
@@ -1,14 +0,0 @@
1
- import { Network, TransactionLinker, SimplifiedStatuses, StatusInfosByOperationId, StatusInfo, OperationIdsByShardsKey, ExecutionStages, ExecutionStagesByOperationId, OperationType } from '../structs/Struct';
2
- export declare class OperationTracker {
3
- readonly network: Network;
4
- readonly customLiteSequencerEndpoints: string[];
5
- constructor(network: Network, customLiteSequencerEndpoints?: string[]);
6
- getOperationType(operationId: string): Promise<OperationType>;
7
- getOperationId(transactionLinker: TransactionLinker): Promise<string>;
8
- getOperationIdsByShardsKeys(shardsKeys: string[], caller: string): Promise<OperationIdsByShardsKey>;
9
- getStageProfiling(operationId: string): Promise<ExecutionStages>;
10
- getStageProfilings(operationIds: string[]): Promise<ExecutionStagesByOperationId>;
11
- getOperationStatuses(operationIds: string[]): Promise<StatusInfosByOperationId>;
12
- getOperationStatus(operationId: string): Promise<StatusInfo>;
13
- getSimplifiedOperationStatus(transactionLinker: TransactionLinker): Promise<SimplifiedStatuses>;
14
- }