@babylonlabs-io/ts-sdk 6.2.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{primeVpAuth-Ch-ig2My.cjs → primeVpAuth-36ayVa21.cjs} +2 -2
- package/dist/{primeVpAuth-Ch-ig2My.cjs.map → primeVpAuth-36ayVa21.cjs.map} +1 -1
- package/dist/{primeVpAuth-B0noJdcy.js → primeVpAuth-P-KTmNKb.js} +260 -251
- package/dist/{primeVpAuth-B0noJdcy.js.map → primeVpAuth-P-KTmNKb.js.map} +1 -1
- package/dist/tbv/core/clients/index.cjs +1 -1
- package/dist/tbv/core/clients/index.js +1 -1
- package/dist/tbv/core/clients/vault-provider/auth/tokenProvider.d.ts +7 -0
- package/dist/tbv/core/clients/vault-provider/auth/tokenProvider.d.ts.map +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
var Q = Object.defineProperty;
|
|
2
|
-
var Z = (
|
|
3
|
-
var u = (
|
|
4
|
-
import { s as b, S as ee, h as
|
|
5
|
-
import { V as
|
|
2
|
+
var Z = (r, e, t) => e in r ? Q(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var u = (r, e, t) => Z(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { s as b, S as ee, h as te, p as J } from "./bitcoin-C-TuHb-v.js";
|
|
5
|
+
import { V as re } from "./index-B-9aXMxk.js";
|
|
6
6
|
import { a as ne } from "./state-CFn1rT74.js";
|
|
7
7
|
import * as V from "@bitcoin-js/tiny-secp256k1-asmjs";
|
|
8
8
|
import { X as k, H as _, C as D } from "./validation-OSC0xTHB.js";
|
|
9
9
|
import { v as ie } from "./bip322Verify-BXYrHBh8.js";
|
|
10
10
|
import { s as se } from "./sha2-YqVHJiFj.js";
|
|
11
|
-
function S(
|
|
12
|
-
const
|
|
11
|
+
function S(r, e) {
|
|
12
|
+
const t = (r & 7) << 5, n = typeof e == "bigint" ? e : BigInt(e);
|
|
13
13
|
if (n < 0n) throw new Error("cborHead: negative argument");
|
|
14
|
-
if (n < 24n) return new Uint8Array([
|
|
15
|
-
if (n < 0x100n) return new Uint8Array([
|
|
14
|
+
if (n < 24n) return new Uint8Array([t | Number(n)]);
|
|
15
|
+
if (n < 0x100n) return new Uint8Array([t | 24, Number(n)]);
|
|
16
16
|
if (n < 0x10000n) {
|
|
17
17
|
const i = Number(n);
|
|
18
|
-
return new Uint8Array([
|
|
18
|
+
return new Uint8Array([t | 25, i >>> 8 & 255, i & 255]);
|
|
19
19
|
}
|
|
20
20
|
if (n < 0x100000000n) {
|
|
21
21
|
const i = Number(n);
|
|
22
22
|
return new Uint8Array([
|
|
23
|
-
|
|
23
|
+
t | 26,
|
|
24
24
|
i >>> 24 & 255,
|
|
25
25
|
i >>> 16 & 255,
|
|
26
26
|
i >>> 8 & 255,
|
|
@@ -28,124 +28,124 @@ function S(t, e) {
|
|
|
28
28
|
]);
|
|
29
29
|
}
|
|
30
30
|
const s = new Uint8Array(9);
|
|
31
|
-
s[0] =
|
|
31
|
+
s[0] = t | 27;
|
|
32
32
|
for (let i = 7; i >= 0; i--)
|
|
33
33
|
s[1 + i] = Number(n >> BigInt((7 - i) * 8)) & 255;
|
|
34
34
|
return s;
|
|
35
35
|
}
|
|
36
|
-
function j(...
|
|
37
|
-
const e =
|
|
36
|
+
function j(...r) {
|
|
37
|
+
const e = r.reduce((s, i) => s + i.length, 0), t = new Uint8Array(e);
|
|
38
38
|
let n = 0;
|
|
39
|
-
for (const s of
|
|
40
|
-
|
|
41
|
-
return
|
|
39
|
+
for (const s of r)
|
|
40
|
+
t.set(s, n), n += s.length;
|
|
41
|
+
return t;
|
|
42
42
|
}
|
|
43
|
-
function I(
|
|
44
|
-
const
|
|
45
|
-
for (const n of
|
|
46
|
-
|
|
47
|
-
return j(...
|
|
43
|
+
function I(r) {
|
|
44
|
+
const t = [S(4, r.length)];
|
|
45
|
+
for (const n of r)
|
|
46
|
+
t.push(S(0, n));
|
|
47
|
+
return j(...t);
|
|
48
48
|
}
|
|
49
|
-
function oe(
|
|
50
|
-
if (!Number.isSafeInteger(
|
|
49
|
+
function oe(r, e, t) {
|
|
50
|
+
if (!Number.isSafeInteger(t) || t < 0)
|
|
51
51
|
throw new Error(
|
|
52
|
-
`encodeServerIdentityPayload: expires_at must be a non-negative safe integer, got ${
|
|
52
|
+
`encodeServerIdentityPayload: expires_at must be a non-negative safe integer, got ${t}`
|
|
53
53
|
);
|
|
54
|
-
const n = S(4, 3), s = I(
|
|
54
|
+
const n = S(4, 3), s = I(r), i = I(e), o = S(0, t);
|
|
55
55
|
return j(n, s, i, o);
|
|
56
56
|
}
|
|
57
|
-
const
|
|
57
|
+
const ce = new TextEncoder().encode(
|
|
58
58
|
"btc-auth.server-identity.v1"
|
|
59
|
-
),
|
|
60
|
-
class
|
|
61
|
-
constructor(e,
|
|
62
|
-
super(e), this.reason =
|
|
59
|
+
), ae = 2 * 3600;
|
|
60
|
+
class h extends Error {
|
|
61
|
+
constructor(e, t) {
|
|
62
|
+
super(e), this.reason = t, this.name = "ServerIdentityError";
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
function v(
|
|
66
|
-
const e = new Uint8Array(
|
|
67
|
-
for (let
|
|
68
|
-
e[
|
|
65
|
+
function v(r) {
|
|
66
|
+
const e = new Uint8Array(r.length / 2);
|
|
67
|
+
for (let t = 0; t < e.length; t++)
|
|
68
|
+
e[t] = parseInt(r.slice(t * 2, t * 2 + 2), 16);
|
|
69
69
|
return e;
|
|
70
70
|
}
|
|
71
|
-
function de(
|
|
72
|
-
const { proof: e, pinnedServerPubkey:
|
|
71
|
+
function de(r) {
|
|
72
|
+
const { proof: e, pinnedServerPubkey: t, now: n } = r, s = r.maxLifetimeSecs ?? ae, i = b(t).toLowerCase();
|
|
73
73
|
if (i.length !== k || !_.test(i))
|
|
74
|
-
throw new
|
|
74
|
+
throw new h(
|
|
75
75
|
`pinnedServerPubkey must be 32-byte hex; got ${i.length} chars`,
|
|
76
76
|
"invalid_pubkey_encoding"
|
|
77
77
|
);
|
|
78
78
|
const o = b(e.server_pubkey).toLowerCase();
|
|
79
79
|
if (o.length !== k || !_.test(o))
|
|
80
|
-
throw new
|
|
80
|
+
throw new h(
|
|
81
81
|
`server_pubkey must be 32-byte hex; got ${o.length} chars`,
|
|
82
82
|
"invalid_pubkey_encoding"
|
|
83
83
|
);
|
|
84
84
|
if (o !== i)
|
|
85
|
-
throw new
|
|
85
|
+
throw new h(
|
|
86
86
|
`server_pubkey does not match pinned value: expected ${i}, got ${o}`,
|
|
87
87
|
"pinned_pubkey_mismatch"
|
|
88
88
|
);
|
|
89
89
|
if (!Number.isSafeInteger(e.expires_at))
|
|
90
|
-
throw new
|
|
90
|
+
throw new h(
|
|
91
91
|
`expires_at must be a finite integer; got ${JSON.stringify(e.expires_at)}`,
|
|
92
92
|
"invalid_expires_at"
|
|
93
93
|
);
|
|
94
94
|
if (!Number.isSafeInteger(n))
|
|
95
|
-
throw new
|
|
95
|
+
throw new h(
|
|
96
96
|
`now must be a finite integer; got ${JSON.stringify(n)}`,
|
|
97
97
|
"invalid_expires_at"
|
|
98
98
|
);
|
|
99
99
|
if (e.expires_at <= n)
|
|
100
|
-
throw new
|
|
100
|
+
throw new h(
|
|
101
101
|
`server identity proof expired at ${e.expires_at}, now ${n}`,
|
|
102
102
|
"expired"
|
|
103
103
|
);
|
|
104
104
|
if (!Number.isSafeInteger(s) || s <= 0)
|
|
105
|
-
throw new
|
|
105
|
+
throw new h(
|
|
106
106
|
`maxLifetimeSecs must be a positive safe integer; got ${JSON.stringify(s)}`,
|
|
107
107
|
"invalid_max_lifetime"
|
|
108
108
|
);
|
|
109
109
|
if (e.expires_at - n > s)
|
|
110
|
-
throw new
|
|
110
|
+
throw new h(
|
|
111
111
|
`server identity proof expires too far in the future: expires_at=${e.expires_at}, now=${n}, max lifetime=${s}s`,
|
|
112
112
|
"expires_too_far"
|
|
113
113
|
);
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
116
|
-
throw new
|
|
117
|
-
`ephemeral_pubkey must be 33-byte compressed hex; got ${
|
|
114
|
+
const a = b(e.ephemeral_pubkey).toLowerCase();
|
|
115
|
+
if (a.length !== D || !_.test(a))
|
|
116
|
+
throw new h(
|
|
117
|
+
`ephemeral_pubkey must be 33-byte compressed hex; got ${a.length} chars`,
|
|
118
118
|
"invalid_ephemeral_pubkey"
|
|
119
119
|
);
|
|
120
|
-
const y =
|
|
120
|
+
const y = a.slice(0, 2);
|
|
121
121
|
if (y !== "02" && y !== "03")
|
|
122
|
-
throw new
|
|
122
|
+
throw new h(
|
|
123
123
|
`ephemeral_pubkey must be compressed (prefix 02/03); got ${y}`,
|
|
124
124
|
"invalid_ephemeral_pubkey"
|
|
125
125
|
);
|
|
126
|
-
const l = v(
|
|
126
|
+
const l = v(a);
|
|
127
127
|
if (!V.isPoint(l))
|
|
128
|
-
throw new
|
|
128
|
+
throw new h(
|
|
129
129
|
"ephemeral_pubkey is not a valid secp256k1 point",
|
|
130
130
|
"invalid_ephemeral_pubkey"
|
|
131
131
|
);
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
134
|
-
throw new
|
|
135
|
-
`signature must be 64-byte Schnorr hex; got ${
|
|
132
|
+
const p = b(e.signature).toLowerCase();
|
|
133
|
+
if (p.length !== ee || !_.test(p))
|
|
134
|
+
throw new h(
|
|
135
|
+
`signature must be 64-byte Schnorr hex; got ${p.length} chars`,
|
|
136
136
|
"invalid_signature_encoding"
|
|
137
137
|
);
|
|
138
138
|
const f = oe(
|
|
139
|
-
|
|
140
|
-
v(
|
|
139
|
+
ce,
|
|
140
|
+
v(a),
|
|
141
141
|
e.expires_at
|
|
142
142
|
);
|
|
143
143
|
if (!ie(
|
|
144
144
|
f,
|
|
145
145
|
v(o),
|
|
146
|
-
v(
|
|
146
|
+
v(p)
|
|
147
147
|
))
|
|
148
|
-
throw new
|
|
148
|
+
throw new h(
|
|
149
149
|
"BIP-322 signature verification failed — ephemeral key is not attested by pinned server pubkey",
|
|
150
150
|
"signature_verification_failed"
|
|
151
151
|
);
|
|
@@ -154,15 +154,15 @@ const ue = /* @__PURE__ */ new Set([
|
|
|
154
154
|
"vaultProvider_submitDepositorWotsKey",
|
|
155
155
|
"vaultProvider_submitDepositorPresignatures",
|
|
156
156
|
"vaultProvider_requestDepositorPresignTransactions"
|
|
157
|
-
]),
|
|
157
|
+
]), pe = /* @__PURE__ */ new Set([
|
|
158
158
|
"vaultProvider_requestDepositorClaimerArtifacts"
|
|
159
|
-
]),
|
|
160
|
-
function F(
|
|
159
|
+
]), he = 6e4, C = "auth_createDepositorToken", R = "auth_createDepositorTokenGrpc";
|
|
160
|
+
function F(r, e) {
|
|
161
161
|
return new ne({
|
|
162
|
-
baseUrl:
|
|
163
|
-
timeout:
|
|
162
|
+
baseUrl: r,
|
|
163
|
+
timeout: he,
|
|
164
164
|
headers: e,
|
|
165
|
-
retryableFor: (
|
|
165
|
+
retryableFor: (t) => t === C || t === R
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
const le = 0, ye = 1, m = 2, ge = 3, fe = 4, _e = 5, be = 6, we = 7, M = 24, xe = 28, ve = 20, ke = 21, Se = 22, N = 256;
|
|
@@ -190,9 +190,9 @@ class K {
|
|
|
190
190
|
* lengths, tags, or timestamps approach that bound.
|
|
191
191
|
*/
|
|
192
192
|
readHead() {
|
|
193
|
-
const e = this.nextByte(),
|
|
193
|
+
const e = this.nextByte(), t = e >> 5, n = e & 31;
|
|
194
194
|
if (n < M)
|
|
195
|
-
return { major:
|
|
195
|
+
return { major: t, arg: n };
|
|
196
196
|
if (n >= xe)
|
|
197
197
|
throw new g(
|
|
198
198
|
`unsupported additional info ${n} (indefinite-length or reserved)`
|
|
@@ -203,14 +203,14 @@ class K {
|
|
|
203
203
|
i = i << 8n | BigInt(this.nextByte());
|
|
204
204
|
if (i > BigInt(Number.MAX_SAFE_INTEGER))
|
|
205
205
|
throw new g(`argument ${i} exceeds safe integer range`);
|
|
206
|
-
return { major:
|
|
206
|
+
return { major: t, arg: Number(i) };
|
|
207
207
|
}
|
|
208
208
|
/** Read `length` raw bytes as a sub-array view into the backing buffer. */
|
|
209
209
|
readBytes(e) {
|
|
210
210
|
if (this.pos + e > this.buf.length)
|
|
211
211
|
throw new g("length overruns end of input");
|
|
212
|
-
const
|
|
213
|
-
return this.pos += e,
|
|
212
|
+
const t = this.buf.subarray(this.pos, this.pos + e);
|
|
213
|
+
return this.pos += e, t;
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
216
|
* Read a byte string (major type 2), returning its content bytes.
|
|
@@ -236,141 +236,141 @@ class K {
|
|
|
236
236
|
throw new g(
|
|
237
237
|
`nesting exceeds maximum depth ${N}`
|
|
238
238
|
);
|
|
239
|
-
const
|
|
240
|
-
switch (
|
|
239
|
+
const t = this.readHead();
|
|
240
|
+
switch (t.major) {
|
|
241
241
|
case le:
|
|
242
|
-
return
|
|
242
|
+
return t.arg;
|
|
243
243
|
case ye:
|
|
244
|
-
return -1 -
|
|
244
|
+
return -1 - t.arg;
|
|
245
245
|
case m:
|
|
246
|
-
return this.readBytes(
|
|
246
|
+
return this.readBytes(t.arg);
|
|
247
247
|
case ge:
|
|
248
248
|
return new TextDecoder("utf-8", { fatal: !0 }).decode(
|
|
249
|
-
this.readBytes(
|
|
249
|
+
this.readBytes(t.arg)
|
|
250
250
|
);
|
|
251
251
|
case fe: {
|
|
252
252
|
const n = [];
|
|
253
|
-
for (let s = 0; s <
|
|
253
|
+
for (let s = 0; s < t.arg; s++)
|
|
254
254
|
n.push(this.readValue(e + 1));
|
|
255
255
|
return n;
|
|
256
256
|
}
|
|
257
257
|
case _e: {
|
|
258
258
|
const n = /* @__PURE__ */ new Map();
|
|
259
|
-
for (let s = 0; s <
|
|
259
|
+
for (let s = 0; s < t.arg; s++) {
|
|
260
260
|
const i = this.readValue(e + 1), o = this.readValue(e + 1);
|
|
261
261
|
n.set(i, o);
|
|
262
262
|
}
|
|
263
263
|
return n;
|
|
264
264
|
}
|
|
265
265
|
case be:
|
|
266
|
-
return { tag:
|
|
266
|
+
return { tag: t.arg, value: this.readValue(e + 1) };
|
|
267
267
|
case we:
|
|
268
|
-
if (
|
|
269
|
-
if (
|
|
270
|
-
if (
|
|
268
|
+
if (t.arg === ve) return !1;
|
|
269
|
+
if (t.arg === ke) return !0;
|
|
270
|
+
if (t.arg === Se) return null;
|
|
271
271
|
throw new g(
|
|
272
|
-
`unsupported simple/float value ${
|
|
272
|
+
`unsupported simple/float value ${t.arg}`
|
|
273
273
|
);
|
|
274
274
|
default:
|
|
275
|
-
throw new g(`unsupported major type ${
|
|
275
|
+
throw new g(`unsupported major type ${t.major}`);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
|
-
function q(
|
|
280
|
-
const e = new K(
|
|
281
|
-
if (e.pos !==
|
|
279
|
+
function q(r) {
|
|
280
|
+
const e = new K(r), t = e.readValue();
|
|
281
|
+
if (e.pos !== r.length)
|
|
282
282
|
throw new g("trailing bytes after top-level item");
|
|
283
|
-
return
|
|
283
|
+
return t;
|
|
284
284
|
}
|
|
285
285
|
const Ae = "vaultd-jsonrpc", Pe = "vaultd-grpc", L = 18, O = 4, B = -47, me = 1, H = 64, Ee = 128, Te = 96, Ce = 64, Re = 1, Oe = 2, $e = 3, Ie = 4, Me = 5, Ne = 6, Le = 7, G = new TextEncoder().encode("Signature1");
|
|
286
|
-
class
|
|
287
|
-
constructor(e,
|
|
288
|
-
super(e), this.reason =
|
|
286
|
+
class c extends Error {
|
|
287
|
+
constructor(e, t) {
|
|
288
|
+
super(e), this.reason = t, this.name = "CwtVerificationError";
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
function Be(
|
|
291
|
+
function Be(r) {
|
|
292
292
|
const e = X(
|
|
293
|
-
|
|
293
|
+
r.expectedIssuerXOnlyPubkey,
|
|
294
294
|
"expectedIssuerXOnlyPubkey"
|
|
295
|
-
),
|
|
296
|
-
|
|
295
|
+
), t = X(
|
|
296
|
+
r.expectedAudienceXOnlyPubkey,
|
|
297
297
|
"expectedAudienceXOnlyPubkey"
|
|
298
|
-
), n = Je(
|
|
298
|
+
), n = Je(r.ephemeralPubkeyHex), s = De(r.token), i = new K(s), o = i.readHead();
|
|
299
299
|
if (o.major !== 6 || o.arg !== L)
|
|
300
|
-
throw new
|
|
300
|
+
throw new c(
|
|
301
301
|
`token is not a COSE Sign1 tagged value (tag ${L})`,
|
|
302
302
|
"invalid_token_structure"
|
|
303
303
|
);
|
|
304
|
-
const
|
|
305
|
-
if (
|
|
306
|
-
throw new
|
|
304
|
+
const a = i.readHead();
|
|
305
|
+
if (a.major !== 4 || a.arg !== O)
|
|
306
|
+
throw new c(
|
|
307
307
|
`COSE Sign1 must be a ${O}-element array`,
|
|
308
308
|
"invalid_token_structure"
|
|
309
309
|
);
|
|
310
|
-
const y = i.pos, l = i.readByteString(),
|
|
310
|
+
const y = i.pos, l = i.readByteString(), p = s.subarray(y, i.pos);
|
|
311
311
|
i.readValue();
|
|
312
312
|
const f = i.pos, w = i.readByteString(), A = s.subarray(f, i.pos), P = i.readByteString();
|
|
313
313
|
if (P.length !== H)
|
|
314
|
-
throw new
|
|
314
|
+
throw new c(
|
|
315
315
|
`COSE signature must be ${H} bytes, got ${P.length}`,
|
|
316
316
|
"invalid_token_structure"
|
|
317
317
|
);
|
|
318
318
|
if (i.pos !== s.length)
|
|
319
|
-
throw new
|
|
319
|
+
throw new c(
|
|
320
320
|
"COSE Sign1 token has trailing bytes after the signature",
|
|
321
321
|
"invalid_token_structure"
|
|
322
322
|
);
|
|
323
323
|
const $ = He(l);
|
|
324
324
|
if ($ !== B)
|
|
325
|
-
throw new
|
|
325
|
+
throw new c(
|
|
326
326
|
`unexpected COSE algorithm ${$} (expected ES256K ${B})`,
|
|
327
327
|
"unexpected_algorithm"
|
|
328
328
|
);
|
|
329
|
-
const Y = Ge(
|
|
329
|
+
const Y = Ge(p, A), z = se(Y);
|
|
330
330
|
if (!V.verify(z, n, P, !0))
|
|
331
|
-
throw new
|
|
331
|
+
throw new c(
|
|
332
332
|
"COSE signature does not verify against the server's ephemeral key",
|
|
333
333
|
"signature_verification_failed"
|
|
334
334
|
);
|
|
335
335
|
const d = Xe(w), x = d.audience.toLowerCase();
|
|
336
336
|
if (x.length !== k || !_.test(x))
|
|
337
|
-
throw new
|
|
337
|
+
throw new c(
|
|
338
338
|
"token `aud` is not a 32-byte x-only pubkey hex",
|
|
339
339
|
"invalid_claims"
|
|
340
340
|
);
|
|
341
341
|
if (d.issuedAt > d.expiresAt)
|
|
342
|
-
throw new
|
|
342
|
+
throw new c(
|
|
343
343
|
`token iat (${d.issuedAt}) is after exp (${d.expiresAt})`,
|
|
344
344
|
"invalid_claims"
|
|
345
345
|
);
|
|
346
346
|
if (d.issuer.toLowerCase() !== e)
|
|
347
|
-
throw new
|
|
347
|
+
throw new c(
|
|
348
348
|
`token issuer does not match pinned server pubkey: expected ${e}, got ${d.issuer.toLowerCase()}`,
|
|
349
349
|
"issuer_mismatch"
|
|
350
350
|
);
|
|
351
|
-
if (d.subject !==
|
|
352
|
-
throw new
|
|
353
|
-
`token subject mismatch: expected ${
|
|
351
|
+
if (d.subject !== r.expectedSubject)
|
|
352
|
+
throw new c(
|
|
353
|
+
`token subject mismatch: expected ${r.expectedSubject}, got ${d.subject}`,
|
|
354
354
|
"subject_mismatch"
|
|
355
355
|
);
|
|
356
|
-
if (x !==
|
|
357
|
-
throw new
|
|
358
|
-
`token audience does not match depositor pubkey: expected ${
|
|
356
|
+
if (x !== t)
|
|
357
|
+
throw new c(
|
|
358
|
+
`token audience does not match depositor pubkey: expected ${t}, got ${x}`,
|
|
359
359
|
"audience_mismatch"
|
|
360
360
|
);
|
|
361
|
-
if (d.expiresAt <=
|
|
362
|
-
throw new
|
|
363
|
-
`token expired: exp ${d.expiresAt} <= now ${
|
|
361
|
+
if (d.expiresAt <= r.now)
|
|
362
|
+
throw new c(
|
|
363
|
+
`token expired: exp ${d.expiresAt} <= now ${r.now}`,
|
|
364
364
|
"token_expired"
|
|
365
365
|
);
|
|
366
|
-
if (
|
|
367
|
-
throw new
|
|
368
|
-
`response expires_at (${
|
|
366
|
+
if (r.responseExpiresAt !== d.expiresAt)
|
|
367
|
+
throw new c(
|
|
368
|
+
`response expires_at (${r.responseExpiresAt}) does not equal token exp (${d.expiresAt})`,
|
|
369
369
|
"expiry_mismatch"
|
|
370
370
|
);
|
|
371
|
-
if (
|
|
372
|
-
throw new
|
|
373
|
-
`server identity expires (${
|
|
371
|
+
if (r.serverIdentityExpiresAt < d.expiresAt)
|
|
372
|
+
throw new c(
|
|
373
|
+
`server identity expires (${r.serverIdentityExpiresAt}) before token exp (${d.expiresAt})`,
|
|
374
374
|
"server_identity_expires_before_token"
|
|
375
375
|
);
|
|
376
376
|
return {
|
|
@@ -382,45 +382,45 @@ function Be(t) {
|
|
|
382
382
|
issuedAt: d.issuedAt
|
|
383
383
|
};
|
|
384
384
|
}
|
|
385
|
-
function He(
|
|
386
|
-
if (
|
|
387
|
-
throw new
|
|
385
|
+
function He(r) {
|
|
386
|
+
if (r.length === 0)
|
|
387
|
+
throw new c(
|
|
388
388
|
"empty COSE protected header (no algorithm)",
|
|
389
389
|
"unexpected_algorithm"
|
|
390
390
|
);
|
|
391
|
-
const e = q(
|
|
391
|
+
const e = q(r);
|
|
392
392
|
if (!(e instanceof Map))
|
|
393
|
-
throw new
|
|
393
|
+
throw new c(
|
|
394
394
|
"COSE protected header is not a map",
|
|
395
395
|
"invalid_token_structure"
|
|
396
396
|
);
|
|
397
|
-
const
|
|
398
|
-
if (typeof
|
|
399
|
-
throw new
|
|
397
|
+
const t = e.get(me);
|
|
398
|
+
if (typeof t != "number")
|
|
399
|
+
throw new c(
|
|
400
400
|
"COSE protected header missing integer algorithm label",
|
|
401
401
|
"unexpected_algorithm"
|
|
402
402
|
);
|
|
403
|
-
return
|
|
403
|
+
return t;
|
|
404
404
|
}
|
|
405
|
-
function Ge(
|
|
405
|
+
function Ge(r, e) {
|
|
406
406
|
return je(
|
|
407
407
|
Uint8Array.of(Ee | O),
|
|
408
408
|
Uint8Array.of(Te | G.length),
|
|
409
409
|
G,
|
|
410
|
-
|
|
410
|
+
r,
|
|
411
411
|
Uint8Array.of(Ce),
|
|
412
412
|
e
|
|
413
413
|
);
|
|
414
414
|
}
|
|
415
|
-
function Xe(
|
|
416
|
-
const e = q(
|
|
415
|
+
function Xe(r) {
|
|
416
|
+
const e = q(r);
|
|
417
417
|
if (!(e instanceof Map))
|
|
418
|
-
throw new
|
|
418
|
+
throw new c(
|
|
419
419
|
"CWT claims root is not a map",
|
|
420
420
|
"invalid_claims"
|
|
421
421
|
);
|
|
422
422
|
if (Ue(e, Le, "cti").length === 0)
|
|
423
|
-
throw new
|
|
423
|
+
throw new c("token cti is empty", "invalid_claims");
|
|
424
424
|
return {
|
|
425
425
|
issuer: E(e, Re, "iss"),
|
|
426
426
|
subject: E(e, Oe, "sub"),
|
|
@@ -430,93 +430,93 @@ function Xe(t) {
|
|
|
430
430
|
issuedAt: T(e, Ne, "iat")
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
|
-
function E(
|
|
434
|
-
const n =
|
|
433
|
+
function E(r, e, t) {
|
|
434
|
+
const n = r.get(e);
|
|
435
435
|
if (typeof n != "string")
|
|
436
|
-
throw new
|
|
437
|
-
`token claim ${
|
|
436
|
+
throw new c(
|
|
437
|
+
`token claim ${t} is missing or not a text string`,
|
|
438
438
|
"invalid_claims"
|
|
439
439
|
);
|
|
440
440
|
return n;
|
|
441
441
|
}
|
|
442
|
-
function Ue(
|
|
443
|
-
const n =
|
|
442
|
+
function Ue(r, e, t) {
|
|
443
|
+
const n = r.get(e);
|
|
444
444
|
if (!(n instanceof Uint8Array))
|
|
445
|
-
throw new
|
|
446
|
-
`token claim ${
|
|
445
|
+
throw new c(
|
|
446
|
+
`token claim ${t} is missing or not a byte string`,
|
|
447
447
|
"invalid_claims"
|
|
448
448
|
);
|
|
449
449
|
return n;
|
|
450
450
|
}
|
|
451
|
-
function T(
|
|
452
|
-
const n =
|
|
451
|
+
function T(r, e, t) {
|
|
452
|
+
const n = r.get(e);
|
|
453
453
|
if (typeof n != "number" || !Number.isSafeInteger(n) || n < 0)
|
|
454
|
-
throw new
|
|
455
|
-
`token claim ${
|
|
454
|
+
throw new c(
|
|
455
|
+
`token claim ${t} is missing or not a non-negative integer timestamp`,
|
|
456
456
|
"invalid_claims"
|
|
457
457
|
);
|
|
458
458
|
return n;
|
|
459
459
|
}
|
|
460
|
-
function X(
|
|
461
|
-
const
|
|
462
|
-
if (
|
|
463
|
-
throw new
|
|
464
|
-
`${e} must be 32-byte x-only hex; got ${
|
|
460
|
+
function X(r, e) {
|
|
461
|
+
const t = b(r).toLowerCase();
|
|
462
|
+
if (t.length !== k || !_.test(t))
|
|
463
|
+
throw new c(
|
|
464
|
+
`${e} must be 32-byte x-only hex; got ${t.length} chars`,
|
|
465
465
|
"invalid_input"
|
|
466
466
|
);
|
|
467
|
-
return
|
|
467
|
+
return t;
|
|
468
468
|
}
|
|
469
|
-
function Je(
|
|
470
|
-
const e = b(
|
|
471
|
-
if (e.length !== D || !_.test(e) ||
|
|
472
|
-
throw new
|
|
469
|
+
function Je(r) {
|
|
470
|
+
const e = b(r).toLowerCase(), t = e.slice(0, 2);
|
|
471
|
+
if (e.length !== D || !_.test(e) || t !== "02" && t !== "03")
|
|
472
|
+
throw new c(
|
|
473
473
|
"ephemeralPubkeyHex must be 33-byte compressed pubkey hex (prefix 02/03)",
|
|
474
474
|
"invalid_input"
|
|
475
475
|
);
|
|
476
|
-
return
|
|
476
|
+
return te(e);
|
|
477
477
|
}
|
|
478
478
|
const Ve = (() => {
|
|
479
|
-
const
|
|
480
|
-
for (let
|
|
481
|
-
|
|
482
|
-
return
|
|
479
|
+
const r = new Int16Array(128).fill(-1), e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
480
|
+
for (let t = 0; t < e.length; t++)
|
|
481
|
+
r[e.charCodeAt(t)] = t;
|
|
482
|
+
return r;
|
|
483
483
|
})();
|
|
484
|
-
function De(
|
|
485
|
-
const e =
|
|
484
|
+
function De(r) {
|
|
485
|
+
const e = r.length, t = Math.floor(e / 4), n = e % 4;
|
|
486
486
|
if (n === 1)
|
|
487
|
-
throw new
|
|
487
|
+
throw new c(
|
|
488
488
|
"invalid base64url length",
|
|
489
489
|
"invalid_token_structure"
|
|
490
490
|
);
|
|
491
|
-
const s =
|
|
492
|
-
const
|
|
493
|
-
if (
|
|
494
|
-
throw new
|
|
491
|
+
const s = t * 3 + (n === 0 ? 0 : n - 1), i = new Uint8Array(s), o = (l) => {
|
|
492
|
+
const p = l < 128 ? Ve[l] : -1;
|
|
493
|
+
if (p < 0)
|
|
494
|
+
throw new c(
|
|
495
495
|
"invalid base64url character",
|
|
496
496
|
"invalid_token_structure"
|
|
497
497
|
);
|
|
498
|
-
return
|
|
498
|
+
return p;
|
|
499
499
|
};
|
|
500
|
-
let
|
|
501
|
-
for (let l = 0; l <
|
|
502
|
-
const
|
|
503
|
-
i[y++] =
|
|
500
|
+
let a = 0, y = 0;
|
|
501
|
+
for (let l = 0; l < t; l++) {
|
|
502
|
+
const p = o(r.charCodeAt(a++)), f = o(r.charCodeAt(a++)), w = o(r.charCodeAt(a++)), A = o(r.charCodeAt(a++));
|
|
503
|
+
i[y++] = p << 2 | f >> 4, i[y++] = (f & 15) << 4 | w >> 2, i[y++] = (w & 3) << 6 | A;
|
|
504
504
|
}
|
|
505
505
|
if (n === 2) {
|
|
506
|
-
const l = o(
|
|
507
|
-
i[y++] = l << 2 |
|
|
506
|
+
const l = o(r.charCodeAt(a++)), p = o(r.charCodeAt(a++));
|
|
507
|
+
i[y++] = l << 2 | p >> 4;
|
|
508
508
|
} else if (n === 3) {
|
|
509
|
-
const l = o(
|
|
510
|
-
i[y++] = l << 2 |
|
|
509
|
+
const l = o(r.charCodeAt(a++)), p = o(r.charCodeAt(a++)), f = o(r.charCodeAt(a++));
|
|
510
|
+
i[y++] = l << 2 | p >> 4, i[y++] = (p & 15) << 4 | f >> 2;
|
|
511
511
|
}
|
|
512
512
|
return i;
|
|
513
513
|
}
|
|
514
|
-
function je(...
|
|
515
|
-
const e =
|
|
514
|
+
function je(...r) {
|
|
515
|
+
const e = r.reduce((s, i) => s + i.length, 0), t = new Uint8Array(e);
|
|
516
516
|
let n = 0;
|
|
517
|
-
for (const s of
|
|
518
|
-
|
|
519
|
-
return
|
|
517
|
+
for (const s of r)
|
|
518
|
+
t.set(s, n), n += s.length;
|
|
519
|
+
return t;
|
|
520
520
|
}
|
|
521
521
|
const U = 4102444800, Fe = 30;
|
|
522
522
|
class Ke {
|
|
@@ -564,6 +564,15 @@ class Ke {
|
|
|
564
564
|
async getToken(e) {
|
|
565
565
|
return e === C || e === R ? null : this.grpcGatedMethods.has(e) ? this.getTokenForSubject("grpc") : this.authGatedMethods.has(e) ? this.getTokenForSubject("jsonrpc") : null;
|
|
566
566
|
}
|
|
567
|
+
/**
|
|
568
|
+
* Return the JSON-RPC-subject bearer (`auth_createDepositorToken`).
|
|
569
|
+
*
|
|
570
|
+
* For VP routes that are not JSON-RPC methods but accept this bearer,
|
|
571
|
+
* such as the HTTP depositor artifact downloads.
|
|
572
|
+
*/
|
|
573
|
+
getJsonRpcToken() {
|
|
574
|
+
return this.getTokenForSubject("jsonrpc");
|
|
575
|
+
}
|
|
567
576
|
/**
|
|
568
577
|
* Drop both cached tokens. Next `getToken` call re-acquires the slot
|
|
569
578
|
* that's actually needed. Called by `JsonRpcClient` on wire
|
|
@@ -578,8 +587,8 @@ class Ke {
|
|
|
578
587
|
this.cachedJsonRpc = null, this.cachedGrpc = null;
|
|
579
588
|
}
|
|
580
589
|
async getTokenForSubject(e) {
|
|
581
|
-
const
|
|
582
|
-
return
|
|
590
|
+
const t = e === "grpc" ? this.cachedGrpc : this.cachedJsonRpc;
|
|
591
|
+
return t && this.now() + this.refreshSkewSecs < t.expiresAt ? t.token : (await this.acquireSingleFlight(e)).token;
|
|
583
592
|
}
|
|
584
593
|
/**
|
|
585
594
|
* Swap in a different transport for subsequent token-issuing calls.
|
|
@@ -597,8 +606,8 @@ class Ke {
|
|
|
597
606
|
return e === "grpc" ? this.grpcPinnedServerPubkey : this.jsonRpcPinnedServerPubkey;
|
|
598
607
|
}
|
|
599
608
|
acquireSingleFlight(e) {
|
|
600
|
-
const
|
|
601
|
-
if (
|
|
609
|
+
const t = e === "grpc" ? this.inFlightGrpc : this.inFlightJsonRpc;
|
|
610
|
+
if (t) return t;
|
|
602
611
|
const n = e === "grpc" ? R : C, s = (async () => {
|
|
603
612
|
try {
|
|
604
613
|
const i = await this.acquireAndVerify(e, n, !0);
|
|
@@ -609,8 +618,8 @@ class Ke {
|
|
|
609
618
|
})();
|
|
610
619
|
return e === "grpc" ? this.inFlightGrpc = s : this.inFlightJsonRpc = s, s;
|
|
611
620
|
}
|
|
612
|
-
async acquireAndVerify(e,
|
|
613
|
-
const s = await this.client.call(
|
|
621
|
+
async acquireAndVerify(e, t, n) {
|
|
622
|
+
const s = await this.client.call(t, {
|
|
614
623
|
pegin_txid: this.peginTxid,
|
|
615
624
|
auth_anchor: this.authAnchorHex
|
|
616
625
|
}), i = this.getPinnedServerPubkey(e);
|
|
@@ -643,16 +652,16 @@ class Ke {
|
|
|
643
652
|
};
|
|
644
653
|
} catch (o) {
|
|
645
654
|
if (n && e === "jsonrpc" && this.refreshJsonRpcPinnedServerPubkey && qe(o)) {
|
|
646
|
-
const
|
|
647
|
-
if (
|
|
648
|
-
return this.jsonRpcPinnedServerPubkey =
|
|
655
|
+
const a = await this.refreshJsonRpcPinnedServerPubkey();
|
|
656
|
+
if (a !== this.jsonRpcPinnedServerPubkey)
|
|
657
|
+
return this.jsonRpcPinnedServerPubkey = a, this.acquireAndVerify(e, t, !1);
|
|
649
658
|
}
|
|
650
659
|
throw o;
|
|
651
660
|
}
|
|
652
661
|
}
|
|
653
662
|
}
|
|
654
|
-
function qe(
|
|
655
|
-
return
|
|
663
|
+
function qe(r) {
|
|
664
|
+
return r instanceof h && r.reason === "pinned_pubkey_mismatch" || r instanceof c && r.reason === "issuer_mismatch";
|
|
656
665
|
}
|
|
657
666
|
class We {
|
|
658
667
|
constructor() {
|
|
@@ -667,33 +676,33 @@ class We {
|
|
|
667
676
|
* `VpTokenProvider` through its chain-backed refresh callback.
|
|
668
677
|
*/
|
|
669
678
|
getOrCreate(e) {
|
|
670
|
-
const
|
|
671
|
-
if (
|
|
672
|
-
if (
|
|
679
|
+
const t = this.entries.get(e.peginTxid);
|
|
680
|
+
if (t) {
|
|
681
|
+
if (t.authAnchorHex !== e.authAnchorHex)
|
|
673
682
|
throw new Error(
|
|
674
|
-
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to authAnchorHex ${
|
|
683
|
+
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to authAnchorHex ${t.authAnchorHex.slice(0, 8)}…; got ${e.authAnchorHex.slice(0, 8)}…`
|
|
675
684
|
);
|
|
676
|
-
if (
|
|
685
|
+
if (t.providerAddress.toLowerCase() !== e.providerAddress.toLowerCase())
|
|
677
686
|
throw new Error(
|
|
678
|
-
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to providerAddress ${
|
|
687
|
+
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to providerAddress ${t.providerAddress}; got ${e.providerAddress}`
|
|
679
688
|
);
|
|
680
|
-
if (
|
|
689
|
+
if (t.provider.getPinnedServerPubkey("jsonrpc") !== e.pinnedServerPubkey)
|
|
681
690
|
throw new Error(
|
|
682
|
-
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to JSON-RPC pinnedServerPubkey ${
|
|
691
|
+
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to JSON-RPC pinnedServerPubkey ${t.provider.getPinnedServerPubkey("jsonrpc").slice(0, 8)}…; got ${e.pinnedServerPubkey.slice(0, 8)}…`
|
|
683
692
|
);
|
|
684
|
-
if (
|
|
693
|
+
if (t.provider.getPinnedServerPubkey("grpc") !== e.grpcPinnedServerPubkey)
|
|
685
694
|
throw new Error(
|
|
686
|
-
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to gRPC pinnedServerPubkey ${
|
|
695
|
+
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to gRPC pinnedServerPubkey ${t.provider.getPinnedServerPubkey("grpc").slice(0, 8)}…; got ${e.grpcPinnedServerPubkey.slice(0, 8)}…`
|
|
687
696
|
);
|
|
688
|
-
if (
|
|
697
|
+
if (t.grpcKeyEpoch !== e.grpcKeyEpoch)
|
|
689
698
|
throw new Error(
|
|
690
|
-
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to gRPC key epoch ${
|
|
699
|
+
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to gRPC key epoch ${t.grpcKeyEpoch.toString()}; got ${e.grpcKeyEpoch.toString()}`
|
|
691
700
|
);
|
|
692
|
-
if (
|
|
701
|
+
if (t.expectedAudienceXOnlyPubkey.toLowerCase() !== e.expectedAudienceXOnlyPubkey.toLowerCase())
|
|
693
702
|
throw new Error(
|
|
694
|
-
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to expectedAudienceXOnlyPubkey ${
|
|
703
|
+
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to expectedAudienceXOnlyPubkey ${t.expectedAudienceXOnlyPubkey.slice(0, 8)}…; got ${e.expectedAudienceXOnlyPubkey.slice(0, 8)}…`
|
|
695
704
|
);
|
|
696
|
-
return
|
|
705
|
+
return t.provider.setClient(e.client), t.provider;
|
|
697
706
|
}
|
|
698
707
|
const n = new Ke({
|
|
699
708
|
client: e.client,
|
|
@@ -704,7 +713,7 @@ class We {
|
|
|
704
713
|
refreshJsonRpcPinnedServerPubkey: e.refreshJsonRpcPinnedServerPubkey,
|
|
705
714
|
expectedAudienceXOnlyPubkey: e.expectedAudienceXOnlyPubkey,
|
|
706
715
|
authGatedMethods: ue,
|
|
707
|
-
grpcGatedMethods:
|
|
716
|
+
grpcGatedMethods: pe
|
|
708
717
|
});
|
|
709
718
|
return this.entries.set(e.peginTxid, {
|
|
710
719
|
provider: n,
|
|
@@ -721,17 +730,17 @@ class We {
|
|
|
721
730
|
* depositor request.
|
|
722
731
|
*/
|
|
723
732
|
peek(e) {
|
|
724
|
-
const
|
|
725
|
-
if (
|
|
726
|
-
if (
|
|
733
|
+
const t = this.entries.get(e.peginTxid);
|
|
734
|
+
if (t) {
|
|
735
|
+
if (t.providerAddress.toLowerCase() !== e.providerAddress.toLowerCase())
|
|
727
736
|
throw new Error(
|
|
728
|
-
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to providerAddress ${
|
|
737
|
+
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to providerAddress ${t.providerAddress}; got ${e.providerAddress}`
|
|
729
738
|
);
|
|
730
|
-
if (
|
|
739
|
+
if (t.expectedAudienceXOnlyPubkey.toLowerCase() !== e.expectedAudienceXOnlyPubkey.toLowerCase())
|
|
731
740
|
throw new Error(
|
|
732
|
-
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to expectedAudienceXOnlyPubkey ${
|
|
741
|
+
`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to expectedAudienceXOnlyPubkey ${t.expectedAudienceXOnlyPubkey.slice(0, 8)}…; got ${e.expectedAudienceXOnlyPubkey.slice(0, 8)}…`
|
|
733
742
|
);
|
|
734
|
-
return
|
|
743
|
+
return t.provider;
|
|
735
744
|
}
|
|
736
745
|
}
|
|
737
746
|
/**
|
|
@@ -758,50 +767,50 @@ class We {
|
|
|
758
767
|
}
|
|
759
768
|
}
|
|
760
769
|
const W = new We();
|
|
761
|
-
function
|
|
770
|
+
function nt(r) {
|
|
762
771
|
var n;
|
|
763
772
|
const e = F(
|
|
764
|
-
|
|
765
|
-
(n =
|
|
766
|
-
),
|
|
773
|
+
r.baseUrl,
|
|
774
|
+
(n = r.options) == null ? void 0 : n.headers
|
|
775
|
+
), t = W.getOrCreate({
|
|
767
776
|
client: e,
|
|
768
|
-
peginTxid:
|
|
769
|
-
authAnchorHex:
|
|
770
|
-
providerAddress:
|
|
771
|
-
pinnedServerPubkey:
|
|
772
|
-
grpcPinnedServerPubkey:
|
|
773
|
-
grpcKeyEpoch:
|
|
774
|
-
refreshJsonRpcPinnedServerPubkey:
|
|
777
|
+
peginTxid: r.peginTxid,
|
|
778
|
+
authAnchorHex: r.authAnchorHex,
|
|
779
|
+
providerAddress: r.providerAddress,
|
|
780
|
+
pinnedServerPubkey: r.pinnedServerPubkey,
|
|
781
|
+
grpcPinnedServerPubkey: r.grpcPinnedServerPubkey,
|
|
782
|
+
grpcKeyEpoch: r.grpcKeyEpoch,
|
|
783
|
+
refreshJsonRpcPinnedServerPubkey: r.refreshJsonRpcPinnedServerPubkey,
|
|
775
784
|
expectedAudienceXOnlyPubkey: J(
|
|
776
|
-
|
|
785
|
+
r.depositorBtcPubkey
|
|
777
786
|
)
|
|
778
787
|
});
|
|
779
|
-
return new
|
|
780
|
-
...
|
|
781
|
-
tokenProvider:
|
|
788
|
+
return new re(r.baseUrl, {
|
|
789
|
+
...r.options,
|
|
790
|
+
tokenProvider: t
|
|
782
791
|
});
|
|
783
792
|
}
|
|
784
|
-
function
|
|
793
|
+
function it(r) {
|
|
785
794
|
W.getOrCreate({
|
|
786
|
-
client: F(
|
|
787
|
-
peginTxid:
|
|
788
|
-
authAnchorHex:
|
|
789
|
-
providerAddress:
|
|
790
|
-
pinnedServerPubkey:
|
|
791
|
-
grpcPinnedServerPubkey:
|
|
792
|
-
grpcKeyEpoch:
|
|
793
|
-
refreshJsonRpcPinnedServerPubkey:
|
|
795
|
+
client: F(r.baseUrl, r.headers),
|
|
796
|
+
peginTxid: r.peginTxid,
|
|
797
|
+
authAnchorHex: r.authAnchorHex,
|
|
798
|
+
providerAddress: r.providerAddress,
|
|
799
|
+
pinnedServerPubkey: r.pinnedServerPubkey,
|
|
800
|
+
grpcPinnedServerPubkey: r.grpcPinnedServerPubkey,
|
|
801
|
+
grpcKeyEpoch: r.grpcKeyEpoch,
|
|
802
|
+
refreshJsonRpcPinnedServerPubkey: r.refreshJsonRpcPinnedServerPubkey,
|
|
794
803
|
expectedAudienceXOnlyPubkey: J(
|
|
795
|
-
|
|
804
|
+
r.depositorBtcPubkey
|
|
796
805
|
)
|
|
797
806
|
});
|
|
798
807
|
}
|
|
799
808
|
export {
|
|
800
|
-
|
|
809
|
+
h as S,
|
|
801
810
|
We as V,
|
|
802
811
|
W as a,
|
|
803
|
-
|
|
804
|
-
|
|
812
|
+
nt as c,
|
|
813
|
+
it as p,
|
|
805
814
|
de as v
|
|
806
815
|
};
|
|
807
|
-
//# sourceMappingURL=primeVpAuth-
|
|
816
|
+
//# sourceMappingURL=primeVpAuth-P-KTmNKb.js.map
|