Signature
- TypeScript
- Go
- Kotlin
Parameters
string
required
Hex-encoded PCZT (TypeScript) or Pczt object (Go/Kotlin)
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get detailed information about a PCZT’s contents
function inspect_pczt(pczt_hex: string): PcztInfo
func InspectPczt(pczt *Pczt) (*PcztInfo, error)
fun inspectPczt(pczt: Pczt): PcztInfo
interface PcztInfo {
expiry_height: number;
transparent_inputs: Array<{
prevout_txid: string; // Hex (display order)
prevout_index: number;
value: number; // Zatoshis
script_pubkey: string; // Hex
is_signed: boolean;
num_signatures: number;
}>;
transparent_outputs: Array<{
value: number;
script_pubkey: string;
user_address?: string;
}>;
orchard_outputs: Array<{
value?: number; // Zatoshis (if not redacted)
recipient?: string; // Hex (if not redacted)
user_address?: string;
}>;
total_input: number;
total_transparent_output: number;
total_orchard_output: number;
implied_fee: number;
num_orchard_actions: number;
all_inputs_signed: boolean;
has_orchard_proofs: boolean;
}
const pczt = t2z.propose_transaction(inputs, payments, changeAddr, network, expiry);
const info = t2z.inspect_pczt(pczt.to_hex());
console.log('Transaction Summary:');
console.log(' Inputs:', info.transparent_inputs.length);
console.log(' Total In:', info.total_input, 'zatoshis');
console.log(' Total Out:', info.total_orchard_output + info.total_transparent_output);
console.log(' Fee:', info.implied_fee, 'zatoshis');
console.log(' Signed:', info.all_inputs_signed ? 'Yes' : 'No');
console.log(' Proved:', info.has_orchard_proofs ? 'Yes' : 'No');
const info = t2z.inspect_pczt(pczt.to_hex());
const paymentTotal = payments.reduce((sum, p) => sum + p.amount, 0n);
const changeAmount = BigInt(info.total_orchard_output) - paymentTotal;
const info = t2z.inspect_pczt(pczt.to_hex());
info.transparent_inputs.forEach((input, i) => {
console.log(`Input ${i}: ${input.is_signed ? '✓' : '○'}`);
});
const info = t2z.inspect_pczt(pczt.to_hex());
if (!info.all_inputs_signed) {
throw new Error('Not all inputs signed');
}
if (!info.has_orchard_proofs) {
throw new Error('Proofs not generated');
}
Was this page helpful?
