@babylonlabs-io/ts-sdk 0.56.1 → 0.57.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/BTCVaultRegistry.abi-AUAyCHal.cjs +2 -0
- package/dist/BTCVaultRegistry.abi-AUAyCHal.cjs.map +1 -0
- package/dist/{BTCVaultRegistry.abi-Chs4AFBj.js → BTCVaultRegistry.abi-CixOlp3B.js} +73 -14
- package/dist/BTCVaultRegistry.abi-CixOlp3B.js.map +1 -0
- package/dist/BTCVaultRegistryKeyEpochs.abi-CXjhRZbm.js +111 -0
- package/dist/BTCVaultRegistryKeyEpochs.abi-CXjhRZbm.js.map +1 -0
- package/dist/BTCVaultRegistryKeyEpochs.abi-_NERAdc5.cjs +2 -0
- package/dist/BTCVaultRegistryKeyEpochs.abi-_NERAdc5.cjs.map +1 -0
- package/dist/{PeginManager-Ba7Cr51Z.js → PeginManager-CnX3uFb0.js} +5 -5
- package/dist/{PeginManager-Ba7Cr51Z.js.map → PeginManager-CnX3uFb0.js.map} +1 -1
- package/dist/PeginManager-iDbqXsKD.cjs +2 -0
- package/dist/{PeginManager-CcjGRo4O.cjs.map → PeginManager-iDbqXsKD.cjs.map} +1 -1
- package/dist/ProtocolParams.abi-C8U7BHCS.cjs +2 -0
- package/dist/ProtocolParams.abi-C8U7BHCS.cjs.map +1 -0
- package/dist/{ApplicationRegistry.abi-w5prf7Ig.js → ProtocolParams.abi-CV938AYZ.js} +150 -80
- package/dist/ProtocolParams.abi-CV938AYZ.js.map +1 -0
- package/dist/{buildAndBroadcastRefund-BtXUqBkb.js → buildAndBroadcastRefund-CCb1_z24.js} +627 -452
- package/dist/buildAndBroadcastRefund-CCb1_z24.js.map +1 -0
- package/dist/buildAndBroadcastRefund-CDzzTZ2U.cjs +2 -0
- package/dist/buildAndBroadcastRefund-CDzzTZ2U.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +163 -153
- package/dist/index.js.map +1 -1
- package/dist/{types-CQDRQvV-.js → json-rpc-client-Ehjthcd7.js} +61 -61
- package/dist/json-rpc-client-Ehjthcd7.js.map +1 -0
- package/dist/{types-WA0LrDk1.cjs → json-rpc-client-fUoK-TzT.cjs} +2 -2
- package/dist/json-rpc-client-fUoK-TzT.cjs.map +1 -0
- package/dist/mempoolApi-C0olk43O.js +536 -0
- package/dist/mempoolApi-C0olk43O.js.map +1 -0
- package/dist/mempoolApi-Dsm2VPXp.cjs +2 -0
- package/dist/mempoolApi-Dsm2VPXp.cjs.map +1 -0
- package/dist/{noPayout-CihCk1HE.js → noPayout-CI4l1qu2.js} +2 -2
- package/dist/{noPayout-CihCk1HE.js.map → noPayout-CI4l1qu2.js.map} +1 -1
- package/dist/{noPayout-Cb8vFrkY.cjs → noPayout-Djrv31V5.cjs} +2 -2
- package/dist/{noPayout-Cb8vFrkY.cjs.map → noPayout-Djrv31V5.cjs.map} +1 -1
- package/dist/onChainBtcPubkey-Cd9kpz-S.cjs +2 -0
- package/dist/onChainBtcPubkey-Cd9kpz-S.cjs.map +1 -0
- package/dist/onChainBtcPubkey-aPY5ib3Q.js +19 -0
- package/dist/onChainBtcPubkey-aPY5ib3Q.js.map +1 -0
- package/dist/primeVpAuth-BlxUcdBf.cjs +2 -0
- package/dist/primeVpAuth-BlxUcdBf.cjs.map +1 -0
- package/dist/{primeVpAuth-Caa5J_uv.js → primeVpAuth-DkJbvywo.js} +479 -367
- package/dist/primeVpAuth-DkJbvywo.js.map +1 -0
- package/dist/signPsbtsWithFallback-C01N6Kdo.cjs +2 -0
- package/dist/signPsbtsWithFallback-C01N6Kdo.cjs.map +1 -0
- package/dist/{PayoutManager-BVgmuKuK.js → signPsbtsWithFallback-CzZFZf0I.js} +105 -101
- package/dist/signPsbtsWithFallback-CzZFZf0I.js.map +1 -0
- package/dist/tbv/core/clients/eth/index.d.ts +5 -3
- package/dist/tbv/core/clients/eth/index.d.ts.map +1 -1
- package/dist/tbv/core/clients/eth/onChainBtcPubkey.d.ts +16 -0
- package/dist/tbv/core/clients/eth/onChainBtcPubkey.d.ts.map +1 -0
- package/dist/tbv/core/clients/eth/operation-key-reader.d.ts +33 -0
- package/dist/tbv/core/clients/eth/operation-key-reader.d.ts.map +1 -0
- package/dist/tbv/core/clients/eth/types.d.ts +122 -3
- package/dist/tbv/core/clients/eth/types.d.ts.map +1 -1
- package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts +25 -1
- package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts.map +1 -1
- package/dist/tbv/core/clients/index.cjs +1 -1
- package/dist/tbv/core/clients/index.js +35 -32
- package/dist/tbv/core/clients/index.js.map +1 -1
- package/dist/tbv/core/contracts/__tests__/BTCVaultRegistryKeyEpochs.abi.test.d.ts +2 -0
- package/dist/tbv/core/contracts/__tests__/BTCVaultRegistryKeyEpochs.abi.test.d.ts.map +1 -0
- package/dist/tbv/core/contracts/abis/ApplicationRegistry.abi.d.ts +66 -0
- package/dist/tbv/core/contracts/abis/ApplicationRegistry.abi.d.ts.map +1 -1
- package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +50 -0
- package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
- package/dist/tbv/core/contracts/abis/BTCVaultRegistryKeyEpochs.abi.d.ts +111 -0
- package/dist/tbv/core/contracts/abis/BTCVaultRegistryKeyEpochs.abi.d.ts.map +1 -0
- package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts +36 -0
- package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts.map +1 -1
- package/dist/tbv/core/contracts/index.cjs +1 -1
- package/dist/tbv/core/contracts/index.d.ts +2 -1
- package/dist/tbv/core/contracts/index.d.ts.map +1 -1
- package/dist/tbv/core/contracts/index.js +8 -6
- package/dist/tbv/core/contracts/index.js.map +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +163 -153
- package/dist/tbv/core/index.js.map +1 -1
- package/dist/tbv/core/managers/PayoutManager.d.ts +8 -0
- package/dist/tbv/core/managers/PayoutManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/index.cjs +1 -1
- package/dist/tbv/core/managers/index.js +2 -2
- package/dist/tbv/core/primitives/index.cjs +1 -1
- package/dist/tbv/core/primitives/index.js +2 -2
- package/dist/tbv/core/primitives/psbt/__tests__/standardPayoutScript.test.d.ts +2 -0
- package/dist/tbv/core/primitives/psbt/__tests__/standardPayoutScript.test.d.ts.map +1 -0
- package/dist/tbv/core/primitives/psbt/assertPayoutFeeBand.d.ts +5 -5
- package/dist/tbv/core/primitives/psbt/assertPayoutFeeBand.d.ts.map +1 -1
- package/dist/tbv/core/primitives/psbt/payout.d.ts +23 -0
- package/dist/tbv/core/primitives/psbt/payout.d.ts.map +1 -1
- package/dist/tbv/core/primitives/psbt/standardPayoutScript.d.ts +41 -0
- package/dist/tbv/core/primitives/psbt/standardPayoutScript.d.ts.map +1 -0
- package/dist/tbv/core/services/deposit/__tests__/verifyRegisteredParticipantKeys.test.d.ts +2 -0
- package/dist/tbv/core/services/deposit/__tests__/verifyRegisteredParticipantKeys.test.d.ts.map +1 -0
- package/dist/tbv/core/services/deposit/index.d.ts +7 -6
- package/dist/tbv/core/services/deposit/index.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/runDepositorPresignFlow.d.ts +10 -0
- package/dist/tbv/core/services/deposit/runDepositorPresignFlow.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts +9 -0
- package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/validateOnChainParticipantKeys.d.ts +38 -1
- package/dist/tbv/core/services/deposit/validateOnChainParticipantKeys.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/verifyRegisteredParticipantKeys.d.ts +42 -0
- package/dist/tbv/core/services/deposit/verifyRegisteredParticipantKeys.d.ts.map +1 -0
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.d.ts +1 -0
- package/dist/tbv/core/services/index.d.ts.map +1 -1
- package/dist/tbv/core/services/index.js +36 -31
- package/dist/tbv/core/services/participants/__tests__/fixtures/rotation.d.ts +55 -0
- package/dist/tbv/core/services/participants/__tests__/fixtures/rotation.d.ts.map +1 -0
- package/dist/tbv/core/services/participants/__tests__/resolveParticipantKeys.test.d.ts +2 -0
- package/dist/tbv/core/services/participants/__tests__/resolveParticipantKeys.test.d.ts.map +1 -0
- package/dist/tbv/core/services/participants/index.d.ts +8 -0
- package/dist/tbv/core/services/participants/index.d.ts.map +1 -0
- package/dist/tbv/core/services/participants/resolveParticipantKeys.d.ts +26 -0
- package/dist/tbv/core/services/participants/resolveParticipantKeys.d.ts.map +1 -0
- package/dist/tbv/core/services/participants/types.d.ts +62 -0
- package/dist/tbv/core/services/participants/types.d.ts.map +1 -0
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +163 -153
- package/dist/tbv/index.js.map +1 -1
- package/dist/verifyScriptPathSchnorrSignature-C-84KJ6U.cjs +2 -0
- package/dist/verifyScriptPathSchnorrSignature-C-84KJ6U.cjs.map +1 -0
- package/dist/{verifyScriptPathSchnorrSignature-CgrnAjMW.js → verifyScriptPathSchnorrSignature-Xoo9DOHW.js} +359 -301
- package/dist/verifyScriptPathSchnorrSignature-Xoo9DOHW.js.map +1 -0
- package/package.json +1 -1
- package/dist/ApplicationRegistry.abi-CLaa6E99.cjs +0 -2
- package/dist/ApplicationRegistry.abi-CLaa6E99.cjs.map +0 -1
- package/dist/ApplicationRegistry.abi-w5prf7Ig.js.map +0 -1
- package/dist/BTCVaultRegistry.abi-Chs4AFBj.js.map +0 -1
- package/dist/BTCVaultRegistry.abi-JdeqLz4x.cjs +0 -2
- package/dist/BTCVaultRegistry.abi-JdeqLz4x.cjs.map +0 -1
- package/dist/PayoutManager-BVgmuKuK.js.map +0 -1
- package/dist/PayoutManager-Cu4_l-_Y.cjs +0 -2
- package/dist/PayoutManager-Cu4_l-_Y.cjs.map +0 -1
- package/dist/PeginManager-CcjGRo4O.cjs +0 -2
- package/dist/buildAndBroadcastRefund-BtXUqBkb.js.map +0 -1
- package/dist/buildAndBroadcastRefund-Cq01wyZX.cjs +0 -2
- package/dist/buildAndBroadcastRefund-Cq01wyZX.cjs.map +0 -1
- package/dist/mempoolApi-DkyKmmgI.cjs +0 -2
- package/dist/mempoolApi-DkyKmmgI.cjs.map +0 -1
- package/dist/mempoolApi-lpJdvPkK.js +0 -483
- package/dist/mempoolApi-lpJdvPkK.js.map +0 -1
- package/dist/primeVpAuth-Caa5J_uv.js.map +0 -1
- package/dist/primeVpAuth-y-4A88ah.cjs +0 -2
- package/dist/primeVpAuth-y-4A88ah.cjs.map +0 -1
- package/dist/types-CQDRQvV-.js.map +0 -1
- package/dist/types-WA0LrDk1.cjs.map +0 -1
- package/dist/verifyScriptPathSchnorrSignature-BZhX-SOd.cjs +0 -2
- package/dist/verifyScriptPathSchnorrSignature-BZhX-SOd.cjs.map +0 -1
- package/dist/verifyScriptPathSchnorrSignature-CgrnAjMW.js.map +0 -1
|
@@ -59,6 +59,16 @@ export interface PayoutSigningContext {
|
|
|
59
59
|
* graph with. Bounds every payout's implicit fee (device fee-bound model).
|
|
60
60
|
*/
|
|
61
61
|
protocolFeeRate: bigint;
|
|
62
|
+
/**
|
|
63
|
+
* RFC-006 resolved keeper payout destinations at the vault's frozen
|
|
64
|
+
* `appKeeperKeyEpoch`, keyed by lowercased x-only operation pubkey.
|
|
65
|
+
*/
|
|
66
|
+
vkClaimerPayoutScriptPubKeys: Readonly<Record<string, string>>;
|
|
67
|
+
/**
|
|
68
|
+
* RFC-006 resolved VP commission destination at the vault's frozen
|
|
69
|
+
* `vpKeyEpoch`.
|
|
70
|
+
*/
|
|
71
|
+
vpCommissionScriptPubKey: string;
|
|
62
72
|
}
|
|
63
73
|
export interface RunDepositorPresignFlowParams {
|
|
64
74
|
/** VP client implementing the status reader interface */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runDepositorPresignFlow.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/runDepositorPresignFlow.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAM3E,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAQrE;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,0EAA0E;IAC1E,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,yDAAyD;IACzD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,4BAA4B,EAAE,MAAM,CAAC;IACrC,iGAAiG;IACjG,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"runDepositorPresignFlow.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/runDepositorPresignFlow.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAM3E,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAQrE;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,0EAA0E;IAC1E,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,yDAAyD;IACzD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,4BAA4B,EAAE,MAAM,CAAC;IACrC,iGAAiG;IACjG,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,4BAA4B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/D;;;OAGG;IACH,wBAAwB,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,6BAA6B;IAC5C,yDAAyD;IACzD,YAAY,EAAE,iBAAiB,CAAC;IAChC,oEAAoE;IACpE,aAAa,EAAE,aAAa,CAAC;IAC7B,iCAAiC;IACjC,SAAS,EAAE,aAAa,CAAC;IACzB,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,cAAc,EAAE,oBAAoB,CAAC;IACrC;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,sEAAsE;IACtE,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD;AAkMD;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,6BAA6B,GACpC,OAAO,CAAC,IAAI,CAAC,CAmJf"}
|
|
@@ -56,6 +56,15 @@ export interface DepositorGraphSigningContext {
|
|
|
56
56
|
* the depositor's registered address before the wallet produces a signature.
|
|
57
57
|
*/
|
|
58
58
|
registeredPayoutScriptPubKey: string;
|
|
59
|
+
/**
|
|
60
|
+
* RFC-006 operator payout destinations. Forwarded to `buildPayoutPsbt` for
|
|
61
|
+
* shape completeness only: this graph is signed under the
|
|
62
|
+
* `depositor-as-claimer` role, whose payout has two outputs and reads
|
|
63
|
+
* neither the keeper map nor the VP commission destination.
|
|
64
|
+
*/
|
|
65
|
+
vkClaimerPayoutScriptPubKeys: Readonly<Record<string, string>>;
|
|
66
|
+
/** See {@link vkClaimerPayoutScriptPubKeys} — unused for this role. */
|
|
67
|
+
vpCommissionScriptPubKey: string;
|
|
59
68
|
}
|
|
60
69
|
export interface SignDepositorGraphParams {
|
|
61
70
|
/** The depositor graph from VP response */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signDepositorGraph.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/signDepositorGraph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAGrE,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EACV,+BAA+B,EAC/B,0BAA0B,EAG3B,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"signDepositorGraph.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/signDepositorGraph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAGrE,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EACV,+BAA+B,EAC/B,0BAA0B,EAG3B,MAAM,oCAAoC,CAAC;AA4c5C;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,0EAA0E;IAC1E,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,0EAA0E;IAC1E,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,4BAA4B,EAAE,MAAM,CAAC;IACrC;;;;;OAKG;IACH,4BAA4B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/D,uEAAuE;IACvE,wBAAwB,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,wBAAwB;IACvC,2CAA2C;IAC3C,cAAc,EAAE,0BAA0B,CAAC;IAC3C,iCAAiC;IACjC,SAAS,EAAE,aAAa,CAAC;IACzB,8DAA8D;IAC9D,cAAc,EAAE,4BAA4B,CAAC;CAC9C;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,+BAA+B,CAAC,CAuC1C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Address } from 'viem';
|
|
2
|
-
import { UniversalChallengerReader, VaultKeeperReader, VaultRegistryReader } from '../../clients/eth/types';
|
|
2
|
+
import { OperationKeyReader, UniversalChallengerReader, VaultKeeperReader, VaultRegistryReader } from '../../clients/eth/types';
|
|
3
|
+
import { ParticipantKeySet } from '../participants/types';
|
|
3
4
|
export interface ValidateOnChainParticipantKeysParams {
|
|
4
5
|
vaultRegistryReader: VaultRegistryReader;
|
|
5
6
|
vaultKeeperReader: VaultKeeperReader;
|
|
@@ -9,13 +10,49 @@ export interface ValidateOnChainParticipantKeysParams {
|
|
|
9
10
|
expectedVaultProviderBtcPubkey: string;
|
|
10
11
|
expectedVaultKeeperBtcPubkeys: string[];
|
|
11
12
|
expectedUniversalChallengerBtcPubkeys: string[];
|
|
13
|
+
/**
|
|
14
|
+
* RFC-006. Participant keys are resolved to their *current operation* keys,
|
|
15
|
+
* and those are what the returned key fields carry.
|
|
16
|
+
*/
|
|
17
|
+
operationKeyReader: OperationKeyReader;
|
|
18
|
+
/**
|
|
19
|
+
* Optional observer for the case where the indexer hint matched the
|
|
20
|
+
* operation keys rather than the registration keys — i.e. the indexer is
|
|
21
|
+
* ahead of us, not wrong. Called at most once.
|
|
22
|
+
*/
|
|
23
|
+
onIndexerServingOperationKeys?: (message: string) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Optional observer for the case where the indexer is serving a half-applied
|
|
26
|
+
* view — one role explainable only by the registration keys, another only by
|
|
27
|
+
* the operation keys. That blocks every deposit for the provider until the
|
|
28
|
+
* indexer converges, and "Refresh and try again" cannot help, so the block
|
|
29
|
+
* needs to be visible rather than showing up only as user reports. Called
|
|
30
|
+
* immediately before the throw.
|
|
31
|
+
*/
|
|
32
|
+
onIndexerHintsInconsistent?: (message: string) => void;
|
|
12
33
|
}
|
|
13
34
|
export interface ValidatedOnChainParticipantKeys {
|
|
35
|
+
/** The VP key to build with: its current operation key. */
|
|
14
36
|
vaultProviderBtcPubkeyXOnly: string;
|
|
15
37
|
vaultKeeperBtcPubkeysSorted: string[];
|
|
16
38
|
universalChallengerBtcPubkeysSorted: string[];
|
|
17
39
|
expectedAppVaultKeepersVersion: number;
|
|
18
40
|
expectedUniversalChallengersVersion: number;
|
|
41
|
+
/**
|
|
42
|
+
* The registration / roster keys, sorted. These are what indexer hints are
|
|
43
|
+
* compared against first, and they stay available for diagnostics after
|
|
44
|
+
* resolution.
|
|
45
|
+
*/
|
|
46
|
+
registrationKeys: {
|
|
47
|
+
vaultProvider: string;
|
|
48
|
+
vaultKeepers: string[];
|
|
49
|
+
universalChallengers: string[];
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* The full resolution, including the admin↔key pairing. Feeds the
|
|
53
|
+
* post-registration read-after-mine verification.
|
|
54
|
+
*/
|
|
55
|
+
participantKeys: ParticipantKeySet;
|
|
19
56
|
}
|
|
20
57
|
export declare function validateOnChainParticipantKeys(params: ValidateOnChainParticipantKeysParams): Promise<ValidatedOnChainParticipantKeys>;
|
|
21
58
|
//# sourceMappingURL=validateOnChainParticipantKeys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateOnChainParticipantKeys.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/validateOnChainParticipantKeys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"validateOnChainParticipantKeys.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/validateOnChainParticipantKeys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AAEzC,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,MAAM,WAAW,oCAAoC;IACnD,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,yBAAyB,EAAE,yBAAyB,CAAC;IACrD,uBAAuB,EAAE,OAAO,CAAC;IACjC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,8BAA8B,EAAE,MAAM,CAAC;IACvC,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,qCAAqC,EAAE,MAAM,EAAE,CAAC;IAChD;;;OAGG;IACH,kBAAkB,EAAE,kBAAkB,CAAC;IACvC;;;;OAIG;IACH,6BAA6B,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D;;;;;;;OAOG;IACH,0BAA0B,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACxD;AAED,MAAM,WAAW,+BAA+B;IAC9C,2DAA2D;IAC3D,2BAA2B,EAAE,MAAM,CAAC;IACpC,2BAA2B,EAAE,MAAM,EAAE,CAAC;IACtC,mCAAmC,EAAE,MAAM,EAAE,CAAC;IAC9C,8BAA8B,EAAE,MAAM,CAAC;IACvC,mCAAmC,EAAE,MAAM,CAAC;IAC5C;;;;OAIG;IACH,gBAAgB,EAAE;QAChB,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,oBAAoB,EAAE,MAAM,EAAE,CAAC;KAChC,CAAC;IACF;;;OAGG;IACH,eAAe,EAAE,iBAAiB,CAAC;CACpC;AASD,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,oCAAoC,GAC3C,OAAO,CAAC,+BAA+B,CAAC,CAiK1C"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Hex } from 'viem';
|
|
2
|
+
import { OperationKeyReader, VaultRegistryReader } from '../../clients/eth/types';
|
|
3
|
+
import { ParticipantKeySet } from '../participants/types';
|
|
4
|
+
/**
|
|
5
|
+
* Participant operation keys drifted between building the Bitcoin artifacts
|
|
6
|
+
* and the vault freezing its epochs.
|
|
7
|
+
*
|
|
8
|
+
* A *sibling* of `RegisteredVaultVersionMismatchError`, never a subclass, and
|
|
9
|
+
* the distinction is load-bearing. On a version mismatch the orchestrator drops
|
|
10
|
+
* the local pending-pegin record, because the on-chain `prePeginTxHash` is
|
|
11
|
+
* still the authoritative copy of the transaction and a later resume can safely
|
|
12
|
+
* broadcast it from the indexer.
|
|
13
|
+
*
|
|
14
|
+
* Key drift breaks exactly that assumption. The registered hash commits to a
|
|
15
|
+
* transaction whose scripts embed the *pre-rotation* keys, while the vault
|
|
16
|
+
* froze the *post-rotation* epoch — so every counterparty resolves a different
|
|
17
|
+
* funding output and the deposit can never activate. Dropping the record would
|
|
18
|
+
* discard `buildParticipantOperationKeys`, the only thing that lets the resume
|
|
19
|
+
* path re-detect the drift; the next attempt would fall back to the indexer's
|
|
20
|
+
* copy, pass the hash check, and broadcast the very transaction this refused,
|
|
21
|
+
* locking BTC until the refund timelock.
|
|
22
|
+
*
|
|
23
|
+
* So: callers must keep the pending record when they catch this.
|
|
24
|
+
*/
|
|
25
|
+
export declare class ParticipantKeyDriftError extends Error {
|
|
26
|
+
constructor(message: string);
|
|
27
|
+
}
|
|
28
|
+
export declare function isParticipantKeyDriftError(err: unknown): err is ParticipantKeyDriftError;
|
|
29
|
+
export interface VerifyRegisteredParticipantKeysParams {
|
|
30
|
+
vaultRegistryReader: VaultRegistryReader;
|
|
31
|
+
operationKeyReader: OperationKeyReader;
|
|
32
|
+
vaultIds: readonly Hex[];
|
|
33
|
+
/**
|
|
34
|
+
* The exact key set the BTC artifacts were built with. Its `query` supplies
|
|
35
|
+
* the rosters to re-resolve against — deliberately reused rather than
|
|
36
|
+
* accepted as a separate argument, so the two can never disagree and a
|
|
37
|
+
* roster that moved since the build cannot be misreported as a key drift.
|
|
38
|
+
*/
|
|
39
|
+
expected: ParticipantKeySet;
|
|
40
|
+
}
|
|
41
|
+
export declare function verifyRegisteredParticipantKeys(params: VerifyRegisteredParticipantKeysParams): Promise<void>;
|
|
42
|
+
//# sourceMappingURL=verifyRegisteredParticipantKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyRegisteredParticipantKeys.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/verifyRegisteredParticipantKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAI5B;AAID,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,OAAO,GACX,GAAG,IAAI,wBAAwB,CAKjC;AAED,MAAM,WAAW,qCAAqC;IACpD,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,QAAQ,EAAE,SAAS,GAAG,EAAE,CAAC;IACzB;;;;;OAKG;IACH,QAAQ,EAAE,iBAAiB,CAAC;CAC7B;AAgBD,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,qCAAqC,GAC5C,OAAO,CAAC,IAAI,CAAC,CAuEf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../../signPsbtsWithFallback-C01N6Kdo.cjs"),t=require("../../../buildAndBroadcastRefund-CDzzTZ2U.cjs"),e=require("../../../peginState-CBBJw4Za.cjs");exports.computeHashlock=i.computeHashlock;exports.validateSecretAgainstHashlock=i.validateSecretAgainstHashlock;exports.BIP68NotMatureError=t.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=t.ClaimerPegoutStatusValue;exports.ParticipantKeyDriftError=t.ParticipantKeyDriftError;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=t.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=t.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=t.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=t.REFUND_VSIZE;exports.RegisteredVaultVersionMismatchError=t.RegisteredVaultVersionMismatchError;exports.activateVault=t.activateVault;exports.buildAndBroadcastRefund=t.buildAndBroadcastRefund;exports.estimateRefundFeeSats=t.estimateRefundFeeSats;exports.isDepositAmountValid=t.isDepositAmountValid;exports.isParticipantKeyDriftError=t.isParticipantKeyDriftError;exports.isPegoutTerminalStatus=t.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=t.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=t.isRegisteredVaultVersionMismatchError;exports.resolveCurrentParticipantKeys=t.resolveCurrentParticipantKeys;exports.resolveParticipantKeysAtEpochs=t.resolveParticipantKeysAtEpochs;exports.runDepositorPresignFlow=t.runDepositorPresignFlow;exports.signDepositorGraph=t.signDepositorGraph;exports.submitWotsPublicKey=t.submitWotsPublicKey;exports.validateDepositAmount=t.validateDepositAmount;exports.validateMultiVaultDepositInputs=t.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=t.validateOnChainParticipantKeys;exports.validateProviderSelection=t.validateProviderSelection;exports.validateRemainingCapacity=t.validateRemainingCapacity;exports.validateVaultAmounts=t.validateVaultAmounts;exports.validateVaultProviderPubkey=t.validateVaultProviderPubkey;exports.verifyRegisteredParticipantKeys=t.verifyRegisteredParticipantKeys;exports.verifyRegisteredVaultVersions=t.verifyRegisteredVaultVersions;exports.waitForPeginStatus=t.waitForPeginStatus;exports.ContractStatus=e.ContractStatus;exports.PeginAction=e.PeginAction;exports.canPerformAction=e.canPerformAction;exports.getPeginProtocolState=e.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=e.isActivationDeadlinePassedOnChain;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/services/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/services/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
@@ -1,39 +1,44 @@
|
|
|
1
|
-
import { c as s, v as e } from "../../../
|
|
2
|
-
import { B as
|
|
3
|
-
import { C as
|
|
1
|
+
import { c as s, v as e } from "../../../signPsbtsWithFallback-CzZFZf0I.js";
|
|
2
|
+
import { B as r, C as o, P as n, x as u, y as l, z as c, A as d, R as P, a as p, t as E, u as A, i as R, j as g, q as v, p as m, l as V, n as _, o as D, r as y, s as F, b as S, c as f, d as C, v as N, e as h, f as M, g as K, h as O, k as T, m as I, w as b } from "../../../buildAndBroadcastRefund-CCb1_z24.js";
|
|
3
|
+
import { C as k, P as x, c as B, g as w, i as X } from "../../../peginState-BB81JI6I.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
u as
|
|
11
|
-
l as
|
|
5
|
+
r as BIP68NotMatureError,
|
|
6
|
+
o as ClaimerPegoutStatusValue,
|
|
7
|
+
k as ContractStatus,
|
|
8
|
+
n as ParticipantKeyDriftError,
|
|
9
|
+
x as PeginAction,
|
|
10
|
+
u as REFUND_MAX_FEE_FRACTION_DENOMINATOR,
|
|
11
|
+
l as REFUND_MAX_FEE_FRACTION_NUMERATOR,
|
|
12
|
+
c as REFUND_MAX_FEE_RATE_SATS_VB,
|
|
12
13
|
d as REFUND_VSIZE,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
P as RegisteredVaultVersionMismatchError,
|
|
15
|
+
p as activateVault,
|
|
16
|
+
E as buildAndBroadcastRefund,
|
|
17
|
+
B as canPerformAction,
|
|
17
18
|
s as computeHashlock,
|
|
18
19
|
A as estimateRefundFeeSats,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
w as getPeginProtocolState,
|
|
21
|
+
X as isActivationDeadlinePassedOnChain,
|
|
22
|
+
R as isDepositAmountValid,
|
|
23
|
+
g as isParticipantKeyDriftError,
|
|
24
|
+
v as isPegoutTerminalStatus,
|
|
23
25
|
m as isRecognizedPegoutStatus,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
F as
|
|
29
|
-
S as
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
V as isRegisteredVaultVersionMismatchError,
|
|
27
|
+
_ as resolveCurrentParticipantKeys,
|
|
28
|
+
D as resolveParticipantKeysAtEpochs,
|
|
29
|
+
y as runDepositorPresignFlow,
|
|
30
|
+
F as signDepositorGraph,
|
|
31
|
+
S as submitWotsPublicKey,
|
|
32
|
+
f as validateDepositAmount,
|
|
33
|
+
C as validateMultiVaultDepositInputs,
|
|
34
|
+
N as validateOnChainParticipantKeys,
|
|
35
|
+
h as validateProviderSelection,
|
|
36
|
+
M as validateRemainingCapacity,
|
|
33
37
|
e as validateSecretAgainstHashlock,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
K as validateVaultAmounts,
|
|
39
|
+
O as validateVaultProviderPubkey,
|
|
40
|
+
T as verifyRegisteredParticipantKeys,
|
|
41
|
+
I as verifyRegisteredVaultVersions,
|
|
42
|
+
b as waitForPeginStatus
|
|
38
43
|
};
|
|
39
44
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Address, Hex } from 'viem';
|
|
2
|
+
import { KeyEpochs, OperationKeyQuery, OperationKeyReader, RawOperationKeys, RawPayoutScripts } from '../../../../clients/eth/types';
|
|
3
|
+
/** Epoch every operator's genesis key is bonded at. */
|
|
4
|
+
export declare const EPOCH_GENESIS = 0n;
|
|
5
|
+
/** Epoch after the rotations above have landed. */
|
|
6
|
+
export declare const EPOCH_AFTER_ROTATION = 5n;
|
|
7
|
+
/** Derive a deterministic, real secp256k1 x-only pubkey (lowercase, no `0x`). */
|
|
8
|
+
export declare function xOnlyFromSeed(seed: number): string;
|
|
9
|
+
export declare const KEYS: {
|
|
10
|
+
readonly vpGenesis: string;
|
|
11
|
+
readonly vpRotated: string;
|
|
12
|
+
readonly keeperAGenesis: string;
|
|
13
|
+
readonly keeperBGenesis: string;
|
|
14
|
+
readonly keeperBRotated: string;
|
|
15
|
+
readonly keeperCGenesis: string;
|
|
16
|
+
readonly challenger1Genesis: string;
|
|
17
|
+
readonly challenger1Rotated: string;
|
|
18
|
+
readonly challenger2Genesis: string;
|
|
19
|
+
/** Unrelated key, for collision and unknown-participant cases. */
|
|
20
|
+
readonly outsider: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const ADDRESSES: {
|
|
23
|
+
readonly vaultProvider: Address;
|
|
24
|
+
readonly applicationEntryPoint: Address;
|
|
25
|
+
readonly keeperA: Address;
|
|
26
|
+
readonly keeperB: Address;
|
|
27
|
+
readonly keeperC: Address;
|
|
28
|
+
readonly challenger1: Address;
|
|
29
|
+
readonly challenger2: Address;
|
|
30
|
+
};
|
|
31
|
+
/** Keeper C's registered payout script — a P2WPKH, deliberately not BIP-86. */
|
|
32
|
+
export declare const KEEPER_C_PAYOUT_SCRIPT: Hex;
|
|
33
|
+
/** The roster + VP genesis, as every call site supplies them. */
|
|
34
|
+
export declare function buildQuery(overrides?: Partial<OperationKeyQuery>): OperationKeyQuery;
|
|
35
|
+
export declare function epochsAt(epoch: bigint): KeyEpochs;
|
|
36
|
+
/**
|
|
37
|
+
* An {@link OperationKeyReader} backed by the histories above.
|
|
38
|
+
*
|
|
39
|
+
* Resolves the same way the contracts do, so tests exercise the resolver's own
|
|
40
|
+
* logic rather than a viem mock's. `calls` records what was asked, which is how
|
|
41
|
+
* "current mode never issues an epoch read" is asserted.
|
|
42
|
+
*/
|
|
43
|
+
export declare class FakeOperationKeyReader implements OperationKeyReader {
|
|
44
|
+
private overrides;
|
|
45
|
+
readonly calls: string[];
|
|
46
|
+
constructor(overrides?: {
|
|
47
|
+
/** Force a specific raw key for one admin address, e.g. to test collisions. */
|
|
48
|
+
forceKey?: Map<Address, Hex>;
|
|
49
|
+
});
|
|
50
|
+
private apply;
|
|
51
|
+
getCurrentOperationKeys(query: OperationKeyQuery): Promise<RawOperationKeys>;
|
|
52
|
+
getOperationKeysAtEpochs(query: OperationKeyQuery, epochs: KeyEpochs): Promise<RawOperationKeys>;
|
|
53
|
+
getPayoutScriptsAtEpochs(query: OperationKeyQuery, epochs: KeyEpochs): Promise<RawPayoutScripts>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=rotation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rotation.d.ts","sourceRoot":"","sources":["../../../../../../../src/tbv/core/services/participants/__tests__/fixtures/rotation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,KAAK,EAEV,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AAGvC,uDAAuD;AACvD,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,mDAAmD;AACnD,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMlD;AAQD,eAAO,MAAM,IAAI;;;;;;;;;;IAUf,kEAAkE;;CAE1D,CAAC;AAEX,eAAO,MAAM,SAAS;4BAC2C,OAAO;oCAEpB,OAAO;sBACA,OAAO;sBACP,OAAO;sBACP,OAAO;0BACH,OAAO;0BACP,OAAO;CAC5D,CAAC;AAEX,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,EAAiC,GAAG,CAAC;AAsFxE,iEAAiE;AACjE,wBAAgB,UAAU,CACxB,SAAS,GAAE,OAAO,CAAC,iBAAiB,CAAM,GACzC,iBAAiB,CASnB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAMjD;AAED;;;;;;GAMG;AACH,qBAAa,sBAAuB,YAAW,kBAAkB;IAI7D,OAAO,CAAC,SAAS;IAHnB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,CAAM;gBAGpB,SAAS,GAAE;QACjB,+EAA+E;QAC/E,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;KACzB;IAGR,OAAO,CAAC,KAAK;IAKP,uBAAuB,CAC3B,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,gBAAgB,CAAC;IAkBtB,wBAAwB,CAC5B,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,gBAAgB,CAAC;IAwBtB,wBAAwB,CAC5B,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,gBAAgB,CAAC;CAe7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveParticipantKeys.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/participants/__tests__/resolveParticipantKeys.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RFC-006 participant operation-key resolution.
|
|
3
|
+
*
|
|
4
|
+
* @module services/participants
|
|
5
|
+
*/
|
|
6
|
+
export { resolveCurrentParticipantKeys, resolveParticipantKeysAtEpochs, } from './resolveParticipantKeys';
|
|
7
|
+
export type { KeyResolutionMode, ParticipantKeySet, ResolvedParticipant, } from './types';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/participants/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { KeyEpochs, OperationKeyQuery, OperationKeyReader } from '../../clients/eth/types';
|
|
2
|
+
import { ParticipantKeySet } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Resolve every participant's *current* operation key.
|
|
5
|
+
*
|
|
6
|
+
* Use for a peg-in being built now. Issues no epoch read, so it never touches
|
|
7
|
+
* the extended `getBtcVaultProtocolInfo` ABI.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveCurrentParticipantKeys(params: {
|
|
10
|
+
operationKeyReader: OperationKeyReader;
|
|
11
|
+
query: OperationKeyQuery;
|
|
12
|
+
}): Promise<ParticipantKeySet>;
|
|
13
|
+
/**
|
|
14
|
+
* Resolve every participant's operation key bonded at a vault's frozen epochs.
|
|
15
|
+
*
|
|
16
|
+
* Use for every existing-vault path: resume, payout signing, refund. The
|
|
17
|
+
* rosters in `query` must be read at the vault's frozen *membership* versions,
|
|
18
|
+
* because those roster keys are the genesis the keeper/challenger getters fall
|
|
19
|
+
* back to.
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveParticipantKeysAtEpochs(params: {
|
|
22
|
+
operationKeyReader: OperationKeyReader;
|
|
23
|
+
query: OperationKeyQuery;
|
|
24
|
+
epochs: KeyEpochs;
|
|
25
|
+
}): Promise<ParticipantKeySet>;
|
|
26
|
+
//# sourceMappingURL=resolveParticipantKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveParticipantKeys.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/participants/resolveParticipantKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAEnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,SAAS,CAAC;AAmHjB;;;;;GAKG;AACH,wBAAsB,6BAA6B,CAAC,MAAM,EAAE;IAC1D,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,KAAK,EAAE,iBAAiB,CAAC;CAC1B,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAK7B;AAED;;;;;;;GAOG;AACH,wBAAsB,8BAA8B,CAAC,MAAM,EAAE;IAC3D,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE,SAAS,CAAC;CACnB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAS7B"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Address } from 'viem';
|
|
2
|
+
import { KeyEpochs, OnChainBtcPubkey, OperationKeyQuery } from '../../clients/eth/types';
|
|
3
|
+
/** One operator's resolved identity: who it is, and which key it signs with. */
|
|
4
|
+
export interface ResolvedParticipant {
|
|
5
|
+
/**
|
|
6
|
+
* The operator's admin ETH address — its stable identity and the lookup key
|
|
7
|
+
* for its operation-key history. This is the roster entry's `ethAddress`.
|
|
8
|
+
*/
|
|
9
|
+
adminAddress: Address;
|
|
10
|
+
/**
|
|
11
|
+
* The operator's genesis BTC key: its roster entry / registration key.
|
|
12
|
+
* x-only, lowercase, no `0x`. Retained because indexer hints are still
|
|
13
|
+
* expressed in these, and because a keeper's genesis is the fallback the
|
|
14
|
+
* `...OrGenesis` getters resolve to.
|
|
15
|
+
*/
|
|
16
|
+
genesisBtcPubkey: OnChainBtcPubkey;
|
|
17
|
+
/**
|
|
18
|
+
* The operation key this resolution produced — the key that actually goes
|
|
19
|
+
* into the Bitcoin scripts. Equals `genesisBtcPubkey` until the operator
|
|
20
|
+
* rotates.
|
|
21
|
+
*/
|
|
22
|
+
operationBtcPubkey: OnChainBtcPubkey;
|
|
23
|
+
/** Whether the operation key differs from the genesis key. */
|
|
24
|
+
rotated: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** How a {@link ParticipantKeySet} was resolved. Carried for diagnostics. */
|
|
27
|
+
export type KeyResolutionMode = {
|
|
28
|
+
mode: "current";
|
|
29
|
+
} | {
|
|
30
|
+
mode: "epochs";
|
|
31
|
+
epochs: KeyEpochs;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Every participant's resolved operation key for one vault (or one about to be
|
|
35
|
+
* created).
|
|
36
|
+
*
|
|
37
|
+
* The pairs are the source of truth; the sorted arrays are derived from them.
|
|
38
|
+
* Never invert that. Rotation changes a key, and therefore changes where it
|
|
39
|
+
* lands in the lexicographic sort, so an index-join from a sorted array back
|
|
40
|
+
* to a roster entry is wrong the moment anyone rotates.
|
|
41
|
+
*/
|
|
42
|
+
export interface ParticipantKeySet {
|
|
43
|
+
vaultProvider: ResolvedParticipant;
|
|
44
|
+
vaultKeepers: ResolvedParticipant[];
|
|
45
|
+
universalChallengers: ResolvedParticipant[];
|
|
46
|
+
/** Sorted keeper operation keys — what script construction consumes. */
|
|
47
|
+
vaultKeeperOperationKeysSorted: string[];
|
|
48
|
+
/** Sorted challenger operation keys — what script construction consumes. */
|
|
49
|
+
universalChallengerOperationKeysSorted: string[];
|
|
50
|
+
/** Provenance of this resolution. */
|
|
51
|
+
resolvedAt: KeyResolutionMode;
|
|
52
|
+
/**
|
|
53
|
+
* The rosters and addresses this set was resolved against.
|
|
54
|
+
*
|
|
55
|
+
* Carried so a later re-resolution — notably the post-registration
|
|
56
|
+
* read-after-mine check — reuses the *same* roster rather than re-deriving
|
|
57
|
+
* one that may since have moved, which would report a roster drift as a key
|
|
58
|
+
* drift.
|
|
59
|
+
*/
|
|
60
|
+
query: OperationKeyQuery;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/participants/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAEjC,gFAAgF;AAChF,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,YAAY,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,gBAAgB,EAAE,gBAAgB,CAAC;IACnC;;;;OAIG;IACH,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,8DAA8D;IAC9D,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC;AAE1C;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,mBAAmB,CAAC;IACnC,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;IAC5C,wEAAwE;IACxE,8BAA8B,EAAE,MAAM,EAAE,CAAC;IACzC,4EAA4E;IAC5E,sCAAsC,EAAE,MAAM,EAAE,CAAC;IACjD,qCAAqC;IACrC,UAAU,EAAE,iBAAiB,CAAC;IAC9B;;;;;;;OAOG;IACH,KAAK,EAAE,iBAAiB,CAAC;CAC1B"}
|
package/dist/tbv/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../challengeAssert-Cu-PtJ1g.cjs"),R=require("../constants-BqU1Uz15.cjs"),n=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../verifyScriptPathSchnorrSignature-BZhX-SOd.cjs"),S=require("../peginInput-CAiiDZeO.cjs"),E=require("../noPayout-Cb8vFrkY.cjs"),t=require("../bitcoin-CHfKAhcI.cjs"),l=require("../validation-CDbOaDj7.cjs"),m=require("../signing-Bnsro0hE.cjs"),c=require("../PeginManager-CcjGRo4O.cjs"),d=require("../PayoutManager-Cu4_l-_Y.cjs"),_=require("../ApplicationRegistry.abi-CLaa6E99.cjs"),O=require("../BTCVaultRegistry.abi-JdeqLz4x.cjs"),P=require("../errors-CGcNP0rV.cjs"),A=require("../deriveVaultRoot-CebLadyJ.cjs"),b=require("../parseFundingOutpoints-C_-PT9BT.cjs"),o=require("../waitForTransactionReceiptSmartAware-AgZ-3WV_.cjs"),r=require("../fundPeginTransaction-BLD8FRL9.cjs"),p=require("../reservation-ClEs2X0H.cjs"),i=require("../mempoolApi-DkyKmmgI.cjs"),a=require("../primeVpAuth-y-4A88ah.cjs"),s=require("../types-WA0LrDk1.cjs"),I=require("../errors-Bfjxg_iJ.cjs"),e=require("../buildAndBroadcastRefund-Cq01wyZX.cjs"),T=require("../peginState-CBBJw4Za.cjs");exports.buildChallengeAssertPsbt=g.buildChallengeAssertPsbt;exports.computeNumLocalChallengers=g.computeNumLocalChallengers;exports.assertValidVaultCoreVersion=R.assertValidVaultCoreVersion;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>n.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>n.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>n.deriveVaultId});Object.defineProperty(exports,"expandAuthAnchor",{enumerable:!0,get:()=>n.expandAuthAnchor});Object.defineProperty(exports,"expandHashlockSecret",{enumerable:!0,get:()=>n.expandHashlockSecret});Object.defineProperty(exports,"expandWotsSeed",{enumerable:!0,get:()=>n.expandWotsSeed});Object.defineProperty(exports,"peginP2aAnchorOutput",{enumerable:!0,get:()=>n.peginP2aAnchorOutput});Object.defineProperty(exports,"supportedTxGraphVersions",{enumerable:!0,get:()=>n.supportedTxGraphVersions});Object.defineProperty(exports,"validatePeginP2aAnchor",{enumerable:!0,get:()=>n.validatePeginP2aAnchor});exports.PsbtSubstitutionError=u.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=u.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=u.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=u.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=u.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=u.buildPrePeginPsbt;exports.createPayoutScript=u.createPayoutScript;exports.extractPayoutSignature=u.extractPayoutSignature;exports.buildPeginInputPsbt=S.buildPeginInputPsbt;exports.extractPeginInputSignature=S.extractPeginInputSignature;exports.finalizePeginInputPsbt=S.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=E.buildNoPayoutPsbt;exports.buildRefundPsbt=E.buildRefundPsbt;exports.deriveBip86ScriptPubKeyHex=t.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=t.deriveNativeSegwitAddress;exports.deriveTaprootAddress=t.deriveTaprootAddress;exports.ensureHexPrefix=t.ensureHexPrefix;exports.formatSatoshisToBtc=t.formatSatoshisToBtc;exports.getNetwork=t.getNetwork;exports.getSortedXOnlyPubkeys=t.getSortedXOnlyPubkeys;exports.hexToUint8Array=t.hexToUint8Array;exports.isAddressFromPublicKey=t.isAddressFromPublicKey;exports.isValidHex=t.isValidHex;exports.processPublicKeyToXOnly=t.processPublicKeyToXOnly;exports.stripHexPrefix=t.stripHexPrefix;exports.toXOnly=t.toXOnly;exports.uint8ArrayToHex=t.uint8ArrayToHex;exports.validateWalletPubkey=t.validateWalletPubkey;exports.BITCOIN_ADDRESS_RE=l.BITCOIN_ADDRESS_RE;exports.HEX_RE=l.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=l.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=l.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=l.TXID_RE;exports.combineAbortSignals=l.combineAbortSignals;exports.createTaprootScriptPathSignOptions=m.createTaprootScriptPathSignOptions;exports.PeginManager=c.PeginManager;exports.buildDepositTerms=c.buildDepositTerms;exports.computeWotsBlockPublicKeysHash=c.computeWotsBlockPublicKeysHash;exports.deriveWotsBlocksFromSeed=c.deriveWotsBlocksFromSeed;exports.estimateSubmitPeginRequestBatchGas=c.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=d.PayoutManager;exports.computeHashlock=d.computeHashlock;exports.forwardDepositApproval=d.forwardDepositApproval;exports.supportsDepositApproval=d.supportsDepositApproval;exports.validateSecretAgainstHashlock=d.validateSecretAgainstHashlock;exports.ApplicationRegistryABI=_.ApplicationRegistryABI;exports.ProtocolParamsABI=_.ProtocolParamsABI;exports.BTCVaultRegistryABI=O.BTCVaultRegistryABI;exports.CONTRACT_ERRORS=P.CONTRACT_ERRORS;exports.extractErrorData=P.extractErrorData;exports.getContractErrorMessage=P.getContractErrorMessage;exports.handleContractError=P.handleContractError;exports.isKnownContractError=P.isKnownContractError;exports.VAULT_APP_NAME=A.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=A.buildFundingOutpointsCommitment;exports.buildVaultContext=A.buildVaultContext;exports.deriveVaultRoot=A.deriveVaultRoot;exports.parseFundingOutpointsFromTx=b.parseFundingOutpointsFromTx;exports.BitcoinScriptType=o.BitcoinScriptType;exports.applyChangeOutputPolicy=o.applyChangeOutputPolicy;exports.calculateBtcTxHash=o.calculateBtcTxHash;exports.computeChangeOutputFeeSats=o.computeChangeOutputFeeSats;exports.computeMaxDeposit=o.computeMaxDeposit;exports.computePeginBaseFeeSats=o.computePeginBaseFeeSats;exports.getDustThreshold=o.getDustThreshold;exports.getPsbtInputFields=o.getPsbtInputFields;exports.getScriptType=o.getScriptType;exports.selectUtxosForPegin=o.selectUtxosForPegin;exports.shouldAddChangeOutput=o.shouldAddChangeOutput;exports.waitForTransactionReceiptSmartAware=o.waitForTransactionReceiptSmartAware;exports.BTC_DUST_SAT=r.BTC_DUST_SAT;exports.DUST_THRESHOLD=r.DUST_THRESHOLD;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=r.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=r.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=r.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=r.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=r.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=r.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=r.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=r.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=r.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=r.fundPeginTransaction;exports.parseUnfundedWasmTransaction=r.parseUnfundedWasmTransaction;exports.peginOutputCount=r.peginOutputCount;exports.rateBasedTxBufferFee=r.rateBasedTxBufferFee;exports.UtxoNotAvailableError=p.UtxoNotAvailableError;exports.assertUtxosAvailable=p.assertUtxosAvailable;exports.extractInputsFromTransaction=p.extractInputsFromTransaction;exports.findOverlappingPendingVaults=p.findOverlappingPendingVaults;exports.validateUtxosAvailable=p.validateUtxosAvailable;exports.MEMPOOL_API_URLS=i.MEMPOOL_API_URLS;exports.ViemVaultRegistryReader=i.ViemVaultRegistryReader;exports.getAddressTxs=i.getAddressTxs;exports.getAddressUtxos=i.getAddressUtxos;exports.getMempoolApiUrl=i.getMempoolApiUrl;exports.getNetworkFees=i.getNetworkFees;exports.getOutspend=i.getOutspend;exports.getTipHeight=i.getTipHeight;exports.getTxHex=i.getTxHex;exports.getTxInfo=i.getTxInfo;exports.getUtxoInfo=i.getUtxoInfo;exports.pushTx=i.pushTx;exports.validateOffchainParams=i.validateOffchainParams;exports.validatePegInConfiguration=i.validatePegInConfiguration;exports.validateTBVProtocolParams=i.validateTBVProtocolParams;exports.OnChainBtcVaultStatus=a.OnChainBtcVaultStatus;exports.ServerIdentityError=a.ServerIdentityError;exports.VaultProviderRpcClient=a.VaultProviderRpcClient;exports.ViemProtocolParamsReader=a.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=a.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=a.ViemVaultKeeperReader;exports.VpResponseValidationError=a.VpResponseValidationError;exports.VpTokenRegistry=a.VpTokenRegistry;exports.batchPollByProvider=a.batchPollByProvider;exports.createAuthenticatedVpClient=a.createAuthenticatedVpClient;exports.primeVpTokenRegistry=a.primeVpTokenRegistry;exports.resolveProtocolAddresses=a.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=a.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=a.verifyServerIdentity;exports.vpTokenRegistry=a.vpTokenRegistry;exports.AUTH_EXPIRED_DATA_KIND=s.AUTH_EXPIRED_DATA_KIND;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_BATCH_MAX_SIZE=s.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=s.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;exports.isWotsMismatchError=I.isWotsMismatchError;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=e.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=e.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=e.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.RegisteredVaultVersionMismatchError=e.RegisteredVaultVersionMismatchError;exports.activateVault=e.activateVault;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.runDepositorPresignFlow=e.runDepositorPresignFlow;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=e.validateOnChainParticipantKeys;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=T.ContractStatus;exports.PeginAction=T.PeginAction;exports.canPerformAction=T.canPerformAction;exports.getPeginProtocolState=T.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=T.isActivationDeadlinePassedOnChain;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../challengeAssert-Cu-PtJ1g.cjs"),_=require("../constants-BqU1Uz15.cjs"),n=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../verifyScriptPathSchnorrSignature-C-84KJ6U.cjs"),E=require("../peginInput-CAiiDZeO.cjs"),S=require("../noPayout-Djrv31V5.cjs"),r=require("../bitcoin-CHfKAhcI.cjs"),l=require("../validation-CDbOaDj7.cjs"),m=require("../signing-Bnsro0hE.cjs"),c=require("../PeginManager-iDbqXsKD.cjs"),P=require("../signPsbtsWithFallback-C01N6Kdo.cjs"),R=require("../ProtocolParams.abi-C8U7BHCS.cjs"),b=require("../BTCVaultRegistry.abi-AUAyCHal.cjs"),O=require("../BTCVaultRegistryKeyEpochs.abi-_NERAdc5.cjs"),d=require("../errors-CGcNP0rV.cjs"),A=require("../deriveVaultRoot-CebLadyJ.cjs"),y=require("../parseFundingOutpoints-C_-PT9BT.cjs"),o=require("../waitForTransactionReceiptSmartAware-AgZ-3WV_.cjs"),i=require("../fundPeginTransaction-BLD8FRL9.cjs"),p=require("../reservation-ClEs2X0H.cjs"),a=require("../mempoolApi-Dsm2VPXp.cjs"),t=require("../primeVpAuth-BlxUcdBf.cjs"),s=require("../json-rpc-client-fUoK-TzT.cjs"),V=require("../onChainBtcPubkey-Cd9kpz-S.cjs"),I=require("../errors-Bfjxg_iJ.cjs"),e=require("../buildAndBroadcastRefund-CDzzTZ2U.cjs"),T=require("../peginState-CBBJw4Za.cjs");exports.buildChallengeAssertPsbt=g.buildChallengeAssertPsbt;exports.computeNumLocalChallengers=g.computeNumLocalChallengers;exports.assertValidVaultCoreVersion=_.assertValidVaultCoreVersion;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>n.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>n.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>n.deriveVaultId});Object.defineProperty(exports,"expandAuthAnchor",{enumerable:!0,get:()=>n.expandAuthAnchor});Object.defineProperty(exports,"expandHashlockSecret",{enumerable:!0,get:()=>n.expandHashlockSecret});Object.defineProperty(exports,"expandWotsSeed",{enumerable:!0,get:()=>n.expandWotsSeed});Object.defineProperty(exports,"peginP2aAnchorOutput",{enumerable:!0,get:()=>n.peginP2aAnchorOutput});Object.defineProperty(exports,"supportedTxGraphVersions",{enumerable:!0,get:()=>n.supportedTxGraphVersions});Object.defineProperty(exports,"validatePeginP2aAnchor",{enumerable:!0,get:()=>n.validatePeginP2aAnchor});exports.PsbtSubstitutionError=u.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=u.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=u.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=u.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=u.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=u.buildPrePeginPsbt;exports.createPayoutScript=u.createPayoutScript;exports.extractPayoutSignature=u.extractPayoutSignature;exports.buildPeginInputPsbt=E.buildPeginInputPsbt;exports.extractPeginInputSignature=E.extractPeginInputSignature;exports.finalizePeginInputPsbt=E.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=S.buildNoPayoutPsbt;exports.buildRefundPsbt=S.buildRefundPsbt;exports.deriveBip86ScriptPubKeyHex=r.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=r.deriveNativeSegwitAddress;exports.deriveTaprootAddress=r.deriveTaprootAddress;exports.ensureHexPrefix=r.ensureHexPrefix;exports.formatSatoshisToBtc=r.formatSatoshisToBtc;exports.getNetwork=r.getNetwork;exports.getSortedXOnlyPubkeys=r.getSortedXOnlyPubkeys;exports.hexToUint8Array=r.hexToUint8Array;exports.isAddressFromPublicKey=r.isAddressFromPublicKey;exports.isValidHex=r.isValidHex;exports.processPublicKeyToXOnly=r.processPublicKeyToXOnly;exports.stripHexPrefix=r.stripHexPrefix;exports.toXOnly=r.toXOnly;exports.uint8ArrayToHex=r.uint8ArrayToHex;exports.validateWalletPubkey=r.validateWalletPubkey;exports.BITCOIN_ADDRESS_RE=l.BITCOIN_ADDRESS_RE;exports.HEX_RE=l.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=l.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=l.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=l.TXID_RE;exports.combineAbortSignals=l.combineAbortSignals;exports.createTaprootScriptPathSignOptions=m.createTaprootScriptPathSignOptions;exports.PeginManager=c.PeginManager;exports.buildDepositTerms=c.buildDepositTerms;exports.computeWotsBlockPublicKeysHash=c.computeWotsBlockPublicKeysHash;exports.deriveWotsBlocksFromSeed=c.deriveWotsBlocksFromSeed;exports.estimateSubmitPeginRequestBatchGas=c.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=P.PayoutManager;exports.computeHashlock=P.computeHashlock;exports.forwardDepositApproval=P.forwardDepositApproval;exports.supportsDepositApproval=P.supportsDepositApproval;exports.validateSecretAgainstHashlock=P.validateSecretAgainstHashlock;exports.ApplicationRegistryABI=R.ApplicationRegistryABI;exports.ProtocolParamsABI=R.ProtocolParamsABI;exports.BTCVaultRegistryABI=b.BTCVaultRegistryABI;exports.BTCVaultRegistryKeyEpochsABI=O.BTCVaultRegistryKeyEpochsABI;exports.CONTRACT_ERRORS=d.CONTRACT_ERRORS;exports.extractErrorData=d.extractErrorData;exports.getContractErrorMessage=d.getContractErrorMessage;exports.handleContractError=d.handleContractError;exports.isKnownContractError=d.isKnownContractError;exports.VAULT_APP_NAME=A.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=A.buildFundingOutpointsCommitment;exports.buildVaultContext=A.buildVaultContext;exports.deriveVaultRoot=A.deriveVaultRoot;exports.parseFundingOutpointsFromTx=y.parseFundingOutpointsFromTx;exports.BitcoinScriptType=o.BitcoinScriptType;exports.applyChangeOutputPolicy=o.applyChangeOutputPolicy;exports.calculateBtcTxHash=o.calculateBtcTxHash;exports.computeChangeOutputFeeSats=o.computeChangeOutputFeeSats;exports.computeMaxDeposit=o.computeMaxDeposit;exports.computePeginBaseFeeSats=o.computePeginBaseFeeSats;exports.getDustThreshold=o.getDustThreshold;exports.getPsbtInputFields=o.getPsbtInputFields;exports.getScriptType=o.getScriptType;exports.selectUtxosForPegin=o.selectUtxosForPegin;exports.shouldAddChangeOutput=o.shouldAddChangeOutput;exports.waitForTransactionReceiptSmartAware=o.waitForTransactionReceiptSmartAware;exports.BTC_DUST_SAT=i.BTC_DUST_SAT;exports.DUST_THRESHOLD=i.DUST_THRESHOLD;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=i.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=i.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=i.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=i.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=i.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=i.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=i.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=i.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=i.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=i.fundPeginTransaction;exports.parseUnfundedWasmTransaction=i.parseUnfundedWasmTransaction;exports.peginOutputCount=i.peginOutputCount;exports.rateBasedTxBufferFee=i.rateBasedTxBufferFee;exports.UtxoNotAvailableError=p.UtxoNotAvailableError;exports.assertUtxosAvailable=p.assertUtxosAvailable;exports.extractInputsFromTransaction=p.extractInputsFromTransaction;exports.findOverlappingPendingVaults=p.findOverlappingPendingVaults;exports.validateUtxosAvailable=p.validateUtxosAvailable;exports.MEMPOOL_API_URLS=a.MEMPOOL_API_URLS;exports.ViemVaultRegistryReader=a.ViemVaultRegistryReader;exports.getAddressTxs=a.getAddressTxs;exports.getAddressUtxos=a.getAddressUtxos;exports.getMempoolApiUrl=a.getMempoolApiUrl;exports.getNetworkFees=a.getNetworkFees;exports.getOutspend=a.getOutspend;exports.getTipHeight=a.getTipHeight;exports.getTxHex=a.getTxHex;exports.getTxInfo=a.getTxInfo;exports.getUtxoInfo=a.getUtxoInfo;exports.pushTx=a.pushTx;exports.validateOffchainParams=a.validateOffchainParams;exports.validatePegInConfiguration=a.validatePegInConfiguration;exports.validateTBVProtocolParams=a.validateTBVProtocolParams;exports.OnChainBtcVaultStatus=t.OnChainBtcVaultStatus;exports.ServerIdentityError=t.ServerIdentityError;exports.VaultProviderRpcClient=t.VaultProviderRpcClient;exports.ViemOperationKeyReader=t.ViemOperationKeyReader;exports.ViemProtocolParamsReader=t.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=t.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=t.ViemVaultKeeperReader;exports.VpResponseValidationError=t.VpResponseValidationError;exports.VpTokenRegistry=t.VpTokenRegistry;exports.batchPollByProvider=t.batchPollByProvider;exports.createAuthenticatedVpClient=t.createAuthenticatedVpClient;exports.primeVpTokenRegistry=t.primeVpTokenRegistry;exports.resolveProtocolAddresses=t.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=t.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=t.verifyServerIdentity;exports.vpTokenRegistry=t.vpTokenRegistry;exports.AUTH_EXPIRED_DATA_KIND=s.AUTH_EXPIRED_DATA_KIND;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_BATCH_MAX_SIZE=s.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=s.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;exports.assertOnChainBtcPubkey=V.assertOnChainBtcPubkey;exports.isWotsMismatchError=I.isWotsMismatchError;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.ParticipantKeyDriftError=e.ParticipantKeyDriftError;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=e.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=e.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=e.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.RegisteredVaultVersionMismatchError=e.RegisteredVaultVersionMismatchError;exports.activateVault=e.activateVault;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isParticipantKeyDriftError=e.isParticipantKeyDriftError;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.resolveCurrentParticipantKeys=e.resolveCurrentParticipantKeys;exports.resolveParticipantKeysAtEpochs=e.resolveParticipantKeysAtEpochs;exports.runDepositorPresignFlow=e.runDepositorPresignFlow;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=e.validateOnChainParticipantKeys;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.verifyRegisteredParticipantKeys=e.verifyRegisteredParticipantKeys;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=T.ContractStatus;exports.PeginAction=T.PeginAction;exports.canPerformAction=T.canPerformAction;exports.getPeginProtocolState=T.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=T.isActivationDeadlinePassedOnChain;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|