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 can i get my wallet address memo or tag #39

Open
segun-flexible opened this issue May 27, 2024 · 2 comments
Open

how can i get my wallet address memo or tag #39

segun-flexible opened this issue May 27, 2024 · 2 comments

Comments

@segun-flexible
Copy link

const { TonClient, WalletContractV4, internal } = require("@ton/ton");
const { mnemonicNew, mnemonicToPrivateKey } = require("@ton/crypto");

    // Create Client
    const client = new TonClient({
        endpoint: 'https://toncenter.com/api/v2/jsonRPC',
        /* apiKey: "jsjs" */
    });

    const mnemonics = [
        'camera', 'hunt', 'hunt',
        'race', 'private', 'category',
        'virtual', 'escape', 'awkward',
        'update', 'mammal', 'length',
        'safe', 'pool', 'laptop',
        'red', 'crowd', 'steak',
        'gorilla', 'daughter', 'just',
        'autumn', 'disease', 'perfect'
    ];

    // Generate new key
    //let mnemonics = await mnemonicNew();

    let keyPair = await mnemonicToPrivateKey(mnemonics);

    // Create wallet contract
    let workchain = 0; // Usually you need a workchain 0
    let wallet = WalletContractV4.create({ workchain, publicKey: keyPair.publicKey });
    let contract = client.open(wallet);
@Inffix
Copy link

Inffix commented May 30, 2024

You can get your wallet contract address using contract.address.toString()
Memo is a comment on transactions coming to the wallet, the wallet does not have such a parameter. It is necessary to identify the recipient of the transfer to exchanges, for example

@segun-flexible
Copy link
Author

You can get your wallet contract address using contract.address.toString() Memo is a comment on transactions coming to the wallet, the wallet does not have such a parameter. It is necessary to identify the recipient of the transfer to exchanges, for example

I try to send Ton from my wallet I created to another wallet on Bybit, they required me to send input Memo while sending, but since there is no place to input memo In my code, I just send it like that without putting the memo, till today I didn't see the Ton inside my Bybit account

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

2 participants