@babylonlabs-io/ts-sdk 0.32.0 → 0.33.1

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 (102) hide show
  1. package/dist/PeginManager-D2pBM0E-.cjs +2 -0
  2. package/dist/PeginManager-D2pBM0E-.cjs.map +1 -0
  3. package/dist/{PeginManager-DUR1BTKM.js → PeginManager-LeGYbRN2.js} +137 -125
  4. package/dist/PeginManager-LeGYbRN2.js.map +1 -0
  5. package/dist/{buildAndBroadcastRefund-CIHhUmRv.cjs → buildAndBroadcastRefund-BXjYAqdb.cjs} +2 -2
  6. package/dist/buildAndBroadcastRefund-BXjYAqdb.cjs.map +1 -0
  7. package/dist/{buildAndBroadcastRefund-DwrX_IBf.js → buildAndBroadcastRefund-CK8MbGQh.js} +39 -39
  8. package/dist/buildAndBroadcastRefund-CK8MbGQh.js.map +1 -0
  9. package/dist/challengeAssert-06GLZtV8.cjs +2 -0
  10. package/dist/challengeAssert-06GLZtV8.cjs.map +1 -0
  11. package/dist/{challengeAssert-DSlCIBoT.js → challengeAssert-KGVKQh0J.js} +64 -70
  12. package/dist/challengeAssert-KGVKQh0J.js.map +1 -0
  13. package/dist/index.cjs +1 -1
  14. package/dist/index.js +75 -71
  15. package/dist/{noPayout-DohtepqZ.js → noPayout-BmMd4NNH.js} +44 -50
  16. package/dist/{noPayout-DohtepqZ.js.map → noPayout-BmMd4NNH.js.map} +1 -1
  17. package/dist/noPayout-Bp2TYA_X.cjs +2 -0
  18. package/dist/{noPayout-CDhbGn_B.cjs.map → noPayout-Bp2TYA_X.cjs.map} +1 -1
  19. package/dist/tbv/core/clients/eth/index.d.ts +1 -1
  20. package/dist/tbv/core/clients/eth/index.d.ts.map +1 -1
  21. package/dist/tbv/core/clients/eth/types.d.ts +13 -0
  22. package/dist/tbv/core/clients/eth/types.d.ts.map +1 -1
  23. package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts +8 -1
  24. package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts.map +1 -1
  25. package/dist/tbv/core/clients/index.cjs +1 -1
  26. package/dist/tbv/core/clients/index.js +30 -27
  27. package/dist/tbv/core/clients/vault-provider/api.d.ts +13 -2
  28. package/dist/tbv/core/clients/vault-provider/api.d.ts.map +1 -1
  29. package/dist/tbv/core/clients/vault-provider/auth/__tests__/createAuthenticatedVpClient.test.d.ts +11 -0
  30. package/dist/tbv/core/clients/vault-provider/auth/__tests__/createAuthenticatedVpClient.test.d.ts.map +1 -0
  31. package/dist/tbv/core/clients/vault-provider/auth/__tests__/tokenRegistry.test.d.ts +2 -0
  32. package/dist/tbv/core/clients/vault-provider/auth/__tests__/tokenRegistry.test.d.ts.map +1 -0
  33. package/dist/tbv/core/clients/vault-provider/auth/createAuthenticatedVpClient.d.ts +16 -0
  34. package/dist/tbv/core/clients/vault-provider/auth/createAuthenticatedVpClient.d.ts.map +1 -0
  35. package/dist/tbv/core/clients/vault-provider/auth/gatedMethods.d.ts +10 -0
  36. package/dist/tbv/core/clients/vault-provider/auth/gatedMethods.d.ts.map +1 -0
  37. package/dist/tbv/core/clients/vault-provider/auth/index.d.ts +5 -2
  38. package/dist/tbv/core/clients/vault-provider/auth/index.d.ts.map +1 -1
  39. package/dist/tbv/core/clients/vault-provider/auth/innerTokenClient.d.ts +4 -0
  40. package/dist/tbv/core/clients/vault-provider/auth/innerTokenClient.d.ts.map +1 -0
  41. package/dist/tbv/core/clients/vault-provider/auth/primeVpAuth.d.ts +11 -0
  42. package/dist/tbv/core/clients/vault-provider/auth/primeVpAuth.d.ts.map +1 -0
  43. package/dist/tbv/core/clients/vault-provider/auth/tokenProvider.d.ts +18 -23
  44. package/dist/tbv/core/clients/vault-provider/auth/tokenProvider.d.ts.map +1 -1
  45. package/dist/tbv/core/clients/vault-provider/auth/tokenRegistry.d.ts +48 -0
  46. package/dist/tbv/core/clients/vault-provider/auth/tokenRegistry.d.ts.map +1 -0
  47. package/dist/tbv/core/clients/vault-provider/json-rpc-client.d.ts +8 -12
  48. package/dist/tbv/core/clients/vault-provider/json-rpc-client.d.ts.map +1 -1
  49. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +14 -0
  50. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
  51. package/dist/tbv/core/index.cjs +1 -1
  52. package/dist/tbv/core/index.js +66 -62
  53. package/dist/tbv/core/managers/index.d.ts +1 -1
  54. package/dist/tbv/core/primitives/index.cjs +1 -1
  55. package/dist/tbv/core/primitives/index.js +2 -2
  56. package/dist/tbv/core/primitives/psbt/__tests__/peginInput.test.d.ts +3 -3
  57. package/dist/tbv/core/primitives/psbt/payout.d.ts +3 -2
  58. package/dist/tbv/core/primitives/psbt/payout.d.ts.map +1 -1
  59. package/dist/tbv/core/primitives/psbt/peginInput.d.ts +11 -5
  60. package/dist/tbv/core/primitives/psbt/peginInput.d.ts.map +1 -1
  61. package/dist/tbv/core/services/deposit/__tests__/runDepositorPresignFlow.test.d.ts +2 -0
  62. package/dist/tbv/core/services/deposit/__tests__/runDepositorPresignFlow.test.d.ts.map +1 -0
  63. package/dist/tbv/core/services/deposit/index.d.ts +2 -2
  64. package/dist/tbv/core/services/deposit/index.d.ts.map +1 -1
  65. package/dist/tbv/core/services/deposit/{signAndSubmitPayouts.d.ts → runDepositorPresignFlow.d.ts} +3 -3
  66. package/dist/tbv/core/services/deposit/runDepositorPresignFlow.d.ts.map +1 -0
  67. package/dist/tbv/core/services/index.cjs +1 -1
  68. package/dist/tbv/core/services/index.js +11 -11
  69. package/dist/tbv/core/vault-secrets/__tests__/parseFundingOutpoints.test.d.ts +2 -0
  70. package/dist/tbv/core/vault-secrets/__tests__/parseFundingOutpoints.test.d.ts.map +1 -0
  71. package/dist/tbv/core/vault-secrets/index.d.ts +1 -0
  72. package/dist/tbv/core/vault-secrets/index.d.ts.map +1 -1
  73. package/dist/tbv/core/vault-secrets/parseFundingOutpoints.d.ts +3 -0
  74. package/dist/tbv/core/vault-secrets/parseFundingOutpoints.d.ts.map +1 -0
  75. package/dist/tbv/index.cjs +1 -1
  76. package/dist/tbv/index.js +66 -62
  77. package/dist/{types-jmEyzzhY.cjs → types-C2IUB0Jd.cjs} +2 -2
  78. package/dist/types-C2IUB0Jd.cjs.map +1 -0
  79. package/dist/{types-CnG3JsRs.js → types-D1o_3Q__.js} +20 -9
  80. package/dist/types-D1o_3Q__.js.map +1 -0
  81. package/dist/{vault-registry-reader-CG6bea1S.js → vault-registry-reader-BeIEh62N.js} +436 -292
  82. package/dist/vault-registry-reader-BeIEh62N.js.map +1 -0
  83. package/dist/vault-registry-reader-DdUgC5IF.cjs +2 -0
  84. package/dist/vault-registry-reader-DdUgC5IF.cjs.map +1 -0
  85. package/package.json +1 -1
  86. package/dist/PeginManager-CTRPJo8m.cjs +0 -2
  87. package/dist/PeginManager-CTRPJo8m.cjs.map +0 -1
  88. package/dist/PeginManager-DUR1BTKM.js.map +0 -1
  89. package/dist/buildAndBroadcastRefund-CIHhUmRv.cjs.map +0 -1
  90. package/dist/buildAndBroadcastRefund-DwrX_IBf.js.map +0 -1
  91. package/dist/challengeAssert-DSlCIBoT.js.map +0 -1
  92. package/dist/challengeAssert-DuhkzZG-.cjs +0 -2
  93. package/dist/challengeAssert-DuhkzZG-.cjs.map +0 -1
  94. package/dist/noPayout-CDhbGn_B.cjs +0 -2
  95. package/dist/tbv/core/services/deposit/__tests__/signAndSubmitPayouts.test.d.ts +0 -2
  96. package/dist/tbv/core/services/deposit/__tests__/signAndSubmitPayouts.test.d.ts.map +0 -1
  97. package/dist/tbv/core/services/deposit/signAndSubmitPayouts.d.ts.map +0 -1
  98. package/dist/types-CnG3JsRs.js.map +0 -1
  99. package/dist/types-jmEyzzhY.cjs.map +0 -1
  100. package/dist/vault-registry-reader-BBS1_AON.cjs +0 -2
  101. package/dist/vault-registry-reader-BBS1_AON.cjs.map +0 -1
  102. package/dist/vault-registry-reader-CG6bea1S.js.map +0 -1
