Build Transaction
cardano_transaction_buildConstruct a Cardano transaction body with inputs, outputs, change address, fees, TTL, certificates, withdrawals, metadata, collateral, required signers, and minting, then save it to a file.
Instructions
Build a transaction body. Supports inputs, outputs, change address, fees, TTL, certificates, withdrawals, metadata, collateral, required signers, and minting.
Args:
tx_ins (string[]): Transaction inputs in format "tx_hash#index"
tx_outs (string[]): Transaction outputs in format "address+amount" (amount in lovelace, or "address+amount+multi_asset")
change_address (string, optional): Address to send change to (required for auto-balancing)
fee (number, optional): Transaction fee in lovelace (if omitted, auto-calculated when change_address provided)
ttl (number, optional): Transaction time-to-live (slot number)
certificate_files (string[], optional): Paths to certificate files to include
withdrawals (string[], optional): Stake withdrawals in format "stake_address+amount"
metadata_json_file (string, optional): Path to metadata JSON file
tx_in_collateral (string[], optional): Collateral inputs in format "tx_hash#index"
required_signer_hashes (string[], optional): Required signer key hashes
mint (string[], optional): Minting operations in format "policy_id.asset_name+/-quantity"
out_file (string): Output path for the transaction body file
Returns: Confirmation with estimated fee (if auto-calculated).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fee | No | Transaction fee in lovelace | |
| ttl | No | Transaction time-to-live slot | |
| mint | No | Minting operations in format "policy_id.asset_name+/-quantity" | |
| tx_ins | Yes | Transaction inputs in format "tx_hash#index" | |
| tx_outs | Yes | Transaction outputs in format "address+amount" | |
| out_file | Yes | Output path for the transaction body file | |
| withdrawals | No | Stake withdrawals in format "stake_address+amount" | |
| change_address | No | Address to send change to | |
| tx_in_collateral | No | Collateral inputs in format "tx_hash#index" | |
| certificate_files | No | Paths to certificate files | |
| metadata_json_file | No | Path to metadata JSON file | |
| required_signer_hashes | No | Required signer key hashes |