Sui.

Post

Share your knowledge.

Opiiii.
Opiiii1029
Jul 12, 2025
Expert Q&A

How do I sign txs without using a wallet?

Is there a secure way to sign and send transactions programmatically using a private key — without needing a browser wallet?

  • Sui
  • Architecture
  • SDKs and Developer Tools
  • Move
2
2
Share
Comments
.

Answers

2
Thorfin.
Jul 16 2025, 10:35

The above question is correct but it used the old library which not support any more. Current Mysten Lab have change to package @mysten/sui

First you need to get the key pair from mnemonic or private key

const exampleMnemonic = 'result crisp session latin ...';

const keyPair = Ed25519Keypair.deriveKeypair(exampleMnemonic);

https://sdk.mystenlabs.com/typescript/cryptography/keypairs#deriving-a-key-pair-from-a-mnemonic

Then use that keypair to create signature for transaction https://sdk.mystenlabs.com/typescript/transaction-building/basics#transactions

const result = await client.signAndExecuteTransaction({ signer: keypair, transaction: tx });
await client.waitForTransaction({ digest: result.digest });

You can read more at https://sdk.mystenlabs.com/typescript/transaction-building/basics#transactions

6
Comments
.

Do you know the answer?

Please log in and share it.