@@ -1,34 +1,37 @@
1
- import { M as a, S as r, V as o, k as t, l as S, m as R, n as i, h as T, j as d, g as l, a as n, b as p, c as E, d as P, e as V, f as _, p as A, r as m, v as g, i as c } from "../../../vault-registry-reader-CG6bea1S.js";
2
- import { D as x, b as I, J as O, a as U, d as f, P as C, R as u, c as N, V as D } from "../../../types-CnG3JsRs.js";
1
+ import { M as a, S as r, V as t, n as o, o as i, q as R, s as S, h as T, j as n, l as p, g as d, a as l, b as E, c as V, d as A, e as _, f as g, m as P, p as m, r as c, v, i as x, k as I } from "../../../vault-registry-reader-BeIEh62N.js";
2
+ import { D as U, b as C, J as f, a as u, d as y, P as N, R as k, c as D, V as M } from "../../../types-D1o_3Q__.js";
3
3
  export {
4
- x as DaemonStatus,
5
- I as JSON_RPC_ERROR_CODES,
6
- O as JsonRpcClient,
7
- U as JsonRpcError,
4
+ U as DaemonStatus,
5
+ C as JSON_RPC_ERROR_CODES,
6
+ f as JsonRpcClient,
7
+ u as JsonRpcError,
8
8
  a as MEMPOOL_API_URLS,
9
- f as POST_WOTS_STATUSES,
10
- C as PRE_DEPOSITOR_SIGNATURES_STATES,
11
- u as RpcErrorCode,
9
+ y as POST_WOTS_STATUSES,
10
+ N as PRE_DEPOSITOR_SIGNATURES_STATES,
11
+ k as RpcErrorCode,
12
12
  r as ServerIdentityError,
13
- N as VP_TERMINAL_STATUSES,
14
- D as VP_TRANSIENT_STATUSES,
15
- o as VaultProviderRpcClient,
16
- t as ViemProtocolParamsReader,
17
- S as ViemUniversalChallengerReader,
13
+ D as VP_TERMINAL_STATUSES,
14
+ M as VP_TRANSIENT_STATUSES,
15
+ t as VaultProviderRpcClient,
16
+ o as ViemProtocolParamsReader,
17
+ i as ViemUniversalChallengerReader,
18
18
  R as ViemVaultKeeperReader,
19
- i as ViemVaultRegistryReader,
19
+ S as ViemVaultRegistryReader,
20
20
  T as VpResponseValidationError,
21
- d as VpTokenProvider,
22
- l as getAddressTxs,
23
- n as getAddressUtxos,
24
- p as getMempoolApiUrl,
25
- E as getNetworkFees,
26
- P as getTxHex,
27
- V as getTxInfo,
28
- _ as getUtxoInfo,
29
- A as pushTx,
30
- m as resolveProtocolAddresses,
31
- g as validateRequestDepositorClaimerArtifactsResponse,
32
- c as verifyServerIdentity
21
+ n as VpTokenRegistry,
22
+ p as createAuthenticatedVpClient,
23
+ d as getAddressTxs,
24
+ l as getAddressUtxos,
25
+ E as getMempoolApiUrl,
26
+ V as getNetworkFees,
27
+ A as getTxHex,
28
+ _ as getTxInfo,
29
+ g as getUtxoInfo,
30
+ P as primeVpTokenRegistry,
31
+ m as pushTx,
32
+ c as resolveProtocolAddresses,
33
+ v as validateRequestDepositorClaimerArtifactsResponse,
34
+ x as verifyServerIdentity,
35
+ I as vpTokenRegistry
33
36
  };
