mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
elements: convenience methods for dealing with assets
We don't preserve detailed asset information at the moment, so provide a way to convert from a sat to an amount_asset struct. We also need a way to convert from an 'amount_asset' to a 'value' for elements, which for explicit (i.e. non-blinded) asssets is a 0x01 prefix plus the big-endian encoded value.
This commit is contained in:
@@ -33,6 +33,9 @@ int test_chdir(const char *path);
|
||||
#undef main
|
||||
|
||||
/* AUTOGENERATED MOCKS START */
|
||||
/* Generated stub for amount_asset_extract_value */
|
||||
u8 *amount_asset_extract_value(const tal_t *ctx UNNEEDED, struct amount_asset *asset UNNEEDED)
|
||||
{ fprintf(stderr, "amount_asset_extract_value called!\n"); abort(); }
|
||||
/* Generated stub for amount_asset_is_main */
|
||||
bool amount_asset_is_main(struct amount_asset *asset UNNEEDED)
|
||||
{ fprintf(stderr, "amount_asset_is_main called!\n"); abort(); }
|
||||
@@ -55,6 +58,9 @@ bool amount_sat_greater_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNN
|
||||
struct amount_sat a UNNEEDED,
|
||||
struct amount_sat b UNNEEDED)
|
||||
{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
|
||||
/* Generated stub for amount_sat_to_asset */
|
||||
struct amount_asset amount_sat_to_asset(struct amount_sat *sat UNNEEDED, const u8 *asset UNNEEDED)
|
||||
{ fprintf(stderr, "amount_sat_to_asset called!\n"); abort(); }
|
||||
/* Generated stub for amount_tx_fee */
|
||||
struct amount_sat amount_tx_fee(u32 fee_per_kw UNNEEDED, size_t weight UNNEEDED)
|
||||
{ fprintf(stderr, "amount_tx_fee called!\n"); abort(); }
|
||||
|
||||
Reference in New Issue
Block a user