@lombard.finance/sdk 5.0.3 → 5.0.5

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.
Files changed (71) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/api-functions/storeNetworkFeeSignature/storeNetworkFeeSignature.d.ts +13 -0
  3. package/dist/api-functions/storeNetworkFeeSignature/storeNetworkFeeSignature.d.ts.map +1 -1
  4. package/dist/api.cjs +1 -1
  5. package/dist/api.js +12 -11
  6. package/dist/api.js.map +1 -1
  7. package/dist/btc.cjs +1 -1
  8. package/dist/btc.js +2 -2
  9. package/dist/chains/btc/actions/stake/config/evm.d.ts.map +1 -1
  10. package/dist/chains/evm/EvmActions.d.ts +15 -6
  11. package/dist/chains/evm/EvmActions.d.ts.map +1 -1
  12. package/dist/chains/evm/actions/redeem/EvmRedeem.d.ts +15 -8
  13. package/dist/chains/evm/actions/redeem/EvmRedeem.d.ts.map +1 -1
  14. package/dist/chains/evm/actions/redeem/factory.d.ts +6 -2
  15. package/dist/chains/evm/actions/redeem/factory.d.ts.map +1 -1
  16. package/dist/chains/evm/actions/redeem/types.d.ts +10 -6
  17. package/dist/chains/evm/actions/redeem/types.d.ts.map +1 -1
  18. package/dist/chunks/{BtcActions-BE75KQhS.js → BtcActions-BDTnGE1D.js} +235 -216
  19. package/dist/chunks/{BtcActions-BE75KQhS.js.map → BtcActions-BDTnGE1D.js.map} +1 -1
  20. package/dist/chunks/BtcActions-DZs5eXTb.cjs +2 -0
  21. package/dist/chunks/{BtcActions-hLkixDlL.cjs.map → BtcActions-DZs5eXTb.cjs.map} +1 -1
  22. package/dist/chunks/{EvmActions-DCy8q_l4.js → EvmActions-8VeTiWrl.js} +355 -390
  23. package/dist/chunks/EvmActions-8VeTiWrl.js.map +1 -0
  24. package/dist/chunks/EvmActions-CEC3vNtR.cjs +7 -0
  25. package/dist/chunks/EvmActions-CEC3vNtR.cjs.map +1 -0
  26. package/dist/chunks/depositStatus-DUXMloTa.cjs +2 -0
  27. package/dist/chunks/{depositStatus-CeoqUgM5.cjs.map → depositStatus-DUXMloTa.cjs.map} +1 -1
  28. package/dist/chunks/{depositStatus-CacTFWfJ.js → depositStatus-hmXphYhu.js} +2 -2
  29. package/dist/chunks/{depositStatus-CacTFWfJ.js.map → depositStatus-hmXphYhu.js.map} +1 -1
  30. package/dist/chunks/{events-Cu4qfdgE.js → events-22AhTtaL.js} +42 -41
  31. package/dist/chunks/{events-Cu4qfdgE.js.map → events-22AhTtaL.js.map} +1 -1
  32. package/dist/chunks/events-CW_OMnKf.cjs +2 -0
  33. package/dist/chunks/{events-C3tg6XPm.cjs.map → events-CW_OMnKf.cjs.map} +1 -1
  34. package/dist/chunks/getNetworkFeeSignature-DqKLslZc.cjs +2 -0
  35. package/dist/chunks/getNetworkFeeSignature-DqKLslZc.cjs.map +1 -0
  36. package/dist/chunks/getNetworkFeeSignature-FuDJWrMC.js +38 -0
  37. package/dist/chunks/getNetworkFeeSignature-FuDJWrMC.js.map +1 -0
  38. package/dist/chunks/statusConstants-Cz77HXnT.cjs +2 -0
  39. package/dist/chunks/{statusConstants-BPtrxbYC.cjs.map → statusConstants-Cz77HXnT.cjs.map} +1 -1
  40. package/dist/chunks/{statusConstants-8pqtLXvX.js → statusConstants-DZlImWu7.js} +3 -3
  41. package/dist/chunks/{statusConstants-8pqtLXvX.js.map → statusConstants-DZlImWu7.js.map} +1 -1
  42. package/dist/chunks/storeNetworkFeeSignature-BaG3AU8U.cjs +2 -0
  43. package/dist/chunks/storeNetworkFeeSignature-BaG3AU8U.cjs.map +1 -0
  44. package/dist/chunks/storeNetworkFeeSignature-sCt4_nHr.js +52 -0
  45. package/dist/chunks/storeNetworkFeeSignature-sCt4_nHr.js.map +1 -0
  46. package/dist/common/chains.d.ts +3 -0
  47. package/dist/common/chains.d.ts.map +1 -1
  48. package/dist/core.cjs +1 -1
  49. package/dist/core.js +4 -4
  50. package/dist/evm.cjs +1 -1
  51. package/dist/evm.js +2 -2
  52. package/dist/index.cjs +1 -1
  53. package/dist/index.d.ts +1 -1
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +264 -263
  56. package/package.json +1 -1
  57. package/dist/chunks/BtcActions-hLkixDlL.cjs +0 -2
  58. package/dist/chunks/EvmActions-DCy8q_l4.js.map +0 -1
  59. package/dist/chunks/EvmActions-DIkhiG2i.cjs +0 -7
  60. package/dist/chunks/EvmActions-DIkhiG2i.cjs.map +0 -1
  61. package/dist/chunks/constants-D1FnS2Z8.js +0 -6
  62. package/dist/chunks/constants-D1FnS2Z8.js.map +0 -1
  63. package/dist/chunks/constants-ueShGH9R.cjs +0 -2
  64. package/dist/chunks/constants-ueShGH9R.cjs.map +0 -1
  65. package/dist/chunks/depositStatus-CeoqUgM5.cjs +0 -2
  66. package/dist/chunks/events-C3tg6XPm.cjs +0 -2
  67. package/dist/chunks/statusConstants-BPtrxbYC.cjs +0 -2
  68. package/dist/chunks/storeNetworkFeeSignature-Z0NcQyIn.cjs +0 -2
  69. package/dist/chunks/storeNetworkFeeSignature-Z0NcQyIn.cjs.map +0 -1
  70. package/dist/chunks/storeNetworkFeeSignature-ZdHcFmfP.js +0 -65
  71. package/dist/chunks/storeNetworkFeeSignature-ZdHcFmfP.js.map +0 -1
@@ -1,53 +1,54 @@
1
1
  var G = Object.defineProperty;
