Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create wallet version W5 or V4R2 #59

Open
arsen00531 opened this issue Sep 7, 2024 · 3 comments
Open

How to create wallet version W5 or V4R2 #59

arsen00531 opened this issue Sep 7, 2024 · 3 comments

Comments

@arsen00531
Copy link

There is no this versions of wallet

@Mohammad10327
Copy link

Many

@Mohammad10327
Copy link

Money 💰

@peng-huang-ch
Copy link

You can find the codes for the wallets here.

import { internal, SendMode, TonClient, WalletContractV3R2, WalletContractV4, WalletContractV5R1, OpenedContract } from '@ton/ton';
// v4r2 wallet
async function walletV4R2(keyPair: KeyPair) {
  const workchain = 0; // Usually you need a workchain 0
  // Create wallet contract
  const wallet = WalletContractV4.create({ workchain, publicKey: keyPair.publicKey });
  const contract = client.open(wallet);
  return contract;
}

// v5r1 wallet
async function walletV5R1(keyPair: KeyPair) {
  // Create wallet contract
  const wallet = WalletContractV5R1.create({ publicKey: keyPair.publicKey });
  return client.open(wallet);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants