lightningdevkit
Version:
Lightning Development Kit
86 lines (85 loc) • 3.32 kB
text/typescript
import { Currency } from '../enums/Currency.mjs';
import { Option_u64Z } from '../structs/Option_u64Z.mjs';
import { Option_ThirtyTwoBytesZ } from '../structs/Option_ThirtyTwoBytesZ.mjs';
import { Option_CVec_u8ZZ } from '../structs/Option_CVec_u8ZZ.mjs';
import { PayeePubKey } from '../structs/PayeePubKey.mjs';
import { PrivateRoute } from '../structs/PrivateRoute.mjs';
import { Description } from '../structs/Description.mjs';
import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs';
import { Sha256 } from '../structs/Sha256.mjs';
import { RawDataPart } from '../structs/RawDataPart.mjs';
import { ExpiryTime } from '../structs/ExpiryTime.mjs';
import { MinFinalCltvExpiryDelta } from '../structs/MinFinalCltvExpiryDelta.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* Represents an syntactically correct [`Bolt11Invoice`] for a payment on the lightning network,
* but without the signature information.
* Decoding and encoding should not lead to information loss but may lead to different hashes.
*
* For methods without docs see the corresponding methods in [`Bolt11Invoice`].
*/
export declare class RawBolt11Invoice extends CommonBase {
/**
* data part
*/
get_data(): RawDataPart;
/**
* data part
*/
set_data(val: RawDataPart): void;
/**
* Checks if two RawBolt11Invoices contain equal inner contents.
* This ignores pointers and is_owned flags and looks at the values in fields.
* Two objects with NULL inner values will be considered "equal" here.
*/
eq(b: RawBolt11Invoice): boolean;
clone_ptr(): bigint;
/**
* Creates a copy of the RawBolt11Invoice
*/
clone(): RawBolt11Invoice;
/**
* Generates a non-cryptographic 64-bit hash of the RawBolt11Invoice.
*/
hash(): bigint;
/**
* Calculate the hash of the encoded `RawBolt11Invoice` which should be signed.
*/
signable_hash(): Uint8Array;
/**
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
payment_hash(): Sha256;
/**
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
description(): Description;
/**
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
payee_pub_key(): PayeePubKey;
/**
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
description_hash(): Sha256;
/**
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
expiry_time(): ExpiryTime;
/**
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
min_final_cltv_expiry_delta(): MinFinalCltvExpiryDelta;
payment_secret(): Option_ThirtyTwoBytesZ;
payment_metadata(): Option_CVec_u8ZZ;
/**
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
features(): Bolt11InvoiceFeatures;
private_routes(): PrivateRoute[];
/**
* Returns `None` if no amount is set or on overflow.
*/
amount_pico_btc(): Option_u64Z;
currency(): Currency;
}