@babylonlabs-io/ts-sdk 3.0.2 → 3.1.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/ApplicationRegistry.abi-s8cQ1ooR.js +160 -0
- package/dist/ApplicationRegistry.abi-s8cQ1ooR.js.map +1 -0
- package/dist/ApplicationRegistry.abi-sMiTWmnL.cjs +2 -0
- package/dist/ApplicationRegistry.abi-sMiTWmnL.cjs.map +1 -0
- package/dist/{BTCVaultRegistry.abi-BQ5tFNSu.cjs → BTCVaultRegistry.abi-CohlJX7c.cjs} +2 -2
- package/dist/{BTCVaultRegistry.abi-BQ5tFNSu.cjs.map → BTCVaultRegistry.abi-CohlJX7c.cjs.map} +1 -1
- package/dist/{BTCVaultRegistry.abi-B0x9_Bza.js → BTCVaultRegistry.abi-DBW0dyqH.js} +63 -1
- package/dist/{BTCVaultRegistry.abi-B0x9_Bza.js.map → BTCVaultRegistry.abi-DBW0dyqH.js.map} +1 -1
- package/dist/{PayoutManager-BSwbUQeF.js → PayoutManager-BZ212yml.js} +124 -123
- package/dist/PayoutManager-BZ212yml.js.map +1 -0
- package/dist/PayoutManager-DOdsgcUR.cjs +2 -0
- package/dist/PayoutManager-DOdsgcUR.cjs.map +1 -0
- package/dist/PeginManager-8EUlm10F.cjs +2 -0
- package/dist/{PeginManager-IgDHy_eU.cjs.map → PeginManager-8EUlm10F.cjs.map} +1 -1
- package/dist/{PeginManager-D8WGB8eN.js → PeginManager-QRwMUxZg.js} +45 -43
- package/dist/{PeginManager-D8WGB8eN.js.map → PeginManager-QRwMUxZg.js.map} +1 -1
- package/dist/{ProtocolParams.abi-q0AidvYX.js → ProtocolParams.abi-CKOVqFJP.js} +2 -158
- package/dist/ProtocolParams.abi-CKOVqFJP.js.map +1 -0
- package/dist/ProtocolParams.abi-CjrT0545.cjs +2 -0
- package/dist/ProtocolParams.abi-CjrT0545.cjs.map +1 -0
- package/dist/btcTxHash-BRZ8_EZq.js +9 -0
- package/dist/btcTxHash-BRZ8_EZq.js.map +1 -0
- package/dist/btcTxHash-CGb5BqFL.cjs +2 -0
- package/dist/btcTxHash-CGb5BqFL.cjs.map +1 -0
- package/dist/buildAndBroadcastReclaim-DjX7wVb2.cjs +2 -0
- package/dist/buildAndBroadcastReclaim-DjX7wVb2.cjs.map +1 -0
- package/dist/buildAndBroadcastReclaim-DoprHX7o.js +3077 -0
- package/dist/buildAndBroadcastReclaim-DoprHX7o.js.map +1 -0
- package/dist/buildVaultContextInputForClaim-9XZaqIiw.cjs +2 -0
- package/dist/buildVaultContextInputForClaim-9XZaqIiw.cjs.map +1 -0
- package/dist/buildVaultContextInputForClaim-DhBoQKyN.js +25 -0
- package/dist/buildVaultContextInputForClaim-DhBoQKyN.js.map +1 -0
- package/dist/constants-BeYquVd-.js +36 -0
- package/dist/constants-BeYquVd-.js.map +1 -0
- package/dist/constants-BwCg5K6R.cjs +2 -0
- package/dist/constants-BwCg5K6R.cjs.map +1 -0
- package/dist/{index-D2mybjXD.js → index-CVBtBjQ5.js} +2 -2
- package/dist/{index-D2mybjXD.js.map → index-CVBtBjQ5.js.map} +1 -1
- package/dist/{index-MRdle0fs.cjs → index-DpjYs5yr.cjs} +2 -2
- package/dist/{index-MRdle0fs.cjs.map → index-DpjYs5yr.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +288 -260
- package/dist/index.js.map +1 -1
- package/dist/{noPayout-qBXWKwav.js → noPayout-B-vGXJ-V.js} +3 -3
- package/dist/{noPayout-qBXWKwav.js.map → noPayout-B-vGXJ-V.js.map} +1 -1
- package/dist/{noPayout-DAWBQ0eG.cjs → noPayout-DOHak0ui.cjs} +2 -2
- package/dist/{noPayout-DAWBQ0eG.cjs.map → noPayout-DOHak0ui.cjs.map} +1 -1
- package/dist/pegin-registration-client-BWMwxtr8.js +718 -0
- package/dist/pegin-registration-client-BWMwxtr8.js.map +1 -0
- package/dist/pegin-registration-client-D4EguWaz.cjs +2 -0
- package/dist/pegin-registration-client-D4EguWaz.cjs.map +1 -0
- package/dist/{primeVpAuth-BDWBKYhv.cjs → primeVpAuth-BPj2TPdD.cjs} +2 -2
- package/dist/{primeVpAuth-BDWBKYhv.cjs.map → primeVpAuth-BPj2TPdD.cjs.map} +1 -1
- package/dist/{primeVpAuth-D0ZnsjRi.js → primeVpAuth-CiCdRNGf.js} +2 -2
- package/dist/{primeVpAuth-D0ZnsjRi.js.map → primeVpAuth-CiCdRNGf.js.map} +1 -1
- package/dist/registration-records-CKLAv3gw.js +447 -0
- package/dist/registration-records-CKLAv3gw.js.map +1 -0
- package/dist/registration-records-DFQgBaYi.cjs +2 -0
- package/dist/registration-records-DFQgBaYi.cjs.map +1 -0
- package/dist/{secp256k1-D-H9jmd7.js → secp256k1-BuxBFUHm.js} +3 -3
- package/dist/{secp256k1-D-H9jmd7.js.map → secp256k1-BuxBFUHm.js.map} +1 -1
- package/dist/signer-set-reader-C1VmC9_U.js +264 -0
- package/dist/signer-set-reader-C1VmC9_U.js.map +1 -0
- package/dist/signer-set-reader-C6g47hdk.cjs +2 -0
- package/dist/signer-set-reader-C6g47hdk.cjs.map +1 -0
- package/dist/{signing-Dhr2t0Z6.js → signing-C1rR4tqs.js} +9 -15
- package/dist/signing-C1rR4tqs.js.map +1 -0
- package/dist/signing-DvISftFk.cjs +2 -0
- package/dist/signing-DvISftFk.cjs.map +1 -0
- package/dist/tbv/core/clients/eth/__tests__/registration-records.test.d.ts +2 -0
- package/dist/tbv/core/clients/eth/__tests__/registration-records.test.d.ts.map +1 -0
- package/dist/tbv/core/clients/eth/claimable-event-error.d.ts +14 -0
- package/dist/tbv/core/clients/eth/claimable-event-error.d.ts.map +1 -0
- package/dist/tbv/core/clients/eth/index.cjs +1 -1
- package/dist/tbv/core/clients/eth/index.d.ts +3 -1
- package/dist/tbv/core/clients/eth/index.d.ts.map +1 -1
- package/dist/tbv/core/clients/eth/index.js +27 -21
- package/dist/tbv/core/clients/eth/index.js.map +1 -1
- package/dist/tbv/core/clients/eth/payout-script.d.ts +8 -0
- package/dist/tbv/core/clients/eth/payout-script.d.ts.map +1 -1
- package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts +13 -0
- package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts.map +1 -1
- package/dist/tbv/core/clients/eth/registration-logs-error.d.ts +11 -1
- package/dist/tbv/core/clients/eth/registration-logs-error.d.ts.map +1 -1
- package/dist/tbv/core/clients/eth/registration-records.d.ts +29 -0
- package/dist/tbv/core/clients/eth/registration-records.d.ts.map +1 -0
- package/dist/tbv/core/clients/eth/types.d.ts +120 -3
- package/dist/tbv/core/clients/eth/types.d.ts.map +1 -1
- package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts +9 -10
- 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 +56 -50
- package/dist/tbv/core/clients/index.js.map +1 -1
- package/dist/tbv/core/clients/vault-provider/status/index.cjs +1 -1
- package/dist/tbv/core/clients/vault-provider/status/index.js +1 -1
- package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +45 -0
- package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
- package/dist/tbv/core/contracts/index.cjs +1 -1
- package/dist/tbv/core/contracts/index.js +16 -15
- package/dist/tbv/core/contracts/index.js.map +1 -1
- package/dist/tbv/core/deposit-terms/__tests__/claimSiblings.test.d.ts +2 -0
- package/dist/tbv/core/deposit-terms/__tests__/claimSiblings.test.d.ts.map +1 -0
- package/dist/tbv/core/deposit-terms/__tests__/fixtures/realFundedPrePegin.d.ts +29 -0
- package/dist/tbv/core/deposit-terms/__tests__/fixtures/realFundedPrePegin.d.ts.map +1 -0
- package/dist/tbv/core/deposit-terms/__tests__/fundedPrePeginFee.test.d.ts +2 -0
- package/dist/tbv/core/deposit-terms/__tests__/fundedPrePeginFee.test.d.ts.map +1 -0
- package/dist/tbv/core/deposit-terms/__tests__/rebuildDepositTermsForClaim.golden.test.d.ts +2 -0
- package/dist/tbv/core/deposit-terms/__tests__/rebuildDepositTermsForClaim.golden.test.d.ts.map +1 -0
- package/dist/tbv/core/deposit-terms/__tests__/rebuildDepositTermsForClaim.test.d.ts +2 -0
- package/dist/tbv/core/deposit-terms/__tests__/rebuildDepositTermsForClaim.test.d.ts.map +1 -0
- package/dist/tbv/core/deposit-terms/claimSiblings.d.ts +23 -0
- package/dist/tbv/core/deposit-terms/claimSiblings.d.ts.map +1 -0
- package/dist/tbv/core/deposit-terms/fundedPrePeginFee.d.ts +15 -0
- package/dist/tbv/core/deposit-terms/fundedPrePeginFee.d.ts.map +1 -0
- package/dist/tbv/core/deposit-terms/index.d.ts +3 -0
- package/dist/tbv/core/deposit-terms/index.d.ts.map +1 -1
- package/dist/tbv/core/deposit-terms/rebuildDepositTermsForClaim.d.ts +40 -0
- package/dist/tbv/core/deposit-terms/rebuildDepositTermsForClaim.d.ts.map +1 -0
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +287 -259
- package/dist/tbv/core/index.js.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/managers/pegin/signPsbtsWithFallback.d.ts +6 -2
- package/dist/tbv/core/managers/pegin/signPsbtsWithFallback.d.ts.map +1 -1
- package/dist/tbv/core/primitives/index.cjs +1 -1
- package/dist/tbv/core/primitives/index.js +4 -4
- package/dist/tbv/core/primitives/psbt/constants.d.ts +54 -6
- package/dist/tbv/core/primitives/psbt/constants.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/__tests__/assembleWatchtowerArtifactsFromSignatures.test.d.ts +2 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/assembleWatchtowerArtifactsFromSignatures.test.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/assertBinding.test.d.ts +2 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/assertBinding.test.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/assertPayoutFeeAndTimelocks.test.d.ts +2 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/assertPayoutFeeAndTimelocks.test.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/fixtures/delegatedClaimPsbts.d.ts +49 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/fixtures/delegatedClaimPsbts.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/payoutBinding.test.d.ts +2 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/payoutBinding.test.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/payoutInputLeaf.test.d.ts +2 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/payoutInputLeaf.test.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/planDelegatedClaimSigning.test.d.ts +2 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/planDelegatedClaimSigning.test.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/readDelegatedClaimVaultContext.test.d.ts +2 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/readDelegatedClaimVaultContext.test.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/realSchnorrVerification.test.d.ts +2 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/realSchnorrVerification.test.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/signDelegatedClaimPlan.test.d.ts +2 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/signDelegatedClaimPlan.test.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/signingRequests.test.d.ts +2 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/signingRequests.test.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/assembleWatchtowerArtifacts.d.ts +34 -9
- package/dist/tbv/core/services/delegated-claim/assembleWatchtowerArtifacts.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/assembleWatchtowerArtifactsFromSignatures.d.ts +36 -0
- package/dist/tbv/core/services/delegated-claim/assembleWatchtowerArtifactsFromSignatures.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/assertBinding.d.ts +37 -0
- package/dist/tbv/core/services/delegated-claim/assertBinding.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/assertPayoutFeeAndTimelocks.d.ts +35 -0
- package/dist/tbv/core/services/delegated-claim/assertPayoutFeeAndTimelocks.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/index.d.ts +22 -4
- package/dist/tbv/core/services/delegated-claim/index.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/payoutBinding.d.ts +10 -4
- package/dist/tbv/core/services/delegated-claim/payoutBinding.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/payoutInputLeaf.d.ts +34 -0
- package/dist/tbv/core/services/delegated-claim/payoutInputLeaf.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/planDelegatedClaimSigning.d.ts +43 -0
- package/dist/tbv/core/services/delegated-claim/planDelegatedClaimSigning.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/readDelegatedClaimVaultContext.d.ts +70 -0
- package/dist/tbv/core/services/delegated-claim/readDelegatedClaimVaultContext.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/readWatchtowerArtifacts.d.ts +31 -2
- package/dist/tbv/core/services/delegated-claim/readWatchtowerArtifacts.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/signDelegatedClaimPlan.d.ts +110 -0
- package/dist/tbv/core/services/delegated-claim/signDelegatedClaimPlan.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/signingRequests.d.ts +24 -0
- package/dist/tbv/core/services/delegated-claim/signingRequests.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/types.d.ts +110 -9
- package/dist/tbv/core/services/delegated-claim/types.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/vaultIdBinding.d.ts +16 -1
- package/dist/tbv/core/services/delegated-claim/vaultIdBinding.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/verifySignatureForRequest.d.ts +19 -0
- package/dist/tbv/core/services/delegated-claim/verifySignatureForRequest.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/verifyingKeyBinding.d.ts +40 -0
- package/dist/tbv/core/services/delegated-claim/verifyingKeyBinding.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/walletIdentity.d.ts +23 -0
- package/dist/tbv/core/services/delegated-claim/walletIdentity.d.ts.map +1 -0
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.js +89 -76
- package/dist/tbv/core/services/participants/__tests__/readStampedParticipantKeys.test.d.ts +2 -0
- package/dist/tbv/core/services/participants/__tests__/readStampedParticipantKeys.test.d.ts.map +1 -0
- package/dist/tbv/core/services/participants/index.d.ts +1 -0
- package/dist/tbv/core/services/participants/index.d.ts.map +1 -1
- package/dist/tbv/core/services/participants/readStampedParticipantKeys.d.ts +29 -0
- package/dist/tbv/core/services/participants/readStampedParticipantKeys.d.ts.map +1 -0
- package/dist/tbv/core/services/participants/resolveParticipantKeys.d.ts +1 -1
- package/dist/tbv/core/services/participants/resolveParticipantKeys.d.ts.map +1 -1
- package/dist/tbv/core/utils/index.cjs +1 -1
- package/dist/tbv/core/utils/index.js +47 -46
- package/dist/tbv/core/utils/index.js.map +1 -1
- package/dist/tbv/core/vault-secrets/__tests__/buildVaultContextInputForClaim.test.d.ts +2 -0
- package/dist/tbv/core/vault-secrets/__tests__/buildVaultContextInputForClaim.test.d.ts.map +1 -0
- package/dist/tbv/core/vault-secrets/buildVaultContextInputForClaim.d.ts +18 -0
- package/dist/tbv/core/vault-secrets/buildVaultContextInputForClaim.d.ts.map +1 -0
- package/dist/tbv/core/vault-secrets/index.cjs +1 -1
- package/dist/tbv/core/vault-secrets/index.d.ts +1 -0
- package/dist/tbv/core/vault-secrets/index.d.ts.map +1 -1
- package/dist/tbv/core/vault-secrets/index.js +12 -10
- package/dist/tbv/core/vault-secrets/index.js.map +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +287 -259
- package/dist/tbv/index.js.map +1 -1
- package/dist/toRefundInputs-BZXvuOMY.cjs +2 -0
- package/dist/toRefundInputs-BZXvuOMY.cjs.map +1 -0
- package/dist/toRefundInputs-dKDSvpVI.js +698 -0
- package/dist/toRefundInputs-dKDSvpVI.js.map +1 -0
- package/dist/types-Bda75Od0.cjs +2 -0
- package/dist/types-Bda75Od0.cjs.map +1 -0
- package/dist/types-C5jj3Cc-.js +198 -0
- package/dist/types-C5jj3Cc-.js.map +1 -0
- package/dist/{verifyKeyPathSchnorrSignature-Gm9EmZkx.cjs → verifyKeyPathSchnorrSignature-CQUut2-O.cjs} +2 -2
- package/dist/{verifyKeyPathSchnorrSignature-Gm9EmZkx.cjs.map → verifyKeyPathSchnorrSignature-CQUut2-O.cjs.map} +1 -1
- package/dist/{verifyKeyPathSchnorrSignature-BQHNhRj6.js → verifyKeyPathSchnorrSignature-DxPbeSdQ.js} +2 -2
- package/dist/{verifyKeyPathSchnorrSignature-BQHNhRj6.js.map → verifyKeyPathSchnorrSignature-DxPbeSdQ.js.map} +1 -1
- package/dist/{verifyScriptPathSchnorrSignature-CpjSTfMj.js → verifyScriptPathSchnorrSignature-B3-VkvnK.js} +6 -4
- package/dist/{verifyScriptPathSchnorrSignature-CpjSTfMj.js.map → verifyScriptPathSchnorrSignature-B3-VkvnK.js.map} +1 -1
- package/dist/{verifyScriptPathSchnorrSignature-BKZihCjk.cjs → verifyScriptPathSchnorrSignature-D2t1yACC.cjs} +2 -2
- package/dist/{verifyScriptPathSchnorrSignature-BKZihCjk.cjs.map → verifyScriptPathSchnorrSignature-D2t1yACC.cjs.map} +1 -1
- package/package.json +4 -4
- package/dist/PayoutManager-B6GFbG3X.cjs +0 -2
- package/dist/PayoutManager-B6GFbG3X.cjs.map +0 -1
- package/dist/PayoutManager-BSwbUQeF.js.map +0 -1
- package/dist/PeginManager-IgDHy_eU.cjs +0 -2
- package/dist/ProtocolParams.abi-Db2USqQm.cjs +0 -2
- package/dist/ProtocolParams.abi-Db2USqQm.cjs.map +0 -1
- package/dist/ProtocolParams.abi-q0AidvYX.js.map +0 -1
- package/dist/buildAndBroadcastReclaim-B8aFMGf-.cjs +0 -2
- package/dist/buildAndBroadcastReclaim-B8aFMGf-.cjs.map +0 -1
- package/dist/buildAndBroadcastReclaim-D5520lbL.js +0 -2210
- package/dist/buildAndBroadcastReclaim-D5520lbL.js.map +0 -1
- package/dist/constants-BTZdyOuk.cjs +0 -2
- package/dist/constants-BTZdyOuk.cjs.map +0 -1
- package/dist/constants-D5vORbQE.js +0 -29
- package/dist/constants-D5vORbQE.js.map +0 -1
- package/dist/onChainBtcPubkey-BlzxYImF.cjs +0 -2
- package/dist/onChainBtcPubkey-BlzxYImF.cjs.map +0 -1
- package/dist/onChainBtcPubkey-CCTdl53s.js +0 -159
- package/dist/onChainBtcPubkey-CCTdl53s.js.map +0 -1
- package/dist/pegin-registration-client-B0j6ugt9.cjs +0 -2
- package/dist/pegin-registration-client-B0j6ugt9.cjs.map +0 -1
- package/dist/pegin-registration-client-ilkV1mLP.js +0 -878
- package/dist/pegin-registration-client-ilkV1mLP.js.map +0 -1
- package/dist/signing-3l5Aqd-H.cjs +0 -2
- package/dist/signing-3l5Aqd-H.cjs.map +0 -1
- package/dist/signing-Dhr2t0Z6.js.map +0 -1
- package/dist/toRefundInputs-10RYIfh1.js +0 -559
- package/dist/toRefundInputs-10RYIfh1.js.map +0 -1
- package/dist/toRefundInputs-a-0HRyrl.cjs +0 -2
- package/dist/toRefundInputs-a-0HRyrl.cjs.map +0 -1
- package/dist/types-BueQoMjO.cjs +0 -2
- package/dist/types-BueQoMjO.cjs.map +0 -1
- package/dist/types-DGkejGZH.js +0 -456
- package/dist/types-DGkejGZH.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payoutInputLeaf.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/payoutInputLeaf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,oBAAoB;AACpB,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B;AAED,oBAAoB;AACpB,MAAM,WAAW,6BAA6B;IAC5C,yBAAyB,EAAE,MAAM,CAAC;IAClC,uBAAuB,EAAE,MAAM,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,6BAA6B,GACpC,MAAM,CAoCR"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Network } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
2
|
+
import { DelegatedClaimPsbtSet } from './signingRequests';
|
|
3
|
+
import { ClaimerArtifactsSource, DelegatedClaimSigningPlan, DelegatedClaimVaultContext } from './types';
|
|
4
|
+
/** @experimental */
|
|
5
|
+
export interface PlanDelegatedClaimSigningParams {
|
|
6
|
+
/**
|
|
7
|
+
* Depositor's BTC public key (compressed or x-only hex). A vault that
|
|
8
|
+
* registered a P2WPKH payout script needs the compressed key here, as at
|
|
9
|
+
* registration: the x-only form cannot derive a P2WPKH script.
|
|
10
|
+
*/
|
|
11
|
+
depositorPublicKey: string;
|
|
12
|
+
/** Network the depositor's address is derived on, to check the signer. */
|
|
13
|
+
btcNetwork: Network;
|
|
14
|
+
/** Graph and verifying key as the vault provider returned them. */
|
|
15
|
+
source: ClaimerArtifactsSource;
|
|
16
|
+
/** See {@link DelegatedClaimSigningPlan.trustedVerifyingKeyHex}. */
|
|
17
|
+
trustedVerifyingKeyHex: string;
|
|
18
|
+
vault: DelegatedClaimVaultContext;
|
|
19
|
+
/** See {@link AssembleWatchtowerArtifactsParams.babeSessionsJson}. */
|
|
20
|
+
babeSessionsJson?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Build the five PSBT groups from the graph and run every binding check.
|
|
24
|
+
* Shared with the assembler, which rebuilds the same set to prove the plan
|
|
25
|
+
* it is given was not altered.
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
* @experimental
|
|
29
|
+
*/
|
|
30
|
+
export declare function buildBoundPsbtSet(txGraphVersion: number, graphJson: string, vault: DelegatedClaimVaultContext, depositorPublicKey: string): Promise<DelegatedClaimPsbtSet>;
|
|
31
|
+
/**
|
|
32
|
+
* @throws If the vault provider's verifying key is not the trusted one, if
|
|
33
|
+
* `depositorPublicKey` is not the vault's registered depositor key,
|
|
34
|
+
* the registered payout script is not derived from it,
|
|
35
|
+
* the graph version and the vault context's vault core version
|
|
36
|
+
* disagree, the graph is not version 3, any binding check fails, or
|
|
37
|
+
* the Payout's CSV sequences, declared prevout amounts or implicit fee
|
|
38
|
+
* do not match the vault's stamped timelocks, its PegIn and Assert
|
|
39
|
+
* outputs, and the fee band.
|
|
40
|
+
* @experimental
|
|
41
|
+
*/
|
|
42
|
+
export declare function planDelegatedClaimSigning(params: PlanDelegatedClaimSigningParams): Promise<DelegatedClaimSigningPlan>;
|
|
43
|
+
//# sourceMappingURL=planDelegatedClaimSigning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planDelegatedClaimSigning.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/planDelegatedClaimSigning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAkBrE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAQjB,oBAAoB;AACpB,MAAM,WAAW,+BAA+B;IAC9C;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,UAAU,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,MAAM,EAAE,sBAAsB,CAAC;IAC/B,oEAAoE;IACpE,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,EAAE,0BAA0B,CAAC;IAClC,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,0BAA0B,EACjC,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,qBAAqB,CAAC,CAmHhC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,+BAA+B,GACtC,OAAO,CAAC,yBAAyB,CAAC,CAyBpC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Address, Hex } from 'viem';
|
|
2
|
+
import { PeginRegistrationRecord, ProtocolParamsReader, VaultData, VaultRegistryReader, VersionedOffchainParams } from '../../clients/eth/types';
|
|
3
|
+
import { StampedParticipantKeyReaders } from '../participants/readStampedParticipantKeys';
|
|
4
|
+
import { ParticipantKeySet } from '../participants/types';
|
|
5
|
+
import { DelegatedClaimVaultContext } from './types';
|
|
6
|
+
/** @experimental */
|
|
7
|
+
export interface DelegatedClaimVaultReaders extends StampedParticipantKeyReaders {
|
|
8
|
+
registryReader: Pick<VaultRegistryReader, "getVaultData" | "getVaultKeyEpochs" | "getVaultProviderGenesisBtcPubKey" | "getRegistrationRecordsAtBlock" | "getVaultClaimableBy">;
|
|
9
|
+
protocolParamsReader: Pick<ProtocolParamsReader, "getOffchainParamsByVersion">;
|
|
10
|
+
}
|
|
11
|
+
/** @experimental */
|
|
12
|
+
export interface ReadDelegatedClaimVaultContextParams {
|
|
13
|
+
vaultId: Hex;
|
|
14
|
+
readers: DelegatedClaimVaultReaders;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The context, plus the sibling facts a claim needs that the context does not
|
|
18
|
+
* carry: the on-chain WOTS commitment (`deriveClaimerWotsKeypair.expectedWotsPkHash`),
|
|
19
|
+
* what `buildVaultContextInputForClaim` takes, and every record this read
|
|
20
|
+
* already fetched that `rebuildDepositTermsForClaim` would otherwise fetch
|
|
21
|
+
* again — it takes this whole object rather than a vault id.
|
|
22
|
+
*
|
|
23
|
+
* @experimental
|
|
24
|
+
*/
|
|
25
|
+
export interface DelegatedClaimVaultRead {
|
|
26
|
+
context: DelegatedClaimVaultContext;
|
|
27
|
+
/** The target's registry record, as read here. */
|
|
28
|
+
vault: VaultData;
|
|
29
|
+
/** The target's own `PegInSubmittedV2` log. */
|
|
30
|
+
registrationRecord: PeginRegistrationRecord;
|
|
31
|
+
/** Every log in the target's registration block, the batch's siblings among them. */
|
|
32
|
+
registrationRecords: readonly PeginRegistrationRecord[];
|
|
33
|
+
/** Participant operation keys resolved at the vault's stamped versions and epochs. */
|
|
34
|
+
participantKeys: ParticipantKeySet;
|
|
35
|
+
/** The offchain params snapshot at `protocol.offchainParamsVersion`. */
|
|
36
|
+
offchainParams: VersionedOffchainParams;
|
|
37
|
+
/** `VaultBasicInfo.depositorBtcPubKey` verbatim, for `buildVaultContextInputForClaim`. */
|
|
38
|
+
depositorBtcPubKeyBytes32: Hex;
|
|
39
|
+
depositorWotsPkHash: Hex;
|
|
40
|
+
prePeginTxHash: Hex;
|
|
41
|
+
/**
|
|
42
|
+
* Txid of the vault's depositor-signed PegIn, derived here through the
|
|
43
|
+
* dependency-free parser and cross-checked against both logs. The vault
|
|
44
|
+
* provider indexes a deposit's artifacts and auth tokens by it.
|
|
45
|
+
*/
|
|
46
|
+
peginTxHash: Hex;
|
|
47
|
+
/** The vault's registered vault provider, which addresses its VP proxy. */
|
|
48
|
+
vaultProvider: Address;
|
|
49
|
+
htlcVout: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @throws When the vault's core version is not the delegated-claim graph
|
|
53
|
+
* version; when the depositor-signed PegIn carries no output
|
|
54
|
+
* {@link PEGIN_VAULT_OUTPUT_INDEX}; when the registration log, the
|
|
55
|
+
* redemption log, the vault record and the stamped offchain params
|
|
56
|
+
* disagree on a shared field;
|
|
57
|
+
* when the PegIn does not derive the vault id asked for; when it does
|
|
58
|
+
* not have exactly one input, or that input does not spend the
|
|
59
|
+
* record's Pre-PegIn at its `htlcVout`;
|
|
60
|
+
* when output {@link PEGIN_VAULT_OUTPUT_INDEX} is not
|
|
61
|
+
* worth `basic.amount`; and whatever the readers throw (notably the
|
|
62
|
+
* typed `VaultClaimableByNotFoundError`). The
|
|
63
|
+
* disagreement checks are inconsistent-node guards only: on an honest
|
|
64
|
+
* chain both logs are written from the same contract state as the
|
|
65
|
+
* record (`PeginLogic.sol:379-380`, `RedeemLogic.sol:118-124`) and
|
|
66
|
+
* cannot differ.
|
|
67
|
+
* @experimental
|
|
68
|
+
*/
|
|
69
|
+
export declare function readDelegatedClaimVaultContext(params: ReadDelegatedClaimVaultContextParams): Promise<DelegatedClaimVaultRead>;
|
|
70
|
+
//# sourceMappingURL=readDelegatedClaimVaultContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readDelegatedClaimVaultContext.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/readDelegatedClaimVaultContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAiBzC,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC7B,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAG1D,oBAAoB;AACpB,MAAM,WAAW,0BACf,SAAQ,4BAA4B;IACpC,cAAc,EAAE,IAAI,CAClB,mBAAmB,EACjB,cAAc,GACd,mBAAmB,GACnB,kCAAkC,GAClC,+BAA+B,GAC/B,qBAAqB,CACxB,CAAC;IACF,oBAAoB,EAAE,IAAI,CACxB,oBAAoB,EACpB,4BAA4B,CAC7B,CAAC;CACH;AAED,oBAAoB;AACpB,MAAM,WAAW,oCAAoC;IACnD,OAAO,EAAE,GAAG,CAAC;IACb,OAAO,EAAE,0BAA0B,CAAC;CACrC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,0BAA0B,CAAC;IACpC,kDAAkD;IAClD,KAAK,EAAE,SAAS,CAAC;IACjB,+CAA+C;IAC/C,kBAAkB,EAAE,uBAAuB,CAAC;IAC5C,qFAAqF;IACrF,mBAAmB,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACxD,sFAAsF;IACtF,eAAe,EAAE,iBAAiB,CAAC;IACnC,wEAAwE;IACxE,cAAc,EAAE,uBAAuB,CAAC;IACxC,0FAA0F;IAC1F,yBAAyB,EAAE,GAAG,CAAC;IAC/B,mBAAmB,EAAE,GAAG,CAAC;IACzB,cAAc,EAAE,GAAG,CAAC;IACpB;;;;OAIG;IACH,WAAW,EAAE,GAAG,CAAC;IACjB,2EAA2E;IAC3E,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,oCAAoC,GAC3C,OAAO,CAAC,uBAAuB,CAAC,CA8PlC"}
|
|
@@ -47,6 +47,30 @@ export interface AssertArtifactsUsableParams {
|
|
|
47
47
|
* self-declared `vault_id`.
|
|
48
48
|
*/
|
|
49
49
|
depositorEthAddress: string;
|
|
50
|
+
/**
|
|
51
|
+
* The Groth16 verifying key for the vault's `proverCircuitVersion`, from
|
|
52
|
+
* the `vault-provers` release or the prover service — never from the vault
|
|
53
|
+
* provider or anything it serves (btc-vault `delegated_claim.rs:405-414`
|
|
54
|
+
* @ ac4954e7). A file carrying a different key proves nothing at Assert.
|
|
55
|
+
*/
|
|
56
|
+
trustedVerifyingKeyHex: string;
|
|
57
|
+
/**
|
|
58
|
+
* The vault's stamped `proverCircuitVersion`, from
|
|
59
|
+
* `DelegatedClaimVaultContext`. btc-vault's verifier never reads the
|
|
60
|
+
* file's own `prover_circuit_version` — `delegated_claim.rs:864` @ ac4954e7
|
|
61
|
+
* only writes it — while `vaultd`'s
|
|
62
|
+
* `crates/vaultd/src/cli/command/watchtower/start_claim.rs:266-278` hands
|
|
63
|
+
* the file's key and version to the prover together, so a wrong version
|
|
64
|
+
* fails there, before Assert.
|
|
65
|
+
*/
|
|
66
|
+
expectedProverCircuitVersion: number;
|
|
67
|
+
/**
|
|
68
|
+
* The block of the vault's finalized `VaultClaimableBy` event, from
|
|
69
|
+
* `DelegatedClaimVaultContext.claimableEventBlockNumber`. Unverified by
|
|
70
|
+
* btc-vault like the circuit version, and handed to the prover beside it
|
|
71
|
+
* (`start_claim.rs:270,274` @ ac4954e7), so a wrong block fails there too.
|
|
72
|
+
*/
|
|
73
|
+
expectedClaimableEventBlockNumber: bigint;
|
|
50
74
|
/**
|
|
51
75
|
* Graph version to verify under. Defaults to the only version the format
|
|
52
76
|
* exists for. A file that records a different `vault_core_version` is
|
|
@@ -62,8 +86,13 @@ export interface AssertArtifactsUsableParams {
|
|
|
62
86
|
*
|
|
63
87
|
* @throws {@link ArtifactsVaultMismatchError} when the file names a different
|
|
64
88
|
* vault, {@link VaultIdBindingError} when the graph it carries
|
|
65
|
-
* belongs to another vault whatever the file says,
|
|
66
|
-
*
|
|
89
|
+
* belongs to another vault whatever the file says, a plain error when
|
|
90
|
+
* its `prover_circuit_version` is not `expectedProverCircuitVersion`,
|
|
91
|
+
* its `claimable_event_block_number` is not
|
|
92
|
+
* `expectedClaimableEventBlockNumber`,
|
|
93
|
+
* its `verifying_key` is not `trustedVerifyingKeyHex` or any BaBe
|
|
94
|
+
* session is still the placeholder, or a verification error when any
|
|
95
|
+
* bundled signature does not hold against that graph.
|
|
67
96
|
* @experimental
|
|
68
97
|
*/
|
|
69
98
|
export declare function assertArtifactsUsableForVault(params: AssertArtifactsUsableParams): Promise<WatchtowerArtifactsSummary>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readWatchtowerArtifacts.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/readWatchtowerArtifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"readWatchtowerArtifacts.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/readWatchtowerArtifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAS1D;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAElD;;;;GAIG;AACH,qBAAa,2BAA4B,SAAQ,KAAK;IAElD,QAAQ,CAAC,eAAe,EAAE,MAAM;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM;gBADrB,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM;CAQjC;AAkDD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAC1C,aAAa,EAAE,MAAM,GACpB,0BAA0B,CAiD5B;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,eAAe,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAC/B;;;;;;;;OAQG;IACH,4BAA4B,EAAE,MAAM,CAAC;IACrC;;;;;OAKG;IACH,iCAAiC,EAAE,MAAM,CAAC;IAC1C;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,0BAA0B,CAAC,CAoGrC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { BitcoinWallet, SignPsbtOptions } from '../../../../shared/wallets/interfaces';
|
|
2
|
+
import { DepositTerms } from '../../deposit-terms/depositTerms';
|
|
3
|
+
import { VaultContextInput } from '../../vault-secrets';
|
|
4
|
+
import { DelegatedClaimSignatures, DelegatedClaimSigningPlan, DelegatedClaimVaultContext } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* The claim-ceremony signing capability an approval wallet must add: its
|
|
7
|
+
* device signs some claim PSBTs with no loaded intent and needs its own
|
|
8
|
+
* derivation fields on them, which only the provider can write. Implementers
|
|
9
|
+
* MUST classify each PSBT themselves from the single requested input and
|
|
10
|
+
* refuse anything that is not one of the claim ceremony's shapes — this is
|
|
11
|
+
* not a second `signPsbt`. The SDK cannot enforce that and does not rely on
|
|
12
|
+
* it: the wallet is proved to be the depositor's before any prompt, and every
|
|
13
|
+
* returned signature is verified against the PSBT that requested it. The SDK
|
|
14
|
+
* probes for the method before it prompts.
|
|
15
|
+
*
|
|
16
|
+
* @experimental
|
|
17
|
+
*/
|
|
18
|
+
export interface DelegatedClaimPsbtSigner {
|
|
19
|
+
signDelegatedClaimPsbt(psbtHex: string, options?: SignPsbtOptions): Promise<string>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Options for {@link signDelegatedClaimPlan}.
|
|
23
|
+
*
|
|
24
|
+
* @experimental
|
|
25
|
+
*/
|
|
26
|
+
export interface SignDelegatedClaimPlanOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Required for approval-capable wallets: the terms that load the vault's
|
|
29
|
+
* intent on the device. Resume flows rebuild them from on-chain state.
|
|
30
|
+
*/
|
|
31
|
+
depositTerms?: DepositTerms;
|
|
32
|
+
/**
|
|
33
|
+
* Required for approval-capable wallets: the context the vault root derives
|
|
34
|
+
* from; its depositor key must be the vault's registered key, checked before
|
|
35
|
+
* any device I/O.
|
|
36
|
+
*/
|
|
37
|
+
vaultContext?: VaultContextInput;
|
|
38
|
+
/**
|
|
39
|
+
* Signatures from an earlier, incomplete run of this same plan. Each is
|
|
40
|
+
* verified against its request before it is reused; only standalone kinds
|
|
41
|
+
* are reused, intent-bound ones are always re-signed. Applies to approval
|
|
42
|
+
* wallets only: a software wallet always re-signs everything and ignores
|
|
43
|
+
* this — one prompt for a wallet with native `signPsbts`, one prompt per
|
|
44
|
+
* PSBT otherwise (the sequential fallback), and a cancel restarts the set.
|
|
45
|
+
*/
|
|
46
|
+
resume?: DelegatedClaimSignatures;
|
|
47
|
+
/**
|
|
48
|
+
* Checked before every wallet prompt. The check before either path throws
|
|
49
|
+
* the aborted signal's reason. Inside the approval ceremony, once the map
|
|
50
|
+
* holds a signature — a verified resumed standalone entry counts — a stop is
|
|
51
|
+
* reported as {@link DelegatedClaimSigningIncompleteError} with the reason as
|
|
52
|
+
* `cause`, so the collected signatures survive for `resume`; while the map is
|
|
53
|
+
* still empty the reason is thrown as is.
|
|
54
|
+
*/
|
|
55
|
+
signal?: AbortSignal;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Thrown when an approval-wallet run stops before it reaches the end.
|
|
59
|
+
*
|
|
60
|
+
* Carries what was collected so a retry can pass it as `resume`. A retry
|
|
61
|
+
* drops the intent-bound signatures and re-signs only those, so a stop in the
|
|
62
|
+
* final intent release after every standalone request was resumed re-runs
|
|
63
|
+
* only the intent-bound part of the ceremony — even though the map it carries
|
|
64
|
+
* is complete by then. Never persist the map as artifacts: only the assembler
|
|
65
|
+
* verifies it as a set.
|
|
66
|
+
*
|
|
67
|
+
* @experimental
|
|
68
|
+
*/
|
|
69
|
+
export declare class DelegatedClaimSigningIncompleteError extends Error {
|
|
70
|
+
readonly signatures: DelegatedClaimSignatures;
|
|
71
|
+
/**
|
|
72
|
+
* The request the ceremony is to resume from — not necessarily the one
|
|
73
|
+
* that failed: a stop in the intent release or approval is reported
|
|
74
|
+
* against the request it was about to reach. The message says which.
|
|
75
|
+
*/
|
|
76
|
+
readonly failedRequestId: string;
|
|
77
|
+
constructor(message: string, signatures: DelegatedClaimSignatures,
|
|
78
|
+
/**
|
|
79
|
+
* The request the ceremony is to resume from — not necessarily the one
|
|
80
|
+
* that failed: a stop in the intent release or approval is reported
|
|
81
|
+
* against the request it was about to reach. The message says which.
|
|
82
|
+
*/
|
|
83
|
+
failedRequestId: string, options?: {
|
|
84
|
+
cause?: unknown;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The plan must come from `planDelegatedClaimSigning`: the signer
|
|
89
|
+
* signs it as given and does not rebuild it. A plan altered in between is
|
|
90
|
+
* rejected at assembly by `assembleWatchtowerArtifactsFromSignatures`, which
|
|
91
|
+
* rebuilds every PSBT from the graph, and a hardware wallet displays what it
|
|
92
|
+
* signs.
|
|
93
|
+
*
|
|
94
|
+
* @returns Signatures keyed by request id, one per request in the plan.
|
|
95
|
+
* @experimental
|
|
96
|
+
*/
|
|
97
|
+
export declare function signDelegatedClaimPlan(plan: DelegatedClaimSigningPlan, wallet: BitcoinWallet, opts?: SignDelegatedClaimPlanOptions): Promise<DelegatedClaimSignatures>;
|
|
98
|
+
/**
|
|
99
|
+
* Every field the terms and the vault context both carry must agree: the
|
|
100
|
+
* rosters, the vault core version, the two CSV timelocks, the protocol fee
|
|
101
|
+
* rate, and the vault provider key of each group the terms describe.
|
|
102
|
+
* Otherwise the device binds the Assert to another deposit's intent.
|
|
103
|
+
*
|
|
104
|
+
* Exported so a claim-time terms builder can be checked against the context
|
|
105
|
+
* it will be signed with, before any device session.
|
|
106
|
+
*
|
|
107
|
+
* @experimental
|
|
108
|
+
*/
|
|
109
|
+
export declare function assertTermsMatchVault(terms: DepositTerms, vault: DelegatedClaimVaultContext): void;
|
|
110
|
+
//# sourceMappingURL=signDelegatedClaimPlan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signDelegatedClaimPlan.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/signDelegatedClaimPlan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAChB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,kCAAkC,CAAC;AAK1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAI7D,OAAO,KAAK,EACV,wBAAwB,EAExB,yBAAyB,EAEzB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAQjB;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,wBAAwB;IACvC,sBAAsB,CACpB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC,CAAC;CACpB;AAYD;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;;GAWG;AACH,qBAAa,oCAAqC,SAAQ,KAAK;IAG3D,QAAQ,CAAC,UAAU,EAAE,wBAAwB;IAC7C;;;;OAIG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM;gBAPhC,OAAO,EAAE,MAAM,EACN,UAAU,EAAE,wBAAwB;IAC7C;;;;OAIG;IACM,eAAe,EAAE,MAAM,EAChC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAKhC;AA6BD;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,yBAAyB,EAC/B,MAAM,EAAE,aAAa,EACrB,IAAI,GAAE,6BAAkC,GACvC,OAAO,CAAC,wBAAwB,CAAC,CA8CnC;AAuFD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,0BAA0B,GAChC,IAAI,CAuDN"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DelegatedClaimSigningRequest } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The five PSBT groups the WASM builders produce, all base64.
|
|
4
|
+
*
|
|
5
|
+
* @experimental
|
|
6
|
+
*/
|
|
7
|
+
export interface DelegatedClaimPsbtSet {
|
|
8
|
+
claim: string;
|
|
9
|
+
assert: string;
|
|
10
|
+
payoutClaimer: string;
|
|
11
|
+
payoutDepositor: string;
|
|
12
|
+
wronglyChallenged: Record<string, string[]>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Stable id of a WronglyChallenged request.
|
|
16
|
+
*
|
|
17
|
+
* @experimental
|
|
18
|
+
*/
|
|
19
|
+
export declare function wronglyChallengedRequestId(challengerPubkey: string, gcIndex: number): string;
|
|
20
|
+
/**
|
|
21
|
+
* @experimental
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildDelegatedClaimSigningRequests(psbts: DelegatedClaimPsbtSet): DelegatedClaimSigningRequest[];
|
|
24
|
+
//# sourceMappingURL=signingRequests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signingRequests.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/signingRequests.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAC7C;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,MAAM,GACd,MAAM,CAER;AAED;;GAEG;AACH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,qBAAqB,GAC3B,4BAA4B,EAAE,CAsChC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Network } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
1
2
|
import { Hex } from 'viem';
|
|
3
|
+
import { OnChainBtcPubkey } from '../../clients/eth/types';
|
|
2
4
|
/**
|
|
3
5
|
* The small, non-opaque fields of an `artifacts.json` file.
|
|
4
6
|
*
|
|
@@ -32,9 +34,34 @@ export interface WatchtowerArtifactsSummary {
|
|
|
32
34
|
* boundary — a block number is a u64 there.
|
|
33
35
|
*/
|
|
34
36
|
claimableEventBlockNumber: bigint;
|
|
37
|
+
/**
|
|
38
|
+
* Groth16 verifying key the file carries (`verifying_key`, btc-vault
|
|
39
|
+
* `delegated_claim.rs:514` @ ac4954e7). Compared with the caller's trusted
|
|
40
|
+
* key by `assertArtifactsUsableForVault`.
|
|
41
|
+
*/
|
|
42
|
+
verifyingKeyHex: string;
|
|
35
43
|
/** Hex challenger public keys the file carries BaBe sessions for. */
|
|
36
44
|
babeSessionChallengerPubkeys: string[];
|
|
45
|
+
/**
|
|
46
|
+
* Challengers whose session is still
|
|
47
|
+
* {@link BABE_SESSION_PLACEHOLDER_DECRYPTOR_HEX}. Such a file verifies but
|
|
48
|
+
* cannot answer that challenger, so `assertArtifactsUsableForVault` refuses
|
|
49
|
+
* it.
|
|
50
|
+
*/
|
|
51
|
+
babeSessionPlaceholderChallengerPubkeys: string[];
|
|
37
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* The `decryptor_artifacts_hex` a browser caller writes per challenger when
|
|
55
|
+
* the real BaBe sessions are too large to hold in a tab.
|
|
56
|
+
*
|
|
57
|
+
* btc-vault only checks that the value is non-empty hex
|
|
58
|
+
* (`delegated_claim.rs:473-483` @ ac4954e7), so a file built from it verifies
|
|
59
|
+
* yet cannot answer a challenge — join the real sessions in before using it.
|
|
60
|
+
* #2598 tracks making an empty map a first-class "not joined yet" state.
|
|
61
|
+
*
|
|
62
|
+
* @experimental
|
|
63
|
+
*/
|
|
64
|
+
export declare const BABE_SESSION_PLACEHOLDER_DECRYPTOR_HEX = "00";
|
|
38
65
|
/**
|
|
39
66
|
* Inputs the vault provider supplies for artifact assembly.
|
|
40
67
|
*
|
|
@@ -44,16 +71,15 @@ export interface ClaimerArtifactsSource {
|
|
|
44
71
|
/** `tx_graph_json` from `requestDepositorClaimerArtifacts`. */
|
|
45
72
|
txGraphJson: string;
|
|
46
73
|
/**
|
|
47
|
-
* `verifying_key_hex` from the same response
|
|
74
|
+
* `verifying_key_hex` from the same response — the vault provider's own
|
|
75
|
+
* copy, never used as-is.
|
|
48
76
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* Obtain it over an authenticated channel, and re-check it here once the
|
|
56
|
-
* chain exposes an anchor.
|
|
77
|
+
* It is the key `pinPegoutProof` later verifies the Groth16 proof against,
|
|
78
|
+
* so a provider that supplies a key of its own choosing makes that
|
|
79
|
+
* verification prove nothing. The planner compares it byte for byte with
|
|
80
|
+
* {@link DelegatedClaimSigningPlan.trustedVerifyingKeyHex} before any
|
|
81
|
+
* wallet prompt and refuses on any difference; only the trusted value
|
|
82
|
+
* reaches the file.
|
|
57
83
|
*/
|
|
58
84
|
verifyingKeyHex: string;
|
|
59
85
|
}
|
|
@@ -70,6 +96,12 @@ export interface DelegatedClaimVaultContext {
|
|
|
70
96
|
* which is how a vault-provider-served graph is bound to this vault.
|
|
71
97
|
*/
|
|
72
98
|
depositorEthAddress: Hex;
|
|
99
|
+
/**
|
|
100
|
+
* The vault's registered depositor BTC key
|
|
101
|
+
* (`getBtcVaultBasicInfo(...).depositorBtcPubKey`, x-only). The claim scripts
|
|
102
|
+
* are bound to it, and the plan's `depositorPublicKey` must equal it.
|
|
103
|
+
*/
|
|
104
|
+
depositorBtcPubkey: OnChainBtcPubkey;
|
|
73
105
|
/**
|
|
74
106
|
* `depositorPayoutScriptPubKey` as the vault registered it on chain, hex.
|
|
75
107
|
* The Payout the vault provider builds is checked against this before the
|
|
@@ -101,5 +133,74 @@ export interface DelegatedClaimVaultContext {
|
|
|
101
133
|
* Pass the real block whenever the event has already finalized.
|
|
102
134
|
*/
|
|
103
135
|
claimableEventBlockNumber: bigint;
|
|
136
|
+
/**
|
|
137
|
+
* Value of output 0 of the vault's depositor-signed PegIn, in sats, parsed
|
|
138
|
+
* from `VaultData.protocol.depositorSignedPeginTx`. The Payout's input 0
|
|
139
|
+
* spends that output (btc-vault `payout.rs:103-112` @ ac4954e7), so it is
|
|
140
|
+
* one of the two amounts the claim-time fee band is measured over.
|
|
141
|
+
*/
|
|
142
|
+
peginVaultOutputValueSats: number;
|
|
143
|
+
/** `feeRate` of the vault's stamped `getOffchainParamsByVersion`, sat/vB. */
|
|
144
|
+
protocolFeeRate: bigint;
|
|
145
|
+
/** `securityCouncilKeys.length` of the same stamped offchain params. */
|
|
146
|
+
councilSize: number;
|
|
147
|
+
/**
|
|
148
|
+
* `timelockAssert` of the stamped params, which btc-vault uses as the PegIn
|
|
149
|
+
* timelock too (vaultd `pegin_babe_setup.rs:794`, `pegin_validation.rs:417`
|
|
150
|
+
* @ ac4954e7) — the CSV sequence of Payout input 0.
|
|
151
|
+
*/
|
|
152
|
+
timelockPegin: number;
|
|
153
|
+
/** `timelockAssert` of the stamped params — the CSV sequence of Payout input 1. */
|
|
154
|
+
timelockAssert: number;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Which delegated-claim transaction a signing request is for.
|
|
158
|
+
*
|
|
159
|
+
* @experimental
|
|
160
|
+
*/
|
|
161
|
+
export type DelegatedClaimSigningKind = "claim" | "assert" | "payoutClaimer" | "payoutDepositor" | "wronglyChallenged";
|
|
162
|
+
/**
|
|
163
|
+
* One PSBT the depositor must sign, with the input to sign and a stable id
|
|
164
|
+
* the signatures are keyed by.
|
|
165
|
+
*
|
|
166
|
+
* @experimental
|
|
167
|
+
*/
|
|
168
|
+
export interface DelegatedClaimSigningRequest {
|
|
169
|
+
/** `kind`, or `wronglyChallenged:<challenger x-only hex>:<gcIndex>`. */
|
|
170
|
+
readonly id: string;
|
|
171
|
+
readonly kind: DelegatedClaimSigningKind;
|
|
172
|
+
readonly psbtBase64: string;
|
|
173
|
+
readonly inputIndex: number;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Everything one delegated-claim signing session needs, built once and
|
|
177
|
+
* signed by whichever wallet path fits. Treat as immutable: the assembler
|
|
178
|
+
* rebuilds every PSBT from the graph and byte-compares against this.
|
|
179
|
+
*
|
|
180
|
+
* @experimental
|
|
181
|
+
*/
|
|
182
|
+
export interface DelegatedClaimSigningPlan {
|
|
183
|
+
readonly depositorPublicKey: string;
|
|
184
|
+
readonly btcNetwork: Network;
|
|
185
|
+
readonly source: ClaimerArtifactsSource;
|
|
186
|
+
/**
|
|
187
|
+
* The Groth16 verifying key for {@link DelegatedClaimVaultContext.proverCircuitVersion},
|
|
188
|
+
* obtained from the `vault-provers` release or the prover service — never
|
|
189
|
+
* from the vault provider or anything it serves. btc-vault
|
|
190
|
+
* `delegated_claim.rs:405-414` @ ac4954e7: the builder cannot tell a
|
|
191
|
+
* substituted key from the real one, and a substituted key would let a
|
|
192
|
+
* proof the depositor never authorized pass the pre-Assert check. This is
|
|
193
|
+
* the value written into the file.
|
|
194
|
+
*/
|
|
195
|
+
readonly trustedVerifyingKeyHex: string;
|
|
196
|
+
readonly vault: DelegatedClaimVaultContext;
|
|
197
|
+
readonly babeSessionsJson?: string;
|
|
198
|
+
readonly requests: readonly DelegatedClaimSigningRequest[];
|
|
104
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* 64-byte Schnorr signatures (hex) keyed by {@link DelegatedClaimSigningRequest.id}.
|
|
202
|
+
*
|
|
203
|
+
* @experimental
|
|
204
|
+
*/
|
|
205
|
+
export type DelegatedClaimSignatures = ReadonlyMap<string, string>;
|
|
105
206
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEhC;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;;;;;;OAQG;IACH,yBAAyB,EAAE,MAAM,CAAC;IAClC,qEAAqE;IACrE,4BAA4B,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;;;;;;OAQG;IACH,yBAAyB,EAAE,MAAM,CAAC;IAClC;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,4BAA4B,EAAE,MAAM,EAAE,CAAC;IACvC;;;;;OAKG;IACH,uCAAuC,EAAE,MAAM,EAAE,CAAC;CACnD;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sCAAsC,OAAO,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,+DAA+D;IAC/D,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;OAUG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,GAAG,CAAC;IACb;;;;OAIG;IACH,mBAAmB,EAAE,GAAG,CAAC;IACzB;;;;OAIG;IACH,kBAAkB,EAAE,gBAAgB,CAAC;IACrC;;;;OAIG;IACH,4BAA4B,EAAE,MAAM,CAAC;IACrC,2EAA2E;IAC3E,sBAAsB,EAAE,MAAM,CAAC;IAC/B,8EAA8E;IAC9E,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,iDAAiD;IACjD,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,2EAA2E;IAC3E,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;;;;;OAQG;IACH,yBAAyB,EAAE,MAAM,CAAC;IAClC;;;;;OAKG;IACH,yBAAyB,EAAE,MAAM,CAAC;IAClC,6EAA6E;IAC7E,eAAe,EAAE,MAAM,CAAC;IACxB,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,mFAAmF;IACnF,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GACjC,OAAO,GACP,QAAQ,GACR,eAAe,GACf,iBAAiB,GACjB,mBAAmB,CAAC;AAExB;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC3C,wEAAwE;IACxE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,0BAA0B,CAAC;IAC3C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,SAAS,4BAA4B,EAAE,CAAC;CAC5D;AAED;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -10,10 +10,17 @@ export declare class VaultIdBindingError extends Error {
|
|
|
10
10
|
readonly peginTxid: string;
|
|
11
11
|
constructor(expectedVaultId: string, derivedVaultId: string, peginTxid: string);
|
|
12
12
|
}
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Display-order txid of the PegIn output the Claim PSBT spends.
|
|
15
|
+
*
|
|
16
|
+
* @throws Unless the Claim has exactly one input and it spends PegIn output 1
|
|
17
|
+
* (CLAUDE.md §3 funding-chain rule).
|
|
18
|
+
*/
|
|
14
19
|
export declare function peginTxidFromClaimPsbt(claimPsbtBase64: string): string;
|
|
15
20
|
/**
|
|
16
21
|
* Display-order txid of the PegIn output a signed Claim transaction spends.
|
|
22
|
+
*
|
|
23
|
+
* @throws Unless the Claim has exactly one input and it spends PegIn output 1.
|
|
17
24
|
*/
|
|
18
25
|
export declare function peginTxidFromClaimTx(claimTx: Transaction): string;
|
|
19
26
|
/**
|
|
@@ -41,4 +48,12 @@ export interface AssertClaimSpendsVaultParams {
|
|
|
41
48
|
export declare function assertClaimSpendsVault(params: AssertClaimSpendsVaultParams): void;
|
|
42
49
|
/** Lowercase, `0x`-prefixed form of a 32-byte vault id. */
|
|
43
50
|
export declare function normalizeVaultId(vaultId: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Bitcoin stores a prevout hash in internal byte order; a txid is the same
|
|
53
|
+
* bytes reversed. Copies before reversing — the buffer belongs to the parsed
|
|
54
|
+
* transaction.
|
|
55
|
+
*
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
export declare function displayTxid(internalHash: Uint8Array): string;
|
|
44
59
|
//# sourceMappingURL=vaultIdBinding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vaultIdBinding.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/vaultIdBinding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAQ,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"vaultIdBinding.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/vaultIdBinding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAQ,WAAW,EAAE,MAAM,eAAe,CAAC;AAOlD;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAE1C,QAAQ,CAAC,eAAe,EAAE,MAAM;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM;gBAFjB,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM;CAU7B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAiBtE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAajE;AAqBD;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mDAAmD;IACnD,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,4BAA4B,GACnC,IAAI,CAQN;AAED,2DAA2D;AAC3D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAGxD;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,UAAU,GAAG,MAAM,CAE5D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DelegatedClaimSigningPlan, DelegatedClaimSigningRequest } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @throws If `signatureHex` is not a valid script-path signature by the
|
|
4
|
+
* plan's depositor over `request`'s PSBT and input.
|
|
5
|
+
* @internal
|
|
6
|
+
* @experimental
|
|
7
|
+
*/
|
|
8
|
+
export declare function assertSignatureForRequest(plan: DelegatedClaimSigningPlan, request: DelegatedClaimSigningRequest, signatureHex: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
* @experimental
|
|
12
|
+
*/
|
|
13
|
+
export declare function psbtBase64ToHex(psbtBase64: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
* @experimental
|
|
17
|
+
*/
|
|
18
|
+
export declare function psbtHexToBase64(psbtHex: string): string;
|
|
19
|
+
//# sourceMappingURL=verifySignatureForRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifySignatureForRequest.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/verifySignatureForRequest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAGvF;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,yBAAyB,EAC/B,OAAO,EAAE,4BAA4B,EACrC,YAAY,EAAE,MAAM,GACnB,IAAI,CAON;AAKD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Binding between the Groth16 verifying key a claim runs under and the one
|
|
3
|
+
* the depositor trusts.
|
|
4
|
+
*
|
|
5
|
+
* btc-vault takes the key opaquely and only checks that the bytes parse
|
|
6
|
+
* (`delegated_claim.rs:405-414` @ ac4954e7): "Must come from a trusted source
|
|
7
|
+
* … never from the vault provider or any artifact the vault provider serves.
|
|
8
|
+
* … a substituted key would let a proof the depositor never authorized pass
|
|
9
|
+
* the pre-Assert check. Compare the VP-served key byte for byte against this
|
|
10
|
+
* trusted value before signing." That comparison is what lives here.
|
|
11
|
+
*
|
|
12
|
+
* @module services/delegated-claim/verifyingKeyBinding
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* The one form two verifying keys can be compared in: lowercase hex, no `0x`.
|
|
16
|
+
*
|
|
17
|
+
* @throws If the value is empty or is not even-length hex — an unparseable
|
|
18
|
+
* key would otherwise compare equal to another unparseable one.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function normalizeVerifyingKeyHex(value: string, label: string): string;
|
|
22
|
+
/** @internal */
|
|
23
|
+
interface AssertVerifyingKeyIsTrustedParams {
|
|
24
|
+
/** The key as the vault provider served it. */
|
|
25
|
+
servedVerifyingKeyHex: string;
|
|
26
|
+
/** The key for {@link AssertVerifyingKeyIsTrustedParams.proverCircuitVersion}, from the vault-provers release or the prover service. */
|
|
27
|
+
trustedVerifyingKeyHex: string;
|
|
28
|
+
proverCircuitVersion: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Throws unless the vault-provider-served verifying key is the trusted one.
|
|
32
|
+
*
|
|
33
|
+
* @returns The trusted key in the form btc-vault decodes it: bare lowercase
|
|
34
|
+
* hex (`hex::decode`, `delegated_claim.rs:569-571` @ ac4954e7,
|
|
35
|
+
* rejects a `0x` prefix).
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export declare function assertVerifyingKeyIsTrusted(params: AssertVerifyingKeyIsTrustedParams): string;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=verifyingKeyBinding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyingKeyBinding.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/verifyingKeyBinding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAM7E;AAED,gBAAgB;AAChB,UAAU,iCAAiC;IACzC,+CAA+C;IAC/C,qBAAqB,EAAE,MAAM,CAAC;IAC9B,wIAAwI;IACxI,sBAAsB,EAAE,MAAM,CAAC;IAC/B,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,iCAAiC,GACxC,MAAM,CAeR"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Network } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
2
|
+
import { BitcoinWallet } from '../../../../shared/wallets/interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* The 32-byte x-only form of a compressed or x-only public key, lowercase.
|
|
5
|
+
*
|
|
6
|
+
* @experimental
|
|
7
|
+
*/
|
|
8
|
+
export declare function xOnlyHex(publicKeyHex: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the wallet's signing address, once both it and the wallet's public
|
|
11
|
+
* key are proved to be the vault's depositor.
|
|
12
|
+
*
|
|
13
|
+
* Both halves matter. The public key is what the graph's scripts commit to;
|
|
14
|
+
* the address is what the sign options name the signer by, and a wallet whose
|
|
15
|
+
* reported address and public key belong to different accounts would
|
|
16
|
+
* otherwise sign the whole batch for the wrong account.
|
|
17
|
+
*
|
|
18
|
+
* @throws When the wallet is on a different account than the vault's
|
|
19
|
+
* depositor, or reports an address that key does not control.
|
|
20
|
+
* @experimental
|
|
21
|
+
*/
|
|
22
|
+
export declare function assertWalletMatchesDepositor(btcWallet: BitcoinWallet, depositorPublicKey: string, btcNetwork: Network): Promise<string>;
|
|
23
|
+
//# sourceMappingURL=walletIdentity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walletIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/walletIdentity.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAW3E;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAQrD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,4BAA4B,CAChD,SAAS,EAAE,aAAa,EACxB,kBAAkB,EAAE,MAAM,EAC1B,UAAU,EAAE,OAAO,GAClB,OAAO,CAAC,MAAM,CAAC,CAqBjB"}
|