wan-ton-sdk 0.0.7 → 0.0.9
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/Bridge.compile.d.ts +2 -0
- package/dist/Bridge.compile.js +9 -0
- package/dist/Bridge.d.ts +208 -0
- package/dist/Bridge.js +468 -0
- package/dist/Fake.compile.d.ts +2 -0
- package/dist/Fake.compile.js +9 -0
- package/dist/GroupApprove.compile.d.ts +2 -0
- package/dist/GroupApprove.compile.js +7 -0
- package/dist/GroupApprove.d.ts +124 -0
- package/dist/GroupApprove.js +181 -0
- package/dist/JettonMinter.compile.d.ts +2 -0
- package/dist/JettonMinter.compile.js +6 -0
- package/dist/JettonMinter.d.ts +45 -0
- package/dist/JettonMinter.js +124 -0
- package/dist/JettonWallet.compile.d.ts +2 -0
- package/dist/JettonWallet.compile.js +6 -0
- package/dist/JettonWallet.d.ts +26 -0
- package/dist/JettonWallet.js +103 -0
- package/dist/Signature.compile.d.ts +2 -0
- package/dist/Signature.compile.js +7 -0
- package/dist/Signature.d.ts +44 -0
- package/dist/Signature.js +106 -0
- package/dist/address.compile.d.ts +2 -0
- package/dist/address.compile.js +9 -0
- package/dist/client/client-interface.d.ts +35 -0
- package/dist/client/client-interface.js +9 -0
- package/dist/client/client.d.ts +22 -0
- package/dist/client/client.js +86 -0
- package/dist/client/tonapi-client.d.ts +4630 -0
- package/dist/client/tonapi-client.js +5376 -0
- package/dist/code/encode-decode.d.ts +132 -0
- package/dist/code/encode-decode.js +645 -0
- package/dist/code/userLock.d.ts +39 -0
- package/dist/code/userLock.js +284 -0
- package/dist/common.d.ts +9 -0
- package/dist/common.js +45 -0
- package/dist/config/config-ex.d.ts +7 -0
- package/dist/config/config-ex.js +73 -0
- package/dist/const/const-value.d.ts +21 -0
- package/dist/const/const-value.js +26 -0
- package/dist/contractAccess/bridgeAccess.d.ts +10 -0
- package/dist/contractAccess/bridgeAccess.js +55 -0
- package/dist/contractAccess/groupApproveAccess.d.ts +10 -0
- package/dist/contractAccess/groupApproveAccess.js +54 -0
- package/dist/db/Db.d.ts +24 -0
- package/dist/db/Db.js +739 -0
- package/dist/db/DbAccess.d.ts +24 -0
- package/dist/db/DbAccess.js +211 -0
- package/dist/db/common.d.ts +5 -0
- package/dist/db/common.js +114 -0
- package/dist/event/getEvents.d.ts +17 -0
- package/dist/event/getEvents.js +387 -0
- package/dist/example/db/createDb-ex.d.ts +1 -0
- package/{example/createDb-ex.ts → dist/example/db/createDb-ex.js} +3 -4
- package/dist/example/db/dbFeedTrans-ex.d.ts +1 -0
- package/{example/dbFeedTrans-ex.ts → dist/example/db/dbFeedTrans-ex.js} +9 -11
- package/dist/example/event/getAllEvents-ex.d.ts +1 -0
- package/dist/example/event/getAllEvents-ex.js +70 -0
- package/dist/example/event/getEventByHash-ex.d.ts +1 -0
- package/{example/getEventByHash-ex.ts → dist/example/event/getEventByHash-ex.js} +21 -25
- package/dist/example/event/getEventsByRange-ex.d.ts +1 -0
- package/dist/example/event/getEventsByRange-ex.js +58 -0
- package/dist/example/getAllTrans.d.ts +1 -0
- package/dist/example/getAllTrans.js +30 -0
- package/dist/example/jetton/getJettonInfo-ex.d.ts +1 -0
- package/dist/example/jetton/getJettonInfo-ex.js +32 -0
- package/dist/example/lock-release/smgRelease-ex.d.ts +1 -0
- package/dist/example/lock-release/smgRelease-ex.js +134 -0
- package/dist/example/lock-release/userLock-ex.d.ts +1 -0
- package/dist/example/lock-release/userLock-ex.js +69 -0
- package/dist/example/manage/addSmg-ex.d.ts +1 -0
- package/dist/example/manage/addSmg-ex.js +59 -0
- package/dist/example/manage/compileContract-ex.d.ts +1 -0
- package/dist/example/manage/compileContract-ex.js +11 -0
- package/dist/example/manage/deploy-ex.d.ts +1 -0
- package/dist/example/manage/deploy-ex.js +58 -0
- package/dist/example/manage/setFee-ex.d.ts +1 -0
- package/dist/example/manage/setFee-ex.js +61 -0
- package/dist/example/manage/setFeeProxy.d.ts +1 -0
- package/dist/example/manage/setFeeProxy.js +47 -0
- package/dist/example/manage/upgradeBridgeSc-ex.d.ts +1 -0
- package/dist/example/manage/upgradeBridgeSc-ex.js +44 -0
- package/dist/example/token/AddToken-ex.d.ts +1 -0
- package/dist/example/token/AddToken-ex.js +113 -0
- package/dist/example/token/addTokenPair-ex.d.ts +1 -0
- package/dist/example/token/addTokenPair-ex.js +59 -0
- package/dist/example/token/delTokenPair-ex.d.ts +1 -0
- package/dist/example/token/delTokenPair-ex.js +49 -0
- package/dist/example/token/getTokenPair-ex.d.ts +1 -0
- package/dist/example/token/getTokenPair-ex.js +39 -0
- package/dist/example/token/mintToken-ex.d.ts +1 -0
- package/dist/example/token/mintToken-ex.js +56 -0
- package/dist/example/tran/converTranToTonTran.d.ts +1 -0
- package/dist/example/tran/converTranToTonTran.js +32 -0
- package/dist/example/tran/getTransByRange-ex.d.ts +1 -0
- package/{example/getTransByRange-ex.ts → dist/example/tran/getTransByRange-ex.js} +26 -40
- package/dist/example/tran/getTransaction-ex.d.ts +1 -0
- package/dist/example/tran/getTransaction-ex.js +47 -0
- package/dist/example/tran/isTranSuccess-ex.d.ts +1 -0
- package/dist/example/tran/isTranSuccess-ex.js +27 -0
- package/dist/fee/fee.d.ts +12 -0
- package/dist/fee/fee.js +21 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +95 -0
- package/dist/jest.config.d.ts +3 -0
- package/dist/jest.config.js +8 -0
- package/dist/opcodes.d.ts +55 -0
- package/dist/opcodes.js +59 -0
- package/dist/sign/buildHash.d.ts +6 -0
- package/dist/sign/buildHash.js +39 -0
- package/dist/sign/rawTrans.d.ts +36 -0
- package/dist/sign/rawTrans.js +89 -0
- package/dist/sign/tools-secp256k1.d.ts +21 -0
- package/{sign → dist/sign}/tools-secp256k1.js +18 -44
- package/dist/testData/JettonMinter.compile.func.d.ts +2 -0
- package/dist/testData/JettonMinter.compile.func.js +13 -0
- package/dist/testData/JettonWallet.compile.func.d.ts +2 -0
- package/dist/testData/JettonWallet.compile.func.js +13 -0
- package/dist/testData/bridge.compile.func.d.ts +2 -0
- package/dist/testData/bridge.compile.func.js +13 -0
- package/dist/transResult/transResult.d.ts +29 -0
- package/dist/transResult/transResult.js +528 -0
- package/dist/utils/compileContract.d.ts +13 -0
- package/dist/utils/compileContract.js +54 -0
- package/dist/utils/logger.d.ts +16 -0
- package/dist/utils/logger.js +94 -0
- package/dist/utils/utils.d.ts +26 -0
- package/dist/utils/utils.js +330 -0
- package/dist/wallet/balance.d.ts +5 -0
- package/dist/wallet/balance.js +29 -0
- package/dist/wallet/jetton.d.ts +16 -0
- package/dist/wallet/jetton.js +171 -0
- package/dist/wallet/walletContract.d.ts +31 -0
- package/dist/wallet/walletContract.js +106 -0
- package/package.json +8 -6
- package/Bridge.compile.ts +0 -8
- package/Bridge.ts +0 -645
- package/Bridge.ts.org +0 -647
- package/Fake.compile.ts +0 -8
- package/GroupApprove.compile.ts +0 -6
- package/GroupApprove.ts +0 -274
- package/JettonMinter.compile.ts +0 -5
- package/JettonMinter.ts +0 -135
- package/JettonWallet.compile.ts +0 -5
- package/JettonWallet.ts +0 -127
- package/Signature.compile.ts +0 -6
- package/Signature.ts +0 -105
- package/address.compile.ts +0 -8
- package/client/1.json +0 -1730
- package/client/client.ts +0 -73
- package/client/log/.ba8901062aebb86bf525b42c65ff84f9485419e4-audit.json +0 -15
- package/code/decode.spec.ts +0 -81
- package/code/encode-decode.ts +0 -622
- package/code/log/.ba8901062aebb86bf525b42c65ff84f9485419e4-audit.json +0 -20
- package/code/log/wan-ton-sdk.out.2025-01-20 +0 -0
- package/code/userLock.ts +0 -291
- package/common.ts +0 -62
- package/config/config-ex.ts +0 -25
- package/config/config.ts +0 -1
- package/const/const-value.ts +0 -33
- package/contractAccess/bridgeAccess.ts +0 -60
- package/contractAccess/groupApproveAccess.ts +0 -59
- package/data/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs.json +0 -7348
- package/db/Db.spec.ts +0 -193
- package/db/Db.ts +0 -736
- package/db/DbAccess.spec.ts +0 -23
- package/db/DbAccess.ts +0 -186
- package/db/common.ts +0 -94
- package/db/log/.ba8901062aebb86bf525b42c65ff84f9485419e4-audit.json +0 -15
- package/db/log/wan-ton-sdk.out.2025-04-21 +0 -0
- package/event/getEvents.ts +0 -441
- package/event/log/.ba8901062aebb86bf525b42c65ff84f9485419e4-audit.json +0 -15
- package/event/log/wan-ton-sdk.out.2024-12-19 +0 -0
- package/example/0:1.txt +0 -1
- package/example/AddToken-ex.ts +0 -148
- package/example/README.md +0 -21
- package/example/addSmg-ex.ts +0 -78
- package/example/addTokenPair-ex.ts +0 -73
- package/example/compileContract-ex.ts +0 -10
- package/example/converTranToTonTran.ts +0 -43
- package/example/delTokenPair-ex.ts +0 -63
- package/example/deploy-ex.ts +0 -68
- package/example/getAllEvents-ex.ts +0 -61
- package/example/getAllTrans.ts +0 -32
- package/example/getContractState-ex.ts +0 -33
- package/example/getEvents-ex.ts +0 -55
- package/example/getJettonInfo-ex.ts +0 -44
- package/example/getTokenPair-ex.ts +0 -47
- package/example/getTransaction-ex.ts +0 -62
- package/example/isTranSuccess-ex.ts +0 -33
- package/example/locateTx-ex.ts +0 -44
- package/example/log/.ba8901062aebb86bf525b42c65ff84f9485419e4-audit.json +0 -55
- package/example/log/wan-ton-sdk.out.2025-04-21 +0 -447
- package/example/log/wan-ton-sdk.out.2025-04-22 +0 -1918
- package/example/log/wan-ton-sdk.out.2025-04-23 +0 -4216
- package/example/log/wan-ton-sdk.out.2025-04-24.gz +0 -0
- package/example/log/wan-ton-sdk.out.2025-04-25 +0 -46814
- package/example/log/wan-ton-sdk.out.2025-04-27.gz +0 -0
- package/example/log/wan-ton-sdk.out.2025-04-28 +0 -4966
- package/example/log/wan-ton-sdk.out.2025-04-29 +0 -1328
- package/example/log/wan-ton-sdk.out.2025-04-30 +0 -9
- package/example/mintToken-ex.ts +0 -82
- package/example/setFee-ex.ts +0 -82
- package/example/setFeeProxy.ts +0 -70
- package/example/smgRelease-ex.ts +0 -173
- package/example/upgradeBridgeSc-ex.ts +0 -49
- package/example/userLock-ex.ts +0 -78
- package/fee/fee.ts +0 -23
- package/index.ts +0 -76
- package/jest.config.ts +0 -9
- package/log/.ba8901062aebb86bf525b42c65ff84f9485419e4-audit.json +0 -20
- package/log/wan-ton-sdk.out.2025-04-21 +0 -0
- package/log/wan-ton-sdk.out.2025-04-30 +0 -10
- package/opcodes.ts +0 -58
- package/publish.sh +0 -78
- package/sign/buildHash.ts +0 -47
- package/sign/log/.ba8901062aebb86bf525b42c65ff84f9485419e4-audit.json +0 -15
- package/sign/log/wan-ton-sdk.out.2025-04-14 +0 -3
- package/sign/rawTrans.spec.ts +0 -117
- package/sign/rawTrans.ts +0 -122
- package/testData/JettonMinter.compile.func.ts +0 -8
- package/testData/JettonWallet.compile.func.ts +0 -8
- package/testData/addressList.json +0 -6
- package/testData/bridge.compile.func.ts +0 -8
- package/testData/bridge.compiled.json +0 -1
- package/testData/contractAddress.json +0 -7
- package/testData/jettonTokenInfo.json +0 -14
- package/testData/prvlist.json +0 -6
- package/testData/smg.json +0 -5
- package/testData/tokenInfo.json +0 -23
- package/transResult/transResult.ts +0 -608
- package/tsconfig.json +0 -19
- package/utils/.compiled.json +0 -1
- package/utils/compileContract.ts +0 -60
- package/utils/log/.ba8901062aebb86bf525b42c65ff84f9485419e4-audit.json +0 -15
- package/utils/log/wan-ton-sdk.out.2025-01-08 +0 -0
- package/utils/logger.spec.ts +0 -14
- package/utils/logger.ts +0 -96
- package/utils/utils.spec.ts +0 -21
- package/utils/utils.ts +0 -295
- package/wallet/balance.ts +0 -29
- package/wallet/jetton.spec.ts +0 -27
- package/wallet/jetton.ts +0 -159
- package/wallet/walletContract.spec.ts +0 -111
- package/wallet/walletContract.ts +0 -105
- /package/{client/log/wan-ton-sdk.out.2024-12-19 → dist/config/config.d.ts} +0 -0
- /package/{code/log/wan-ton-sdk.out.2025-01-15 → dist/config/config.js} +0 -0
package/client/client.ts
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
import { TonClient, WalletContractV4, Address } from "@ton/ton";
|
2
|
-
import { getHttpEndpoints , getHttpEndpoint,Network} from "@orbs-network/ton-access";
|
3
|
-
import {getSecureRandomNumber} from "@ton/crypto";
|
4
|
-
import {logger} from '../utils/logger'
|
5
|
-
import {TONCLINET_TIMEOUT} from "../const/const-value";
|
6
|
-
import {DBAccess} from "../db/DbAccess";
|
7
|
-
|
8
|
-
const formatUtil = require('util');
|
9
|
-
|
10
|
-
export interface TonClientConfig {
|
11
|
-
network: Network;
|
12
|
-
tonClientTimeout?:number;
|
13
|
-
}
|
14
|
-
|
15
|
-
export interface TonUrlConfig{
|
16
|
-
url?:string;
|
17
|
-
apiKey?:string;
|
18
|
-
}
|
19
|
-
|
20
|
-
export interface TonConfig {
|
21
|
-
network:TonClientConfig;
|
22
|
-
urls?:TonUrlConfig[];
|
23
|
-
usingDbCache?: boolean;
|
24
|
-
}
|
25
|
-
|
26
|
-
|
27
|
-
let g_tonConfig:TonConfig;
|
28
|
-
|
29
|
-
export function getGlobalTonConfig(){
|
30
|
-
return g_tonConfig;
|
31
|
-
}
|
32
|
-
|
33
|
-
export async function wanTonSdkInit(tcf:TonConfig){
|
34
|
-
if(tcf == null){
|
35
|
-
throw new Error(`invalid ton config ${tcf}`);
|
36
|
-
}
|
37
|
-
g_tonConfig = tcf;
|
38
|
-
|
39
|
-
let dbAccess = await DBAccess.getDBAccess();
|
40
|
-
if(dbAccess){
|
41
|
-
await dbAccess.init();
|
42
|
-
}
|
43
|
-
}
|
44
|
-
|
45
|
-
const toncenter_testnet_apikey ="73ee18f6b52a360e9db390f146a8c6af161549495d6e9794ae3efd2e412fa7a2";
|
46
|
-
const toncenter_apikey ="16f38715eb1a0984abf42148d5ed042589f8bf11768141ecb944feae8102913a";
|
47
|
-
|
48
|
-
const default_test_url= "https://testnet.toncenter.com/api/v2/jsonRPC"
|
49
|
-
const default_url= "https://toncenter.com/api/v2/jsonRPC"
|
50
|
-
|
51
|
-
export async function getClient():Promise<TonClient> {
|
52
|
-
logger.info(formatUtil.format("getClient config %s",JSON.stringify(g_tonConfig)));
|
53
|
-
|
54
|
-
// get client by url
|
55
|
-
if(g_tonConfig.urls?.length){
|
56
|
-
let urls = g_tonConfig.urls;
|
57
|
-
const totalUrls = urls.length;
|
58
|
-
const indexUsed = await getSecureRandomNumber(0,totalUrls)
|
59
|
-
return new TonClient({ endpoint:urls[indexUsed].url ?? (g_tonConfig.network.network === 'mainnet' ? default_url:default_test_url),
|
60
|
-
timeout:g_tonConfig.network.tonClientTimeout ?? TONCLINET_TIMEOUT,
|
61
|
-
apiKey: urls[indexUsed].apiKey ?? (g_tonConfig.network.network === 'mainnet' ? toncenter_apikey : toncenter_testnet_apikey) });
|
62
|
-
}
|
63
|
-
|
64
|
-
// get client by orbs access
|
65
|
-
const endpoints = await getHttpEndpoints({ network:g_tonConfig.network.network});
|
66
|
-
const total = endpoints.length;
|
67
|
-
if(!total){
|
68
|
-
throw new Error("no http endpoint found!");
|
69
|
-
}
|
70
|
-
const indexUsed = await getSecureRandomNumber(0,total)
|
71
|
-
logger.info(formatUtil.format("(orbos)http endpoint is =>",endpoints[indexUsed]));
|
72
|
-
return new TonClient({ endpoint:endpoints[indexUsed],timeout:g_tonConfig.network.tonClientTimeout ?? TONCLINET_TIMEOUT});
|
73
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"keep": {
|
3
|
-
"days": true,
|
4
|
-
"amount": 10
|
5
|
-
},
|
6
|
-
"auditLog": "log/.ba8901062aebb86bf525b42c65ff84f9485419e4-audit.json",
|
7
|
-
"files": [
|
8
|
-
{
|
9
|
-
"date": 1734602527770,
|
10
|
-
"name": "log/wan-ton-sdk.out.2024-12-19",
|
11
|
-
"hash": "9ad603c1f13e5f6ce7643cb12ca42af7a906213065bc471dd0012b720f4fd3ba"
|
12
|
-
}
|
13
|
-
],
|
14
|
-
"hashType": "sha256"
|
15
|
-
}
|
package/code/decode.spec.ts
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
import {Cell, toNano} from "@ton/core";
|
2
|
-
import {codeTable} from "./encode-decode";
|
3
|
-
import {OP_FEE_SetTokenPairFee, OP_TOKENPAIR_Upsert} from "../opcodes"
|
4
|
-
import {BIP44_CHAINID, TON_COIN_ACCOUT} from "../const/const-value";
|
5
|
-
import {getQueryID} from "../utils/utils";
|
6
|
-
import {TON_FEE} from "../fee/fee";
|
7
|
-
|
8
|
-
let rawCellStr = "b5ee9c7201010101005000009c50000003000000000000000100000003000012340000456714833589fcd6edb6e08f4c7c32d4f71b54bda02913200000000000000000000000000000000000000000000000000000000000000000"
|
9
|
-
let rawCellStr1 = 'b5ee9c7241010301006c0002345000000300000000000000010000000300001234000045672a200102005430783833333538396663643665646236653038663463376333326434663731623534626461303239313300400000000000000000000000000000000000000000000000000000000000000000e249552b'
|
10
|
-
|
11
|
-
let tokenInfo = {
|
12
|
-
tokenOrg:{tokenPairId:0x01,srcChainId:0x1234,dstChainId:BIP44_CHAINID,srcTokenAcc:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",dstTokenAcc:'',},
|
13
|
-
tokenWrapped:{tokenPairId:0x02,srcChainId:0x1234,dstChainId:BIP44_CHAINID,srcTokenAcc:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",dstTokenAcc:'',},
|
14
|
-
coin:{tokenPairId:0x03,srcChainId:0x1234,dstChainId:BIP44_CHAINID,srcTokenAcc:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",dstTokenAcc:''},
|
15
|
-
}
|
16
|
-
let queryID;
|
17
|
-
let tokenPairId3 = tokenInfo.coin.tokenPairId;
|
18
|
-
let srcChainId3 = tokenInfo.coin.srcChainId;
|
19
|
-
let dstChainId3 = tokenInfo.coin.dstChainId;
|
20
|
-
let srcTokenAcc3 = tokenInfo.coin.srcTokenAcc;
|
21
|
-
let dstTokenAcc3 = tokenInfo.coin.dstTokenAcc;
|
22
|
-
tokenInfo.coin.dstTokenAcc = TON_COIN_ACCOUT;
|
23
|
-
|
24
|
-
describe('decode', () => {
|
25
|
-
|
26
|
-
beforeAll(async () => {
|
27
|
-
queryID = await getQueryID();
|
28
|
-
});
|
29
|
-
|
30
|
-
it('decode AddTokenPair', async () => {
|
31
|
-
let cell= Cell.fromBoc(Buffer.from(rawCellStr1,'hex'))[0];
|
32
|
-
let opCode = 0x50000003;
|
33
|
-
let decode = codeTable[opCode]["deCode"](cell);
|
34
|
-
console.log(decode);
|
35
|
-
});
|
36
|
-
|
37
|
-
it('decode should be equal code', async () => {
|
38
|
-
let opt = {
|
39
|
-
value: TON_FEE.TRANS_FEE_NORMAL,
|
40
|
-
queryID,
|
41
|
-
tokenPairId: tokenPairId3,
|
42
|
-
fromChainID: srcChainId3,
|
43
|
-
fromAccount: srcTokenAcc3,
|
44
|
-
toChainID: dstChainId3,
|
45
|
-
toAccount: dstTokenAcc3,
|
46
|
-
}
|
47
|
-
|
48
|
-
let encodedCell = codeTable[OP_TOKENPAIR_Upsert].enCode(opt);
|
49
|
-
let bodyCellHex = encodedCell.toBoc().toString('hex');
|
50
|
-
console.log(bodyCellHex);
|
51
|
-
let decoded = codeTable[OP_TOKENPAIR_Upsert].deCode(encodedCell);
|
52
|
-
console.log(decoded);
|
53
|
-
let event = codeTable[OP_TOKENPAIR_Upsert].emitEvent(decoded);
|
54
|
-
console.log(event);
|
55
|
-
});
|
56
|
-
|
57
|
-
it('cell under flow (tonview)',async () =>{
|
58
|
-
let bodyCelStr = "b5ee9c72010103010056000234500000030000000000000001000000030000123400004567142001020028833589fcd6edb6e08f4c7c32d4f71b54bda0291300400000000000000000000000000000000000000000000000000000000000000000";
|
59
|
-
let bodyCell = Cell.fromBoc(Buffer.from(bodyCelStr,'hex'))[0];
|
60
|
-
let opCode = 0x50000003;
|
61
|
-
let decode = codeTable[opCode]["deCode"](bodyCell);
|
62
|
-
console.log(decode);
|
63
|
-
})
|
64
|
-
|
65
|
-
it('cell under flow (sdk)',async () =>{
|
66
|
-
let bodyCelStr = "b5ee9c72410103010056000234500000030000000000000001000000030000123400004567142001020028833589fcd6edb6e08f4c7c32d4f71b54bda02913004000000000000000000000000000000000000000000000000000000000000000008b8d7029";
|
67
|
-
let bodyCell = Cell.fromBoc(Buffer.from(bodyCelStr,'hex'))[0];
|
68
|
-
let opCode = 0x50000003;
|
69
|
-
let decode = codeTable[opCode]["deCode"](bodyCell);
|
70
|
-
console.log(decode);
|
71
|
-
})
|
72
|
-
|
73
|
-
it('decode userlock',async () =>{
|
74
|
-
let bodyCelStr = "b5ee9c720101020100bb0001a2400000010000000043c5bea9000000000000000000000000000000000000000000746573746e65745f303638000003ac0000000000000000000000000000000000000000000000000000000005f5e100000100c98019e2d1908a3b757dc1eb9a4e6cfe5632fa789bcea365ee7ed452693d108b3f97f000a21b8da3f35c1ac4d8745f5d43077e25b2b482a5dbba52b532dd52cad9dda5f600070829dbe0c1c08edaf5f5ba2689cb0a722561e17864183ddc4f8087692ee517c0";
|
75
|
-
let bodyCell = Cell.fromBoc(Buffer.from(bodyCelStr,'hex'))[0];
|
76
|
-
let opCode = 0x40000001;
|
77
|
-
let decode = codeTable[opCode]["deCode"](bodyCell);
|
78
|
-
console.log(decode);
|
79
|
-
})
|
80
|
-
|
81
|
-
});
|