tonSignMessage

Use requirement

  • Firmware version required

    • Touch: 4.10.0

TON: sign message

Sign a message or transaction using the private key derived by given BIP32 path. User needs to confirm the action on OneKey device.

const response = await HardwareSDK.tonSignMessage(connectId, deviceId, {
    path: "m/44'/607'/0'",
    destination: "UQBYkuShkZzRYAWX_HrK3kFpeAixiRKd-K7QBXYxl9OBXM0_",
    tonAmount: 100,
    seqno: 0,
    expireAt: Date.now() + 1000 * 60 * 60 * 24,
    walletVersion: 3,
    isBounceable: false,
    isTestnetOnly: false
});

Params

Optional common params

Required Parameters

  • path - required string | Array<number> minimum length is 3

  • destination - required string destination address

  • tonAmount - required number amount of TON to transfer

  • seqno - required number sequence number

  • expireAt - required number message expiration timestamp

Optional Parameters

  • walletVersion - optional TonWalletVersion TON wallet version (default: 3)

  • isBounceable - optional boolean whether message is bounceable (default: false)

  • isTestnetOnly - optional boolean whether to use testnet (default: false)

  • jettonMasterAddress - optional string Jetton master contract address

  • jettonAmount - optional number amount of jettons to transfer

  • fwdFee - optional number forward fee for jetton transfer

  • comment - optional string message comment

  • mode - optional number message mode

  • workchain - optional TonWorkChain TON workchain

  • walletId - optional number wallet ID

Example

Result

Error

Last updated

Was this helpful?