@rsksmart/powpeg-sdk 1.2.0-beta.2 → 1.2.0-beta.4

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/dist/index.d.ts CHANGED
@@ -3,12 +3,21 @@ import { isBtcTestnetAddress, isBtcMainnetAddress, ethers } from '@rsksmart/brid
3
3
  import TrezorConnect from '@trezor/connect-web';
4
4
  import { CreateTransactionArg } from '@ledgerhq/hw-app-btc/lib/createTransaction';
5
5
 
6
+ /** Priority level used to look up a Bitcoin network fee rate. */
6
7
  type FeeLevel = 'slow' | 'average' | 'fast';
8
+ /**
9
+ * Contract that a Bitcoin signing backend (e.g. {@link TrezorSigner}, {@link LedgerSigner}) must implement
10
+ * so {@link PowPegSDK} can derive addresses and sign peg-in transactions with it.
11
+ */
7
12
  interface BitcoinSigner {
8
13
  getNonChangeAddresses(bundleSize: number): Promise<string[]>;
9
14
  getChangeAddresses(bundleSize: number): Promise<string[]>;
10
15
  signTransaction(psbt: Psbt, inputs?: Utxo[], transactions?: string[]): Promise<string>;
11
16
  }
17
+ /**
18
+ * Contract for a Bitcoin data provider (fee rates, UTXOs, raw transactions, broadcasting).
19
+ * {@link PowPegSDK} falls back to its built-in 2WP API-backed implementation when none is supplied.
20
+ */
12
21
  interface BitcoinDataSource {
13
22
  getFeeRate(level: FeeLevel): Promise<number>;
14
23
  getTxHex(txId: string): Promise<string>;
@@ -16,25 +25,47 @@ interface BitcoinDataSource {
16
25
  broadcast(hexTx: string): Promise<string>;
17
26
  getAddressDetails(address: string): Promise<AddressWithDetails>;
18
27
  }
28
+ /** A Bitcoin address together with its current balance and transaction count. */
19
29
  interface AddressWithDetails {
20
30
  address: string;
21
31
  balance: number;
22
32
  txCount: number;
23
33
  }
34
+ /** A spendable Bitcoin unspent transaction output. */
24
35
  interface Utxo {
25
36
  address: string;
26
37
  txid: string;
27
38
  amount: bigint;
28
39
  vout: number;
29
40
  }
41
+ /** Estimated Bitcoin and Rootstock fees for a peg-out. */
30
42
  interface PegoutFeeEstimation {
31
43
  bitcoinFee: bigint;
32
44
  rootstockFee: bigint;
33
45
  }
46
+ /** Browser support flags for a feature, as reported by the 2WP API. */
47
+ interface SupportedBrowsers {
48
+ chrome: boolean;
49
+ firefox: boolean;
50
+ safari: boolean;
51
+ edge: boolean;
52
+ brave: boolean;
53
+ chromium: boolean;
54
+ opera: boolean;
55
+ }
56
+ /** A feature flag entry returned by the 2WP API `/features` endpoint. */
57
+ interface Feature {
58
+ name: string;
59
+ value: string;
60
+ version: number;
61
+ supportedBrowsers?: SupportedBrowsers;
62
+ }
63
+ /** Distinguishes a peg-in (BTC -> RBTC) from a peg-out (RBTC -> BTC) transaction. */
34
64
  declare enum TxType {
35
65
  PEGIN = "PEGIN",
36
66
  PEGOUT = "PEGOUT"
37
67
  }
68
+ /** Lifecycle status of a peg-out transaction, as reported by the 2WP API. */
38
69
  declare enum PegoutStatuses {
39
70
  RECEIVED = "RECEIVED",
40
71
  REJECTED = "REJECTED",
@@ -46,6 +77,7 @@ declare enum PegoutStatuses {
46
77
  NOT_PEGOUT_TX = "NOT_PEGOUT_TX",
47
78
  RELEASE_BTC = "RELEASE_BTC"
48
79
  }
80
+ /** Lifecycle status of a peg-in transaction, as reported by the 2WP API. */
49
81
  declare enum PeginStatuses {
50
82
  NOT_IN_BTC_YET = "NOT_IN_BTC_YET",
51
83
  WAITING_CONFIRMATIONS = "WAITING_CONFIRMATIONS",
@@ -57,12 +89,15 @@ declare enum PeginStatuses {
57
89
  ERROR_BELOW_MIN = "ERROR_BELOW_MIN",
58
90
  ERROR_UNEXPECTED = "ERROR_UNEXPECTED"
59
91
  }
92
+ /** Maps the bridge's numeric rejection codes to a human-readable peg-out rejection reason. */
60
93
  declare const RejectedPegoutReasons: {
61
94
  readonly 1: "LOW_AMOUNT";
62
95
  readonly 2: "CALLER_CONTRACT";
63
96
  readonly 3: "FEE_ABOVE_VALUE";
64
97
  };
98
+ /** A human-readable reason a peg-out was rejected, as reported by the 2WP API. */
65
99
  type RejectedPegoutReason = (typeof RejectedPegoutReasons)[keyof typeof RejectedPegoutReasons];
100
+ /** Bitcoin and Rootstock-side details of a peg-in transaction. */
66
101
  interface PeginTxDetails {
67
102
  btc: {
68
103
  txId: string;
@@ -81,6 +116,7 @@ interface PeginTxDetails {
81
116
  };
82
117
  status: PeginStatuses;
83
118
  }
119
+ /** Details of a peg-out transaction, including its Bitcoin release once processed. */
84
120
  interface PegoutTxDetails {
85
121
  originatingRskTxHash: string;
86
122
  rskTxHash: string;
@@ -93,15 +129,19 @@ interface PegoutTxDetails {
93
129
  btcRawTransaction: string;
94
130
  reason?: RejectedPegoutReason;
95
131
  }
132
+ /** Status payload for a peg-out transaction, as returned by {@link PowPegSDK.getTransactionStatus}. */
96
133
  interface PegoutStatusData {
97
134
  type: TxType.PEGOUT;
98
135
  txDetails: PegoutTxDetails;
99
136
  }
137
+ /** Status payload for a peg-in transaction, as returned by {@link PowPegSDK.getTransactionStatus}. */
100
138
  interface PeginStatusData {
101
139
  type: TxType.PEGIN;
102
140
  txDetails: PeginTxDetails;
103
141
  }
142
+ /** Discriminated union of the two possible {@link PowPegSDK.getTransactionStatus} payloads. */
104
143
  type StatusData = PegoutStatusData | PeginStatusData;
144
+ /** An unsigned, fee-funded peg-in PSBT ready to be signed, as returned by {@link PowPegSDK.createAndFundPegin}. */
105
145
  interface UnsignedPegin {
106
146
  psbt: Psbt;
107
147
  inputs: Utxo[];
@@ -142,6 +182,10 @@ declare const networks: {
142
182
  type AddressType = keyof typeof supportedAddressTypes;
143
183
  type Network = keyof typeof networks;
144
184
 
185
+ /**
186
+ * SDK for creating, funding, signing and broadcasting native PowPeg peg-in (BTC -> RBTC)
187
+ * and peg-out (RBTC -> BTC) transactions.
188
+ */
145
189
  declare class PowPegSDK {
146
190
  private _bitcoinSigner;
147
191
  private _bitcoinDataSource;
@@ -154,8 +198,7 @@ declare class PowPegSDK {
154
198
  private pegInOutputs;
155
199
  private powpegRsktHeader;
156
200
  private burnDustMaxValue;
157
- private utxos;
158
- private changeAddress?;
201
+ private funding;
159
202
  private minPeginAmount;
160
203
  private peginFeeEstimationInputs;
161
204
  private minPegoutAmount;
@@ -182,26 +225,92 @@ declare class PowPegSDK {
182
225
  private groupAddressesByUsage;
183
226
  private groupAddressesByBalance;
184
227
  private getAddressesGroupedByUsage;
228
+ private validateRskRecipient;
229
+ private getVerifiedFederationAddress;
185
230
  private getRskOutput;
186
- estimatePeginFee(amount: bigint, feeLevel?: FeeLevel): Promise<number>;
231
+ /**
232
+ * Estimates the Bitcoin network fee (in satoshis) to pay for a peg-in transaction of the given amount.
233
+ * @param {bigint} amount - Amount to peg in, in satoshis.
234
+ * @param {FeeLevel} feeLevel - Fee priority level used to look up the current network fee rate. Defaults to `'fast'`.
235
+ * @param {Utxo[]} [utxos] - UTXOs available to fund the peg-in. When provided, the estimate runs the
236
+ * same input selection used to fund the transaction; otherwise it assumes a fixed number of inputs.
237
+ * @returns {Promise<number>} The estimated total fee in satoshis.
238
+ */
239
+ estimatePeginFee(amount: bigint, feeLevel?: FeeLevel, utxos?: Utxo[]): Promise<number>;
240
+ /**
241
+ * Builds an unsigned peg-in PSBT that sends `amount` satoshis to the federation's Bitcoin address,
242
+ * encoding `recipientAddress` (and an unused refund address, if available) in an OP_RETURN output.
243
+ * Also records the UTXOs and change address {@link fundPegin} will use to fund the transaction.
244
+ * @param {bigint} amount - Amount to peg in, in satoshis.
245
+ * @param {string} recipientAddress - Rootstock address that will receive the pegged-in RBTC.
246
+ * @param {Utxo[]} [selectedUtxos] - UTXOs to fund the transaction with. If omitted, they're derived from the signer's used addresses.
247
+ * @returns {Promise<Psbt>} The unsigned, unfunded peg-in PSBT.
248
+ */
187
249
  createPegin(amount: bigint, recipientAddress: string, selectedUtxos?: Utxo[]): Promise<Psbt>;
188
250
  private selectInputs;
189
251
  private validatePeginAmount;
190
252
  private calculatePeginFee;
191
253
  private calculateFeeAndSelectedInputs;
254
+ /**
255
+ * Adds funding inputs (and a change output, if above the dust threshold) to an existing peg-in PSBT,
256
+ * using the UTXOs previously selected by {@link createPegin} or {@link createAndFundPsbt}.
257
+ * @param {Psbt} psbt - The peg-in PSBT to fund.
258
+ * @param {FeeLevel} feeLevel - Fee priority level used to look up the current network fee rate. Defaults to `'fast'`.
259
+ * @param {bigint} [value] - Amount being sent, in satoshis. Defaults to the PSBT's second output value.
260
+ * @returns {Promise<UnsignedPegin>} The funded PSBT along with its inputs, their raw transactions, and the total fee.
261
+ */
192
262
  fundPegin(psbt: Psbt, feeLevel?: FeeLevel, value?: bigint): Promise<{
193
263
  psbt: Psbt;
194
264
  inputs: Utxo[];
195
265
  transactions: string[];
196
266
  fee: number;
197
267
  }>;
268
+ /**
269
+ * Convenience method that creates and funds a peg-in PSBT in one call.
270
+ * @param {bigint} amount - Amount to peg in, in satoshis.
271
+ * @param {string} recipientAddress - Rootstock address that will receive the pegged-in RBTC.
272
+ * @param {BitcoinSigner} signer - Bitcoin signer used to derive the addresses funding this peg-in.
273
+ * @param {FeeLevel} feeLevel - Fee priority level used to look up the current network fee rate. Defaults to `'fast'`.
274
+ * @param {Utxo[]} [selectedUtxos] - UTXOs to fund the transaction with. If omitted, they're derived from the signer's used addresses.
275
+ * @returns {Promise<UnsignedPegin>} The funded, unsigned peg-in PSBT along with its inputs, raw transactions, and total fee.
276
+ */
198
277
  createAndFundPegin(amount: bigint, recipientAddress: string, signer: BitcoinSigner, feeLevel?: FeeLevel, selectedUtxos?: Utxo[]): Promise<UnsignedPegin>;
278
+ /**
279
+ * Builds and funds a generic PSBT paying `amount` satoshis to `recipientAddress` using the given UTXOs,
280
+ * without routing through the federation address (unlike {@link createPegin}).
281
+ * @param {bigint} amount - Amount to send, in satoshis.
282
+ * @param {string} recipientAddress - Bitcoin address to receive the payment.
283
+ * @param {Utxo[]} utxos - UTXOs to fund the transaction with.
284
+ * @param {FeeLevel} feeLevel - Fee priority level used to look up the current network fee rate. Defaults to `'fast'`.
285
+ * @returns {Promise<UnsignedPegin>} The funded, unsigned PSBT along with its inputs, raw transactions, and total fee.
286
+ */
199
287
  createAndFundPsbt(amount: bigint, recipientAddress: string, utxos: Utxo[], feeLevel?: FeeLevel): Promise<UnsignedPegin>;
200
288
  private signPegin;
289
+ /**
290
+ * Signs a peg-in PSBT with the configured Bitcoin signer and broadcasts it via the configured data source.
291
+ * @param {Psbt} psbt - The funded peg-in PSBT to sign and broadcast.
292
+ * @param {Utxo[]} [inputs] - The PSBT's funding UTXOs (the `inputs` field returned by `fundPegin`/`createAndFundPegin`), forwarded to the signer if it needs them. Required for the bundled hardware-wallet signers (Ledger, Trezor); optional only for signers that can sign directly from the PSBT.
293
+ * @param {string[]} [transactions] - Raw hex transactions for `inputs` (the `transactions` field returned by `fundPegin`/`createAndFundPegin`), forwarded to the signer if it needs them. Required for the bundled hardware-wallet signers (Ledger, Trezor); optional only for signers that can sign directly from the PSBT.
294
+ * @returns {Promise<string>} The broadcast transaction's ID.
295
+ */
201
296
  signAndBroadcastPegin(psbt: Psbt, inputs?: Utxo[], transactions?: string[]): Promise<string>;
202
297
  private validateMinimumPegoutAmount;
203
298
  private createPegoutTransaction;
299
+ /**
300
+ * Estimates the Bitcoin and Rootstock fees for a peg-out of the given RBTC amount.
301
+ * @param {string} amount - Amount to peg out, in RBTC (18 decimals).
302
+ * @param {string} [fromAddress] - Rootstock sender address used to estimate gas. Defaults to the zero address.
303
+ * @returns {Promise<PegoutFeeEstimation>} The estimated Bitcoin fee (satoshis) and Rootstock gas fee (wei).
304
+ */
204
305
  estimatePegoutFees(amount: string, fromAddress?: string): Promise<PegoutFeeEstimation>;
306
+ /**
307
+ * Validates the requested amount and the sender's balance, then builds an unsigned peg-out
308
+ * transaction (a value-transfer call to the bridge precompile) together with its estimated fees.
309
+ * @param {string} amount - Amount to peg out, in RBTC (18 decimals).
310
+ * @param {string} senderAccount - Rootstock address that will send the peg-out.
311
+ * @returns The unsigned transaction request and its estimated Bitcoin/Rootstock fees.
312
+ * @throws {NotEnoughFundsError} If `senderAccount`'s balance is lower than `amount`.
313
+ */
205
314
  createPegout(amount: string, senderAccount: string): Promise<{
206
315
  tx: {
207
316
  from: string;
@@ -211,40 +320,96 @@ declare class PowPegSDK {
211
320
  rootstockFee: bigint;
212
321
  bitcoinFee: bigint;
213
322
  }>;
323
+ /**
324
+ * Sends a peg-out transaction (as returned by {@link createPegout}) using the given ethers signer
325
+ * and waits for it to be mined.
326
+ * @param {{ from: string, to: string, value: string }} tx - The peg-out transaction request.
327
+ * @param {ethers.Signer} signer - Ethers signer used to send the transaction.
328
+ * @returns The mined transaction receipt, if the signer's provider is set.
329
+ */
214
330
  signAndBroadcastPegout(tx: {
215
331
  from: string;
216
332
  to: string;
217
333
  value: string;
218
334
  }, signer: ethers.Signer): Promise<ethers.providers.TransactionReceipt | undefined>;
335
+ /**
336
+ * Fetches the current status of a peg-in or peg-out transaction from the configured API.
337
+ * @param {string} txHash - The Bitcoin or Rootstock transaction hash to look up.
338
+ * @param {T} txType - Whether `txHash` is a peg-in or a peg-out transaction.
339
+ * @returns {Promise<Extract<StatusData, { type: T }>>} The transaction's type-narrowed status details.
340
+ */
219
341
  getTransactionStatus<T extends TxType>(txHash: string, txType: T): Promise<Extract<PegoutStatusData, {
220
342
  type: T;
221
343
  }> | Extract<PeginStatusData, {
222
344
  type: T;
223
345
  }>>;
346
+ /**
347
+ * Retrieves the feature flags from the 2WP API `/features` endpoint.
348
+ * @returns {Promise<Feature[]>} The feature flags as returned by the API.
349
+ */
350
+ getFeatures(): Promise<Feature[]>;
351
+ /**
352
+ * Returns the spendable UTXOs for the given Bitcoin address(es).
353
+ * @param {string | string[]} addresses - One or more Bitcoin addresses to fetch UTXOs for.
354
+ * @returns {Promise<Utxo[]>} The UTXOs available across the given address(es).
355
+ * @throws {InvalidAddressError} If any address doesn't belong to the SDK's configured network.
356
+ */
224
357
  getAvailableUtxos(addresses: string | string[]): Promise<Utxo[]>;
225
358
  }
226
359
 
360
+ /** {@link BitcoinSigner} backed by a Trezor hardware wallet, connected via `@trezor/connect-web`. */
227
361
  declare class TrezorSigner implements BitcoinSigner {
228
362
  private readonly network;
229
363
  private _addressType;
230
364
  private readonly bitcoinTxVersion;
231
365
  private readonly addresses;
232
366
  private constructor();
233
- static init(network?: Network, initOptions?: typeof TrezorConnect.init): Promise<TrezorSigner>;
367
+ /**
368
+ * Initializes the Trezor connection and returns a ready-to-use signer.
369
+ * @param {Network} [network] - The network to derive addresses for. Defaults to `'TEST'`.
370
+ * @param {Partial<Parameters<typeof TrezorConnect.init>[0]>} [initOptions] - Extra options merged into the `TrezorConnect.init` call.
371
+ * @returns {Promise<TrezorSigner>} The initialized signer.
372
+ */
373
+ static init(network?: Network, initOptions?: Partial<Parameters<typeof TrezorConnect.init>[0]>): Promise<TrezorSigner>;
374
+ /**
375
+ * Disposes the current Trezor connection and re-initializes it.
376
+ * @returns {Promise<TrezorSigner>} A freshly initialized signer for the default (`'TEST'`) network.
377
+ */
234
378
  static reinit(): Promise<TrezorSigner>;
379
+ /** The Bitcoin address type used to derive addresses (`'LEGACY'`, `'SEGWIT'` or `'NATIVE SEGWIT'`). */
235
380
  set addressType(addressType: AddressType);
236
381
  get addressType(): AddressType;
237
382
  private getPathPurpose;
238
383
  private getPathCoin;
239
384
  private getAddresses;
385
+ /**
386
+ * @param {number} bundleSize - Number of change addresses to derive.
387
+ * @returns {Promise<string[]>} `bundleSize` change addresses derived from the Trezor device.
388
+ */
240
389
  getChangeAddresses(bundleSize: number): Promise<string[]>;
390
+ /**
391
+ * @param {number} bundleSize - Number of receive addresses to derive.
392
+ * @returns {Promise<string[]>} `bundleSize` receive (non-change) addresses derived from the Trezor device.
393
+ */
241
394
  getNonChangeAddresses(bundleSize: number): Promise<string[]>;
242
395
  private getScriptType;
243
396
  private getInputs;
397
+ private getOutputScriptType;
398
+ private isChangePath;
244
399
  private getOutputs;
245
- signTransaction(psbt: Psbt, utxos: Utxo[]): Promise<string>;
400
+ /**
401
+ * Signs the given PSBT's inputs/outputs on the Trezor device.
402
+ * @param {Psbt} psbt - The PSBT to sign.
403
+ * @param {Utxo[]} [utxos] - The PSBT's inputs, used to look up each input's derivation path and script type. Required — TrezorSigner cannot sign from the PSBT alone.
404
+ * @returns {Promise<string>} The serialized signed transaction, or an empty string if signing didn't succeed.
405
+ */
406
+ signTransaction(psbt: Psbt, utxos?: Utxo[]): Promise<string>;
246
407
  }
247
408
 
409
+ /**
410
+ * {@link BitcoinSigner} backed by a Ledger hardware wallet, connected over WebUSB.
411
+ * Device operations are queued so only one runs against the transport at a time.
412
+ */
248
413
  declare class LedgerSigner implements BitcoinSigner {
249
414
  private readonly connection;
250
415
  private readonly transport;
@@ -253,8 +418,18 @@ declare class LedgerSigner implements BitcoinSigner {
253
418
  private readonly addresses;
254
419
  private readonly transportService;
255
420
  private constructor();
421
+ /**
422
+ * Opens a WebUSB transport to a connected Ledger device and returns a ready-to-use signer.
423
+ * @param {Network} [network] - The network to derive addresses for. Defaults to `'TEST'`.
424
+ * @returns {Promise<LedgerSigner>} The initialized signer.
425
+ */
256
426
  static init(network?: Network): Promise<LedgerSigner>;
427
+ /**
428
+ * Closes and reopens the WebUSB transport to the Ledger device, queued behind any in-flight operation.
429
+ * @returns {Promise<LedgerSigner>} A freshly initialized signer for the default (`'TEST'`) network.
430
+ */
257
431
  reinit(): Promise<LedgerSigner>;
432
+ /** The Bitcoin address type used to derive addresses (`'LEGACY'`, `'SEGWIT'` or `'NATIVE SEGWIT'`). */
258
433
  set addressType(addressType: AddressType);
259
434
  get addressType(): AddressType;
260
435
  private getPathPurpose;
@@ -263,27 +438,52 @@ declare class LedgerSigner implements BitcoinSigner {
263
438
  private getXpubVersion;
264
439
  private isSegwit;
265
440
  getAddresses(bundleSize: number, change?: boolean): Promise<string[]>;
441
+ /**
442
+ * @param {number} bundleSize - Number of change addresses to derive.
443
+ * @returns {Promise<string[]>} `bundleSize` change addresses derived from the Ledger device.
444
+ */
266
445
  getChangeAddresses(bundleSize: number): Promise<string[]>;
446
+ /**
447
+ * @param {number} bundleSize - Number of receive addresses to derive.
448
+ * @returns {Promise<string[]>} `bundleSize` receive (non-change) addresses derived from the Ledger device.
449
+ */
267
450
  getNonChangeAddresses(bundleSize: number): Promise<string[]>;
268
451
  getInputs(inputs: Utxo[], transactions: string[]): CreateTransactionArg['inputs'];
452
+ private isChangePath;
453
+ private getChangePath;
269
454
  getOutputScriptHex(psbt: Psbt): string;
270
- signTransaction(psbt: Psbt, inputs: Utxo[], transactions: string[]): Promise<string>;
455
+ /**
456
+ * Signs the given PSBT on the Ledger device, queued behind any in-flight operation.
457
+ * @param {Psbt} psbt - The PSBT to sign.
458
+ * @param {Utxo[]} [inputs] - The PSBT's inputs, used to look up each input's previously derived address path. Required — LedgerSigner cannot sign from the PSBT alone.
459
+ * @param {string[]} [transactions] - Raw hex transactions for `inputs`, required by the Ledger app to verify each input.
460
+ * @returns {Promise<string>} The signed, serialized transaction.
461
+ */
462
+ signTransaction(psbt: Psbt, inputs?: Utxo[], transactions?: string[]): Promise<string>;
271
463
  }
272
464
 
465
+ /** Thrown when a requested peg-in or peg-out amount is below the protocol's minimum allowed amount. */
273
466
  declare class AmountBelowMinError extends Error {
274
467
  constructor(message?: string);
275
468
  }
469
+ /** Thrown when the available UTXOs/balance can't cover the requested amount plus fees. */
276
470
  declare class NotEnoughFundsError extends Error {
277
471
  constructor(message?: string);
278
472
  }
473
+ /** Thrown when the 2WP API responds with an error, a failed request, or an unexpected failure. */
279
474
  declare class APIError extends Error {
280
475
  readonly statusCode?: number;
281
476
  readonly data?: unknown;
282
477
  constructor(message: string, statusCode?: number, data?: unknown);
283
478
  }
479
+ /** Thrown when the federation address can't be retrieved from the pegin configuration endpoint or doesn't match the Bridge contract's value. */
480
+ declare class FederationAddressError extends Error {
481
+ constructor(message?: string);
482
+ }
483
+ /** Thrown when one or more addresses are invalid: a Bitcoin address that doesn't belong to the SDK's configured network, or a malformed Rootstock recipient address. */
284
484
  declare class InvalidAddressError extends Error {
285
485
  readonly invalidAddresses: string[];
286
486
  constructor(invalidAddresses: string[], message?: string);
287
487
  }
288
488
 
289
- export { APIError, type AddressWithDetails, AmountBelowMinError, type BitcoinDataSource, type BitcoinSigner, type FeeLevel, InvalidAddressError, LedgerSigner, NotEnoughFundsError, type PeginStatusData, PeginStatuses, type PeginTxDetails, type PegoutFeeEstimation, type PegoutStatusData, PegoutStatuses, type PegoutTxDetails, PowPegSDK, type RejectedPegoutReason, RejectedPegoutReasons, type StatusData, TrezorSigner, TxType, type UnsignedPegin, type Utxo };
489
+ export { APIError, type AddressWithDetails, AmountBelowMinError, type BitcoinDataSource, type BitcoinSigner, type Feature, FederationAddressError, type FeeLevel, InvalidAddressError, LedgerSigner, NotEnoughFundsError, type PeginStatusData, PeginStatuses, type PeginTxDetails, type PegoutFeeEstimation, type PegoutStatusData, PegoutStatuses, type PegoutTxDetails, PowPegSDK, type RejectedPegoutReason, RejectedPegoutReasons, type StatusData, type SupportedBrowsers, TrezorSigner, TxType, type UnsignedPegin, type Utxo };