@babylonlabs-io/ts-sdk 0.58.1 → 0.59.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-COxUdCTR.cjs +2 -0
- package/dist/BTCVaultRegistry.abi-COxUdCTR.cjs.map +1 -0
- package/dist/{BTCVaultRegistry.abi-CixOlp3B.js → BTCVaultRegistry.abi-Ch0IiqNK.js} +19 -1
- package/dist/BTCVaultRegistry.abi-Ch0IiqNK.js.map +1 -0
- package/dist/{PeginManager-CogqZaa2.cjs → PeginManager-792nHwLl.cjs} +2 -2
- package/dist/{PeginManager-CogqZaa2.cjs.map → PeginManager-792nHwLl.cjs.map} +1 -1
- package/dist/{PeginManager-C8ixWlUM.js → PeginManager-Ddn6NDm3.js} +3 -3
- package/dist/{PeginManager-C8ixWlUM.js.map → PeginManager-Ddn6NDm3.js.map} +1 -1
- package/dist/{batchPoll-B0VxT62K.js → batchPoll-qXRNTvnR.js} +3 -3
- package/dist/{batchPoll-B0VxT62K.js.map → batchPoll-qXRNTvnR.js.map} +1 -1
- package/dist/{batchPoll-D5IDDOa8.cjs → batchPoll-xvVjiJXJ.cjs} +2 -2
- package/dist/{batchPoll-D5IDDOa8.cjs.map → batchPoll-xvVjiJXJ.cjs.map} +1 -1
- package/dist/{buildAndBroadcastRefund-DBA-Mp4I.js → buildAndBroadcastRefund-C-rbYMy6.js} +455 -428
- package/dist/buildAndBroadcastRefund-C-rbYMy6.js.map +1 -0
- package/dist/buildAndBroadcastRefund-HBOCjeUh.cjs +2 -0
- package/dist/buildAndBroadcastRefund-HBOCjeUh.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +52 -51
- package/dist/{mempoolApi-CMHEz4ez.js → mempoolApi-BTkbTDSY.js} +2 -2
- package/dist/{mempoolApi-CMHEz4ez.js.map → mempoolApi-BTkbTDSY.js.map} +1 -1
- package/dist/{mempoolApi-DfD3_Y6v.cjs → mempoolApi-DjwZ130O.cjs} +2 -2
- package/dist/{mempoolApi-DfD3_Y6v.cjs.map → mempoolApi-DjwZ130O.cjs.map} +1 -1
- package/dist/{peginState-BB81JI6I.js → peginState-CxDiaKuk.js} +26 -19
- package/dist/peginState-CxDiaKuk.js.map +1 -0
- package/dist/peginState-eaQ4IO_R.cjs +2 -0
- package/dist/peginState-eaQ4IO_R.cjs.map +1 -0
- package/dist/{reservation-CbAXa7VG.js → reservation-B4i_PQhY.js} +2 -2
- package/dist/{reservation-CbAXa7VG.js.map → reservation-B4i_PQhY.js.map} +1 -1
- package/dist/{reservation-RGKvg2x6.cjs → reservation-CDbInVw0.cjs} +2 -2
- package/dist/{reservation-RGKvg2x6.cjs.map → reservation-CDbInVw0.cjs.map} +1 -1
- package/dist/tbv/core/clients/index.cjs +1 -1
- package/dist/tbv/core/clients/index.js +2 -2
- package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +14 -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 +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +58 -57
- package/dist/tbv/core/managers/index.cjs +1 -1
- package/dist/tbv/core/managers/index.js +1 -1
- package/dist/tbv/core/services/activation/activateVault.d.ts +45 -0
- package/dist/tbv/core/services/activation/activateVault.d.ts.map +1 -1
- package/dist/tbv/core/services/activation/index.d.ts +1 -1
- package/dist/tbv/core/services/activation/index.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/peginState.d.ts +24 -0
- package/dist/tbv/core/services/deposit/peginState.d.ts.map +1 -1
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.js +34 -33
- package/dist/tbv/core/utils/index.cjs +1 -1
- package/dist/tbv/core/utils/index.js +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +58 -57
- package/package.json +1 -1
- package/dist/BTCVaultRegistry.abi-AUAyCHal.cjs +0 -2
- package/dist/BTCVaultRegistry.abi-AUAyCHal.cjs.map +0 -1
- package/dist/BTCVaultRegistry.abi-CixOlp3B.js.map +0 -1
- package/dist/buildAndBroadcastRefund-BL8u-Ti4.cjs +0 -2
- package/dist/buildAndBroadcastRefund-BL8u-Ti4.cjs.map +0 -1
- package/dist/buildAndBroadcastRefund-DBA-Mp4I.js.map +0 -1
- package/dist/peginState-BB81JI6I.js.map +0 -1
- package/dist/peginState-CBBJw4Za.cjs +0 -2
- package/dist/peginState-CBBJw4Za.cjs.map +0 -1
package/dist/tbv/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../challengeAssert-BFRE2DM-.cjs"),m=require("../constants-DU5CGcqO.cjs"),n=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../verifyScriptPathSchnorrSignature-CYjK4IP_.cjs"),R=require("../peginInput-Ci921gTl.cjs"),g=require("../noPayout-qUEtRKc_.cjs"),t=require("../bitcoin-m84N5a8o.cjs"),c=require("../validation-CDbOaDj7.cjs"),O=require("../signing-Bnsro0hE.cjs"),l=require("../PeginManager-CogqZaa2.cjs"),d=require("../signPsbtsWithFallback-Xs4jZw5z.cjs"),_=require("../ProtocolParams.abi-C8U7BHCS.cjs"),y=require("../BTCVaultRegistry.abi-AUAyCHal.cjs"),b=require("../BTCVaultRegistryKeyEpochs.abi-_NERAdc5.cjs"),P=require("../errors-CGcNP0rV.cjs"),T=require("../deriveVaultRoot-p4uGsM7w.cjs"),C=require("../parseFundingOutpoints-C_-PT9BT.cjs"),o=require("../waitForTransactionReceiptSmartAware-AgZ-3WV_.cjs"),i=require("../fundPeginTransaction-BLD8FRL9.cjs"),p=require("../reservation-RGKvg2x6.cjs"),a=require("../mempoolApi-DfD3_Y6v.cjs"),r=require("../batchPoll-D5IDDOa8.cjs"),s=require("../json-rpc-client-BiAmg_ho.cjs"),V=require("../onChainBtcPubkey-C_a2L3kL.cjs"),A=require("../errors-2aF9oRwM.cjs"),e=require("../buildAndBroadcastRefund-BL8u-Ti4.cjs"),E=require("../peginState-CBBJw4Za.cjs");exports.buildChallengeAssertPsbt=S.buildChallengeAssertPsbt;exports.computeNumLocalChallengers=S.computeNumLocalChallengers;exports.assertValidVaultCoreVersion=m.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=R.buildPeginInputPsbt;exports.extractPeginInputSignature=R.extractPeginInputSignature;exports.finalizePeginInputPsbt=R.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=g.buildNoPayoutPsbt;exports.buildRefundPsbt=g.buildRefundPsbt;exports.canonicalizeBtcPubkey=t.canonicalizeBtcPubkey;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=c.BITCOIN_ADDRESS_RE;exports.HEX_RE=c.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=c.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=c.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=c.TXID_RE;exports.combineAbortSignals=c.combineAbortSignals;exports.createTaprootScriptPathSignOptions=O.createTaprootScriptPathSignOptions;exports.PeginManager=l.PeginManager;exports.buildDepositTerms=l.buildDepositTerms;exports.computeWotsBlockPublicKeysHash=l.computeWotsBlockPublicKeysHash;exports.deriveWotsBlocksFromSeed=l.deriveWotsBlocksFromSeed;exports.estimateSubmitPeginRequestBatchGas=l.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=y.BTCVaultRegistryABI;exports.BTCVaultRegistryKeyEpochsABI=b.BTCVaultRegistryKeyEpochsABI;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=T.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=T.buildFundingOutpointsCommitment;exports.buildVaultContext=T.buildVaultContext;exports.deriveVaultRoot=T.deriveVaultRoot;exports.parseFundingOutpointsFromTx=C.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=r.OnChainBtcVaultStatus;exports.ServerIdentityError=r.ServerIdentityError;exports.VaultProviderRpcClient=r.VaultProviderRpcClient;exports.ViemOperationKeyReader=r.ViemOperationKeyReader;exports.ViemProtocolParamsReader=r.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=r.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=r.ViemVaultKeeperReader;exports.VpResponseValidationError=r.VpResponseValidationError;exports.VpTokenRegistry=r.VpTokenRegistry;exports.batchPollByProvider=r.batchPollByProvider;exports.createAuthenticatedVpClient=r.createAuthenticatedVpClient;exports.primeVpTokenRegistry=r.primeVpTokenRegistry;exports.resolveProtocolAddresses=r.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=r.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=r.verifyServerIdentity;exports.vpTokenRegistry=r.vpTokenRegistry;exports.AUTH_REJECTED_RPC_CODE=s.AUTH_REJECTED_RPC_CODE;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.isAuthRejectedError=s.isAuthRejectedError;exports.assertOnChainBtcPubkey=V.assertOnChainBtcPubkey;exports.DEPOSIT_TERMS_REJECTED_ERROR_NAME=A.DEPOSIT_TERMS_REJECTED_ERROR_NAME;exports.DepositTermsRejectedError=A.DepositTermsRejectedError;exports.isDepositTermsRejectedError=A.isDepositTermsRejectedError;exports.isWotsMismatchError=A.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.assertVaultProviderHintAccepted=e.assertVaultProviderHintAccepted;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isHintAccepted=e.isHintAccepted;exports.isParticipantKeyDriftError=e.isParticipantKeyDriftError;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.matchKeyHint=e.matchKeyHint;exports.matchKeySetHint=e.matchKeySetHint;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=E.ContractStatus;exports.PeginAction=E.PeginAction;exports.canPerformAction=E.canPerformAction;exports.getPeginProtocolState=E.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=E.isActivationDeadlinePassedOnChain;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../challengeAssert-BFRE2DM-.cjs"),m=require("../constants-DU5CGcqO.cjs"),n=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../verifyScriptPathSchnorrSignature-CYjK4IP_.cjs"),R=require("../peginInput-Ci921gTl.cjs"),g=require("../noPayout-qUEtRKc_.cjs"),t=require("../bitcoin-m84N5a8o.cjs"),c=require("../validation-CDbOaDj7.cjs"),O=require("../signing-Bnsro0hE.cjs"),l=require("../PeginManager-792nHwLl.cjs"),d=require("../signPsbtsWithFallback-Xs4jZw5z.cjs"),_=require("../ProtocolParams.abi-C8U7BHCS.cjs"),y=require("../BTCVaultRegistry.abi-COxUdCTR.cjs"),b=require("../BTCVaultRegistryKeyEpochs.abi-_NERAdc5.cjs"),P=require("../errors-CGcNP0rV.cjs"),T=require("../deriveVaultRoot-p4uGsM7w.cjs"),C=require("../parseFundingOutpoints-C_-PT9BT.cjs"),o=require("../waitForTransactionReceiptSmartAware-AgZ-3WV_.cjs"),i=require("../fundPeginTransaction-BLD8FRL9.cjs"),p=require("../reservation-CDbInVw0.cjs"),a=require("../mempoolApi-DjwZ130O.cjs"),r=require("../batchPoll-xvVjiJXJ.cjs"),s=require("../json-rpc-client-BiAmg_ho.cjs"),V=require("../onChainBtcPubkey-C_a2L3kL.cjs"),A=require("../errors-2aF9oRwM.cjs"),e=require("../buildAndBroadcastRefund-HBOCjeUh.cjs"),E=require("../peginState-eaQ4IO_R.cjs");exports.buildChallengeAssertPsbt=S.buildChallengeAssertPsbt;exports.computeNumLocalChallengers=S.computeNumLocalChallengers;exports.assertValidVaultCoreVersion=m.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=R.buildPeginInputPsbt;exports.extractPeginInputSignature=R.extractPeginInputSignature;exports.finalizePeginInputPsbt=R.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=g.buildNoPayoutPsbt;exports.buildRefundPsbt=g.buildRefundPsbt;exports.canonicalizeBtcPubkey=t.canonicalizeBtcPubkey;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=c.BITCOIN_ADDRESS_RE;exports.HEX_RE=c.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=c.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=c.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=c.TXID_RE;exports.combineAbortSignals=c.combineAbortSignals;exports.createTaprootScriptPathSignOptions=O.createTaprootScriptPathSignOptions;exports.PeginManager=l.PeginManager;exports.buildDepositTerms=l.buildDepositTerms;exports.computeWotsBlockPublicKeysHash=l.computeWotsBlockPublicKeysHash;exports.deriveWotsBlocksFromSeed=l.deriveWotsBlocksFromSeed;exports.estimateSubmitPeginRequestBatchGas=l.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=y.BTCVaultRegistryABI;exports.BTCVaultRegistryKeyEpochsABI=b.BTCVaultRegistryKeyEpochsABI;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=T.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=T.buildFundingOutpointsCommitment;exports.buildVaultContext=T.buildVaultContext;exports.deriveVaultRoot=T.deriveVaultRoot;exports.parseFundingOutpointsFromTx=C.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=r.OnChainBtcVaultStatus;exports.ServerIdentityError=r.ServerIdentityError;exports.VaultProviderRpcClient=r.VaultProviderRpcClient;exports.ViemOperationKeyReader=r.ViemOperationKeyReader;exports.ViemProtocolParamsReader=r.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=r.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=r.ViemVaultKeeperReader;exports.VpResponseValidationError=r.VpResponseValidationError;exports.VpTokenRegistry=r.VpTokenRegistry;exports.batchPollByProvider=r.batchPollByProvider;exports.createAuthenticatedVpClient=r.createAuthenticatedVpClient;exports.primeVpTokenRegistry=r.primeVpTokenRegistry;exports.resolveProtocolAddresses=r.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=r.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=r.verifyServerIdentity;exports.vpTokenRegistry=r.vpTokenRegistry;exports.AUTH_REJECTED_RPC_CODE=s.AUTH_REJECTED_RPC_CODE;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.isAuthRejectedError=s.isAuthRejectedError;exports.assertOnChainBtcPubkey=V.assertOnChainBtcPubkey;exports.DEPOSIT_TERMS_REJECTED_ERROR_NAME=A.DEPOSIT_TERMS_REJECTED_ERROR_NAME;exports.DepositTermsRejectedError=A.DepositTermsRejectedError;exports.isDepositTermsRejectedError=A.isDepositTermsRejectedError;exports.isWotsMismatchError=A.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.activateVaultAndRedeem=e.activateVaultAndRedeem;exports.assertVaultProviderHintAccepted=e.assertVaultProviderHintAccepted;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isHintAccepted=e.isHintAccepted;exports.isParticipantKeyDriftError=e.isParticipantKeyDriftError;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.matchKeyHint=e.matchKeyHint;exports.matchKeySetHint=e.matchKeySetHint;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=E.ContractStatus;exports.PeginAction=E.PeginAction;exports.canPerformAction=E.canPerformAction;exports.getPeginProtocolState=E.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=E.isActivationDeadlinePassedOnChain;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/tbv/index.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { b as s, c as t } from "../challengeAssert-C7PzyJ7g.js";
|
|
2
2
|
import { a as o } from "../constants-GjWXdaqV.js";
|
|
3
3
|
import { computeMinClaimValue as n, computeMinPeginFee as p, deriveVaultId as u, expandAuthAnchor as c, expandHashlockSecret as l, expandWotsSeed as d, peginP2aAnchorOutput as P, supportedTxGraphVersions as E, validatePeginP2aAnchor as T } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
4
|
-
import { P as R, d as S, f as g, c as
|
|
5
|
-
import { b as
|
|
4
|
+
import { P as R, d as S, f as g, c as m, b as _, a as f, g as x, e as b } from "../verifyScriptPathSchnorrSignature-Bav08_7R.js";
|
|
5
|
+
import { b as V, e as v, f as C } from "../peginInput-HQPWZfly.js";
|
|
6
6
|
import { a as y, b as I } from "../noPayout-DuE-UyhQ.js";
|
|
7
7
|
import { c as F, d as U, a as B, b as N, e as M, f as H, k as K, g as L, h as k, i as X, j as W, p as w, s as G, t as j, u as J, v as Y } from "../bitcoin-d9eaaZB_.js";
|
|
8
8
|
import { B as z, H as q, K as Q, M as $, T as aa, c as ea } from "../validation-Dj3dqYtl.js";
|
|
9
9
|
import { c as ta } from "../signing-DaLvGwQe.js";
|
|
10
|
-
import { P as oa, b as ia, c as na, d as pa, e as ua } from "../PeginManager-
|
|
10
|
+
import { P as oa, b as ia, c as na, d as pa, e as ua } from "../PeginManager-Ddn6NDm3.js";
|
|
11
11
|
import { P as la, c as da, f as Pa, s as Ea, v as Ta } from "../signPsbtsWithFallback-eY1YgV13.js";
|
|
12
12
|
import { A as Ra, P as Sa } from "../ProtocolParams.abi-CV938AYZ.js";
|
|
13
|
-
import { B as
|
|
13
|
+
import { B as ma } from "../BTCVaultRegistry.abi-Ch0IiqNK.js";
|
|
14
14
|
import { B as fa } from "../BTCVaultRegistryKeyEpochs.abi-CXjhRZbm.js";
|
|
15
|
-
import { C as ba, e as Oa, g as
|
|
15
|
+
import { C as ba, e as Oa, g as Va, h as va, i as Ca } from "../errors-Blc-JWnI.js";
|
|
16
16
|
import { V as ya, b as Ia, a as Da, d as Fa } from "../deriveVaultRoot-D0RY5GJc.js";
|
|
17
17
|
import { p as Ba } from "../parseFundingOutpoints-GSM-IaaK.js";
|
|
18
18
|
import { B as Ma, a as Ha, f as Ka, c as La, b as ka, d as Xa, g as Wa, i as wa, h as Ga, s as ja, e as Ja, w as Ya } from "../waitForTransactionReceiptSmartAware-lobLm0q0.js";
|
|
19
19
|
import { B as za, D as qa, L as Qa, M as $a, c as ae, P as ee, b as se, a as te, S as re, T as oe, W as ie, f as ne, d as pe, p as ue, r as ce } from "../fundPeginTransaction-B2wyjqp0.js";
|
|
20
|
-
import { U as de, a as Pe, e as Ee, f as Te, v as Ae } from "../reservation-
|
|
21
|
-
import { M as Se, V as ge, g as
|
|
22
|
-
import { O as Ue, S as Be, V as Ne, g as Me, h as He, i as Ke, j as Le, a as ke, d as Xe, b as We, f as we, p as Ge, r as je, v as Je, c as Ye, e as Ze } from "../batchPoll-
|
|
20
|
+
import { U as de, a as Pe, e as Ee, f as Te, v as Ae } from "../reservation-B4i_PQhY.js";
|
|
21
|
+
import { M as Se, V as ge, g as me, a as _e, b as fe, c as xe, d as be, e as Oe, f as Ve, h as ve, i as Ce, p as he, v as ye, j as Ie, k as De } from "../mempoolApi-BTkbTDSY.js";
|
|
22
|
+
import { O as Ue, S as Be, V as Ne, g as Me, h as He, i as Ke, j as Le, a as ke, d as Xe, b as We, f as we, p as Ge, r as je, v as Je, c as Ye, e as Ze } from "../batchPoll-qXRNTvnR.js";
|
|
23
23
|
import { A as qe, D as Qe, J as $e, a as as, b as es, d as ss, P as ts, R as rs, e as os, c as is, V as ns, i as ps } from "../json-rpc-client-DuUARJvV.js";
|
|
24
24
|
import { a as cs } from "../onChainBtcPubkey-DeF4cKoO.js";
|
|
25
25
|
import { D as ds, a as Ps, b as Es, i as Ts } from "../errors-kXGQXKxZ.js";
|
|
26
|
-
import { B as Rs, C as Ss, P as gs,
|
|
27
|
-
import { C as
|
|
26
|
+
import { B as Rs, C as Ss, P as gs, E as ms, F as _s, G as fs, H as xs, R as bs, a as Os, b as Vs, o as vs, A as Cs, D as hs, i as ys, p as Is, k as Ds, z as Fs, y as Us, m as Bs, q as Ns, t as Ms, u as Hs, x as Ks, r as Ls, s as ks, c as Xs, d as Ws, e as ws, v as Gs, f as js, g as Js, h as Ys, j as Zs, l as zs, n as qs, w as Qs } from "../buildAndBroadcastRefund-C-rbYMy6.js";
|
|
27
|
+
import { C as at, P as et, c as st, g as tt, i as rt } from "../peginState-CxDiaKuk.js";
|
|
28
28
|
export {
|
|
29
29
|
qe as AUTH_REJECTED_RPC_CODE,
|
|
30
30
|
Ra as ApplicationRegistryABI,
|
|
31
31
|
Rs as BIP68NotMatureError,
|
|
32
32
|
z as BITCOIN_ADDRESS_RE,
|
|
33
|
-
|
|
33
|
+
ma as BTCVaultRegistryABI,
|
|
34
34
|
fa as BTCVaultRegistryKeyEpochsABI,
|
|
35
35
|
za as BTC_DUST_SAT,
|
|
36
36
|
Ma as BitcoinScriptType,
|
|
37
37
|
ba as CONTRACT_ERRORS,
|
|
38
38
|
Ss as ClaimerPegoutStatusValue,
|
|
39
|
-
|
|
39
|
+
at as ContractStatus,
|
|
40
40
|
ds as DEPOSIT_TERMS_REJECTED_ERROR_NAME,
|
|
41
41
|
qa as DUST_THRESHOLD,
|
|
42
42
|
Qe as DaemonStatus,
|
|
@@ -59,12 +59,12 @@ export {
|
|
|
59
59
|
ts as PRE_DEPOSITOR_SIGNATURES_STATES,
|
|
60
60
|
gs as ParticipantKeyDriftError,
|
|
61
61
|
la as PayoutManager,
|
|
62
|
-
|
|
62
|
+
et as PeginAction,
|
|
63
63
|
oa as PeginManager,
|
|
64
64
|
Sa as ProtocolParamsABI,
|
|
65
65
|
R as PsbtSubstitutionError,
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
ms as REFUND_MAX_FEE_FRACTION_DENOMINATOR,
|
|
67
|
+
_s as REFUND_MAX_FEE_FRACTION_NUMERATOR,
|
|
68
68
|
fs as REFUND_MAX_FEE_RATE_SATS_VB,
|
|
69
69
|
xs as REFUND_VSIZE,
|
|
70
70
|
bs as RegisteredVaultVersionMismatchError,
|
|
@@ -88,27 +88,28 @@ export {
|
|
|
88
88
|
Xe as VpTokenRegistry,
|
|
89
89
|
ie as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
90
90
|
Os as activateVault,
|
|
91
|
+
Vs as activateVaultAndRedeem,
|
|
91
92
|
Ha as applyChangeOutputPolicy,
|
|
92
93
|
cs as assertOnChainBtcPubkey,
|
|
93
94
|
S as assertPsbtUnsignedTxMatches,
|
|
94
95
|
g as assertScriptPathSchnorrSignature,
|
|
95
96
|
Pe as assertUtxosAvailable,
|
|
96
97
|
o as assertValidVaultCoreVersion,
|
|
97
|
-
|
|
98
|
+
vs as assertVaultProviderHintAccepted,
|
|
98
99
|
We as batchPollByProvider,
|
|
99
|
-
|
|
100
|
+
Cs as buildAndBroadcastRefund,
|
|
100
101
|
s as buildChallengeAssertPsbt,
|
|
101
102
|
ia as buildDepositTerms,
|
|
102
103
|
Ia as buildFundingOutpointsCommitment,
|
|
103
104
|
y as buildNoPayoutPsbt,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
m as buildPayoutPsbt,
|
|
106
|
+
V as buildPeginInputPsbt,
|
|
107
|
+
_ as buildPeginTxFromFundedPrePegin,
|
|
107
108
|
f as buildPrePeginPsbt,
|
|
108
109
|
I as buildRefundPsbt,
|
|
109
110
|
Da as buildVaultContext,
|
|
110
111
|
Ka as calculateBtcTxHash,
|
|
111
|
-
|
|
112
|
+
st as canPerformAction,
|
|
112
113
|
F as canonicalizeBtcPubkey,
|
|
113
114
|
ea as combineAbortSignals,
|
|
114
115
|
La as computeChangeOutputFeeSats,
|
|
@@ -137,86 +138,86 @@ export {
|
|
|
137
138
|
Oa as extractErrorData,
|
|
138
139
|
Ee as extractInputsFromTransaction,
|
|
139
140
|
b as extractPayoutSignature,
|
|
140
|
-
|
|
141
|
-
|
|
141
|
+
v as extractPeginInputSignature,
|
|
142
|
+
C as finalizePeginInputPsbt,
|
|
142
143
|
Te as findOverlappingPendingVaults,
|
|
143
144
|
H as formatSatoshisToBtc,
|
|
144
145
|
Pa as forwardDepositApproval,
|
|
145
146
|
ne as fundPeginTransaction,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
me as getAddressTxs,
|
|
148
|
+
_e as getAddressUtxos,
|
|
149
|
+
Va as getContractErrorMessage,
|
|
149
150
|
Wa as getDustThreshold,
|
|
150
151
|
fe as getMempoolApiUrl,
|
|
151
152
|
K as getNetwork,
|
|
152
153
|
xe as getNetworkFees,
|
|
153
154
|
be as getOutspend,
|
|
154
|
-
|
|
155
|
+
tt as getPeginProtocolState,
|
|
155
156
|
wa as getPsbtInputFields,
|
|
156
157
|
Ga as getScriptType,
|
|
157
158
|
L as getSortedXOnlyPubkeys,
|
|
158
159
|
Oe as getTipHeight,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
Ve as getTxHex,
|
|
161
|
+
ve as getTxInfo,
|
|
162
|
+
Ce as getUtxoInfo,
|
|
163
|
+
va as handleContractError,
|
|
163
164
|
k as hexToUint8Array,
|
|
164
|
-
|
|
165
|
+
rt as isActivationDeadlinePassedOnChain,
|
|
165
166
|
X as isAddressFromPublicKey,
|
|
166
167
|
ps as isAuthRejectedError,
|
|
167
|
-
|
|
168
|
+
ys as isDepositAmountValid,
|
|
168
169
|
Es as isDepositTermsRejectedError,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
170
|
+
Is as isHintAccepted,
|
|
171
|
+
Ca as isKnownContractError,
|
|
172
|
+
Ds as isParticipantKeyDriftError,
|
|
173
|
+
Fs as isPegoutTerminalStatus,
|
|
174
|
+
Us as isRecognizedPegoutStatus,
|
|
175
|
+
Bs as isRegisteredVaultVersionMismatchError,
|
|
175
176
|
W as isValidHex,
|
|
176
177
|
Ts as isWotsMismatchError,
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
Ns as matchKeyHint,
|
|
179
|
+
Ms as matchKeySetHint,
|
|
179
180
|
Ba as parseFundingOutpointsFromTx,
|
|
180
181
|
pe as parseUnfundedWasmTransaction,
|
|
181
182
|
ue as peginOutputCount,
|
|
182
183
|
P as peginP2aAnchorOutput,
|
|
183
184
|
Ge as primeVpTokenRegistry,
|
|
184
185
|
w as processPublicKeyToXOnly,
|
|
185
|
-
|
|
186
|
+
he as pushTx,
|
|
186
187
|
ce as rateBasedTxBufferFee,
|
|
187
|
-
|
|
188
|
-
|
|
188
|
+
Hs as resolveCurrentParticipantKeys,
|
|
189
|
+
Ks as resolveParticipantKeysAtEpochs,
|
|
189
190
|
je as resolveProtocolAddresses,
|
|
190
|
-
|
|
191
|
+
Ls as runDepositorPresignFlow,
|
|
191
192
|
ja as selectUtxosForPegin,
|
|
192
193
|
Ja as shouldAddChangeOutput,
|
|
193
|
-
|
|
194
|
+
ks as signDepositorGraph,
|
|
194
195
|
G as stripHexPrefix,
|
|
195
|
-
|
|
196
|
+
Xs as submitWotsPublicKey,
|
|
196
197
|
E as supportedTxGraphVersions,
|
|
197
198
|
Ea as supportsDepositApproval,
|
|
198
199
|
j as toXOnly,
|
|
199
200
|
J as uint8ArrayToHex,
|
|
200
|
-
|
|
201
|
-
|
|
201
|
+
Ws as validateDepositAmount,
|
|
202
|
+
ws as validateMultiVaultDepositInputs,
|
|
202
203
|
ye as validateOffchainParams,
|
|
203
|
-
|
|
204
|
+
Gs as validateOnChainParticipantKeys,
|
|
204
205
|
Ie as validatePegInConfiguration,
|
|
205
206
|
T as validatePeginP2aAnchor,
|
|
206
|
-
|
|
207
|
-
|
|
207
|
+
js as validateProviderSelection,
|
|
208
|
+
Js as validateRemainingCapacity,
|
|
208
209
|
Je as validateRequestDepositorClaimerArtifactsResponse,
|
|
209
210
|
Ta as validateSecretAgainstHashlock,
|
|
210
211
|
De as validateTBVProtocolParams,
|
|
211
212
|
Ae as validateUtxosAvailable,
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
Ys as validateVaultAmounts,
|
|
214
|
+
Zs as validateVaultProviderPubkey,
|
|
214
215
|
Y as validateWalletPubkey,
|
|
215
|
-
|
|
216
|
-
|
|
216
|
+
zs as verifyRegisteredParticipantKeys,
|
|
217
|
+
qs as verifyRegisteredVaultVersions,
|
|
217
218
|
Ye as verifyServerIdentity,
|
|
218
219
|
Ze as vpTokenRegistry,
|
|
219
|
-
|
|
220
|
+
Qs as waitForPeginStatus,
|
|
220
221
|
Ya as waitForTransactionReceiptSmartAware
|
|
221
222
|
};
|
|
222
223
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const e=[{type:"function",name:"submitPeginRequest",inputs:[{name:"depositor",type:"address",internalType:"address"},{name:"depositorBtcPubKey",type:"bytes32",internalType:"bytes32"},{name:"btcPopSignature",type:"bytes",internalType:"bytes"},{name:"unsignedPrePeginTx",type:"bytes",internalType:"bytes"},{name:"depositorSignedPeginTx",type:"bytes",internalType:"bytes"},{name:"vaultProvider",type:"address",internalType:"address"},{name:"maxAcceptableCommissionBps",type:"uint16",internalType:"uint16"},{name:"hashlock",type:"bytes32",internalType:"bytes32"},{name:"htlcVout",type:"uint8",internalType:"uint8"},{name:"depositorPayoutBtcAddress",type:"bytes",internalType:"bytes"},{name:"depositorWotsPkHash",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"payable"},{type:"function",name:"submitPeginRequest",inputs:[{name:"depositor",type:"address",internalType:"address"},{name:"depositorBtcPubKey",type:"bytes32",internalType:"bytes32"},{name:"btcPopSignature",type:"bytes",internalType:"bytes"},{name:"unsignedPrePeginTx",type:"bytes",internalType:"bytes"},{name:"depositorSignedPeginTx",type:"bytes",internalType:"bytes"},{name:"vaultProvider",type:"address",internalType:"address"},{name:"maxAcceptableCommissionBps",type:"uint16",internalType:"uint16"},{name:"hashlock",type:"bytes32",internalType:"bytes32"},{name:"htlcVout",type:"uint8",internalType:"uint8"},{name:"referralCode",type:"uint32",internalType:"uint32"},{name:"depositorPayoutBtcAddress",type:"bytes",internalType:"bytes"},{name:"depositorWotsPkHash",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"payable"},{type:"function",name:"submitPeginRequestBatch",inputs:[{name:"depositor",type:"address",internalType:"address"},{name:"vaultProvider",type:"address",internalType:"address"},{name:"maxAcceptableCommissionBps",type:"uint16",internalType:"uint16"},{name:"requests",type:"tuple[]",internalType:"struct BTCVaultRegistryTypes.BatchPeginRequest[]",components:[{name:"depositorBtcPubKey",type:"bytes32",internalType:"bytes32"},{name:"btcPopSignature",type:"bytes",internalType:"bytes"},{name:"unsignedPrePeginTx",type:"bytes",internalType:"bytes"},{name:"depositorSignedPeginTx",type:"bytes",internalType:"bytes"},{name:"hashlock",type:"bytes32",internalType:"bytes32"},{name:"htlcVout",type:"uint8",internalType:"uint8"},{name:"referralCode",type:"uint32",internalType:"uint32"},{name:"depositorPayoutBtcAddress",type:"bytes",internalType:"bytes"},{name:"depositorWotsPkHash",type:"bytes32",internalType:"bytes32"}]}],outputs:[{name:"vaultIds",type:"bytes32[]",internalType:"bytes32[]"}],stateMutability:"payable"},{type:"function",name:"activateVaultWithSecret",inputs:[{name:"vaultId",type:"bytes32",internalType:"bytes32"},{name:"s",type:"bytes32",internalType:"bytes32"},{name:"activationMetadata",type:"bytes",internalType:"bytes"}],outputs:[],stateMutability:"nonpayable"},{type:"function",name:"getPegInFee",inputs:[{name:"vaultProvider",type:"address",internalType:"address"}],outputs:[{name:"totalFee",type:"uint256",internalType:"uint256"}],stateMutability:"view"},{type:"function",name:"getVaultProviderBTCKey",inputs:[{name:"vpAddr",type:"address",internalType:"address"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getCurrentOperationBtcKey",inputs:[{name:"provider",type:"address",internalType:"address"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getOperationBtcKeyAtEpoch",inputs:[{name:"provider",type:"address",internalType:"address"},{name:"epoch",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getPayoutScriptAtEpoch",inputs:[{name:"provider",type:"address",internalType:"address"},{name:"epoch",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"bytes",internalType:"bytes"}],stateMutability:"view"},{type:"function",name:"getVaultProviderCommission",inputs:[{name:"vpAddr",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"getBtcVaultBasicInfo",inputs:[{name:"vaultId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"vBasic",type:"tuple",internalType:"struct BTCVaultTypes.BTCVaultBasicInfo",components:[{name:"depositor",type:"address",internalType:"address"},{name:"depositorBtcPubKey",type:"bytes32",internalType:"bytes32"},{name:"amount",type:"uint256",internalType:"uint256"},{name:"vaultProvider",type:"address",internalType:"address"},{name:"status",type:"uint8",internalType:"enum IBTCVaultRegistry.BTCVaultStatus"},{name:"applicationEntryPoint",type:"address",internalType:"address"},{name:"createdAt",type:"uint256",internalType:"uint256"}]}],stateMutability:"view"},{type:"error",name:"InvalidPeginFee",inputs:[{name:"provided",type:"uint256",internalType:"uint256"},{name:"required",type:"uint256",internalType:"uint256"}]},{type:"error",name:"InvalidSecret",inputs:[]},{type:"error",name:"ActivationDeadlineExpired",inputs:[]},{type:"error",name:"InvalidHashlock",inputs:[]},{type:"error",name:"DuplicateHashlock",inputs:[]},{type:"error",name:"CapExceeded",inputs:[]},{type:"error",name:"InvalidOutputIndex",inputs:[]},{type:"error",name:"PeginSignaturesIncomplete",inputs:[]},{type:"function",name:"getBtcVaultProtocolInfo",inputs:[{name:"vaultId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"vProtocol",type:"tuple",internalType:"struct BTCVaultRegistryTypes.BTCVaultProtocolInfo",components:[{name:"depositorSignedPeginTx",type:"bytes",internalType:"bytes"},{name:"universalChallengersVersion",type:"uint16",internalType:"uint16"},{name:"appVaultKeepersVersion",type:"uint16",internalType:"uint16"},{name:"offchainParamsVersion",type:"uint16",internalType:"uint16"},{name:"verifiedAt",type:"uint256",internalType:"uint256"},{name:"depositorWotsPkHash",type:"bytes32",internalType:"bytes32"},{name:"hashlock",type:"bytes32",internalType:"bytes32"},{name:"htlcVout",type:"uint8",internalType:"uint8"},{name:"depositorPopSignature",type:"bytes",internalType:"bytes"},{name:"prePeginTxHash",type:"bytes32",internalType:"bytes32"},{name:"vaultProviderCommissionBps",type:"uint16",internalType:"uint16"},{name:"claimExpiredUntil",type:"uint256",internalType:"uint256"},{name:"vaultCoreVersion",type:"uint16",internalType:"uint16"}]}],stateMutability:"view"},{type:"function",name:"protocolParams",inputs:[],outputs:[{name:"",type:"address",internalType:"contract IProtocolParams"}],stateMutability:"view"},{type:"function",name:"applicationRegistry",inputs:[],outputs:[{name:"",type:"address",internalType:"contract IApplicationRegistry"}],stateMutability:"view"},{type:"error",name:"ZeroAddress",inputs:[]},{type:"error",name:"Unauthorized",inputs:[]},{type:"error",name:"InvalidAmount",inputs:[]},{type:"error",name:"TransferFailed",inputs:[]},{type:"error",name:"InvalidTransaction",inputs:[]},{type:"error",name:"EmptyPayoutAddress",inputs:[]},{type:"error",name:"PayoutAddressTooLong",inputs:[]},{type:"error",name:"VaultAlreadyExists",inputs:[]},{type:"error",name:"VaultFeeAlreadyEscrowed",inputs:[]},{type:"error",name:"NoEscrowedFees",inputs:[]},{type:"error",name:"BTCVaultNotFound",inputs:[]},{type:"error",name:"InvalidBTCVaultStatus",inputs:[]},{type:"error",name:"PeginNotExpired",inputs:[]},{type:"error",name:"InvalidParticipantsList",inputs:[]},{type:"error",name:"DuplicateParticipant",inputs:[]},{type:"error",name:"ParticipantRoleOverlap",inputs:[]},{type:"error",name:"NotAuthorizedToACK",inputs:[]},{type:"error",name:"UnauthorizedVaultKeeper",inputs:[]},{type:"error",name:"BlocklistedVaultKeeper",inputs:[]},{type:"error",name:"PeginTransactionExpired",inputs:[]},{type:"error",name:"PrePeginOutputAlreadyUsed",inputs:[]},{type:"error",name:"PeginTransactionAlreadyUsed",inputs:[]},{type:"error",name:"InvalidPeginFee",inputs:[{name:"provided",type:"uint256",internalType:"uint256"},{name:"required",type:"uint256",internalType:"uint256"}]},{type:"error",name:"AmountBelowMinimumThreshold",inputs:[{name:"actual",type:"uint256",internalType:"uint256"},{name:"minimum",type:"uint256",internalType:"uint256"}]},{type:"error",name:"InvalidOutputIndex",inputs:[{name:"provided",type:"uint256",internalType:"uint256"},{name:"maxValid",type:"uint256",internalType:"uint256"}]},{type:"error",name:"TooManyHtlcOutputs",inputs:[{name:"outputCount",type:"uint256",internalType:"uint256"},{name:"maxAllowed",type:"uint256",internalType:"uint256"}]},{type:"error",name:"VaultBelowMinimum",inputs:[{name:"actual",type:"uint256",internalType:"uint256"},{name:"minimum",type:"uint256",internalType:"uint256"}]},{type:"error",name:"VaultAboveMaximum",inputs:[{name:"actual",type:"uint256",internalType:"uint256"},{name:"maximum",type:"uint256",internalType:"uint256"}]},{type:"error",name:"InvalidBTCPublicKey",inputs:[]},{type:"error",name:"InvalidDepositorWotsPkHash",inputs:[]},{type:"error",name:"InvalidBTCProofOfPossession",inputs:[]},{type:"error",name:"EthKeyAlreadyRegistered",inputs:[]},{type:"error",name:"BtcKeyAlreadyRegistered",inputs:[]},{type:"error",name:"InvalidRegistrationFee",inputs:[]},{type:"error",name:"CommissionBelowMinimum",inputs:[{name:"provided",type:"uint16",internalType:"uint16"},{name:"minimum",type:"uint16",internalType:"uint16"}]},{type:"error",name:"CommissionAboveMaximum",inputs:[{name:"provided",type:"uint16",internalType:"uint16"}]},{type:"error",name:"CommissionUnchanged",inputs:[]},{type:"error",name:"VaultProviderCommissionExceeded",inputs:[{name:"maxAcceptable",type:"uint16",internalType:"uint16"},{name:"actual",type:"uint16",internalType:"uint16"}]},{type:"error",name:"VaultProviderNotRegistered",inputs:[]},{type:"error",name:"ApplicationAlreadyRegistered",inputs:[]},{type:"error",name:"ApplicationNotRegistered",inputs:[]},{type:"error",name:"ApplicationNotActive",inputs:[]},{type:"error",name:"InvalidApplicationStatus",inputs:[]},{type:"error",name:"OnlyApplicationEntryPoint",inputs:[]},{type:"error",name:"EmptyVaultKeepers",inputs:[]},{type:"error",name:"NoUniversalChallengersConfigured",inputs:[]},{type:"error",name:"NoAppVaultKeepersConfigured",inputs:[]},{type:"error",name:"PeginSignaturesIncomplete",inputs:[]},{type:"error",name:"InvalidSignatureLength",inputs:[]},{type:"error",name:"PeginInputSignatureAlreadySubmitted",inputs:[]},{type:"error",name:"InvalidHashlock",inputs:[]},{type:"error",name:"DuplicateHashlock",inputs:[]},{type:"error",name:"InvalidSecret",inputs:[]},{type:"error",name:"ActivationDeadlineExpired",inputs:[]},{type:"error",name:"PostExpiryGraceWindowElapsed",inputs:[]},{type:"error",name:"CapExceeded",inputs:[]}];exports.BTCVaultRegistryABI=e;
|
|
2
|
-
//# sourceMappingURL=BTCVaultRegistry.abi-AUAyCHal.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BTCVaultRegistry.abi-AUAyCHal.cjs","sources":["../src/tbv/core/contracts/abis/BTCVaultRegistry.abi.ts"],"sourcesContent":["/**\n * BTCVaultRegistry Contract ABI\n *\n * Minimal ABI containing only the functions needed by the SDK.\n * Full ABI is available in the vault service package.\n *\n * @module contracts/abis/BTCVaultRegistry\n */\n\n/**\n * Minimal ABI for BTCVaultRegistry contract.\n * Contains submitPeginRequest, submitPeginRequestBatch, activateVaultWithSecret, getPegInFee, getBtcVaultBasicInfo, and getVaultProviderCommission.\n */\nexport const BTCVaultRegistryABI = [\n {\n type: \"function\",\n name: \"submitPeginRequest\",\n inputs: [\n {\n name: \"depositor\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"submitPeginRequest\",\n inputs: [\n {\n name: \"depositor\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"referralCode\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"submitPeginRequestBatch\",\n inputs: [\n { name: \"depositor\", type: \"address\", internalType: \"address\" },\n { name: \"vaultProvider\", type: \"address\", internalType: \"address\" },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"requests\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultRegistryTypes.BatchPeginRequest[]\",\n components: [\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n { name: \"btcPopSignature\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"unsignedPrePeginTx\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n { name: \"hashlock\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"htlcVout\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"referralCode\", type: \"uint32\", internalType: \"uint32\" },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n outputs: [\n { name: \"vaultIds\", type: \"bytes32[]\", internalType: \"bytes32[]\" },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"activateVaultWithSecret\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"s\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"activationMetadata\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"getPegInFee\",\n inputs: [\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"totalFee\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getVaultProviderBTCKey\",\n inputs: [{ name: \"vpAddr\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // A vault provider's BTC key is no longer the fixed registration key\n // returned by `getVaultProviderBTCKey` above: it is an append-only history\n // of *operation* keys, rotated by the provider's cold ETH admin key. Each\n // vault freezes a `vpKeyEpoch` at `submitPeginRequest` and resolves the key\n // bonded at that epoch, so a later rotation never invalidates a live vault.\n //\n // `getCurrentOperationBtcKey` falls back on-chain to the registration key at\n // version 0, so adopting it is a no-op for a provider that never rotated.\n //\n // `getPayoutScriptAtEpoch` does NOT behave that way, and assuming it did was\n // wrong in an earlier revision of this comment. A payout script is mandatory\n // at registration and stored as version 1, so on an RFC-006 registry this\n // returns the operator's own registered script from the very first epoch —\n // not a BIP-86 derivation of its key. The contract's BIP-86 branch is a\n // migration default for pre-RFC-006 rows and is not reachable from\n // registration. An operator whose registered script happens to equal\n // bip86(key) is a coincidence of what it chose to register, not a fallback.\n //\n // This is why depositor payout validation must accept the legacy BIP-86 form\n // alongside the registered one: a payout graph is built once at BaBe Setup\n // and never rebuilt, so a vault whose graph predates its network's\n // btc-vault#2440 upgrade pays BIP-86 for the rest of its life. See\n // `acceptedPayoutScriptHexes` in `primitives/psbt/payout.ts`.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [{ name: \"provider\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpoch\",\n inputs: [\n { name: \"provider\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPayoutScriptAtEpoch\",\n inputs: [\n { name: \"provider\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getVaultProviderCommission\",\n inputs: [{ name: \"vpAddr\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"uint16\", internalType: \"uint16\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getBtcVaultBasicInfo\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"vBasic\",\n type: \"tuple\",\n internalType: \"struct BTCVaultTypes.BTCVaultBasicInfo\",\n components: [\n { name: \"depositor\", type: \"address\", internalType: \"address\" },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"status\",\n type: \"uint8\",\n internalType: \"enum IBTCVaultRegistry.BTCVaultStatus\",\n },\n {\n name: \"applicationEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n { name: \"createdAt\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"error\",\n name: \"InvalidPeginFee\",\n inputs: [\n {\n name: \"provided\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"required\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n {\n type: \"error\",\n name: \"InvalidSecret\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"ActivationDeadlineExpired\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"InvalidHashlock\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"DuplicateHashlock\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"CapExceeded\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"InvalidOutputIndex\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"PeginSignaturesIncomplete\",\n inputs: [],\n },\n {\n type: \"function\",\n name: \"getBtcVaultProtocolInfo\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"vProtocol\",\n type: \"tuple\",\n internalType: \"struct BTCVaultRegistryTypes.BTCVaultProtocolInfo\",\n components: [\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"universalChallengersVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"appVaultKeepersVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"offchainParamsVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"verifiedAt\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"depositorPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"prePeginTxHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"vaultProviderCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"claimExpiredUntil\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"vaultCoreVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"protocolParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IProtocolParams\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"applicationRegistry\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IApplicationRegistry\",\n },\n ],\n stateMutability: \"view\",\n },\n // ============================================================================\n // Errors — needed so viem can decode revert data into a named error.\n // Without these, every revert surfaces as \"Execution reverted for an\n // unknown reason.\" Mirrors errors thrown from BTCVaultRegistry's reachable\n // code paths (pegin submission, ACK, activation). Source:\n // https://github.com/babylonlabs-io/vault-contracts-aave-v4/blob/652c4582/src/protocol/lib/types/Errors.sol\n // ============================================================================\n { type: \"error\", name: \"ZeroAddress\", inputs: [] },\n { type: \"error\", name: \"Unauthorized\", inputs: [] },\n { type: \"error\", name: \"InvalidAmount\", inputs: [] },\n { type: \"error\", name: \"TransferFailed\", inputs: [] },\n { type: \"error\", name: \"InvalidTransaction\", inputs: [] },\n { type: \"error\", name: \"EmptyPayoutAddress\", inputs: [] },\n { type: \"error\", name: \"PayoutAddressTooLong\", inputs: [] },\n { type: \"error\", name: \"VaultAlreadyExists\", inputs: [] },\n { type: \"error\", name: \"VaultFeeAlreadyEscrowed\", inputs: [] },\n { type: \"error\", name: \"NoEscrowedFees\", inputs: [] },\n { type: \"error\", name: \"BTCVaultNotFound\", inputs: [] },\n { type: \"error\", name: \"InvalidBTCVaultStatus\", inputs: [] },\n { type: \"error\", name: \"PeginNotExpired\", inputs: [] },\n { type: \"error\", name: \"InvalidParticipantsList\", inputs: [] },\n { type: \"error\", name: \"DuplicateParticipant\", inputs: [] },\n { type: \"error\", name: \"ParticipantRoleOverlap\", inputs: [] },\n { type: \"error\", name: \"NotAuthorizedToACK\", inputs: [] },\n { type: \"error\", name: \"UnauthorizedVaultKeeper\", inputs: [] },\n { type: \"error\", name: \"BlocklistedVaultKeeper\", inputs: [] },\n { type: \"error\", name: \"PeginTransactionExpired\", inputs: [] },\n { type: \"error\", name: \"PrePeginOutputAlreadyUsed\", inputs: [] },\n { type: \"error\", name: \"PeginTransactionAlreadyUsed\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidPeginFee\",\n inputs: [\n { name: \"provided\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"required\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"AmountBelowMinimumThreshold\",\n inputs: [\n { name: \"actual\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"minimum\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"InvalidOutputIndex\",\n inputs: [\n { name: \"provided\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"maxValid\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"TooManyHtlcOutputs\",\n inputs: [\n { name: \"outputCount\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"maxAllowed\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"VaultBelowMinimum\",\n inputs: [\n { name: \"actual\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"minimum\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"VaultAboveMaximum\",\n inputs: [\n { name: \"actual\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"maximum\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n { type: \"error\", name: \"InvalidBTCPublicKey\", inputs: [] },\n { type: \"error\", name: \"InvalidDepositorWotsPkHash\", inputs: [] },\n { type: \"error\", name: \"InvalidBTCProofOfPossession\", inputs: [] },\n { type: \"error\", name: \"EthKeyAlreadyRegistered\", inputs: [] },\n { type: \"error\", name: \"BtcKeyAlreadyRegistered\", inputs: [] },\n { type: \"error\", name: \"InvalidRegistrationFee\", inputs: [] },\n {\n type: \"error\",\n name: \"CommissionBelowMinimum\",\n inputs: [\n { name: \"provided\", type: \"uint16\", internalType: \"uint16\" },\n { name: \"minimum\", type: \"uint16\", internalType: \"uint16\" },\n ],\n },\n {\n type: \"error\",\n name: \"CommissionAboveMaximum\",\n inputs: [{ name: \"provided\", type: \"uint16\", internalType: \"uint16\" }],\n },\n { type: \"error\", name: \"CommissionUnchanged\", inputs: [] },\n {\n type: \"error\",\n name: \"VaultProviderCommissionExceeded\",\n inputs: [\n { name: \"maxAcceptable\", type: \"uint16\", internalType: \"uint16\" },\n { name: \"actual\", type: \"uint16\", internalType: \"uint16\" },\n ],\n },\n { type: \"error\", name: \"VaultProviderNotRegistered\", inputs: [] },\n { type: \"error\", name: \"ApplicationAlreadyRegistered\", inputs: [] },\n { type: \"error\", name: \"ApplicationNotRegistered\", inputs: [] },\n { type: \"error\", name: \"ApplicationNotActive\", inputs: [] },\n { type: \"error\", name: \"InvalidApplicationStatus\", inputs: [] },\n { type: \"error\", name: \"OnlyApplicationEntryPoint\", inputs: [] },\n { type: \"error\", name: \"EmptyVaultKeepers\", inputs: [] },\n { type: \"error\", name: \"NoUniversalChallengersConfigured\", inputs: [] },\n { type: \"error\", name: \"NoAppVaultKeepersConfigured\", inputs: [] },\n { type: \"error\", name: \"PeginSignaturesIncomplete\", inputs: [] },\n { type: \"error\", name: \"InvalidSignatureLength\", inputs: [] },\n { type: \"error\", name: \"PeginInputSignatureAlreadySubmitted\", inputs: [] },\n { type: \"error\", name: \"InvalidHashlock\", inputs: [] },\n { type: \"error\", name: \"DuplicateHashlock\", inputs: [] },\n { type: \"error\", name: \"InvalidSecret\", inputs: [] },\n { type: \"error\", name: \"ActivationDeadlineExpired\", inputs: [] },\n { type: \"error\", name: \"PostExpiryGraceWindowElapsed\", inputs: [] },\n { type: \"error\", name: \"CapExceeded\", inputs: [] },\n] as const;\n"],"names":["BTCVaultRegistryABI"],"mappings":"aAaO,MAAMA,EAAsB,CACjC,CACE,KAAM,WACN,KAAM,qBACN,OAAQ,CACN,CACE,KAAM,YACN,KAAM,UACN,aAAc,SAAA,EAEhB,CACE,KAAM,qBACN,KAAM,UACN,aAAc,SAAA,EAEhB,CACE,KAAM,kBACN,KAAM,QACN,aAAc,OAAA,EAEhB,CACE,KAAM,qBACN,KAAM,QACN,aAAc,OAAA,EAEhB,CACE,KAAM,yBACN,KAAM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AC7D,CAAE,KAAM,QAAS,KAAM,oBAAqB,OAAQ,CAAA,CAAC,EACrD,CAAE,KAAM,QAAS,KAAM,mCAAoC,OAAQ,CAAA,CAAC,EACpE,CAAE,KAAM,QAAS,KAAM,8BAA+B,OAAQ,CAAA,CAAC,EAC/D,CAAE,KAAM,QAAS,KAAM,4BAA6B,OAAQ,CAAA,CAAC,EAC7D,CAAE,KAAM,QAAS,KAAM,yBAA0B,OAAQ,CAAA,CAAC,EAC1D,CAAE,KAAM,QAAS,KAAM,sCAAuC,OAAQ,CAAA,CAAC,EACvE,CAAE,KAAM,QAAS,KAAM,kBAAmB,OAAQ,CAAA,CAAC,EACnD,CAAE,KAAM,QAAS,KAAM,oBAAqB,OAAQ,CAAA,CAAC,EACrD,CAAE,KAAM,QAAS,KAAM,gBAAiB,OAAQ,CAAA,CAAC,EACjD,CAAE,KAAM,QAAS,KAAM,4BAA6B,OAAQ,CAAA,CAAC,EAC7D,CAAE,KAAM,QAAS,KAAM,+BAAgC,OAAQ,CAAA,CAAC,EAChE,CAAE,KAAM,QAAS,KAAM,cAAe,OAAQ,CAAA,CAAC,CACjD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BTCVaultRegistry.abi-CixOlp3B.js","sources":["../src/tbv/core/contracts/abis/BTCVaultRegistry.abi.ts"],"sourcesContent":["/**\n * BTCVaultRegistry Contract ABI\n *\n * Minimal ABI containing only the functions needed by the SDK.\n * Full ABI is available in the vault service package.\n *\n * @module contracts/abis/BTCVaultRegistry\n */\n\n/**\n * Minimal ABI for BTCVaultRegistry contract.\n * Contains submitPeginRequest, submitPeginRequestBatch, activateVaultWithSecret, getPegInFee, getBtcVaultBasicInfo, and getVaultProviderCommission.\n */\nexport const BTCVaultRegistryABI = [\n {\n type: \"function\",\n name: \"submitPeginRequest\",\n inputs: [\n {\n name: \"depositor\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"submitPeginRequest\",\n inputs: [\n {\n name: \"depositor\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"referralCode\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"submitPeginRequestBatch\",\n inputs: [\n { name: \"depositor\", type: \"address\", internalType: \"address\" },\n { name: \"vaultProvider\", type: \"address\", internalType: \"address\" },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"requests\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultRegistryTypes.BatchPeginRequest[]\",\n components: [\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n { name: \"btcPopSignature\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"unsignedPrePeginTx\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n { name: \"hashlock\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"htlcVout\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"referralCode\", type: \"uint32\", internalType: \"uint32\" },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n outputs: [\n { name: \"vaultIds\", type: \"bytes32[]\", internalType: \"bytes32[]\" },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"activateVaultWithSecret\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"s\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"activationMetadata\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"getPegInFee\",\n inputs: [\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"totalFee\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getVaultProviderBTCKey\",\n inputs: [{ name: \"vpAddr\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // A vault provider's BTC key is no longer the fixed registration key\n // returned by `getVaultProviderBTCKey` above: it is an append-only history\n // of *operation* keys, rotated by the provider's cold ETH admin key. Each\n // vault freezes a `vpKeyEpoch` at `submitPeginRequest` and resolves the key\n // bonded at that epoch, so a later rotation never invalidates a live vault.\n //\n // `getCurrentOperationBtcKey` falls back on-chain to the registration key at\n // version 0, so adopting it is a no-op for a provider that never rotated.\n //\n // `getPayoutScriptAtEpoch` does NOT behave that way, and assuming it did was\n // wrong in an earlier revision of this comment. A payout script is mandatory\n // at registration and stored as version 1, so on an RFC-006 registry this\n // returns the operator's own registered script from the very first epoch —\n // not a BIP-86 derivation of its key. The contract's BIP-86 branch is a\n // migration default for pre-RFC-006 rows and is not reachable from\n // registration. An operator whose registered script happens to equal\n // bip86(key) is a coincidence of what it chose to register, not a fallback.\n //\n // This is why depositor payout validation must accept the legacy BIP-86 form\n // alongside the registered one: a payout graph is built once at BaBe Setup\n // and never rebuilt, so a vault whose graph predates its network's\n // btc-vault#2440 upgrade pays BIP-86 for the rest of its life. See\n // `acceptedPayoutScriptHexes` in `primitives/psbt/payout.ts`.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [{ name: \"provider\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpoch\",\n inputs: [\n { name: \"provider\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPayoutScriptAtEpoch\",\n inputs: [\n { name: \"provider\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getVaultProviderCommission\",\n inputs: [{ name: \"vpAddr\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"uint16\", internalType: \"uint16\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getBtcVaultBasicInfo\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"vBasic\",\n type: \"tuple\",\n internalType: \"struct BTCVaultTypes.BTCVaultBasicInfo\",\n components: [\n { name: \"depositor\", type: \"address\", internalType: \"address\" },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"status\",\n type: \"uint8\",\n internalType: \"enum IBTCVaultRegistry.BTCVaultStatus\",\n },\n {\n name: \"applicationEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n { name: \"createdAt\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"error\",\n name: \"InvalidPeginFee\",\n inputs: [\n {\n name: \"provided\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"required\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n {\n type: \"error\",\n name: \"InvalidSecret\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"ActivationDeadlineExpired\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"InvalidHashlock\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"DuplicateHashlock\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"CapExceeded\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"InvalidOutputIndex\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"PeginSignaturesIncomplete\",\n inputs: [],\n },\n {\n type: \"function\",\n name: \"getBtcVaultProtocolInfo\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"vProtocol\",\n type: \"tuple\",\n internalType: \"struct BTCVaultRegistryTypes.BTCVaultProtocolInfo\",\n components: [\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"universalChallengersVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"appVaultKeepersVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"offchainParamsVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"verifiedAt\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"depositorPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"prePeginTxHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"vaultProviderCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"claimExpiredUntil\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"vaultCoreVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"protocolParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IProtocolParams\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"applicationRegistry\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IApplicationRegistry\",\n },\n ],\n stateMutability: \"view\",\n },\n // ============================================================================\n // Errors — needed so viem can decode revert data into a named error.\n // Without these, every revert surfaces as \"Execution reverted for an\n // unknown reason.\" Mirrors errors thrown from BTCVaultRegistry's reachable\n // code paths (pegin submission, ACK, activation). Source:\n // https://github.com/babylonlabs-io/vault-contracts-aave-v4/blob/652c4582/src/protocol/lib/types/Errors.sol\n // ============================================================================\n { type: \"error\", name: \"ZeroAddress\", inputs: [] },\n { type: \"error\", name: \"Unauthorized\", inputs: [] },\n { type: \"error\", name: \"InvalidAmount\", inputs: [] },\n { type: \"error\", name: \"TransferFailed\", inputs: [] },\n { type: \"error\", name: \"InvalidTransaction\", inputs: [] },\n { type: \"error\", name: \"EmptyPayoutAddress\", inputs: [] },\n { type: \"error\", name: \"PayoutAddressTooLong\", inputs: [] },\n { type: \"error\", name: \"VaultAlreadyExists\", inputs: [] },\n { type: \"error\", name: \"VaultFeeAlreadyEscrowed\", inputs: [] },\n { type: \"error\", name: \"NoEscrowedFees\", inputs: [] },\n { type: \"error\", name: \"BTCVaultNotFound\", inputs: [] },\n { type: \"error\", name: \"InvalidBTCVaultStatus\", inputs: [] },\n { type: \"error\", name: \"PeginNotExpired\", inputs: [] },\n { type: \"error\", name: \"InvalidParticipantsList\", inputs: [] },\n { type: \"error\", name: \"DuplicateParticipant\", inputs: [] },\n { type: \"error\", name: \"ParticipantRoleOverlap\", inputs: [] },\n { type: \"error\", name: \"NotAuthorizedToACK\", inputs: [] },\n { type: \"error\", name: \"UnauthorizedVaultKeeper\", inputs: [] },\n { type: \"error\", name: \"BlocklistedVaultKeeper\", inputs: [] },\n { type: \"error\", name: \"PeginTransactionExpired\", inputs: [] },\n { type: \"error\", name: \"PrePeginOutputAlreadyUsed\", inputs: [] },\n { type: \"error\", name: \"PeginTransactionAlreadyUsed\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidPeginFee\",\n inputs: [\n { name: \"provided\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"required\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"AmountBelowMinimumThreshold\",\n inputs: [\n { name: \"actual\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"minimum\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"InvalidOutputIndex\",\n inputs: [\n { name: \"provided\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"maxValid\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"TooManyHtlcOutputs\",\n inputs: [\n { name: \"outputCount\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"maxAllowed\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"VaultBelowMinimum\",\n inputs: [\n { name: \"actual\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"minimum\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"VaultAboveMaximum\",\n inputs: [\n { name: \"actual\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"maximum\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n { type: \"error\", name: \"InvalidBTCPublicKey\", inputs: [] },\n { type: \"error\", name: \"InvalidDepositorWotsPkHash\", inputs: [] },\n { type: \"error\", name: \"InvalidBTCProofOfPossession\", inputs: [] },\n { type: \"error\", name: \"EthKeyAlreadyRegistered\", inputs: [] },\n { type: \"error\", name: \"BtcKeyAlreadyRegistered\", inputs: [] },\n { type: \"error\", name: \"InvalidRegistrationFee\", inputs: [] },\n {\n type: \"error\",\n name: \"CommissionBelowMinimum\",\n inputs: [\n { name: \"provided\", type: \"uint16\", internalType: \"uint16\" },\n { name: \"minimum\", type: \"uint16\", internalType: \"uint16\" },\n ],\n },\n {\n type: \"error\",\n name: \"CommissionAboveMaximum\",\n inputs: [{ name: \"provided\", type: \"uint16\", internalType: \"uint16\" }],\n },\n { type: \"error\", name: \"CommissionUnchanged\", inputs: [] },\n {\n type: \"error\",\n name: \"VaultProviderCommissionExceeded\",\n inputs: [\n { name: \"maxAcceptable\", type: \"uint16\", internalType: \"uint16\" },\n { name: \"actual\", type: \"uint16\", internalType: \"uint16\" },\n ],\n },\n { type: \"error\", name: \"VaultProviderNotRegistered\", inputs: [] },\n { type: \"error\", name: \"ApplicationAlreadyRegistered\", inputs: [] },\n { type: \"error\", name: \"ApplicationNotRegistered\", inputs: [] },\n { type: \"error\", name: \"ApplicationNotActive\", inputs: [] },\n { type: \"error\", name: \"InvalidApplicationStatus\", inputs: [] },\n { type: \"error\", name: \"OnlyApplicationEntryPoint\", inputs: [] },\n { type: \"error\", name: \"EmptyVaultKeepers\", inputs: [] },\n { type: \"error\", name: \"NoUniversalChallengersConfigured\", inputs: [] },\n { type: \"error\", name: \"NoAppVaultKeepersConfigured\", inputs: [] },\n { type: \"error\", name: \"PeginSignaturesIncomplete\", inputs: [] },\n { type: \"error\", name: \"InvalidSignatureLength\", inputs: [] },\n { type: \"error\", name: \"PeginInputSignatureAlreadySubmitted\", inputs: [] },\n { type: \"error\", name: \"InvalidHashlock\", inputs: [] },\n { type: \"error\", name: \"DuplicateHashlock\", inputs: [] },\n { type: \"error\", name: \"InvalidSecret\", inputs: [] },\n { type: \"error\", name: \"ActivationDeadlineExpired\", inputs: [] },\n { type: \"error\", name: \"PostExpiryGraceWindowElapsed\", inputs: [] },\n { type: \"error\", name: \"CapExceeded\", inputs: [] },\n] as const;\n"],"names":["BTCVaultRegistryABI"],"mappings":"AAaO,MAAMA,IAAsB;AAAA,EACjC;AAAA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SAAS,MAAM,wBAAwB,QAAQ,CAAA,EAAC;AAAA,EACxD,EAAE,MAAM,SAAS,MAAM,4BAA4B,QAAQ,CAAA,EAAC;AAAA,EAC5D,EAAE,MAAM,SAAS,MAAM,6BAA6B,QAAQ,CAAA,EAAC;AAAA,EAC7D,EAAE,MAAM,SAAS,MAAM,qBAAqB,QAAQ,CAAA,EAAC;AAAA,EACrD,EAAE,MAAM,SAAS,MAAM,oCAAoC,QAAQ,CAAA,EAAC;AAAA,EACpE,EAAE,MAAM,SAAS,MAAM,+BAA+B,QAAQ,CAAA,EAAC;AAAA,EAC/D,EAAE,MAAM,SAAS,MAAM,6BAA6B,QAAQ,CAAA,EAAC;AAAA,EAC7D,EAAE,MAAM,SAAS,MAAM,0BAA0B,QAAQ,CAAA,EAAC;AAAA,EAC1D,EAAE,MAAM,SAAS,MAAM,uCAAuC,QAAQ,CAAA,EAAC;AAAA,EACvE,EAAE,MAAM,SAAS,MAAM,mBAAmB,QAAQ,CAAA,EAAC;AAAA,EACnD,EAAE,MAAM,SAAS,MAAM,qBAAqB,QAAQ,CAAA,EAAC;AAAA,EACrD,EAAE,MAAM,SAAS,MAAM,iBAAiB,QAAQ,CAAA,EAAC;AAAA,EACjD,EAAE,MAAM,SAAS,MAAM,6BAA6B,QAAQ,CAAA,EAAC;AAAA,EAC7D,EAAE,MAAM,SAAS,MAAM,gCAAgC,QAAQ,CAAA,EAAC;AAAA,EAChE,EAAE,MAAM,SAAS,MAAM,eAAe,QAAQ,CAAA,EAAC;AACjD;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var ge=Object.defineProperty;var fe=(e,t,r)=>t in e?ge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var $=(e,t,r)=>fe(e,typeof t!="symbol"?t+"":t,r);const Pe=require("./BTCVaultRegistry.abi-AUAyCHal.cjs"),p=require("./bitcoin-m84N5a8o.cjs"),_=require("./signPsbtsWithFallback-Xs4jZw5z.cjs"),y=require("./json-rpc-client-BiAmg_ho.cjs"),S=require("bitcoinjs-lib"),w=require("./verifyScriptPathSchnorrSignature-CYjK4IP_.cjs"),D=require("./noPayout-qUEtRKc_.cjs"),N=require("./signing-Bnsro0hE.cjs"),Y=require("./onChainBtcPubkey-C_a2L3kL.cjs"),ye=require("./constants-DU5CGcqO.cjs"),ve=/^0x[0-9a-fA-F]{64}$/,be=/^0x[0-9a-fA-F]{40}$/,me=/^0x([0-9a-fA-F]{2})*$/;function V(e,t){if(e.length!==66)throw new Error(`${t} must be 32 bytes (66 hex chars with 0x prefix), got length ${e.length}`);if(!ve.test(e))throw new Error(`${t} must contain only hex characters after the 0x prefix`)}function we(e,t){if(!be.test(e))throw new Error(`${t} must be a 20-byte 0x-prefixed hex address (42 chars)`)}function xe(e,t){if(!me.test(e))throw new Error(`${t} must be a 0x-prefixed hex string with an even number of hex chars`)}async function ke(e){const{btcVaultRegistryAddress:t,vaultId:r,hashlock:n,activationMetadata:a,writeContract:l,signal:o}=e;o==null||o.throwIfAborted(),we(t,"btcVaultRegistryAddress"),V(r,"vaultId");const i=p.ensureHexPrefix(e.secret);if(V(i,"secret"),n!==void 0&&(V(n,"hashlock"),!_.validateSecretAgainstHashlock(i,n)))throw new Error("Invalid secret: SHA256(secret) does not match the provided hashlock");return xe(a,"activationMetadata"),l({address:t,abi:Pe.BTCVaultRegistryABI,functionName:"activateVaultWithSecret",args:[r,i,a]})}const Z=1,Ee=1;function Te(e,t){const r=p.stripHexPrefix(t).toLowerCase(),a=e.map(l=>p.stripHexPrefix(l).toLowerCase()).filter(l=>l!==r);if(a.length===0)throw new Error("Cannot derive localChallengers: vault keeper set is empty (or contains only the depositor)");if(new Set(a).size!==a.length)throw new Error("Cannot derive localChallengers: duplicate vaultKeeper key — signing context is misconfigured");return a}function Se(e,t,r){const n=r.map(c=>p.stripHexPrefix(c).toLowerCase()),a=t.filter(c=>n.includes(c));if(a.length>0)throw new Error(`Cannot validate challenger set: vault keepers and universal challengers overlap (${a.join(", ")})`);const l=[...t,...n],o=e.map(c=>p.stripHexPrefix(c.challenger_pubkey).toLowerCase()),i=new Set(o);if(i.size!==o.length)throw new Error("Depositor graph contains duplicate challenger entries in challenger_presign_data");const u=new Set(l),s=l.filter(c=>!i.has(c)),h=o.filter(c=>!u.has(c));if(s.length>0||h.length>0)throw new Error("Depositor graph challenger set does not match expected (local ∪ universal)"+(s.length>0?` (missing: ${s.join(", ")})`:"")+(h.length>0?` (unexpected: ${h.join(", ")})`:""))}function Ce(e,t){const r=e.ins[t];return p.uint8ArrayToHex(new Uint8Array(r.hash).slice().reverse())}function K(e,t,r,n,a){const l=e.ins[t];if(l.index!==0)throw new Error(`NoPayout (challenger ${a}) input ${t} expected to spend ${n} vout 0, got vout ${l.index}`);const o=r.getId(),i=Ce(e,t);if(i!==o)throw new Error(`NoPayout (challenger ${a}) input ${t} does not reference ${n} (expected txid ${o}, got ${i})`)}async function _e(e,t,r){const n=[],a=[],l=[],o=Te(r.vaultKeeperBtcPubkeys,r.depositorBtcPubkey);Se(e.challenger_presign_data,o,r.universalChallengerBtcPubkeys);const i=await w.buildPayoutPsbt({vaultCoreVersion:r.vaultCoreVersion,vkClaimerPayoutScriptPubKeys:r.vkClaimerPayoutScriptPubKeys,vpCommissionScriptPubKey:r.vpCommissionScriptPubKey,payoutTxHex:e.payout_tx.tx_hex,peginTxHex:r.peginTxHex,assertTxHex:e.assert_tx.tx_hex,timelockAssert:r.timelockAssert,depositorBtcPubkey:r.depositorBtcPubkey,vaultProviderBtcPubkey:r.vaultProviderBtcPubkey,vaultKeeperBtcPubkeys:r.vaultKeeperBtcPubkeys,universalChallengerBtcPubkeys:r.universalChallengerBtcPubkeys,timelockPegin:r.timelockPegin,network:r.network,claimerBtcPubkey:r.depositorBtcPubkey,registeredPayoutScriptPubKey:r.registeredPayoutScriptPubKey,commissionBps:Ee,protocolFeeRate:r.protocolFeeRate,councilSize:r.councilMembers.length});n.push(i.psbtHex),a.push(N.createTaprootScriptPathSignOptions(t,Z));const u=p.stripHexPrefix(r.depositorBtcPubkey),s=S.Transaction.fromHex(p.stripHexPrefix(e.assert_tx.tx_hex));for(const h of e.challenger_presign_data){const c=p.stripHexPrefix(h.challenger_pubkey),d=n.length,f=await Be({challenger:h,challengerPubkey:c,claimerPubkey:u,localChallengers:o,assertTxParsed:s,ctx:r});n.push(f),a.push(N.createTaprootScriptPathSignOptions(t,Z)),l.push({challengerPubkey:c,noPayoutIdx:d})}return{psbtHexes:n,signOptions:a,challengerEntries:l}}async function Be(e){const{challenger:t,challengerPubkey:r,claimerPubkey:n,localChallengers:a,assertTxParsed:l,ctx:o}=e;D.assertNoPayoutOutputMatchesChallenger(t.nopayout_tx.tx_hex,r,o.network);const i=S.Transaction.fromHex(p.stripHexPrefix(t.nopayout_tx.tx_hex)),u=S.Transaction.fromHex(p.stripHexPrefix(t.challenge_assert_x_tx.tx_hex)),s=S.Transaction.fromHex(p.stripHexPrefix(t.challenge_assert_y_tx.tx_hex));if(i.ins.length!==3)throw new Error(`NoPayout (challenger ${r}) must have exactly 3 inputs, got ${i.ins.length}`);K(i,0,l,"Assert",r),K(i,1,u,"ChallengeAssertX",r),K(i,2,s,"ChallengeAssertY",r);const h=[l.outs[0],u.outs[0],s.outs[0]].map(c=>({script_pubkey:p.uint8ArrayToHex(new Uint8Array(c.script)),value:c.value}));return D.buildNoPayoutPsbt({noPayoutTxHex:t.nopayout_tx.tx_hex,challengerPubkey:r,prevouts:h,connectorParams:{txGraphVersion:o.vaultCoreVersion,claimer:n,localChallengers:a,universalChallengers:o.universalChallengerBtcPubkeys,timelockAssert:o.timelockAssert,councilMembers:o.councilMembers,councilQuorum:o.councilQuorum}})}function Ae(e,t,r){w.assertPsbtUnsignedTxMatches(e[0]);const a=w.extractPayoutSignature(e[0].returnedPsbtHex,r);w.assertScriptPathSchnorrSignature({requestedPsbtHex:e[0].requestedPsbtHex,signatureHex:a,signerXOnlyPubkeyHex:r,inputIndex:0});const l={};for(const o of t){w.assertPsbtUnsignedTxMatches(e[o.noPayoutIdx]);const i=w.extractPayoutSignature(e[o.noPayoutIdx].returnedPsbtHex,r);w.assertScriptPathSchnorrSignature({requestedPsbtHex:e[o.noPayoutIdx].requestedPsbtHex,signatureHex:i,signerXOnlyPubkeyHex:r,inputIndex:0}),l[o.challengerPubkey]={nopayout_signature:i}}return{payout_signatures:{payout_signature:a},per_challenger:l}}async function ne(e){const{depositorGraph:t,btcWallet:r,signingContext:n}=e,a=await r.getPublicKeyHex(),{depositorPubkey:l}=p.validateWalletPubkey(a,p.stripHexPrefix(n.depositorBtcPubkey)),{psbtHexes:o,signOptions:i,challengerEntries:u}=await _e(t,a,n),s=await _.signPsbtsWithFallback(r,o,i),h=o.map((c,d)=>({requestedPsbtHex:c,returnedPsbtHex:s[d]}));return Ae(h,u,l)}const Re=1e4;async function X(e){const{statusReader:t,peginTxid:r,targetStatuses:n,timeoutMs:a,pollIntervalMs:l=Re,signal:o}=e,i=Date.now();for(;;){if(o!=null&&o.aborted)throw new Error(`Polling aborted for pegin ${r.slice(0,8)}… (target: ${[...n].join(", ")})`);if(Date.now()-i>=a)throw new Error(`Polling timeout after ${a}ms for pegin ${r.slice(0,8)}… (target: ${[...n].join(", ")})`);try{const u=await t.getPeginStatus({pegin_txid:r},o);if(u.pegin_txid.toLowerCase()!==r.toLowerCase())throw new Error(`getPeginStatus returned status for pegin ${u.pegin_txid.slice(0,8)}…, requested ${r.slice(0,8)}…`);const s=u.status;if(n.has(s)||s===y.DaemonStatus.ACTIVATED)return s;if(s===y.DaemonStatus.EXPIRED||y.VP_TERMINAL_FAILURE_STATUSES.has(s))throw new Error(`Pegin ${r.slice(0,8)}… reached terminal status "${s}" while waiting for ${[...n].join(", ")}`)}catch(u){if(!(u instanceof y.JsonRpcError&&u.code===y.RpcErrorCode.PEGIN_NOT_FOUND))throw u}await new Promise((u,s)=>{const h=()=>{clearTimeout(c),s(new Error(`Polling aborted for pegin ${r.slice(0,8)}… (target: ${[...n].join(", ")})`))},c=setTimeout(()=>{o==null||o.removeEventListener("abort",h),u()},l);o==null||o.addEventListener("abort",h,{once:!0})})}}const $e=1200*1e3,oe=new Set([y.DaemonStatus.PENDING_ACKS,y.DaemonStatus.PENDING_ACTIVATION,y.DaemonStatus.ACTIVATED_PENDING_BROADCAST,y.DaemonStatus.ACTIVATED]),Ve=new Set([y.DaemonStatus.PENDING_DEPOSITOR_SIGNATURES,...oe]);function Ke(e){return e.map(t=>({claimerPubkeyXOnly:p.processPublicKeyToXOnly(t.claimer_pubkey),payoutTxHex:t.payout_tx.tx_hex,assertTxHex:t.assert_tx.tx_hex}))}function k(e){return p.processPublicKeyToXOnly(e).toLowerCase()}function Ie(e,t){const r=(i,u,s)=>{throw new Error(`Deposit terms ${i} (${String(u)}) does not match the vault's version-locked signing context (${String(s)}); refusing to sign payouts against terms that describe a different graph.`)};e.protocolFeeRate!==t.protocolFeeRate&&r("protocolFeeRate",e.protocolFeeRate,t.protocolFeeRate);const n=i=>i.map(k).sort(),a=(i,u)=>{const s=n(i),h=n(u);return s.length===h.length&&s.every((c,d)=>c===h[d])};a(e.vaultKeeperBtcPubkeys,t.vaultKeeperBtcPubkeys)||r("vaultKeeperBtcPubkeys",e.vaultKeeperBtcPubkeys.join(","),t.vaultKeeperBtcPubkeys.join(",")),a(e.universalChallengerBtcPubkeys,t.universalChallengerBtcPubkeys)||r("universalChallengerBtcPubkeys",e.universalChallengerBtcPubkeys.join(","),t.universalChallengerBtcPubkeys.join(","));const l=k(t.vaultProviderBtcPubkey),o=e.vaults.map(i=>k(i.vaultProviderBtcPubkey));o.includes(l)||r("vaults[].vaultProviderBtcPubkey",o.join(",")||"<no vaults>",t.vaultProviderBtcPubkey)}function He(e,t,r,n){const a=k(n),l=[k(t),...r.map(k)],o=new Set(l);if(o.size!==l.length)throw new Error("Cannot validate claimer set: signing context contains duplicate vault provider or vault keeper key");if(o.has(a))throw new Error("Cannot validate claimer set: depositor key overlaps with vault provider or vault keeper set");const i=e.map(d=>k(d.claimer_pubkey));if(new Set(i).size!==i.length)throw new Error("Presign response contains duplicate claimer entries");const u=i.filter(d=>d!==a),s=new Set(u),h=l.filter(d=>!s.has(d)),c=u.filter(d=>!o.has(d));if(h.length>0||c.length>0)throw new Error("Presign response claimer set does not match expected (vault provider ∪ vault keepers)"+(h.length>0?` (missing: ${h.join(", ")})`:"")+(c.length>0?` (unexpected: ${c.join(", ")})`:""))}function J(e,t){return{vaultCoreVersion:t.vaultCoreVersion,payoutTxHex:e.payoutTxHex,peginTxHex:t.peginTxHex,assertTxHex:e.assertTxHex,vaultProviderBtcPubkey:t.vaultProviderBtcPubkey,vaultKeeperBtcPubkeys:t.vaultKeeperBtcPubkeys,universalChallengerBtcPubkeys:t.universalChallengerBtcPubkeys,depositorBtcPubkey:t.depositorBtcPubkey,timelockPegin:t.timelockPegin,timelockAssert:t.timelockAssert,registeredPayoutScriptPubKey:t.registeredPayoutScriptPubKey,claimerBtcPubkey:e.claimerPubkeyXOnly,commissionBps:t.commissionBps,protocolFeeRate:t.protocolFeeRate,councilSize:t.councilMembers.length,vkClaimerPayoutScriptPubKeys:t.vkClaimerPayoutScriptPubKeys,vpCommissionScriptPubKey:t.vpCommissionScriptPubKey}}async function Oe(e,t,r,n){const a=new _.PayoutManager({network:t.network,btcWallet:e}),l=r.length;n==null||n(0,l);let o;if(a.supportsBatchSigning())o=(await a.signPayoutTransactionsBatch(r.map(s=>J(s,t)))).map(s=>s.payoutSignature);else{o=[];for(let u=0;u<r.length;u++){n==null||n(u,l);const s=await a.signPayoutTransaction(J(r[u],t));o.push(s.signature)}}const i={};for(let u=0;u<r.length;u++)i[r[u].claimerPubkeyXOnly]={payout_signature:o[u]};return n==null||n(l,l),i}async function De(e){const{statusReader:t,presignClient:r,btcWallet:n,peginTxid:a,depositorPk:l,signingContext:o,depositTerms:i,timeoutMs:u=$e,signal:s,onProgress:h}=e,c=await X({statusReader:t,peginTxid:a,targetStatuses:Ve,timeoutMs:u,signal:s});if(oe.has(c))return;if(s==null||s.throwIfAborted(),i!==void 0&&Ie(i,o),_.supportsDepositApproval(n)){if(!i)throw new Error("runDepositorPresignFlow: this wallet requires approved deposit terms but none were provided. Fresh deposits must pass PreparePeginResult.depositTerms; resume-path rebuild is not wired yet.");await n.approveDepositTerms(i)}const d=await r.requestDepositorPresignTransactions({pegin_txid:a,depositor_pk:l},s);s==null||s.throwIfAborted();const f=k(l);He(d.txs,o.vaultProviderBtcPubkey,o.vaultKeeperBtcPubkeys,l);const P=d.txs.filter(v=>k(v.claimer_pubkey)!==f),T=Ke(P),E=await Oe(n,o,T,h);s==null||s.throwIfAborted();const m=await ne({depositorGraph:d.depositor_graph,btcWallet:n,signingContext:{vaultCoreVersion:o.vaultCoreVersion,peginTxHex:o.peginTxHex,depositorBtcPubkey:l,vaultProviderBtcPubkey:o.vaultProviderBtcPubkey,vaultKeeperBtcPubkeys:o.vaultKeeperBtcPubkeys,universalChallengerBtcPubkeys:o.universalChallengerBtcPubkeys,timelockPegin:o.timelockPegin,timelockAssert:o.timelockAssert,councilMembers:o.councilMembers,councilQuorum:o.councilQuorum,network:o.network,registeredPayoutScriptPubKey:o.registeredPayoutScriptPubKey,protocolFeeRate:o.protocolFeeRate,vkClaimerPayoutScriptPubKeys:o.vkClaimerPayoutScriptPubKeys,vpCommissionScriptPubKey:o.vpCommissionScriptPubKey}});s==null||s.throwIfAborted();const x={...E};x[p.stripHexPrefix(l)]=m.payout_signatures,await r.submitDepositorPresignatures({pegin_txid:a,depositor_pk:l,signatures:x,depositor_claimer_presignatures:m},s)}const Ne=300*1e3,Fe=new Set([y.DaemonStatus.PENDING_DEPOSITOR_WOTS_PK,...y.POST_WOTS_STATUSES]);async function Me(e){const{statusReader:t,wotsSubmitter:r,peginTxid:n,depositorPk:a,wotsPublicKeys:l,timeoutMs:o=Ne,signal:i}=e;i==null||i.throwIfAborted();const u=await X({statusReader:t,peginTxid:n,targetStatuses:Fe,timeoutMs:o,signal:i});y.POST_WOTS_STATUSES.has(u)||(i==null||i.throwIfAborted(),await r.submitDepositorWotsKey({pegin_txid:n,depositor_pk:a,wots_public_keys:l},i))}function R(e){return e.registration||e.operation}function ie(e,t,r){const n=p.canonicalizeBtcPubkey(e);return{registration:n===p.canonicalizeBtcPubkey(t),operation:n===p.canonicalizeBtcPubkey(r)}}function F(e,t,r){const n=I(e);return{registration:ee(n,I(t)),operation:ee(n,I(r))}}function I(e){return e.map(p.canonicalizeBtcPubkey).sort()}function ee(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}async function Ue(e){const{vaultProviderEthAddress:t,hintBtcPubkey:r,registrationBtcPubkey:n,readCurrentOperationBtcPubkey:a,context:l}=e;if(!r)return;const o=p.canonicalizeBtcPubkey(r);if(o===p.canonicalizeBtcPubkey(n))return;const i=p.canonicalizeBtcPubkey(await a());if(o!==i)throw new Error(`Vault provider BTC pubkey mismatch for ${t}: indexer hint matches neither the registration key nor the current operation key on-chain.${l?` ${l}`:""}`)}function H(e,t,r){const n=`${e} operation key (admin=${t.ethAddress})`,a=Y.assertOnChainBtcPubkey(t.btcPubKey,`${e} roster key (admin=${t.ethAddress})`),l=Y.assertOnChainBtcPubkey(r,n);return{adminAddress:t.ethAddress,genesisBtcPubkey:a,operationBtcPubkey:l,rotated:l!==a}}function Le(e){const t=new Map;for(const r of e){const n=t.get(r.operationBtcPubkey);if(n)throw new Error(`Participant operation key collision: ${n} and ${r.adminAddress} both resolve to operation key ${r.operationBtcPubkey}`);t.set(r.operationBtcPubkey,r.adminAddress)}}function ae(e,t,r){if(t.vaultKeepers.length!==e.vaultKeepers.length||t.universalChallengers.length!==e.universalChallengers.length)throw new Error(`Operation-key resolution returned ${t.vaultKeepers.length} keeper and ${t.universalChallengers.length} challenger keys for a roster of ${e.vaultKeepers.length} keepers and ${e.universalChallengers.length} challengers`);const n=H("vault provider",{ethAddress:e.vaultProviderEthAddress,btcPubKey:e.vaultProviderGenesisBtcPubkey},t.vaultProvider),a=e.vaultKeepers.map((o,i)=>H("vault keeper",o,t.vaultKeepers[i])),l=e.universalChallengers.map((o,i)=>H("universal challenger",o,t.universalChallengers[i]));return Le([n,...a,...l]),{vaultProvider:n,vaultKeepers:a,universalChallengers:l,vaultKeeperOperationKeysSorted:a.map(o=>o.operationBtcPubkey).sort(),universalChallengerOperationKeysSorted:l.map(o=>o.operationBtcPubkey).sort(),resolvedAt:r,query:e}}async function se(e){const t=await e.operationKeyReader.getCurrentOperationKeys(e.query);return ae(e.query,t,{mode:"current"})}async function ue(e){const t=await e.operationKeyReader.getOperationKeysAtEpochs(e.query,e.epochs);return ae(e.query,t,{mode:"epochs",epochs:e.epochs})}const te=e=>e.map(p.canonicalizeBtcPubkey).sort();async function ze(e){const{vaultRegistryReader:t,vaultKeeperReader:r,universalChallengerReader:n,vaultProviderEthAddress:a,applicationEntryPoint:l,expectedVaultProviderBtcPubkey:o,expectedVaultKeeperBtcPubkeys:i,expectedUniversalChallengerBtcPubkeys:u,operationKeyReader:s,onIndexerServingOperationKeys:h,onIndexerHintsInconsistent:c}=e,[d,f,P]=await Promise.all([t.getVaultProviderBtcPubKey(a),r.getCurrentVaultKeepersVersion(l),n.getLatestUniversalChallengersVersion()]),[T,E]=await Promise.all([r.getVaultKeepersByVersion(l,f),n.getUniversalChallengersByVersion(P)]),m={vaultProvider:p.canonicalizeBtcPubkey(d),vaultKeepers:te(T.map(b=>b.btcPubKey)),universalChallengers:te(E.map(b=>b.btcPubKey))},x=await se({operationKeyReader:s,query:{vaultProviderEthAddress:a,vaultProviderGenesisBtcPubkey:`0x${d}`,applicationEntryPoint:l,vaultKeepers:T,universalChallengers:E}}),v={vaultProvider:x.vaultProvider.operationBtcPubkey,vaultKeepers:[...x.vaultKeeperOperationKeysSorted],universalChallengers:[...x.universalChallengerOperationKeysSorted]},C=ie(o,m.vaultProvider,v.vaultProvider),B=F(i,m.vaultKeepers,v.vaultKeepers),A=F(u,m.universalChallengers,v.universalChallengers);if(!R(C))throw new Error(`Vault provider BTC pubkey indexer hint does not match BTCVaultRegistry for ${a}. Refresh and try again.`);if(!R(B))throw new Error(`Vault keeper BTC pubkeys (v${f}) indexer set does not match ApplicationRegistry on-chain set. Refresh and try again.`);if(!R(A))throw new Error(`Universal challenger BTC pubkeys (v${P}) indexer set does not match ProtocolParams on-chain set. Refresh and try again.`);const g=[C,B,A],de=g.some(b=>b.registration&&!b.operation),Q=g.some(b=>b.operation&&!b.registration);if(de&&Q){const b=`Indexer participant hints are internally inconsistent for vault provider ${a}: some roles match the registration keys while others match the rotated operation keys.`;throw c==null||c(b),new Error(`${b} Refresh and try again.`)}return Q&&(h==null||h(`Indexer is serving rotated operation keys for vault provider ${a}`)),{vaultProviderBtcPubkeyXOnly:v.vaultProvider,vaultKeeperBtcPubkeysSorted:v.vaultKeepers,universalChallengerBtcPubkeysSorted:v.universalChallengers,expectedAppVaultKeepersVersion:f,expectedUniversalChallengersVersion:P,registrationKeys:m,participantKeys:x}}function Xe(e){return/^[0-9a-fA-F]{64}$/.test(e)}function qe(e){const{amountSats:t,minDeposit:r,maxDeposit:n,btcBalance:a,estimatedFeeSats:l,depositorClaimValue:o}=e;return!(t<=0n||t<r||n&&n>0n&&t>n||l==null||o==null||t+l+o>a)}function Ge(e,t,r){return e<=0n?{valid:!1,error:"Deposit amount must be greater than zero"}:e<t?{valid:!1,error:`Minimum deposit is ${p.formatSatoshisToBtc(t)} BTC`}:r&&r>0n&&e>r?{valid:!1,error:`Maximum deposit is ${p.formatSatoshisToBtc(r)} BTC`}:{valid:!0}}function je(e){const{amount:t,effectiveRemaining:r}=e;return r===null?{valid:!0}:r===0n?{valid:!1,error:"Supply cap reached — deposits temporarily paused"}:t>r?{valid:!1,error:`Vault size exceeds remaining capacity (${p.formatSatoshisToBtc(r)} BTC)`}:{valid:!0}}function We(e,t){if(!e||e.length===0)return{valid:!1,error:"At least one vault provider must be selected"};const r=t.map(a=>a.toLowerCase());return e.filter(a=>!r.includes(a.toLowerCase())).length>0?{valid:!1,error:"Invalid vault provider selected"}:{valid:!0}}function le(e,t,r){if(!e||e.length===0)return{valid:!1,error:"At least one vault amount required"};for(let n=0;n<e.length;n++){const a=e[n];if(a<=0n)return{valid:!1,error:`Vault ${n+1} amount must be positive`};if(t&&a<t)return{valid:!1,error:`Vault ${n+1} amount ${p.formatSatoshisToBtc(a)} BTC is below minimum deposit ${p.formatSatoshisToBtc(t)} BTC`};if(r&&a>r)return{valid:!1,error:`Vault ${n+1} amount ${p.formatSatoshisToBtc(a)} BTC exceeds maximum deposit ${p.formatSatoshisToBtc(r)} BTC`}}return{valid:!0}}function ce(e){const t=p.stripHexPrefix(e);return Xe(t)?{valid:!0}:{valid:!1,error:"Invalid pubkey format: must be 64 hex characters (32-byte x-only public key, no 0x prefix)"}}function Qe(e){if(!e||e.length===0)throw new Error("No vault keepers available. The system requires at least one vault keeper to create a deposit.")}function Ye(e){if(!e||e.length===0)throw new Error("No universal challengers available. The system requires at least one universal challenger to create a deposit.")}function Ze(e){if(e.length===0)throw new Error("No spendable UTXOs available")}function Je(e){const{vaultAmounts:t,confirmedUTXOs:r,vaultProviderBtcPubkey:n,vaultKeeperBtcPubkeys:a,universalChallengerBtcPubkeys:l,minDeposit:o,maxDeposit:i}=e,u=le(t,o,i);if(!u.valid)throw new Error(u.error);const s=ce(n);if(!s.valid)throw new Error(s.error);Qe(a),Ye(l),Ze(r)}class q extends Error{constructor(t){super(t),this.name="ParticipantKeyDriftError"}}function et(e){return e instanceof q||e instanceof Error&&e.name==="ParticipantKeyDriftError"}function re(e,t,r){return t.length===r.length&&t.every((n,a)=>n===r[a])?null:`${e} expected [${t.join(", ")}], got [${r.join(", ")}]`}async function tt(e){const{vaultRegistryReader:t,operationKeyReader:r,vaultIds:n,expected:a}=e,l=a.query;if(n.length===0)return;const o=await t.getVaultKeyEpochsBatch(n),i=[];for(const[u,s]of o.entries()){const h=n[u];let c;try{c=await ue({operationKeyReader:r,query:l,epochs:s})}catch(P){i.push(`vault ${h}: could not resolve participants at frozen epochs (vp=${s.vpKeyEpoch}, keeper=${s.appKeeperKeyEpoch}, uc=${s.ucKeyEpoch}): ${P.message}`);continue}c.vaultProvider.operationBtcPubkey!==a.vaultProvider.operationBtcPubkey&&i.push(`vault ${h}: vault provider key expected ${a.vaultProvider.operationBtcPubkey}, got ${c.vaultProvider.operationBtcPubkey}`);const d=re(`vault ${h}: vault keeper keys`,a.vaultKeeperOperationKeysSorted,c.vaultKeeperOperationKeysSorted);d&&i.push(d);const f=re(`vault ${h}: universal challenger keys`,a.universalChallengerOperationKeysSorted,c.universalChallengerOperationKeysSorted);f&&i.push(f)}if(i.length>0)throw new q(`Aborting BTC broadcast: participant operation keys changed during registration (${i.join("; ")}). The Pre-PegIn was not broadcast; the registered ETH vault will time out per protocol rules.`)}class G extends Error{constructor(t){super(t),this.name="RegisteredVaultVersionMismatchError"}}function rt(e){return e instanceof G||e instanceof Error&&e.name==="RegisteredVaultVersionMismatchError"}async function nt(e){const{vaultRegistryReader:t,vaultIds:r,expectedOffchainParamsVersion:n,expectedAppVaultKeepersVersion:a,expectedUniversalChallengersVersion:l,expectedVaultCoreVersion:o}=e,i=await t.getProtocolInfoBatch(r),u=[];if(i.forEach((s,h)=>{const c=r[h];s.offchainParamsVersion!==n&&u.push(`vault ${c}: offchainParams expected v${n}, got v${s.offchainParamsVersion}`),s.appVaultKeepersVersion!==a&&u.push(`vault ${c}: appVaultKeepers expected v${a}, got v${s.appVaultKeepersVersion}`),s.universalChallengersVersion!==l&&u.push(`vault ${c}: universalChallengers expected v${l}, got v${s.universalChallengersVersion}`),s.vaultCoreVersion!==o&&u.push(`vault ${c}: vaultCoreVersion expected v${o} (build-time active), got v${s.vaultCoreVersion}`)}),u.length>0)throw new G(`Aborting BTC broadcast: signer-set or offchain-params versions changed during registration (${u.join("; ")}). The Pre-PegIn was not broadcast; the registered ETH vault will time out per protocol rules.`)}var j=(e=>(e.CLAIM_EVENT_RECEIVED="ClaimEventReceived",e.CLAIM_BROADCAST="ClaimBroadcast",e.ASSERT_BROADCAST="AssertBroadcast",e.PAYOUT_BROADCAST="PayoutBroadcast",e.PAYOUT_BLOCKED="PayoutBlocked",e))(j||{});const ot=new Set(["PayoutBroadcast","PayoutBlocked"]);function it(e){return Object.values(j).includes(e)}function at(e){return!!e&&ot.has(e)}class pe extends Error{constructor(r,n){super(`Refund not yet mature (BIP68 not final): ${n.message}`);$(this,"vaultId");$(this,"cause");this.name="BIP68NotMatureError",this.vaultId=r,this.cause=n}}const st=/^0x[0-9a-fA-F]{64}$/,ut=/^(?:0x)?(?:[0-9a-fA-F]{2})+$/,he=/^(?:0x)?(?:[0-9a-fA-F]{64}|[0-9a-fA-F]{66})$/,W=160,M=2e3,U=10n,L=100n;function lt(e){if(!Number.isFinite(e)||e<=0)throw new Error(`feeRateSatsVb must be a positive finite number, got ${e}`);return BigInt(Math.ceil(e*W))}const ct=1,pt=/non-BIP68-final/i;function z(e,t){if(e.length!==66)throw new Error(`${t} must be 32 bytes (66 hex chars with 0x prefix), got length ${e.length}`);if(!st.test(e))throw new Error(`${t} must contain only hex characters after the 0x prefix`)}function O(e,t){if(!Number.isInteger(e)||e<0)throw new Error(`${t} must be a non-negative integer, got ${e}`)}function ht(e){if(z(e.hashlock,"hashlock"),!Number.isInteger(e.htlcVout)||e.htlcVout<0)throw new Error(`htlcVout must be a non-negative integer, got ${e.htlcVout}`);if(!Array.isArray(e.batch)||e.batch.length===0)throw new Error("batch must be a non-empty array of HTLC entries");if(e.htlcVout>=e.batch.length)throw new Error(`htlcVout ${e.htlcVout} is out of range for batch of size ${e.batch.length}`);for(let r=0;r<e.batch.length;r++){const n=e.batch[r];if(z(n.hashlock,`batch[${r}].hashlock`),!Number.isInteger(n.htlcVout)||n.htlcVout!==r)throw new Error(`batch[${r}].htlcVout must equal ${r} (contiguous vout-ordered vector), got ${n.htlcVout}`);if(typeof n.amount!="bigint"||n.amount<=0n)throw new Error(`batch[${r}].amount must be a positive bigint, got ${n.amount}`)}const t=e.batch[e.htlcVout];if(t.hashlock.toLowerCase()!==e.hashlock.toLowerCase())throw new Error(`batch[${e.htlcVout}].hashlock (${t.hashlock}) does not match target hashlock (${e.hashlock})`);if(t.amount!==e.amount)throw new Error(`batch[${e.htlcVout}].amount (${t.amount}) does not match target amount (${e.amount})`);if(O(e.offchainParamsVersion,"offchainParamsVersion"),O(e.appVaultKeepersVersion,"appVaultKeepersVersion"),O(e.universalChallengersVersion,"universalChallengersVersion"),ye.assertValidVaultCoreVersion(e.vaultCoreVersion,"VaultRefundData.vaultCoreVersion"),typeof e.unsignedPrePeginTxHex!="string"||e.unsignedPrePeginTxHex.length===0)throw new Error("unsignedPrePeginTxHex must be a non-empty hex string");if(!ut.test(e.unsignedPrePeginTxHex))throw new Error("unsignedPrePeginTxHex must be a hex byte string (optional 0x prefix, even length)");if(!e.depositorBtcPubkey||!he.test(e.depositorBtcPubkey))throw new Error("depositorBtcPubkey must be 32 or 33 bytes of hex (optional 0x prefix)");if(typeof e.amount!="bigint"||e.amount<=0n)throw new Error(`amount must be a positive bigint, got ${e.amount}`)}function dt(e){if(!e.vaultProviderPubkey||!he.test(e.vaultProviderPubkey))throw new Error("vaultProviderPubkey must be 32 or 33 bytes of hex");if(e.vaultKeeperPubkeys.length===0)throw new Error("vaultKeeperPubkeys must be non-empty");if(e.universalChallengerPubkeys.length===0)throw new Error("universalChallengerPubkeys must be non-empty");if(!Number.isInteger(e.timelockRefund)||e.timelockRefund<=0)throw new Error(`timelockRefund must be a positive integer, got ${e.timelockRefund}`);if(typeof e.feeRate!="bigint"||e.feeRate<=0n)throw new Error(`protocol feeRate must be a positive bigint, got ${e.feeRate}`);if(typeof e.minPeginFeeRate!="bigint"||e.minPeginFeeRate<=0n)throw new Error(`minPeginFeeRate must be a positive bigint, got ${e.minPeginFeeRate}`);if(!Number.isInteger(e.numLocalChallengers)||e.numLocalChallengers<0)throw new Error("numLocalChallengers must be a non-negative integer");if(!Number.isInteger(e.councilQuorum)||!Number.isInteger(e.councilSize)||e.councilQuorum<=0||e.councilSize<=0||e.councilQuorum>e.councilSize)throw new Error(`councilQuorum (${e.councilQuorum}) must be in [1, councilSize=${e.councilSize}]`)}function gt(e){const t=S.Psbt.fromHex(e);try{t.finalizeAllInputs()}catch(r){const n=r instanceof Error?r.message:String(r);if(!n.includes("already finalized"))throw new Error(`Failed to finalize refund PSBT: ${n}`)}return t.extractTransaction().toHex()}async function ft(e){const{vaultId:t,readVault:r,readPrePeginContext:n,feeRate:a,signPsbt:l,broadcastTx:o,signal:i}=e;i==null||i.throwIfAborted(),z(t,"vaultId");const u=await r();ht(u),i==null||i.throwIfAborted();const s=await n(u);if(dt(s),i==null||i.throwIfAborted(),!Number.isFinite(a)||a<=0)throw new Error(`feeRate must be a positive number, got ${a}`);if(a>M)throw new Error(`feeRate ${a} sat/vB exceeds refund safety cap ${M} sat/vB; refusing to sign refund.`);const h=BigInt(Math.ceil(a*W)),c=u.amount*U/L;if(h>c)throw new Error(`Refund fee ${h} sats exceeds the per-vault safety cap of ${c} sats (${U}/${L} of vault.amount=${u.amount}); refusing to sign refund.`);i==null||i.throwIfAborted();const d=p.processPublicKeyToXOnly(u.depositorBtcPubkey),f=p.stripHexPrefix(u.unsignedPrePeginTxHex),P=_.findAuthAnchorOpReturn(f);if(P!==void 0&&P.vout!==u.batch.length)throw new Error(`Auth-anchor OP_RETURN at vout ${P.vout} does not match batch size (${u.batch.length} HTLC outputs expect the anchor at vout ${u.batch.length}). Refund refused — sibling HTLC vector is incomplete.`);const T=P==null?void 0:P.hash;let E;try{E=S.Transaction.fromHex(f)}catch(g){throw new Error(`Failed to parse funded Pre-PegIn transaction hex: ${g instanceof Error?g.message:String(g)}`)}if(E.outs.length<u.batch.length)throw new Error(`Funded Pre-PegIn tx has ${E.outs.length} outputs but batch requires at least ${u.batch.length} HTLC outputs. Refund refused — funded tx shape disagrees with sibling vector.`);const{psbtHex:m}=await D.buildRefundPsbt({prePeginParams:{vaultCoreVersion:u.vaultCoreVersion,depositorPubkey:d,vaultProviderPubkey:p.stripHexPrefix(s.vaultProviderPubkey),vaultKeeperPubkeys:s.vaultKeeperPubkeys.map(p.stripHexPrefix),universalChallengerPubkeys:s.universalChallengerPubkeys.map(p.stripHexPrefix),hashlocks:u.batch.map(g=>p.stripHexPrefix(g.hashlock)),timelockRefund:s.timelockRefund,pegInAmounts:u.batch.map(g=>g.amount),feeRate:s.feeRate,minPeginFeeRate:s.minPeginFeeRate,numLocalChallengers:s.numLocalChallengers,councilQuorum:s.councilQuorum,councilSize:s.councilSize,network:s.network,authAnchorHash:T},fundedPrePeginTxHex:f,htlcVout:u.htlcVout,refundFee:h,hashlock:p.stripHexPrefix(u.hashlock)});i==null||i.throwIfAborted();const x=N.createTaprootScriptPathSignOptions(u.depositorBtcPubkey,ct),v=await l(m,x);w.assertPsbtUnsignedTxMatches({requestedPsbtHex:m,returnedPsbtHex:v});const C=0,B=w.extractPayoutSignature(v,d,C);w.assertScriptPathSchnorrSignature({requestedPsbtHex:m,signatureHex:B,signerXOnlyPubkeyHex:d,inputIndex:C});const A=gt(v);i==null||i.throwIfAborted();try{return await o(A)}catch(g){throw g instanceof Error&&pt.test(g.message)?new pe(t,g):g}}exports.BIP68NotMatureError=pe;exports.ClaimerPegoutStatusValue=j;exports.ParticipantKeyDriftError=q;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=L;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=U;exports.REFUND_MAX_FEE_RATE_SATS_VB=M;exports.REFUND_VSIZE=W;exports.RegisteredVaultVersionMismatchError=G;exports.activateVault=ke;exports.assertVaultProviderHintAccepted=Ue;exports.buildAndBroadcastRefund=ft;exports.estimateRefundFeeSats=lt;exports.isDepositAmountValid=qe;exports.isHintAccepted=R;exports.isParticipantKeyDriftError=et;exports.isPegoutTerminalStatus=at;exports.isRecognizedPegoutStatus=it;exports.isRegisteredVaultVersionMismatchError=rt;exports.matchKeyHint=ie;exports.matchKeySetHint=F;exports.resolveCurrentParticipantKeys=se;exports.resolveParticipantKeysAtEpochs=ue;exports.runDepositorPresignFlow=De;exports.signDepositorGraph=ne;exports.submitWotsPublicKey=Me;exports.validateDepositAmount=Ge;exports.validateMultiVaultDepositInputs=Je;exports.validateOnChainParticipantKeys=ze;exports.validateProviderSelection=We;exports.validateRemainingCapacity=je;exports.validateVaultAmounts=le;exports.validateVaultProviderPubkey=ce;exports.verifyRegisteredParticipantKeys=tt;exports.verifyRegisteredVaultVersions=nt;exports.waitForPeginStatus=X;
|
|
2
|
-
//# sourceMappingURL=buildAndBroadcastRefund-BL8u-Ti4.cjs.map
|