@babylonlabs-io/ts-sdk 0.47.1 → 0.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PayoutManager-BwYlPF2C.cjs → PayoutManager-BLpgkfOS.cjs} +2 -2
- package/dist/{PayoutManager-BwYlPF2C.cjs.map → PayoutManager-BLpgkfOS.cjs.map} +1 -1
- package/dist/{PayoutManager-CXDccwDN.js → PayoutManager-BbemBIo9.js} +2 -2
- package/dist/{PayoutManager-CXDccwDN.js.map → PayoutManager-BbemBIo9.js.map} +1 -1
- package/dist/{PeginManager-CxSbzoYs.js → PeginManager-BMO6R9I9.js} +5 -5
- package/dist/{PeginManager-CxSbzoYs.js.map → PeginManager-BMO6R9I9.js.map} +1 -1
- package/dist/{PeginManager-CeloRUHV.cjs → PeginManager-CfkjDMy7.cjs} +2 -2
- package/dist/{PeginManager-CeloRUHV.cjs.map → PeginManager-CfkjDMy7.cjs.map} +1 -1
- package/dist/assertPsbtUnsignedTxMatches-BHyBdtxs.js +481 -0
- package/dist/assertPsbtUnsignedTxMatches-BHyBdtxs.js.map +1 -0
- package/dist/assertPsbtUnsignedTxMatches-s9H0Qqkl.cjs +2 -0
- package/dist/assertPsbtUnsignedTxMatches-s9H0Qqkl.cjs.map +1 -0
- package/dist/buildAndBroadcastRefund-CLvF5ETe.cjs +2 -0
- package/dist/{buildAndBroadcastRefund-CgUJ7Mpf.cjs.map → buildAndBroadcastRefund-CLvF5ETe.cjs.map} +1 -1
- package/dist/{buildAndBroadcastRefund-BssyvGWW.js → buildAndBroadcastRefund-hM9Wo0VZ.js} +371 -347
- package/dist/{buildAndBroadcastRefund-BssyvGWW.js.map → buildAndBroadcastRefund-hM9Wo0VZ.js.map} +1 -1
- package/dist/{challengeAssert-ChqnvtRg.js → challengeAssert-1fy_EzAi.js} +2 -2
- package/dist/{challengeAssert-ChqnvtRg.js.map → challengeAssert-1fy_EzAi.js.map} +1 -1
- package/dist/{challengeAssert-Cmj_OG6V.cjs → challengeAssert-DEw-z3n9.cjs} +2 -2
- package/dist/{challengeAssert-Cmj_OG6V.cjs.map → challengeAssert-DEw-z3n9.cjs.map} +1 -1
- package/dist/{fundPeginTransaction-C11tYf6I.js → fundPeginTransaction-96FxwYYJ.js} +24 -23
- package/dist/fundPeginTransaction-96FxwYYJ.js.map +1 -0
- package/dist/fundPeginTransaction-DuMwnytD.cjs +2 -0
- package/dist/fundPeginTransaction-DuMwnytD.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +109 -108
- package/dist/noPayout-B2Xd40nk.cjs +2 -0
- package/dist/noPayout-B2Xd40nk.cjs.map +1 -0
- package/dist/noPayout-BwSaoU7w.js +174 -0
- package/dist/noPayout-BwSaoU7w.js.map +1 -0
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +111 -110
- package/dist/tbv/core/managers/index.cjs +1 -1
- package/dist/tbv/core/managers/index.js +2 -2
- package/dist/tbv/core/primitives/index.cjs +1 -1
- package/dist/tbv/core/primitives/index.js +3 -3
- package/dist/tbv/core/primitives/psbt/__tests__/assertWasmPeginSizing.test.d.ts +7 -0
- package/dist/tbv/core/primitives/psbt/__tests__/assertWasmPeginSizing.test.d.ts.map +1 -0
- package/dist/tbv/core/primitives/psbt/assertWasmPeginSizing.d.ts +47 -0
- package/dist/tbv/core/primitives/psbt/assertWasmPeginSizing.d.ts.map +1 -0
- package/dist/tbv/core/primitives/psbt/pegin.d.ts.map +1 -1
- package/dist/tbv/core/primitives/psbt/refund.d.ts.map +1 -1
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.js +2 -2
- package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts +20 -0
- package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts.map +1 -1
- package/dist/tbv/core/utils/fee/constants.d.ts +16 -0
- package/dist/tbv/core/utils/fee/constants.d.ts.map +1 -1
- package/dist/tbv/core/utils/index.cjs +1 -1
- package/dist/tbv/core/utils/index.js +33 -32
- package/dist/tbv/core/utils/transaction/fundPeginTransaction.d.ts +1 -1
- package/dist/tbv/core/utils/transaction/fundPeginTransaction.d.ts.map +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +111 -110
- package/dist/tbv/integrations/aave/clients/__tests__/hub.test.d.ts +2 -0
- package/dist/tbv/integrations/aave/clients/__tests__/hub.test.d.ts.map +1 -0
- package/dist/tbv/integrations/aave/clients/abis/AaveHub.abi.json.d.ts +24 -0
- package/dist/tbv/integrations/aave/clients/hub.d.ts +28 -0
- package/dist/tbv/integrations/aave/clients/hub.d.ts.map +1 -0
- package/dist/tbv/integrations/aave/clients/index.d.ts +1 -0
- package/dist/tbv/integrations/aave/clients/index.d.ts.map +1 -1
- package/dist/tbv/integrations/aave/index.cjs +1 -1
- package/dist/tbv/integrations/aave/index.cjs.map +1 -1
- package/dist/tbv/integrations/aave/index.d.ts +1 -1
- package/dist/tbv/integrations/aave/index.d.ts.map +1 -1
- package/dist/tbv/integrations/aave/index.js +246 -193
- package/dist/tbv/integrations/aave/index.js.map +1 -1
- package/dist/{waitForTransactionReceiptSmartAware-Dt5VcMK0.js → waitForTransactionReceiptSmartAware-Ckg_oZAo.js} +2 -2
- package/dist/{waitForTransactionReceiptSmartAware-Dt5VcMK0.js.map → waitForTransactionReceiptSmartAware-Ckg_oZAo.js.map} +1 -1
- package/dist/{waitForTransactionReceiptSmartAware-BFMQFEzj.cjs → waitForTransactionReceiptSmartAware-U706oKTc.cjs} +2 -2
- package/dist/{waitForTransactionReceiptSmartAware-BFMQFEzj.cjs.map → waitForTransactionReceiptSmartAware-U706oKTc.cjs.map} +1 -1
- package/package.json +3 -3
- package/dist/assertPsbtUnsignedTxMatches-CABhEADu.cjs +0 -2
- package/dist/assertPsbtUnsignedTxMatches-CABhEADu.cjs.map +0 -1
- package/dist/assertPsbtUnsignedTxMatches-GHobJP-d.js +0 -404
- package/dist/assertPsbtUnsignedTxMatches-GHobJP-d.js.map +0 -1
- package/dist/buildAndBroadcastRefund-CgUJ7Mpf.cjs +0 -2
- package/dist/fundPeginTransaction-C11tYf6I.js.map +0 -1
- package/dist/fundPeginTransaction-C8qsXxNV.cjs +0 -2
- package/dist/fundPeginTransaction-C8qsXxNV.cjs.map +0 -1
- package/dist/noPayout-BtP-R-b-.js +0 -154
- package/dist/noPayout-BtP-R-b-.js.map +0 -1
- package/dist/noPayout-DliaHuc6.cjs +0 -2
- package/dist/noPayout-DliaHuc6.cjs.map +0 -1
package/dist/tbv/core/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../challengeAssert-Cmj_OG6V.cjs"),l=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../../assertPsbtUnsignedTxMatches-CABhEADu.cjs"),p=require("../../peginInput-DH6X4ITS.cjs"),S=require("../../noPayout-DliaHuc6.cjs"),t=require("../../bitcoin-CHfKAhcI.cjs"),R=require("../../signing-Bnsro0hE.cjs"),d=require("../../validation-u8W7Lp2x.cjs"),n=require("../../PeginManager-CeloRUHV.cjs"),A=require("../../PayoutManager-BwYlPF2C.cjs"),g=require("../../ApplicationRegistry.abi-BAPhJch3.cjs"),m=require("../../BTCVaultRegistry.abi-JdeqLz4x.cjs"),c=require("../../errors-CGcNP0rV.cjs"),o=require("../../waitForTransactionReceiptSmartAware-BFMQFEzj.cjs"),r=require("../../fundPeginTransaction-C8qsXxNV.cjs"),P=require("../../reservation-xTL2a9Q-.cjs"),a=require("../../mempoolApi-C_9JhjCI.cjs"),i=require("../../primeVpAuth-Br6RwE3r.cjs"),s=require("../../types-WA0LrDk1.cjs"),_=require("../../errors-Bu0H-dZD.cjs"),e=require("../../buildAndBroadcastRefund-CgUJ7Mpf.cjs"),T=require("../../peginState-BijNNT15.cjs");exports.buildChallengeAssertPsbt=E.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=E.buildDepositorPayoutPsbt;exports.computeNumLocalChallengers=E.computeNumLocalChallengers;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>l.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>l.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>l.deriveVaultId});Object.defineProperty(exports,"expandAuthAnchor",{enumerable:!0,get:()=>l.expandAuthAnchor});Object.defineProperty(exports,"expandHashlockSecret",{enumerable:!0,get:()=>l.expandHashlockSecret});Object.defineProperty(exports,"expandWotsSeed",{enumerable:!0,get:()=>l.expandWotsSeed});exports.PsbtSubstitutionError=u.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=u.assertPsbtUnsignedTxMatches;exports.buildPayoutPsbt=u.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=u.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=u.buildPrePeginPsbt;exports.createPayoutScript=u.createPayoutScript;exports.extractPayoutSignature=u.extractPayoutSignature;exports.buildPeginInputPsbt=p.buildPeginInputPsbt;exports.extractPeginInputSignature=p.extractPeginInputSignature;exports.finalizePeginInputPsbt=p.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=S.buildNoPayoutPsbt;exports.buildRefundPsbt=S.buildRefundPsbt;exports.deriveBip86ScriptPubKeyHex=t.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=t.deriveNativeSegwitAddress;exports.deriveTaprootAddress=t.deriveTaprootAddress;exports.ensureHexPrefix=t.ensureHexPrefix;exports.formatSatoshisToBtc=t.formatSatoshisToBtc;exports.getNetwork=t.getNetwork;exports.getSortedXOnlyPubkeys=t.getSortedXOnlyPubkeys;exports.hexToUint8Array=t.hexToUint8Array;exports.isAddressFromPublicKey=t.isAddressFromPublicKey;exports.isValidHex=t.isValidHex;exports.processPublicKeyToXOnly=t.processPublicKeyToXOnly;exports.stripHexPrefix=t.stripHexPrefix;exports.toXOnly=t.toXOnly;exports.uint8ArrayToHex=t.uint8ArrayToHex;exports.validateWalletPubkey=t.validateWalletPubkey;exports.createTaprootScriptPathSignOptions=R.createTaprootScriptPathSignOptions;exports.BITCOIN_ADDRESS_RE=d.BITCOIN_ADDRESS_RE;exports.HEX_RE=d.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=d.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=d.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=d.TXID_RE;exports.PeginManager=n.PeginManager;exports.VAULT_APP_NAME=n.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=n.buildFundingOutpointsCommitment;exports.buildVaultContext=n.buildVaultContext;exports.computeWotsBlockPublicKeysHash=n.computeWotsBlockPublicKeysHash;exports.deriveVaultRoot=n.deriveVaultRoot;exports.deriveWotsBlocksFromSeed=n.deriveWotsBlocksFromSeed;exports.estimateSubmitPeginRequestBatchGas=n.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=A.PayoutManager;exports.computeHashlock=A.computeHashlock;exports.validateSecretAgainstHashlock=A.validateSecretAgainstHashlock;exports.ApplicationRegistryABI=g.ApplicationRegistryABI;exports.ProtocolParamsABI=g.ProtocolParamsABI;exports.BTCVaultRegistryABI=m.BTCVaultRegistryABI;exports.CONTRACT_ERRORS=c.CONTRACT_ERRORS;exports.extractErrorData=c.extractErrorData;exports.getContractErrorMessage=c.getContractErrorMessage;exports.handleContractError=c.handleContractError;exports.isKnownContractError=c.isKnownContractError;exports.BitcoinScriptType=o.BitcoinScriptType;exports.applyChangeOutputPolicy=o.applyChangeOutputPolicy;exports.calculateBtcTxHash=o.calculateBtcTxHash;exports.computeChangeOutputFeeSats=o.computeChangeOutputFeeSats;exports.computeMaxDeposit=o.computeMaxDeposit;exports.computePeginBaseFeeSats=o.computePeginBaseFeeSats;exports.getDustThreshold=o.getDustThreshold;exports.getPsbtInputFields=o.getPsbtInputFields;exports.getScriptType=o.getScriptType;exports.selectUtxosForPegin=o.selectUtxosForPegin;exports.shouldAddChangeOutput=o.shouldAddChangeOutput;exports.waitForTransactionReceiptSmartAware=o.waitForTransactionReceiptSmartAware;exports.BTC_DUST_SAT=r.BTC_DUST_SAT;exports.DUST_THRESHOLD=r.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=r.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=r.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=r.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=r.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=r.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=r.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=r.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=r.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=r.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=r.fundPeginTransaction;exports.parseUnfundedWasmTransaction=r.parseUnfundedWasmTransaction;exports.peginOutputCount=r.peginOutputCount;exports.rateBasedTxBufferFee=r.rateBasedTxBufferFee;exports.UtxoNotAvailableError=P.UtxoNotAvailableError;exports.assertUtxosAvailable=P.assertUtxosAvailable;exports.extractInputsFromTransaction=P.extractInputsFromTransaction;exports.findOverlappingPendingVaults=P.findOverlappingPendingVaults;exports.validateUtxosAvailable=P.validateUtxosAvailable;exports.MEMPOOL_API_URLS=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.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=i.OnChainBtcVaultStatus;exports.ServerIdentityError=i.ServerIdentityError;exports.VaultProviderRpcClient=i.VaultProviderRpcClient;exports.ViemProtocolParamsReader=i.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=i.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=i.ViemVaultKeeperReader;exports.VpResponseValidationError=i.VpResponseValidationError;exports.VpTokenRegistry=i.VpTokenRegistry;exports.batchPollByProvider=i.batchPollByProvider;exports.createAuthenticatedVpClient=i.createAuthenticatedVpClient;exports.primeVpTokenRegistry=i.primeVpTokenRegistry;exports.resolveProtocolAddresses=i.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=i.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=i.verifyServerIdentity;exports.vpTokenRegistry=i.vpTokenRegistry;exports.AUTH_EXPIRED_DATA_KIND=s.AUTH_EXPIRED_DATA_KIND;exports.DaemonStatus=s.DaemonStatus;exports.JSON_RPC_ERROR_CODES=s.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=s.JsonRpcClient;exports.JsonRpcError=s.JsonRpcError;exports.POST_WOTS_STATUSES=s.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=s.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=s.RpcErrorCode;exports.VP_BATCH_MAX_SIZE=s.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=s.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;exports.isWotsMismatchError=_.isWotsMismatchError;exports.parseFundingOutpointsFromTx=_.parseFundingOutpointsFromTx;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=e.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=e.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=e.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.RegisteredVaultVersionMismatchError=e.RegisteredVaultVersionMismatchError;exports.activateVault=e.activateVault;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.runDepositorPresignFlow=e.runDepositorPresignFlow;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=e.validateOnChainParticipantKeys;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=T.ContractStatus;exports.PeginAction=T.PeginAction;exports.canPerformAction=T.canPerformAction;exports.getPeginProtocolState=T.getPeginProtocolState;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../challengeAssert-DEw-z3n9.cjs"),l=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../../assertPsbtUnsignedTxMatches-s9H0Qqkl.cjs"),A=require("../../peginInput-DH6X4ITS.cjs"),S=require("../../noPayout-B2Xd40nk.cjs"),r=require("../../bitcoin-CHfKAhcI.cjs"),R=require("../../signing-Bnsro0hE.cjs"),P=require("../../validation-u8W7Lp2x.cjs"),n=require("../../PeginManager-CfkjDMy7.cjs"),p=require("../../PayoutManager-BLpgkfOS.cjs"),_=require("../../ApplicationRegistry.abi-BAPhJch3.cjs"),m=require("../../BTCVaultRegistry.abi-JdeqLz4x.cjs"),d=require("../../errors-CGcNP0rV.cjs"),o=require("../../waitForTransactionReceiptSmartAware-U706oKTc.cjs"),t=require("../../fundPeginTransaction-DuMwnytD.cjs"),c=require("../../reservation-xTL2a9Q-.cjs"),a=require("../../mempoolApi-C_9JhjCI.cjs"),i=require("../../primeVpAuth-Br6RwE3r.cjs"),s=require("../../types-WA0LrDk1.cjs"),g=require("../../errors-Bu0H-dZD.cjs"),e=require("../../buildAndBroadcastRefund-CLvF5ETe.cjs"),T=require("../../peginState-BijNNT15.cjs");exports.buildChallengeAssertPsbt=E.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=E.buildDepositorPayoutPsbt;exports.computeNumLocalChallengers=E.computeNumLocalChallengers;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>l.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>l.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>l.deriveVaultId});Object.defineProperty(exports,"expandAuthAnchor",{enumerable:!0,get:()=>l.expandAuthAnchor});Object.defineProperty(exports,"expandHashlockSecret",{enumerable:!0,get:()=>l.expandHashlockSecret});Object.defineProperty(exports,"expandWotsSeed",{enumerable:!0,get:()=>l.expandWotsSeed});exports.PsbtSubstitutionError=u.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=u.assertPsbtUnsignedTxMatches;exports.buildPayoutPsbt=u.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=u.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=u.buildPrePeginPsbt;exports.createPayoutScript=u.createPayoutScript;exports.extractPayoutSignature=u.extractPayoutSignature;exports.buildPeginInputPsbt=A.buildPeginInputPsbt;exports.extractPeginInputSignature=A.extractPeginInputSignature;exports.finalizePeginInputPsbt=A.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=S.buildNoPayoutPsbt;exports.buildRefundPsbt=S.buildRefundPsbt;exports.deriveBip86ScriptPubKeyHex=r.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=r.deriveNativeSegwitAddress;exports.deriveTaprootAddress=r.deriveTaprootAddress;exports.ensureHexPrefix=r.ensureHexPrefix;exports.formatSatoshisToBtc=r.formatSatoshisToBtc;exports.getNetwork=r.getNetwork;exports.getSortedXOnlyPubkeys=r.getSortedXOnlyPubkeys;exports.hexToUint8Array=r.hexToUint8Array;exports.isAddressFromPublicKey=r.isAddressFromPublicKey;exports.isValidHex=r.isValidHex;exports.processPublicKeyToXOnly=r.processPublicKeyToXOnly;exports.stripHexPrefix=r.stripHexPrefix;exports.toXOnly=r.toXOnly;exports.uint8ArrayToHex=r.uint8ArrayToHex;exports.validateWalletPubkey=r.validateWalletPubkey;exports.createTaprootScriptPathSignOptions=R.createTaprootScriptPathSignOptions;exports.BITCOIN_ADDRESS_RE=P.BITCOIN_ADDRESS_RE;exports.HEX_RE=P.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=P.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=P.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=P.TXID_RE;exports.PeginManager=n.PeginManager;exports.VAULT_APP_NAME=n.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=n.buildFundingOutpointsCommitment;exports.buildVaultContext=n.buildVaultContext;exports.computeWotsBlockPublicKeysHash=n.computeWotsBlockPublicKeysHash;exports.deriveVaultRoot=n.deriveVaultRoot;exports.deriveWotsBlocksFromSeed=n.deriveWotsBlocksFromSeed;exports.estimateSubmitPeginRequestBatchGas=n.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=p.PayoutManager;exports.computeHashlock=p.computeHashlock;exports.validateSecretAgainstHashlock=p.validateSecretAgainstHashlock;exports.ApplicationRegistryABI=_.ApplicationRegistryABI;exports.ProtocolParamsABI=_.ProtocolParamsABI;exports.BTCVaultRegistryABI=m.BTCVaultRegistryABI;exports.CONTRACT_ERRORS=d.CONTRACT_ERRORS;exports.extractErrorData=d.extractErrorData;exports.getContractErrorMessage=d.getContractErrorMessage;exports.handleContractError=d.handleContractError;exports.isKnownContractError=d.isKnownContractError;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=t.BTC_DUST_SAT;exports.DUST_THRESHOLD=t.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=t.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=t.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=t.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=t.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=t.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=t.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=t.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=t.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=t.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=t.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=t.fundPeginTransaction;exports.parseUnfundedWasmTransaction=t.parseUnfundedWasmTransaction;exports.peginOutputCount=t.peginOutputCount;exports.rateBasedTxBufferFee=t.rateBasedTxBufferFee;exports.UtxoNotAvailableError=c.UtxoNotAvailableError;exports.assertUtxosAvailable=c.assertUtxosAvailable;exports.extractInputsFromTransaction=c.extractInputsFromTransaction;exports.findOverlappingPendingVaults=c.findOverlappingPendingVaults;exports.validateUtxosAvailable=c.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.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=i.OnChainBtcVaultStatus;exports.ServerIdentityError=i.ServerIdentityError;exports.VaultProviderRpcClient=i.VaultProviderRpcClient;exports.ViemProtocolParamsReader=i.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=i.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=i.ViemVaultKeeperReader;exports.VpResponseValidationError=i.VpResponseValidationError;exports.VpTokenRegistry=i.VpTokenRegistry;exports.batchPollByProvider=i.batchPollByProvider;exports.createAuthenticatedVpClient=i.createAuthenticatedVpClient;exports.primeVpTokenRegistry=i.primeVpTokenRegistry;exports.resolveProtocolAddresses=i.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=i.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=i.verifyServerIdentity;exports.vpTokenRegistry=i.vpTokenRegistry;exports.AUTH_EXPIRED_DATA_KIND=s.AUTH_EXPIRED_DATA_KIND;exports.DaemonStatus=s.DaemonStatus;exports.JSON_RPC_ERROR_CODES=s.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=s.JsonRpcClient;exports.JsonRpcError=s.JsonRpcError;exports.POST_WOTS_STATUSES=s.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=s.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=s.RpcErrorCode;exports.VP_BATCH_MAX_SIZE=s.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=s.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;exports.isWotsMismatchError=g.isWotsMismatchError;exports.parseFundingOutpointsFromTx=g.parseFundingOutpointsFromTx;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=e.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=e.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=e.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.RegisteredVaultVersionMismatchError=e.RegisteredVaultVersionMismatchError;exports.activateVault=e.activateVault;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.runDepositorPresignFlow=e.runDepositorPresignFlow;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=e.validateOnChainParticipantKeys;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=T.ContractStatus;exports.PeginAction=T.PeginAction;exports.canPerformAction=T.canPerformAction;exports.getPeginProtocolState=T.getPeginProtocolState;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/tbv/core/index.js
CHANGED
|
@@ -1,88 +1,89 @@
|
|
|
1
|
-
import { a as s, b as t, c as r } from "../../challengeAssert-
|
|
1
|
+
import { a as s, b as t, c as r } from "../../challengeAssert-1fy_EzAi.js";
|
|
2
2
|
import { computeMinClaimValue as i, computeMinPeginFee as n, deriveVaultId as u, expandAuthAnchor as l, expandHashlockSecret as p, expandWotsSeed as d } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
-
import { P as c, d as T, c as E, a as A, b as S, f as _, e as
|
|
3
|
+
import { P as c, d as T, c as E, a as A, b as S, f as _, e as R } from "../../assertPsbtUnsignedTxMatches-BHyBdtxs.js";
|
|
4
4
|
import { b as m, e as x, f } from "../../peginInput-BPRB9tUi.js";
|
|
5
|
-
import { a as I, b as O } from "../../noPayout-
|
|
6
|
-
import { d as v, a as C, b as F, e as h, f as U, j as
|
|
5
|
+
import { a as I, b as O } from "../../noPayout-BwSaoU7w.js";
|
|
6
|
+
import { d as v, a as C, b as F, e as h, f as U, j as N, g as y, h as B, i as D, c as M, p as H, s as L, t as X, u as k, v as W } from "../../bitcoin-B5aNKtsk.js";
|
|
7
7
|
import { c as w } from "../../signing-DaLvGwQe.js";
|
|
8
8
|
import { B as Y, H as Z, K as J, M as j, T as q } from "../../validation-CxqROCno.js";
|
|
9
|
-
import { P as Q, V as $, b as aa, a as ea, c as sa, f as ta, d as ra, e as oa } from "../../PeginManager-
|
|
10
|
-
import { P as na, c as ua, v as la } from "../../PayoutManager-
|
|
9
|
+
import { P as Q, V as $, b as aa, a as ea, c as sa, f as ta, d as ra, e as oa } from "../../PeginManager-BMO6R9I9.js";
|
|
10
|
+
import { P as na, c as ua, v as la } from "../../PayoutManager-BbemBIo9.js";
|
|
11
11
|
import { A as da, P as Pa } from "../../ApplicationRegistry.abi-Dn2qk6JG.js";
|
|
12
12
|
import { B as Ta } from "../../BTCVaultRegistry.abi-Chs4AFBj.js";
|
|
13
|
-
import { C as Aa, e as Sa, g as _a, h as
|
|
14
|
-
import { B as xa, a as fa, f as ba, c as Ia, b as Oa, d as Va, g as va, i as Ca, h as Fa, s as ha, e as Ua, w as
|
|
15
|
-
import { B as
|
|
16
|
-
import { U as
|
|
17
|
-
import { M as
|
|
18
|
-
import { O as
|
|
19
|
-
import { A as
|
|
20
|
-
import { i as
|
|
21
|
-
import { B as
|
|
22
|
-
import { C as
|
|
13
|
+
import { C as Aa, e as Sa, g as _a, h as Ra, i as ga } from "../../errors-Blc-JWnI.js";
|
|
14
|
+
import { B as xa, a as fa, f as ba, c as Ia, b as Oa, d as Va, g as va, i as Ca, h as Fa, s as ha, e as Ua, w as Na } from "../../waitForTransactionReceiptSmartAware-Ckg_oZAo.js";
|
|
15
|
+
import { B as Ba, D as Da, F as Ma, L as Ha, M as La, c as Xa, P as ka, b as Wa, a as Ka, S as wa, T as Ga, W as Ya, f as Za, d as Ja, p as ja, r as qa } from "../../fundPeginTransaction-96FxwYYJ.js";
|
|
16
|
+
import { U as Qa, a as $a, e as ae, f as ee, v as se } from "../../reservation-BxvKbQH2.js";
|
|
17
|
+
import { M as re, V as oe, g as ie, a as ne, b as ue, c as le, d as pe, e as de, f as Pe, h as ce, p as Te, v as Ee, i as Ae, j as Se } from "../../mempoolApi-BxT89SAq.js";
|
|
18
|
+
import { O as Re, S as ge, V as me, g as xe, h as fe, i as be, a as Ie, d as Oe, b as Ve, f as ve, p as Ce, r as Fe, v as he, c as Ue, e as Ne } from "../../primeVpAuth-rbejoBPu.js";
|
|
19
|
+
import { A as Be, D as De, b as Me, J as He, a as Le, d as Xe, P as ke, R as We, e as Ke, c as we, V as Ge } from "../../types-CQDRQvV-.js";
|
|
20
|
+
import { i as Ze, p as Je } from "../../errors-9AkghWyk.js";
|
|
21
|
+
import { B as qe, C as ze, p as Qe, q as $e, t as as, u as es, R as ss, a as ts, n as rs, o as os, i as is, m as ns, l as us, j as ls, r as ps, b as ds, s as Ps, v as cs, g as Ts, h as Es, d as As, c as Ss, e as _s, f as Rs, k as gs, w as ms } from "../../buildAndBroadcastRefund-hM9Wo0VZ.js";
|
|
22
|
+
import { C as fs, P as bs, c as Is, g as Os } from "../../peginState-CBAlxgXk.js";
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
Be as AUTH_EXPIRED_DATA_KIND,
|
|
25
25
|
da as ApplicationRegistryABI,
|
|
26
|
-
|
|
26
|
+
qe as BIP68NotMatureError,
|
|
27
27
|
Y as BITCOIN_ADDRESS_RE,
|
|
28
28
|
Ta as BTCVaultRegistryABI,
|
|
29
|
-
|
|
29
|
+
Ba as BTC_DUST_SAT,
|
|
30
30
|
xa as BitcoinScriptType,
|
|
31
31
|
Aa as CONTRACT_ERRORS,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
ze as ClaimerPegoutStatusValue,
|
|
33
|
+
fs as ContractStatus,
|
|
34
|
+
Da as DUST_THRESHOLD,
|
|
35
35
|
De as DaemonStatus,
|
|
36
36
|
Ma as FEE_SAFETY_MARGIN,
|
|
37
37
|
Z as HEX_RE,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
Me as JSON_RPC_ERROR_CODES,
|
|
39
|
+
He as JsonRpcClient,
|
|
40
|
+
Le as JsonRpcError,
|
|
41
41
|
J as KNOWN_SCRIPT_PREFIXES,
|
|
42
42
|
Ha as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
43
43
|
La as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
44
44
|
j as MAX_REASONABLE_FEE_SATS,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
ka as
|
|
49
|
-
Wa as
|
|
50
|
-
|
|
51
|
-
Xe as
|
|
45
|
+
Xa as MAX_REASONABLE_PEGIN_VBYTES,
|
|
46
|
+
re as MEMPOOL_API_URLS,
|
|
47
|
+
Re as OnChainBtcVaultStatus,
|
|
48
|
+
ka as P2TR_INPUT_SIZE,
|
|
49
|
+
Wa as PEGIN_AUTH_ANCHOR_OUTPUTS,
|
|
50
|
+
Ka as PEGIN_FIXED_OUTPUTS,
|
|
51
|
+
Xe as POST_WOTS_STATUSES,
|
|
52
|
+
ke as PRE_DEPOSITOR_SIGNATURES_STATES,
|
|
52
53
|
na as PayoutManager,
|
|
53
|
-
|
|
54
|
+
bs as PeginAction,
|
|
54
55
|
Q as PeginManager,
|
|
55
56
|
Pa as ProtocolParamsABI,
|
|
56
57
|
c as PsbtSubstitutionError,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
Qe as REFUND_MAX_FEE_FRACTION_DENOMINATOR,
|
|
59
|
+
$e as REFUND_MAX_FEE_FRACTION_NUMERATOR,
|
|
60
|
+
as as REFUND_MAX_FEE_RATE_SATS_VB,
|
|
61
|
+
es as REFUND_VSIZE,
|
|
62
|
+
ss as RegisteredVaultVersionMismatchError,
|
|
63
|
+
We as RpcErrorCode,
|
|
64
|
+
wa as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
64
65
|
ge as ServerIdentityError,
|
|
65
66
|
q as TXID_RE,
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
Ga as TX_BUFFER_SIZE_OVERHEAD,
|
|
68
|
+
Qa as UtxoNotAvailableError,
|
|
68
69
|
$ as VAULT_APP_NAME,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
70
|
+
Ke as VP_BATCH_MAX_SIZE,
|
|
71
|
+
we as VP_TERMINAL_FAILURE_STATUSES,
|
|
72
|
+
Ge as VP_TRANSIENT_STATUSES,
|
|
73
|
+
me as VaultProviderRpcClient,
|
|
74
|
+
xe as ViemProtocolParamsReader,
|
|
75
|
+
fe as ViemUniversalChallengerReader,
|
|
76
|
+
be as ViemVaultKeeperReader,
|
|
77
|
+
oe as ViemVaultRegistryReader,
|
|
78
|
+
Ie as VpResponseValidationError,
|
|
79
|
+
Oe as VpTokenRegistry,
|
|
80
|
+
Ya as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
81
|
+
ts as activateVault,
|
|
81
82
|
fa as applyChangeOutputPolicy,
|
|
82
83
|
T as assertPsbtUnsignedTxMatches,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
$a as assertUtxosAvailable,
|
|
85
|
+
Ve as batchPollByProvider,
|
|
86
|
+
rs as buildAndBroadcastRefund,
|
|
86
87
|
s as buildChallengeAssertPsbt,
|
|
87
88
|
t as buildDepositorPayoutPsbt,
|
|
88
89
|
aa as buildFundingOutpointsCommitment,
|
|
@@ -94,7 +95,7 @@ export {
|
|
|
94
95
|
O as buildRefundPsbt,
|
|
95
96
|
ea as buildVaultContext,
|
|
96
97
|
ba as calculateBtcTxHash,
|
|
97
|
-
|
|
98
|
+
Is as canPerformAction,
|
|
98
99
|
Ia as computeChangeOutputFeeSats,
|
|
99
100
|
ua as computeHashlock,
|
|
100
101
|
Oa as computeMaxDeposit,
|
|
@@ -103,7 +104,7 @@ export {
|
|
|
103
104
|
r as computeNumLocalChallengers,
|
|
104
105
|
Va as computePeginBaseFeeSats,
|
|
105
106
|
sa as computeWotsBlockPublicKeysHash,
|
|
106
|
-
|
|
107
|
+
ve as createAuthenticatedVpClient,
|
|
107
108
|
_ as createPayoutScript,
|
|
108
109
|
w as createTaprootScriptPathSignOptions,
|
|
109
110
|
v as deriveBip86ScriptPubKeyHex,
|
|
@@ -113,78 +114,78 @@ export {
|
|
|
113
114
|
ta as deriveVaultRoot,
|
|
114
115
|
ra as deriveWotsBlocksFromSeed,
|
|
115
116
|
h as ensureHexPrefix,
|
|
116
|
-
|
|
117
|
+
os as estimateRefundFeeSats,
|
|
117
118
|
oa as estimateSubmitPeginRequestBatchGas,
|
|
118
119
|
l as expandAuthAnchor,
|
|
119
120
|
p as expandHashlockSecret,
|
|
120
121
|
d as expandWotsSeed,
|
|
121
122
|
Sa as extractErrorData,
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
ae as extractInputsFromTransaction,
|
|
124
|
+
R as extractPayoutSignature,
|
|
124
125
|
x as extractPeginInputSignature,
|
|
125
126
|
f as finalizePeginInputPsbt,
|
|
126
|
-
|
|
127
|
+
ee as findOverlappingPendingVaults,
|
|
127
128
|
U as formatSatoshisToBtc,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
Za as fundPeginTransaction,
|
|
130
|
+
ie as getAddressTxs,
|
|
131
|
+
ne as getAddressUtxos,
|
|
131
132
|
_a as getContractErrorMessage,
|
|
132
133
|
va as getDustThreshold,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
ue as getMempoolApiUrl,
|
|
135
|
+
N as getNetwork,
|
|
136
|
+
le as getNetworkFees,
|
|
137
|
+
Os as getPeginProtocolState,
|
|
137
138
|
Ca as getPsbtInputFields,
|
|
138
139
|
Fa as getScriptType,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
140
|
+
y as getSortedXOnlyPubkeys,
|
|
141
|
+
pe as getTipHeight,
|
|
142
|
+
de as getTxHex,
|
|
143
|
+
Pe as getTxInfo,
|
|
144
|
+
ce as getUtxoInfo,
|
|
145
|
+
Ra as handleContractError,
|
|
146
|
+
B as hexToUint8Array,
|
|
147
|
+
D as isAddressFromPublicKey,
|
|
148
|
+
is as isDepositAmountValid,
|
|
149
|
+
ga as isKnownContractError,
|
|
150
|
+
ns as isPegoutTerminalStatus,
|
|
151
|
+
us as isRecognizedPegoutStatus,
|
|
152
|
+
ls as isRegisteredVaultVersionMismatchError,
|
|
152
153
|
M as isValidHex,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
Ze as isWotsMismatchError,
|
|
155
|
+
Je as parseFundingOutpointsFromTx,
|
|
156
|
+
Ja as parseUnfundedWasmTransaction,
|
|
157
|
+
ja as peginOutputCount,
|
|
158
|
+
Ce as primeVpTokenRegistry,
|
|
158
159
|
H as processPublicKeyToXOnly,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
Te as pushTx,
|
|
161
|
+
qa as rateBasedTxBufferFee,
|
|
162
|
+
Fe as resolveProtocolAddresses,
|
|
163
|
+
ps as runDepositorPresignFlow,
|
|
163
164
|
ha as selectUtxosForPegin,
|
|
164
165
|
Ua as shouldAddChangeOutput,
|
|
165
|
-
|
|
166
|
+
ds as signDepositorGraph,
|
|
166
167
|
L as stripHexPrefix,
|
|
167
|
-
|
|
168
|
+
Ps as submitWotsPublicKey,
|
|
168
169
|
X as toXOnly,
|
|
169
170
|
k as uint8ArrayToHex,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
171
|
+
cs as validateDepositAmount,
|
|
172
|
+
Ts as validateMultiVaultDepositInputs,
|
|
173
|
+
Ee as validateOffchainParams,
|
|
174
|
+
Es as validateOnChainParticipantKeys,
|
|
175
|
+
Ae as validatePegInConfiguration,
|
|
176
|
+
As as validateProviderSelection,
|
|
177
|
+
Ss as validateRemainingCapacity,
|
|
178
|
+
he as validateRequestDepositorClaimerArtifactsResponse,
|
|
178
179
|
la as validateSecretAgainstHashlock,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
Se as validateTBVProtocolParams,
|
|
181
|
+
se as validateUtxosAvailable,
|
|
182
|
+
_s as validateVaultAmounts,
|
|
183
|
+
Rs as validateVaultProviderPubkey,
|
|
183
184
|
W as validateWalletPubkey,
|
|
184
185
|
gs as verifyRegisteredVaultVersions,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
Ue as verifyServerIdentity,
|
|
187
|
+
Ne as vpTokenRegistry,
|
|
188
|
+
ms as waitForPeginStatus,
|
|
189
|
+
Na as waitForTransactionReceiptSmartAware
|
|
189
190
|
};
|
|
190
191
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../PeginManager-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../PeginManager-CfkjDMy7.cjs"),a=require("../../../PayoutManager-BLpgkfOS.cjs");exports.PeginManager=e.PeginManager;exports.estimateSubmitPeginRequestBatchGas=e.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=a.PayoutManager;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as t, e as r } from "../../../PeginManager-
|
|
2
|
-
import { P as o } from "../../../PayoutManager-
|
|
1
|
+
import { P as t, e as r } from "../../../PeginManager-BMO6R9I9.js";
|
|
2
|
+
import { P as o } from "../../../PayoutManager-BbemBIo9.js";
|
|
3
3
|
export {
|
|
4
4
|
o as PayoutManager,
|
|
5
5
|
t as PeginManager,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../../challengeAssert-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../../challengeAssert-DEw-z3n9.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../../../assertPsbtUnsignedTxMatches-s9H0Qqkl.cjs"),u=require("../../../peginInput-DH6X4ITS.cjs"),s=require("../../../noPayout-B2Xd40nk.cjs"),e=require("../../../bitcoin-CHfKAhcI.cjs");exports.buildChallengeAssertPsbt=i.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=i.buildDepositorPayoutPsbt;exports.computeNumLocalChallengers=i.computeNumLocalChallengers;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>r.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>r.deriveVaultId});exports.PsbtSubstitutionError=t.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=t.assertPsbtUnsignedTxMatches;exports.buildPayoutPsbt=t.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=t.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=t.buildPrePeginPsbt;exports.createPayoutScript=t.createPayoutScript;exports.extractPayoutSignature=t.extractPayoutSignature;exports.buildPeginInputPsbt=u.buildPeginInputPsbt;exports.extractPeginInputSignature=u.extractPeginInputSignature;exports.finalizePeginInputPsbt=u.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=s.buildNoPayoutPsbt;exports.buildRefundPsbt=s.buildRefundPsbt;exports.deriveBip86ScriptPubKeyHex=e.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.formatSatoshisToBtc=e.formatSatoshisToBtc;exports.getSortedXOnlyPubkeys=e.getSortedXOnlyPubkeys;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a, b as t, c as r } from "../../../challengeAssert-
|
|
1
|
+
import { a, b as t, c as r } from "../../../challengeAssert-1fy_EzAi.js";
|
|
2
2
|
import { computeMinClaimValue as o, computeMinPeginFee as u, deriveVaultId as P } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
-
import { P as d, d as n, c as l, a as p, b as x, f as c, e as g } from "../../../assertPsbtUnsignedTxMatches-
|
|
3
|
+
import { P as d, d as n, c as l, a as p, b as x, f as c, e as g } from "../../../assertPsbtUnsignedTxMatches-BHyBdtxs.js";
|
|
4
4
|
import { b as f, e as m, f as S } from "../../../peginInput-BPRB9tUi.js";
|
|
5
|
-
import { a as T, b as h } from "../../../noPayout-
|
|
5
|
+
import { a as T, b as h } from "../../../noPayout-BwSaoU7w.js";
|
|
6
6
|
import { d as H, a as F, b as I, e as C, f as K, g as M, h as N, i as O, c as V, p as X, s as k, t as B, u as U, v as w } from "../../../bitcoin-B5aNKtsk.js";
|
|
7
7
|
export {
|
|
8
8
|
d as PsbtSubstitutionError,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for assertWasmPeginSizing — the cross-check that guards every
|
|
3
|
+
* value-bearing field WASM returns from createPrePeginTransaction before it
|
|
4
|
+
* feeds a signed tx or the on-chain PegIn registration (CLAUDE.md #1).
|
|
5
|
+
*/
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=assertWasmPeginSizing.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertWasmPeginSizing.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/primitives/psbt/__tests__/assertWasmPeginSizing.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { PrePeginResult } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
2
|
+
import { ParsedOutput } from '../../utils/transaction/fundPeginTransaction';
|
|
3
|
+
import { PrePeginParams } from './pegin';
|
|
4
|
+
/**
|
|
5
|
+
* Assert the WASM Pre-PegIn sizing result is internally consistent and
|
|
6
|
+
* matches what the caller requested.
|
|
7
|
+
*
|
|
8
|
+
* The strong checks are pure-JS and fully independent of the WASM binary:
|
|
9
|
+
* the per-HTLC `peginAmount` must equal the requested amount, array lengths
|
|
10
|
+
* must match, and every value must be positive. The implied PegIn fee
|
|
11
|
+
* (`htlcValue - peginAmount - depositorClaimValue`) is bounded by
|
|
12
|
+
* plausibility rather than recomputed exactly, because JS↔Rust vbyte parity
|
|
13
|
+
* is not a cross-stack guarantee (see {@link MAX_REASONABLE_PEGIN_VBYTES}).
|
|
14
|
+
* The `depositorClaimValue` cross-check against `computeMinClaimValue` is a
|
|
15
|
+
* WASM-vs-WASM consistency check (a different entry point), not an
|
|
16
|
+
* independent one.
|
|
17
|
+
*
|
|
18
|
+
* @param result - The result returned by `createPrePeginTransaction`.
|
|
19
|
+
* @param params - The parameters that were passed to build it.
|
|
20
|
+
* @throws If any value is missing, non-positive, mismatched against the
|
|
21
|
+
* request, or outside the protocol formula / plausibility bounds.
|
|
22
|
+
*/
|
|
23
|
+
export declare function assertWasmPeginSizing(result: PrePeginResult, params: PrePeginParams): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Bind the validated metadata to the bytes that actually get funded and
|
|
26
|
+
* signed.
|
|
27
|
+
*
|
|
28
|
+
* `assertWasmPeginSizing` proves the WASM *metadata* (`htlcValues`,
|
|
29
|
+
* `htlcScriptPubKeys`) matches the request and the protocol formula — but the
|
|
30
|
+
* transaction the depositor funds and signs is `result.txHex`. If the encoded
|
|
31
|
+
* tx carried a different HTLC output value or script than the metadata, the
|
|
32
|
+
* depositor would fund a transaction whose real outputs differ from the values
|
|
33
|
+
* that were cross-checked. This closes that final link: the encoded HTLC
|
|
34
|
+
* outputs must equal the validated metadata.
|
|
35
|
+
*
|
|
36
|
+
* The WASM lays out HTLC outputs first (vouts `0..N-1`), then the optional
|
|
37
|
+
* auth-anchor OP_RETURN, then the CPFP anchor — so we only compare the first
|
|
38
|
+
* `htlcValues.length` outputs.
|
|
39
|
+
*
|
|
40
|
+
* @param outputs - Outputs parsed from the unfunded Pre-PegIn tx hex.
|
|
41
|
+
* @param htlcValues - The (already value-validated) per-HTLC values.
|
|
42
|
+
* @param htlcScriptPubKeys - The per-HTLC scriptPubKeys (hex).
|
|
43
|
+
* @throws If the encoded outputs are too few, or any HTLC output's value or
|
|
44
|
+
* scriptPubKey disagrees with the validated metadata.
|
|
45
|
+
*/
|
|
46
|
+
export declare function assertEncodedHtlcOutputsMatch(outputs: readonly ParsedOutput[], htlcValues: readonly bigint[], htlcScriptPubKeys: readonly string[]): void;
|
|
47
|
+
//# sourceMappingURL=assertWasmPeginSizing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertWasmPeginSizing.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/assertWasmPeginSizing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,uCAAuC,CAAC;AAG/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAEjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,IAAI,CAAC,CA2Gf;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,iBAAiB,EAAE,SAAS,MAAM,EAAE,GACnC,IAAI,CA2BN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pegin.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/pegin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"pegin.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/pegin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,uCAAuC,CAAC;AAS/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,eAAe,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,E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xC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,kBAAkB,CAAC,CA6D7B;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,MAAM,GAAG,SAAS,CAapB;AAED;;;;;;;;;GASG;AACH,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,aAAa,CAAC,CAqCxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refund.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/refund.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"refund.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/refund.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAkBH,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,cAAc,EAAE,cAAc,CAAC;IAC/B,oFAAoF;IACpF,mBAAmB,EAAE,MAAM,CAAC;IAC5B,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,qBAAqB,CAAC,CAsOhC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../../PayoutManager-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../../PayoutManager-BLpgkfOS.cjs"),t=require("../../../buildAndBroadcastRefund-CLvF5ETe.cjs"),e=require("../../../peginState-BijNNT15.cjs");exports.computeHashlock=a.computeHashlock;exports.validateSecretAgainstHashlock=a.validateSecretAgainstHashlock;exports.BIP68NotMatureError=t.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=t.ClaimerPegoutStatusValue;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=t.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=t.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=t.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=t.REFUND_VSIZE;exports.RegisteredVaultVersionMismatchError=t.RegisteredVaultVersionMismatchError;exports.activateVault=t.activateVault;exports.buildAndBroadcastRefund=t.buildAndBroadcastRefund;exports.estimateRefundFeeSats=t.estimateRefundFeeSats;exports.isDepositAmountValid=t.isDepositAmountValid;exports.isPegoutTerminalStatus=t.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=t.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=t.isRegisteredVaultVersionMismatchError;exports.runDepositorPresignFlow=t.runDepositorPresignFlow;exports.signDepositorGraph=t.signDepositorGraph;exports.submitWotsPublicKey=t.submitWotsPublicKey;exports.validateDepositAmount=t.validateDepositAmount;exports.validateMultiVaultDepositInputs=t.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=t.validateOnChainParticipantKeys;exports.validateProviderSelection=t.validateProviderSelection;exports.validateRemainingCapacity=t.validateRemainingCapacity;exports.validateVaultAmounts=t.validateVaultAmounts;exports.validateVaultProviderPubkey=t.validateVaultProviderPubkey;exports.verifyRegisteredVaultVersions=t.verifyRegisteredVaultVersions;exports.waitForPeginStatus=t.waitForPeginStatus;exports.ContractStatus=e.ContractStatus;exports.PeginAction=e.PeginAction;exports.canPerformAction=e.canPerformAction;exports.getPeginProtocolState=e.getPeginProtocolState;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, v as e } from "../../../PayoutManager-
|
|
2
|
-
import { B as o, C as r, p as u, q as n, t as l, u as c, R as d, a as R, n as g, o as E, i as m, m as A, l as P, j as p, r as v, b as V, s as _, v as F, g as S, h as D, d as N, c as M, e as f, f as C, k as h, w as T } from "../../../buildAndBroadcastRefund-
|
|
1
|
+
import { c as s, v as e } from "../../../PayoutManager-BbemBIo9.js";
|
|
2
|
+
import { B as o, C as r, p as u, q as n, t as l, u as c, R as d, a as R, n as g, o as E, i as m, m as A, l as P, j as p, r as v, b as V, s as _, v as F, g as S, h as D, d as N, c as M, e as f, f as C, k as h, w as T } from "../../../buildAndBroadcastRefund-hM9Wo0VZ.js";
|
|
3
3
|
import { C as O, P as b, c as y, g as U } from "../../../peginState-CBAlxgXk.js";
|
|
4
4
|
export {
|
|
5
5
|
o as BIP68NotMatureError,
|
|
@@ -121,6 +121,26 @@ export interface RefundInput<R extends BtcBroadcastResult = BtcBroadcastResult>
|
|
|
121
121
|
/** Checked at every async boundary. */
|
|
122
122
|
signal?: AbortSignal;
|
|
123
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Re-derive each HTLC's original peg-in amount from its on-chain HTLC output
|
|
126
|
+
* value, inverting the protocol formula
|
|
127
|
+
* `htlcValue = peginAmount + depositorClaimValue + minPeginFee`.
|
|
128
|
+
*
|
|
129
|
+
* The original peg-in amount is not persisted anywhere — only the HTLC output
|
|
130
|
+
* value (`batch[i].amount`) survives on-chain. WASM refund template
|
|
131
|
+
* reconstruction needs the *peg-in amount*, not the HTLC value: feeding the
|
|
132
|
+
* HTLC value would size the template's HTLC output above what the funded tx
|
|
133
|
+
* carries, and `buildRefundPsbt`'s value cross-check would refuse the refund.
|
|
134
|
+
*
|
|
135
|
+
* `depositorClaimValue` and `minPeginFee` are constant across the batch
|
|
136
|
+
* (fixed by the version-pinned protocol params in {@link ctx}), so they are
|
|
137
|
+
* computed once via the same WASM entry points the peg-in path uses, then
|
|
138
|
+
* subtracted from every entry's value. The subtraction is the inverse of the
|
|
139
|
+
* sizing WASM performs internally; `buildRefundPsbt` then re-binds the result
|
|
140
|
+
* to the funded tx bytes, so a wrong derivation fails closed rather than
|
|
141
|
+
* signing a mis-sized refund.
|
|
142
|
+
*/
|
|
143
|
+
export declare function deriveRefundPeginAmounts(batch: ReadonlyArray<VaultBatchEntry>, ctx: RefundPrePeginContext): Promise<bigint[]>;
|
|
124
144
|
/**
|
|
125
145
|
* Build, sign, and broadcast a refund transaction for an expired vault.
|
|
126
146
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildAndBroadcastRefund.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/refund/buildAndBroadcastRefund.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"buildAndBroadcastRefund.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/refund/buildAndBroadcastRefund.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,uCAAuC,CAAC;AAE/C,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qDAAqD,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 -62,4 +62,20 @@ export declare function peginOutputCount(vaultCount: number, hasAuthAnchor: bool
|
|
|
62
62
|
* catching catastrophic wallet-side overpayment.
|
|
63
63
|
*/
|
|
64
64
|
export declare const SPLIT_TX_FEE_SAFETY_MULTIPLIER = 5;
|
|
65
|
+
/**
|
|
66
|
+
* Upper bound (vbytes) used to plausibility-check the implied per-HTLC
|
|
67
|
+
* PegIn fee returned by WASM: `htlcValue - peginAmount - depositorClaimValue`.
|
|
68
|
+
*
|
|
69
|
+
* The WASM sizes the PegIn fee internally as `minPeginFeeRate × peginTxVsize`.
|
|
70
|
+
* We do not reproduce the exact Rust vsize model here — JS↔Rust vbyte parity
|
|
71
|
+
* is explicitly NOT a cross-stack guarantee (see `peginFeeMath.ts`), so an
|
|
72
|
+
* exact recompute would false-positive on valid deposits. Instead we bound
|
|
73
|
+
* the implied fee by the largest vsize any *standard, relayable* Bitcoin
|
|
74
|
+
* transaction can have: 100,000 vbytes (400,000 weight units, the consensus
|
|
75
|
+
* tx-weight limit). A PegIn is a single transaction, so its real vsize is far
|
|
76
|
+
* below this; an implied fee above `minPeginFeeRate × MAX_REASONABLE_PEGIN_VBYTES`
|
|
77
|
+
* therefore signals a grossly inflated `htlcValue` (excess sats that would be
|
|
78
|
+
* locked irrecoverably in the HTLC), not legitimate sizing.
|
|
79
|
+
*/
|
|
80
|
+
export declare const MAX_REASONABLE_PEGIN_VBYTES = 100000n;
|
|
65
81
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/utils/fee/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,eAAe,KAAK,CAAC;AAGlC,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAG7C,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAG1C,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,oFAAoF;AACpF,eAAO,MAAM,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,OAAO,GACrB,MAAM,CAWR;AAED;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,2BAA2B,UAAW,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../../signing-Bnsro0hE.cjs"),a=require("../../../validation-u8W7Lp2x.cjs"),e=require("../../../waitForTransactionReceiptSmartAware-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../../signing-Bnsro0hE.cjs"),a=require("../../../validation-u8W7Lp2x.cjs"),e=require("../../../waitForTransactionReceiptSmartAware-U706oKTc.cjs"),t=require("../../../fundPeginTransaction-DuMwnytD.cjs"),E=require("../../../reservation-xTL2a9Q-.cjs"),T=require("../../../bitcoin-CHfKAhcI.cjs");exports.createTaprootScriptPathSignOptions=_.createTaprootScriptPathSignOptions;exports.BITCOIN_ADDRESS_RE=a.BITCOIN_ADDRESS_RE;exports.HEX_RE=a.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=a.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=a.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=a.TXID_RE;exports.BitcoinScriptType=e.BitcoinScriptType;exports.applyChangeOutputPolicy=e.applyChangeOutputPolicy;exports.calculateBtcTxHash=e.calculateBtcTxHash;exports.computeChangeOutputFeeSats=e.computeChangeOutputFeeSats;exports.computeMaxDeposit=e.computeMaxDeposit;exports.computePeginBaseFeeSats=e.computePeginBaseFeeSats;exports.getDustThreshold=e.getDustThreshold;exports.getPsbtInputFields=e.getPsbtInputFields;exports.getScriptType=e.getScriptType;exports.selectUtxosForPegin=e.selectUtxosForPegin;exports.shouldAddChangeOutput=e.shouldAddChangeOutput;exports.waitForTransactionReceiptSmartAware=e.waitForTransactionReceiptSmartAware;exports.BTC_DUST_SAT=t.BTC_DUST_SAT;exports.DUST_THRESHOLD=t.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=t.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=t.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=t.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=t.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=t.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=t.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=t.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=t.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=t.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=t.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=t.fundPeginTransaction;exports.parseUnfundedWasmTransaction=t.parseUnfundedWasmTransaction;exports.peginOutputCount=t.peginOutputCount;exports.rateBasedTxBufferFee=t.rateBasedTxBufferFee;exports.UtxoNotAvailableError=E.UtxoNotAvailableError;exports.assertUtxosAvailable=E.assertUtxosAvailable;exports.extractInputsFromTransaction=E.extractInputsFromTransaction;exports.findOverlappingPendingVaults=E.findOverlappingPendingVaults;exports.validateUtxosAvailable=E.validateUtxosAvailable;exports.getNetwork=T.getNetwork;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|