2
2
  var j = (e, i, s) => i in e ? G(e, i, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[i] = s;
3
- var D = (e, i, s) => j(e, typeof i != "symbol" ? i + "" : i, s);
3
+ var f = (e, i, s) => j(e, typeof i != "symbol" ? i + "" : i, s);
4
4
  import K from "axios";
5
- import { StepStatus as o, LombardError as u, ValidationErrorCode as p, BaseAction as Z, Chain as c, objectType as W, referralCodeSchema as J, btcStakeAmountSchema as X, validatePrepareParams as Q, evmAddressSchema as N, getAllAssetChains as E, isEvmChain as tt, CAIP2_SEPARATOR as et, CHAIN_PREFIXES as _, solanaAddressSchema as H, BtcActionStatus as a, getChainType as $, parseChainIdentifier as v, evmChainIdToChain as st, starknetAddressSchema as it, suiAddressSchema as nt, createBtcCoreContext as rt } from "./statusConstants-8pqtLXvX.js";
5
+ import { StepStatus as o, LombardError as u, ValidationErrorCode as p, BaseAction as Z, Chain as c, objectType as W, referralCodeSchema as J, btcStakeAmountSchema as X, validatePrepareParams as Q, evmAddressSchema as v, getAllAssetChains as m, isEvmChain as tt, CAIP2_SEPARATOR as et, CHAIN_PREFIXES as R, solanaAddressSchema as H, BtcActionStatus as a, getChainType as $, parseChainIdentifier as O, evmChainIdToChain as st, starknetAddressSchema as it, suiAddressSchema as nt, createBtcCoreContext as rt } from "./statusConstants-DZlImWu7.js";
6
6
  import { Token as S, addChain as at, isValidChain as Y } from "./token-addresses-DVnRPyu4.js";
7
7
  import { r as d } from "./index-CfcQ_g3t.js";
8
- import { getTokenContractInfo as T } from "./tokens-BUrC15ra.js";
9
- import { toSatoshi as y } from "./satoshi-CSoJBXc6.js";
10
- import { AssetId as f, DEFI_REGISTRY as I } from "./defi-registry-DULXbu3D.js";
8
+ import { getTokenContractInfo as _ } from "./tokens-BUrC15ra.js";
9
+ import { toSatoshi as N } from "./satoshi-CSoJBXc6.js";
10
+ import { AssetId as D, DEFI_REGISTRY as w } from "./defi-registry-DULXbu3D.js";
11
11
  import { SANCTIONED_ADDRESS as ot, getUserStakeAndBakeSignature as ut } from "./getUserStakeAndBakeSignature-CQsvL79O.js";
12
12
  import { EARN_STAKE_AND_BAKE_CHAINS as ht } from "./config-wnjPtnjd.js";
13
- import { pad as dt } from "viem";
14
- const ct = "ERR_NETWORK", pt = "This may be due to your Adblocker. Please disable any Adblocker and refresh the page to restore full functionality.";
15
- function gt(e) {
13
+ import { FeeSignatureAlreadyExistsError as dt } from "./storeNetworkFeeSignature-sCt4_nHr.js";
14
+ import { pad as ct } from "viem";
15
+ const pt = "ERR_NETWORK", gt = "This may be due to your Adblocker. Please disable any Adblocker and refresh the page to restore full functionality.";
16
+ function At(e) {
16
17
  const { code: i, message: s } = e;
17
- throw i === ct ? new Error(pt) : new Error(s);
18
+ throw i === pt ? new Error(gt) : new Error(s);
18
19
  }
19
- const At = {
20
+ const ft = {
20
21
  mempoolApiUrl: "https://mempool.space/signet"
21
22
  }, Dt = {
22
23
  mempoolApiUrl: "https://mempool.space"
23
- }, ft = (e) => e === "mainnet" ? Dt : At;
24
- async function St(e) {
25
- const { mempoolApiUrl: i } = ft(e), s = Math.floor(Date.now() / 1e3), t = `${i}/api/v1/mining/blocks/timestamp/${s}`;
24
+ }, St = (e) => e === "mainnet" ? Dt : ft;
25
+ async function lt(e) {
26
+ const { mempoolApiUrl: i } = St(e), s = Math.floor(Date.now() / 1e3), t = `${i}/api/v1/mining/blocks/timestamp/${s}`;
26
27
  try {
27
28
  const { data: r } = await K.get(t);
28
29
  return r.height;
29
30
  } catch (r) {
30
- gt(r);
31
+ At(r);
31
32
  }
32
33
  }
33
- class lt {
34
+ class Ct {
34
35
  /**
35
36
  * Get current block height from mempool
36
37
  */
37
38
  async getCurrentBlockHeight(i) {
38
- return St(i);
39
+ return lt(i);
39
40
  }
40
41
  }
41
- function Ee() {
42
+ function me() {
42
43
  return {
43
44
  id: "btc",
44
45
  chain: "btc",
45
46
  register() {
46
- return new lt();
47
+ return new Ct();
47
48
  }
48
49
  };
49
50
  }
50
- async function b(e) {
51
+ async function B(e) {
51
52
  const {
52
53
  fetchDeposit: i,
53
54
  network: s,
@@ -61,37 +62,37 @@ async function b(e) {
61
62
  const g = A.blockHeight;
62
63
  if (typeof g != "number")
63
64
  return;
64
- const L = await t.getCurrentBlockHeight(s), B = Math.max(0, L - g), F = B >= r, P = A.isClaimed ?? !1, x = {
65
- confirmations: B,
65
+ const E = await t.getCurrentBlockHeight(s), l = Math.max(0, E - g), F = l >= r, b = A.isClaimed ?? !1, x = {
66
+ confirmations: l,
66
67
  requiredConfirmations: r,
67
68
  hasEnoughConfirmations: F,
68
- isClaimed: P,
69
+ isClaimed: b,
69
70
  steps: {
70
71
  created: o.COMPLETE,
71
72
  verifying: F ? o.COMPLETE : o.PENDING,
72
- issuing: P ? o.COMPLETE : o.PENDING
73
+ issuing: b ? o.COMPLETE : o.PENDING
73
74
  }
74
75
  };
75
- return n == null || n(x), P && (h == null || h()), x;
76
+ return n == null || n(x), b && (h == null || h()), x;
76
77
  }
77
- function R(e) {
78
+ function k(e) {
78
79
  if (e === ot)
79
80
  throw new u(
80
81
  p.INVALID_PARAMETER,
81
82
  "Destination address is under sanctions"
82
83
  );
83
84
  }
84
- class O extends Z {
85
+ class L extends Z {
85
86
  constructor(s, t, r) {
86
87
  super(r);
87
88
  // ─────────────────────────────────────────────────────────────────────────
88
89
  // Common State
89
90
  // ─────────────────────────────────────────────────────────────────────────
90
- D(this, "_amount");
91
- D(this, "_recipient");
92
- D(this, "_depositAddress");
93
- D(this, "_referralCode");
94
- D(this, "_chainId");
91
+ f(this, "_amount");
92
+ f(this, "_recipient");
93
+ f(this, "_depositAddress");
94
+ f(this, "_referralCode");
95
+ f(this, "_chainId");
95
96
  this.ctx = s, this.params = t;
96
97
  }
97
98
  // ─────────────────────────────────────────────────────────────────────────
@@ -218,11 +219,11 @@ class O extends Z {
218
219
  const t = this.getStatusConfig();
219
220
  return this.assertStatus(t.ready, "generateDepositAddress"), this.ensureAuthorized(), this._depositAddress ? this._depositAddress : this.act(async () => {
220
221
  const r = this.getDepositAddressParams(s), n = await this.ctx.api.generateDepositAddress(r);
221
- R(n), this._depositAddress = n;
222
+ k(n), this._depositAddress = n;
222
223
  const h = this.getInitialSteps(), A = Object.fromEntries(
223
- Object.entries(h).map(([g], L) => [
224
+ Object.entries(h).map(([g], E) => [
224
225
  g,
225
- L === 0 ? o.COMPLETE : o.IDLE
226
+ E === 0 ? o.COMPLETE : o.IDLE
226
227
  ])
227
228
  );
228
229
  return this.emitProgress({
@@ -273,7 +274,7 @@ class O extends Z {
273
274
  const s = this._depositAddress, t = this._recipient;
274
275
  if (!s || !t)
275
276
  throw u.missingParameter("depositAddress or recipient");
276
- return await b({
277
+ return await B({
277
278
  network: this.bitcoinNetwork,
278
279
  btcService: this.ctx.btc,
279
280
  fetchDeposit: async () => {
@@ -311,24 +312,24 @@ class O extends Z {
311
312
  if (!r) return;
312
313
  const n = r;
313
314
  if (n.sendBitcoin) {
314
- const h = y(t).toNumber();
315
+ const h = N(t).toNumber();
315
316
  return n.sendBitcoin(s, h);
316
317
  }
317
318
  } catch {
318
319
  }
319
320
  }
320
321
  }
321
- function w(e, i = S.LBTC) {
322
+ function T(e, i = S.LBTC) {
322
323
  switch (e) {
323
- case f.LBTC:
324
+ case D.LBTC:
324
325
  return S.LBTC;
325
- case f.BTCb:
326
+ case D.BTCb:
326
327
  return S.BTCb;
327
328
  default:
328
329
  return i;
329
330
  }
330
331
  }
331
- async function Ct(e, i) {
332
+ async function Et(e, i) {
332
333
  try {
333
334
  await e.request({
334
335
  method: "wallet_switchEthereumChain",
@@ -362,21 +363,21 @@ async function Ct(e, i) {
362
363
  );
363
364
  }
364
365
  }
365
- async function Et(e) {
366
+ async function It(e) {
366
367
  const i = await e.request({
367
368
  method: "eth_chainId"
368
369
  });
369
370
  return parseInt(i, 16);
370
371
  }
371
- async function m(e, i) {
372
- await Et(e) !== i && await Ct(e, i);
372
+ async function y(e, i) {
373
+ await It(e) !== i && await Et(e, i);
373
374
  }
374
- const It = [c.ETHEREUM, c.SEPOLIA], mt = {
375
+ const mt = [c.ETHEREUM, c.SEPOLIA], wt = {
375
376
  async getMintingFee(e, i) {
376
377
  return e.capabilities.require("evm").getMintingFee(i, S.BTCb);
377
378
  },
378
379
  async restoreFeeSignature(e, i, s) {
379
- const t = await T(
380
+ const t = await _(
380
381
  S.BTCb,
381
382
  i,
382
383
  e.env
@@ -396,8 +397,8 @@ const It = [c.ETHEREUM, c.SEPOLIA], mt = {
396
397
  const r = e.capabilities.require("evm"), n = await e.getProvider("evm");
397
398
  if (!n)
398
399
  throw u.providerMissing(String(i), "evm");
399
- await m(n, i);
400
- const h = y(t).toString(), A = await T(
400
+ await y(n, i);
401
+ const h = N(t).toString(), A = await _(
401
402
  S.BTCb,
402
403
  i,
403
404
  e.env
@@ -418,7 +419,7 @@ const It = [c.ETHEREUM, c.SEPOLIA], mt = {
418
419
  typedData: g.typedData
419
420
  };
420
421
  }
421
- }, wt = {
422
+ }, yt = {
422
423
  chainType: "evm",
423
424
  routes: [
424
425
  {
@@ -431,18 +432,18 @@ const It = [c.ETHEREUM, c.SEPOLIA], mt = {
431
432
  }
432
433
  ],
433
434
  // Derived from ASSET_CATALOG - all chains where BTC.b is deployed
434
- destChains: E(f.BTCb).filter(
435
+ destChains: m(D.BTCb).filter(
435
436
  (e) => tt(e)
436
437
  ),
437
438
  // BTC Deposit only produces BTC.b
438
- supportedAssetsOut: [f.BTCb],
439
- addressSchema: N,
439
+ supportedAssetsOut: [D.BTCb],
440
+ addressSchema: v,
440
441
  /**
441
442
  * Get fee auth config - unsubsidized chains require fee authorization
442
443
  * Other chains use address confirmation signing
443
444
  */
444
445
  getFeeAuthConfig(e) {
445
- return It.includes(e) ? mt : null;
446
+ return mt.includes(e) ? wt : null;
446
447
  },
447
448
  /**
448
449
  * Sign destination address confirmation
@@ -452,7 +453,7 @@ const It = [c.ETHEREUM, c.SEPOLIA], mt = {
452
453
  const t = e.capabilities.require("evm"), r = await e.getProvider("evm");
453
454
  if (!r)
454
455
  throw u.providerMissing(String(s), "evm");
455
- return await m(r, s), {
456
+ return await y(r, s), {
456
457
  signature: (await t.signLbtcDestination({
457
458
  address: i,
458
459
  chainId: s,
@@ -460,20 +461,20 @@ const It = [c.ETHEREUM, c.SEPOLIA], mt = {
460
461
  })).signature
461
462
  };
462
463
  }
463
- }, k = (e) => `${e}${et}`;
464
- function yt(e) {
465
- return String(e).startsWith(k(_.EIP155));
464
+ }, P = (e) => `${e}${et}`;
465
+ function Tt(e) {
466
+ return String(e).startsWith(P(R.EIP155));
466
467
  }
467
468
  function q(e) {
468
- return String(e).startsWith(k(_.SOLANA));
469
- }
470
- function Tt(e) {
471
- return String(e).startsWith(k(_.SUI));
469
+ return String(e).startsWith(P(R.SOLANA));
472
470
  }
473
471
  function Nt(e) {
474
- return String(e).startsWith(k(_.STARKNET));
472
+ return String(e).startsWith(P(R.SUI));
475
473
  }
476
474
  function _t(e) {
475
+ return String(e).startsWith(P(R.STARKNET));
476
+ }
477
+ function vt(e) {
477
478
  const i = {
478
479
  [c.SOLANA_MAINNET]: "mainnet-beta",
479
480
  [c.SOLANA_DEVNET]: "devnet",
@@ -489,7 +490,7 @@ function _t(e) {
489
490
  );
490
491
  return s;
491
492
  }
492
- const vt = {
493
+ const Rt = {
493
494
  chainType: "solana",
494
495
  routes: [
495
496
  {
@@ -501,68 +502,68 @@ const vt = {
501
502
  envs: [d.stage, d.dev, d.testnet]
502
503
  }
503
504
  ],
504
- destChains: E(f.BTCb).filter(
505
+ destChains: m(D.BTCb).filter(
505
506
  (e) => q(e)
506
507
  ),
507
- supportedAssetsOut: [f.BTCb],
508
+ supportedAssetsOut: [D.BTCb],
508
509
  addressSchema: H,
509
510
  getFeeAuthConfig: () => null,
510
511
  async signDestination(e, i, s) {
511
- const t = e.capabilities.require("solana"), r = _t(s), { signature: n } = await t.signLbtcDestination({
512
+ const t = e.capabilities.require("solana"), r = vt(s), { signature: n } = await t.signLbtcDestination({
512
513
  network: r
513
514
  });
514
515
  return { signature: n };
515
516
  }
516
- }, Rt = {
517
- evm: wt,
518
- solana: vt
517
+ }, Ot = {
518
+ evm: yt,
519
+ solana: Rt
519
520
  };
520
- function Ot(e) {
521
- return Rt[e];
521
+ function kt(e) {
522
+ return Ot[e];
522
523
  }
523
- function kt(e, i) {
524
+ function Lt(e, i) {
524
525
  return e.destChains.includes(i);
525
526
  }
526
- function Lt(e, i) {
527
+ function Pt(e, i) {
527
528
  return e.supportedAssetsOut.includes(i);
528
529
  }
529
- function Pt(e, i, s) {
530
+ function bt(e, i, s) {
530
531
  return e.routes.some(
531
532
  (t) => t.envs.includes(s) && (!i || t.sourceChains.includes(i))
532
533
  );
533
534
  }
534
- class bt extends O {
535
+ class Bt extends L {
535
536
  constructor(s, t) {
536
537
  super(s, t, a.IDLE);
537
- D(this, "config");
538
- D(this, "chainId");
539
- D(this, "authState", { authorized: !1 });
538
+ f(this, "config");
539
+ f(this, "chainId");
540
+ f(this, "authState", { authorized: !1 });
540
541
  /** Fee auth config - null if not required for this destination */
541
- D(this, "feeAuthConfig", null);
542
- const r = $(t.destChain), n = Ot(r);
542
+ f(this, "feeAuthConfig", null);
543
+ const r = $(t.destChain), n = kt(r);
543
544
  if (!n)
544
545
  throw new u(
545
546
  p.INVALID_CHAIN,
546
547
  `Unsupported destination chain type: ${r} (${t.destChain})`
547
548
  );
548
- if (!Lt(n, t.assetOut))
549
+ if (!Pt(n, t.assetOut))
549
550
  throw new u(
550
551
  p.INVALID_ASSET,
551
552
  `Asset ${t.assetOut} is not supported for BTC deposits. BTC Deposit produces BTC.b. For LBTC, use BtcStake instead.`
552
553
  );
553
- if (!kt(n, t.destChain))
554
+ if (!Lt(n, t.destChain))
554
555
  throw new u(
555
556
  p.INVALID_CHAIN,
556
557
  `Destination chain ${t.destChain} is not supported for ${r} BTC deposits`
557
558
  );
558
- if (!Pt(n, t.sourceChain, s.env))
559
+ if (!bt(n, t.sourceChain, s.env))
559
560
  throw u.routeNotFound({
560
561
  assetOut: t.assetOut,
561
562
  sourceChain: t.sourceChain,
562
563
  destChain: t.destChain,
563
564
  env: s.env
564
565
  });
565
- this.config = n, this.chainId = v(t.destChain);
566
+ this.config = n, this.chainId = O(t.destChain);
566
567
  }
567
568
  // ─────────────────────────────────────────────────────────────────────────
568
569
  // Abstract Method Implementations
@@ -631,7 +632,7 @@ class bt extends O {
631
632
  * Get expected token for this action (BTCb by default for BTC Deposit)
632
633
  */
633
634
  getExpectedToken() {
634
- return w(this.params.assetOut, S.BTCb);
635
+ return T(this.params.assetOut, S.BTCb);
635
636
  }
636
637
  getAuthRequiredMessage() {
637
638
  return this.feeAuthConfig ? "Fee authorization required. Call authorizeFee() first." : "Address confirmation required. Call confirmAddress() first.";
@@ -734,9 +735,9 @@ class bt extends O {
734
735
  return super.monitorDeposit();
735
736
  }
736
737
  }
737
- const Bt = ht.map(
738
+ const Ft = ht.map(
738
739
  (e) => st(e)
739
- ), Ft = {
740
+ ), xt = {
740
741
  chainType: "evm",
741
742
  routes: [
742
743
  {
@@ -749,11 +750,11 @@ const Bt = ht.map(
749
750
  }
750
751
  ],
751
752
  // StakeAndDeploy requires vault support - uses EARN_STAKE_AND_BAKE_CHAINS as source of truth
752
- destChains: Bt,
753
+ destChains: Ft,
753
754
  // StakeAndDeploy produces LBTC (then deposits to vault)
754
- supportedAssetsOut: [f.LBTC],
755
- supportedProtocols: Vt(f.LBTC),
756
- addressSchema: N,
755
+ supportedAssetsOut: [D.LBTC],
756
+ supportedProtocols: Gt(D.LBTC),
757
+ addressSchema: v,
757
758
  async getStakeAndBakeFee(e, i, s) {
758
759
  return e.capabilities.require("evm").getStakeAndBakeFee(i, s);
759
760
  },
@@ -761,7 +762,7 @@ const Bt = ht.map(
761
762
  const h = e.capabilities.require("evm"), A = await e.getProvider("evm");
762
763
  if (!A)
763
764
  throw u.providerMissing(String(i), "evm");
764
- await m(A, i);
765
+ await y(A, i);
765
766
  const g = await h.signStakeAndBake({
766
767
  value: t,
767
768
  account: s,
@@ -795,37 +796,37 @@ const Bt = ht.map(
795
796
  return null;
796
797
  }
797
798
  }
798
- }, l = Ft;
799
- function xt(e) {
800
- return l.destChains.includes(e);
801
- }
799
+ }, C = xt;
802
800
  function Mt(e) {
803
- return l.supportedAssetsOut.includes(e);
801
+ return C.destChains.includes(e);
802
+ }
803
+ function zt(e) {
804
+ return C.supportedAssetsOut.includes(e);
804
805
  }
805
- function zt(e, i) {
806
- return e ? l.routes.some(
806
+ function Ht(e, i) {
807
+ return e ? C.routes.some(
807
808
  (s) => s.sourceChains.includes(e) && s.envs.includes(i)
808
809
  ) : !0;
809
810
  }
810
811
  function U(e) {
811
- return e in I;
812
+ return e in w;
812
813
  }
813
- function Ht(e) {
814
+ function $t(e) {
814
815
  if (!U(e)) {
815
- const i = Object.keys(I).join(", ");
816
+ const i = Object.keys(w).join(", ");
816
817
  throw new Error(
817
818
  `Unsupported protocol: ${e}. Supported protocols: ${i}`
818
819
  );
819
820
  }
820
821
  return e;
821
822
  }
822
- function $t(e) {
823
- return Object.entries(I).filter(([i, s]) => e in s).map(([i]) => i);
823
+ function Yt(e) {
824
+ return Object.entries(w).filter(([i, s]) => e in s).map(([i]) => i);
824
825
  }
825
826
  const M = {
826
827
  mainnet: [c.AVALANCHE],
827
828
  testnet: [c.AVALANCHE_FUJI]
828
- }, Yt = {
829
+ }, qt = {
829
830
  chainType: "evm",
830
831
  routes: [
831
832
  {
@@ -843,9 +844,9 @@ const M = {
843
844
  ...M.testnet
844
845
  ],
845
846
  // DepositAndDeploy produces BTC.b (then deposits to vault)
846
- supportedAssetsOut: [f.BTCb],
847
- supportedProtocols: $t(f.BTCb),
848
- addressSchema: N,
847
+ supportedAssetsOut: [D.BTCb],
848
+ supportedProtocols: Yt(D.BTCb),
849
+ addressSchema: v,
849
850
  async getDepositAndDeployFee(e, i, s) {
850
851
  return e.capabilities.require("evm").getStakeAndBakeFee(i, s);
851
852
  },
@@ -853,7 +854,7 @@ const M = {
853
854
  const h = e.capabilities.require("evm"), A = await e.getProvider("evm");
854
855
  if (!A)
855
856
  throw u.providerMissing(String(i), "evm");
856
- await m(A, i);
857
+ await y(A, i);
857
858
  const g = await h.signStakeAndBake({
858
859
  value: t,
859
860
  account: s,
@@ -872,44 +873,44 @@ const M = {
872
873
  approvalTxHash: g.approvalTxHash
873
874
  };
874
875
  }
875
- }, C = Yt;
876
- function qt(e) {
877
- return C.destChains.includes(e);
878
- }
876
+ }, I = qt;
879
877
  function Ut(e) {
880
- return C.supportedAssetsOut.includes(e);
878
+ return I.destChains.includes(e);
879
+ }
880
+ function Vt(e) {
881
+ return I.supportedAssetsOut.includes(e);
881
882
  }
882
883
  function V(e) {
883
- return e in I;
884
+ return e in w;
884
885
  }
885
886
  function z(e) {
886
887
  if (!V(e)) {
887
- const i = Object.keys(I).join(", ");
888
+ const i = Object.keys(w).join(", ");
888
889
  throw new Error(
889
890
  `Unsupported protocol: ${e}. Supported protocols: ${i}`
890
891
  );
891
892
  }
892
893
  return e;
893
894
  }
894
- function Vt(e) {
895
- return Object.entries(I).filter(([i, s]) => e in s).map(([i]) => i);
895
+ function Gt(e) {
896
+ return Object.entries(w).filter(([i, s]) => e in s).map(([i]) => i);
896
897
  }
897
- function Gt(e, i) {
898
- return C.routes.some(
898
+ function jt(e, i) {
899
+ return I.routes.some(
899
900
  (s) => s.sourceChains.includes(e) && s.envs.includes(i)
900
901
  );
901
902
  }
902
- class jt extends O {
903
+ class Kt extends L {
903
904
  constructor(s, t) {
904
905
  super(s, t, a.IDLE);
905
- D(this, "chainId");
906
- D(this, "authState", { authorized: !1 });
907
- if (!Ut(t.assetOut))
906
+ f(this, "chainId");
907
+ f(this, "authState", { authorized: !1 });
908
+ if (!Vt(t.assetOut))
908
909
  throw new u(
909
910
  p.INVALID_ASSET,
910
911
  `Asset ${t.assetOut} is not supported for deposit and deploy. DepositAndDeploy produces BTC.b which is then deployed to a vault like Silo.`
911
912
  );
912
- if (!qt(t.destChain))
913
+ if (!Ut(t.destChain))
913
914
  throw new u(
914
915
  p.INVALID_CHAIN,
915
916
  `Destination chain ${t.destChain} is not supported for deposit and deploy. Supported chains: Avalanche, Avalanche Fuji`
@@ -920,14 +921,14 @@ class jt extends O {
920
921
  `Protocol ${t.protocol} is not supported for deposit and deploy. DepositAndDeploy with BTC.b only supports Silo protocol.`
921
922
  );
922
923
  const r = t.sourceChain ?? c.BITCOIN_MAINNET;
923
- if (!Gt(r, s.env))
924
+ if (!jt(r, s.env))
924
925
  throw u.routeNotFound({
925
926
  assetOut: t.assetOut,
926
927
  sourceChain: r,
927
928
  destChain: t.destChain,
928
929
  env: s.env
929
930
  });
930
- const n = v(t.destChain);
931
+ const n = O(t.destChain);
931
932
  if (typeof n != "number" || !Y(n))
932
933
  throw new u(
933
934
  p.INVALID_CHAIN,
@@ -939,7 +940,7 @@ class jt extends O {
939
940
  // Abstract Method Implementations
940
941
  // ─────────────────────────────────────────────────────────────────────────
941
942
  getAddressSchema() {
942
- return C.addressSchema;
943
+ return I.addressSchema;
943
944
  }
944
945
  getStatusConfig() {
945
946
  return {
@@ -979,7 +980,7 @@ class jt extends O {
979
980
  * Get expected token for this action (BTCb by default for DepositAndDeploy)
980
981
  */
981
982
  getExpectedToken() {
982
- return w(this.params.assetOut, S.BTCb);
983
+ return T(this.params.assetOut, S.BTCb);
983
984
  }
984
985
  getAuthRequiredMessage() {
985
986
  return "Deposit authorization required. Call authorizeDeposit() first.";
@@ -997,7 +998,7 @@ class jt extends O {
997
998
  async prepare(s) {
998
999
  return this.assertStatus(a.IDLE, "prepare"), this.act(async () => {
999
1000
  const t = this.validatePrepareParams(s);
1000
- this._amount = t.amount, this._recipient = t.recipient, this._referralCode = t.referralCode, this.authState.fee = await C.getDepositAndDeployFee(
1001
+ this._amount = t.amount, this._recipient = t.recipient, this._referralCode = t.referralCode, this.authState.fee = await I.getDepositAndDeployFee(
1001
1002
  this.ctx,
1002
1003
  this.chainId,
1003
1004
  z(this.params.protocol)
@@ -1011,7 +1012,7 @@ class jt extends O {
1011
1012
  ), this.status === a.READY) return;
1012
1013
  const s = this.ensureRecipient(), t = this.ensureAmount();
1013
1014
  return this.act(async () => {
1014
- const r = y(t), n = w(this.params.assetOut, S.BTCb), h = await C.authorizeDepositAndDeploy(
1015
+ const r = N(t), n = T(this.params.assetOut, S.BTCb), h = await I.authorizeDepositAndDeploy(
1015
1016
  this.ctx,
1016
1017
  {
1017
1018
  chainId: this.chainId,
@@ -1027,7 +1028,7 @@ class jt extends O {
1027
1028
  async generateDepositAddress(s) {
1028
1029
  return this.assertStatus(a.READY, "generateDepositAddress"), this.ensureAuthorized(), this._depositAddress ? this._depositAddress : this.act(async () => {
1029
1030
  const t = this.getDepositAddressParams(s), r = await this.ctx.api.generateDepositAddress(t);
1030
- return R(r), this._depositAddress = r, this.emitProgress({
1031
+ return k(r), this._depositAddress = r, this.emitProgress({
1031
1032
  status: a.ADDRESS_READY,
1032
1033
  steps: {
1033
1034
  created: o.COMPLETE,
@@ -1051,7 +1052,7 @@ class jt extends O {
1051
1052
  const s = this._depositAddress, t = this._recipient;
1052
1053
  if (!s || !t)
1053
1054
  throw u.missingParameter("depositAddress or recipient");
1054
- return await b({
1055
+ return await B({
1055
1056
  network: this.bitcoinNetwork,
1056
1057
  btcService: this.ctx.btc,
1057
1058
  fetchDeposit: async () => {
@@ -1084,12 +1085,12 @@ class jt extends O {
1084
1085
  });
1085
1086
  }
1086
1087
  }
1087
- const Kt = [c.ETHEREUM, c.SEPOLIA], Zt = {
1088
+ const Zt = [c.ETHEREUM, c.SEPOLIA], Wt = {
1088
1089
  async getMintingFee(e, i) {
1089
1090
  return e.capabilities.require("evm").getMintingFee(i);
1090
1091
  },
1091
1092
  async restoreFeeSignature(e, i, s) {
1092
- const t = await T(
1093
+ const t = await _(
1093
1094
  S.LBTC,
1094
1095
  i,
1095
1096
  e.env
@@ -1109,8 +1110,8 @@ const Kt = [c.ETHEREUM, c.SEPOLIA], Zt = {
1109
1110
  const r = e.capabilities.require("evm"), n = await e.getProvider("evm");
1110
1111
  if (!n)
1111
1112
  throw u.providerMissing(String(i), "evm");
1112
- await m(n, i);
1113
- const h = y(t).toString(), A = await T(
1113
+ await y(n, i);
1114
+ const h = N(t).toString(), A = await _(
1114
1115
  S.LBTC,
1115
1116
  i,
1116
1117
  e.env
@@ -1121,17 +1122,35 @@ const Kt = [c.ETHEREUM, c.SEPOLIA], Zt = {
1121
1122
  provider: n,
1122
1123
  token: S.LBTC
1123
1124
  });
1124
- return await e.api.storeFeeSignature({
1125
- address: s,
1126
- signature: g.signature,
1127
- typedData: g.typedData,
1128
- tokenAddress: A.address
1129
- }), {
1125
+ try {
1126
+ await e.api.storeFeeSignature({
1127
+ address: s,
1128
+ signature: g.signature,
1129
+ typedData: g.typedData,
1130
+ tokenAddress: A.address
1131
+ });
1132
+ } catch (E) {
1133
+ if (!(E instanceof dt)) throw E;
1134
+ const l = await e.api.getFeeSignature({
1135
+ address: s,
1136
+ chainId: i,
1137
+ tokenAddress: A.address
1138
+ });
1139
+ if (l != null && l.hasSignature)
1140
+ return {
1141
+ signature: l.signature ?? g.signature,
1142
+ typedData: l.typedData ?? g.typedData
1143
+ };
1144
+ throw new Error(
1145
+ "A fee authorization signature already exists for this account but cannot be retrieved. Refresh the page and try again, or contact support if this persists."
1146
+ );
1147
+ }
1148
+ return {
1130
1149
  signature: g.signature,
1131
1150
  typedData: g.typedData
1132
1151
  };
1133
1152
  }
1134
- }, Wt = {
1153
+ }, Jt = {
1135
1154
  chainType: "evm",
1136
1155
  routes: [
1137
1156
  {
@@ -1146,25 +1165,25 @@ const Kt = [c.ETHEREUM, c.SEPOLIA], Zt = {
1146
1165
  // Derived from ASSET_CATALOG - all EVM chains where LBTC is deployed
1147
1166
  // Note: This includes all chains across all environments
1148
1167
  // The `routes` config above filters by source chain + env
1149
- destChains: E(f.LBTC).filter((e) => yt(e)),
1168
+ destChains: m(D.LBTC).filter((e) => Tt(e)),
1150
1169
  // BTC Stake only produces LBTC
1151
- supportedAssetsOut: [f.LBTC],
1152
- addressSchema: N,
1170
+ supportedAssetsOut: [D.LBTC],
1171
+ addressSchema: v,
1153
1172
  getFeeAuthConfig(e) {
1154
- return Kt.includes(e) ? Zt : null;
1173
+ return Zt.includes(e) ? Wt : null;
1155
1174
  },
1156
1175
  async getSignature(e, i, s) {
1157
1176
  const t = e.capabilities.require("evm"), r = await e.getProvider("evm");
1158
1177
  if (!r)
1159
1178
  throw u.providerMissing(String(s), "evm");
1160
- return await m(r, s), t.signLbtcDestination({
1179
+ return await y(r, s), t.signLbtcDestination({
1161
1180
  chainId: s,
1162
1181
  address: i,
1163
1182
  provider: r
1164
1183
  });
1165
1184
  }
1166
1185
  };
1167
- function Jt(e) {
1186
+ function Xt(e) {
1168
1187
  const i = {
1169
1188
  // CAIP-2 format using genesis hash
1170
1189
  [c.SOLANA_MAINNET]: "mainnet-beta",
@@ -1182,7 +1201,7 @@ function Jt(e) {
1182
1201
  );
1183
1202
  return s;
1184
1203
  }
1185
- const Xt = {
1204
+ const Qt = {
1186
1205
  chainType: "solana",
1187
1206
  routes: [
1188
1207
  {
@@ -1195,21 +1214,21 @@ const Xt = {
1195
1214
  }
1196
1215
  ],
1197
1216
  // Derived from ASSET_CATALOG - Solana chains where LBTC is deployed
1198
- destChains: E(f.LBTC).filter(
1217
+ destChains: m(D.LBTC).filter(
1199
1218
  (e) => q(e)
1200
1219
  ),
1201
1220
  // BTC Stake only produces LBTC
1202
- supportedAssetsOut: [f.LBTC],
1221
+ supportedAssetsOut: [D.LBTC],
1203
1222
  addressSchema: H,
1204
1223
  // Solana never requires fee authorization
1205
1224
  getFeeAuthConfig: () => null,
1206
1225
  async getSignature(e, i, s) {
1207
- const t = e.capabilities.require("solana"), r = Jt(s), { signature: n } = await t.signLbtcDestination({
1226
+ const t = e.capabilities.require("solana"), r = Xt(s), { signature: n } = await t.signLbtcDestination({
1208
1227
  network: r
1209
1228
  });
1210
1229
  return { signature: n };
1211
1230
  }
1212
- }, Qt = {
1231
+ }, te = {
1213
1232
  chainType: "starknet",
1214
1233
  routes: [
1215
1234
  {
@@ -1222,21 +1241,21 @@ const Xt = {
1222
1241
  }
1223
1242
  ],
1224
1243
  // Derived from ASSET_CATALOG - Starknet chains where LBTC is deployed
1225
- destChains: E(f.LBTC).filter(
1226
- (e) => Nt(e)
1244
+ destChains: m(D.LBTC).filter(
1245
+ (e) => _t(e)
1227
1246
  ),
1228
1247
  // BTC Stake only produces LBTC
1229
- supportedAssetsOut: [f.LBTC],
1248
+ supportedAssetsOut: [D.LBTC],
1230
1249
  addressSchema: it,
1231
1250
  // Starknet never requires fee authorization
1232
1251
  getFeeAuthConfig: () => null,
1233
1252
  async getSignature(e, i, s) {
1234
1253
  const t = e.capabilities.require("starknet"), { signature: r, pubKey: n } = await t.signLbtcDestination({
1235
1254
  chainId: s
1236
- }), h = dt(i, { size: 32 });
1255
+ }), h = ct(i, { size: 32 });
1237
1256
  return { signature: r, pubKey: n, paddedAddress: h };
1238
1257
  }
1239
- }, te = {
1258
+ }, ee = {
1240
1259
  chainType: "sui",
1241
1260
  routes: [
1242
1261
  {
@@ -1249,11 +1268,11 @@ const Xt = {
1249
1268
  }
1250
1269
  ],
1251
1270
  // Derived from ASSET_CATALOG - Sui chains where LBTC is deployed
1252
- destChains: E(f.LBTC).filter(
1253
- (e) => Tt(e)
1271
+ destChains: m(D.LBTC).filter(
1272
+ (e) => Nt(e)
1254
1273
  ),
1255
1274
  // BTC Stake only produces LBTC
1256
- supportedAssetsOut: [f.LBTC],
1275
+ supportedAssetsOut: [D.LBTC],
1257
1276
  addressSchema: nt,
1258
1277
  // Sui never requires fee authorization
1259
1278
  getFeeAuthConfig: () => null,
@@ -1263,58 +1282,58 @@ const Xt = {
1263
1282
  });
1264
1283
  return { signature: r };
1265
1284
  }
1266
- }, ee = {
1267
- evm: Wt,
1268
- solana: Xt,
1269
- sui: te,
1270
- starknet: Qt
1285
+ }, se = {
1286
+ evm: Jt,
1287
+ solana: Qt,
1288
+ sui: ee,
1289
+ starknet: te
1271
1290
  };
1272
- function se(e) {
1273
- return ee[e];
1291
+ function ie(e) {
1292
+ return se[e];
1274
1293
  }
1275
- function ie(e, i, s) {
1294
+ function ne(e, i, s) {
1276
1295
  return i ? e.routes.some(
1277
1296
  (t) => t.sourceChains.includes(i) && t.envs.includes(s)
1278
1297
  ) : !0;
1279
1298
  }
1280
- function ne(e, i) {
1299
+ function re(e, i) {
1281
1300
  return e.destChains.includes(i);
1282
1301
  }
1283
- function re(e, i) {
1302
+ function ae(e, i) {
1284
1303
  return e.supportedAssetsOut.includes(i);
1285
1304
  }
1286
- class ae extends O {
1305
+ class oe extends L {
1287
1306
  constructor(s, t) {
1288
1307
  super(s, t, a.IDLE);
1289
- D(this, "config");
1290
- D(this, "chainId");
1291
- D(this, "authState", { authorized: !1 });
1308
+ f(this, "config");
1309
+ f(this, "chainId");
1310
+ f(this, "authState", { authorized: !1 });
1292
1311
  /** Fee auth config - null if not required for this destination */
1293
- D(this, "feeAuthConfig", null);
1294
- const r = $(t.destChain), n = se(r);
1312
+ f(this, "feeAuthConfig", null);
1313
+ const r = $(t.destChain), n = ie(r);
1295
1314
  if (!n)
1296
1315
  throw new u(
1297
1316
  p.INVALID_CHAIN,
1298
1317
  `Unsupported destination chain type: ${r} (${t.destChain})`
1299
1318
  );
1300
- if (!re(n, t.assetOut))
1319
+ if (!ae(n, t.assetOut))
1301
1320
  throw new u(
1302
1321
  p.INVALID_ASSET,
1303
1322
  `Asset ${t.assetOut} is not supported for BTC staking. BTC Stake produces LBTC. For BTC.b, use BtcDeposit instead.`
1304
1323
  );
1305
- if (!ne(n, t.destChain))
1324
+ if (!re(n, t.destChain))
1306
1325
  throw new u(
1307
1326
  p.INVALID_CHAIN,
1308
1327
  `Destination chain ${t.destChain} is not supported for ${r}`
1309
1328
  );
1310
- if (!ie(n, t.sourceChain, s.env))
1329
+ if (!ne(n, t.sourceChain, s.env))
1311
1330
  throw u.routeNotFound({
1312
1331
  assetOut: t.assetOut,
1313
1332
  sourceChain: t.sourceChain,
1314
1333
  destChain: t.destChain,
1315
1334
  env: s.env
1316
1335
  });
1317
- this.config = n, this.chainId = v(t.destChain);
1336
+ this.config = n, this.chainId = O(t.destChain);
1318
1337
  }
1319
1338
  // ─────────────────────────────────────────────────────────────────────────
1320
1339
  // Abstract Method Implementations
@@ -1366,7 +1385,7 @@ class ae extends O {
1366
1385
  * Get expected token for this action (LBTC by default for BTC Stake)
1367
1386
  */
1368
1387
  getExpectedToken() {
1369
- return w(this.params.assetOut, S.LBTC);
1388
+ return T(this.params.assetOut, S.LBTC);
1370
1389
  }
1371
1390
  getAuthRequiredMessage() {
1372
1391
  return "Authorization required. Call authorize() first.";
@@ -1473,7 +1492,7 @@ class ae extends O {
1473
1492
  }
1474
1493
  return this.act(async () => {
1475
1494
  const t = this.getDepositAddressParams(s), r = await this.ctx.api.generateDepositAddress(t);
1476
- return R(r), this._depositAddress = r, this.emitProgress({
1495
+ return k(r), this._depositAddress = r, this.emitProgress({
1477
1496
  status: a.ADDRESS_READY,
1478
1497
  steps: {
1479
1498
  created: o.COMPLETE,
@@ -1509,17 +1528,17 @@ class ae extends O {
1509
1528
  return (s = this.authState.networkFee) != null && s.signature ? { signature: this.authState.networkFee.signature } : this.authState.destinationSignature;
1510
1529
  }
1511
1530
  }
1512
- class oe extends O {
1531
+ class ue extends L {
1513
1532
  constructor(s, t) {
1514
1533
  super(s, t, a.IDLE);
1515
- D(this, "chainId");
1516
- D(this, "authState", { authorized: !1 });
1517
- if (!Mt(t.assetOut))
1534
+ f(this, "chainId");
1535
+ f(this, "authState", { authorized: !1 });
1536
+ if (!zt(t.assetOut))
1518
1537
  throw new u(
1519
1538
  p.INVALID_ASSET,
1520
1539
  `Asset ${t.assetOut} is not supported for stake and deploy. StakeAndDeploy produces LBTC which is then deployed to a vault.`
1521
1540
  );
1522
- if (!xt(t.destChain))
1541
+ if (!Mt(t.destChain))
1523
1542
  throw new u(
1524
1543
  p.INVALID_CHAIN,
1525
1544
  `Destination chain ${t.destChain} is not supported for stake and deploy`
@@ -1529,14 +1548,14 @@ class oe extends O {
1529
1548
  p.INVALID_PARAMETER,
1530
1549
  `Protocol ${t.protocol} is not supported for stake and deploy`
1531
1550
  );
1532
- if (!zt(t.sourceChain, s.env))
1551
+ if (!Ht(t.sourceChain, s.env))
1533
1552
  throw u.routeNotFound({
1534
1553
  assetOut: t.assetOut,
1535
1554
  sourceChain: t.sourceChain,
1536
1555
  destChain: t.destChain,
1537
1556
  env: s.env
1538
1557
  });
1539
- const r = v(t.destChain);
1558
+ const r = O(t.destChain);
1540
1559
  if (typeof r != "number" || !Y(r))
1541
1560
  throw new u(
1542
1561
  p.INVALID_CHAIN,
@@ -1548,7 +1567,7 @@ class oe extends O {
1548
1567
  // Abstract Method Implementations
1549
1568
  // ─────────────────────────────────────────────────────────────────────────
1550
1569
  getAddressSchema() {
1551
- return l.addressSchema;
1570
+ return C.addressSchema;
1552
1571
  }
1553
1572
  getStatusConfig() {
1554
1573
  return {
@@ -1588,7 +1607,7 @@ class oe extends O {
1588
1607
  * Get expected token for this action (LBTC by default for StakeAndDeploy)
1589
1608
  */
1590
1609
  getExpectedToken() {
1591
- return w(this.params.assetOut, S.LBTC);
1610
+ return T(this.params.assetOut, S.LBTC);
1592
1611
  }
1593
1612
  getAuthRequiredMessage() {
1594
1613
  return "Deposit authorization required. Call authorizeDeposit() first.";
@@ -1606,14 +1625,14 @@ class oe extends O {
1606
1625
  async prepare(s) {
1607
1626
  return this.assertStatus(a.IDLE, "prepare"), this.act(async () => {
1608
1627
  const t = this.validatePrepareParams(s);
1609
- if (this._amount = t.amount, this._recipient = t.recipient, this._referralCode = t.referralCode, this.authState.fee = await l.getStakeAndBakeFee(
1628
+ if (this._amount = t.amount, this._recipient = t.recipient, this._referralCode = t.referralCode, this.authState.fee = await C.getStakeAndBakeFee(
1610
1629
  this.ctx,
1611
1630
  this.chainId,
1612
1631
  this.params.protocol
1613
1632
  ), await this.resumeFromExistingDeposit(
1614
1633
  t.recipient
1615
1634
  )) {
1616
- const h = await l.restoreStakeAndBakeSignature(
1635
+ const h = await C.restoreStakeAndBakeSignature(
1617
1636
  this.ctx,
1618
1637
  this.chainId,
1619
1638
  t.recipient
@@ -1625,7 +1644,7 @@ class oe extends O {
1625
1644
  this.updateStatus(a.NEEDS_DEPLOY_AUTHORIZATION), this.emitInitialProgress();
1626
1645
  return;
1627
1646
  }
1628
- const n = await l.restoreStakeAndBakeSignature(
1647
+ const n = await C.restoreStakeAndBakeSignature(
1629
1648
  this.ctx,
1630
1649
  this.chainId,
1631
1650
  t.recipient
@@ -1644,13 +1663,13 @@ class oe extends O {
1644
1663
  ), this.status === a.READY) return;
1645
1664
  const s = this.ensureRecipient(), t = this.ensureAmount();
1646
1665
  return this.act(async () => {
1647
- const r = y(t), n = this.params.assetIn ?? f.BTC, h = await l.authorizeStakeAndBake(
1666
+ const r = N(t), n = this.params.assetIn ?? D.BTC, h = await C.authorizeStakeAndBake(
1648
1667
  this.ctx,
1649
1668
  {
1650
1669
  chainId: this.chainId,
1651
1670
  recipient: s,
1652
1671
  amount: r.toString(),
1653
- vaultKey: Ht(this.params.protocol),
1672
+ vaultKey: $t(this.params.protocol),
1654
1673
  token: n
1655
1674
  }
1656
1675
  );
@@ -1660,7 +1679,7 @@ class oe extends O {
1660
1679
  async generateDepositAddress(s) {
1661
1680
  return this.assertStatus(a.READY, "generateDepositAddress"), this.ensureAuthorized(), this._depositAddress ? this._depositAddress : this.act(async () => {
1662
1681
  const t = this.getDepositAddressParams(s), r = await this.ctx.api.generateDepositAddress(t);
1663
- return R(r), this._depositAddress = r, this.emitProgress({
1682
+ return k(r), this._depositAddress = r, this.emitProgress({
1664
1683
  status: a.ADDRESS_READY,
1665
1684
  steps: {
1666
1685
  created: o.COMPLETE,
@@ -1684,7 +1703,7 @@ class oe extends O {
1684
1703
  const s = this._depositAddress, t = this._recipient;
1685
1704
  if (!s || !t)
1686
1705
  throw u.missingParameter("depositAddress or recipient");
1687
- return await b({
1706
+ return await B({
1688
1707
  network: this.bitcoinNetwork,
1689
1708
  btcService: this.ctx.btc,
1690
1709
  fetchDeposit: async () => {
@@ -1717,9 +1736,9 @@ class oe extends O {
1717
1736
  });
1718
1737
  }
1719
1738
  }
1720
- class ue {
1739
+ class he {
1721
1740
  constructor(i) {
1722
- D(this, "ctx");
1741
+ f(this, "ctx");
1723
1742
  this.ctx = rt(i);
1724
1743
  }
1725
1744
  /**
@@ -1744,7 +1763,7 @@ class ue {
1744
1763
  * ```
1745
1764
  */
1746
1765
  stake(i) {
1747
- return new ae(this.ctx, i);
1766
+ return new oe(this.ctx, i);
1748
1767
  }
1749
1768
  /**
1750
1769
  * Stake and Deploy BTC → LBTC + auto-deploy ("Stake and Bake")
@@ -1770,7 +1789,7 @@ class ue {
1770
1789
  * ```
1771
1790
  */
1772
1791
  stakeAndDeploy(i) {
1773
- return new oe(this.ctx, i);
1792
+ return new ue(this.ctx, i);
1774
1793
  }
1775
1794
  /**
1776
1795
  * Deposit BTC for custody (BTC → BTC.b)
@@ -1794,7 +1813,7 @@ class ue {
1794
1813
  * ```
1795
1814
  */
1796
1815
  deposit(i) {
1797
- return new bt(this.ctx, i);
1816
+ return new Bt(this.ctx, i);
1798
1817
  }
1799
1818
  /**
1800
1819
  * Deposit and Deploy BTC → BTC.b + auto-deploy to vault
@@ -1822,19 +1841,19 @@ class ue {
1822
1841
  * ```
1823
1842
  */
1824
1843
  depositAndDeploy(i) {
1825
- return new jt(this.ctx, i);
1844
+ return new Kt(this.ctx, i);
1826
1845
  }
1827
1846
  }
1828
- function Ie(e) {
1829
- return new ue(e);
1847
+ function we(e) {
1848
+ return new he(e);
1830
1849
  }
1831
1850
  export {
1832
- ue as BtcActions,
1833
- bt as BtcDeposit,
1834
- jt as BtcDepositAndDeploy,
1835
- ae as BtcStake,
1836
- oe as BtcStakeAndDeploy,
1837
- Ie as btcActions,
1838
- Ee as btcModule
1851
+ he as BtcActions,
1852
+ Bt as BtcDeposit,
1853
+ Kt as BtcDepositAndDeploy,
1854
+ oe as BtcStake,
1855
+ ue as BtcStakeAndDeploy,
1856
+ we as btcActions,
1857
+ me as btcModule
1839
1858
  };
1840
- //# sourceMappingURL=BtcActions-BE75KQhS.js.map
1859
+ //# sourceMappingURL=BtcActions-BDTnGE1D.js.map