34
37
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,5 @@
1
1
  import { PeginStatusReader, WotsKeySubmitter, PresignClient, ClaimerArtifactsReader } from '../../services/deposit/interfaces';
2
+ import { BearerTokenProvider } from './json-rpc-client';
2
3
  import { GetPeginStatusParams, GetPeginStatusResponse, GetPegoutStatusParams, GetPegoutStatusResponse, RequestDepositorClaimerArtifactsParams, RequestDepositorClaimerArtifactsResponse, RequestDepositorPresignTransactionsParams, RequestDepositorPresignTransactionsResponse, SubmitDepositorPresignaturesParams, SubmitDepositorWotsKeyParams } from './types';
3
4
  export interface VaultProviderRpcClientOptions {
4
5
  /** Timeout in milliseconds per request (default: 60000) */
@@ -7,10 +8,20 @@ export interface VaultProviderRpcClientOptions {
7
8
  retries?: number;
8
9
  /** Initial retry delay in milliseconds (default: 1000) */
9
10
  retryDelay?: number;
10
- /** Custom retry predicate (default: only retry get* status methods) */
11
+ /**
12
+ * Custom retry predicate. Default retries only the idempotent read
13
+ * methods: `getPeginStatus`, `getPegoutStatus`,
14
+ * `requestDepositorPresignTransactions`.
15
+ */
11
16
  retryableFor?: (method: string) => boolean;
12
- /** Custom headers */
17
+ /** Custom headers. */
13
18
  headers?: Record<string, string>;
19
+ /**
20
+ * Per-request bearer-token source. A non-null return attaches
21
+ * `Authorization: Bearer <token>`; `null` skips auth. Wire a
22
+ * {@link VpTokenProvider} for depositor-gated methods.
23
+ */
24
+ tokenProvider?: BearerTokenProvider;
14
25
  }
15
26
  /**
16
27
  * Concrete VP RPC client implementing all service interfaces.
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/vault-provider/api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAGpI,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,sCAAsC,EACtC,wCAAwC,EACxC,yCAAyC,EACzC,2CAA2C,EAC3C,kCAAkC,EAClC,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AAQjB,MAAM,WAAW,6BAA6B;IAC5C,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3C,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAID;;;;;;;;GAQG;AACH,qBAAa,sBACX,YAAW,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,sBAAsB;IAErF,OAAO,CAAC,MAAM,CAAgB;gBAElB,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,6BAA6B;IAYpE;;;OAGG;IACG,mCAAmC,CACvC,MAAM,EAAE,yCAAyC,EACjD,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,2CAA2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Client` whose tokenProvider
5
+ * points at the registry-cached `VpTokenProvider` for the given
6
+ * `peginTxid`.
7
+ * 2. `AUTH_GATED_METHODS` matches the canonical protocol set so the
8
+ * provider doesn't hand out null for a method the server gates.
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=createAuthenticatedVpClient.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAuthenticatedVpClient.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/tbv/core/clients/vault-provider/auth/__tests__/createAuthenticatedVpClient.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tokenRegistry.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenRegistry.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/tbv/core/clients/vault-provider/auth/__tests__/tokenRegistry.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import { OnChainBtcPubkey } from '../../eth/types';
2
+ import { VaultProviderRpcClient, VaultProviderRpcClientOptions } from '../api';
3
+ export interface AuthenticatedVpClientConfig {
4
+ /** Base URL of the VP RPC endpoint (already proxied if applicable). */
5
+ baseUrl: string;
6
+ /** Per-vault depositor-signed PegIn tx id (registry cache key). */
7
+ peginTxid: string;
8
+ /** Already-derived 32-byte auth-anchor preimage (64-char hex, no `0x`). */
9
+ authAnchorHex: string;
10
+ /** On-chain VP pubkey, branded so it can only come from the registry reader. */
11
+ pinnedServerPubkey: OnChainBtcPubkey;
12
+ /** Optional outer-client tunables (timeout, retries, headers, etc.). */
13
+ options?: VaultProviderRpcClientOptions;
14
+ }
15
+ export declare function createAuthenticatedVpClient(config: AuthenticatedVpClientConfig): VaultProviderRpcClient;
16
+ //# sourceMappingURL=createAuthenticatedVpClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAuthenticatedVpClient.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/clients/vault-provider/auth/createAuthenticatedVpClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,EACnC,MAAM,QAAQ,CAAC;AAKhB,MAAM,WAAW,2BAA2B;IAC1C,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,aAAa,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,wEAAwE;IACxE,OAAO,CAAC,EAAE,6BAA6B,CAAC;CACzC;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,2BAA2B,GAClC,sBAAsB,CAiBxB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * VP RPC methods that require `Authorization: Bearer <token>`.
3
+ * Protocol invariant — must be kept in sync with the VP server.
4
+ *
5
+ * @stability frozen
6
+ *
7
+ * @module tbv/core/clients/vault-provider/auth/gatedMethods
8
+ */
9
+ export declare const AUTH_GATED_METHODS: ReadonlySet<string>;
10
+ //# sourceMappingURL=gatedMethods.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gatedMethods.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/clients/vault-provider/auth/gatedMethods.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAIjD,CAAC"}
@@ -5,6 +5,9 @@
5
5
  */
