import { TonClient, Address, WalletContractV3R2 } from "ton"; import { mnemonicToPrivateKey } from "ton-crypto"; import { buildOnchainMetadata } from "./helpers"; export const client = new TonClient({ endpoint: 'https://testnet.toncenter.com/api/v2/jsonRPC', apiKey: 'bb38df0c2756c66e2ab49f064e2484ec444b01244d2bd49793bd5b58f61ae3d2' }) let mnemonics = "basic security merge opera inject core melody polar become force cool glance history order warfare consider company slim twice balcony scare shoot winner rude"; // read more about wallet apps https://ton.org/docs/participate/wallets/apps#tonhub-test-environment export async function wallet_data() { let keyPair = await mnemonicToPrivateKey(mnemonics.split(" ")); let secretKey = keyPair.secretKey; //Create deployment wallet contract let wallet_contract = WalletContractV3R2.create({ workchain, publicKey: keyPair.publicKey }); let my_wallet = client.open(wallet_contract); return { my_wallet, secretKey, keyPair }; } //workchain = 1 - masterchain (expensive operation cost, validator's election contract works here) //workchain = 0 - basechain (normal operation cost, user's contracts works here) export let workchain = 0; //we are working in basechain. // This is example data - Modify these params for your own jetton // - Data is stored on-chain (except for the image data itself) export const jettonParams = { name: "TactJet", description: "This is description of Test tact jetton", image: "https://ipfs.io/ipfs/QmbPZjC1tuP6ickCCBtoTCQ9gc3RpkbKx7C1LMYQdcLwti" // Image url }; // Owner should usually be the deploying wallet's address. export let owner = Address.parse('EQAuAiFGgkxoQvBWXjXQcLYb8BW4fO6UJkt6_uCONJ2y5VUk'); // Create content Cell export let default_content = buildOnchainMetadata(jettonParams);