@babylonlabs-io/ts-sdk 0.33.1 → 0.33.3
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/{PeginManager-LeGYbRN2.js → PeginManager-C-L3huRO.js} +330 -334
- package/dist/PeginManager-C-L3huRO.js.map +1 -0
- package/dist/{PeginManager-D2pBM0E-.cjs → PeginManager-DmPmzPHz.cjs} +2 -2
- package/dist/PeginManager-DmPmzPHz.cjs.map +1 -0
- package/dist/{bitcoin-0_T6KJON.js → bitcoin-B0S8SHCX.js} +24 -20
- package/dist/bitcoin-B0S8SHCX.js.map +1 -0
- package/dist/bitcoin-B3aqjuMP.cjs +2 -0
- package/dist/bitcoin-B3aqjuMP.cjs.map +1 -0
- package/dist/{buildAndBroadcastRefund-CK8MbGQh.js → buildAndBroadcastRefund-Dx09Zbla.js} +4 -4
- package/dist/buildAndBroadcastRefund-Dx09Zbla.js.map +1 -0
- package/dist/{buildAndBroadcastRefund-BXjYAqdb.cjs → buildAndBroadcastRefund-PmJMNrhO.cjs} +2 -2
- package/dist/buildAndBroadcastRefund-PmJMNrhO.cjs.map +1 -0
- package/dist/{challengeAssert-KGVKQh0J.js → challengeAssert-D3tHnLWb.js} +2 -2
- package/dist/{challengeAssert-KGVKQh0J.js.map → challengeAssert-D3tHnLWb.js.map} +1 -1
- package/dist/{challengeAssert-06GLZtV8.cjs → challengeAssert-Dp9d1bg1.cjs} +2 -2
- package/dist/{challengeAssert-06GLZtV8.cjs.map → challengeAssert-Dp9d1bg1.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +8 -8
- package/dist/{noPayout-BmMd4NNH.js → noPayout-BnsetBKW.js} +2 -2
- package/dist/{noPayout-BmMd4NNH.js.map → noPayout-BnsetBKW.js.map} +1 -1
- package/dist/{noPayout-Bp2TYA_X.cjs → noPayout-DWaCtpMU.cjs} +2 -2
- package/dist/{noPayout-Bp2TYA_X.cjs.map → noPayout-DWaCtpMU.cjs.map} +1 -1
- package/dist/{psbtInputFields-BLi7Ta-T.cjs → psbtInputFields-6sRcZqdb.cjs} +2 -2
- package/dist/{psbtInputFields-BLi7Ta-T.cjs.map → psbtInputFields-6sRcZqdb.cjs.map} +1 -1
- package/dist/{psbtInputFields-DPCFHgGd.js → psbtInputFields-C5QPn1YK.js} +2 -2
- package/dist/{psbtInputFields-DPCFHgGd.js.map → psbtInputFields-C5QPn1YK.js.map} +1 -1
- package/dist/tbv/core/clients/index.cjs +1 -1
- package/dist/tbv/core/clients/index.js +2 -2
- package/dist/tbv/core/clients/vault-provider/api.d.ts +2 -0
- package/dist/tbv/core/clients/vault-provider/api.d.ts.map +1 -1
- package/dist/tbv/core/clients/vault-provider/json-rpc-client.d.ts +9 -0
- package/dist/tbv/core/clients/vault-provider/json-rpc-client.d.ts.map +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +8 -8
- package/dist/tbv/core/managers/PayoutManager.d.ts +8 -4
- package/dist/tbv/core/managers/PayoutManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/PeginManager.d.ts +15 -1
- package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
- package/dist/tbv/core/primitives/index.cjs +1 -1
- package/dist/tbv/core/primitives/index.js +3 -3
- package/dist/tbv/core/primitives/utils/bitcoin.d.ts +6 -4
- package/dist/tbv/core/primitives/utils/bitcoin.d.ts.map +1 -1
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.js +1 -1
- package/dist/tbv/core/utils/index.cjs +1 -1
- package/dist/tbv/core/utils/index.js +2 -2
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +8 -8
- package/dist/testing/index.cjs +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/types-PthVHz5q.cjs +2 -0
- package/dist/types-PthVHz5q.cjs.map +1 -0
- package/dist/{types-D1o_3Q__.js → types-SYvSQWnc.js} +128 -87
- package/dist/types-SYvSQWnc.js.map +1 -0
- package/dist/{vault-registry-reader-DdUgC5IF.cjs → vault-registry-reader-CKe9TbX6.cjs} +2 -2
- package/dist/vault-registry-reader-CKe9TbX6.cjs.map +1 -0
- package/dist/{vault-registry-reader-BeIEh62N.js → vault-registry-reader-CWGbw_wZ.js} +117 -116
- package/dist/vault-registry-reader-CWGbw_wZ.js.map +1 -0
- package/package.json +1 -1
- package/dist/PeginManager-D2pBM0E-.cjs.map +0 -1
- package/dist/PeginManager-LeGYbRN2.js.map +0 -1
- package/dist/bitcoin-0_T6KJON.js.map +0 -1
- package/dist/bitcoin-EYBKDtEW.cjs +0 -2
- package/dist/bitcoin-EYBKDtEW.cjs.map +0 -1
- package/dist/buildAndBroadcastRefund-BXjYAqdb.cjs.map +0 -1
- package/dist/buildAndBroadcastRefund-CK8MbGQh.js.map +0 -1
- package/dist/types-C2IUB0Jd.cjs +0 -2
- package/dist/types-C2IUB0Jd.cjs.map +0 -1
- package/dist/types-D1o_3Q__.js.map +0 -1
- package/dist/vault-registry-reader-BeIEh62N.js.map +0 -1
- package/dist/vault-registry-reader-DdUgC5IF.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var p = (e, t, n) =>
|
|
4
|
-
const
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var A = (e, t, n) => t in e ? I(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var p = (e, t, n) => A(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
const H = [
|
|
5
5
|
{
|
|
6
6
|
type: "function",
|
|
7
7
|
name: "submitPeginRequest",
|
|
@@ -414,12 +414,12 @@ const G = [
|
|
|
414
414
|
stateMutability: "view"
|
|
415
415
|
}
|
|
416
416
|
];
|
|
417
|
-
class
|
|
417
|
+
class l extends Error {
|
|
418
418
|
constructor(t, n, r = "local", i) {
|
|
419
419
|
super(n), this.code = t, this.source = r, this.data = i, this.name = "JsonRpcError";
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
const
|
|
422
|
+
const c = {
|
|
423
423
|
TIMEOUT: -32e3,
|
|
424
424
|
NETWORK: -32001,
|
|
425
425
|
/** VP proxy: request timed out at proxy level */
|
|
@@ -427,8 +427,12 @@ const T = {
|
|
|
427
427
|
/** VP proxy: VP unreachable / DNS failure / response too large */
|
|
428
428
|
PROXY_UNAVAILABLE: -32003,
|
|
429
429
|
/** SDK client: response missing "result" field (malformed JSON-RPC) */
|
|
430
|
-
INVALID_RESPONSE: -32700
|
|
431
|
-
|
|
430
|
+
INVALID_RESPONSE: -32700,
|
|
431
|
+
/** SDK client: response body exceeded the configured byte limit */
|
|
432
|
+
RESPONSE_TOO_LARGE: -32701
|
|
433
|
+
}, _ = "2.0", S = 3, N = 1e3, g = 2 * 1024 * 1024, O = /* @__PURE__ */ new Set([
|
|
434
|
+
"vaultProvider_requestDepositorClaimerArtifacts"
|
|
435
|
+
]), v = /* @__PURE__ */ new Set([
|
|
432
436
|
408,
|
|
433
437
|
// Request Timeout
|
|
434
438
|
429,
|
|
@@ -441,21 +445,21 @@ const T = {
|
|
|
441
445
|
// Service Unavailable
|
|
442
446
|
504
|
|
443
447
|
// Gateway Timeout
|
|
444
|
-
]),
|
|
448
|
+
]), f = /* @__PURE__ */ new Set([
|
|
445
449
|
"vaultProvider_getPeginStatus",
|
|
446
450
|
"vaultProvider_getPegoutStatus",
|
|
447
451
|
"vaultProvider_requestDepositorPresignTransactions"
|
|
448
452
|
]);
|
|
449
|
-
function
|
|
450
|
-
return
|
|
453
|
+
function w(e) {
|
|
454
|
+
return f.has(e);
|
|
451
455
|
}
|
|
452
|
-
const
|
|
453
|
-
function
|
|
454
|
-
if (!(e instanceof
|
|
456
|
+
const B = "auth_expired";
|
|
457
|
+
function D(e) {
|
|
458
|
+
if (!(e instanceof l) || e.source !== "wire") return !1;
|
|
455
459
|
const t = e.data;
|
|
456
|
-
return t === null || typeof t != "object" ? !1 : t.kind ===
|
|
460
|
+
return t === null || typeof t != "object" ? !1 : t.kind === B;
|
|
457
461
|
}
|
|
458
|
-
class
|
|
462
|
+
class q {
|
|
459
463
|
constructor(t) {
|
|
460
464
|
p(this, "baseUrl");
|
|
461
465
|
p(this, "timeout");
|
|
@@ -463,12 +467,15 @@ class k {
|
|
|
463
467
|
p(this, "requestId", 0);
|
|
464
468
|
p(this, "retries");
|
|
465
469
|
p(this, "retryDelay");
|
|
470
|
+
p(this, "maxResponseBytes");
|
|
466
471
|
p(this, "retryableFor");
|
|
467
472
|
p(this, "tokenProvider");
|
|
468
|
-
this.baseUrl = t.baseUrl.replace(/\/$/, ""), this.timeout = t.timeout, this.headers = {
|
|
473
|
+
if (this.baseUrl = t.baseUrl.replace(/\/$/, ""), this.timeout = t.timeout, this.headers = {
|
|
469
474
|
"Content-Type": "application/json",
|
|
470
475
|
...t.headers
|
|
471
|
-
}, this.retries = t.retries ??
|
|
476
|
+
}, this.retries = t.retries ?? S, this.retryDelay = t.retryDelay ?? N, this.maxResponseBytes = t.maxResponseBytes ?? g, !Number.isFinite(this.maxResponseBytes) || this.maxResponseBytes <= 0)
|
|
477
|
+
throw new Error("maxResponseBytes must be a positive finite number");
|
|
478
|
+
this.retryableFor = t.retryableFor ?? w, this.tokenProvider = t.tokenProvider;
|
|
472
479
|
}
|
|
473
480
|
async buildHeaders(t) {
|
|
474
481
|
const n = { ...this.headers };
|
|
@@ -495,7 +502,7 @@ class k {
|
|
|
495
502
|
try {
|
|
496
503
|
return await this.callOnce(t, n, r);
|
|
497
504
|
} catch (i) {
|
|
498
|
-
if (this.tokenProvider &&
|
|
505
|
+
if (this.tokenProvider && D(i))
|
|
499
506
|
return this.tokenProvider.invalidate(), await this.callOnce(t, n, r);
|
|
500
507
|
throw i;
|
|
501
508
|
}
|
|
@@ -504,33 +511,34 @@ class k {
|
|
|
504
511
|
const i = await this.fetchWithRetry(t, n, r);
|
|
505
512
|
let s;
|
|
506
513
|
try {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
514
|
+
const a = O.has(t) ? await i.text() : await V(i, this.maxResponseBytes);
|
|
515
|
+
s = JSON.parse(a);
|
|
516
|
+
} catch (a) {
|
|
517
|
+
throw a instanceof l ? a : new l(
|
|
518
|
+
c.INVALID_RESPONSE,
|
|
511
519
|
"Invalid JSON-RPC response: body is not valid JSON",
|
|
512
520
|
"local"
|
|
513
521
|
);
|
|
514
522
|
}
|
|
515
523
|
if (s === null || typeof s != "object" || Array.isArray(s))
|
|
516
|
-
throw new
|
|
517
|
-
|
|
524
|
+
throw new l(
|
|
525
|
+
c.INVALID_RESPONSE,
|
|
518
526
|
`Invalid JSON-RPC response: expected an object, got ${typeof s}`,
|
|
519
527
|
"local"
|
|
520
528
|
);
|
|
521
529
|
const o = s;
|
|
522
530
|
if ("error" in o && o.error != null) {
|
|
523
|
-
const
|
|
524
|
-
throw new
|
|
525
|
-
|
|
526
|
-
|
|
531
|
+
const a = o.error;
|
|
532
|
+
throw new l(
|
|
533
|
+
a.code ?? c.INVALID_RESPONSE,
|
|
534
|
+
a.message ?? "Unknown RPC error",
|
|
527
535
|
"wire",
|
|
528
|
-
|
|
536
|
+
a.data
|
|
529
537
|
);
|
|
530
538
|
}
|
|
531
539
|
if (!("result" in o))
|
|
532
|
-
throw new
|
|
533
|
-
|
|
540
|
+
throw new l(
|
|
541
|
+
c.INVALID_RESPONSE,
|
|
534
542
|
'Invalid JSON-RPC response: missing "result" field',
|
|
535
543
|
"local"
|
|
536
544
|
);
|
|
@@ -550,67 +558,67 @@ class k {
|
|
|
550
558
|
return this.fetchWithRetry(t, n, r);
|
|
551
559
|
}
|
|
552
560
|
async fetchWithRetry(t, n, r) {
|
|
553
|
-
const i = ++this.requestId, s = this.retryableFor(t) ? this.retries : 0,
|
|
554
|
-
jsonrpc:
|
|
561
|
+
const i = ++this.requestId, s = this.retryableFor(t) ? this.retries : 0, a = JSON.stringify({
|
|
562
|
+
jsonrpc: _,
|
|
555
563
|
method: t,
|
|
556
564
|
params: [n],
|
|
557
565
|
id: i
|
|
558
566
|
});
|
|
559
|
-
let
|
|
560
|
-
for (let
|
|
561
|
-
const
|
|
562
|
-
() =>
|
|
567
|
+
let P = null;
|
|
568
|
+
for (let d = 0; d <= s; d++) {
|
|
569
|
+
const b = new AbortController(), m = setTimeout(
|
|
570
|
+
() => b.abort(),
|
|
563
571
|
this.timeout
|
|
564
|
-
),
|
|
572
|
+
), T = r ? L(r, b.signal) : null, R = T ? T.signal : b.signal;
|
|
565
573
|
try {
|
|
566
|
-
const
|
|
574
|
+
const y = await this.buildHeaders(t), u = await fetch(this.baseUrl, {
|
|
567
575
|
method: "POST",
|
|
568
|
-
headers:
|
|
569
|
-
body:
|
|
570
|
-
signal:
|
|
576
|
+
headers: y,
|
|
577
|
+
body: a,
|
|
578
|
+
signal: R
|
|
571
579
|
});
|
|
572
|
-
if (clearTimeout(m),
|
|
573
|
-
if (
|
|
574
|
-
const
|
|
575
|
-
await this.sleep(
|
|
580
|
+
if (clearTimeout(m), T == null || T.cleanup(), !u.ok) {
|
|
581
|
+
if (d < s && v.has(u.status)) {
|
|
582
|
+
const h = this.retryDelay * Math.pow(2, d);
|
|
583
|
+
await this.sleep(h, r);
|
|
576
584
|
continue;
|
|
577
585
|
}
|
|
578
586
|
throw new Error(
|
|
579
|
-
`HTTP error: ${
|
|
587
|
+
`HTTP error: ${u.status} ${u.statusText}`
|
|
580
588
|
);
|
|
581
589
|
}
|
|
582
|
-
return
|
|
583
|
-
} catch (
|
|
584
|
-
if (clearTimeout(m),
|
|
590
|
+
return u;
|
|
591
|
+
} catch (y) {
|
|
592
|
+
if (clearTimeout(m), T == null || T.cleanup(), P = y instanceof Error ? y : new Error(String(y)), r != null && r.aborted)
|
|
585
593
|
throw new Error("Request aborted");
|
|
586
|
-
if (
|
|
587
|
-
if (
|
|
588
|
-
const
|
|
589
|
-
await this.sleep(
|
|
594
|
+
if (y instanceof Error && y.name === "AbortError") {
|
|
595
|
+
if (d < s) {
|
|
596
|
+
const u = this.retryDelay * Math.pow(2, d);
|
|
597
|
+
await this.sleep(u, r);
|
|
590
598
|
continue;
|
|
591
599
|
}
|
|
592
|
-
throw new
|
|
593
|
-
|
|
600
|
+
throw new l(
|
|
601
|
+
c.TIMEOUT,
|
|
594
602
|
`Request timeout after ${this.timeout}ms (${s + 1} attempts)`,
|
|
595
603
|
"local"
|
|
596
604
|
);
|
|
597
605
|
}
|
|
598
|
-
if (
|
|
599
|
-
if (
|
|
600
|
-
const
|
|
601
|
-
await this.sleep(
|
|
606
|
+
if (y instanceof TypeError) {
|
|
607
|
+
if (d < s) {
|
|
608
|
+
const u = this.retryDelay * Math.pow(2, d);
|
|
609
|
+
await this.sleep(u, r);
|
|
602
610
|
continue;
|
|
603
611
|
}
|
|
604
|
-
throw new
|
|
605
|
-
|
|
606
|
-
`Network error: ${
|
|
612
|
+
throw new l(
|
|
613
|
+
c.NETWORK,
|
|
614
|
+
`Network error: ${y.message} (${s + 1} attempts)`,
|
|
607
615
|
"local"
|
|
608
616
|
);
|
|
609
617
|
}
|
|
610
|
-
throw
|
|
618
|
+
throw y;
|
|
611
619
|
}
|
|
612
620
|
}
|
|
613
|
-
throw
|
|
621
|
+
throw P || new Error("Unknown error after retries");
|
|
614
622
|
}
|
|
615
623
|
sleep(t, n) {
|
|
616
624
|
return new Promise((r, i) => {
|
|
@@ -630,7 +638,7 @@ class k {
|
|
|
630
638
|
return this.baseUrl;
|
|
631
639
|
}
|
|
632
640
|
}
|
|
633
|
-
function
|
|
641
|
+
function L(e, t) {
|
|
634
642
|
if (e.aborted) return { signal: e, cleanup: () => {
|
|
635
643
|
} };
|
|
636
644
|
if (t.aborted) return { signal: t, cleanup: () => {
|
|
@@ -646,46 +654,79 @@ function w(e, t) {
|
|
|
646
654
|
};
|
|
647
655
|
return { signal: n.signal, cleanup: s };
|
|
648
656
|
}
|
|
649
|
-
|
|
650
|
-
const
|
|
657
|
+
async function V(e, t) {
|
|
658
|
+
const n = e.headers.get("content-length");
|
|
659
|
+
if (n !== null) {
|
|
660
|
+
const a = Number(n);
|
|
661
|
+
if (Number.isFinite(a) && a > t)
|
|
662
|
+
throw E(t);
|
|
663
|
+
}
|
|
664
|
+
if (!e.body)
|
|
665
|
+
return "";
|
|
666
|
+
const r = e.body.getReader(), i = new TextDecoder();
|
|
667
|
+
let s = 0, o = "";
|
|
668
|
+
try {
|
|
669
|
+
for (; ; ) {
|
|
670
|
+
const { done: a, value: P } = await r.read();
|
|
671
|
+
if (a) break;
|
|
672
|
+
if (P) {
|
|
673
|
+
if (s += P.byteLength, s > t)
|
|
674
|
+
throw await r.cancel(), E(t);
|
|
675
|
+
o += i.decode(P, { stream: !0 });
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
} finally {
|
|
679
|
+
r.releaseLock();
|
|
680
|
+
}
|
|
681
|
+
return o + i.decode();
|
|
682
|
+
}
|
|
683
|
+
function E(e) {
|
|
684
|
+
return new l(
|
|
685
|
+
c.RESPONSE_TOO_LARGE,
|
|
686
|
+
`JSON-RPC response exceeds maximum size of ${e} bytes`,
|
|
687
|
+
"local"
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
var C = /* @__PURE__ */ ((e) => (e.PENDING_INGESTION = "PendingIngestion", e.PENDING_DEPOSITOR_WOTS_PK = "PendingDepositorWotsPK", e.PENDING_BABE_SETUP = "PendingBabeSetup", e.PENDING_CHALLENGER_PRESIGNING = "PendingChallengerPresigning", e.PENDING_PEGIN_SIGS_AVAILABILITY = "PendingPeginSigsAvailability", e.PENDING_PRE_PEGIN_CONFIRMATIONS = "PendingPrePegInConfirmations", e.PENDING_DEPOSITOR_SIGNATURES = "PendingDepositorSignatures", e.PENDING_ACKS = "PendingACKs", e.PENDING_ACTIVATION = "PendingActivation", e.ACTIVATED = "Activated", e.EXPIRED = "Expired", e.CLAIM_POSTED = "ClaimPosted", e.PEGGED_OUT = "PeggedOut", e))(C || {});
|
|
691
|
+
const F = [
|
|
651
692
|
"PendingIngestion",
|
|
652
693
|
"PendingBabeSetup",
|
|
653
694
|
"PendingChallengerPresigning",
|
|
654
695
|
"PendingPeginSigsAvailability",
|
|
655
696
|
"PendingPrePegInConfirmations"
|
|
656
697
|
/* PENDING_PRE_PEGIN_CONFIRMATIONS */
|
|
657
|
-
],
|
|
698
|
+
], x = [
|
|
658
699
|
"PendingACKs",
|
|
659
700
|
"PendingActivation",
|
|
660
701
|
"Activated"
|
|
661
702
|
/* ACTIVATED */
|
|
662
|
-
],
|
|
703
|
+
], U = /* @__PURE__ */ new Set([
|
|
663
704
|
"PendingBabeSetup",
|
|
664
705
|
"PendingChallengerPresigning",
|
|
665
706
|
"PendingPeginSigsAvailability",
|
|
666
707
|
"PendingPrePegInConfirmations",
|
|
667
|
-
...
|
|
668
|
-
]),
|
|
708
|
+
...x
|
|
709
|
+
]), J = /* @__PURE__ */ new Set([
|
|
669
710
|
"Expired",
|
|
670
711
|
"ClaimPosted",
|
|
671
712
|
"PeggedOut"
|
|
672
713
|
/* PEGGED_OUT */
|
|
673
|
-
]),
|
|
674
|
-
...
|
|
714
|
+
]), K = /* @__PURE__ */ new Set([
|
|
715
|
+
...U,
|
|
675
716
|
"PendingDepositorSignatures"
|
|
676
717
|
/* PENDING_DEPOSITOR_SIGNATURES */
|
|
677
718
|
]);
|
|
678
|
-
var
|
|
719
|
+
var G = /* @__PURE__ */ ((e) => (e[e.DATABASE_ERROR = -32005] = "DATABASE_ERROR", e[e.PRESIGN_ERROR = -32006] = "PRESIGN_ERROR", e[e.JSON_SERIALIZATION_ERROR = -32007] = "JSON_SERIALIZATION_ERROR", e[e.TX_GRAPH_ERROR = -32008] = "TX_GRAPH_ERROR", e[e.INVALID_GRAPH = -32009] = "INVALID_GRAPH", e[e.VALIDATION_ERROR = -32010] = "VALIDATION_ERROR", e[e.NOT_FOUND = -32011] = "NOT_FOUND", e[e.INTERNAL_ERROR = -32603] = "INTERNAL_ERROR", e))(G || {});
|
|
679
720
|
export {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
V,
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
721
|
+
H as B,
|
|
722
|
+
C as D,
|
|
723
|
+
q as J,
|
|
724
|
+
F as P,
|
|
725
|
+
G as R,
|
|
726
|
+
U as V,
|
|
727
|
+
l as a,
|
|
728
|
+
c as b,
|
|
729
|
+
J as c,
|
|
730
|
+
K as d
|
|
690
731
|
};
|
|
691
|
-
//# sourceMappingURL=types-
|
|
732
|
+
//# sourceMappingURL=types-SYvSQWnc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-SYvSQWnc.js","sources":["../src/tbv/core/contracts/abis/BTCVaultRegistry.abi.ts","../src/tbv/core/clients/vault-provider/json-rpc-client.ts","../src/tbv/core/clients/vault-provider/types.ts"],"sourcesContent":["/**\n * BTCVaultRegistry Contract ABI\n *\n * Minimal ABI containing only the functions needed by the SDK.\n * Full ABI is available in the vault service package.\n *\n * @module contracts/abis/BTCVaultRegistry\n */\n\n/**\n * Minimal ABI for BTCVaultRegistry contract.\n * Contains submitPeginRequest, submitPeginRequestBatch, activateVaultWithSecret, getPegInFee, and getBtcVaultBasicInfo.\n */\nexport const BTCVaultRegistryABI = [\n {\n type: \"function\",\n name: \"submitPeginRequest\",\n inputs: [\n {\n name: \"depositor\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"submitPeginRequest\",\n inputs: [\n {\n name: \"depositor\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"referralCode\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"submitPeginRequestBatch\",\n inputs: [\n { name: \"depositor\", type: \"address\", internalType: \"address\" },\n { name: \"vaultProvider\", type: \"address\", internalType: \"address\" },\n {\n name: \"requests\",\n type: \"tuple[]\",\n internalType: \"struct IBTCVaultRegistry.BatchPeginRequest[]\",\n components: [\n { name: \"depositorBtcPubKey\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"btcPopSignature\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"unsignedPrePeginTx\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"depositorSignedPeginTx\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"hashlock\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"htlcVout\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"referralCode\", type: \"uint32\", internalType: \"uint32\" },\n { name: \"depositorPayoutBtcAddress\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"depositorWotsPkHash\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n },\n ],\n outputs: [\n { name: \"vaultIds\", type: \"bytes32[]\", internalType: \"bytes32[]\" },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"activateVaultWithSecret\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"s\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"activationMetadata\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"getPegInFee\",\n inputs: [\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"totalFee\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getVaultProviderBTCKey\",\n inputs: [\n { name: \"vpAddr\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n { name: \"\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getBtcVaultBasicInfo\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"vBasic\",\n type: \"tuple\",\n internalType: \"struct BTCVaultTypes.BTCVaultBasicInfo\",\n components: [\n { name: \"depositor\", type: \"address\", internalType: \"address\" },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"status\",\n type: \"uint8\",\n internalType: \"enum IBTCVaultRegistry.BTCVaultStatus\",\n },\n {\n name: \"applicationEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n { name: \"createdAt\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"error\",\n name: \"InvalidPeginFee\",\n inputs: [\n {\n name: \"provided\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"required\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n {\n type: \"error\",\n name: \"InvalidSecret\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"ActivationDeadlineExpired\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"InvalidHashlock\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"DuplicateHashlock\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"CapExceeded\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"InvalidOutputIndex\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"PeginSignaturesIncomplete\",\n inputs: [],\n },\n {\n type: \"function\",\n name: \"getBtcVaultProtocolInfo\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"vProtocol\",\n type: \"tuple\",\n internalType:\n \"struct BTCVaultRegistryTypes.BTCVaultProtocolInfo\",\n components: [\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"universalChallengersVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"appVaultKeepersVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"offchainParamsVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"verifiedAt\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"depositorPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"prePeginTxHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"vaultProviderCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"protocolParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IProtocolParams\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"applicationRegistry\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IApplicationRegistry\",\n },\n ],\n stateMutability: \"view\",\n },\n] as const;\n","/**\n * Generic JSON-RPC 2.0 HTTP Client\n *\n * Framework-agnostic client using `fetch()` — works in browsers and Node.js 18+.\n * Includes configurable retry policy and AbortSignal passthrough.\n */\n\nexport interface JsonRpcRequest<T = unknown> {\n jsonrpc: \"2.0\";\n method: string;\n params: T;\n id: number | string;\n}\n\nexport interface JsonRpcSuccessResponse<T = unknown> {\n jsonrpc: \"2.0\";\n result: T;\n id: number | string;\n}\n\nexport interface JsonRpcErrorResponse {\n jsonrpc: \"2.0\";\n error: {\n code: number;\n message: string;\n data?: unknown;\n };\n id: number | string;\n}\n\nexport type JsonRpcResponse<T = unknown> =\n | JsonRpcSuccessResponse<T>\n | JsonRpcErrorResponse;\n\n/**\n * Injects bearer tokens into requests for auth-gated methods, and is\n * notified on auth-expired responses so it can invalidate its cache.\n *\n * The `JsonRpcClient` is agnostic to which methods are auth-gated —\n * the provider's `getToken(method)` decides. Returning `null` means\n * \"no auth required for this method\"; the client then sends the\n * request with no `Authorization` header.\n */\nexport interface BearerTokenProvider {\n /**\n * Return the bearer token to inject for `method`, or `null` if the\n * method does not require auth.\n */\n getToken(method: string): Promise<string | null>;\n /**\n * Drop the cached token. Next call to `getToken` must re-acquire.\n * Called by the client on reactive-refresh-trigger responses.\n */\n invalidate(): void;\n}\n\nexport interface JsonRpcClientConfig {\n /** Base URL of the RPC service */\n baseUrl: string;\n /** Timeout in milliseconds per request attempt */\n timeout: number;\n /** Optional custom headers */\n headers?: Record<string, string>;\n /** Number of retry attempts for transient errors (default: 3) */\n retries?: number;\n /** Initial retry delay in milliseconds (default: 1000) */\n retryDelay?: number;\n /**\n * Maximum response body size, in bytes, for typed JSON-RPC calls.\n * `callRaw` intentionally returns the unparsed Response and is not capped here.\n * Default: 2 MiB.\n */\n maxResponseBytes?: number;\n /**\n * Predicate that decides which methods retry on transient errors.\n * Default retries only `getPeginStatus`, `getPegoutStatus`, and\n * `requestDepositorPresignTransactions`. Write methods are not\n * retried by default.\n */\n retryableFor?: (method: string) => boolean;\n /**\n * Per-request bearer-token source. A non-null return attaches\n * `Authorization: Bearer <token>`; `null` skips auth. `call`\n * additionally retries once on wire `auth_expired` (invalidate +\n * refetch + retry). `callRaw` skips reactive refresh.\n */\n tokenProvider?: BearerTokenProvider;\n}\n\n/**\n * Identifies whether an error was produced locally (timeout, network\n * failure, malformed response) or parsed from a wire-format JSON-RPC\n * error envelope returned by the server.\n *\n * This matters for anyone inspecting the shared `-32001` code: the SDK\n * uses it internally for network failures AND the server uses it for\n * auth-middleware rejections. The `source` field disambiguates.\n */\nexport type JsonRpcErrorSource = \"wire\" | \"local\";\n\nexport class JsonRpcError extends Error {\n constructor(\n public code: number,\n message: string,\n /** \"wire\" for server-returned envelopes; \"local\" for SDK-side failures. */\n public source: JsonRpcErrorSource = \"local\",\n /** Structured data from the server `error.data` field, if any. */\n public data?: unknown,\n ) {\n super(message);\n this.name = \"JsonRpcError\";\n }\n}\n\nexport const JSON_RPC_ERROR_CODES = {\n TIMEOUT: -32000,\n NETWORK: -32001,\n /** VP proxy: request timed out at proxy level */\n PROXY_TIMEOUT: -32002,\n /** VP proxy: VP unreachable / DNS failure / response too large */\n PROXY_UNAVAILABLE: -32003,\n /** SDK client: response missing \"result\" field (malformed JSON-RPC) */\n INVALID_RESPONSE: -32700,\n /** SDK client: response body exceeded the configured byte limit */\n RESPONSE_TOO_LARGE: -32701,\n} as const;\n\n/** JSON-RPC protocol version */\nconst JSON_RPC_VERSION = \"2.0\" as const;\n\n/** Default number of retry attempts for transient errors */\nconst DEFAULT_RETRY_ATTEMPTS = 3;\n\n/** Default initial retry delay in milliseconds */\nconst DEFAULT_RETRY_DELAY_MS = 1000;\n\n/** Default maximum JSON-RPC response size for typed calls (2 MiB) */\nconst DEFAULT_MAX_RESPONSE_BYTES = 2 * 1024 * 1024;\n\n/**\n * TODO: Temporary typed-call exceptions for methods that currently return large\n * artifact payloads as JSON-RPC results.\n */\nconst UNCAPPED_TYPED_RESPONSE_METHODS: ReadonlySet<string> = new Set([\n \"vaultProvider_requestDepositorClaimerArtifacts\",\n]);\n\n/** HTTP status codes that indicate transient server errors and are safe to retry */\nconst RETRYABLE_HTTP_STATUS_CODES: ReadonlySet<number> = new Set([\n 408, // Request Timeout\n 429, // Too Many Requests\n 500, // Internal Server Error\n 502, // Bad Gateway\n 503, // Service Unavailable\n 504, // Gateway Timeout\n]);\n\n/** Default retry predicate: only retry read-only / idempotent methods */\nconst DEFAULT_RETRYABLE_METHODS: ReadonlySet<string> = new Set([\n \"vaultProvider_getPeginStatus\",\n \"vaultProvider_getPegoutStatus\",\n \"vaultProvider_requestDepositorPresignTransactions\",\n]);\n\nfunction defaultRetryableFor(method: string): boolean {\n return DEFAULT_RETRYABLE_METHODS.has(method);\n}\n\n/**\n * Token-expired marker the server emits in `error.data.kind`. When\n * present on a wire-origin error, the client invalidates its cached\n * token and retries the request once with a freshly-acquired bearer.\n *\n * Kept in sync with btc-vault's auth middleware. Absence of the marker\n * means the server does not support reactive refresh yet; we fall back\n * to proactive-only refresh via `BearerTokenProvider.getToken()` TTL\n * checks.\n */\nconst AUTH_EXPIRED_DATA_KIND = \"auth_expired\";\n\nfunction isAuthExpiredError(error: unknown): boolean {\n if (!(error instanceof JsonRpcError)) return false;\n if (error.source !== \"wire\") return false;\n const data = error.data;\n if (data === null || typeof data !== \"object\") return false;\n const kind = (data as { kind?: unknown }).kind;\n return kind === AUTH_EXPIRED_DATA_KIND;\n}\n\n/**\n * Generic JSON-RPC 2.0 HTTP client with safe retry policy.\n */\nexport class JsonRpcClient {\n private baseUrl: string;\n private timeout: number;\n private headers: Record<string, string>;\n private requestId = 0;\n private retries: number;\n private retryDelay: number;\n private maxResponseBytes: number;\n private retryableFor: (method: string) => boolean;\n private tokenProvider?: BearerTokenProvider;\n\n constructor(config: JsonRpcClientConfig) {\n this.baseUrl = config.baseUrl.replace(/\\/$/, \"\");\n this.timeout = config.timeout;\n this.headers = {\n \"Content-Type\": \"application/json\",\n ...config.headers,\n };\n this.retries = config.retries ?? DEFAULT_RETRY_ATTEMPTS;\n this.retryDelay = config.retryDelay ?? DEFAULT_RETRY_DELAY_MS;\n this.maxResponseBytes =\n config.maxResponseBytes ?? DEFAULT_MAX_RESPONSE_BYTES;\n if (!Number.isFinite(this.maxResponseBytes) || this.maxResponseBytes <= 0) {\n throw new Error(\"maxResponseBytes must be a positive finite number\");\n }\n this.retryableFor = config.retryableFor ?? defaultRetryableFor;\n this.tokenProvider = config.tokenProvider;\n }\n\n private async buildHeaders(method: string): Promise<Record<string, string>> {\n const headers: Record<string, string> = { ...this.headers };\n if (this.tokenProvider) {\n const token = await this.tokenProvider.getToken(method);\n if (token) {\n headers.Authorization = `Bearer ${token}`;\n }\n }\n return headers;\n }\n\n /**\n * Make a JSON-RPC request with optional retry for safe methods.\n *\n * If the request fails with a wire-origin `auth_expired` error and a\n * `tokenProvider` is configured, the client invalidates its cached\n * token and retries the request once with a freshly-acquired bearer.\n *\n * @param method - The RPC method name\n * @param params - The method parameters\n * @param signal - Optional AbortSignal for caller-controlled cancellation\n * @returns The result from the RPC method\n * @throws JsonRpcError if the RPC call fails\n */\n async call<TParams, TResult>(\n method: string,\n params: TParams,\n signal?: AbortSignal,\n ): Promise<TResult> {\n try {\n return await this.callOnce<TParams, TResult>(method, params, signal);\n } catch (error) {\n // The auth-expired retry fires for ALL methods, including mutating\n // ones. This is intentional and safe: the server's auth middleware\n // validates the bearer token BEFORE dispatching to the method\n // handler, so an `auth_expired` error means the handler never ran\n // and no state was mutated. Confirmed against btc-vault at\n // `crates/btc-auth/src/middleware/jsonrpc.rs` — token validation\n // is pre-handler only. The `retryableFor` guard on\n // HTTP-transient-error retries doesn't apply here because that\n // guard is about retrying after a request the server may have\n // started processing; auth_expired is categorically different.\n if (this.tokenProvider && isAuthExpiredError(error)) {\n this.tokenProvider.invalidate();\n return await this.callOnce<TParams, TResult>(method, params, signal);\n }\n throw error;\n }\n }\n\n private async callOnce<TParams, TResult>(\n method: string,\n params: TParams,\n signal: AbortSignal | undefined,\n ): Promise<TResult> {\n const response = await this.fetchWithRetry(method, params, signal);\n\n let jsonResponse: unknown;\n try {\n const responseText = UNCAPPED_TYPED_RESPONSE_METHODS.has(method)\n ? await response.text()\n : await readResponseTextWithLimit(response, this.maxResponseBytes);\n jsonResponse = JSON.parse(responseText);\n } catch (error) {\n if (error instanceof JsonRpcError) {\n throw error;\n }\n throw new JsonRpcError(\n JSON_RPC_ERROR_CODES.INVALID_RESPONSE,\n \"Invalid JSON-RPC response: body is not valid JSON\",\n \"local\",\n );\n }\n\n if (\n jsonResponse === null ||\n typeof jsonResponse !== \"object\" ||\n Array.isArray(jsonResponse)\n ) {\n throw new JsonRpcError(\n JSON_RPC_ERROR_CODES.INVALID_RESPONSE,\n `Invalid JSON-RPC response: expected an object, got ${typeof jsonResponse}`,\n \"local\",\n );\n }\n\n const rpcResponse = jsonResponse as Record<string, unknown>;\n\n if (\"error\" in rpcResponse && rpcResponse.error != null) {\n const err = rpcResponse.error as {\n code?: number;\n message?: string;\n data?: unknown;\n };\n throw new JsonRpcError(\n err.code ?? JSON_RPC_ERROR_CODES.INVALID_RESPONSE,\n err.message ?? \"Unknown RPC error\",\n \"wire\",\n err.data,\n );\n }\n\n if (!(\"result\" in rpcResponse)) {\n throw new JsonRpcError(\n JSON_RPC_ERROR_CODES.INVALID_RESPONSE,\n `Invalid JSON-RPC response: missing \"result\" field`,\n \"local\",\n );\n }\n\n return rpcResponse.result as TResult;\n }\n\n /**\n * Make a JSON-RPC request returning the raw Response (unparsed body).\n *\n * Bearer tokens are injected identically to `call`. **Reactive refresh\n * is NOT performed here** — the response body may be unbounded (e.g.\n * claimer-artifact downloads), so the client refuses to parse it to\n * detect auth errors. Callers relying on token-expired retries for\n * large downloads must read the body themselves and re-invoke\n * `callRaw` after `tokenProvider.invalidate()`.\n */\n async callRaw<TParams>(\n method: string,\n params: TParams,\n signal?: AbortSignal,\n ): Promise<Response> {\n return this.fetchWithRetry(method, params, signal);\n }\n\n private async fetchWithRetry<TParams>(\n method: string,\n params: TParams,\n callerSignal?: AbortSignal,\n ): Promise<Response> {\n const requestId = ++this.requestId;\n const maxRetries = this.retryableFor(method) ? this.retries : 0;\n\n // jsonrpsee (Rust backend) expects params as an array (positional parameters)\n const request: JsonRpcRequest<TParams[]> = {\n jsonrpc: JSON_RPC_VERSION,\n method,\n params: [params],\n id: requestId,\n };\n\n const body = JSON.stringify(request);\n let lastError: Error | null = null;\n\n for (let attempt = 0; attempt <= maxRetries; attempt++) {\n // Merge caller signal with per-request timeout signal\n const timeoutController = new AbortController();\n const timeoutId = setTimeout(\n () => timeoutController.abort(),\n this.timeout,\n );\n\n const merged = callerSignal\n ? mergeAbortSignals(callerSignal, timeoutController.signal)\n : null;\n const signal = merged ? merged.signal : timeoutController.signal;\n\n try {\n // Build headers per-attempt so the token provider can return a\n // freshly-acquired bearer after a prior invalidate() on this\n // request (retry loop path) without plumbing state through.\n const headers = await this.buildHeaders(method);\n\n const response = await fetch(this.baseUrl, {\n method: \"POST\",\n headers,\n body,\n signal,\n });\n\n clearTimeout(timeoutId);\n merged?.cleanup();\n\n if (!response.ok) {\n const shouldRetry =\n attempt < maxRetries &&\n RETRYABLE_HTTP_STATUS_CODES.has(response.status);\n\n if (shouldRetry) {\n const delay = this.retryDelay * Math.pow(2, attempt);\n await this.sleep(delay, callerSignal);\n continue;\n }\n\n throw new Error(\n `HTTP error: ${response.status} ${response.statusText}`,\n );\n }\n\n return response;\n } catch (error) {\n clearTimeout(timeoutId);\n merged?.cleanup();\n lastError = error instanceof Error ? error : new Error(String(error));\n\n // Check if caller aborted (not our timeout)\n if (callerSignal?.aborted) {\n throw new Error(\"Request aborted\");\n }\n\n if (error instanceof Error && error.name === \"AbortError\") {\n if (attempt < maxRetries) {\n const delay = this.retryDelay * Math.pow(2, attempt);\n await this.sleep(delay, callerSignal);\n continue;\n }\n throw new JsonRpcError(\n JSON_RPC_ERROR_CODES.TIMEOUT,\n `Request timeout after ${this.timeout}ms (${maxRetries + 1} attempts)`,\n \"local\",\n );\n }\n\n // Handle network errors (CORS, connection refused, etc.)\n if (error instanceof TypeError) {\n if (attempt < maxRetries) {\n const delay = this.retryDelay * Math.pow(2, attempt);\n await this.sleep(delay, callerSignal);\n continue;\n }\n throw new JsonRpcError(\n JSON_RPC_ERROR_CODES.NETWORK,\n `Network error: ${error.message} (${maxRetries + 1} attempts)`,\n \"local\",\n );\n }\n\n // Don't retry JSON-RPC errors (business logic errors)\n throw error;\n }\n }\n\n throw lastError || new Error(\"Unknown error after retries\");\n }\n\n private sleep(ms: number, signal?: AbortSignal): Promise<void> {\n return new Promise((resolve, reject) => {\n if (signal?.aborted) {\n reject(new Error(\"Request aborted\"));\n return;\n }\n const timeoutId = setTimeout(() => {\n signal?.removeEventListener(\"abort\", onAbort);\n resolve();\n }, ms);\n const onAbort = () => {\n clearTimeout(timeoutId);\n reject(new Error(\"Request aborted\"));\n };\n signal?.addEventListener(\"abort\", onAbort, { once: true });\n });\n }\n\n getBaseUrl(): string {\n return this.baseUrl;\n }\n}\n\ninterface MergedSignal {\n signal: AbortSignal;\n /** Remove listeners from the source signals. Call after the request completes. */\n cleanup: () => void;\n}\n\n/**\n * Merge two AbortSignals — the returned signal aborts if either input aborts.\n * Returns a cleanup function to remove listeners when the request completes\n * normally, preventing listener accumulation in long-lived polling flows.\n */\nfunction mergeAbortSignals(a: AbortSignal, b: AbortSignal): MergedSignal {\n if (a.aborted) return { signal: a, cleanup: () => {} };\n if (b.aborted) return { signal: b, cleanup: () => {} };\n\n const controller = new AbortController();\n const onAbortA = () => {\n b.removeEventListener(\"abort\", onAbortB);\n controller.abort();\n };\n const onAbortB = () => {\n a.removeEventListener(\"abort\", onAbortA);\n controller.abort();\n };\n a.addEventListener(\"abort\", onAbortA, { once: true });\n b.addEventListener(\"abort\", onAbortB, { once: true });\n\n const cleanup = () => {\n a.removeEventListener(\"abort\", onAbortA);\n b.removeEventListener(\"abort\", onAbortB);\n };\n\n return { signal: controller.signal, cleanup };\n}\n\nasync function readResponseTextWithLimit(\n response: Response,\n maxBytes: number,\n): Promise<string> {\n const contentLength = response.headers.get(\"content-length\");\n if (contentLength !== null) {\n const parsedContentLength = Number(contentLength);\n if (\n Number.isFinite(parsedContentLength) &&\n parsedContentLength > maxBytes\n ) {\n throw responseTooLargeError(maxBytes);\n }\n }\n\n if (!response.body) {\n return \"\";\n }\n\n const reader = response.body.getReader();\n const decoder = new TextDecoder();\n let totalBytes = 0;\n let responseText = \"\";\n\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n if (!value) continue;\n\n totalBytes += value.byteLength;\n if (totalBytes > maxBytes) {\n await reader.cancel();\n throw responseTooLargeError(maxBytes);\n }\n responseText += decoder.decode(value, { stream: true });\n }\n } finally {\n reader.releaseLock();\n }\n\n return responseText + decoder.decode();\n}\n\nfunction responseTooLargeError(maxBytes: number): JsonRpcError {\n return new JsonRpcError(\n JSON_RPC_ERROR_CODES.RESPONSE_TOO_LARGE,\n `JSON-RPC response exceeds maximum size of ${maxBytes} bytes`,\n \"local\",\n );\n}\n","/**\n * Type definitions for Vault Provider JSON-RPC API.\n *\n * These types match the `vaultProvider_*` RPC namespace defined by the\n * btc-vault daemon. They are the SDK's canonical copy of the VP protocol\n * contract, independent of any frontend framework.\n *\n * @see https://github.com/babylonlabs-io/btc-vault/blob/main/docs/pegin.md\n */\n\n// ============================================================================\n// Daemon Status\n// ============================================================================\n\n/**\n * Backend daemon status (vault provider database).\n * Source: btc-vault crates/vaultd/src/workers/claimer/mod.rs PegInStatus enum\n *\n * State flow (happy path):\n * PendingIngestion -> PendingDepositorWotsPK -> PendingBabeSetup -> PendingChallengerPresigning\n * -> PendingPeginSigsAvailability -> PendingPrePegInConfirmations\n * -> PendingDepositorSignatures -> PendingACKs -> PendingActivation -> Activated\n *\n * Terminal / branching states:\n * - Expired: vault timed out before activation\n * - ClaimPosted: claim transaction posted on-chain\n * - PeggedOut: BTC has been returned to the depositor\n */\nexport enum DaemonStatus {\n PENDING_INGESTION = \"PendingIngestion\",\n PENDING_DEPOSITOR_WOTS_PK = \"PendingDepositorWotsPK\",\n PENDING_BABE_SETUP = \"PendingBabeSetup\",\n PENDING_CHALLENGER_PRESIGNING = \"PendingChallengerPresigning\",\n PENDING_PEGIN_SIGS_AVAILABILITY = \"PendingPeginSigsAvailability\",\n PENDING_PRE_PEGIN_CONFIRMATIONS = \"PendingPrePegInConfirmations\",\n PENDING_DEPOSITOR_SIGNATURES = \"PendingDepositorSignatures\",\n PENDING_ACKS = \"PendingACKs\",\n PENDING_ACTIVATION = \"PendingActivation\",\n ACTIVATED = \"Activated\",\n EXPIRED = \"Expired\",\n CLAIM_POSTED = \"ClaimPosted\",\n PEGGED_OUT = \"PeggedOut\",\n}\n\n// ============================================================================\n// Status Groups\n// ============================================================================\n\n/**\n * States where the VP is still processing (no depositor action needed).\n * Excludes PENDING_DEPOSITOR_WOTS_PK (requires depositor action).\n */\nexport const PRE_DEPOSITOR_SIGNATURES_STATES: readonly DaemonStatus[] = [\n DaemonStatus.PENDING_INGESTION,\n DaemonStatus.PENDING_BABE_SETUP,\n DaemonStatus.PENDING_CHALLENGER_PRESIGNING,\n DaemonStatus.PENDING_PEGIN_SIGS_AVAILABILITY,\n DaemonStatus.PENDING_PRE_PEGIN_CONFIRMATIONS,\n];\n\n/** States after PendingDepositorSignatures where the depositor has no action. */\nconst POST_PAYOUT_SIGNATURE_STATUSES: readonly DaemonStatus[] = [\n DaemonStatus.PENDING_ACKS,\n DaemonStatus.PENDING_ACTIVATION,\n DaemonStatus.ACTIVATED,\n];\n\n/**\n * Statuses where no depositor action is needed (VP processing or already past\n * depositor interaction). Excludes PENDING_INGESTION and PENDING_DEPOSITOR_WOTS_PK.\n */\nexport const VP_TRANSIENT_STATUSES: ReadonlySet<DaemonStatus> = new Set([\n DaemonStatus.PENDING_BABE_SETUP,\n DaemonStatus.PENDING_CHALLENGER_PRESIGNING,\n DaemonStatus.PENDING_PEGIN_SIGS_AVAILABILITY,\n DaemonStatus.PENDING_PRE_PEGIN_CONFIRMATIONS,\n ...POST_PAYOUT_SIGNATURE_STATUSES,\n]);\n\n/**\n * Terminal VP statuses where no further progress is possible.\n * If the VP reaches one of these states while polling, polling should\n * stop immediately with an error rather than waiting for timeout.\n */\nexport const VP_TERMINAL_STATUSES: ReadonlySet<DaemonStatus> = new Set([\n DaemonStatus.EXPIRED,\n DaemonStatus.CLAIM_POSTED,\n DaemonStatus.PEGGED_OUT,\n]);\n\n/**\n * Statuses that come after WOTS key submission.\n * If the VP is already in one of these states, the WOTS key was already\n * submitted and we can skip.\n */\nexport const POST_WOTS_STATUSES: ReadonlySet<DaemonStatus> = new Set([\n ...VP_TRANSIENT_STATUSES,\n DaemonStatus.PENDING_DEPOSITOR_SIGNATURES,\n]);\n\n// ============================================================================\n// WOTS Types (needed by SubmitDepositorWotsKeyParams)\n// ============================================================================\n\n/**\n * WOTS configuration for a single block.\n * Matches Rust `babe::wots::Config` serde format.\n */\nexport interface WotsConfig {\n /** Digit bit-width (e.g. 4 → base-16 digits). */\n d: number;\n /** Number of message digits in this block. */\n n: number;\n /** Radix used for the checksum computation. */\n checksum_radix: number;\n}\n\n/**\n * A single block of WOTS public keys.\n * Chain values are arrays of byte values (matching Rust `[u8; 20]`).\n */\nexport interface WotsBlockPublicKey {\n config: WotsConfig;\n message_terminals: number[][];\n checksum_major_terminal: number[];\n checksum_minor_terminal: number[];\n}\n\n// ============================================================================\n// Request Parameter Types\n// ============================================================================\n\n/** Params for requesting the payout/claim/assert transactions to pre-sign. */\nexport interface RequestDepositorPresignTransactionsParams {\n pegin_txid: string;\n depositor_pk: string;\n}\n\n/** Params for submitting the depositor's WOTS public key to the VP. */\nexport interface SubmitDepositorWotsKeyParams {\n pegin_txid: string;\n depositor_pk: string;\n wots_public_keys: WotsBlockPublicKey[];\n}\n\n/** Per-challenger signatures for the depositor-as-claimer flow. */\nexport interface DepositorPreSigsPerChallenger {\n nopayout_signature: string;\n}\n\n/** Depositor-as-claimer pre-signatures (payout + per-challenger). */\nexport interface DepositorAsClaimerPresignatures {\n payout_signatures: ClaimerSignatures;\n per_challenger: Record<string, DepositorPreSigsPerChallenger>;\n}\n\n/** Params for submitting depositor pre-signatures including claimer presignatures. */\nexport interface SubmitDepositorPresignaturesParams {\n pegin_txid: string;\n depositor_pk: string;\n signatures: Record<string, ClaimerSignatures>;\n depositor_claimer_presignatures: DepositorAsClaimerPresignatures;\n}\n\n/** Payout signatures per claimer. */\nexport interface ClaimerSignatures {\n payout_signature: string;\n}\n\n/** Params for requesting BaBe DecryptorArtifacts from the VP. */\nexport interface RequestDepositorClaimerArtifactsParams {\n pegin_txid: string;\n depositor_pk: string;\n}\n\n/** Params for querying pegin status. Either pegin_txid or vault_id must be provided. */\nexport type GetPeginStatusParams =\n | { pegin_txid: string; vault_id?: never }\n | { vault_id: string; pegin_txid?: never };\n\n// ============================================================================\n// Response Types\n// ============================================================================\n\n/** A raw Bitcoin transaction with its hex encoding. */\nexport interface TransactionData {\n tx_hex: string;\n}\n\n/** Set of transactions the depositor must pre-sign for a single claimer. */\nexport interface ClaimerTransactions {\n claimer_pubkey: string;\n claim_tx: TransactionData;\n assert_tx: TransactionData;\n payout_tx: TransactionData;\n payout_psbt: string;\n}\n\n/** Per-segment connector data for ChallengeAssert inputs. */\nexport interface ChallengeAssertConnectorData {\n wots_pks_json: string;\n gc_wots_keys_json: string;\n}\n\n/** Challenger-specific transactions and signing data for the depositor graph. */\nexport interface PresignDataPerChallenger {\n challenger_pubkey: string;\n challenge_assert_x_tx: TransactionData;\n challenge_assert_y_tx: TransactionData;\n nopayout_tx: TransactionData;\n nopayout_psbt: string;\n challenge_assert_connectors: ChallengeAssertConnectorData[];\n output_label_hashes: string[];\n}\n\n/** Depositor-as-claimer TxGraph transactions. */\nexport interface DepositorGraphTransactions {\n claim_tx: TransactionData;\n assert_tx: TransactionData;\n payout_tx: TransactionData;\n payout_psbt: string;\n challenger_presign_data: PresignDataPerChallenger[];\n offchain_params_version: number;\n}\n\n/** Response from `requestDepositorPresignTransactions`. */\nexport interface RequestDepositorPresignTransactionsResponse {\n txs: ClaimerTransactions[];\n depositor_graph: DepositorGraphTransactions;\n}\n\n/** BaBe garbled-circuit session data for a single challenger. */\nexport interface BaBeSessionData {\n decryptor_artifacts_hex: string;\n}\n\n/** Response from `requestDepositorClaimerArtifacts`. */\nexport interface RequestDepositorClaimerArtifactsResponse {\n tx_graph_json: string;\n verifying_key_hex: string;\n babe_sessions: Record<string, BaBeSessionData>;\n}\n\n/** Progress tracker for a multi-challenger operation. */\nexport interface ChallengerProgress {\n total_challengers: number;\n completed_challengers: number;\n completed_challenger_pubkeys: string[];\n pending_challenger_pubkeys: string[];\n}\n\nexport type GcDataProgress = ChallengerProgress;\nexport type AckCollectionProgress = ChallengerProgress;\n\n/** Extended presigning progress with all 3 concurrent phases. */\nexport interface PresigningProgress extends ChallengerProgress {\n depositor_graph_created?: boolean;\n vk_challenger_presigning_completed?: number;\n vk_challenger_presigning_total?: number;\n}\n\n/** Detailed progress breakdown for an in-progress pegin. */\nexport interface PeginProgressDetails {\n gc_data?: GcDataProgress;\n presigning?: PresigningProgress;\n ack_collection?: AckCollectionProgress;\n claimer_graphs?: ClaimerGraphStatus[];\n}\n\n/** Per-claimer graph status (challenger perspective). */\nexport interface ClaimerGraphStatus {\n claimer_pubkey: string;\n presigned: boolean;\n}\n\n/** Response from `getPeginStatus`. */\nexport interface GetPeginStatusResponse {\n pegin_txid: string;\n status: string;\n progress: PeginProgressDetails;\n health_info: string;\n last_error?: string;\n}\n\n// ============================================================================\n// Pegout Types\n// ============================================================================\n\n/** Params for querying pegout status from the VP daemon. */\nexport interface GetPegoutStatusParams {\n pegin_txid: string;\n}\n\n/** Claimer-side pegout progress. */\nexport interface ClaimerPegoutStatus {\n status: string;\n failed: boolean;\n claim_txid?: string;\n claimer_pubkey?: string;\n challenger_pubkey?: string;\n created_at?: string;\n updated_at?: string;\n}\n\n/** Challenger-side pegout progress. */\nexport interface ChallengerPegoutStatus {\n status: string;\n claim_txid?: string;\n claimer_pubkey?: string;\n assert_txid?: string;\n challenge_assert_txid?: string;\n nopayout_txid?: string;\n created_at?: string;\n updated_at?: string;\n}\n\n/** Response from `getPegoutStatus`. */\nexport interface GetPegoutStatusResponse {\n pegin_txid: string;\n found: boolean;\n claimer?: ClaimerPegoutStatus;\n challenger?: ChallengerPegoutStatus;\n}\n\n// ============================================================================\n// Error Codes\n// ============================================================================\n\n/** JSON-RPC error codes returned by the vault provider. */\nexport enum RpcErrorCode {\n DATABASE_ERROR = -32005,\n PRESIGN_ERROR = -32006,\n JSON_SERIALIZATION_ERROR = -32007,\n TX_GRAPH_ERROR = -32008,\n INVALID_GRAPH = -32009,\n VALIDATION_ERROR = -32010,\n NOT_FOUND = -32011,\n INTERNAL_ERROR = -32603,\n}\n"],"names":["BTCVaultRegistryABI","JsonRpcError","code","message","source","data","JSON_RPC_ERROR_CODES","JSON_RPC_VERSION","DEFAULT_RETRY_ATTEMPTS","DEFAULT_RETRY_DELAY_MS","DEFAULT_MAX_RESPONSE_BYTES","UNCAPPED_TYPED_RESPONSE_METHODS","RETRYABLE_HTTP_STATUS_CODES","DEFAULT_RETRYABLE_METHODS","defaultRetryableFor","method","AUTH_EXPIRED_DATA_KIND","isAuthExpiredError","error","JsonRpcClient","config","__publicField","headers","token","params","signal","response","jsonResponse","responseText","readResponseTextWithLimit","rpcResponse","err","callerSignal","requestId","maxRetries","body","lastError","attempt","timeoutController","timeoutId","merged","mergeAbortSignals","delay","ms","resolve","reject","onAbort","a","b","controller","onAbortA","onAbortB","cleanup","maxBytes","contentLength","parsedContentLength","responseTooLargeError","reader","decoder","totalBytes","done","value","DaemonStatus","PRE_DEPOSITOR_SIGNATURES_STATES","POST_PAYOUT_SIGNATURE_STATUSES","VP_TRANSIENT_STATUSES","VP_TERMINAL_STATUSES","POST_WOTS_STATUSES","RpcErrorCode"],"mappings":";;;AAaO,MAAMA,IAAsB;AAAA,EACjC;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,M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