View Source Bitcoinex.PSBT.Global (bitcoinex v0.3.0)
Global properties of a partially signed bitcoin transaction.
Link to this section Summary
Functions
Adds a field to a Global map. Accepted fields
Combines two Global maps (BIP-174 Combiner). Callers guarantee the two
unsigned_tx values are equal.
Builds a Global map wrapping an unsigned transaction.
Link to this section Types
@type t() :: %Bitcoinex.PSBT.Global{ proprietary: [%{key: binary(), value: binary()}] | nil, unknown: [%{key: binary(), value: binary()}] | nil, unsigned_tx: Bitcoinex.Transaction.t() | nil, version: non_neg_integer() | nil, xpub: [%{xkey: Bitcoinex.ExtendedKey.t(), origin: Bitcoinex.PSBT.KeyOrigin.t()}] | nil }
Link to this section Functions
Adds a field to a Global map. Accepted fields:
:unsigned_tx— aTransaction.t():xpub—%{xkey: ExtendedKey.t(), origin: KeyOrigin.t()}(repeatable); the key must be an extended public key ({:error, :private_key_not_allowed}):version—0(only PSBT v0 is supported; any other integer is{:error, :unsupported_version}):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
Repeatable fields reject a record whose key is already present
({:error, :duplicate_key}): a PSBT map may not contain duplicate keys, so
the Updater must not create one its own decoder would reject.
Combines two Global maps (BIP-174 Combiner). Callers guarantee the two
unsigned_tx values are equal.
@spec from_unsigned_tx(Bitcoinex.Transaction.t()) :: t()
Builds a Global map wrapping an unsigned transaction.