Sign Transactions
Use sign() to perform MPC signing for transactions, messages, and typed data across supported blockchain networks.
sign() calls the Tatum enclave to sign using a specific RPC method. Unlike sendAssets(), it gives you control over the signing method and params — useful for contract interactions, message signing, and custom transaction flows.
Supported Methods
| Method | Chain | Description |
|---|---|---|
eth_sendTransaction | EVM | Sign and broadcast an EVM transaction |
personal_sign | EVM | Sign an arbitrary message (EIP-191) |
eth_signTypedData_v4 | EVM | Sign structured data (EIP-712) |
sol_signTransaction | Solana | Sign a Solana transaction |
stellar_sendTransaction | Stellar | Sign and send a Stellar transaction |
tron_sendTransaction | Tron | Sign and send a Tron transaction |
Sign an EVM Transaction
import { WalletChain } from "@tatumio/wallet-sdk";
const result = await client.sign({
body: {
share: shares.SECP256K1.share,
method: "eth_sendTransaction",
params: [{
from: "0xYourAddress",
to: "0xRecipient",
value: "0x2386F26FC10000", // 0.01 ETH in wei (hex)
data: "0x",
}],
chainId: WalletChain.ETHEREUM_MAINNET,
to: "0xRecipient",
},
});
console.log(result.data); // transaction hash "0x..."Sign a Message
const result = await client.sign({
body: {
share: shares.SECP256K1.share,
method: "personal_sign",
params: [
"0x48656c6c6f20576f726c64", // hex-encoded "Hello World"
"0xYourAddress",
],
chainId: WalletChain.ETHEREUM_MAINNET,
to: "0xYourAddress",
},
});
console.log(result.data); // "0x..." — EIP-191 signatureSign EIP-712 Typed Data
const typedData = {
domain: { name: "MyApp", version: "1", chainId: 1 },
types: {
Message: [{ name: "content", type: "string" }],
},
primaryType: "Message",
message: { content: "Hello" },
};
const result = await client.sign({
body: {
share: shares.SECP256K1.share,
method: "eth_signTypedData_v4",
params: ["0xYourAddress", JSON.stringify(typedData)],
chainId: WalletChain.ETHEREUM_MAINNET,
to: "0xYourAddress",
},
});Sign a Solana Transaction
const result = await client.sign({
body: {
share: shares.ED25519.share,
method: "sol_signTransaction",
params: [serializedTransactionBase64],
chainId: WalletChain.SOLANA_MAINNET,
to: "SolanaRecipientAddress",
},
});Optional Parameters
| Parameter | Type | Description |
|---|---|---|
rpcUrl | string | Override the automatic RPC endpoint |
sponsorGas | boolean | Enable gas sponsorship (EVM only) |
presignature | string | Pre-computed presignature from a previous MPC round |
presignatureId | string | ID of the presignature |
metadataStr | string | Arbitrary metadata string attached to the signing request |
Response
interface SignResponse {
data: string; // transaction hash (for send methods) or signature hex
}