@tonappchain/sdk 0.6.2 → 0.6.4
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/sdk/TacSdk.d.ts +1 -1
- package/dist/sdk/TacSdk.js +11 -3
- package/package.json +4 -4
package/dist/sdk/TacSdk.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare class TacSdk {
|
|
|
46
46
|
get getTrustedTONExecutors(): string[];
|
|
47
47
|
getEVMTokenAddress(tvmTokenAddress: string): Promise<string>;
|
|
48
48
|
getTVMTokenAddress(evmTokenAddress: string): Promise<string>;
|
|
49
|
-
getTVMNFTAddress(evmNFTAddress: string, tokenId?: bigint): Promise<string>;
|
|
49
|
+
getTVMNFTAddress(evmNFTAddress: string, tokenId?: number | bigint): Promise<string>;
|
|
50
50
|
getEVMNFTAddress(tvmNFTAddress: string, addressType: NFTAddressType): Promise<string>;
|
|
51
51
|
isContractDeployedOnTVM(address: string): Promise<boolean>;
|
|
52
52
|
simulateTACMessage(req: TACSimulationRequest): Promise<TACSimulationResult>;
|
package/dist/sdk/TacSdk.js
CHANGED
|
@@ -687,6 +687,9 @@ class TacSdk {
|
|
|
687
687
|
const erc721Token = this.artifacts.tac.wrappers.CrossChainLayerERC721FactoryTAC.connect(evmNFTAddress, this.TACParams.provider);
|
|
688
688
|
const info = await erc721Token.getInfo();
|
|
689
689
|
nftCollection = this.TONParams.contractOpener.open(wrappers_1.NFTCollection.createFromAddress((0, ton_1.address)(info.tvmAddress)));
|
|
690
|
+
return tokenId == undefined
|
|
691
|
+
? nftCollection.address.toString()
|
|
692
|
+
: (await nftCollection.getNFTAddressByIndex(tokenId)).toString();
|
|
690
693
|
}
|
|
691
694
|
else {
|
|
692
695
|
nftCollection = this.TONParams.contractOpener.open(wrappers_1.NFTCollection.createFromConfig({
|
|
@@ -695,10 +698,15 @@ class TacSdk {
|
|
|
695
698
|
nftItemCode: this.TONParams.nftItemCode,
|
|
696
699
|
originalAddress: evmNFTAddress,
|
|
697
700
|
}, this.TONParams.nftCollectionCode));
|
|
701
|
+
return tokenId == undefined
|
|
702
|
+
? nftCollection.address.toString()
|
|
703
|
+
: wrappers_1.NFTItem.createFromConfig({
|
|
704
|
+
collectionAddress: nftCollection.address,
|
|
705
|
+
cclAddress: (0, ton_1.address)(this.TONParams.crossChainLayerAddress),
|
|
706
|
+
// @ts-ignore // bigint can be used, wrapper is not typed properly
|
|
707
|
+
index: tokenId,
|
|
708
|
+
}, this.TONParams.nftItemCode).address.toString();
|
|
698
709
|
}
|
|
699
|
-
return tokenId == undefined
|
|
700
|
-
? nftCollection.address.toString()
|
|
701
|
-
: (await nftCollection.getNFTAddressByIndex(tokenId)).toString();
|
|
702
710
|
}
|
|
703
711
|
async getEVMNFTAddress(tvmNFTAddress, addressType) {
|
|
704
712
|
(0, Utils_1.validateTVMAddress)(tvmNFTAddress);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tonappchain/sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"repository": "https://github.com/TacBuild/tac-sdk.git",
|
|
5
5
|
"author": "TAC. <developers@tac>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@aws-crypto/sha256-js": "^5.2.0",
|
|
21
21
|
"@orbs-network/ton-access": "^2.3.3",
|
|
22
22
|
"@ton/ton": "15.1.0",
|
|
23
|
-
"@tonappchain/artifacts": "0.0.
|
|
23
|
+
"@tonappchain/artifacts": "0.0.18",
|
|
24
24
|
"@tonappchain/ton-lite-client": "3.0.6",
|
|
25
25
|
"@tonconnect/ui": "^2.0.11",
|
|
26
26
|
"bn.js": "^5.2.1",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"jest": "^29.7.0",
|
|
46
46
|
"prettier": "^3.5.3",
|
|
47
47
|
"ts-jest": "^29.2.6",
|
|
48
|
-
"ts-node": "^10.9.2",
|
|
49
|
-
"typescript": "^5.7.
|
|
48
|
+
"ts-node": "^10.9.2",
|
|
49
|
+
"typescript": "^5.7.3",
|
|
50
50
|
"typescript-eslint": "^8.17.0"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|