Skip to content

Commit 32e6c1a

Browse files
committed
wally_script: expose varbuff_to_bytes in core api
1 parent 811979b commit 32e6c1a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

include/wally_script.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,11 @@ WALLY_CORE_API int wally_witness_program_from_bytes(
422422
size_t len,
423423
size_t *written);
424424

425+
WALLY_CORE_API size_t wally_varbuff_to_bytes(
426+
const unsigned char *bytes,
427+
size_t bytes_len,
428+
unsigned char *bytes_out);
429+
425430
#ifdef BUILD_ELEMENTS
426431
/**
427432
* Create a pegout script.
@@ -481,4 +486,3 @@ WALLY_CORE_API int wally_elements_pegin_contract_script_from_bytes(
481486
#endif
482487

483488
#endif /* LIBWALLY_CORE_SCRIPT_H */
484-

src/script.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,12 @@ size_t varbuff_to_bytes(const unsigned char *bytes, size_t bytes_len,
283283
return n + bytes_len;
284284
}
285285

286+
size_t wally_varbuff_to_bytes(const unsigned char *bytes, size_t bytes_len,
287+
unsigned char *bytes_out)
288+
{
289+
return varbuff_to_bytes(bytes, bytes_len, bytes_out);
290+
}
291+
286292
size_t confidential_value_to_bytes(const unsigned char *bytes, size_t bytes_len,
287293
unsigned char *bytes_out)
288294
{

0 commit comments

Comments
 (0)