Class Konduit
Expand description
Constructors§
§new Konduit(
network_id: NetworkId,
script_deployment_address: ShelleyAddress,
signing_key: SigningKey,
): Konduit
new Konduit(
network_id: NetworkId,
script_deployment_address: ShelleyAddress,
signing_key: SigningKey,
): Konduit
Restore an instance from a signing key. Everything else (connector, adaptor, ...) is initially NOT configured.
Note that this take ownership of the signing key /!, to prevent it from leaking elsewhere afterwards.
Properties§
§§§§
readonly adaptor Info: AdaptorInfoConfigure an (unauthenticated) adaptor, without a defined tag yet. Suitable to get the adaptor info and other non-authenticated operations.
connector: ConnectorGet a reference to the connector.
readonly network Id: NetworkIdCurrent network id for which the app is configured.
readonly wallet: WalletA handle on the underlying wallet.
Accessors§
Methods§
§channels(): Promise<ChannelOutput[]>
channels(): Promise<ChannelOutput[]>
Find channels that belongs to "us"
§free(): void
free(): void
§getQuoteFor(invoice: Invoice): Promise<Quote>
getQuoteFor(invoice: Invoice): Promise<Quote>
Get a quote for a given Bolt11 invoice from the adapator.
§openChannel(tag: Tag, amount: bigint): Promise<Hash32>
openChannel(tag: Tag, amount: bigint): Promise<Hash32>
Open a channel with the given tag and initial deposit.
§pay(invoice: Invoice, quote: Quote, lockeds: Lockeds): Promise<SyncStatus>
pay(invoice: Invoice, quote: Quote, lockeds: Lockeds): Promise<SyncStatus>
Pay an invoice using a previously established quote.
§resetChannelTag(): void
resetChannelTag(): void
Remove any existing channel tag
§syncChannel(lockeds: Lockeds): Promise<SyncStatus>
syncChannel(lockeds: Lockeds): Promise<SyncStatus>
Synchronize the channel with the adaptor.
A 'black-box' API for Konduit L1 & L2 operations.