mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
psbt: Add ability to set global PSBT values
Changelog-None
This commit is contained in:
parent
fa0d9b6d2a
commit
66fe338290
@ -641,6 +641,17 @@ void *psbt_get_lightning(const struct wally_map *map,
|
||||
return item->value;
|
||||
}
|
||||
|
||||
void psbt_set_lightning(const tal_t *ctx,
|
||||
struct wally_map *map,
|
||||
const u8 proprietary_type,
|
||||
const void *value,
|
||||
size_t val_len)
|
||||
{
|
||||
u8 *key = psbt_make_key(NULL, proprietary_type, NULL);
|
||||
map_replace(ctx, map, key, value, val_len);
|
||||
tal_free(key);
|
||||
}
|
||||
|
||||
void psbt_output_set_unknown(const tal_t *ctx,
|
||||
struct wally_psbt_output *out,
|
||||
const u8 *key,
|
||||
|
@ -220,6 +220,19 @@ void *psbt_get_lightning(const struct wally_map *map,
|
||||
const u8 proprietary_type,
|
||||
size_t *val_len);
|
||||
|
||||
/* psbt_set_lightning - Set a propreitary lightning value on the given map
|
||||
*
|
||||
* @map - map of unknowns to set the value
|
||||
* @proprietary_type - type no. to set
|
||||
* @value - the value to be set
|
||||
* @val_len - length of value
|
||||
*/
|
||||
void psbt_set_lightning(const tal_t *ctx,
|
||||
struct wally_map *map,
|
||||
const u8 proprietary_type,
|
||||
const void *value,
|
||||
size_t val_len);
|
||||
|
||||
/* psbt_output_set_unknown - Set the given Key-Value in the psbt's output keymap
|
||||
*
|
||||
* @ctx - tal context for allocations
|
||||
|
Loading…
Reference in New Issue
Block a user