Psbt Functions¶
-
int
wally_psbt_input_set_previous_txid
(struct wally_psbt_input *input, const unsigned char *txhash, size_t txhash_len)¶ Set the previous txid in an input.
Parameters: - input – The input to update.
- txhash – The previous hash for this input.
- txhash_len – Length of
txhash
in bytes. Must beWALLY_TXHASH_LEN
.
Returns: See Error Codes
-
int
wally_psbt_input_set_output_index
(struct wally_psbt_input *input, uint32_t index)¶ Set the output index in an input.
Parameters: - input – The input to update.
- index – The index of the spent output for this input.
Returns: See Error Codes
-
int
wally_psbt_input_set_sequence
(struct wally_psbt_input *input, uint32_t sequence)¶ Set the sequence number in an input.
Parameters: - input – The input to update.
- sequence – The sequence number for this input.
Returns: See Error Codes
-
int
wally_psbt_input_clear_sequence
(struct wally_psbt_input *input)¶ Clear the sequence number in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_set_utxo
(struct wally_psbt_input *input, const struct wally_tx *utxo)¶ Set the utxo in an input.
Parameters: - input – The input to update.
- utxo – The (non witness) utxo for this input if it exists.
Returns: See Error Codes
-
int
wally_psbt_input_set_witness_utxo
(struct wally_psbt_input *input, const struct wally_tx_output *witness_utxo)¶ Set the witness_utxo in an input.
Parameters: - input – The input to update.
- witness_utxo – The witness utxo for this input if it exists.
Returns: See Error Codes
-
int
wally_psbt_input_set_witness_utxo_from_tx
(struct wally_psbt_input *input, const struct wally_tx *utxo, uint32_t index)¶ Set the witness_utxo in an input from a transaction output.
Parameters: - input – The input to update.
- utxo – The transaction containing the output to add.
- index – The output index in
utxo
to add.
Returns: See Error Codes
-
int
wally_psbt_input_set_redeem_script
(struct wally_psbt_input *input, const unsigned char *script, size_t script_len)¶ Set the redeem_script in an input.
Parameters: - input – The input to update.
- script – The redeem script for this input.
- script_len – Length of
script
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_set_witness_script
(struct wally_psbt_input *input, const unsigned char *script, size_t script_len)¶ Set the witness_script in an input.
Parameters: - input – The input to update.
- script – The witness script for this input.
- script_len – Length of
script
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_set_final_scriptsig
(struct wally_psbt_input *input, const unsigned char *final_scriptsig, size_t final_scriptsig_len)¶ Set the final_scriptsig in an input.
Parameters: - input – The input to update.
- final_scriptsig – The scriptSig for this input.
- final_scriptsig_len – Length of
final_scriptsig
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_set_final_witness
(struct wally_psbt_input *input, const struct wally_tx_witness_stack *witness)¶ Set the final witness in an input.
Parameters: - input – The input to update.
- witness – The witness stack for the input, or NULL if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_keypaths
(struct wally_psbt_input *input, const struct wally_map *map_in)¶ Set the non-taproot keypaths in an input.
Parameters: - input – The input to update.
- map_in – The non-taproot HD keypaths to set for this input.
Returns: See Error Codes
-
int
wally_psbt_input_find_keypath
(struct wally_psbt_input *input, const unsigned char *pub_key, size_t pub_key_len, size_t *written)¶ Find a keypath matching a pubkey in an input.
Parameters: - input – The input to search in.
- pub_key – The pubkey to find.
- pub_key_len – Length of
pub_key
in bytes. Must beEC_PUBLIC_KEY_UNCOMPRESSED_LEN
orEC_PUBLIC_KEY_LEN
. - written – On success, set to zero if the item is not found, otherwise the index of the item plus one.
Note
This function only finds non-taproot keypaths.
Returns: See Error Codes
-
int
wally_psbt_input_keypath_add
(struct wally_psbt_input *input, const unsigned char *pub_key, size_t pub_key_len, const unsigned char *fingerprint, size_t fingerprint_len, const uint32_t *child_path, size_t child_path_len)¶ Convert and add a pubkey/keypath to an input.
Parameters: - input – The input to add to.
- pub_key – The pubkey to add.
- pub_key_len – Length of
pub_key
in bytes. Must beEC_PUBLIC_KEY_UNCOMPRESSED_LEN
orEC_PUBLIC_KEY_LEN
. - fingerprint – The master key fingerprint for the pubkey.
- fingerprint_len – Length of
fingerprint
in bytes. Must beBIP32_KEY_FINGERPRINT_LEN
. - child_path – The BIP32 derivation path for the pubkey.
- child_path_len – The number of items in
child_path
.
Returns: See Error Codes
-
int
wally_psbt_input_taproot_keypath_add
(struct wally_psbt_input *input, const unsigned char *pub_key, size_t pub_key_len, const unsigned char *tapleaf_hashes, size_t tapleaf_hashes_len, const unsigned char *fingerprint, size_t fingerprint_len, const uint32_t *child_path, size_t child_path_len)¶ Convert and add a pubkey/taproot keypath to a PSBT input.
Parameters: - input – The input to add to.
- pub_key – The pubkey to add.
- pub_key_len – Length of
pub_key
in bytes. Must beEC_XONLY_PUBLIC_KEY_LEN
. - tapleaf_hashes – Series of 32-byte leaf hashes.
- tapleaf_hashes_len – Length of
tapleaf_hashes
in bytes. Must be a multiple ofSHA256_LEN
. - fingerprint – The master key fingerprint for the pubkey.
- fingerprint_len – Length of
fingerprint
in bytes. Must beBIP32_KEY_FINGERPRINT_LEN
. - child_path – The BIP32 derivation path for the pubkey.
- child_path_len – The number of items in
child_path
.
Returns: See Error Codes
-
int
wally_psbt_input_set_signatures
(struct wally_psbt_input *input, const struct wally_map *map_in)¶ Set the partial signatures in an input.
Parameters: - input – The input to update.
- map_in – The partial signatures for this input.
Returns: See Error Codes
-
int
wally_psbt_input_set_taproot_signature
(struct wally_psbt_input *input, const unsigned char *tap_sig, size_t tap_sig_len)¶ Set the taproot key signature in an input.
Parameters: - input – The input to update.
- tap_sig – The taproot keyspend signature for this input.
- tap_sig_len – The length of
tap_sig
. Must be 64 or 65.
Returns: See Error Codes
-
int
wally_psbt_input_find_signature
(struct wally_psbt_input *input, const unsigned char *pub_key, size_t pub_key_len, size_t *written)¶ Find a partial signature matching a pubkey in an input.
Parameters: - input – The input to search in.
- pub_key – The pubkey to find.
- pub_key_len – Length of
pub_key
in bytes. Must beEC_PUBLIC_KEY_UNCOMPRESSED_LEN
orEC_PUBLIC_KEY_LEN
. - written – On success, set to zero if the item is not found, otherwise the index of the item plus one.
Returns: See Error Codes
-
int
wally_psbt_input_add_signature
(struct wally_psbt_input *input, const unsigned char *pub_key, size_t pub_key_len, const unsigned char *sig, size_t sig_len)¶ Add a pubkey/partial signature item to an input.
Parameters: - input – The input to add the partial signature to.
- pub_key – The pubkey to find.
- pub_key_len – Length of
pub_key
in bytes. Must beEC_PUBLIC_KEY_UNCOMPRESSED_LEN
orEC_PUBLIC_KEY_LEN
. - sig – The DER-encoded signature plus sighash byte to add.
- sig_len – The length of
sig
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_set_unknowns
(struct wally_psbt_input *input, const struct wally_map *map_in)¶ Set the unknown values in an input.
Parameters: - input – The input to update.
- map_in – The unknown key value pairs for this input.
Returns: See Error Codes
-
int
wally_psbt_input_find_unknown
(struct wally_psbt_input *input, const unsigned char *key, size_t key_len, size_t *written)¶ Find an unknown item matching a key in an input.
Parameters: - input – The input to search in.
- key – The key to find.
- key_len – Length of
key
in bytes. - written – On success, set to zero if the item is not found, otherwise the index of the item plus one.
Returns: See Error Codes
-
int
wally_psbt_input_set_sighash
(struct wally_psbt_input *input, uint32_t sighash)¶ Set the sighash type in an input.
Parameters: - input – The input to update.
- sighash – The sighash type for this input.
Returns: See Error Codes
-
int
wally_psbt_input_set_required_locktime
(struct wally_psbt_input *input, uint32_t required_locktime)¶ Set the required lock time in an input.
Parameters: - input – The input to update.
- required_locktime – The required locktime for this input.
Returns: See Error Codes
-
int
wally_psbt_input_clear_required_locktime
(struct wally_psbt_input *input)¶ Clear the required lock time in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_set_required_lockheight
(struct wally_psbt_input *input, uint32_t required_lockheight)¶ Set the required lock height in an input.
Parameters: - input – The input to update.
- required_lockheight – The required locktime for this input.
Returns: See Error Codes
-
int
wally_psbt_input_clear_required_lockheight
(struct wally_psbt_input *input)¶ Clear the required lock height in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_set_amount
(struct wally_psbt_input *input, uint64_t amount)¶ Set the unblinded amount in an input.
Parameters: - input – The input to update.
- amount – The amount of the input.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_EXPLICIT_VALUE
.Returns: See Error Codes
-
int
wally_psbt_input_get_amount_rangeproof
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the explicit amount rangeproof from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the explicit amount rangeproof.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_VALUE_PROOF
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_amount_rangeproof_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of the explicit amount rangeproof from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_amount_rangeproof
(struct wally_psbt_input *input, const unsigned char *rangeproof, size_t rangeproof_len)¶ Set the explicit amount rangeproof in an input.
Parameters: - input – The input to update.
- rangeproof – The explicit amount rangeproof.
- rangeproof_len – Size of
rangeproof
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_clear_amount_rangeproof
(struct wally_psbt_input *input)¶ Clear the explicit amount rangeproof in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_asset
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the explicit asset tag from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the explicit asset tag.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_EXPLICIT_ASSET
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_asset_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of the explicit asset tag from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_asset
(struct wally_psbt_input *input, const unsigned char *asset, size_t asset_len)¶ Set the explicit asset tag in an input.
Parameters: - input – The input to update.
- asset – The explicit asset tag.
- asset_len – Size of
asset
in bytes. Must beASSET_TAG_LEN
.
Returns: See Error Codes
-
int
wally_psbt_input_clear_asset
(struct wally_psbt_input *input)¶ Clear the explicit asset tag in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_asset_surjectionproof
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the explicit asset surjection proof from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the explicit asset surjection proof.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_ASSET_PROOF
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_asset_surjectionproof_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of the explicit asset surjection proof from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_asset_surjectionproof
(struct wally_psbt_input *input, const unsigned char *surjectionproof, size_t surjectionproof_len)¶ Set the explicit asset surjection proof in an input.
Parameters: - input – The input to update.
- surjectionproof – The explicit asset surjection proof.
- surjectionproof_len – Size of
surjectionproof
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_clear_asset_surjectionproof
(struct wally_psbt_input *input)¶ Clear the explicit asset surjection proof in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_set_issuance_amount
(struct wally_psbt_input *input, uint64_t amount)¶ Set the unblinded token issuance amount in an input.
Parameters: - input – The input to update.
- amount – The issuance amount.
Note
Setting the amount to zero indicates no issuance.
Returns: See Error Codes
-
int
wally_psbt_input_set_inflation_keys
(struct wally_psbt_input *input, uint64_t value)¶ Set the unblinded number of inflation (reissuance) keys in an input.
Parameters: - input – The input to update.
- value – The number of inflation keys.
Returns: See Error Codes
-
int
wally_psbt_input_set_pegin_amount
(struct wally_psbt_input *input, uint64_t amount)¶ Set the peg-in amount in an input.
Parameters: - input – The input to update.
- amount – The peg-in amount.
Returns: See Error Codes
-
int
wally_psbt_input_set_pegin_tx
(struct wally_psbt_input *input, const struct wally_tx *tx)¶ Set the peg-in transaction in an input.
Parameters: - input – The input to update.
- tx – The (non witness) peg-in transaction for this input if it exists.
Returns: See Error Codes
-
int
wally_psbt_input_set_pegin_witness
(struct wally_psbt_input *input, const struct wally_tx_witness_stack *witness)¶ Set the peg-in witness in an input.
Parameters: - input – The input to update.
- witness – The peg-in witness stack for the input, or NULL if not present.
Returns: See Error Codes
-
int
wally_psbt_input_get_pegin_txout_proof
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the peg-in transaction output proof from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the peg-in transaction output proof.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_PEG_IN_TXOUT_PROOF
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_pegin_txout_proof_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of a peg-in transaction output proof from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_pegin_txout_proof
(struct wally_psbt_input *input, const unsigned char *txout_proof, size_t txout_proof_len)¶ Set the peg-in transaction output proof in an input.
Parameters: - input – The input to update.
- txout_proof – The peg-in transaction output proof.
- txout_proof_len – Size of
txout_proof
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_clear_pegin_txout_proof
(struct wally_psbt_input *input)¶ Clear the peg-in transaction output proof in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_pegin_genesis_blockhash
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the peg-in genesis blockhash from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the peg-in genesis blockhash.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Returns:
-
int
wally_psbt_input_get_pegin_genesis_blockhash_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of a peg-in genesis blockhash from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_PEG_IN_GENESIS_HASH
.Returns: See Error Codes
-
int
wally_psbt_input_set_pegin_genesis_blockhash
(struct wally_psbt_input *input, const unsigned char *genesis_blockhash, size_t genesis_blockhash_len)¶ Set the peg-in genesis blockhash in an input.
Parameters: - input – The input to update.
- genesis_blockhash – The peg-in genesis blockhash.
- genesis_blockhash_len – Size of
genesis_blockhash
in bytes. Must beWALLY_TXHASH_LEN
.
Returns: See Error Codes
-
int
wally_psbt_input_clear_pegin_genesis_blockhash
(struct wally_psbt_input *input)¶ Clear the peg-in genesis blockhash in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_pegin_claim_script
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the peg-in claim script from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the peg-in claim script.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_PEG_IN_CLAIM_SCRIPT
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_pegin_claim_script_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of a peg-in claim script from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_pegin_claim_script
(struct wally_psbt_input *input, const unsigned char *script, size_t script_len)¶ Set the peg-in claim script in an input.
Parameters: - input – The input to update.
- script – The peg-in claim script.
- script_len – Size of
script
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_clear_pegin_claim_script
(struct wally_psbt_input *input)¶ Clear the peg-in claim script in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_issuance_amount_commitment
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the blinded token issuance amount from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the blinded issuance amount.
- len – Size of
bytes_out
in bytes. Must beASSET_COMMITMENT_LEN
. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_ISSUANCE_VALUE_COMMITMENT
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_issuance_amount_commitment_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of a blinded token issuance amount from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_issuance_amount_commitment
(struct wally_psbt_input *input, const unsigned char *commitment, size_t commitment_len)¶ Set the blinded token issuance amount in an input.
Parameters: - input – The input to update.
- commitment – The blinded issuance amount commitment.
- commitment_len – Size of
commitment
in bytes. Must beASSET_COMMITMENT_LEN
.
Returns: See Error Codes
-
int
wally_psbt_input_clear_issuance_amount_commitment
(struct wally_psbt_input *input)¶ Clear the blinded token issuance amount in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_issuance_amount_rangeproof
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the issuance amount rangeproof from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the issuance amount rangeproof.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_ISSUANCE_VALUE_RANGEPROOF
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_issuance_amount_rangeproof_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of the issuance amount rangeproof from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_issuance_amount_rangeproof
(struct wally_psbt_input *input, const unsigned char *rangeproof, size_t rangeproof_len)¶ Set the issuance amount rangeproof in an input.
Parameters: - input – The input to update.
- rangeproof – The issuance amount rangeproof.
- rangeproof_len – Size of
rangeproof
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_clear_issuance_amount_rangeproof
(struct wally_psbt_input *input)¶ Clear the issuance amount rangeproof in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_issuance_blinding_nonce
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the asset issuance blinding nonce from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the asset issuance blinding nonce.
- len – Size of
bytes_out
in bytes. Must beBLINDING_FACTOR_LEN
. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_ISSUANCE_BLINDING_NONCE
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_issuance_blinding_nonce_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of a asset issuance blinding nonce from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_issuance_blinding_nonce
(struct wally_psbt_input *input, const unsigned char *nonce, size_t nonce_len)¶ Set the asset issuance blinding nonce in an input.
Parameters: - input – The input to update.
- nonce – Asset issuance or revelation blinding nonce.
- nonce_len – Size of
nonce
in bytes. Must beASSET_TAG_LEN
.
Returns: See Error Codes
-
int
wally_psbt_input_clear_issuance_blinding_nonce
(struct wally_psbt_input *input)¶ Clear the asset issuance blinding nonce in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_issuance_asset_entropy
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the asset issuance entropy from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the asset issuance entropy.
- len – Size of
bytes_out
in bytes. Must beBLINDING_FACTOR_LEN
. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_ISSUANCE_ASSET_ENTROPY
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_issuance_asset_entropy_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of a asset issuance entropy from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_issuance_asset_entropy
(struct wally_psbt_input *input, const unsigned char *entropy, size_t entropy_len)¶ Set the asset issuance entropy in an input.
Parameters: - input – The input to update.
- entropy – The asset issuance entropy.
- entropy_len – Size of
entropy
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_clear_issuance_asset_entropy
(struct wally_psbt_input *input)¶ Clear the asset issuance entropy in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_issuance_amount_blinding_rangeproof
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the issuance amount blinding rangeproof from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the issuance amount blinding rangeproof.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_ISSUANCE_BLIND_VALUE_PROOF
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_issuance_amount_blinding_rangeproof_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of a issuance amount blinding rangeproof from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_issuance_amount_blinding_rangeproof
(struct wally_psbt_input *input, const unsigned char *rangeproof, size_t rangeproof_len)¶ Set the issuance amount blinding rangeproof in an input.
Parameters: - input – The input to update.
- rangeproof – The issuance amount blinding rangeproof.
- rangeproof_len – Size of
rangeproof
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_clear_issuance_amount_blinding_rangeproof
(struct wally_psbt_input *input)¶ Clear the issuance amount blinding rangeproof in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_inflation_keys_commitment
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the blinded number of reissuance tokens from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the blinded number of reissuance tokens.
- len – Size of
bytes_out
in bytes. Must beASSET_COMMITMENT_LEN
. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_INFLATION_KEYS_COMMITMENT
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_inflation_keys_commitment_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of the blinded number of reissuance tokens from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_inflation_keys_commitment
(struct wally_psbt_input *input, const unsigned char *commitment, size_t commitment_len)¶ Set the blinded number of reissuance tokens in an input.
Parameters: - input – The input to update.
- commitment – The blinded number of reissuance tokens.
- commitment_len – Size of
commitment
in bytes. Must beASSET_COMMITMENT_LEN
.
Returns: See Error Codes
-
int
wally_psbt_input_clear_inflation_keys_commitment
(struct wally_psbt_input *input)¶ Clear the blinded number of reissuance tokens in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_inflation_keys_rangeproof
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the reissuance tokens rangeproof from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the reissuance tokens rangeproof.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_INFLATION_KEYS_RANGEPROOF
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_inflation_keys_rangeproof_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of a reissuance tokens rangeproof from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_inflation_keys_rangeproof
(struct wally_psbt_input *input, const unsigned char *rangeproof, size_t rangeproof_len)¶ Set the reissuance tokens rangeproof in an input.
Parameters: - input – The input to update.
- rangeproof – The reissuance tokens rangeproof.
- rangeproof_len – Size of
rangeproof
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_clear_inflation_keys_rangeproof
(struct wally_psbt_input *input)¶ Clear the reissuance tokens rangeproof in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_inflation_keys_blinding_rangeproof
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the reissuance tokens blinding rangeproof from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the reissuance tokens blinding rangeproof.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_ISSUANCE_BLIND_INFLATION_KEYS_PROOF
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_inflation_keys_blinding_rangeproof_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of a reissuance tokens blinding rangeproof from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_inflation_keys_blinding_rangeproof
(struct wally_psbt_input *input, const unsigned char *rangeproof, size_t rangeproof_len)¶ Set the reissuance tokens blinding rangeproof in an input.
Parameters: - input – The input to update.
- rangeproof – The reissuance tokens blinding rangeproof.
- rangeproof_len – Size of
rangeproof
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_clear_inflation_keys_blinding_rangeproof
(struct wally_psbt_input *input)¶ Clear the reissuance tokens blinding rangeproof in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_get_utxo_rangeproof
(const struct wally_psbt_input *input, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the UTXO rangeproof from an input.
Parameters: - input – The input to get from.
- bytes_out – Destination for the UTXO rangeproof.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_IN_UTXO_RANGEPROOF
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_input_get_utxo_rangeproof_len
(const struct wally_psbt_input *input, size_t *written)¶ Get the length of a UTXO rangeproof from an input.
Parameters: - input – The input to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_input_set_utxo_rangeproof
(struct wally_psbt_input *input, const unsigned char *rangeproof, size_t rangeproof_len)¶ Set the UTXO rangeproof in an input.
Parameters: - input – The input to update.
- rangeproof – The UTXO rangeproof.
- rangeproof_len – Size of
rangeproof
in bytes.
Returns: See Error Codes
-
int
wally_psbt_input_clear_utxo_rangeproof
(struct wally_psbt_input *input)¶ Clear the UTXO rangeproof in an input.
Parameters: - input – The input to update.
Returns: See Error Codes
-
int
wally_psbt_input_generate_explicit_proofs
(struct wally_psbt_input *input, uint64_t satoshi, const unsigned char *asset, size_t asset_len, const unsigned char *abf, size_t abf_len, const unsigned char *vbf, size_t vbf_len, const unsigned char *entropy, size_t entropy_len)¶ Generate explicit proofs and unblinded values from an inputs witness UTXO.
Parameters: - input – The input to generate proofs for.
- satoshi – The explicit value of the input.
- asset – The explicit asset tag.
- asset_len – Size of
asset
in bytes. Must beASSET_TAG_LEN
. - abf – Asset blinding factor.
- abf_len – Length of
abf
. Must beBLINDING_FACTOR_LEN
. - vbf – Value blinding factor.
- vbf_len – Length of
vbf
. Must beBLINDING_FACTOR_LEN
. - entropy – Random entropy for explicit range proof generation.
- entropy_len – Size of
entropy
in bytes. Must beBLINDING_FACTOR_LEN
.
Note
This function exposes the unblinded asset and value in the PSET,
which is only appropriate in certain multi-party protocols.
Returns: See Error Codes
-
int
wally_psbt_input_is_finalized
(const struct wally_psbt_input *input, size_t *written)¶ Determine if a PSBT input is finalized.
Parameters: - input – The input to check.
- written – On success, set to one if the input is finalized, otherwise zero.
Returns: See Error Codes
-
int
wally_psbt_output_set_redeem_script
(struct wally_psbt_output *output, const unsigned char *script, size_t script_len)¶ Set the redeem_script in an output.
Parameters: - output – The input to update.
- script – The redeem script for this output.
- script_len – Length of
script
in bytes.
Returns: See Error Codes
-
int
wally_psbt_output_set_witness_script
(struct wally_psbt_output *output, const unsigned char *script, size_t script_len)¶ Set the witness_script in an output.
Parameters: - output – The output to update.
- script – The witness script for this output.
- script_len – Length of
script
in bytes.
Returns: See Error Codes
-
int
wally_psbt_output_set_keypaths
(struct wally_psbt_output *output, const struct wally_map *map_in)¶ Set the non-taproot keypaths in an output.
Parameters: - output – The output to update.
- map_in – The HD keypaths for this output.
Returns: See Error Codes
-
int
wally_psbt_output_find_keypath
(struct wally_psbt_output *output, const unsigned char *pub_key, size_t pub_key_len, size_t *written)¶ Find a keypath matching a pubkey in an output.
Parameters: - output – The output to search in.
- pub_key – The pubkey to find.
- pub_key_len – Length of
pub_key
in bytes. Must beEC_PUBLIC_KEY_UNCOMPRESSED_LEN
orEC_PUBLIC_KEY_LEN
. - written – On success, set to zero if the item is not found, otherwise the index of the item plus one.
Note
This function only finds non-taproot keypaths.
Returns: See Error Codes
-
int
wally_psbt_output_keypath_add
(struct wally_psbt_output *output, const unsigned char *pub_key, size_t pub_key_len, const unsigned char *fingerprint, size_t fingerprint_len, const uint32_t *child_path, size_t child_path_len)¶ Convert and add a pubkey/keypath to an output.
Parameters: - output – The output to add to.
- pub_key – The pubkey to add.
- pub_key_len – Length of
pub_key
in bytes. Must beEC_PUBLIC_KEY_UNCOMPRESSED_LEN
orEC_PUBLIC_KEY_LEN
. - fingerprint – The master key fingerprint for the pubkey.
- fingerprint_len – Length of
fingerprint
in bytes. Must beBIP32_KEY_FINGERPRINT_LEN
. - child_path – The BIP32 derivation path for the pubkey.
- child_path_len – The number of items in
child_path
.
Returns: See Error Codes
-
int
wally_psbt_output_taproot_keypath_add
(struct wally_psbt_output *output, const unsigned char *pub_key, size_t pub_key_len, const unsigned char *tapleaf_hashes, size_t tapleaf_hashes_len, const unsigned char *fingerprint, size_t fingerprint_len, const uint32_t *child_path, size_t child_path_len)¶ Convert and add a pubkey/taproot keypath to a PSBT output.
Parameters: - output – The output to add to.
- pub_key – The pubkey to add.
- pub_key_len – Length of
pub_key
in bytes. Must beEC_XONLY_PUBLIC_KEY_LEN
. - tapleaf_hashes – Series of 32-byte leaf hashes.
- tapleaf_hashes_len – Length of
tapleaf_hashes
in bytes. Must be a multiple ofSHA256_LEN
. - fingerprint – The master key fingerprint for the pubkey.
- fingerprint_len – Length of
fingerprint
in bytes. Must beBIP32_KEY_FINGERPRINT_LEN
. - child_path – The BIP32 derivation path for the pubkey.
- child_path_len – The number of items in
child_path
.
Returns: See Error Codes
-
int
wally_psbt_output_set_unknowns
(struct wally_psbt_output *output, const struct wally_map *map_in)¶ Set the unknown map in an output.
Parameters: - output – The output to update.
- map_in – The unknown key value pairs for this output.
Returns: See Error Codes
-
int
wally_psbt_output_find_unknown
(struct wally_psbt_output *output, const unsigned char *key, size_t key_len, size_t *written)¶ Find an unknown item matching a key in an output.
Parameters: - output – The output to search in.
- key – The key to find.
- key_len – Length of
key
in bytes. - written – On success, set to zero if the item is not found, otherwise the index of the item plus one.
Returns: See Error Codes
-
int
wally_psbt_output_set_amount
(struct wally_psbt_output *output, uint64_t amount)¶ Set the amount in an output.
Parameters: - output – The output to update.
- amount – The amount for this output.
Returns: See Error Codes
-
int
wally_psbt_output_clear_amount
(struct wally_psbt_output *output)¶ Clear the amount in an output.
Parameters: - output – The output to update.
Returns: See Error Codes
-
int
wally_psbt_output_set_script
(struct wally_psbt_output *output, const unsigned char *script, size_t script_len)¶ Set the script in an output.
Parameters: - output – The output to update.
- script – The script for this output.
- script_len – Length of
script
in bytes.
Returns: See Error Codes
-
int
wally_psbt_output_set_blinder_index
(struct wally_psbt_output *output, uint32_t index)¶ Set the input blinder index in an output.
Parameters: - output – The output to update.
- index – The input blinder index for this output.
Returns: See Error Codes
-
int
wally_psbt_output_clear_blinder_index
(struct wally_psbt_output *output)¶ Clear the input blinder index from an output.
Parameters: - output – The output to update.
Returns: See Error Codes
-
int
wally_psbt_output_get_value_commitment
(const struct wally_psbt_output *output, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the blinded asset value from an output.
Parameters: - output – The output to get from.
- bytes_out – Destination for the blinded asset value.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_OUT_VALUE_COMMITMENT
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_output_get_value_commitment_len
(const struct wally_psbt_output *output, size_t *written)¶ Get the length of the blinded asset value from an output.
Parameters: - output – The output to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_output_set_value_commitment
(struct wally_psbt_output *output, const unsigned char *commitment, size_t commitment_len)¶ Set the blinded asset value in an output.
Parameters: - output – The output to update.
- commitment – The blinded asset value.
- commitment_len – Size of
commitment
in bytes.
Returns: See Error Codes
-
int
wally_psbt_output_clear_value_commitment
(struct wally_psbt_output *output)¶ Clear the blinded asset value in an output.
Parameters: - output – The output to update.
Returns: See Error Codes
-
int
wally_psbt_output_get_asset
(const struct wally_psbt_output *output, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the asset tag from an output.
Parameters: - output – The output to get from.
- bytes_out – Destination for the asset tag.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_OUT_ASSET
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_output_get_asset_len
(const struct wally_psbt_output *output, size_t *written)¶ Get the length of the asset tag from an output.
Parameters: - output – The output to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_output_set_asset
(struct wally_psbt_output *output, const unsigned char *asset, size_t asset_len)¶ Set the asset tag in an output.
Parameters: - output – The output to update.
- asset – The asset tag.
- asset_len – Size of
asset
in bytes. Must beASSET_TAG_LEN
.
Returns: See Error Codes
-
int
wally_psbt_output_clear_asset
(struct wally_psbt_output *output)¶ Clear the asset tag in an output.
Parameters: - output – The output to update.
Returns: See Error Codes
-
int
wally_psbt_output_get_asset_commitment
(const struct wally_psbt_output *output, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the blinded asset tag from an output.
Parameters: - output – The output to get from.
- bytes_out – Destination for the blinded asset tag.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_OUT_ASSET_COMMITMENT
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_output_get_asset_commitment_len
(const struct wally_psbt_output *output, size_t *written)¶ Get the length of the blinded asset tag from an output.
Parameters: - output – The output to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_output_set_asset_commitment
(struct wally_psbt_output *output, const unsigned char *commitment, size_t commitment_len)¶ Set the blinded asset tag in an output.
Parameters: - output – The output to update.
- commitment – The blinded asset tag.
- commitment_len – Size of
commitment
in bytes.
Returns: See Error Codes
-
int
wally_psbt_output_clear_asset_commitment
(struct wally_psbt_output *output)¶ Clear the blinded asset tag in an output.
Parameters: - output – The output to update.
Returns: See Error Codes
-
int
wally_psbt_output_get_value_rangeproof
(const struct wally_psbt_output *output, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the output value range proof from an output.
Parameters: - output – The output to get from.
- bytes_out – Destination for the output value range proof.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_OUT_VALUE_RANGEPROOF
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_output_get_value_rangeproof_len
(const struct wally_psbt_output *output, size_t *written)¶ Get the length of the output value range proof from an output.
Parameters: - output – The output to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_output_set_value_rangeproof
(struct wally_psbt_output *output, const unsigned char *rangeproof, size_t rangeproof_len)¶ Set the output value range proof in an output.
Parameters: - output – The output to update.
- rangeproof – The output value range proof.
- rangeproof_len – Size of
rangeproof
in bytes.
Returns: See Error Codes
-
int
wally_psbt_output_clear_value_rangeproof
(struct wally_psbt_output *output)¶ Clear the output value range proof in an output.
Parameters: - output – The output to update.
Returns: See Error Codes
-
int
wally_psbt_output_get_asset_surjectionproof
(const struct wally_psbt_output *output, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the asset surjection proof from an output.
Parameters: - output – The output to get from.
- bytes_out – Destination for the asset surjection proof.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_OUT_ASSET_SURJECTION_PROOF
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_output_get_asset_surjectionproof_len
(const struct wally_psbt_output *output, size_t *written)¶ Get the length of the asset surjection proof from an output.
Parameters: - output – The output to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_output_set_asset_surjectionproof
(struct wally_psbt_output *output, const unsigned char *surjectionproof, size_t surjectionproof_len)¶ Set the asset surjection proof in an output.
Parameters: - output – The output to update.
- surjectionproof – The asset surjection proof.
- surjectionproof_len – Size of
surjectionproof
in bytes.
Returns: See Error Codes
-
int
wally_psbt_output_clear_asset_surjectionproof
(struct wally_psbt_output *output)¶ Clear the asset surjection proof in an output.
Parameters: - output – The output to update.
Returns: See Error Codes
-
int
wally_psbt_output_get_blinding_public_key
(const struct wally_psbt_output *output, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the blinding public key from an output.
Parameters: - output – The output to get from.
- bytes_out – Destination for the blinding public key.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_OUT_BLINDING_PUBKEY
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_output_get_blinding_public_key_len
(const struct wally_psbt_output *output, size_t *written)¶ Get the length of the blinding public key from an output.
Parameters: - output – The output to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_output_set_blinding_public_key
(struct wally_psbt_output *output, const unsigned char *pub_key, size_t pub_key_len)¶ Set the blinding public key in an output.
Parameters: - output – The output to update.
- pub_key – The blinding public key.
- pub_key_len – Size of
pub_key
in bytes.
Returns: See Error Codes
-
int
wally_psbt_output_clear_blinding_public_key
(struct wally_psbt_output *output)¶ Clear the blinding public key in an output.
Parameters: - output – The output to update.
Returns: See Error Codes
-
int
wally_psbt_output_get_ecdh_public_key
(const struct wally_psbt_output *output, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the ephemeral ECDH public key from an output.
Parameters: - output – The output to get from.
- bytes_out – Destination for the ephemeral ECDH public key.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_OUT_ECDH_PUBKEY
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_output_get_ecdh_public_key_len
(const struct wally_psbt_output *output, size_t *written)¶ Get the length of the ephemeral ECDH public key from an output.
Parameters: - output – The output to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_output_set_ecdh_public_key
(struct wally_psbt_output *output, const unsigned char *pub_key, size_t pub_key_len)¶ Set the ephemeral ECDH public key in an output.
Parameters: - output – The output to update.
- pub_key – The ephemeral ECDH public key.
- pub_key_len – Size of
pub_key
in bytes.
Returns: See Error Codes
-
int
wally_psbt_output_clear_ecdh_public_key
(struct wally_psbt_output *output)¶ Clear the ephemeral ECDH public key in an output.
Parameters: - output – The output to update.
Returns: See Error Codes
-
int
wally_psbt_output_get_value_blinding_rangeproof
(const struct wally_psbt_output *output, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the asset value blinding rangeproof from an output.
Parameters: - output – The output to get from.
- bytes_out – Destination for the asset value blinding rangeproof.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_OUT_BLIND_VALUE_PROOF
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_output_get_value_blinding_rangeproof_len
(const struct wally_psbt_output *output, size_t *written)¶ Get the length of the asset value blinding rangeproof from an output.
Parameters: - output – The output to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_output_set_value_blinding_rangeproof
(struct wally_psbt_output *output, const unsigned char *rangeproof, size_t rangeproof_len)¶ Set the asset value blinding rangeproof in an output.
Parameters: - output – The output to update.
- rangeproof – The asset value blinding rangeproof.
- rangeproof_len – Size of
rangeproof
in bytes.
Returns: See Error Codes
-
int
wally_psbt_output_clear_value_blinding_rangeproof
(struct wally_psbt_output *output)¶ Clear the asset value blinding rangeproof in an output.
Parameters: - output – The output to update.
Returns: See Error Codes
-
int
wally_psbt_output_get_asset_blinding_surjectionproof
(const struct wally_psbt_output *output, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the asset tag blinding surjection proof from an output.
Parameters: - output – The output to get from.
- bytes_out – Destination for the asset tag blinding surjection proof.
- len – Size of
bytes_out
in bytes. - written – Destination for the number of bytes written to
bytes_out
. Will be zero if the value is not present.
Note
This operates on the PSET field
PSBT_ELEMENTS_OUT_BLIND_ASSET_PROOF
.Returns: See Variable Length Output Buffers
-
int
wally_psbt_output_get_asset_blinding_surjectionproof_len
(const struct wally_psbt_output *output, size_t *written)¶ Get the length of the asset tag blinding surjection proof from an output.
Parameters: - output – The output to get from.
- written – Destination for the length, or zero if not present.
Returns: See Error Codes
-
int
wally_psbt_output_set_asset_blinding_surjectionproof
(struct wally_psbt_output *output, const unsigned char *surjectionproof, size_t surjectionproof_len)¶ Set the asset tag blinding surjection proof in an output.
Parameters: - output – The output to update.
- surjectionproof – The asset tag blinding surjection proof.
- surjectionproof_len – Size of
surjectionproof
in bytes.
Returns: See Error Codes
-
int
wally_psbt_output_clear_asset_blinding_surjectionproof
(struct wally_psbt_output *output)¶ Clear the asset tag blinding surjection proof in an output.
Parameters: - output – The output to update.
Returns: See Error Codes
-
int
wally_psbt_output_get_blinding_status
(const struct wally_psbt_output *output, uint32_t flags, size_t *written)¶ Get the blinding status of an output.
Parameters: - output – The output to get the blinding status from.
- flags – Flags controlling the checks to perform. Must be 0.
- written – Destination for the blinding status:
WALLY_PSET_BLINDED_NONE
if unblinded,WALLY_PSET_BLINDED_REQUIRED
if only the blinding public key is present,WALLY_PSET_BLINDED_FULL
orWALLY_PSET_BLINDED_PARTIAL
if the blinding public key and all or only some blinding fields respectively are present.
Note
Returns WALLY_ERROR if the value or asset tag blinding key is invalid.
Returns: See Error Codes
-
int
wally_psbt_init_alloc
(uint32_t version, size_t inputs_allocation_len, size_t outputs_allocation_len, size_t global_unknowns_allocation_len, uint32_t flags, struct wally_psbt **output)¶ Allocate and initialize a new PSBT.
Parameters: - version – The version of the PSBT. Must be
WALLY_PSBT_VERSION_0
orWALLY_PSBT_VERSION_2
. - inputs_allocation_len – The number of inputs to pre-allocate space for.
- outputs_allocation_len – The number of outputs to pre-allocate space for.
- global_unknowns_allocation_len – The number of global unknowns to allocate space for.
- flags – Flags controlling psbt creation. Must be 0 or WALLY_PSBT_INIT_PSET.
- output – Destination for the resulting PSBT output.
Returns: See Error Codes
- version – The version of the PSBT. Must be
-
int
wally_psbt_free
(struct wally_psbt *psbt)¶ Free a PSBT allocated by
wally_psbt_init_alloc
.Parameters: - psbt – The PSBT to free.
Returns: See Error Codes
-
int
wally_psbt_set_version
(struct wally_psbt *psbt, uint32_t flags, uint32_t version)¶ Set the version for a PSBT.
Parameters: - psbt – The PSBT to set the version for.
- flags – Flags controlling the version upgrade/downgrade. Must be 0.
- version – The version to use for the PSBT. Must be
WALLY_PSBT_VERSION_0
orWALLY_PSBT_VERSION_2
.
Note
This call converts the PSBT in place to the specified version.
Returns: See Error Codes
-
int
wally_psbt_get_id
(const struct wally_psbt *psbt, uint32_t flags, unsigned char *bytes_out, size_t len)¶ Return the BIP-370 unique id of a PSBT.
Parameters: - psbt – The PSBT to compute the id of.
- flags – PSBT ID calculation flags.
- bytes_out – Destination for the id.
- len – Size of
bytes_out
. Must beWALLY_TXHASH_LEN
.
Note
The id is expensive to compute.
Returns: See Error Codes
-
int
wally_psbt_get_locktime
(const struct wally_psbt *psbt, size_t *written)¶ Return the calculated transaction lock time of a PSBT.
Parameters: - psbt – The PSBT to compute the lock time of. Must be a v2 PSBT.
- written – Destination for the calculated transaction lock time.
Note
The calculated lock time may change as the PSBT is modified.
Returns: See Error Codes
-
int
wally_psbt_is_finalized
(const struct wally_psbt *psbt, size_t *written)¶ Determine if all PSBT inputs are finalized.
Parameters: - psbt – The PSBT to check.
- written – On success, set to one if the PSBT is finalized, otherwise zero.
Returns: See Error Codes
-
int
wally_psbt_set_global_tx
(struct wally_psbt *psbt, const struct wally_tx *tx)¶ Set the global transaction for a PSBT.
Parameters: - psbt – The PSBT to set the transaction for.
- tx – The transaction to set.
The global transaction can only be set on a newly created version 0 PSBT. After this call completes the PSBT will have empty inputs and outputs for each input and output in the transaction
tx
given.Returns: See Error Codes
-
int
wally_psbt_set_tx_version
(struct wally_psbt *psbt, uint32_t version)¶ Set the transaction version for a PSBT.
Parameters: - psbt – The PSBT to set the transaction version for. Must be a v2 PSBT.
- version – The version to use for the transaction. Must be at least 2.
Returns: See Error Codes
-
int
wally_psbt_get_tx_version
(const struct wally_psbt *psbt, size_t *written)¶ Get the transaction version of a PSBT.
Parameters: - psbt – The PSBT to get the transaction version for. Must be v2 PSBT.
- written – Destination for the PSBT’s transaction version.
Note
Returns the default version 2 if none has been explicitly set.
Returns: See Error Codes
-
int
wally_psbt_set_fallback_locktime
(struct wally_psbt *psbt, uint32_t locktime)¶ Set the fallback locktime for a PSBT.
Parameters: - psbt – The PSBT to set the fallback locktime for.
- locktime – The fallback locktime to set.
Sets the fallback locktime field in the transaction. Cannot be set on V0 PSBTs.
Returns: See Error Codes
-
int
wally_psbt_clear_fallback_locktime
(struct wally_psbt *psbt)¶ Clear the fallback locktime for a PSBT.
Parameters: - psbt – The PSBT to update.
Returns: See Error Codes
-
int
wally_psbt_set_tx_modifiable_flags
(struct wally_psbt *psbt, uint32_t flags)¶ Set the transaction modifiable flags for a PSBT.
Parameters: - psbt – The PSBT to set the flags for.
- flags – Transaction modification flags indicating what can be modified.
Returns: See Error Codes
-
int
wally_psbt_set_global_scalars
(struct wally_psbt *psbt, const struct wally_map *map_in)¶ Set the scalar offsets in a PSBT.
Parameters: - psbt – The psbt to update. Must be a PSET.
- map_in – The scalar offsets for this PSBT.
Returns: See Error Codes
-
int
wally_psbt_add_global_scalar
(struct wally_psbt *psbt, const unsigned char *scalar, size_t scalar_len)¶ Add a scalar offset to a PSBT.
Parameters: - psbt – The PSBT to add to. Must be a PSET.
- scalar – The scalar offset to add.
- scalar_len – The length of the scalar offset. Must be 32.
Returns: See Error Codes
-
int
wally_psbt_find_global_scalar
(struct wally_psbt *psbt, const unsigned char *scalar, size_t scalar_len, size_t *written)¶ Find a scalar offset in a PSBT.
Parameters: - psbt – The PSBT to find in. Must be a PSET.
- scalar – The scalar offset to find.
- scalar_len – The length of the scalar offset. Must be 32.
- written – On success, set to zero if the item is not found, otherwise the index of the item plus one.
Returns: See Error Codes
-
int
wally_psbt_set_pset_modifiable_flags
(struct wally_psbt *psbt, uint32_t flags)¶ Set the Elements transaction modifiable flags for a PSBT.
Parameters: - psbt – The PSBT to set the flags for.
- flags – Transaction modification flags indicating what can be modified.
Returns: See Error Codes
-
int
wally_psbt_add_input_taproot_keypath
(struct wally_psbt *psbt, uint32_t index, uint32_t flags, const unsigned char *pub_key, size_t pub_key_len, const unsigned char *tapleaf_hashes, size_t tapleaf_hashes_len, const unsigned char *fingerprint, size_t fingerprint_len, const uint32_t *child_path, size_t child_path_len)¶ Add a taproot keypath to a given PSBT input.
Parameters: - psbt – The PSBT to add the taproot keypath to.
- index – The zero-based index of the input to add to.
- flags – Flags controlling keypath insertion. Must be 0.
- pub_key – The pubkey to add.
- pub_key_len – Length of
pub_key
in bytes. Must beEC_XONLY_PUBLIC_KEY_LEN
. - tapleaf_hashes – Series of 32-byte leaf hashes.
- tapleaf_hashes_len – Length of
tapleaf_hashes
in bytes. Must be a multiple ofSHA256_LEN
. - fingerprint – The master key fingerprint for the pubkey.
- fingerprint_len – Length of
fingerprint
in bytes. Must beBIP32_KEY_FINGERPRINT_LEN
. - child_path – The BIP32 derivation path for the pubkey.
- child_path_len – The number of items in
child_path
.
Returns: See Error Codes
-
int
wally_psbt_add_tx_input_at
(struct wally_psbt *psbt, uint32_t index, uint32_t flags, const struct wally_tx_input *input)¶ Add a transaction input to a PSBT at a given position.
Parameters: - psbt – The PSBT to add the input to.
- index – The zero-based index of the position to add the input at.
- flags – Flags controlling input insertion. Must be 0 or
WALLY_PSBT_FLAG_NON_FINAL
. - input – The transaction input to add.
Returns: See Error Codes
-
int
wally_psbt_remove_input
(struct wally_psbt *psbt, uint32_t index)¶ Remove a transaction input from a PSBT.
Parameters: - psbt – The PSBT to remove the input from.
- index – The zero-based index of the input to remove.
Returns: See Error Codes
-
int
wally_psbt_get_input_bip32_key_from_alloc
(const struct wally_psbt *psbt, size_t index, size_t subindex, uint32_t flags, const struct ext_key *hdkey, struct ext_key **output)¶ Return a BIP32 derived key matching a keypath in a PSBT input.
Parameters: - psbt – The PSBT containing the input whose keypaths to search.
- index – The zero-based index of the input in the PSBT.
- subindex – The zero-based index of the keypath to start searching from.
- flags – Flags controlling the keypath search. Must be 0.
- hdkey – The BIP32 parent key to derive matches from.
- output – Destination for the resulting derived key, if any.
Returns: See Error Codes
-
int
wally_psbt_get_input_signing_script_len
(const struct wally_psbt *psbt, size_t index, size_t *written)¶ Get the length of the scriptPubKey or redeem script from a PSBT input.
Parameters: - psbt – The PSBT containing the input to get from.
- index – The zero-based index of the input to get the script length from.
- written – Destination for the length of the script.
Returns: See Error Codes
-
int
wally_psbt_get_input_signing_script
(const struct wally_psbt *psbt, size_t index, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the scriptPubKey or redeem script from a PSBT input.
Parameters: - psbt – The PSBT containing the input to get from.
- index – The zero-based index of the input to get the script from.
- bytes_out – Destination for the scriptPubKey or redeem script.
- len – Length of
bytes
in bytes. - written – Destination for the number of bytes written to bytes_out.
Returns:
-
int
wally_psbt_get_input_scriptcode_len
(const struct wally_psbt *psbt, size_t index, const unsigned char *script, size_t script_len, size_t *written)¶ Get the length of the scriptCode for signing a PSBT input.
Parameters: - psbt – The PSBT containing the input to get from.
- index – The zero-based index of the input to get the script from.
- script – scriptPubKey/redeem script from
wally_psbt_get_input_signing_script
. - script_len – Length of
script
in bytes. - written – Destination for the length of the scriptCode.
Returns: See Error Codes
-
int
wally_psbt_get_input_scriptcode
(const struct wally_psbt *psbt, size_t index, const unsigned char *script, size_t script_len, unsigned char *bytes_out, size_t len, size_t *written)¶ Get the scriptCode for signing a PSBT input given its scriptPubKey/redeem script.
Parameters: - psbt – The PSBT containing the input to get from.
- index – The zero-based index of the input to get the script from.
- script – scriptPubKey/redeem script from
wally_psbt_get_input_signing_script
. - script_len – Length of
script
in bytes. - bytes_out – Destination for the scriptCode.
- len – Length of
bytes
in bytes. - written – Destination for the number of bytes written to bytes_out.
Returns:
-
int
wally_psbt_get_input_signature_hash
(struct wally_psbt *psbt, size_t index, const struct wally_tx *tx, const unsigned char *script, size_t script_len, uint32_t flags, unsigned char *bytes_out, size_t len)¶ Create a transaction for signing a PSBT input and return its hash.
Parameters: - psbt – The PSBT containing the input to compute a signature hash for.
- index – The zero-based index of the PSBT input to sign.
- tx – The transaction to generate the signature hash from.
- script – The (unprefixed) scriptCode for the input being signed.
- script_len – Length of
script
in bytes. - flags – Flags controlling signature hash generation. Must be 0.
- bytes_out – Destination for the signature hash.
- len – Size of
bytes_out
. Must beSHA256_LEN
.
Returns: See Error Codes
-
int
wally_psbt_add_output_taproot_keypath
(struct wally_psbt *psbt, uint32_t index, uint32_t flags, const unsigned char *pub_key, size_t pub_key_len, const unsigned char *tapleaf_hashes, size_t tapleaf_hashes_len, const unsigned char *fingerprint, size_t fingerprint_len, const uint32_t *child_path, size_t child_path_len)¶ Add a taproot keypath to a given PSBT output.
Parameters: - psbt – The PSBT to add the taproot keypath to.
- index – The zero-based index of the output to add to.
- flags – Flags controlling keypath insertion. Must be 0.
- pub_key – The pubkey to add.
- pub_key_len – Length of
pub_key
in bytes. Must beEC_XONLY_PUBLIC_KEY_LEN
. - tapleaf_hashes – Series of 32-byte leaf hashes.
- tapleaf_hashes_len – Length of
tapleaf_hashes
in bytes. Must be a multiple ofSHA256_LEN
. - fingerprint – The master key fingerprint for the pubkey.
- fingerprint_len – Length of
fingerprint
in bytes. Must beBIP32_KEY_FINGERPRINT_LEN
. - child_path – The BIP32 derivation path for the pubkey.
- child_path_len – The number of items in
child_path
.
Returns: See Error Codes
-
int
wally_psbt_add_tx_output_at
(struct wally_psbt *psbt, uint32_t index, uint32_t flags, const struct wally_tx_output *output)¶ Add a transaction output to a PSBT at a given position.
Parameters: - psbt – The PSBT to add the output to.
- index – The zero-based index of the position to add the output at.
- flags – Flags controlling output insertion. Must be 0.
- output – The transaction output to add.
Returns: See Error Codes
-
int
wally_psbt_remove_output
(struct wally_psbt *psbt, uint32_t index)¶ Remove a transaction output from a PSBT.
Parameters: - psbt – The PSBT to remove the output from.
- index – The zero-based index of the output to remove.
Returns: See Error Codes
-
int
wally_psbt_from_bytes
(const unsigned char *bytes, size_t bytes_len, uint32_t flags, struct wally_psbt **output)¶ Create a PSBT from its serialized bytes.
Parameters: - bytes – Bytes to create the PSBT from.
- bytes_len – Length of
bytes
in bytes. - flags –
WALLY_PSBT_PARSE_FLAG_STRICT
or 0. - output – Destination for the resulting PSBT.
Returns: See Error Codes
-
int
wally_psbt_get_length
(const struct wally_psbt *psbt, uint32_t flags, size_t *written)¶ Get the length of a PSBT when serialized to bytes.
Parameters: - psbt – the PSBT.
- flags – Flags controlling length determination. Must be 0.
- written – Destination for the length in bytes when serialized.
Returns: See Error Codes
-
int
wally_psbt_to_bytes
(const struct wally_psbt *psbt, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written)¶ Serialize a PSBT to bytes.
Parameters: - psbt – the PSBT to serialize.
- flags – Flags controlling serialization. Must be 0.
- bytes_out – Destination for the serialized PSBT.
- len – Length of
bytes
in bytes (usewally_psbt_get_length
). - written – number of bytes written to bytes_out.
Returns:
-
int
wally_psbt_from_base64
(const char *base64, uint32_t flags, struct wally_psbt **output)¶ Create a PSBT from its serialized base64 string.
Parameters: - base64 – Base64 string to create the PSBT from.
- flags –
WALLY_PSBT_PARSE_FLAG_STRICT
or 0. - output – Destination for the resulting PSBT.
Returns: See Error Codes
-
int
wally_psbt_to_base64
(const struct wally_psbt *psbt, uint32_t flags, char **output)¶ Serialize a PSBT to a base64 string.
Parameters: - psbt – the PSBT to serialize.
- flags – Flags controlling serialization. Must be 0.
- output – Destination for the resulting serialized PSBT.
Returns: See Error Codes
-
int
wally_psbt_combine
(struct wally_psbt *psbt, const struct wally_psbt *source)¶ Combine the metadata from a source PSBT into another PSBT.
Parameters: - psbt – the PSBT to combine into.
- source – the PSBT to copy data from.
Returns: See Error Codes
-
int
wally_psbt_clone_alloc
(const struct wally_psbt *psbt, uint32_t flags, struct wally_psbt **output)¶ Clone a PSBT into a newly allocated copy.
Parameters: - psbt – the PSBT to clone.
- flags – Flags controlling PSBT creation. Must be 0.
- output – Destination for the resulting cloned PSBT.
Returns: See Error Codes
-
int
wally_psbt_blind
(struct wally_psbt *psbt, const struct wally_map *values, const struct wally_map *vbfs, const struct wally_map *assets, const struct wally_map *abfs, const unsigned char *entropy, size_t entropy_len, uint32_t output_index, uint32_t flags, struct wally_map *output)¶ Blind a PSBT.
Parameters: - psbt – PSBT to blind. Directly modifies this PSBT.
- values – Integer map of input index to value for the callers inputs.
- vbfs – Integer map of input index to value blinding factor for the callers inputs.
- assets – Integer map of input index to asset tags for the callers inputs.
- abfs – Integer map of input index to asset blinding factors for the callers inputs.
- entropy – Random entropy for asset and blinding factor generation.
- entropy_len – Size of
entropy
in bytes. Must be a multiple of 5 *BLINDING_FACTOR_LEN
for each non-fee output to be blinded, with an additional 2 *BLINDING_FACTOR_LEN
bytes for any issuance outputs. - output_index – The zero based index of the output to blind, or
WALLY_PSET_BLIND_ALL
. - flags – Flags controlling blinding. Must be 0.
- output – Destination for a map of integer output index to the ephemeral private key used to blind the output. Ignored if NULL.
Returns: See Error Codes
-
int
wally_psbt_blind_alloc
(struct wally_psbt *psbt, const struct wally_map *values, const struct wally_map *vbfs, const struct wally_map *assets, const struct wally_map *abfs, const unsigned char *entropy, size_t entropy_len, uint32_t output_index, uint32_t flags, struct wally_map **output)¶ Blind a PSBT.
As per
wally_psbt_blind
, but allocates theoutput
map.Returns: See Error Codes
-
int
wally_psbt_sign
(struct wally_psbt *psbt, const unsigned char *key, size_t key_len, uint32_t flags)¶ Sign PSBT inputs corresponding to a given private key.
Parameters: - psbt – PSBT to sign. Directly modifies this PSBT.
- key – Private key to sign PSBT with.
- key_len – Length of
key
in bytes. Must beEC_PRIVATE_KEY_LEN
. - flags – Flags controlling signing. Must be 0 or EC_FLAG_GRIND_R.
Note
See https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#simple-signer-algorithm for a description of the signing algorithm.
Returns: See Error Codes
-
int
wally_psbt_sign_bip32
(struct wally_psbt *psbt, const struct ext_key *hdkey, uint32_t flags)¶ Sign PSBT inputs corresponding to a given BIP32 parent key.
Parameters: - psbt – PSBT to sign. Directly modifies this PSBT.
- hdkey – The parent extended key to derive signing keys from.
- flags – Flags controlling signing. Must be 0 or EC_FLAG_GRIND_R.
Note
See https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#simple-signer-algorithm for a description of the signing algorithm.
Returns: See Error Codes
-
int
wally_psbt_sign_input_bip32
(struct wally_psbt *psbt, size_t index, size_t subindex, const unsigned char *txhash, size_t txhash_len, const struct ext_key *hdkey, uint32_t flags)¶ Sign a single PSBT input with a given BIP32 key.
Parameters: - psbt – PSBT containing the input to sign. Directly modifies this PSBT.
- index – The zero-based index of the input in the PSBT.
- subindex – The zero-based index of the keypath to start searching from.
- txhash – The signature hash to sign, from
wally_psbt_get_input_signature_hash
. - txhash_len – Size of
txhash
in bytes. Must beWALLY_TXHASH_LEN
. - hdkey – The derived extended key to sign with.
- flags – Flags controlling signing. Must be 0 or EC_FLAG_GRIND_R.
Returns: See Error Codes
-
int
wally_psbt_finalize
(struct wally_psbt *psbt, uint32_t flags)¶ Finalize a PSBT.
Parameters: - psbt – PSBT to finalize. Directly modifies this PSBT.
- flags – Flags controlling finalization. Must be 0 or
WALLY_PSBT_FINALIZE_NO_CLEAR
.
Note
This call does not return an error if no finalization is
performed. Use
wally_psbt_is_finalized
orwally_psbt_input_is_finalized
to determine the finalization status after calling.Returns: See Error Codes
-
int
wally_psbt_finalize_input
(struct wally_psbt *psbt, size_t index, uint32_t flags)¶ Finalize a PSBT input.
Parameters: - psbt – PSBT whose input to finalize. Directly modifies this PSBT.
- index – The zero-based index of the input in the PSBT to finalize.
- flags – Flags controlling finalization. Must be 0 or
WALLY_PSBT_FINALIZE_NO_CLEAR
.
Note
This call does not return an error if no finalization is
performed. Use
wally_psbt_is_finalized
orwally_psbt_input_is_finalized
to determine the finalization status after calling.Returns: See Error Codes
-
int
wally_psbt_extract
(const struct wally_psbt *psbt, uint32_t flags, struct wally_tx **output)¶ Extract a network transaction from a finalized PSBT.
Parameters: - psbt – PSBT to extract from.
- flags – Flags controlling signing. Must be 0 or
WALLY_PSBT_EXTRACT_NON_FINAL
. - output – Destination for the resulting transaction.
Returns: See Error Codes
-
int
wally_psbt_is_elements
(const struct wally_psbt *psbt, size_t *written)¶ Determine if a PSBT is an elements PSBT.
Parameters: - psbt – The PSBT to check.
- written – 1 if the PSBT is an elements PSBT, otherwise 0.
Returns: See Error Codes
Psbt Constants¶
-
WALLY_PSBT_VERSION_0
¶
-
WALLY_PSBT_VERSION_2
¶
-
WALLY_PSBT_HIGHEST_VERSION
¶
-
WALLY_PSBT_INIT_PSET
¶
-
WALLY_PSBT_FLAG_NON_FINAL
¶
-
WALLY_PSBT_PROPRIETARY_TYPE
¶
Transaction modification flags¶
-
WALLY_PSBT_TXMOD_INPUTS
¶
-
WALLY_PSBT_TXMOD_OUTPUTS
¶
-
WALLY_PSBT_TXMOD_SINGLE
¶
-
WALLY_PSET_TXMOD_RESERVED
¶
-
WALLY_PSBT_PARSE_FLAG_STRICT
¶
-
WALLY_PSBT_SERIALIZE_FLAG_REDUNDANT
¶ Include redundant information to match some buggy PSBT implementations
-
WALLY_PSBT_EXTRACT_NON_FINAL
¶
-
WALLY_PSBT_FINALIZE_NO_CLEAR
¶