Sign Transaction Block

Once an application is connected to Martian wallet via connect method, an app can request the user to sign a transaction using window.martian.sui.signTransaction()and it will return a Promise that resolves when the user accepts the request and reject (throw when awaited) when the user declines the request or request is not valid/fails. It takes one parameter listed below

By using this method, users can securely sign transactions and ensure the safety of their assets on the Sui blockchain.

// Create a transaction
const response = await window.martian.sui.connect();
const tx = new TransactionBlock();
  target: '0x2::devnet_nft::mint',
  arguments: [
const input = {
  transactionBlockSerialized: tx.serialize(),
  options: {
    showEffects: true,
const transaction = await window.martian.sui.signTransactionBlock(input);

Last updated