[Python] How to send transactions using wallet version v5r1 and implement multi-send in Python?

Discussão em 'Python' iniciado por Stack, Março 23, 2025.

  1. Stack

    Stack Membro Participativo

    I’m developing a Python application where I need to send transactions using wallet version v5r1 (TON blockchain). The primary requirement is to implement multi-send transactions, which is supported in this wallet version.

    I’m using the tonsdk library, but it doesn’t seem to natively support v5r1. Here’s what I need to achieve:


    1. Create transaction messages using the v5r1 wallet format. Send


    2. multiple transactions in a single batch (multi-send).

    What steps or libraries can I use to accomplish this? Are there any examples or alternative approaches? Additionally, I’d appreciate guidance on how to properly handle SEQNO for v5r1 wallets.

    Here’s an example of the code I’ve tried (based on other wallet versions):

    from tonsdk.contract.wallet import Wallets, WalletVersionEnum
    from tonsdk.utils import to_nano

    mnemonics = "my seed phrase here".split(" ")
    version = WalletVersionEnum.v5r1 # Targeted version

    # Key and wallet generation
    mnemonics, pub_k, priv_k, wallet = Wallets.from_mnemonics(
    mnemonics=mnemonics,
    version=version,
    workchain=0
    )

    # Issue: tonsdk does not support WalletVersionEnum.v5r1



    What libraries or methods can I use to work with v5r1? If tonsdk doesn’t support it, how can I manually send transactions with the required format?

    Continue reading...

Compartilhe esta Página