Monero Sign Transaction
Sign a Monero transaction using RingCT protocol with CLSAG signatures.
const result = await TrezorConnect.moneroSignTransaction(params);Params
MoneroSignTransaction
path
string | Array<number>
minimum length is 3. All components must be hardened (e.g., m/44'/128'/0'). read
more
networkType
MoneroNetworkType
Monero network type: 0 = MAINNET, 1 = TESTNET, 2 = STAGENET, 3 = FAKECHAIN
tsx_data
MoneroTransactionData
Transaction metadata and outputs
inputs
Array<MoneroTransactionSourceEntry>
UTXOs being spent (with ring members)
MoneroTransactionData
Transaction-level parameters:
version
number
Transaction version (typically 2)
unlock_time
number
Block height or timestamp when outputs become spendable (0 = immediately)
mixin
number
Number of decoy outputs per input (ring size - 1). Monero network typically requires 10+
fee
number
Transaction fee in atomic units (1 XMR = 1e12 atomic units)
account
number
Account index (default: 0)
num_inputs
number
Number of inputs in the transaction
client_version
number
Client version identifier
hard_fork
number
Hard fork version
outputs
Array<MoneroTransactionDestinationEntry>
Destination outputs
rsig_data
MoneroTransactionRsigData
Range proof data for Bulletproofs
payment_id
string
Payment ID (hex string, 16 or 64 chars)
minor_indices
Array<number>
Subaddress minor indices used
integrated_indices
Array<number>
Indices of integrated address outputs
change_dts
MoneroTransactionDestinationEntry
Change output (return to sender)
monero_version
string
Monero version string
chunkify
boolean
Enable chunked processing
MoneroTransactionDestinationEntry
Output/destination details:
amount
number
Amount in atomic units (1 XMR = 1e12)
addr
MoneroAccountPublicAddress
Destination address
is_subaddress
boolean
Whether destination is a subaddress
original
string
Original address string
is_integrated
boolean
Whether this is an integrated address
MoneroAccountPublicAddress
spend_public_key
string
Spend public key (64 hex chars)
view_public_key
string
View public key (64 hex chars)
MoneroTransactionSourceEntry
Input/UTXO with ring members:
outputs
Array<MoneroOutputEntry>
Ring members (mixin + 1 outputs)
real_output
number
Index of the real output within the ring
real_out_tx_key
string
Transaction public key for real output (64 hex chars)
real_out_additional_tx_keys
Array<string>
Additional TX public keys (each 64 hex chars)
real_output_in_tx_index
number
Output index within its transaction
amount
number
Output amount in atomic units
rct
boolean
Whether this is a RingCT output (true for modern transactions)
mask
string
Amount blinding factor/mask (64 hex chars)
subaddr_minor
number
Subaddress minor index
multisig_kLRki
MoneroMultisigKLRki
Multisig data (advanced)
MoneroOutputEntry
Ring member (decoy or real output):
idx
number
Global output index on blockchain
key
object
Output public key data
dest
string
Destination/stealth public key (64 hex chars)
commitment
string
Pedersen commitment (64 hex chars)
MoneroTransactionRsigData
Range proof data (Bulletproofs):
rsig_type
number
Range signature type
bp_version
number
Bulletproof version
grouping
Array<number>
Output grouping for batched range proofs
offload_type
number
Offload computation type
mask
string
Mask value (hex)
rsig
string
Range signature data (hex)
rsig_parts
Array<string>
Range signature parts (hex strings)
MoneroMultisigKLRki
Multisig key data (advanced usage):
K
string
K value (hex)
L
string
L value (hex)
R
string
R value (hex)
ki
string
Key image (hex)
Example
Minimal Example (Only Required Fields)
TrezorConnect.moneroSignTransaction({
// REQUIRED: Hardened Monero account path (minimum 3 components)
path: "m/44'/128'/0'",
// REQUIRED: Network type
networkType: 0, // 0=MAINNET, 1=TESTNET, 2=STAGENET, 3=FAKECHAIN
// REQUIRED: Transaction data with outputs
tsx_data: {
version: 1,
unlock_time: 0,
mixin: 15,
fee: 10000000,
account: 0,
num_inputs: 1,
client_version: 3,
hard_fork: 16,
outputs: [
{
amount: 1000000000000, // 1.0 XMR in atomic units
addr: {
spend_public_key:
'abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890',
view_public_key:
'fedcba0987654321fedcba0987654321fedcba0987654321fedcba0987654321',
},
is_subaddress: false,
original: 'address_string_here',
is_integrated: false,
},
],
rsig_data: {
rsig_type: 1,
bp_version: 4,
grouping: [],
},
},
// REQUIRED: At least one input with ring members
inputs: [
{
outputs: [
// Ring member 1 (real output)
{
idx: 12345,
key: {
dest: '1111111111111111111111111111111111111111111111111111111111111111',
commitment:
'2222222222222222222222222222222222222222222222222222222222222222',
},
},
// Ring member 2 (decoy)
{
idx: 12346,
key: {
dest: '3333333333333333333333333333333333333333333333333333333333333333',
commitment:
'4444444444444444444444444444444444444444444444444444444444444444',
},
},
// ... add more ring members (typically 11 total for mixin=10)
],
real_output: 0,
real_out_tx_key: 'tx_public_key_64_chars',
real_out_additional_tx_keys: [],
real_output_in_tx_index: 1,
amount: 1010000000,
rct: true,
mask: 'amount_mask_64_chars',
subaddr_minor: 0,
},
],
});Result
The result contains the complete signed transaction data ready for broadcast:
{
success: true,
payload: {
signatures: [
'signature_hex_1...',
'signature_hex_2...',
// ... one signature per input
],
tx_prefix_hash: 'prefix_hash_hex...',
rv: {
txn_fee: 10000000000, // optional
message: 'message_hex...', // optional
rv_type: 5, // optional - RCT type (e.g., CLSAGBulletproofPlus)
},
cout_key: 'cout_key_hex...', // optional
salt: 'salt_hex...', // optional
rand_mult: 'rand_mult_hex...', // optional
tx_enc_keys: 'encrypted_keys_hex...', // optional
opening_key: 'opening_key_hex...', // optional
pseudo_outs: [
'pseudo_out_hex_1...',
'pseudo_out_hex_2...',
// ... one pseudo_out per input
],
}
}Response Fields
signatures
Array<string>
Array of CLSAG signatures (one per input)
tx_prefix_hash
string
Keccak hash of transaction prefix
rv
object
RingCT signature data
txn_fee
number
Transaction fee
message
string
Commitment to fee
rv_type
number
RCT signature type (5 = CLSAG with Bulletproof+)
cout_key
string
Encrypted output key
salt
string
Encryption salt
rand_mult
string
Random multiplier
tx_enc_keys
string
Encrypted transaction keys
opening_key
string
Key for decrypting transaction data
pseudo_outs
Array<string>
Array of pseudo output commitments (one per input, used in RingCT balance proof)
Transaction Construction
Use the response to construct a complete Monero transaction:
const signedTx = result.payload;
// Construct transaction for broadcast
const moneroTx = {
version: 2,
unlock_time: 0,
vin: constructInputs(signedTx), // Build TxinToKey structures
vout: constructOutputs(signedTx), // Build outputs with range proofs
extra: constructExtra(signedTx), // Transaction extra data
rct_signatures: {
type: signedTx.rv.rv_type,
txnFee: signedTx.rv.txn_fee,
ecdhInfo: constructEcdhInfo(signedTx),
outPk: constructOutPk(signedTx),
p: {
bulletproofs: constructBulletproofs(signedTx),
CLSAGs: signedTx.signatures.map(sig => decodeCLSAG(sig)),
pseudoOuts: constructPseudoOuts(signedTx),
},
},
};
// Serialize and broadcast
const txHex = serializeMoneroTransaction(moneroTx);
broadcastToNetwork(txHex);