@breeztech/breez-sdk-spark 0.4.2 → 0.4.3-dev1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/breez-sdk-spark.tgz +0 -0
- package/bundler/breez_sdk_spark_wasm.d.ts +391 -388
- package/bundler/breez_sdk_spark_wasm_bg.js +28 -23
- package/bundler/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/bundler/breez_sdk_spark_wasm_bg.wasm.d.ts +5 -5
- package/deno/breez_sdk_spark_wasm.d.ts +391 -388
- package/deno/breez_sdk_spark_wasm.js +27 -23
- package/deno/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/deno/breez_sdk_spark_wasm_bg.wasm.d.ts +5 -5
- package/nodejs/breez_sdk_spark_wasm.d.ts +391 -388
- package/nodejs/breez_sdk_spark_wasm.js +28 -23
- package/nodejs/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/nodejs/breez_sdk_spark_wasm_bg.wasm.d.ts +5 -5
- package/package.json +1 -1
- package/web/breez_sdk_spark_wasm.d.ts +396 -393
- package/web/breez_sdk_spark_wasm.js +27 -23
- package/web/breez_sdk_spark_wasm_bg.wasm +0 -0
- package/web/breez_sdk_spark_wasm_bg.wasm.d.ts +5 -5
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function defaultConfig(network: Network): Config;
|
|
4
|
-
export function initLogging(logger: Logger, filter?: string | null): Promise<void>;
|
|
5
3
|
export function connect(request: ConnectRequest): Promise<BreezSdk>;
|
|
4
|
+
export function initLogging(logger: Logger, filter?: string | null): Promise<void>;
|
|
5
|
+
export function defaultConfig(network: Network): Config;
|
|
6
6
|
/**
|
|
7
7
|
* Entry point invoked by JavaScript in a worker.
|
|
8
8
|
*/
|
|
@@ -42,6 +42,14 @@ export interface BitcoinChainService {
|
|
|
42
42
|
getTransactionStatus(txid: string): Promise<TxStatus>;
|
|
43
43
|
getTransactionHex(txid: string): Promise<string>;
|
|
44
44
|
broadcastTransaction(tx: string): Promise<void>;
|
|
45
|
+
recommendedFees(): Promise<RecommendedFees>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface Utxo {
|
|
49
|
+
txid: string;
|
|
50
|
+
vout: number;
|
|
51
|
+
value: number;
|
|
52
|
+
status: TxStatus;
|
|
45
53
|
}
|
|
46
54
|
|
|
47
55
|
export interface TxStatus {
|
|
@@ -50,33 +58,81 @@ export interface TxStatus {
|
|
|
50
58
|
blockTime?: number;
|
|
51
59
|
}
|
|
52
60
|
|
|
53
|
-
export
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
export type ChainApiType = "esplora" | "mempoolSpace";
|
|
62
|
+
|
|
63
|
+
export interface RecommendedFees {
|
|
64
|
+
fastestFee: number;
|
|
65
|
+
halfHourFee: number;
|
|
66
|
+
hourFee: number;
|
|
67
|
+
economyFee: number;
|
|
68
|
+
minimumFee: number;
|
|
58
69
|
}
|
|
59
70
|
|
|
60
71
|
export interface PaymentObserver {
|
|
61
72
|
beforeSend: (payments: ProvisionalPayment[]) => Promise<void>;
|
|
62
73
|
}
|
|
63
74
|
|
|
64
|
-
export interface
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
spacing?: number;
|
|
68
|
-
symbol?: Symbol;
|
|
69
|
-
uniqSymbol?: Symbol;
|
|
70
|
-
localizedName: LocalizedName[];
|
|
71
|
-
localeOverrides: LocaleOverrides[];
|
|
75
|
+
export interface SendOnchainSpeedFeeQuote {
|
|
76
|
+
userFeeSat: number;
|
|
77
|
+
l1BroadcastFeeSat: number;
|
|
72
78
|
}
|
|
73
79
|
|
|
74
|
-
export
|
|
80
|
+
export interface UnversionedRecordChange {
|
|
81
|
+
id: RecordId;
|
|
82
|
+
schemaVersion: string;
|
|
83
|
+
updatedFields: Map<string, string>;
|
|
84
|
+
}
|
|
75
85
|
|
|
76
|
-
export interface
|
|
86
|
+
export interface SyncWalletResponse {}
|
|
87
|
+
|
|
88
|
+
export interface SparkInvoiceDetails {
|
|
89
|
+
invoice: string;
|
|
90
|
+
identityPublicKey: string;
|
|
91
|
+
network: BitcoinNetwork;
|
|
92
|
+
amount?: bigint;
|
|
93
|
+
tokenIdentifier?: string;
|
|
94
|
+
expiryTime?: number;
|
|
95
|
+
description?: string;
|
|
96
|
+
senderPublicKey?: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type PaymentDetails = { type: "spark"; invoiceDetails?: SparkInvoicePaymentDetails } | { type: "token"; metadata: TokenMetadata; txHash: string; invoiceDetails?: SparkInvoicePaymentDetails } | { type: "lightning"; description?: string; preimage?: string; invoice: string; paymentHash: string; destinationPubkey: string; lnurlPayInfo?: LnurlPayInfo; lnurlWithdrawInfo?: LnurlWithdrawInfo } | { type: "withdraw"; txId: string } | { type: "deposit"; txId: string };
|
|
100
|
+
|
|
101
|
+
export type Fee = { type: "fixed"; amount: number } | { type: "rate"; satPerVbyte: number };
|
|
102
|
+
|
|
103
|
+
export interface GetPaymentResponse {
|
|
104
|
+
payment: Payment;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface SendOnchainFeeQuote {
|
|
108
|
+
id: string;
|
|
109
|
+
expiresAt: number;
|
|
110
|
+
speedFast: SendOnchainSpeedFeeQuote;
|
|
111
|
+
speedMedium: SendOnchainSpeedFeeQuote;
|
|
112
|
+
speedSlow: SendOnchainSpeedFeeQuote;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface RecordId {
|
|
116
|
+
type: string;
|
|
117
|
+
dataId: string;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface ListFiatCurrenciesResponse {
|
|
121
|
+
currencies: FiatCurrency[];
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface Bolt12Invoice {
|
|
125
|
+
invoice: string;
|
|
126
|
+
source: PaymentRequestSource;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface ListPaymentsResponse {
|
|
130
|
+
payments: Payment[];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface LocalizedName {
|
|
77
134
|
locale: string;
|
|
78
|
-
|
|
79
|
-
symbol: Symbol;
|
|
135
|
+
name: string;
|
|
80
136
|
}
|
|
81
137
|
|
|
82
138
|
export interface TokenMetadata {
|
|
@@ -89,87 +145,83 @@ export interface TokenMetadata {
|
|
|
89
145
|
isFreezable: boolean;
|
|
90
146
|
}
|
|
91
147
|
|
|
92
|
-
export interface
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
schemaVersion: string;
|
|
96
|
-
data: Map<string, string>;
|
|
148
|
+
export interface RefundDepositResponse {
|
|
149
|
+
txId: string;
|
|
150
|
+
txHex: string;
|
|
97
151
|
}
|
|
98
152
|
|
|
99
|
-
export interface
|
|
100
|
-
|
|
153
|
+
export interface ReceivePaymentRequest {
|
|
154
|
+
paymentMethod: ReceivePaymentMethod;
|
|
101
155
|
}
|
|
102
156
|
|
|
103
|
-
export
|
|
104
|
-
txid: string;
|
|
105
|
-
vout: number;
|
|
106
|
-
destinationAddress: string;
|
|
107
|
-
fee: Fee;
|
|
108
|
-
}
|
|
157
|
+
export type PaymentType = "send" | "receive";
|
|
109
158
|
|
|
110
|
-
export interface
|
|
111
|
-
|
|
112
|
-
|
|
159
|
+
export interface SendPaymentRequest {
|
|
160
|
+
prepareResponse: PrepareSendPaymentResponse;
|
|
161
|
+
options?: SendPaymentOptions;
|
|
162
|
+
idempotencyKey?: string;
|
|
113
163
|
}
|
|
114
164
|
|
|
115
|
-
export
|
|
165
|
+
export interface PaymentRequestSource {
|
|
166
|
+
bip21Uri?: string;
|
|
167
|
+
bip353Address?: string;
|
|
168
|
+
}
|
|
116
169
|
|
|
117
|
-
export interface
|
|
170
|
+
export interface SilentPaymentAddressDetails {
|
|
118
171
|
address: string;
|
|
119
172
|
network: BitcoinNetwork;
|
|
120
173
|
source: PaymentRequestSource;
|
|
121
174
|
}
|
|
122
175
|
|
|
123
|
-
export interface
|
|
124
|
-
|
|
176
|
+
export interface LnurlWithdrawRequest {
|
|
177
|
+
amountSats: number;
|
|
178
|
+
withdrawRequest: LnurlWithdrawRequestDetails;
|
|
179
|
+
completionTimeoutSecs?: number;
|
|
125
180
|
}
|
|
126
181
|
|
|
127
|
-
export
|
|
128
|
-
|
|
129
|
-
export interface CheckLightningAddressRequest {
|
|
130
|
-
username: string;
|
|
182
|
+
export interface GetInfoRequest {
|
|
183
|
+
ensureSynced?: boolean;
|
|
131
184
|
}
|
|
132
185
|
|
|
133
|
-
export interface
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
invoice: Bolt11Invoice;
|
|
139
|
-
minFinalCltvExpiryDelta: number;
|
|
140
|
-
network: BitcoinNetwork;
|
|
141
|
-
payeePubkey: string;
|
|
142
|
-
paymentHash: string;
|
|
143
|
-
paymentSecret: string;
|
|
144
|
-
routingHints: Bolt11RouteHint[];
|
|
145
|
-
timestamp: number;
|
|
186
|
+
export interface PrepareLnurlPayRequest {
|
|
187
|
+
amountSats: number;
|
|
188
|
+
comment?: string;
|
|
189
|
+
payRequest: LnurlPayRequestDetails;
|
|
190
|
+
validateSuccessActionUrl?: boolean;
|
|
146
191
|
}
|
|
147
192
|
|
|
148
|
-
export interface
|
|
149
|
-
|
|
150
|
-
fee: bigint;
|
|
193
|
+
export interface ClaimDepositResponse {
|
|
194
|
+
payment: Payment;
|
|
151
195
|
}
|
|
152
196
|
|
|
153
|
-
export interface
|
|
154
|
-
|
|
197
|
+
export interface SparkAddressDetails {
|
|
198
|
+
address: string;
|
|
199
|
+
identityPublicKey: string;
|
|
200
|
+
network: BitcoinNetwork;
|
|
201
|
+
source: PaymentRequestSource;
|
|
155
202
|
}
|
|
156
203
|
|
|
157
|
-
export interface
|
|
158
|
-
|
|
159
|
-
shortChannelId: string;
|
|
160
|
-
feesBaseMsat: number;
|
|
161
|
-
feesProportionalMillionths: number;
|
|
162
|
-
cltvExpiryDelta: number;
|
|
163
|
-
htlcMinimumMsat?: number;
|
|
164
|
-
htlcMaximumMsat?: number;
|
|
204
|
+
export interface CheckLightningAddressRequest {
|
|
205
|
+
username: string;
|
|
165
206
|
}
|
|
166
207
|
|
|
167
|
-
export interface
|
|
168
|
-
|
|
169
|
-
|
|
208
|
+
export interface Symbol {
|
|
209
|
+
grapheme?: string;
|
|
210
|
+
template?: string;
|
|
211
|
+
rtl?: boolean;
|
|
212
|
+
position?: number;
|
|
170
213
|
}
|
|
171
214
|
|
|
172
|
-
export
|
|
215
|
+
export interface Payment {
|
|
216
|
+
id: string;
|
|
217
|
+
paymentType: PaymentType;
|
|
218
|
+
status: PaymentStatus;
|
|
219
|
+
amount: bigint;
|
|
220
|
+
fees: bigint;
|
|
221
|
+
timestamp: number;
|
|
222
|
+
method: PaymentMethod;
|
|
223
|
+
details?: PaymentDetails;
|
|
224
|
+
}
|
|
173
225
|
|
|
174
226
|
export interface ConnectRequest {
|
|
175
227
|
config: Config;
|
|
@@ -177,227 +229,139 @@ export interface ConnectRequest {
|
|
|
177
229
|
storageDir: string;
|
|
178
230
|
}
|
|
179
231
|
|
|
180
|
-
export interface GetTokensMetadataResponse {
|
|
181
|
-
tokensMetadata: TokenMetadata[];
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
export interface SparkInvoiceDetails {
|
|
185
|
-
invoice: string;
|
|
186
|
-
identityPublicKey: string;
|
|
187
|
-
network: BitcoinNetwork;
|
|
188
|
-
amount?: bigint;
|
|
189
|
-
tokenIdentifier?: string;
|
|
190
|
-
expiryTime?: number;
|
|
191
|
-
description?: string;
|
|
192
|
-
senderPublicKey?: string;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
232
|
export interface UpdateUserSettingsRequest {
|
|
196
233
|
sparkPrivateModeEnabled?: boolean;
|
|
197
234
|
}
|
|
198
235
|
|
|
199
|
-
export interface
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
domain: string;
|
|
203
|
-
url: string;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export interface LightningAddressDetails {
|
|
207
|
-
address: string;
|
|
208
|
-
payRequest: LnurlPayRequestDetails;
|
|
236
|
+
export interface Bolt12InvoiceDetails {
|
|
237
|
+
amountMsat: number;
|
|
238
|
+
invoice: Bolt12Invoice;
|
|
209
239
|
}
|
|
210
240
|
|
|
211
|
-
export
|
|
212
|
-
paymentRequest: string;
|
|
213
|
-
amount?: bigint;
|
|
214
|
-
tokenIdentifier?: string;
|
|
215
|
-
}
|
|
241
|
+
export type Network = "mainnet" | "regtest";
|
|
216
242
|
|
|
217
|
-
export interface
|
|
218
|
-
|
|
219
|
-
template?: string;
|
|
220
|
-
rtl?: boolean;
|
|
221
|
-
position?: number;
|
|
243
|
+
export interface UserSettings {
|
|
244
|
+
sparkPrivateModeEnabled: boolean;
|
|
222
245
|
}
|
|
223
246
|
|
|
224
|
-
export type
|
|
247
|
+
export type SdkEvent = { type: "synced" } | { type: "dataSynced"; didPullNewRecords: boolean } | { type: "unclaimedDeposits"; unclaimedDeposits: DepositInfo[] } | { type: "claimedDeposits"; claimedDeposits: DepositInfo[] } | { type: "paymentSucceeded"; payment: Payment } | { type: "paymentPending"; payment: Payment } | { type: "paymentFailed"; payment: Payment };
|
|
225
248
|
|
|
226
|
-
export interface
|
|
227
|
-
|
|
228
|
-
|
|
249
|
+
export interface ReceivePaymentResponse {
|
|
250
|
+
paymentRequest: string;
|
|
251
|
+
fee: bigint;
|
|
229
252
|
}
|
|
230
253
|
|
|
231
|
-
export interface
|
|
232
|
-
|
|
254
|
+
export interface MessageSuccessActionData {
|
|
255
|
+
message: string;
|
|
233
256
|
}
|
|
234
257
|
|
|
235
|
-
export interface
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
258
|
+
export interface CurrencyInfo {
|
|
259
|
+
name: string;
|
|
260
|
+
fractionSize: number;
|
|
261
|
+
spacing?: number;
|
|
262
|
+
symbol?: Symbol;
|
|
263
|
+
uniqSymbol?: Symbol;
|
|
264
|
+
localizedName: LocalizedName[];
|
|
265
|
+
localeOverrides: LocaleOverrides[];
|
|
239
266
|
}
|
|
240
267
|
|
|
241
|
-
export type
|
|
268
|
+
export type InputType = ({ type: "bitcoinAddress" } & BitcoinAddressDetails) | ({ type: "bolt11Invoice" } & Bolt11InvoiceDetails) | ({ type: "bolt12Invoice" } & Bolt12InvoiceDetails) | ({ type: "bolt12Offer" } & Bolt12OfferDetails) | ({ type: "lightningAddress" } & LightningAddressDetails) | ({ type: "lnurlPay" } & LnurlPayRequestDetails) | ({ type: "silentPaymentAddress" } & SilentPaymentAddressDetails) | ({ type: "lnurlAuth" } & LnurlAuthRequestDetails) | ({ type: "url" } & string) | ({ type: "bip21" } & Bip21Details) | ({ type: "bolt12InvoiceRequest" } & Bolt12InvoiceRequestDetails) | ({ type: "lnurlWithdraw" } & LnurlWithdrawRequestDetails) | ({ type: "sparkAddress" } & SparkAddressDetails) | ({ type: "sparkInvoice" } & SparkInvoiceDetails);
|
|
242
269
|
|
|
243
|
-
export
|
|
244
|
-
balanceSats: number;
|
|
245
|
-
tokenBalances: Map<string, TokenBalance>;
|
|
246
|
-
}
|
|
270
|
+
export type SendPaymentMethod = { type: "bitcoinAddress"; address: BitcoinAddressDetails; feeQuote: SendOnchainFeeQuote } | { type: "bolt11Invoice"; invoiceDetails: Bolt11InvoiceDetails; sparkTransferFeeSats?: number; lightningFeeSats: number } | { type: "sparkAddress"; address: string; fee: bigint; tokenIdentifier?: string } | { type: "sparkInvoice"; sparkInvoiceDetails: SparkInvoiceDetails; fee: bigint; tokenIdentifier?: string };
|
|
247
271
|
|
|
248
|
-
export interface
|
|
249
|
-
address: string;
|
|
250
|
-
identityPublicKey: string;
|
|
251
|
-
network: BitcoinNetwork;
|
|
252
|
-
source: PaymentRequestSource;
|
|
253
|
-
}
|
|
272
|
+
export interface ListUnclaimedDepositsRequest {}
|
|
254
273
|
|
|
255
|
-
export interface
|
|
256
|
-
blindedHops: string[];
|
|
257
|
-
}
|
|
274
|
+
export interface Bolt12InvoiceRequestDetails {}
|
|
258
275
|
|
|
259
|
-
export interface
|
|
260
|
-
|
|
261
|
-
|
|
276
|
+
export interface LnurlAuthRequestDetails {
|
|
277
|
+
k1: string;
|
|
278
|
+
action?: string;
|
|
279
|
+
domain: string;
|
|
280
|
+
url: string;
|
|
262
281
|
}
|
|
263
282
|
|
|
264
|
-
export interface
|
|
265
|
-
|
|
266
|
-
l1BroadcastFeeSat: number;
|
|
283
|
+
export interface ListFiatRatesResponse {
|
|
284
|
+
rates: Rate[];
|
|
267
285
|
}
|
|
268
286
|
|
|
269
|
-
export
|
|
270
|
-
description: string;
|
|
271
|
-
lightningAddress: string;
|
|
272
|
-
lnurl: string;
|
|
273
|
-
username: string;
|
|
274
|
-
}
|
|
287
|
+
export type KeySetType = "default" | "taproot" | "nativeSegwit" | "wrappedSegwit" | "legacy";
|
|
275
288
|
|
|
276
|
-
export
|
|
277
|
-
invoice: string;
|
|
278
|
-
source: PaymentRequestSource;
|
|
279
|
-
}
|
|
289
|
+
export type Amount = { type: "bitcoin"; amountMsat: number } | { type: "currency"; iso4217Code: string; fractionalAmount: number };
|
|
280
290
|
|
|
281
|
-
export interface
|
|
282
|
-
|
|
283
|
-
|
|
291
|
+
export interface Record {
|
|
292
|
+
id: RecordId;
|
|
293
|
+
revision: number;
|
|
294
|
+
schemaVersion: string;
|
|
295
|
+
data: Map<string, string>;
|
|
284
296
|
}
|
|
285
297
|
|
|
286
|
-
export interface
|
|
287
|
-
|
|
288
|
-
chains: string[];
|
|
298
|
+
export interface RegisterLightningAddressRequest {
|
|
299
|
+
username: string;
|
|
289
300
|
description?: string;
|
|
290
|
-
issuer?: string;
|
|
291
|
-
minAmount?: Amount;
|
|
292
|
-
offer: Bolt12Offer;
|
|
293
|
-
paths: Bolt12OfferBlindedPath[];
|
|
294
|
-
signingPubkey?: string;
|
|
295
301
|
}
|
|
296
302
|
|
|
297
|
-
export interface
|
|
298
|
-
|
|
299
|
-
amount: bigint;
|
|
300
|
-
details: ProvisionalPaymentDetails;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
export interface SyncWalletResponse {}
|
|
304
|
-
|
|
305
|
-
export interface ListPaymentsRequest {
|
|
306
|
-
typeFilter?: PaymentType[];
|
|
307
|
-
statusFilter?: PaymentStatus[];
|
|
308
|
-
assetFilter?: AssetFilter;
|
|
309
|
-
fromTimestamp?: number;
|
|
310
|
-
toTimestamp?: number;
|
|
311
|
-
offset?: number;
|
|
312
|
-
limit?: number;
|
|
313
|
-
sortAscending?: boolean;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
export interface SignMessageRequest {
|
|
317
|
-
message: string;
|
|
318
|
-
compact: boolean;
|
|
303
|
+
export interface GetTokensMetadataResponse {
|
|
304
|
+
tokensMetadata: TokenMetadata[];
|
|
319
305
|
}
|
|
320
306
|
|
|
321
|
-
export
|
|
322
|
-
currencies: FiatCurrency[];
|
|
323
|
-
}
|
|
307
|
+
export type OnchainConfirmationSpeed = "fast" | "medium" | "slow";
|
|
324
308
|
|
|
325
|
-
export
|
|
326
|
-
description: string;
|
|
327
|
-
ciphertext: string;
|
|
328
|
-
iv: string;
|
|
329
|
-
}
|
|
309
|
+
export type SendPaymentOptions = { type: "bitcoinAddress"; confirmationSpeed: OnchainConfirmationSpeed } | { type: "bolt11Invoice"; preferSpark: boolean; completionTimeoutSecs?: number };
|
|
330
310
|
|
|
331
|
-
export interface
|
|
332
|
-
|
|
333
|
-
|
|
311
|
+
export interface DepositInfo {
|
|
312
|
+
txid: string;
|
|
313
|
+
vout: number;
|
|
314
|
+
amountSats: number;
|
|
315
|
+
refundTx?: string;
|
|
316
|
+
refundTxId?: string;
|
|
317
|
+
claimError?: DepositClaimError;
|
|
334
318
|
}
|
|
335
319
|
|
|
336
|
-
export interface
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
maxDepositClaimFee?: Fee;
|
|
341
|
-
lnurlDomain?: string;
|
|
342
|
-
preferSparkOverLightning: boolean;
|
|
343
|
-
externalInputParsers?: ExternalInputParser[];
|
|
344
|
-
useDefaultExternalInputParsers: boolean;
|
|
345
|
-
realTimeSyncServerUrl?: string;
|
|
346
|
-
privateEnabledDefault: boolean;
|
|
320
|
+
export interface ClaimDepositRequest {
|
|
321
|
+
txid: string;
|
|
322
|
+
vout: number;
|
|
323
|
+
maxFee?: Fee;
|
|
347
324
|
}
|
|
348
325
|
|
|
349
|
-
export
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
export interface Bolt12InvoiceDetails {
|
|
354
|
-
amountMsat: number;
|
|
355
|
-
invoice: Bolt12Invoice;
|
|
326
|
+
export interface TokenBalance {
|
|
327
|
+
balance: bigint;
|
|
328
|
+
tokenMetadata: TokenMetadata;
|
|
356
329
|
}
|
|
357
330
|
|
|
358
|
-
export type ProvisionalPaymentDetails = { type: "bitcoin"; withdrawalAddress: string } | { type: "lightning"; invoice: string } | { type: "spark"; payRequest: string } | { type: "token"; tokenId: string; payRequest: string };
|
|
359
|
-
|
|
360
331
|
export interface SignMessageResponse {
|
|
361
332
|
pubkey: string;
|
|
362
333
|
signature: string;
|
|
363
334
|
}
|
|
364
335
|
|
|
365
|
-
export interface
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
export type PaymentDetails = { type: "spark"; invoiceDetails?: SparkInvoicePaymentDetails } | { type: "token"; metadata: TokenMetadata; txHash: string; invoiceDetails?: SparkInvoicePaymentDetails } | { type: "lightning"; description?: string; preimage?: string; invoice: string; paymentHash: string; destinationPubkey: string; lnurlPayInfo?: LnurlPayInfo; lnurlWithdrawInfo?: LnurlWithdrawInfo } | { type: "withdraw"; txId: string } | { type: "deposit"; txId: string };
|
|
370
|
-
|
|
371
|
-
export interface PrepareLnurlPayRequest {
|
|
372
|
-
amountSats: number;
|
|
373
|
-
comment?: string;
|
|
374
|
-
payRequest: LnurlPayRequestDetails;
|
|
375
|
-
validateSuccessActionUrl?: boolean;
|
|
336
|
+
export interface Bolt12Offer {
|
|
337
|
+
offer: string;
|
|
338
|
+
source: PaymentRequestSource;
|
|
376
339
|
}
|
|
377
340
|
|
|
378
|
-
export interface
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
amountSats: number;
|
|
382
|
-
refundTx?: string;
|
|
383
|
-
refundTxId?: string;
|
|
384
|
-
claimError?: DepositClaimError;
|
|
341
|
+
export interface SparkInvoicePaymentDetails {
|
|
342
|
+
description?: string;
|
|
343
|
+
invoice: string;
|
|
385
344
|
}
|
|
386
345
|
|
|
387
|
-
export interface
|
|
388
|
-
|
|
346
|
+
export interface Bolt11InvoiceDetails {
|
|
347
|
+
amountMsat?: number;
|
|
348
|
+
description?: string;
|
|
349
|
+
descriptionHash?: string;
|
|
350
|
+
expiry: number;
|
|
351
|
+
invoice: Bolt11Invoice;
|
|
352
|
+
minFinalCltvExpiryDelta: number;
|
|
353
|
+
network: BitcoinNetwork;
|
|
354
|
+
payeePubkey: string;
|
|
355
|
+
paymentHash: string;
|
|
356
|
+
paymentSecret: string;
|
|
357
|
+
routingHints: Bolt11RouteHint[];
|
|
358
|
+
timestamp: number;
|
|
389
359
|
}
|
|
390
360
|
|
|
391
|
-
export
|
|
392
|
-
id: RecordId;
|
|
393
|
-
schemaVersion: string;
|
|
394
|
-
updatedFields: Map<string, string>;
|
|
395
|
-
revision: number;
|
|
396
|
-
}
|
|
361
|
+
export type Seed = { type: "mnemonic"; mnemonic: string; passphrase?: string } | ({ type: "entropy" } & number[]);
|
|
397
362
|
|
|
398
|
-
export interface
|
|
399
|
-
|
|
400
|
-
info: CurrencyInfo;
|
|
363
|
+
export interface ListUnclaimedDepositsResponse {
|
|
364
|
+
deposits: DepositInfo[];
|
|
401
365
|
}
|
|
402
366
|
|
|
403
367
|
export interface LnurlPayRequestDetails {
|
|
@@ -413,22 +377,22 @@ export interface LnurlPayRequestDetails {
|
|
|
413
377
|
nostrPubkey?: string;
|
|
414
378
|
}
|
|
415
379
|
|
|
416
|
-
export
|
|
380
|
+
export interface SyncWalletRequest {}
|
|
417
381
|
|
|
418
|
-
export interface
|
|
419
|
-
|
|
420
|
-
|
|
382
|
+
export interface AesSuccessActionData {
|
|
383
|
+
description: string;
|
|
384
|
+
ciphertext: string;
|
|
385
|
+
iv: string;
|
|
421
386
|
}
|
|
422
387
|
|
|
423
|
-
export type
|
|
388
|
+
export type ReceivePaymentMethod = { type: "sparkAddress" } | { type: "sparkInvoice"; amount?: bigint; tokenIdentifier?: string; expiryTime?: number; description?: string; senderPublicKey?: string } | { type: "bitcoinAddress" } | { type: "bolt11Invoice"; description: string; amountSats?: number };
|
|
424
389
|
|
|
425
|
-
export interface
|
|
426
|
-
|
|
427
|
-
|
|
390
|
+
export interface LocaleOverrides {
|
|
391
|
+
locale: string;
|
|
392
|
+
spacing?: number;
|
|
393
|
+
symbol: Symbol;
|
|
428
394
|
}
|
|
429
395
|
|
|
430
|
-
export type SdkEvent = { type: "synced" } | { type: "dataSynced"; didPullNewRecords: boolean } | { type: "unclaimedDeposits"; unclaimedDeposits: DepositInfo[] } | { type: "claimedDeposits"; claimedDeposits: DepositInfo[] } | { type: "paymentSucceeded"; payment: Payment } | { type: "paymentPending"; payment: Payment } | { type: "paymentFailed"; payment: Payment };
|
|
431
|
-
|
|
432
396
|
export interface LnurlWithdrawRequestDetails {
|
|
433
397
|
callback: string;
|
|
434
398
|
k1: string;
|
|
@@ -437,24 +401,10 @@ export interface LnurlWithdrawRequestDetails {
|
|
|
437
401
|
maxWithdrawable: number;
|
|
438
402
|
}
|
|
439
403
|
|
|
440
|
-
export
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
lnurlWithdrawInfo?: LnurlWithdrawInfo;
|
|
445
|
-
lnurlDescription?: string;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
export type Amount = { type: "bitcoin"; amountMsat: number } | { type: "currency"; iso4217Code: string; fractionalAmount: number };
|
|
449
|
-
|
|
450
|
-
export interface GetPaymentResponse {
|
|
451
|
-
payment: Payment;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
export interface SilentPaymentAddressDetails {
|
|
455
|
-
address: string;
|
|
456
|
-
network: BitcoinNetwork;
|
|
457
|
-
source: PaymentRequestSource;
|
|
404
|
+
export interface ExternalInputParser {
|
|
405
|
+
providerId: string;
|
|
406
|
+
inputRegex: string;
|
|
407
|
+
parserUrl: string;
|
|
458
408
|
}
|
|
459
409
|
|
|
460
410
|
export interface Bip21Extra {
|
|
@@ -462,52 +412,51 @@ export interface Bip21Extra {
|
|
|
462
412
|
value: string;
|
|
463
413
|
}
|
|
464
414
|
|
|
465
|
-
export interface
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
415
|
+
export interface LnurlPayInfo {
|
|
416
|
+
lnAddress?: string;
|
|
417
|
+
comment?: string;
|
|
418
|
+
domain?: string;
|
|
419
|
+
metadata?: string;
|
|
420
|
+
processedSuccessAction?: SuccessActionProcessed;
|
|
421
|
+
rawSuccessAction?: SuccessAction;
|
|
469
422
|
}
|
|
470
423
|
|
|
471
|
-
export interface
|
|
472
|
-
|
|
473
|
-
|
|
424
|
+
export interface PaymentMetadata {
|
|
425
|
+
lnurlPayInfo?: LnurlPayInfo;
|
|
426
|
+
lnurlWithdrawInfo?: LnurlWithdrawInfo;
|
|
427
|
+
lnurlDescription?: string;
|
|
474
428
|
}
|
|
475
429
|
|
|
476
|
-
export
|
|
477
|
-
payment: Payment;
|
|
478
|
-
}
|
|
430
|
+
export type DepositClaimError = { type: "depositClaimFeeExceeded"; tx: string; vout: number; maxFee?: Fee; actualFee: number } | { type: "missingUtxo"; tx: string; vout: number } | { type: "generic"; message: string };
|
|
479
431
|
|
|
480
|
-
export interface
|
|
481
|
-
|
|
432
|
+
export interface LightningAddressInfo {
|
|
433
|
+
description: string;
|
|
434
|
+
lightningAddress: string;
|
|
435
|
+
lnurl: string;
|
|
436
|
+
username: string;
|
|
482
437
|
}
|
|
483
438
|
|
|
484
|
-
export interface
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
439
|
+
export interface ListPaymentsRequest {
|
|
440
|
+
typeFilter?: PaymentType[];
|
|
441
|
+
statusFilter?: PaymentStatus[];
|
|
442
|
+
assetFilter?: AssetFilter;
|
|
443
|
+
fromTimestamp?: number;
|
|
444
|
+
toTimestamp?: number;
|
|
445
|
+
offset?: number;
|
|
446
|
+
limit?: number;
|
|
447
|
+
sortAscending?: boolean;
|
|
493
448
|
}
|
|
494
449
|
|
|
495
|
-
export
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
processedSuccessAction?: SuccessActionProcessed;
|
|
501
|
-
rawSuccessAction?: SuccessAction;
|
|
450
|
+
export type BitcoinNetwork = "bitcoin" | "testnet3" | "testnet4" | "signet" | "regtest";
|
|
451
|
+
|
|
452
|
+
export interface SignMessageRequest {
|
|
453
|
+
message: string;
|
|
454
|
+
compact: boolean;
|
|
502
455
|
}
|
|
503
456
|
|
|
504
457
|
export interface LnurlPayRequest {
|
|
505
458
|
prepareResponse: PrepareLnurlPayResponse;
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
export interface LocalizedName {
|
|
509
|
-
locale: string;
|
|
510
|
-
name: string;
|
|
459
|
+
idempotencyKey?: string;
|
|
511
460
|
}
|
|
512
461
|
|
|
513
462
|
export interface LnurlWithdrawResponse {
|
|
@@ -515,78 +464,88 @@ export interface LnurlWithdrawResponse {
|
|
|
515
464
|
payment?: Payment;
|
|
516
465
|
}
|
|
517
466
|
|
|
518
|
-
export interface
|
|
519
|
-
|
|
520
|
-
|
|
467
|
+
export interface LogEntry {
|
|
468
|
+
line: string;
|
|
469
|
+
level: string;
|
|
521
470
|
}
|
|
522
471
|
|
|
523
|
-
export interface
|
|
524
|
-
|
|
472
|
+
export interface CheckMessageRequest {
|
|
473
|
+
message: string;
|
|
474
|
+
pubkey: string;
|
|
475
|
+
signature: string;
|
|
525
476
|
}
|
|
526
477
|
|
|
527
|
-
export type
|
|
478
|
+
export type SuccessActionProcessed = { type: "aes"; result: AesSuccessActionDataResult } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
528
479
|
|
|
529
|
-
export interface
|
|
530
|
-
|
|
531
|
-
|
|
480
|
+
export interface RefundDepositRequest {
|
|
481
|
+
txid: string;
|
|
482
|
+
vout: number;
|
|
483
|
+
destinationAddress: string;
|
|
484
|
+
fee: Fee;
|
|
532
485
|
}
|
|
533
486
|
|
|
534
|
-
export
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
description: string;
|
|
538
|
-
url: string;
|
|
539
|
-
matchesCallbackDomain: boolean;
|
|
487
|
+
export interface Rate {
|
|
488
|
+
coin: string;
|
|
489
|
+
value: number;
|
|
540
490
|
}
|
|
541
491
|
|
|
542
|
-
export
|
|
543
|
-
identifier: WaitForPaymentIdentifier;
|
|
544
|
-
}
|
|
492
|
+
export type PaymentStatus = "completed" | "pending" | "failed";
|
|
545
493
|
|
|
546
|
-
export interface
|
|
547
|
-
|
|
548
|
-
plaintext: string;
|
|
494
|
+
export interface CheckMessageResponse {
|
|
495
|
+
isValid: boolean;
|
|
549
496
|
}
|
|
550
497
|
|
|
551
|
-
export
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
498
|
+
export type AssetFilter = { type: "bitcoin" } | { type: "token"; tokenIdentifier?: string };
|
|
499
|
+
|
|
500
|
+
export interface Bolt12OfferDetails {
|
|
501
|
+
absoluteExpiry?: number;
|
|
502
|
+
chains: string[];
|
|
503
|
+
description?: string;
|
|
504
|
+
issuer?: string;
|
|
505
|
+
minAmount?: Amount;
|
|
506
|
+
offer: Bolt12Offer;
|
|
507
|
+
paths: Bolt12OfferBlindedPath[];
|
|
508
|
+
signingPubkey?: string;
|
|
555
509
|
}
|
|
556
510
|
|
|
557
|
-
export interface
|
|
558
|
-
|
|
559
|
-
amount: bigint;
|
|
560
|
-
tokenIdentifier?: string;
|
|
511
|
+
export interface LnurlWithdrawInfo {
|
|
512
|
+
withdrawUrl: string;
|
|
561
513
|
}
|
|
562
514
|
|
|
563
|
-
export
|
|
515
|
+
export type PaymentMethod = "lightning" | "spark" | "token" | "deposit" | "withdraw" | "unknown";
|
|
564
516
|
|
|
565
|
-
export interface
|
|
566
|
-
|
|
567
|
-
description?: string;
|
|
517
|
+
export interface SendPaymentResponse {
|
|
518
|
+
payment: Payment;
|
|
568
519
|
}
|
|
569
520
|
|
|
570
|
-
export interface
|
|
571
|
-
|
|
521
|
+
export interface UrlSuccessActionData {
|
|
522
|
+
description: string;
|
|
523
|
+
url: string;
|
|
524
|
+
matchesCallbackDomain: boolean;
|
|
572
525
|
}
|
|
573
526
|
|
|
574
|
-
export interface
|
|
575
|
-
|
|
527
|
+
export interface GetInfoResponse {
|
|
528
|
+
balanceSats: number;
|
|
529
|
+
tokenBalances: Map<string, TokenBalance>;
|
|
576
530
|
}
|
|
577
531
|
|
|
578
|
-
export
|
|
532
|
+
export interface LnurlPayResponse {
|
|
533
|
+
payment: Payment;
|
|
534
|
+
successAction?: SuccessActionProcessed;
|
|
535
|
+
}
|
|
579
536
|
|
|
580
|
-
export interface
|
|
581
|
-
|
|
582
|
-
|
|
537
|
+
export interface Credentials {
|
|
538
|
+
username: string;
|
|
539
|
+
password: string;
|
|
583
540
|
}
|
|
584
541
|
|
|
585
|
-
export type
|
|
542
|
+
export type AesSuccessActionDataResult = { type: "decrypted"; data: AesSuccessActionDataDecrypted } | { type: "errorStatus"; reason: string };
|
|
586
543
|
|
|
587
|
-
export
|
|
544
|
+
export type UpdateDepositPayload = { type: "claimError"; error: DepositClaimError } | { type: "refund"; refundTxid: string; refundTx: string };
|
|
588
545
|
|
|
589
|
-
export
|
|
546
|
+
export interface GetPaymentRequest {
|
|
547
|
+
paymentId: string;
|
|
548
|
+
}
|
|
590
549
|
|
|
591
550
|
export interface PrepareLnurlPayResponse {
|
|
592
551
|
amountSats: number;
|
|
@@ -597,6 +556,13 @@ export interface PrepareLnurlPayResponse {
|
|
|
597
556
|
successAction?: SuccessAction;
|
|
598
557
|
}
|
|
599
558
|
|
|
559
|
+
export type SuccessAction = { type: "aes"; data: AesSuccessActionData } | { type: "message"; data: MessageSuccessActionData } | { type: "url"; data: UrlSuccessActionData };
|
|
560
|
+
|
|
561
|
+
export interface FiatCurrency {
|
|
562
|
+
id: string;
|
|
563
|
+
info: CurrencyInfo;
|
|
564
|
+
}
|
|
565
|
+
|
|
600
566
|
export interface Bip21Details {
|
|
601
567
|
amountSat?: number;
|
|
602
568
|
assetId?: string;
|
|
@@ -607,64 +573,97 @@ export interface Bip21Details {
|
|
|
607
573
|
paymentMethods: InputType[];
|
|
608
574
|
}
|
|
609
575
|
|
|
610
|
-
export
|
|
576
|
+
export interface LightningAddressDetails {
|
|
577
|
+
address: string;
|
|
578
|
+
payRequest: LnurlPayRequestDetails;
|
|
579
|
+
}
|
|
611
580
|
|
|
612
|
-
export interface
|
|
613
|
-
|
|
614
|
-
inputRegex: string;
|
|
615
|
-
parserUrl: string;
|
|
581
|
+
export interface GetTokensMetadataRequest {
|
|
582
|
+
tokenIdentifiers: string[];
|
|
616
583
|
}
|
|
617
584
|
|
|
618
|
-
export interface
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
585
|
+
export interface Bolt11RouteHintHop {
|
|
586
|
+
srcNodeId: string;
|
|
587
|
+
shortChannelId: string;
|
|
588
|
+
feesBaseMsat: number;
|
|
589
|
+
feesProportionalMillionths: number;
|
|
590
|
+
cltvExpiryDelta: number;
|
|
591
|
+
htlcMinimumMsat?: number;
|
|
592
|
+
htlcMaximumMsat?: number;
|
|
622
593
|
}
|
|
623
594
|
|
|
624
|
-
export interface
|
|
625
|
-
|
|
595
|
+
export interface Bolt11Invoice {
|
|
596
|
+
bolt11: string;
|
|
597
|
+
source: PaymentRequestSource;
|
|
626
598
|
}
|
|
627
599
|
|
|
628
|
-
export interface
|
|
600
|
+
export interface OutgoingChange {
|
|
601
|
+
change: RecordChange;
|
|
602
|
+
parent?: Record;
|
|
603
|
+
}
|
|
629
604
|
|
|
630
|
-
export
|
|
631
|
-
|
|
605
|
+
export type ProvisionalPaymentDetails = { type: "bitcoin"; withdrawalAddress: string } | { type: "lightning"; invoice: string } | { type: "spark"; payRequest: string } | { type: "token"; tokenId: string; payRequest: string };
|
|
606
|
+
|
|
607
|
+
export interface BitcoinAddressDetails {
|
|
608
|
+
address: string;
|
|
609
|
+
network: BitcoinNetwork;
|
|
610
|
+
source: PaymentRequestSource;
|
|
632
611
|
}
|
|
633
612
|
|
|
634
|
-
export
|
|
613
|
+
export interface Config {
|
|
614
|
+
apiKey?: string;
|
|
615
|
+
network: Network;
|
|
616
|
+
syncIntervalSecs: number;
|
|
617
|
+
maxDepositClaimFee?: Fee;
|
|
618
|
+
lnurlDomain?: string;
|
|
619
|
+
preferSparkOverLightning: boolean;
|
|
620
|
+
externalInputParsers?: ExternalInputParser[];
|
|
621
|
+
useDefaultExternalInputParsers: boolean;
|
|
622
|
+
realTimeSyncServerUrl?: string;
|
|
623
|
+
privateEnabledDefault: boolean;
|
|
624
|
+
}
|
|
635
625
|
|
|
636
|
-
export interface
|
|
637
|
-
|
|
638
|
-
value: number;
|
|
626
|
+
export interface Bolt12OfferBlindedPath {
|
|
627
|
+
blindedHops: string[];
|
|
639
628
|
}
|
|
640
629
|
|
|
641
|
-
export
|
|
630
|
+
export interface Bolt11RouteHint {
|
|
631
|
+
hops: Bolt11RouteHintHop[];
|
|
632
|
+
}
|
|
642
633
|
|
|
643
|
-
export interface
|
|
644
|
-
|
|
634
|
+
export interface PrepareSendPaymentResponse {
|
|
635
|
+
paymentMethod: SendPaymentMethod;
|
|
636
|
+
amount: bigint;
|
|
637
|
+
tokenIdentifier?: string;
|
|
645
638
|
}
|
|
646
639
|
|
|
647
|
-
export interface
|
|
648
|
-
|
|
649
|
-
|
|
640
|
+
export interface PrepareSendPaymentRequest {
|
|
641
|
+
paymentRequest: string;
|
|
642
|
+
amount?: bigint;
|
|
643
|
+
tokenIdentifier?: string;
|
|
650
644
|
}
|
|
651
645
|
|
|
652
|
-
export interface
|
|
653
|
-
|
|
646
|
+
export interface RecordChange {
|
|
647
|
+
id: RecordId;
|
|
648
|
+
schemaVersion: string;
|
|
649
|
+
updatedFields: Map<string, string>;
|
|
650
|
+
revision: number;
|
|
654
651
|
}
|
|
655
652
|
|
|
656
|
-
export interface
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
speedFast: SendOnchainSpeedFeeQuote;
|
|
660
|
-
speedMedium: SendOnchainSpeedFeeQuote;
|
|
661
|
-
speedSlow: SendOnchainSpeedFeeQuote;
|
|
653
|
+
export interface AesSuccessActionDataDecrypted {
|
|
654
|
+
description: string;
|
|
655
|
+
plaintext: string;
|
|
662
656
|
}
|
|
663
657
|
|
|
664
|
-
export
|
|
658
|
+
export interface ProvisionalPayment {
|
|
659
|
+
paymentId: string;
|
|
660
|
+
amount: bigint;
|
|
661
|
+
details: ProvisionalPaymentDetails;
|
|
662
|
+
}
|
|
665
663
|
|
|
666
|
-
export interface
|
|
667
|
-
|
|
664
|
+
export interface IncomingChange {
|
|
665
|
+
newState: Record;
|
|
666
|
+
oldState?: Record;
|
|
668
667
|
}
|
|
669
668
|
|
|
670
669
|
export interface UnfreezeIssuerTokenResponse {
|
|
@@ -672,6 +671,11 @@ export interface UnfreezeIssuerTokenResponse {
|
|
|
672
671
|
impactedTokenAmount: bigint;
|
|
673
672
|
}
|
|
674
673
|
|
|
674
|
+
export interface FreezeIssuerTokenResponse {
|
|
675
|
+
impactedOutputIds: string[];
|
|
676
|
+
impactedTokenAmount: bigint;
|
|
677
|
+
}
|
|
678
|
+
|
|
675
679
|
export interface BurnIssuerTokenRequest {
|
|
676
680
|
amount: bigint;
|
|
677
681
|
}
|
|
@@ -680,11 +684,6 @@ export interface MintIssuerTokenRequest {
|
|
|
680
684
|
amount: bigint;
|
|
681
685
|
}
|
|
682
686
|
|
|
683
|
-
export interface FreezeIssuerTokenResponse {
|
|
684
|
-
impactedOutputIds: string[];
|
|
685
|
-
impactedTokenAmount: bigint;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
687
|
export interface CreateIssuerTokenRequest {
|
|
689
688
|
name: string;
|
|
690
689
|
ticker: string;
|
|
@@ -697,6 +696,10 @@ export interface UnfreezeIssuerTokenRequest {
|
|
|
697
696
|
address: string;
|
|
698
697
|
}
|
|
699
698
|
|
|
699
|
+
export interface FreezeIssuerTokenRequest {
|
|
700
|
+
address: string;
|
|
701
|
+
}
|
|
702
|
+
|
|
700
703
|
export interface Storage {
|
|
701
704
|
getCachedItem: (key: string) => Promise<string | null>;
|
|
702
705
|
setCachedItem: (key: string, value: string) => Promise<void>;
|
|
@@ -738,7 +741,7 @@ export class BreezSdk {
|
|
|
738
741
|
listFiatRates(): Promise<ListFiatRatesResponse>;
|
|
739
742
|
receivePayment(request: ReceivePaymentRequest): Promise<ReceivePaymentResponse>;
|
|
740
743
|
getTokenIssuer(): TokenIssuer;
|
|
741
|
-
|
|
744
|
+
recommendedFees(): Promise<RecommendedFees>;
|
|
742
745
|
getUserSettings(): Promise<UserSettings>;
|
|
743
746
|
prepareLnurlPay(request: PrepareLnurlPayRequest): Promise<PrepareLnurlPayResponse>;
|
|
744
747
|
addEventListener(listener: EventListener): Promise<string>;
|
|
@@ -788,7 +791,7 @@ export class SdkBuilder {
|
|
|
788
791
|
withChainService(chain_service: BitcoinChainService): SdkBuilder;
|
|
789
792
|
withDefaultStorage(storage_dir: string): Promise<SdkBuilder>;
|
|
790
793
|
withPaymentObserver(payment_observer: PaymentObserver): SdkBuilder;
|
|
791
|
-
withRestChainService(url: string, credentials?: Credentials | null): SdkBuilder;
|
|
794
|
+
withRestChainService(url: string, api_type: ChainApiType, credentials?: Credentials | null): SdkBuilder;
|
|
792
795
|
static new(config: Config, seed: Seed): SdkBuilder;
|
|
793
796
|
build(): Promise<BreezSdk>;
|
|
794
797
|
}
|
|
@@ -833,6 +836,7 @@ export interface InitOutput {
|
|
|
833
836
|
readonly breezsdk_prepareLnurlPay: (a: number, b: any) => any;
|
|
834
837
|
readonly breezsdk_prepareSendPayment: (a: number, b: any) => any;
|
|
835
838
|
readonly breezsdk_receivePayment: (a: number, b: any) => any;
|
|
839
|
+
readonly breezsdk_recommendedFees: (a: number) => any;
|
|
836
840
|
readonly breezsdk_refundDeposit: (a: number, b: any) => any;
|
|
837
841
|
readonly breezsdk_registerLightningAddress: (a: number, b: any) => any;
|
|
838
842
|
readonly breezsdk_removeEventListener: (a: number, b: number, c: number) => any;
|
|
@@ -840,7 +844,6 @@ export interface InitOutput {
|
|
|
840
844
|
readonly breezsdk_signMessage: (a: number, b: any) => any;
|
|
841
845
|
readonly breezsdk_syncWallet: (a: number, b: any) => any;
|
|
842
846
|
readonly breezsdk_updateUserSettings: (a: number, b: any) => any;
|
|
843
|
-
readonly breezsdk_waitForPayment: (a: number, b: any) => any;
|
|
844
847
|
readonly connect: (a: any) => any;
|
|
845
848
|
readonly defaultConfig: (a: any) => any;
|
|
846
849
|
readonly initLogging: (a: any, b: number, c: number) => any;
|
|
@@ -852,7 +855,7 @@ export interface InitOutput {
|
|
|
852
855
|
readonly sdkbuilder_withKeySet: (a: number, b: any, c: number, d: number) => number;
|
|
853
856
|
readonly sdkbuilder_withLnurlClient: (a: number, b: any) => number;
|
|
854
857
|
readonly sdkbuilder_withPaymentObserver: (a: number, b: any) => number;
|
|
855
|
-
readonly sdkbuilder_withRestChainService: (a: number, b: number, c: number, d: number) => number;
|
|
858
|
+
readonly sdkbuilder_withRestChainService: (a: number, b: number, c: number, d: any, e: number) => number;
|
|
856
859
|
readonly sdkbuilder_withStorage: (a: number, b: any) => number;
|
|
857
860
|
readonly tokenissuer_burnIssuerToken: (a: number, b: any) => any;
|
|
858
861
|
readonly tokenissuer_createIssuerToken: (a: number, b: any) => any;
|
|
@@ -888,9 +891,9 @@ export interface InitOutput {
|
|
|
888
891
|
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
889
892
|
readonly __wbindgen_export_7: WebAssembly.Table;
|
|
890
893
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
891
|
-
readonly
|
|
892
|
-
readonly
|
|
893
|
-
readonly
|
|
894
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbac93e35ba6a14f4: (a: number, b: number) => void;
|
|
895
|
+
readonly closure919_externref_shim: (a: number, b: number, c: any) => void;
|
|
896
|
+
readonly closure517_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
894
897
|
readonly __wbindgen_start: () => void;
|
|
895
898
|
}
|
|
896
899
|
|