View Source Bitcoinex.PSBT.Out (bitcoinex v0.3.0)
Output properties of a partially signed bitcoin transaction.
Link to this section Summary
Functions
Adds a field to an output map. Accepted fields
Combines two output maps (BIP-174 Combiner).
Returns an empty output map.
Link to this section Types
@type t() :: %Bitcoinex.PSBT.Out{ bip32_derivation: [ %{ public_key: Bitcoinex.Secp256k1.Point.t(), origin: Bitcoinex.PSBT.KeyOrigin.t() } ] | nil, proprietary: [%{key: binary(), value: binary()}] | nil, redeem_script: Bitcoinex.Script.t() | nil, unknown: [%{key: binary(), value: binary()}] | nil, witness_script: Bitcoinex.Script.t() | nil }
Link to this section Functions
Adds a field to an output map. Accepted fields:
:redeem_script/:witness_script— aScript.t()or its hex/binary:bip32_derivation—%{public_key: Point.t(), origin: KeyOrigin.t()}(repeatable):proprietary/:unknown—%{key: binary(), value: binary()}(repeatable); a:proprietarykey must carry the 0xFC type byte, and an:unknownkey must be non-empty and must not use a type byte this map already parses into a dedicated field, nor 0xFC ({:error, :invalid_key_format}) — such a record could not survive a decode round-trip
Combines two output maps (BIP-174 Combiner).
@spec new() :: t()
Returns an empty output map.
@spec parse_outputs(binary(), non_neg_integer()) :: {:ok, {[t()], binary()}} | {:error, term()}