-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
73 lines (71 loc) · 2.1 KB
/
Copy pathindex.d.ts
File metadata and controls
73 lines (71 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export declare function setLogListener(
callback?: (...args: any[]) => any | undefined | null,
minLevel?: string | undefined | null,
): void
export declare function generateMnemonic(): string
export interface MdkNodeOptions {
network: string
mdkApiKey: string
vssUrl: string
esploraUrl: string
rgsUrl: string
mnemonic: string
lspNodeId: string
lspAddress: string
}
export interface PaymentMetadata {
bolt11: string
paymentHash: string
expiresAt: number
scid: string
}
export interface ReceivedPayment {
paymentHash: string
amount: number
}
export interface NodeChannel {
channelId: string
counterpartyNodeId: string
shortChannelId?: string
inboundCapacityMsat: number
outboundCapacityMsat: number
isChannelReady: boolean
isUsable: boolean
isPublic: boolean
}
export declare class MdkNode {
constructor(options: MdkNodeOptions)
getNodeId(): string
start(): void
stop(): void
syncWallets(): void
getBalance(): number
listChannels(): Array<NodeChannel>
/**
* Manually sync the RGS snapshot.
*
* If `do_full_sync` is true, the RGS snapshot will be updated from scratch. Otherwise, the
* snapshot will be updated from the last known sync point.
*/
syncRgs(doFullSync: boolean): number
receivePayment(minThresholdMs: number, quietThresholdMs: number): Array<ReceivedPayment>
getInvoice(amount: number, description: string, expirySecs: number): PaymentMetadata
getInvoiceWithScid(
humanReadableScid: string,
amount: number,
description: string,
expirySecs: number,
): PaymentMetadata
getVariableAmountJitInvoice(description: string, expirySecs: number): PaymentMetadata
getVariableAmountJitInvoiceWithScid(
humanReadableScid: string,
description: string,
expirySecs: number,
): PaymentMetadata
payLnurl(lnurl: string, amountMsat: number, waitForPaymentSecs?: number | undefined | null): string
payBolt11(bolt11Invoice: string): string
payBolt12Offer(bolt12OfferString: string, amountMsat: number, waitForPaymentSecs?: number | undefined | null): string
}