6
6
  export { ServerIdentityError, verifyServerIdentity } from './serverIdentity';
7
7
  export type { ServerIdentityResponse, VerifyServerIdentityInput, } from './serverIdentity';
8
- export { VpTokenProvider } from './tokenProvider';
9
- export type { CreateDepositorTokenResponse, VpTokenProviderConfig, } from './tokenProvider';
8
+ export { VpTokenRegistry, vpTokenRegistry, type VpTokenRegistryInput, } from './tokenRegistry';
9
+ export { createAuthenticatedVpClient } from './createAuthenticatedVpClient';
10
+ export type { AuthenticatedVpClientConfig } from './createAuthenticatedVpClient';
11
+ export { primeVpTokenRegistry } from './primeVpAuth';
12
+ export type { PrimeVpAuthInput } from './primeVpAuth';
10
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/clients/vault-provider/auth/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,YAAY,EACV,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EACV,4BAA4B,EAC5B,qBAAqB,GACtB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/clients/vault-provider/auth/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,YAAY,EACV,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,eAAe,EACf,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,YAAY,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { JsonRpcClient } from '../json-rpc-client';
2
+ export declare const TOKEN_ISSUE_METHOD = "auth_createDepositorToken";
3
+ export declare function buildInnerTokenClient(baseUrl: string, headers?: Record<string, string>): JsonRpcClient;
4
+ //# sourceMappingURL=innerTokenClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"innerTokenClient.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/clients/vault-provider/auth/innerTokenClient.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAE9D,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,aAAa,CAOf"}
@@ -0,0 +1,11 @@
1
+ import { OnChainBtcPubkey } from '../../eth/types';
2
+ export interface PrimeVpAuthInput {
3
+ baseUrl: string;
4
+ peginTxid: string;
5
+ authAnchorHex: string;
6
+ pinnedServerPubkey: OnChainBtcPubkey;
7
+ /** Optional headers forwarded to the inner token client (e.g. gateway auth). */
8
+ headers?: Record<string, string>;
9
+ }
10
+ export declare function primeVpTokenRegistry(input: PrimeVpAuthInput): void;
11
+ //# sourceMappingURL=primeVpAuth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primeVpAuth.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/clients/vault-provider/auth/primeVpAuth.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAKxD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAOlE"}
@@ -1,3 +1,4 @@
1
+ import { OnChainBtcPubkey } from '../../eth/types';
1
2
  import { BearerTokenProvider, JsonRpcClient } from '../json-rpc-client';
2
3
  import { ServerIdentityResponse } from './serverIdentity';
3
4
  /**
@@ -12,33 +13,18 @@ export interface CreateDepositorTokenResponse {
12
13
  server_identity: ServerIdentityResponse;
13
14
  }
14
15
  export interface VpTokenProviderConfig {
15
- /** VP JSON-RPC client to use for `auth_createDepositorToken` calls. */
16
16
  client: JsonRpcClient;
17
- /** Pre-PegIn transaction id this token is scoped to. */
17
+ /** Per-vault depositor-signed PegIn tx id. NOT shared across sibling vaults in a batch. */
18
18
  peginTxid: string;
19
- /**
20
- * 64-char lowercase hex encoding of the 32-byte `auth_anchor`
21
- * preimage committed in the Pre-PegIn OP_RETURN. Presenting this
22
- * preimage is what lets the VP issue the token (the "fast path").
23
- */
19
+ /** 64-char hex of the 32-byte OP_RETURN auth-anchor preimage. */
24
20
  authAnchorHex: string;
25
- /**
26
- * 64-char lowercase hex x-only pubkey the FE expects the VP to
27
- * present as its persistent server identity. Sourced from the
28
- * on-chain `VaultProvider.btcPubKey` via the vault-registry reader.
29
- */
30
- pinnedServerPubkey: string;
31
- /**
32
- * Set of method names that require authentication. `getToken()`
33
- * returns `null` for any method not in this set.
34
- */
21
+ /** Pinned VP pubkey from the on-chain registry; branded so indexer mirrors can't substitute. */
22
+ pinnedServerPubkey: OnChainBtcPubkey;
23
+ /** Methods that require a bearer; `getToken` returns `null` for anything outside this set. */
35
24
  authGatedMethods: ReadonlySet<string>;
36
- /**
37
- * Seconds before `expires_at` to treat a cached token as expired.
38
- * Default: {@link DEFAULT_REFRESH_SKEW_SECS}.
39
- */
25
+ /** Default {@link DEFAULT_REFRESH_SKEW_SECS}. */
40
26
  refreshSkewSecs?: number;
41
- /** Clock source (injected for testability). Default: `Date.now() / 1000`. */
27
+ /** Clock source for testability. */
42
28
  now?: () => number;
43
29
  }
44
30
  /**
@@ -48,7 +34,7 @@ export interface VpTokenProviderConfig {
48
34
  * `JsonRpcClient` as `tokenProvider`.
49
35
  */
