UNPKG

@ledgerhq/coin-ton

Version:
169 lines 5.99 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.accountInfo = exports.tonTransactionResponse = exports.jettonTransferResponse = exports.tonEstimateFee = exports.jettonWallets = exports.tonWallet = exports.tonAccount = exports.lastBlockNumber = exports.totalFees = exports.fees = exports.jettonTransaction = exports.transaction = exports.account = exports.tokenAccount = exports.mockAccountId = exports.mockAddress = void 0; const currencies_1 = require("@ledgerhq/cryptoassets/currencies"); const bignumber_js_1 = __importDefault(require("bignumber.js")); exports.mockAddress = "UQDzd8aeBOU-jqYw_ZSuZjceI5p-F4b7HMprAsUJAtRPbMol"; exports.mockAccountId = "js:2:ton:b19891a06654f21c64147550b3321bef63acd25b5dd61b688b022c42fac4831d:ton"; exports.tokenAccount = { id: "subAccountId", type: "TokenAccount", spendableBalance: new bignumber_js_1.default("5000000"), token: { contractAddress: "0:A2CC9B938389950125001F6B8AF280CACA23BE045714AD69387DD546588D667E", }, }; exports.account = { id: exports.mockAccountId, freshAddress: exports.mockAddress, freshAddressPath: "44'/607'/0'/0'/0'/0'", xpub: "", type: "Account", currency: (0, currencies_1.getCryptoCurrencyById)("ton"), spendableBalance: new bignumber_js_1.default("1000000000"), balance: new bignumber_js_1.default("1000000000"), seedIdentifier: "seedIdentifier", subAccounts: [exports.tokenAccount], }; exports.transaction = { mode: "send", recipient: "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4", amount: new bignumber_js_1.default("1000000"), useAllAmount: false, comment: { isEncrypted: false, text: "" }, payload: "", family: "ton", }; exports.jettonTransaction = { ...exports.transaction, subAccountId: "subAccountId", }; exports.fees = { in_fwd_fee: 10000, storage_fee: 10000, gas_fee: 10000, fwd_fee: 10000, }; exports.totalFees = (0, bignumber_js_1.default)(exports.fees.fwd_fee + exports.fees.gas_fee + exports.fees.in_fwd_fee + exports.fees.storage_fee); exports.lastBlockNumber = { last: { seqno: 38574413, }, first: { seqno: 3, }, }; exports.tonAccount = { balance: "1000000000", last_transaction_lt: "47055058000008", last_transaction_hash: "psVQqt6rf/Lo6xyLzxx0to0jUIx8I2/4znOVf2KhAI0=", status: "active", seqno: 3, }; exports.tonWallet = { balance: "7726736262", wallet_type: "wallet v4 r2", seqno: 22, wallet_id: 698983191, last_transaction_lt: "47055058000008", last_transaction_hash: "psVQqt6rf/Lo6xyLzxx0to0jUIx8I2/4znOVf2KhAI0=", status: "active", }; exports.jettonWallets = { jetton_wallets: [ { address: "0:495AB6C978E3C0AE7FCF863A2D4504E37CE8D2D04A5E59048301BA29EC372F79", balance: "1200000000000", owner: "0:D02D314791CB10EF3F964CC7421E4F46348C262444946F7A64C2374700E3ED19", jetton: "0:3C52A0A732A83F022E517E5C2715E0EE458A4B9772580E903FF491526C3E9137", last_transaction_lt: "30345242000008", code_hash: "3axDia4eCUnTVixqU0/BUA4i8id5BtVw1pt/yayZd6k=", data_hash: "P8j0kENM5s4zE2w5IpD8NrrSneGQ7d0mzs5yTBNPlqo=", }, ], }; exports.tonEstimateFee = { source_fees: exports.fees, destination_fees: [], }; exports.jettonTransferResponse = { jetton_transfers: [ { query_id: "1", source: "UQDnqcVSV4S9m2Y9gLAQrDerQktKSx2I1uhs6r5o_H8VT4x7", destination: exports.mockAddress, amount: "", source_wallet: "", jetton_master: "0:2F956143C461769579BAEF2E32CC2D7BC18283F40D20BB03E432CD603AC33FFC", transaction_hash: "", transaction_lt: "", transaction_now: 0, response_destination: "", custom_payload: null, forward_ton_amount: "", forward_payload: null, }, ], }; exports.tonTransactionResponse = { transactions: [ { account: exports.mockAddress, hash: "hash", lt: "lt", now: 1718241443, orig_status: "active", end_status: "active", total_fees: "0", prev_trans_hash: "", prev_trans_lt: "", description: { aborted: true, destroyed: false, compute_ph: { success: false, exit_code: -14, }, credit_first: true, }, block_ref: null, in_msg: { source: "0:959EAA8BD0E3A2662D814278D51A6F997946207D48478008BEBE7F45F3EF781F", destination: exports.mockAddress, value: "13509565", hash: "inMsgHash", fwd_fee: "266669", ihr_fee: "0", created_lt: "47055058000007", created_at: "1718241443", opcode: "0xd53276db", ihr_disabled: true, bounce: false, bounced: false, import_fee: null, message_content: { hash: "Qa0w2xg42wA9taurO/aCVOqGTzjOeP3EpzD2Sl7tTss=", body: "te6cckEBAQEADgAAGNUydtsAAAAAAAAAAfRC8y4=", decoded: null, }, init_state: null, }, out_msgs: [], account_state_before: null, account_state_after: null, mc_block_seqno: 3, }, ], address_book: {}, }; exports.accountInfo = { balance: "7726736262", last_transaction_lt: "47055058000008", last_transaction_hash: "lastTransactionHash", status: "active", seqno: 22, }; //# sourceMappingURL=common.fixtures.js.map