@babylonlabs-io/ts-sdk 0.56.0 → 0.56.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/README.md +1 -1
- package/dist/{PeginManager-aYBkb-Qx.js → PeginManager-Ba7Cr51Z.js} +3 -3
- package/dist/{PeginManager-aYBkb-Qx.js.map → PeginManager-Ba7Cr51Z.js.map} +1 -1
- package/dist/{PeginManager-BkWdZI7P.cjs → PeginManager-CcjGRo4O.cjs} +2 -2
- package/dist/{PeginManager-BkWdZI7P.cjs.map → PeginManager-CcjGRo4O.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +155 -154
- package/dist/{mempoolApi-emec8bHK.cjs → mempoolApi-DkyKmmgI.cjs} +2 -2
- package/dist/mempoolApi-DkyKmmgI.cjs.map +1 -0
- package/dist/{mempoolApi-P_ApODLd.js → mempoolApi-lpJdvPkK.js} +65 -65
- package/dist/mempoolApi-lpJdvPkK.js.map +1 -0
- package/dist/{primeVpAuth-DZOaC_Ui.js → primeVpAuth-Caa5J_uv.js} +3 -3
- package/dist/{primeVpAuth-DZOaC_Ui.js.map → primeVpAuth-Caa5J_uv.js.map} +1 -1
- package/dist/{primeVpAuth-j2getl3f.cjs → primeVpAuth-y-4A88ah.cjs} +2 -2
- package/dist/{primeVpAuth-j2getl3f.cjs.map → primeVpAuth-y-4A88ah.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/clients/mempool/mempoolApi.d.ts.map +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +153 -152
- package/dist/tbv/core/managers/index.cjs +1 -1
- package/dist/tbv/core/managers/index.js +1 -1
- package/dist/tbv/core/utils/__tests__/abortSignals.test.d.ts +11 -0
- package/dist/tbv/core/utils/__tests__/abortSignals.test.d.ts.map +1 -0
- package/dist/tbv/core/utils/abortSignals.d.ts +23 -0
- package/dist/tbv/core/utils/abortSignals.d.ts.map +1 -0
- package/dist/tbv/core/utils/index.cjs +1 -1
- package/dist/tbv/core/utils/index.d.ts +1 -0
- package/dist/tbv/core/utils/index.d.ts.map +1 -1
- package/dist/tbv/core/utils/index.js +44 -43
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +153 -152
- package/dist/validation-CDbOaDj7.cjs +2 -0
- package/dist/validation-CDbOaDj7.cjs.map +1 -0
- package/dist/validation-Dj3dqYtl.js +30 -0
- package/dist/validation-Dj3dqYtl.js.map +1 -0
- package/package.json +3 -3
- package/dist/mempoolApi-P_ApODLd.js.map +0 -1
- package/dist/mempoolApi-emec8bHK.cjs.map +0 -1
- package/dist/validation-CxqROCno.js +0 -15
- package/dist/validation-CxqROCno.js.map +0 -1
- package/dist/validation-u8W7Lp2x.cjs +0 -2
- package/dist/validation-u8W7Lp2x.cjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../mempoolApi-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../mempoolApi-DkyKmmgI.cjs"),t=require("../../../primeVpAuth-y-4A88ah.cjs"),r=require("../../../types-WA0LrDk1.cjs");exports.MEMPOOL_API_URLS=e.MEMPOOL_API_URLS;exports.ViemVaultRegistryReader=e.ViemVaultRegistryReader;exports.getAddressTxs=e.getAddressTxs;exports.getAddressUtxos=e.getAddressUtxos;exports.getMempoolApiUrl=e.getMempoolApiUrl;exports.getNetworkFees=e.getNetworkFees;exports.getOutspend=e.getOutspend;exports.getTipHeight=e.getTipHeight;exports.getTxHex=e.getTxHex;exports.getTxInfo=e.getTxInfo;exports.getUtxoInfo=e.getUtxoInfo;exports.pushTx=e.pushTx;exports.validateOffchainParams=e.validateOffchainParams;exports.validatePegInConfiguration=e.validatePegInConfiguration;exports.validateTBVProtocolParams=e.validateTBVProtocolParams;exports.OnChainBtcVaultStatus=t.OnChainBtcVaultStatus;exports.ServerIdentityError=t.ServerIdentityError;exports.VaultProviderRpcClient=t.VaultProviderRpcClient;exports.ViemProtocolParamsReader=t.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=t.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=t.ViemVaultKeeperReader;exports.VpResponseValidationError=t.VpResponseValidationError;exports.VpTokenRegistry=t.VpTokenRegistry;exports.batchPollByProvider=t.batchPollByProvider;exports.createAuthenticatedVpClient=t.createAuthenticatedVpClient;exports.primeVpTokenRegistry=t.primeVpTokenRegistry;exports.resolveProtocolAddresses=t.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=t.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=t.verifyServerIdentity;exports.vpTokenRegistry=t.vpTokenRegistry;exports.AUTH_EXPIRED_DATA_KIND=r.AUTH_EXPIRED_DATA_KIND;exports.DaemonStatus=r.DaemonStatus;exports.JSON_RPC_ERROR_CODES=r.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=r.JsonRpcClient;exports.JsonRpcError=r.JsonRpcError;exports.POST_WOTS_STATUSES=r.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=r.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=r.RpcErrorCode;exports.VP_BATCH_MAX_SIZE=r.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=r.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=r.VP_TRANSIENT_STATUSES;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as s, V as r, g as t, a as o, b as i, c as R, d as T, e as n, f as S, h as d, i as l, p, v as A, j as P, k as _ } from "../../../mempoolApi-
|
|
2
|
-
import { O as V, S as g, V as c, g as m, h as v, i as I, a as O, d as f, b as u, f as C, p as U, r as x, v as h, c as y, e as D } from "../../../primeVpAuth-
|
|
1
|
+
import { M as s, V as r, g as t, a as o, b as i, c as R, d as T, e as n, f as S, h as d, i as l, p, v as A, j as P, k as _ } from "../../../mempoolApi-lpJdvPkK.js";
|
|
2
|
+
import { O as V, S as g, V as c, g as m, h as v, i as I, a as O, d as f, b as u, f as C, p as U, r as x, v as h, c as y, e as D } from "../../../primeVpAuth-Caa5J_uv.js";
|
|
3
3
|
import { A as M, D as k, b, J as B, a as H, d as J, P as L, R as F, e as K, c as X, V as j } from "../../../types-CQDRQvV-.js";
|
|
4
4
|
export {
|
|
5
5
|
M as AUTH_EXPIRED_DATA_KIND,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mempoolApi.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/mempool/mempoolApi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"mempoolApi.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/mempool/mempoolApi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,cAAc,EACd,MAAM,EACN,QAAQ,EACT,MAAM,SAAS,CAAC;AAuGjB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAiCX;;;;;;;GAOG;AACH,wBAAsB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmC3E;AAED;;;;;;GAMG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAG7E;AAED;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CASlE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,cAAc,CAAC,CAMzB;AAED;;;;;;;GAOG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAmB5E;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,QAAQ,CAAC,CAsBnB;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,WAAW,EAAE,CAAC,CAkExB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GACxC,MAAM,CAER;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QACN,SAAS,EAAE,OAAO,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,SAAS,EAAE,CAAC,CAGtB;AAED;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA0CzE"}
|
package/dist/tbv/core/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../challengeAssert-Cu-PtJ1g.cjs"),R=require("../../constants-BqU1Uz15.cjs"),n=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../../verifyScriptPathSchnorrSignature-BZhX-SOd.cjs"),S=require("../../peginInput-CAiiDZeO.cjs"),E=require("../../noPayout-Cb8vFrkY.cjs"),t=require("../../bitcoin-CHfKAhcI.cjs"),m=require("../../signing-Bnsro0hE.cjs"),l=require("../../validation-u8W7Lp2x.cjs"),d=require("../../PeginManager-BkWdZI7P.cjs"),c=require("../../PayoutManager-Cu4_l-_Y.cjs"),_=require("../../ApplicationRegistry.abi-CLaa6E99.cjs"),O=require("../../BTCVaultRegistry.abi-JdeqLz4x.cjs"),P=require("../../errors-CGcNP0rV.cjs"),A=require("../../deriveVaultRoot-CebLadyJ.cjs"),b=require("../../parseFundingOutpoints-C_-PT9BT.cjs"),o=require("../../waitForTransactionReceiptSmartAware-AgZ-3WV_.cjs"),r=require("../../fundPeginTransaction-BLD8FRL9.cjs"),p=require("../../reservation-ClEs2X0H.cjs"),i=require("../../mempoolApi-emec8bHK.cjs"),a=require("../../primeVpAuth-j2getl3f.cjs"),s=require("../../types-WA0LrDk1.cjs"),I=require("../../errors-Bfjxg_iJ.cjs"),e=require("../../buildAndBroadcastRefund-Cq01wyZX.cjs"),T=require("../../peginState-CBBJw4Za.cjs");exports.buildChallengeAssertPsbt=g.buildChallengeAssertPsbt;exports.computeNumLocalChallengers=g.computeNumLocalChallengers;exports.assertValidVaultCoreVersion=R.assertValidVaultCoreVersion;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>n.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>n.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>n.deriveVaultId});Object.defineProperty(exports,"expandAuthAnchor",{enumerable:!0,get:()=>n.expandAuthAnchor});Object.defineProperty(exports,"expandHashlockSecret",{enumerable:!0,get:()=>n.expandHashlockSecret});Object.defineProperty(exports,"expandWotsSeed",{enumerable:!0,get:()=>n.expandWotsSeed});Object.defineProperty(exports,"peginP2aAnchorOutput",{enumerable:!0,get:()=>n.peginP2aAnchorOutput});Object.defineProperty(exports,"supportedTxGraphVersions",{enumerable:!0,get:()=>n.supportedTxGraphVersions});Object.defineProperty(exports,"validatePeginP2aAnchor",{enumerable:!0,get:()=>n.validatePeginP2aAnchor});exports.PsbtSubstitutionError=u.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=u.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=u.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=u.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=u.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=u.buildPrePeginPsbt;exports.createPayoutScript=u.createPayoutScript;exports.extractPayoutSignature=u.extractPayoutSignature;exports.buildPeginInputPsbt=S.buildPeginInputPsbt;exports.extractPeginInputSignature=S.extractPeginInputSignature;exports.finalizePeginInputPsbt=S.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=E.buildNoPayoutPsbt;exports.buildRefundPsbt=E.buildRefundPsbt;exports.deriveBip86ScriptPubKeyHex=t.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=t.deriveNativeSegwitAddress;exports.deriveTaprootAddress=t.deriveTaprootAddress;exports.ensureHexPrefix=t.ensureHexPrefix;exports.formatSatoshisToBtc=t.formatSatoshisToBtc;exports.getNetwork=t.getNetwork;exports.getSortedXOnlyPubkeys=t.getSortedXOnlyPubkeys;exports.hexToUint8Array=t.hexToUint8Array;exports.isAddressFromPublicKey=t.isAddressFromPublicKey;exports.isValidHex=t.isValidHex;exports.processPublicKeyToXOnly=t.processPublicKeyToXOnly;exports.stripHexPrefix=t.stripHexPrefix;exports.toXOnly=t.toXOnly;exports.uint8ArrayToHex=t.uint8ArrayToHex;exports.validateWalletPubkey=t.validateWalletPubkey;exports.createTaprootScriptPathSignOptions=m.createTaprootScriptPathSignOptions;exports.BITCOIN_ADDRESS_RE=l.BITCOIN_ADDRESS_RE;exports.HEX_RE=l.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=l.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=l.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=l.TXID_RE;exports.PeginManager=d.PeginManager;exports.buildDepositTerms=d.buildDepositTerms;exports.computeWotsBlockPublicKeysHash=d.computeWotsBlockPublicKeysHash;exports.deriveWotsBlocksFromSeed=d.deriveWotsBlocksFromSeed;exports.estimateSubmitPeginRequestBatchGas=d.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=c.PayoutManager;exports.computeHashlock=c.computeHashlock;exports.forwardDepositApproval=c.forwardDepositApproval;exports.supportsDepositApproval=c.supportsDepositApproval;exports.validateSecretAgainstHashlock=c.validateSecretAgainstHashlock;exports.ApplicationRegistryABI=_.ApplicationRegistryABI;exports.ProtocolParamsABI=_.ProtocolParamsABI;exports.BTCVaultRegistryABI=O.BTCVaultRegistryABI;exports.CONTRACT_ERRORS=P.CONTRACT_ERRORS;exports.extractErrorData=P.extractErrorData;exports.getContractErrorMessage=P.getContractErrorMessage;exports.handleContractError=P.handleContractError;exports.isKnownContractError=P.isKnownContractError;exports.VAULT_APP_NAME=A.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=A.buildFundingOutpointsCommitment;exports.buildVaultContext=A.buildVaultContext;exports.deriveVaultRoot=A.deriveVaultRoot;exports.parseFundingOutpointsFromTx=b.parseFundingOutpointsFromTx;exports.BitcoinScriptType=o.BitcoinScriptType;exports.applyChangeOutputPolicy=o.applyChangeOutputPolicy;exports.calculateBtcTxHash=o.calculateBtcTxHash;exports.computeChangeOutputFeeSats=o.computeChangeOutputFeeSats;exports.computeMaxDeposit=o.computeMaxDeposit;exports.computePeginBaseFeeSats=o.computePeginBaseFeeSats;exports.getDustThreshold=o.getDustThreshold;exports.getPsbtInputFields=o.getPsbtInputFields;exports.getScriptType=o.getScriptType;exports.selectUtxosForPegin=o.selectUtxosForPegin;exports.shouldAddChangeOutput=o.shouldAddChangeOutput;exports.waitForTransactionReceiptSmartAware=o.waitForTransactionReceiptSmartAware;exports.BTC_DUST_SAT=r.BTC_DUST_SAT;exports.DUST_THRESHOLD=r.DUST_THRESHOLD;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=r.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=r.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=r.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=r.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=r.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=r.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=r.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=r.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=r.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=r.fundPeginTransaction;exports.parseUnfundedWasmTransaction=r.parseUnfundedWasmTransaction;exports.peginOutputCount=r.peginOutputCount;exports.rateBasedTxBufferFee=r.rateBasedTxBufferFee;exports.UtxoNotAvailableError=p.UtxoNotAvailableError;exports.assertUtxosAvailable=p.assertUtxosAvailable;exports.extractInputsFromTransaction=p.extractInputsFromTransaction;exports.findOverlappingPendingVaults=p.findOverlappingPendingVaults;exports.validateUtxosAvailable=p.validateUtxosAvailable;exports.MEMPOOL_API_URLS=i.MEMPOOL_API_URLS;exports.ViemVaultRegistryReader=i.ViemVaultRegistryReader;exports.getAddressTxs=i.getAddressTxs;exports.getAddressUtxos=i.getAddressUtxos;exports.getMempoolApiUrl=i.getMempoolApiUrl;exports.getNetworkFees=i.getNetworkFees;exports.getOutspend=i.getOutspend;exports.getTipHeight=i.getTipHeight;exports.getTxHex=i.getTxHex;exports.getTxInfo=i.getTxInfo;exports.getUtxoInfo=i.getUtxoInfo;exports.pushTx=i.pushTx;exports.validateOffchainParams=i.validateOffchainParams;exports.validatePegInConfiguration=i.validatePegInConfiguration;exports.validateTBVProtocolParams=i.validateTBVProtocolParams;exports.OnChainBtcVaultStatus=a.OnChainBtcVaultStatus;exports.ServerIdentityError=a.ServerIdentityError;exports.VaultProviderRpcClient=a.VaultProviderRpcClient;exports.ViemProtocolParamsReader=a.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=a.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=a.ViemVaultKeeperReader;exports.VpResponseValidationError=a.VpResponseValidationError;exports.VpTokenRegistry=a.VpTokenRegistry;exports.batchPollByProvider=a.batchPollByProvider;exports.createAuthenticatedVpClient=a.createAuthenticatedVpClient;exports.primeVpTokenRegistry=a.primeVpTokenRegistry;exports.resolveProtocolAddresses=a.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=a.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=a.verifyServerIdentity;exports.vpTokenRegistry=a.vpTokenRegistry;exports.AUTH_EXPIRED_DATA_KIND=s.AUTH_EXPIRED_DATA_KIND;exports.DaemonStatus=s.DaemonStatus;exports.JSON_RPC_ERROR_CODES=s.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=s.JsonRpcClient;exports.JsonRpcError=s.JsonRpcError;exports.POST_WOTS_STATUSES=s.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=s.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=s.RpcErrorCode;exports.VP_BATCH_MAX_SIZE=s.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=s.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;exports.isWotsMismatchError=I.isWotsMismatchError;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=e.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=e.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=e.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.RegisteredVaultVersionMismatchError=e.RegisteredVaultVersionMismatchError;exports.activateVault=e.activateVault;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.runDepositorPresignFlow=e.runDepositorPresignFlow;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=e.validateOnChainParticipantKeys;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=T.ContractStatus;exports.PeginAction=T.PeginAction;exports.canPerformAction=T.canPerformAction;exports.getPeginProtocolState=T.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=T.isActivationDeadlinePassedOnChain;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../challengeAssert-Cu-PtJ1g.cjs"),R=require("../../constants-BqU1Uz15.cjs"),n=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../../verifyScriptPathSchnorrSignature-BZhX-SOd.cjs"),S=require("../../peginInput-CAiiDZeO.cjs"),E=require("../../noPayout-Cb8vFrkY.cjs"),t=require("../../bitcoin-CHfKAhcI.cjs"),l=require("../../validation-CDbOaDj7.cjs"),m=require("../../signing-Bnsro0hE.cjs"),c=require("../../PeginManager-CcjGRo4O.cjs"),d=require("../../PayoutManager-Cu4_l-_Y.cjs"),_=require("../../ApplicationRegistry.abi-CLaa6E99.cjs"),O=require("../../BTCVaultRegistry.abi-JdeqLz4x.cjs"),P=require("../../errors-CGcNP0rV.cjs"),A=require("../../deriveVaultRoot-CebLadyJ.cjs"),b=require("../../parseFundingOutpoints-C_-PT9BT.cjs"),o=require("../../waitForTransactionReceiptSmartAware-AgZ-3WV_.cjs"),r=require("../../fundPeginTransaction-BLD8FRL9.cjs"),p=require("../../reservation-ClEs2X0H.cjs"),i=require("../../mempoolApi-DkyKmmgI.cjs"),a=require("../../primeVpAuth-y-4A88ah.cjs"),s=require("../../types-WA0LrDk1.cjs"),I=require("../../errors-Bfjxg_iJ.cjs"),e=require("../../buildAndBroadcastRefund-Cq01wyZX.cjs"),T=require("../../peginState-CBBJw4Za.cjs");exports.buildChallengeAssertPsbt=g.buildChallengeAssertPsbt;exports.computeNumLocalChallengers=g.computeNumLocalChallengers;exports.assertValidVaultCoreVersion=R.assertValidVaultCoreVersion;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>n.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>n.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>n.deriveVaultId});Object.defineProperty(exports,"expandAuthAnchor",{enumerable:!0,get:()=>n.expandAuthAnchor});Object.defineProperty(exports,"expandHashlockSecret",{enumerable:!0,get:()=>n.expandHashlockSecret});Object.defineProperty(exports,"expandWotsSeed",{enumerable:!0,get:()=>n.expandWotsSeed});Object.defineProperty(exports,"peginP2aAnchorOutput",{enumerable:!0,get:()=>n.peginP2aAnchorOutput});Object.defineProperty(exports,"supportedTxGraphVersions",{enumerable:!0,get:()=>n.supportedTxGraphVersions});Object.defineProperty(exports,"validatePeginP2aAnchor",{enumerable:!0,get:()=>n.validatePeginP2aAnchor});exports.PsbtSubstitutionError=u.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=u.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=u.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=u.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=u.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=u.buildPrePeginPsbt;exports.createPayoutScript=u.createPayoutScript;exports.extractPayoutSignature=u.extractPayoutSignature;exports.buildPeginInputPsbt=S.buildPeginInputPsbt;exports.extractPeginInputSignature=S.extractPeginInputSignature;exports.finalizePeginInputPsbt=S.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=E.buildNoPayoutPsbt;exports.buildRefundPsbt=E.buildRefundPsbt;exports.deriveBip86ScriptPubKeyHex=t.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=t.deriveNativeSegwitAddress;exports.deriveTaprootAddress=t.deriveTaprootAddress;exports.ensureHexPrefix=t.ensureHexPrefix;exports.formatSatoshisToBtc=t.formatSatoshisToBtc;exports.getNetwork=t.getNetwork;exports.getSortedXOnlyPubkeys=t.getSortedXOnlyPubkeys;exports.hexToUint8Array=t.hexToUint8Array;exports.isAddressFromPublicKey=t.isAddressFromPublicKey;exports.isValidHex=t.isValidHex;exports.processPublicKeyToXOnly=t.processPublicKeyToXOnly;exports.stripHexPrefix=t.stripHexPrefix;exports.toXOnly=t.toXOnly;exports.uint8ArrayToHex=t.uint8ArrayToHex;exports.validateWalletPubkey=t.validateWalletPubkey;exports.BITCOIN_ADDRESS_RE=l.BITCOIN_ADDRESS_RE;exports.HEX_RE=l.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=l.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=l.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=l.TXID_RE;exports.combineAbortSignals=l.combineAbortSignals;exports.createTaprootScriptPathSignOptions=m.createTaprootScriptPathSignOptions;exports.PeginManager=c.PeginManager;exports.buildDepositTerms=c.buildDepositTerms;exports.computeWotsBlockPublicKeysHash=c.computeWotsBlockPublicKeysHash;exports.deriveWotsBlocksFromSeed=c.deriveWotsBlocksFromSeed;exports.estimateSubmitPeginRequestBatchGas=c.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=d.PayoutManager;exports.computeHashlock=d.computeHashlock;exports.forwardDepositApproval=d.forwardDepositApproval;exports.supportsDepositApproval=d.supportsDepositApproval;exports.validateSecretAgainstHashlock=d.validateSecretAgainstHashlock;exports.ApplicationRegistryABI=_.ApplicationRegistryABI;exports.ProtocolParamsABI=_.ProtocolParamsABI;exports.BTCVaultRegistryABI=O.BTCVaultRegistryABI;exports.CONTRACT_ERRORS=P.CONTRACT_ERRORS;exports.extractErrorData=P.extractErrorData;exports.getContractErrorMessage=P.getContractErrorMessage;exports.handleContractError=P.handleContractError;exports.isKnownContractError=P.isKnownContractError;exports.VAULT_APP_NAME=A.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=A.buildFundingOutpointsCommitment;exports.buildVaultContext=A.buildVaultContext;exports.deriveVaultRoot=A.deriveVaultRoot;exports.parseFundingOutpointsFromTx=b.parseFundingOutpointsFromTx;exports.BitcoinScriptType=o.BitcoinScriptType;exports.applyChangeOutputPolicy=o.applyChangeOutputPolicy;exports.calculateBtcTxHash=o.calculateBtcTxHash;exports.computeChangeOutputFeeSats=o.computeChangeOutputFeeSats;exports.computeMaxDeposit=o.computeMaxDeposit;exports.computePeginBaseFeeSats=o.computePeginBaseFeeSats;exports.getDustThreshold=o.getDustThreshold;exports.getPsbtInputFields=o.getPsbtInputFields;exports.getScriptType=o.getScriptType;exports.selectUtxosForPegin=o.selectUtxosForPegin;exports.shouldAddChangeOutput=o.shouldAddChangeOutput;exports.waitForTransactionReceiptSmartAware=o.waitForTransactionReceiptSmartAware;exports.BTC_DUST_SAT=r.BTC_DUST_SAT;exports.DUST_THRESHOLD=r.DUST_THRESHOLD;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=r.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=r.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=r.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=r.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=r.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=r.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=r.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=r.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=r.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=r.fundPeginTransaction;exports.parseUnfundedWasmTransaction=r.parseUnfundedWasmTransaction;exports.peginOutputCount=r.peginOutputCount;exports.rateBasedTxBufferFee=r.rateBasedTxBufferFee;exports.UtxoNotAvailableError=p.UtxoNotAvailableError;exports.assertUtxosAvailable=p.assertUtxosAvailable;exports.extractInputsFromTransaction=p.extractInputsFromTransaction;exports.findOverlappingPendingVaults=p.findOverlappingPendingVaults;exports.validateUtxosAvailable=p.validateUtxosAvailable;exports.MEMPOOL_API_URLS=i.MEMPOOL_API_URLS;exports.ViemVaultRegistryReader=i.ViemVaultRegistryReader;exports.getAddressTxs=i.getAddressTxs;exports.getAddressUtxos=i.getAddressUtxos;exports.getMempoolApiUrl=i.getMempoolApiUrl;exports.getNetworkFees=i.getNetworkFees;exports.getOutspend=i.getOutspend;exports.getTipHeight=i.getTipHeight;exports.getTxHex=i.getTxHex;exports.getTxInfo=i.getTxInfo;exports.getUtxoInfo=i.getUtxoInfo;exports.pushTx=i.pushTx;exports.validateOffchainParams=i.validateOffchainParams;exports.validatePegInConfiguration=i.validatePegInConfiguration;exports.validateTBVProtocolParams=i.validateTBVProtocolParams;exports.OnChainBtcVaultStatus=a.OnChainBtcVaultStatus;exports.ServerIdentityError=a.ServerIdentityError;exports.VaultProviderRpcClient=a.VaultProviderRpcClient;exports.ViemProtocolParamsReader=a.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=a.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=a.ViemVaultKeeperReader;exports.VpResponseValidationError=a.VpResponseValidationError;exports.VpTokenRegistry=a.VpTokenRegistry;exports.batchPollByProvider=a.batchPollByProvider;exports.createAuthenticatedVpClient=a.createAuthenticatedVpClient;exports.primeVpTokenRegistry=a.primeVpTokenRegistry;exports.resolveProtocolAddresses=a.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=a.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=a.verifyServerIdentity;exports.vpTokenRegistry=a.vpTokenRegistry;exports.AUTH_EXPIRED_DATA_KIND=s.AUTH_EXPIRED_DATA_KIND;exports.DaemonStatus=s.DaemonStatus;exports.JSON_RPC_ERROR_CODES=s.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=s.JsonRpcClient;exports.JsonRpcError=s.JsonRpcError;exports.POST_WOTS_STATUSES=s.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=s.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=s.RpcErrorCode;exports.VP_BATCH_MAX_SIZE=s.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=s.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;exports.isWotsMismatchError=I.isWotsMismatchError;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=e.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=e.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=e.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.RegisteredVaultVersionMismatchError=e.RegisteredVaultVersionMismatchError;exports.activateVault=e.activateVault;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.runDepositorPresignFlow=e.runDepositorPresignFlow;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=e.validateOnChainParticipantKeys;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=T.ContractStatus;exports.PeginAction=T.PeginAction;exports.canPerformAction=T.canPerformAction;exports.getPeginProtocolState=T.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=T.isActivationDeadlinePassedOnChain;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/tbv/core/index.js
CHANGED
|
@@ -5,198 +5,199 @@ import { P as S, d as g, f as _, c as R, b as m, a as x, g as f, e as b } from "
|
|
|
5
5
|
import { b as O, e as v, f as I } from "../../peginInput-BKD_b3gq.js";
|
|
6
6
|
import { a as C, b as F } from "../../noPayout-CihCk1HE.js";
|
|
7
7
|
import { d as N, a as y, b as D, e as B, f as M, j as H, g as L, h as X, i as k, c as W, p as w, s as K, t as G, u as Y, v as Z } from "../../bitcoin-B5aNKtsk.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { P as
|
|
11
|
-
import { P as
|
|
12
|
-
import { A as
|
|
13
|
-
import { B as
|
|
14
|
-
import { C as
|
|
15
|
-
import { V as
|
|
16
|
-
import { p as
|
|
17
|
-
import { B as
|
|
18
|
-
import { B as
|
|
19
|
-
import { U as
|
|
20
|
-
import { M as
|
|
21
|
-
import { O as
|
|
22
|
-
import { A as
|
|
23
|
-
import { i as
|
|
24
|
-
import { B as
|
|
25
|
-
import { C as
|
|
8
|
+
import { B as j, H as q, K as z, M as Q, T as $, c as aa } from "../../validation-Dj3dqYtl.js";
|
|
9
|
+
import { c as sa } from "../../signing-DaLvGwQe.js";
|
|
10
|
+
import { P as ra, b as oa, c as ia, d as na, e as pa } from "../../PeginManager-Ba7Cr51Z.js";
|
|
11
|
+
import { P as la, c as da, f as Pa, s as ca, v as Ta } from "../../PayoutManager-BVgmuKuK.js";
|
|
12
|
+
import { A as Ea, P as Sa } from "../../ApplicationRegistry.abi-w5prf7Ig.js";
|
|
13
|
+
import { B as _a } from "../../BTCVaultRegistry.abi-Chs4AFBj.js";
|
|
14
|
+
import { C as ma, e as xa, g as fa, h as ba, i as Va } from "../../errors-Blc-JWnI.js";
|
|
15
|
+
import { V as va, b as Ia, a as ha, d as Ca } from "../../deriveVaultRoot-B_gEOTD6.js";
|
|
16
|
+
import { p as Ua } from "../../parseFundingOutpoints-GSM-IaaK.js";
|
|
17
|
+
import { B as ya, a as Da, f as Ba, c as Ma, b as Ha, d as La, g as Xa, i as ka, h as Wa, s as wa, e as Ka, w as Ga } from "../../waitForTransactionReceiptSmartAware-lobLm0q0.js";
|
|
18
|
+
import { B as Za, D as Ja, L as ja, M as qa, c as za, P as Qa, b as $a, a as ae, S as ee, T as se, W as te, f as re, d as oe, p as ie, r as ne } from "../../fundPeginTransaction-B2wyjqp0.js";
|
|
19
|
+
import { U as ue, a as le, e as de, f as Pe, v as ce } from "../../reservation-cHDRn4DA.js";
|
|
20
|
+
import { M as Ae, V as Ee, g as Se, a as ge, b as _e, c as Re, d as me, e as xe, f as fe, h as be, i as Ve, p as Oe, v as ve, j as Ie, k as he } from "../../mempoolApi-lpJdvPkK.js";
|
|
21
|
+
import { O as Fe, S as Ue, V as Ne, g as ye, h as De, i as Be, a as Me, d as He, b as Le, f as Xe, p as ke, r as We, v as we, c as Ke, e as Ge } from "../../primeVpAuth-Caa5J_uv.js";
|
|
22
|
+
import { A as Ze, D as Je, b as je, J as qe, a as ze, d as Qe, P as $e, R as as, e as es, c as ss, V as ts } from "../../types-CQDRQvV-.js";
|
|
23
|
+
import { i as os } from "../../errors-B-H0seUG.js";
|
|
24
|
+
import { B as ns, C as ps, p as us, q as ls, t as ds, u as Ps, R as cs, a as Ts, n as As, o as Es, i as Ss, m as gs, l as _s, j as Rs, r as ms, b as xs, s as fs, v as bs, g as Vs, h as Os, d as vs, c as Is, e as hs, f as Cs, k as Fs, w as Us } from "../../buildAndBroadcastRefund-BtXUqBkb.js";
|
|
25
|
+
import { C as ys, P as Ds, c as Bs, g as Ms, i as Hs } from "../../peginState-BB81JI6I.js";
|
|
26
26
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
27
|
+
Ze as AUTH_EXPIRED_DATA_KIND,
|
|
28
|
+
Ea as ApplicationRegistryABI,
|
|
29
|
+
ns as BIP68NotMatureError,
|
|
30
|
+
j as BITCOIN_ADDRESS_RE,
|
|
31
|
+
_a as BTCVaultRegistryABI,
|
|
32
|
+
Za as BTC_DUST_SAT,
|
|
33
|
+
ya as BitcoinScriptType,
|
|
34
|
+
ma as CONTRACT_ERRORS,
|
|
35
|
+
ps as ClaimerPegoutStatusValue,
|
|
36
|
+
ys as ContractStatus,
|
|
37
|
+
Ja as DUST_THRESHOLD,
|
|
38
|
+
Je as DaemonStatus,
|
|
39
|
+
q as HEX_RE,
|
|
40
|
+
je as JSON_RPC_ERROR_CODES,
|
|
41
|
+
qe as JsonRpcClient,
|
|
42
|
+
ze as JsonRpcError,
|
|
43
|
+
z as KNOWN_SCRIPT_PREFIXES,
|
|
44
|
+
ja as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
45
|
+
qa as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
46
|
+
Q as MAX_REASONABLE_FEE_SATS,
|
|
47
|
+
za as MAX_REASONABLE_PEGIN_VBYTES,
|
|
48
|
+
Ae as MEMPOOL_API_URLS,
|
|
49
|
+
Fe as OnChainBtcVaultStatus,
|
|
50
|
+
Qa as P2TR_INPUT_SIZE,
|
|
51
|
+
$a as PEGIN_AUTH_ANCHOR_OUTPUTS,
|
|
52
|
+
ae as PEGIN_FIXED_OUTPUTS,
|
|
53
|
+
Qe as POST_WOTS_STATUSES,
|
|
54
|
+
$e as PRE_DEPOSITOR_SIGNATURES_STATES,
|
|
55
|
+
la as PayoutManager,
|
|
56
|
+
Ds as PeginAction,
|
|
57
|
+
ra as PeginManager,
|
|
58
|
+
Sa as ProtocolParamsABI,
|
|
59
59
|
S as PsbtSubstitutionError,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
60
|
+
us as REFUND_MAX_FEE_FRACTION_DENOMINATOR,
|
|
61
|
+
ls as REFUND_MAX_FEE_FRACTION_NUMERATOR,
|
|
62
|
+
ds as REFUND_MAX_FEE_RATE_SATS_VB,
|
|
63
|
+
Ps as REFUND_VSIZE,
|
|
64
|
+
cs as RegisteredVaultVersionMismatchError,
|
|
65
|
+
as as RpcErrorCode,
|
|
66
|
+
ee as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
67
|
+
Ue as ServerIdentityError,
|
|
68
|
+
$ as TXID_RE,
|
|
69
|
+
se as TX_BUFFER_SIZE_OVERHEAD,
|
|
70
|
+
ue as UtxoNotAvailableError,
|
|
71
|
+
va as VAULT_APP_NAME,
|
|
72
|
+
es as VP_BATCH_MAX_SIZE,
|
|
73
|
+
ss as VP_TERMINAL_FAILURE_STATUSES,
|
|
74
|
+
ts as VP_TRANSIENT_STATUSES,
|
|
75
|
+
Ne as VaultProviderRpcClient,
|
|
76
|
+
ye as ViemProtocolParamsReader,
|
|
77
|
+
De as ViemUniversalChallengerReader,
|
|
78
|
+
Be as ViemVaultKeeperReader,
|
|
79
|
+
Ee as ViemVaultRegistryReader,
|
|
80
|
+
Me as VpResponseValidationError,
|
|
81
|
+
He as VpTokenRegistry,
|
|
82
|
+
te as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
83
|
+
Ts as activateVault,
|
|
84
|
+
Da as applyChangeOutputPolicy,
|
|
85
85
|
g as assertPsbtUnsignedTxMatches,
|
|
86
86
|
_ as assertScriptPathSchnorrSignature,
|
|
87
|
-
|
|
87
|
+
le as assertUtxosAvailable,
|
|
88
88
|
o as assertValidVaultCoreVersion,
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
Le as batchPollByProvider,
|
|
90
|
+
As as buildAndBroadcastRefund,
|
|
91
91
|
s as buildChallengeAssertPsbt,
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
oa as buildDepositTerms,
|
|
93
|
+
Ia as buildFundingOutpointsCommitment,
|
|
94
94
|
C as buildNoPayoutPsbt,
|
|
95
95
|
R as buildPayoutPsbt,
|
|
96
96
|
O as buildPeginInputPsbt,
|
|
97
97
|
m as buildPeginTxFromFundedPrePegin,
|
|
98
98
|
x as buildPrePeginPsbt,
|
|
99
99
|
F as buildRefundPsbt,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
ha as buildVaultContext,
|
|
101
|
+
Ba as calculateBtcTxHash,
|
|
102
|
+
Bs as canPerformAction,
|
|
103
|
+
aa as combineAbortSignals,
|
|
104
|
+
Ma as computeChangeOutputFeeSats,
|
|
105
|
+
da as computeHashlock,
|
|
106
|
+
Ha as computeMaxDeposit,
|
|
106
107
|
n as computeMinClaimValue,
|
|
107
108
|
p as computeMinPeginFee,
|
|
108
109
|
t as computeNumLocalChallengers,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
La as computePeginBaseFeeSats,
|
|
111
|
+
ia as computeWotsBlockPublicKeysHash,
|
|
112
|
+
Xe as createAuthenticatedVpClient,
|
|
112
113
|
f as createPayoutScript,
|
|
113
|
-
|
|
114
|
+
sa as createTaprootScriptPathSignOptions,
|
|
114
115
|
N as deriveBip86ScriptPubKeyHex,
|
|
115
116
|
y as deriveNativeSegwitAddress,
|
|
116
117
|
D as deriveTaprootAddress,
|
|
117
118
|
u as deriveVaultId,
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
Ca as deriveVaultRoot,
|
|
120
|
+
na as deriveWotsBlocksFromSeed,
|
|
120
121
|
B as ensureHexPrefix,
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
Es as estimateRefundFeeSats,
|
|
123
|
+
pa as estimateSubmitPeginRequestBatchGas,
|
|
123
124
|
l as expandAuthAnchor,
|
|
124
125
|
d as expandHashlockSecret,
|
|
125
126
|
P as expandWotsSeed,
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
xa as extractErrorData,
|
|
128
|
+
de as extractInputsFromTransaction,
|
|
128
129
|
b as extractPayoutSignature,
|
|
129
130
|
v as extractPeginInputSignature,
|
|
130
131
|
I as finalizePeginInputPsbt,
|
|
131
|
-
|
|
132
|
+
Pe as findOverlappingPendingVaults,
|
|
132
133
|
M as formatSatoshisToBtc,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
134
|
+
Pa as forwardDepositApproval,
|
|
135
|
+
re as fundPeginTransaction,
|
|
136
|
+
Se as getAddressTxs,
|
|
137
|
+
ge as getAddressUtxos,
|
|
138
|
+
fa as getContractErrorMessage,
|
|
139
|
+
Xa as getDustThreshold,
|
|
140
|
+
_e as getMempoolApiUrl,
|
|
140
141
|
H as getNetwork,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
Re as getNetworkFees,
|
|
143
|
+
me as getOutspend,
|
|
144
|
+
Ms as getPeginProtocolState,
|
|
145
|
+
ka as getPsbtInputFields,
|
|
146
|
+
Wa as getScriptType,
|
|
146
147
|
L as getSortedXOnlyPubkeys,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
xe as getTipHeight,
|
|
149
|
+
fe as getTxHex,
|
|
150
|
+
be as getTxInfo,
|
|
151
|
+
Ve as getUtxoInfo,
|
|
152
|
+
ba as handleContractError,
|
|
152
153
|
X as hexToUint8Array,
|
|
153
|
-
|
|
154
|
+
Hs as isActivationDeadlinePassedOnChain,
|
|
154
155
|
k as isAddressFromPublicKey,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
Ss as isDepositAmountValid,
|
|
157
|
+
Va as isKnownContractError,
|
|
158
|
+
gs as isPegoutTerminalStatus,
|
|
159
|
+
_s as isRecognizedPegoutStatus,
|
|
160
|
+
Rs as isRegisteredVaultVersionMismatchError,
|
|
160
161
|
W as isValidHex,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
os as isWotsMismatchError,
|
|
163
|
+
Ua as parseFundingOutpointsFromTx,
|
|
164
|
+
oe as parseUnfundedWasmTransaction,
|
|
165
|
+
ie as peginOutputCount,
|
|
165
166
|
c as peginP2aAnchorOutput,
|
|
166
|
-
|
|
167
|
+
ke as primeVpTokenRegistry,
|
|
167
168
|
w as processPublicKeyToXOnly,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
169
|
+
Oe as pushTx,
|
|
170
|
+
ne as rateBasedTxBufferFee,
|
|
171
|
+
We as resolveProtocolAddresses,
|
|
172
|
+
ms as runDepositorPresignFlow,
|
|
173
|
+
wa as selectUtxosForPegin,
|
|
174
|
+
Ka as shouldAddChangeOutput,
|
|
175
|
+
xs as signDepositorGraph,
|
|
175
176
|
K as stripHexPrefix,
|
|
176
|
-
|
|
177
|
+
fs as submitWotsPublicKey,
|
|
177
178
|
T as supportedTxGraphVersions,
|
|
178
|
-
|
|
179
|
+
ca as supportsDepositApproval,
|
|
179
180
|
G as toXOnly,
|
|
180
181
|
Y as uint8ArrayToHex,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
bs as validateDepositAmount,
|
|
183
|
+
Vs as validateMultiVaultDepositInputs,
|
|
184
|
+
ve as validateOffchainParams,
|
|
185
|
+
Os as validateOnChainParticipantKeys,
|
|
186
|
+
Ie as validatePegInConfiguration,
|
|
186
187
|
A as validatePeginP2aAnchor,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
188
|
+
vs as validateProviderSelection,
|
|
189
|
+
Is as validateRemainingCapacity,
|
|
190
|
+
we as validateRequestDepositorClaimerArtifactsResponse,
|
|
191
|
+
Ta as validateSecretAgainstHashlock,
|
|
192
|
+
he as validateTBVProtocolParams,
|
|
193
|
+
ce as validateUtxosAvailable,
|
|
194
|
+
hs as validateVaultAmounts,
|
|
195
|
+
Cs as validateVaultProviderPubkey,
|
|
195
196
|
Z as validateWalletPubkey,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
Fs as verifyRegisteredVaultVersions,
|
|
198
|
+
Ke as verifyServerIdentity,
|
|
199
|
+
Ge as vpTokenRegistry,
|
|
200
|
+
Us as waitForPeginStatus,
|
|
201
|
+
Ga as waitForTransactionReceiptSmartAware
|
|
201
202
|
};
|
|
202
203
|
//# 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-CcjGRo4O.cjs"),a=require("../../../PayoutManager-Cu4_l-_Y.cjs");exports.PeginManager=e.PeginManager;exports.estimateSubmitPeginRequestBatchGas=e.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=a.PayoutManager;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Guards the browser-compatibility fix for `combineAbortSignals`.
|
|
3
|
+
*
|
|
4
|
+
* The regression this protects against: the mempool client used to call
|
|
5
|
+
* `AbortSignal.any`, which is absent on Safari < 17.4 and Chrome < 116. It
|
|
6
|
+
* threw before `fetch` was reached, so UTXO fetches, fee estimation and
|
|
7
|
+
* transaction broadcast all failed outright on those browsers. The last test
|
|
8
|
+
* deletes `AbortSignal.any` outright to prove the helper never reaches for it.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=abortSignals.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abortSignals.test.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/utils/__tests__/abortSignals.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AbortSignal composition helpers.
|
|
3
|
+
*
|
|
4
|
+
* @module utils/abortSignals
|
|
5
|
+
*/
|
|
6
|
+
export interface CombinedAbortSignal {
|
|
7
|
+
signal: AbortSignal;
|
|
8
|
+
/** Remove listeners from the source signals. Call once the request settles. */
|
|
9
|
+
cleanup: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Compose several AbortSignals into one that aborts when any input aborts,
|
|
13
|
+
* propagating the reason of whichever fired first.
|
|
14
|
+
*
|
|
15
|
+
* Deliberately does NOT use `AbortSignal.any`: that shipped in Chrome 116 /
|
|
16
|
+
* Safari 17.4, newer than the browsers this SDK is consumed from, and it is a
|
|
17
|
+
* runtime API so no transpile step can backfill it. Calling it directly threw
|
|
18
|
+
* `TypeError: AbortSignal.any is not a function` before `fetch` was ever
|
|
19
|
+
* reached, which failed UTXO fetches, fee estimation and transaction broadcast
|
|
20
|
+
* outright on those browsers.
|
|
21
|
+
*/
|
|
22
|
+
export declare function combineAbortSignals(signals: AbortSignal[]): CombinedAbortSignal;
|
|
23
|
+
//# sourceMappingURL=abortSignals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abortSignals.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/utils/abortSignals.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,WAAW,CAAC;IACpB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,EAAE,GACrB,mBAAmB,CAqBrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../../validation-CDbOaDj7.cjs"),_=require("../../../signing-Bnsro0hE.cjs"),e=require("../../../waitForTransactionReceiptSmartAware-AgZ-3WV_.cjs"),t=require("../../../fundPeginTransaction-BLD8FRL9.cjs"),T=require("../../../reservation-ClEs2X0H.cjs"),E=require("../../../bitcoin-CHfKAhcI.cjs");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.combineAbortSignals=a.combineAbortSignals;exports.createTaprootScriptPathSignOptions=_.createTaprootScriptPathSignOptions;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.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=T.UtxoNotAvailableError;exports.assertUtxosAvailable=T.assertUtxosAvailable;exports.extractInputsFromTransaction=T.extractInputsFromTransaction;exports.findOverlappingPendingVaults=T.findOverlappingPendingVaults;exports.validateUtxosAvailable=T.validateUtxosAvailable;exports.getNetwork=E.getNetwork;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC"}
|