lightningdevkit
Version:
Lightning Development Kit
43 lines (42 loc) • 2.15 kB
text/typescript
import { CommonBase } from './CommonBase.mjs';
/** An implementation of BroadcasterInterface */
export interface BroadcasterInterfaceInterface {
/**Sends a list of transactions out to (hopefully) be mined.
* This only needs to handle the actual broadcasting of transactions, LDK will automatically
* rebroadcast transactions that haven't made it into a block.
*
* In some cases LDK may attempt to broadcast a transaction which double-spends another
* and this isn't a bug and can be safely ignored.
*
* If more than one transaction is given, these transactions should be considered to be a
* package and broadcast together. Some of the transactions may or may not depend on each other,
* be sure to manage both cases correctly.
*
* Bitcoin transaction packages are defined in BIP 331 and here:
* <https://github.com/bitcoin/bitcoin/blob/master/doc/policy/packages.md>
*/
broadcast_transactions(txs: Uint8Array[]): void;
}
/**
* An interface to send a transaction to the Bitcoin network.
*/
export declare class BroadcasterInterface extends CommonBase {
/** Creates a new instance of BroadcasterInterface from a given implementation */
static new_impl(arg: BroadcasterInterfaceInterface): BroadcasterInterface;
/**
* Sends a list of transactions out to (hopefully) be mined.
* This only needs to handle the actual broadcasting of transactions, LDK will automatically
* rebroadcast transactions that haven't made it into a block.
*
* In some cases LDK may attempt to broadcast a transaction which double-spends another
* and this isn't a bug and can be safely ignored.
*
* If more than one transaction is given, these transactions should be considered to be a
* package and broadcast together. Some of the transactions may or may not depend on each other,
* be sure to manage both cases correctly.
*
* Bitcoin transaction packages are defined in BIP 331 and here:
* <https://github.com/bitcoin/bitcoin/blob/master/doc/policy/packages.md>
*/
broadcast_transactions(txs: Uint8Array[]): void;
}