@tonappchain/sdk 0.6.5-smart-accounts-1 → 0.6.6-mainnet-alpha
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
CHANGED
|
@@ -50,7 +50,6 @@ The TAC SDK enables you to create frontends that:
|
|
|
50
50
|
- [`getUserJettonWalletAddress`](./docs/sdks/tac_sdk.md#getuserjettonwalletaddress): Calculates a user's Jetton wallet address.
|
|
51
51
|
- [`nativeTONAddress (getter)`](./docs/sdks/tac_sdk.md#nativetonaddress-getter): Placeholder address for native TON.
|
|
52
52
|
- [`nativeTACAddress (getter)`](./docs/sdks/tac_sdk.md#nativetacaddress-getter): Gets the native asset address on the TAC chain.
|
|
53
|
-
- [`getTacSmartAccountAddress`](./docs//sdks//tac_sdk.md#gettacsmartaccountaddress): Gets smart account address for TON user for specific TAC Application
|
|
54
53
|
- *(See file for more...)*
|
|
55
54
|
|
|
56
55
|
- **[`OperationTracker`](./docs/sdks/operation_tracker.md)**: Tools for monitoring cross-chain operation status.
|
package/dist/sdk/TacSdk.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export declare class TacSdk {
|
|
|
22
22
|
nativeTACAddress(): Promise<string>;
|
|
23
23
|
getUserJettonWalletAddress(userAddress: string, tokenAddress: string): Promise<string>;
|
|
24
24
|
getUserJettonBalance(userAddress: string, tokenAddress: string): Promise<bigint>;
|
|
25
|
-
getTacSmartAccountAddress(tvmUserAddress: string, evmApplicationAddress: string): Promise<string>;
|
|
26
25
|
getUserJettonBalanceExtended(userAddress: string, tokenAddress: string): Promise<UserWalletBalanceExtended>;
|
|
27
26
|
private getJettonTransferPayload;
|
|
28
27
|
private getJettonBurnPayload;
|
package/dist/sdk/TacSdk.js
CHANGED
|
@@ -95,7 +95,6 @@ class TacSdk {
|
|
|
95
95
|
const crossChainLayerTokenBytecode = TACParams?.crossChainLayerTokenBytecode ?? artifacts.tac.compilationArtifacts.CrossChainLayerToken.bytecode;
|
|
96
96
|
const crossChainLayerNFTABI = TACParams?.crossChainLayerNFTABI ?? artifacts.tac.compilationArtifacts.CrossChainLayerNFT.abi;
|
|
97
97
|
const crossChainLayerNFTBytecode = TACParams?.crossChainLayerNFTBytecode ?? artifacts.tac.compilationArtifacts.CrossChainLayerNFT.bytecode;
|
|
98
|
-
const smartAccountFactory = artifacts.tac.wrappers.TacSAFactory_factoryTAC.connect(artifacts.TAC_SMART_ACCOUNT_FACTORY_ADDRESS, provider);
|
|
99
98
|
return {
|
|
100
99
|
provider,
|
|
101
100
|
settings,
|
|
@@ -109,7 +108,6 @@ class TacSdk {
|
|
|
109
108
|
crossChainLayerTokenBytecode,
|
|
110
109
|
crossChainLayerNFTABI,
|
|
111
110
|
crossChainLayerNFTBytecode,
|
|
112
|
-
smartAccountFactory,
|
|
113
111
|
};
|
|
114
112
|
}
|
|
115
113
|
closeConnections() {
|
|
@@ -132,9 +130,6 @@ class TacSdk {
|
|
|
132
130
|
const userJettonWallet = this.TONParams.contractOpener.open(new JettonWallet_1.JettonWallet(ton_1.Address.parse(userJettonWalletAddress)));
|
|
133
131
|
return userJettonWallet.getJettonBalance();
|
|
134
132
|
}
|
|
135
|
-
async getTacSmartAccountAddress(tvmUserAddress, evmApplicationAddress) {
|
|
136
|
-
return await this.TACParams.smartAccountFactory.getSmartAccountForApplication(tvmUserAddress, evmApplicationAddress);
|
|
137
|
-
}
|
|
138
133
|
async getUserJettonBalanceExtended(userAddress, tokenAddress) {
|
|
139
134
|
const masterAddress = ton_1.Address.parse(tokenAddress);
|
|
140
135
|
const masterState = await this.TONParams.contractOpener.getContractState(masterAddress);
|
|
@@ -648,7 +643,7 @@ class TacSdk {
|
|
|
648
643
|
this.debugLog(`Operation IDs: ${(0, Utils_1.formatObjectForLogging)(operationIds)}`);
|
|
649
644
|
return transactionLinkers.map((linker) => ({
|
|
650
645
|
...linker,
|
|
651
|
-
operationId: operationIds[linker.shardsKey].operationIds
|
|
646
|
+
operationId: operationIds[linker.shardsKey].operationIds.at(0),
|
|
652
647
|
}));
|
|
653
648
|
}
|
|
654
649
|
catch (error) {
|
|
@@ -809,8 +804,8 @@ class TacSdk {
|
|
|
809
804
|
nftCollection = this.TONParams.contractOpener.open(wrappers_1.NFTCollection.createFromConfig({
|
|
810
805
|
adminAddress: (0, ton_1.address)(this.TONParams.crossChainLayerAddress),
|
|
811
806
|
newAdminAddress: null,
|
|
812
|
-
commonContent: (0, ton_1.beginCell)().endCell(),
|
|
813
807
|
collectionContent: (0, ton_1.beginCell)().endCell(),
|
|
808
|
+
commonContent: (0, ton_1.beginCell)().endCell(),
|
|
814
809
|
nftItemCode: this.TONParams.nftItemCode,
|
|
815
810
|
originalAddress: evmNFTAddress,
|
|
816
811
|
}, this.TONParams.nftCollectionCode));
|
|
@@ -62,7 +62,6 @@ export type InternalTACParams = {
|
|
|
62
62
|
crossChainLayer: testnet.tac.wrappers.CrossChainLayerTAC | mainnet.tac.wrappers.CrossChainLayerTAC;
|
|
63
63
|
settings: testnet.tac.wrappers.SettingsTAC | mainnet.tac.wrappers.SettingsTAC;
|
|
64
64
|
tokenUtils: testnet.tac.wrappers.TokenUtilsTAC | mainnet.tac.wrappers.TokenUtilsTAC;
|
|
65
|
-
smartAccountFactory: testnet.tac.wrappers.TacSAFactoryTAC | mainnet.tac.wrappers.TacSAFactoryTAC;
|
|
66
65
|
trustedTACExecutors: string[];
|
|
67
66
|
trustedTONExecutors: string[];
|
|
68
67
|
abiCoder: ethers.AbiCoder;
|
|
@@ -72,7 +72,7 @@ function readSnakeContent(slice, isFirst) {
|
|
|
72
72
|
}
|
|
73
73
|
let remainingBytes = Buffer.from('');
|
|
74
74
|
if (slice.remainingBits != 0) {
|
|
75
|
-
remainingBytes =
|
|
75
|
+
remainingBytes = slice.loadBuffer(slice.remainingBits / 8);
|
|
76
76
|
}
|
|
77
77
|
if (slice.remainingRefs != 0) {
|
|
78
78
|
const newCell = slice.loadRef();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tonappchain/sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6-mainnet-alpha",
|
|
4
4
|
"repository": "https://github.com/TacBuild/tac-sdk.git",
|
|
5
5
|
"author": "TAC. <developers@tac>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
"@ton/test-utils": "^0.5.0",
|
|
40
40
|
"@types/bn.js": "^5.1.6",
|
|
41
41
|
"@types/jest": "^29.5.14",
|
|
42
|
-
"@types/mocha": "^10.0.10",
|
|
43
42
|
"eslint": "^9.21.0",
|
|
44
43
|
"eslint-config-prettier": "^10.0.2",
|
|
45
44
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|