propose_transaction function creates a PCZT by combining the Creator, Constructor, and IO Finalizer roles from ZIP 374.
Function Signature
- TypeScript
- Go
- Kotlin
Parameters
Array of transparent UTXOs to spend. Each input requires:
Array of outputs to create. Each payment requires:
Address to receive change. Can be:
- Unified address with Orchard receiver (recommended for privacy)
- Transparent P2PKH address (
t1...ortm...) nullif no change expected
Network to use:
'mainnet' or 'testnet'Block height at which the transaction expires. Must be:
- After Nu5 activation (mainnet: 1,687,104 / testnet: 1,842,420)
- At least
current_height + 40to avoid “tx-expiring-soon” errors
Example
- TypeScript
- Go
What Happens Internally
- Validation — Inputs and payment addresses are validated
- Fee Calculation — ZIP 317 fee is computed based on transaction structure
- Change Calculation —
change = total_input - total_payments - fee - Builder Construction — Zcash transaction builder creates the structure
- PCZT Creation — Builder output is converted to PCZT format
- IO Finalization — Input/output metadata is finalized
Fee Calculation
Fees are calculated automatically according to ZIP 317:Common Errors
OrchardBuilderNotAvailable
OrchardBuilderNotAvailable
The expiry height is before Nu5 activation. Use a height after:
- Mainnet: 1,687,104
- Testnet: 1,842,420
InsufficientFunds
InsufficientFunds
Total input value is less than payments + fee. Either:
- Add more inputs
- Reduce payment amounts
ChangeRequired
ChangeRequired
There’s leftover value but no change address provided. Pass a change address.
InvalidAddress
InvalidAddress
The address couldn’t be parsed. Ensure it’s a valid:
- Unified address (
u1...orutest1...) - Transparent address (
t1...ortm...)