50
36
  export declare class VpTokenProvider implements BearerTokenProvider {
51
- private readonly client;
37
+ private client;
52
38
  private readonly peginTxid;
53
39
  private readonly authAnchorHex;
54
40
  private readonly pinnedServerPubkey;
@@ -76,6 +62,15 @@ export declare class VpTokenProvider implements BearerTokenProvider {
76
62
  * Called by `JsonRpcClient` on wire `auth_expired` responses.
77
63
  */
78
64
  invalidate(): void;
65
+ /**
66
+ * Swap in a different transport for subsequent token-issuing calls.
67
+ * Used by the registry when a later caller registers the same
68
+ * `peginTxid` against a different `baseUrl` — the cached token
69
+ * (bound to identity, not transport) stays valid, but future
70
+ * refreshes hit the new URL. An in-flight acquire keeps using the
71
+ * old client (it captured the reference); next call uses the new.
72
+ */
73
+ setClient(client: JsonRpcClient): void;
79
74
  private acquireSingleFlight;
80
75
  }
81
76
  //# sourceMappingURL=tokenProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tokenProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/clients/vault-provider/auth/tokenProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,kBAAkB,CAAC;AAmB1B;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,eAAe,EAAE,sBAAsB,CAAC;CACzC;AAED,MAAM,WAAW,qBAAqB;IACpC,uEAAuE;IACvE,MAAM,EAAE,aAAa,CAAC;IACtB,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,aAAa,EA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
@@ -0,0 +1,48 @@
1
+ import { OnChainBtcPubkey } from '../../eth/types';
2
+ import { JsonRpcClient } from '../json-rpc-client';
3
+ import { VpTokenProvider } from './tokenProvider';
4
+ export interface VpTokenRegistryInput {
5
+ client: JsonRpcClient;
6
+ peginTxid: string;
7
+ authAnchorHex: string;
8
+ pinnedServerPubkey: OnChainBtcPubkey;
9
+ }
10
+ export declare class VpTokenRegistry {
11
+ private readonly entries;
12
+ /**
13
+ * Return the cached `VpTokenProvider` for `peginTxid` if one exists
14
+ * with matching `authAnchorHex` and `pinnedServerPubkey`, otherwise
15
+ * construct and cache a fresh provider. A mismatch on either field
16
+ * throws — silent overwrite would mask derivation drift or VP
17
+ * pubkey rotation.
18
+ */
19
+ getOrCreate(input: VpTokenRegistryInput): VpTokenProvider;
20
+ /** Return the cached provider, or `undefined` if none. */
21
+ peek(peginTxid: string): VpTokenProvider | undefined;
22
+ /**
23
+ * Evict the entry for `peginTxid`. Idempotent. Called on terminal
24
+ * paths — activation success, user-cancel, or component unmount —
25
+ * so `authAnchorHex` doesn't outlive the deposit session.
26
+ */
27
+ release(peginTxid: string): void;
28
+ /**
29
+ * Wipe every cached entry. Test-only escape hatch — not exposed on
30
+ * the public {@link VpTokenRegistryPublic} singleton type.
31
+ *
32
+ * @internal
33
+ */
34
+ clear(): void;
35
+ get size(): number;
36
+ }
37
+ /**
38
+ * Public surface of the singleton — excludes the test-only `clear`
39
+ * method.
40
+ */
41
+ export interface VpTokenRegistryPublic {
42
+ getOrCreate(input: VpTokenRegistryInput): VpTokenProvider;
43
+ peek(peginTxid: string): VpTokenProvider | undefined;
44
+ release(peginTxid: string): void;
45
+ readonly size: number;
46
+ }
47
+ export declare const vpTokenRegistry: VpTokenRegistryPublic;
48
+ //# sourceMappingURL=tokenRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokenRegistry.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/clients/vault-provider/auth/tokenRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,gBAAgB,CAAC;CACtC;AAQD,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;IAE5D;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,oBAAoB,GAAG,eAAe;IAmCzD,0DAA0D;IAC1D,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAIpD;;;;OAIG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIhC;;;;;OAKG;IACH,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI,MAAM,CAEjB;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,KAAK,EAAE,oBAAoB,GAAG,eAAe,CAAC;IAC1D,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;IACrD,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,eAAe,EAAE,qBAA6C,CAAC"}
@@ -58,21 +58,17 @@ export interface JsonRpcClientConfig {
58
58
  /** Initial retry delay in milliseconds (default: 1000) */
59
59
  retryDelay?: number;
60
60
  /**
61
- * Predicate to determine if a method is safe to retry.
62
- * Default: only retry `vaultProvider_getPeginStatus` and `vaultProvider_getPegoutStatus`.
63
- * Write/mutating methods are NOT retried by default.
61
+ * Predicate that decides which methods retry on transient errors.
62
+ * Default retries only `getPeginStatus`, `getPegoutStatus`, and
63
+ * `requestDepositorPresignTransactions`. Write methods are not
64
+ * retried by default.
64
65
  */
65
66
  retryableFor?: (method: string) => boolean;
66
67
  /**
67
- * Optional bearer-token provider. If set, the client injects
68
- * `Authorization: Bearer <token>` for every method the provider
69
- * returns a non-null token for (`call` and `callRaw` alike).
70
- *
71
- * `call` also performs a one-shot reactive refresh when a wire-origin
72
- * JSON-RPC error carries `error.data.kind === "auth_expired"` —
73
- * it calls `invalidate()`, fetches a fresh token, and retries the
74
- * request once. `callRaw` does NOT perform reactive refresh (its
75
- * body may be unbounded; we don't parse it).
68
+ * Per-request bearer-token source. A non-null return attaches
69
+ * `Authorization: Bearer <token>`; `null` skips auth. `call`
70
+ * additionally retries once on wire `auth_expired` (invalidate +
71
+ * refetch + retry). `callRaw` skips reactive refresh.
76
72
  */
77
73
  tokenProvider?: BearerTokenProvider;
78
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"json-rpc-client.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/vault-provider/json-rpc-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,OAAO;IACzC,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,CAAC,CAAC;IACV,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC,GAAG,OAAO;IACjD,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,CAAC,CAAC;IACV,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,OAAO,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E;;IAElE,uEAAuE;;CAE/D,CAAC;AAqDX;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAyB;IACxC,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,aAAa,CAAC,CAAsB;gBAEhC,MAAM,EAAE,mBAAmB;YAazB,YAAY;IAW1B;;;;;;;;;;;;OAYG;IACG,IAAI,CAAC,OAAO,EAAE,OAAO,EACzB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,OAAO,CAAC;YAsBL,QAAQ;IAyDtB;;;;;;;;;OASG;IACG,OAAO,CAAC,OAAO,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,QAAQ,CAAC;YAIN,cAAc;IA8G5B,OAAO,CAAC,KAAK;IAkBb,UAAU,IAAI,MAAM;CAGrB"}
1
+ {"version":3,"file":"json-rpc-client.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/vault-provider/json-rpc-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,OAAO;IACzC,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,CAAC,CAAC;IACV,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC,GAAG,OAAO;IACjD,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,CAAC,CAAC;IACV,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB;AAED,MAAM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;IACpE,MAAM,GAAE,kBAA4B;IAC3C,kEAAkE;IAC3D,IAAI,CAAC,EAAE,OAAO,YAAA;CAKxB;AAED,eAAO,MAAM,oBAAoB;;;IAG/B,iDAAiD;;IAEjD,kEAAkE;;IAElE,uEAAuE;;CAE/D,CAAC;AAqDX;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAyB;IACxC,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,aAAa,CAAC,CAAsB;gBAEhC,MAAM,EAAE,mBAAmB;YAazB,YAAY;IAW1B;;;;;;;;;;;;OAYG;IACG,IAAI,CAAC,OAAO,EAAE,OAAO,EACzB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,OAAO,CAAC;YAsBL,QAAQ;IAyDtB;;;;;;;;;OASG;IACG,OAAO,CAAC,OAAO,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,QAAQ,CAAC;YAIN,cAAc;IA8G5B,OAAO,CAAC,KAAK;IAkBb,UAAU,IAAI,MAAM;CAGrB"}
@@ -205,6 +205,20 @@ export declare const BTCVaultRegistryABI: readonly [{
205
205
  readonly internalType: "uint256";
206
206
  }];
207
207
  readonly stateMutability: "view";
208
+ }, {
209
+ readonly type: "function";
210
+ readonly name: "getVaultProviderBTCKey";
211
+ readonly inputs: readonly [{
212
+ readonly name: "vpAddr";
213
+ readonly type: "address";
214
+ readonly internalType: "address";
215
+ }];
216
+ readonly outputs: readonly [{
217
+ readonly name: "";
218
+ readonly type: "bytes32";
219
+ readonly internalType: "bytes32";
220
+ }];
221
+ readonly stateMutability: "view";
208
222
  }, {
209
223
  readonly type: "function";
210
224
  readonly name: "getBtcVaultBasicInfo";
@@ -1 +1 @@
1
- {"version":3,"file":"BTCVaultRegistry.abi.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/contracts/abis/BTCVaultRegistry.abi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkZtB,CAAC"}
1
+ {"version":3,"file":"BTCVaultRegistry.abi.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/contracts/abis/BTCVaultRegistry.abi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6ZtB,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../challengeAssert-DuhkzZG-.cjs"),P=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../../noPayout-CDhbGn_B.cjs"),o=require("../../bitcoin-EYBKDtEW.cjs"),l=require("../../signing-DHSXjhLM.cjs"),d=require("../../validation-u8W7Lp2x.cjs"),e=require("../../buildAndBroadcastRefund-CIHhUmRv.cjs"),a=require("../../fundPeginTransaction-DaWoYCgO.cjs"),i=require("../../psbtInputFields-BLi7Ta-T.cjs"),r=require("../../PeginManager-CTRPJo8m.cjs"),t=require("../../vault-registry-reader-BBS1_AON.cjs"),s=require("../../types-jmEyzzhY.cjs");exports.buildChallengeAssertPsbt=n.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=n.buildDepositorPayoutPsbt;exports.buildPeginInputPsbt=n.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=n.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=n.buildPrePeginPsbt;exports.computeNumLocalChallengers=n.computeNumLocalChallengers;exports.extractPeginInputSignature=n.extractPeginInputSignature;exports.finalizePeginInputPsbt=n.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>P.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>P.deriveVaultId});exports.assertPayoutOutputMatchesRegistered=u.assertPayoutOutputMatchesRegistered;exports.buildNoPayoutPsbt=u.buildNoPayoutPsbt;exports.buildPayoutPsbt=u.buildPayoutPsbt;exports.buildRefundPsbt=u.buildRefundPsbt;exports.createPayoutScript=u.createPayoutScript;exports.extractPayoutSignature=u.extractPayoutSignature;exports.deriveNativeSegwitAddress=o.deriveNativeSegwitAddress;exports.deriveTaprootAddress=o.deriveTaprootAddress;exports.ensureHexPrefix=o.ensureHexPrefix;exports.formatSatoshisToBtc=o.formatSatoshisToBtc;exports.getNetwork=o.getNetwork;exports.hexToUint8Array=o.hexToUint8Array;exports.isAddressFromPublicKey=o.isAddressFromPublicKey;exports.isValidHex=o.isValidHex;exports.processPublicKeyToXOnly=o.processPublicKeyToXOnly;exports.stripHexPrefix=o.stripHexPrefix;exports.toXOnly=o.toXOnly;exports.uint8ArrayToHex=o.uint8ArrayToHex;exports.validateWalletPubkey=o.validateWalletPubkey;exports.ContractStatus=l.ContractStatus;exports.PeginAction=l.PeginAction;exports.canPerformAction=l.canPerformAction;exports.createTaprootScriptPathSignOptions=l.createTaprootScriptPathSignOptions;exports.getPeginProtocolState=l.getPeginProtocolState;exports.BITCOIN_ADDRESS_RE=d.BITCOIN_ADDRESS_RE;exports.HEX_RE=d.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=d.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=d.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=d.TXID_RE;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.PayoutManager=e.PayoutManager;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.activateVault=e.activateVault;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.computeHashlock=e.computeHashlock;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.pollAndSignPayouts=e.pollAndSignPayouts;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateSecretAgainstHashlock=e.validateSecretAgainstHashlock;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.waitForPeginStatus=e.waitForPeginStatus;exports.BTC_DUST_SAT=a.BTC_DUST_SAT;exports.DUST_THRESHOLD=a.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=a.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=a.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=a.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=a.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=a.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=a.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=a.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=a.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=a.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=a.fundPeginTransaction;exports.parseUnfundedWasmTransaction=a.parseUnfundedWasmTransaction;exports.peginOutputCount=a.peginOutputCount;exports.rateBasedTxBufferFee=a.rateBasedTxBufferFee;exports.BitcoinScriptType=i.BitcoinScriptType;exports.UtxoNotAvailableError=i.UtxoNotAvailableError;exports.assertUtxosAvailable=i.assertUtxosAvailable;exports.calculateBtcTxHash=i.calculateBtcTxHash;exports.collectReservedUtxoRefs=i.collectReservedUtxoRefs;exports.extractInputsFromTransaction=i.extractInputsFromTransaction;exports.getDustThreshold=i.getDustThreshold;exports.getPsbtInputFields=i.getPsbtInputFields;exports.getScriptType=i.getScriptType;exports.selectUtxosForDeposit=i.selectUtxosForDeposit;exports.selectUtxosForPegin=i.selectUtxosForPegin;exports.shouldAddChangeOutput=i.shouldAddChangeOutput;exports.validateUtxosAvailable=i.validateUtxosAvailable;exports.CONTRACT_ERRORS=r.CONTRACT_ERRORS;exports.PeginManager=r.PeginManager;exports.VAULT_APP_NAME=r.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=r.buildFundingOutpointsCommitment;exports.buildVaultContext=r.buildVaultContext;exports.computeWotsBlockPublicKeysHash=r.computeWotsBlockPublicKeysHash;exports.deriveVaultRoot=r.deriveVaultRoot;exports.deriveWotsBlocksFromSeed=r.deriveWotsBlocksFromSeed;exports.expandAuthAnchor=r.expandAuthAnchor;exports.expandHashlockSecret=r.expandHashlockSecret;exports.expandWotsSeed=r.expandWotsSeed;exports.extractErrorData=r.extractErrorData;exports.getContractErrorMessage=r.getContractErrorMessage;exports.handleContractError=r.handleContractError;exports.isKnownContractError=r.isKnownContractError;exports.isWotsMismatchError=r.isWotsMismatchError;exports.ApplicationRegistryABI=t.ApplicationRegistryABI;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.ProtocolParamsABI=t.ProtocolParamsABI;exports.ServerIdentityError=t.ServerIdentityError;exports.VaultProviderRpcClient=t.VaultProviderRpcClient;exports.ViemProtocolParamsReader=t.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=t.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=t.ViemVaultKeeperReader;exports.ViemVaultRegistryReader=t.ViemVaultRegistryReader;exports.VpResponseValidationError=t.VpResponseValidationError;exports.VpTokenProvider=t.VpTokenProvider;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.pushTx=t.pushTx;exports.resolveProtocolAddresses=t.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=t.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=t.verifyServerIdentity;exports.BTCVaultRegistryABI=s.BTCVaultRegistryABI;exports.DaemonStatus=s.DaemonStatus;exports.JSON_RPC_ERROR_CODES=s.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=s.JsonRpcClient;exports.JsonRpcError=s.JsonRpcError;exports.POST_WOTS_STATUSES=s.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=s.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=s.RpcErrorCode;exports.VP_TERMINAL_STATUSES=s.VP_TERMINAL_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../challengeAssert-06GLZtV8.cjs"),P=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../../noPayout-Bp2TYA_X.cjs"),i=require("../../bitcoin-EYBKDtEW.cjs"),l=require("../../signing-DHSXjhLM.cjs"),d=require("../../validation-u8W7Lp2x.cjs"),t=require("../../buildAndBroadcastRefund-BXjYAqdb.cjs"),a=require("../../fundPeginTransaction-DaWoYCgO.cjs"),o=require("../../psbtInputFields-BLi7Ta-T.cjs"),r=require("../../PeginManager-D2pBM0E-.cjs"),e=require("../../vault-registry-reader-DdUgC5IF.cjs"),s=require("../../types-C2IUB0Jd.cjs");exports.buildChallengeAssertPsbt=n.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=n.buildDepositorPayoutPsbt;exports.buildPeginInputPsbt=n.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=n.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=n.buildPrePeginPsbt;exports.computeNumLocalChallengers=n.computeNumLocalChallengers;exports.extractPeginInputSignature=n.extractPeginInputSignature;exports.finalizePeginInputPsbt=n.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>P.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>P.deriveVaultId});exports.assertPayoutOutputMatchesRegistered=u.assertPayoutOutputMatchesRegistered;exports.buildNoPayoutPsbt=u.buildNoPayoutPsbt;exports.buildPayoutPsbt=u.buildPayoutPsbt;exports.buildRefundPsbt=u.buildRefundPsbt;exports.createPayoutScript=u.createPayoutScript;exports.extractPayoutSignature=u.extractPayoutSignature;exports.deriveNativeSegwitAddress=i.deriveNativeSegwitAddress;exports.deriveTaprootAddress=i.deriveTaprootAddress;exports.ensureHexPrefix=i.ensureHexPrefix;exports.formatSatoshisToBtc=i.formatSatoshisToBtc;exports.getNetwork=i.getNetwork;exports.hexToUint8Array=i.hexToUint8Array;exports.isAddressFromPublicKey=i.isAddressFromPublicKey;exports.isValidHex=i.isValidHex;exports.processPublicKeyToXOnly=i.processPublicKeyToXOnly;exports.stripHexPrefix=i.stripHexPrefix;exports.toXOnly=i.toXOnly;exports.uint8ArrayToHex=i.uint8ArrayToHex;exports.validateWalletPubkey=i.validateWalletPubkey;exports.ContractStatus=l.ContractStatus;exports.PeginAction=l.PeginAction;exports.canPerformAction=l.canPerformAction;exports.createTaprootScriptPathSignOptions=l.createTaprootScriptPathSignOptions;exports.getPeginProtocolState=l.getPeginProtocolState;exports.BITCOIN_ADDRESS_RE=d.BITCOIN_ADDRESS_RE;exports.HEX_RE=d.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=d.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=d.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=d.TXID_RE;exports.BIP68NotMatureError=t.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=t.ClaimerPegoutStatusValue;exports.PayoutManager=t.PayoutManager;exports.REFUND_VSIZE=t.REFUND_VSIZE;exports.activateVault=t.activateVault;exports.buildAndBroadcastRefund=t.buildAndBroadcastRefund;exports.computeHashlock=t.computeHashlock;exports.estimateRefundFeeSats=t.estimateRefundFeeSats;exports.isDepositAmountValid=t.isDepositAmountValid;exports.isPegoutTerminalStatus=t.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=t.isRecognizedPegoutStatus;exports.runDepositorPresignFlow=t.runDepositorPresignFlow;exports.signDepositorGraph=t.signDepositorGraph;exports.submitWotsPublicKey=t.submitWotsPublicKey;exports.validateDepositAmount=t.validateDepositAmount;exports.validateMultiVaultDepositInputs=t.validateMultiVaultDepositInputs;exports.validateProviderSelection=t.validateProviderSelection;exports.validateRemainingCapacity=t.validateRemainingCapacity;exports.validateSecretAgainstHashlock=t.validateSecretAgainstHashlock;exports.validateVaultAmounts=t.validateVaultAmounts;exports.validateVaultProviderPubkey=t.validateVaultProviderPubkey;exports.waitForPeginStatus=t.waitForPeginStatus;exports.BTC_DUST_SAT=a.BTC_DUST_SAT;exports.DUST_THRESHOLD=a.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=a.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=a.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=a.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=a.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=a.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=a.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=a.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=a.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=a.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=a.fundPeginTransaction;exports.parseUnfundedWasmTransaction=a.parseUnfundedWasmTransaction;exports.peginOutputCount=a.peginOutputCount;exports.rateBasedTxBufferFee=a.rateBasedTxBufferFee;exports.BitcoinScriptType=o.BitcoinScriptType;exports.UtxoNotAvailableError=o.UtxoNotAvailableError;exports.assertUtxosAvailable=o.assertUtxosAvailable;exports.calculateBtcTxHash=o.calculateBtcTxHash;exports.collectReservedUtxoRefs=o.collectReservedUtxoRefs;exports.extractInputsFromTransaction=o.extractInputsFromTransaction;exports.getDustThreshold=o.getDustThreshold;exports.getPsbtInputFields=o.getPsbtInputFields;exports.getScriptType=o.getScriptType;exports.selectUtxosForDeposit=o.selectUtxosForDeposit;exports.selectUtxosForPegin=o.selectUtxosForPegin;exports.shouldAddChangeOutput=o.shouldAddChangeOutput;exports.validateUtxosAvailable=o.validateUtxosAvailable;exports.CONTRACT_ERRORS=r.CONTRACT_ERRORS;exports.PeginManager=r.PeginManager;exports.VAULT_APP_NAME=r.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=r.buildFundingOutpointsCommitment;exports.buildVaultContext=r.buildVaultContext;exports.computeWotsBlockPublicKeysHash=r.computeWotsBlockPublicKeysHash;exports.deriveVaultRoot=r.deriveVaultRoot;exports.deriveWotsBlocksFromSeed=r.deriveWotsBlocksFromSeed;exports.expandAuthAnchor=r.expandAuthAnchor;exports.expandHashlockSecret=r.expandHashlockSecret;exports.expandWotsSeed=r.expandWotsSeed;exports.extractErrorData=r.extractErrorData;exports.getContractErrorMessage=r.getContractErrorMessage;exports.handleContractError=r.handleContractError;exports.isKnownContractError=r.isKnownContractError;exports.isWotsMismatchError=r.isWotsMismatchError;exports.parseFundingOutpointsFromTx=r.parseFundingOutpointsFromTx;exports.ApplicationRegistryABI=e.ApplicationRegistryABI;exports.MEMPOOL_API_URLS=e.MEMPOOL_API_URLS;exports.ProtocolParamsABI=e.ProtocolParamsABI;exports.ServerIdentityError=e.ServerIdentityError;exports.VaultProviderRpcClient=e.VaultProviderRpcClient;exports.ViemProtocolParamsReader=e.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=e.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=e.ViemVaultKeeperReader;exports.ViemVaultRegistryReader=e.ViemVaultRegistryReader;exports.VpResponseValidationError=e.VpResponseValidationError;exports.VpTokenRegistry=e.VpTokenRegistry;exports.createAuthenticatedVpClient=e.createAuthenticatedVpClient;exports.getAddressTxs=e.getAddressTxs;exports.getAddressUtxos=e.getAddressUtxos;exports.getMempoolApiUrl=e.getMempoolApiUrl;exports.getNetworkFees=e.getNetworkFees;exports.getTxHex=e.getTxHex;exports.getTxInfo=e.getTxInfo;exports.getUtxoInfo=e.getUtxoInfo;exports.primeVpTokenRegistry=e.primeVpTokenRegistry;exports.pushTx=e.pushTx;exports.resolveProtocolAddresses=e.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=e.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=e.verifyServerIdentity;exports.vpTokenRegistry=e.vpTokenRegistry;exports.BTCVaultRegistryABI=s.BTCVaultRegistryABI;exports.DaemonStatus=s.DaemonStatus;exports.JSON_RPC_ERROR_CODES=s.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=s.JsonRpcClient;exports.JsonRpcError=s.JsonRpcError;exports.POST_WOTS_STATUSES=s.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=s.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=s.RpcErrorCode;exports.VP_TERMINAL_STATUSES=s.VP_TERMINAL_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;
2
2
  //# sourceMappingURL=index.cjs.map