@babylonlabs-io/ts-sdk 0.28.1 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/PeginManager-DcjXiKYC.cjs +2 -0
  2. package/dist/PeginManager-DcjXiKYC.cjs.map +1 -0
  3. package/dist/{PeginManager-DzMSIQ0I.js → PeginManager-Dj6oDaH5.js} +622 -580
  4. package/dist/PeginManager-Dj6oDaH5.js.map +1 -0
  5. package/dist/index.cjs +1 -1
  6. package/dist/index.js +1 -1
  7. package/dist/tbv/core/index.cjs +1 -1
  8. package/dist/tbv/core/index.js +1 -1
  9. package/dist/tbv/core/managers/PeginManager.d.ts +17 -14
  10. package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
  11. package/dist/tbv/core/managers/pegin/__tests__/assertAuthAnchorOpReturn.test.d.ts +2 -0
  12. package/dist/tbv/core/managers/pegin/__tests__/assertAuthAnchorOpReturn.test.d.ts.map +1 -0
  13. package/dist/tbv/core/managers/pegin/__tests__/expandPerVaultSecrets.test.d.ts +2 -0
  14. package/dist/tbv/core/managers/pegin/__tests__/expandPerVaultSecrets.test.d.ts.map +1 -0
  15. package/dist/tbv/core/managers/pegin/__tests__/normalizeWalletInputs.test.d.ts +2 -0
  16. package/dist/tbv/core/managers/pegin/__tests__/normalizeWalletInputs.test.d.ts.map +1 -0
  17. package/dist/tbv/core/managers/pegin/__tests__/signPsbtsWithFallback.test.d.ts +2 -0
  18. package/dist/tbv/core/managers/pegin/__tests__/signPsbtsWithFallback.test.d.ts.map +1 -0
  19. package/dist/tbv/core/managers/pegin/assertAuthAnchorOpReturn.d.ts +25 -0
  20. package/dist/tbv/core/managers/pegin/assertAuthAnchorOpReturn.d.ts.map +1 -0
  21. package/dist/tbv/core/managers/pegin/expandPerVaultSecrets.d.ts +25 -0
  22. package/dist/tbv/core/managers/pegin/expandPerVaultSecrets.d.ts.map +1 -0
  23. package/dist/tbv/core/managers/pegin/index.d.ts +12 -0
  24. package/dist/tbv/core/managers/pegin/index.d.ts.map +1 -0
  25. package/dist/tbv/core/managers/pegin/normalizeWalletInputs.d.ts +23 -0
  26. package/dist/tbv/core/managers/pegin/normalizeWalletInputs.d.ts.map +1 -0
  27. package/dist/tbv/core/managers/pegin/signPsbtsWithFallback.d.ts +12 -0
  28. package/dist/tbv/core/managers/pegin/signPsbtsWithFallback.d.ts.map +1 -0
  29. package/dist/tbv/index.cjs +1 -1
  30. package/dist/tbv/index.js +1 -1
  31. package/package.json +1 -1
  32. package/dist/PeginManager-Da4uSHzl.cjs +0 -2
  33. package/dist/PeginManager-Da4uSHzl.cjs.map +0 -1
  34. package/dist/PeginManager-DzMSIQ0I.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PeginManager.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/PeginManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAmB,MAAM,yBAAyB,CAAC;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,EAQL,KAAK,OAAO,EACb,MAAM,eAAe,CAAC;AAUvB,OAAO,EAOL,KAAK,IAAI,EAEV,MAAM,UAAU,CAAC;AAgFlB;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC;IAEzB;;;OAGG;IACH,SAAS,EAAE,YAAY,CAAC;IAExB;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC;IAEhB;;OAEG;IACH,cAAc,EAAE;QACd;;WAEG;QACH,gBAAgB,EAAE,OAAO,CAAC;KAC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oBAAoB;IACnC,sEAAsE;IACtE,OAAO,EAAE,GAAG,CAAC;IACb,qCAAqC;IACrC,WAAW,EAAE,GAAG,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,gCAAgC;IAChC,SAAS,EAAE,GAAG,CAAC;IACf,uDAAuD;IACvD,MAAM,EAAE,oBAAoB,EAAE,CAAC;CAChC;AAmED,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;;OAIG;gBACS,MAAM,EAAE,kBAAkB;IAItC;;;;;;;;OAQG;IACG,YAAY,CAChB,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC;IAuG9B;;;;;;;;;;;;;;;OAeG;YACW,aAAa;IA2C3B,uEAAuE;YACzD,kBAAkB;IAkJhC;;;;;;;;;;;;;;OAcG;IACG,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC;IAuHvE;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,oBAAoB,CACxB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC;IAqJ/B;;;;;;;;;OASG;IACG,yBAAyB,CAC7B,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,wBAAwB,CAAC;IAuJpC;;;;;OAKG;YACW,gBAAgB;IAsB9B;;;;;;OAMG;YACW,yBAAyB;IAmCvC;;;;;OAKG;IACG,qBAAqB,IAAI,OAAO,CAAC,YAAY,CAAC;YAyBtC,yBAAyB;IAkBvC;;;;OAIG;IACH,UAAU,IAAI,OAAO;IAIrB;;;;OAIG;IACH,uBAAuB,IAAI,OAAO;CAGnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=assertAuthAnchorOpReturn.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertAuthAnchorOpReturn.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/managers/pegin/__tests__/assertAuthAnchorOpReturn.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=expandPerVaultSecrets.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expandPerVaultSecrets.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/managers/pegin/__tests__/expandPerVaultSecrets.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=normalizeWalletInputs.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeWalletInputs.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/managers/pegin/__tests__/normalizeWalletInputs.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=signPsbtsWithFallback.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signPsbtsWithFallback.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/managers/pegin/__tests__/signPsbtsWithFallback.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Structural verifier for the auth-anchor OP_RETURN in a funded
3
+ * Pre-PegIn transaction.
4
+ *
5
+ * @module managers/pegin/assertAuthAnchorOpReturn
6
+ */
7
+ /**
8
+ * Verify the broadcast Pre-PegIn carries the expected OP_RETURN
9
+ * commitment to the auth anchor.
10
+ *
11
+ * The OP_RETURN sits at `vout = vaultCount` (right after the per-vault
12
+ * HTLC outputs and before the depositor-claim/change outputs) and
13
+ * pushes the 32-byte `SHA256(authAnchor)`. The script encoding is
14
+ * exactly `OP_RETURN || PUSH32 || <32 bytes>` (34 bytes). A
15
+ * non-conformant WASM build that omitted the OP_RETURN, swapped its
16
+ * position, or changed its push payload would let the depositor
17
+ * obtain a valid bearer token for a Pre-PegIn whose on-chain
18
+ * commitment doesn't actually bind the anchor — degrading the auth
19
+ * from on-chain-bound to a shared secret. Fail closed.
20
+ *
21
+ * @throws If the OP_RETURN is missing, mis-located, mis-encoded, or
22
+ * pushes a payload other than `expectedAuthAnchorHashHex`.
23
+ */
24
+ export declare function assertAuthAnchorOpReturn(fundedPrePeginTxHex: string, vaultCount: number, expectedAuthAnchorHashHex: string): void;
25
+ //# sourceMappingURL=assertAuthAnchorOpReturn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertAuthAnchorOpReturn.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/managers/pegin/assertAuthAnchorOpReturn.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,mBAAmB,EAAE,MAAM,EAC3B,UAAU,EAAE,MAAM,EAClB,yBAAyB,EAAE,MAAM,GAChC,IAAI,CAwCN"}
@@ -0,0 +1,25 @@
1
+ import { Hex } from 'viem';
2
+ import { WotsBlockPublicKey } from '../../clients/vault-provider/types';
3
+ /**
4
+ * Result of {@link expandPerVaultSecrets}.
5
+ */
6
+ export interface PerVaultExpansionResult {
7
+ perVaultWotsKeys: WotsBlockPublicKey[][];
8
+ /** Keccak256 of WOTS keys, ready as `depositorWotsPkHash` (0x-prefixed). */
9
+ wotsPkHashes: Hex[];
10
+ /** HTLC preimage hex per vault (no 0x prefix). */
11
+ htlcSecretHexes: string[];
12
+ /** SHA-256 of each HTLC preimage as 64-char hex (no 0x prefix). */
13
+ hashlocks: string[];
14
+ }
15
+ /**
16
+ * Derive per-vault WOTS keys + HTLC preimages from the wallet root.
17
+ *
18
+ * Takes ownership of `root`: zeros the buffer (and per-vault secret
19
+ * buffers) before returning, regardless of how the caller exits.
20
+ *
21
+ * @param root 32-byte wallet-derived root from `deriveVaultRoot`.
22
+ * @param vaultCount Number of vaults (= length of `amounts`).
23
+ */
24
+ export declare function expandPerVaultSecrets(root: Uint8Array, vaultCount: number): Promise<PerVaultExpansionResult>;
25
+ //# sourceMappingURL=expandPerVaultSecrets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expandPerVaultSecrets.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/managers/pegin/expandPerVaultSecrets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAe7E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,gBAAgB,EAAE,kBAAkB,EAAE,EAAE,CAAC;IACzC,4EAA4E;IAC5E,YAAY,EAAE,GAAG,EAAE,CAAC;IACpB,kDAAkD;IAClD,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,mEAAmE;IACnE,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,uBAAuB,CAAC,CA+BlC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Internal-only re-exports for the Pre-PegIn / PegIn building blocks.
3
+ * Consumers should depend on `PeginManager`; these helpers exist to
4
+ * keep that file a thin coordinator.
5
+ *
6
+ * @module managers/pegin
7
+ */
8
+ export { assertAuthAnchorOpReturn } from './assertAuthAnchorOpReturn';
9
+ export { expandPerVaultSecrets, type PerVaultExpansionResult, } from './expandPerVaultSecrets';
10
+ export { normalizePopSignature, normalizeXOnlyPubkey, } from './normalizeWalletInputs';
11
+ export { signPsbtsWithFallback } from './signPsbtsWithFallback';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/managers/pegin/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,qBAAqB,EACrB,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { Hex } from 'viem';
2
+ /**
3
+ * Normalize a wallet-returned BTC public key to the canonical x-only
4
+ * 64-char lowercase hex form (no 0x prefix).
5
+ *
6
+ * Throws on empty/non-string input. Idempotent on x-only input.
7
+ */
8
+ export declare function normalizeXOnlyPubkey(raw: unknown): string;
9
+ /**
10
+ * Normalize a wallet-returned BIP-322 signature into 0x-prefixed hex.
11
+ *
12
+ * Accepts:
13
+ * - 0x-prefixed lowercase/uppercase hex
14
+ * - unprefixed hex (wins over base64 when input is pure `[0-9a-fA-F]+`)
15
+ * - canonical standard base64 (`[A-Za-z0-9+/]` with `=` padding to a
16
+ * multiple of 4 and no non-canonical encodings)
17
+ *
18
+ * Rejects URL-safe base64 (`-`/`_`) and base64 without padding. Wallets
19
+ * known to return BIP-322 signatures (Keystone, UniSat, OKX, OneKey,
20
+ * Unisat) all use standard base64; URL-safe is an explicit non-goal.
21
+ */
22
+ export declare function normalizePopSignature(raw: unknown): Hex;
23
+ //# sourceMappingURL=normalizeWalletInputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeWalletInputs.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/managers/pegin/normalizeWalletInputs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAQhC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAQzD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,CAoCvD"}
@@ -0,0 +1,12 @@
1
+ import { BitcoinWallet, SignPsbtOptions } from '../../../../shared/wallets';
2
+ /**
3
+ * Sign multiple PSBTs against a wallet. Wallets exposing native batch
4
+ * signing (e.g. UniSat) sign all PSBTs in a single interaction; others
5
+ * (Ledger, AppKit) loop `signPsbt` internally, so the popup UX depends
6
+ * on the wallet adapter.
7
+ *
8
+ * @throws If `signPsbts` returns a different number of signed PSBTs
9
+ * than were submitted.
10
+ */
11
+ export declare function signPsbtsWithFallback(wallet: BitcoinWallet, psbtsHexes: string[], options: SignPsbtOptions[]): Promise<string[]>;
12
+ //# sourceMappingURL=signPsbtsWithFallback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signPsbtsWithFallback.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/managers/pegin/signPsbtsWithFallback.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAChB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,EAAE,EACpB,OAAO,EAAE,eAAe,EAAE,GACzB,OAAO,CAAC,MAAM,EAAE,CAAC,CAiBnB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../challengeAssert-BM8m9gPM.cjs"),P=require("@babylonlabs-io/babylon-tbv-rust-wasm"),d=require("../payout-DP6KMFP1.cjs"),o=require("../bitcoin-DIN0OupO.cjs"),l=require("../signing-DHSXjhLM.cjs"),u=require("../validation-u8W7Lp2x.cjs"),t=require("../buildAndBroadcastRefund-DkEpTFkv.cjs"),a=require("../fundPeginTransaction-DaWoYCgO.cjs"),i=require("../psbtInputFields-CB8hqjQ5.cjs"),r=require("../PeginManager-Da4uSHzl.cjs"),e=require("../vault-registry-reader-DdruADqa.cjs"),s=require("../types-jmEyzzhY.cjs");exports.buildChallengeAssertPsbt=n.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=n.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=n.buildNoPayoutPsbt;exports.buildPeginInputPsbt=n.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=n.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=n.buildPrePeginPsbt;exports.computeNumLocalChallengers=n.computeNumLocalChallengers;exports.extractPeginInputSignature=n.extractPeginInputSignature;exports.finalizePeginInputPsbt=n.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>P.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>P.deriveVaultId});exports.buildPayoutPsbt=d.buildPayoutPsbt;exports.buildRefundPsbt=d.buildRefundPsbt;exports.createPayoutScript=d.createPayoutScript;exports.extractPayoutSignature=d.extractPayoutSignature;exports.deriveNativeSegwitAddress=o.deriveNativeSegwitAddress;exports.deriveTaprootAddress=o.deriveTaprootAddress;exports.ensureHexPrefix=o.ensureHexPrefix;exports.formatSatoshisToBtc=o.formatSatoshisToBtc;exports.getNetwork=o.getNetwork;exports.hexToUint8Array=o.hexToUint8Array;exports.isAddressFromPublicKey=o.isAddressFromPublicKey;exports.isValidHex=o.isValidHex;exports.processPublicKeyToXOnly=o.processPublicKeyToXOnly;exports.stripHexPrefix=o.stripHexPrefix;exports.toXOnly=o.toXOnly;exports.uint8ArrayToHex=o.uint8ArrayToHex;exports.validateWalletPubkey=o.validateWalletPubkey;exports.ContractStatus=l.ContractStatus;exports.PeginAction=l.PeginAction;exports.canPerformAction=l.canPerformAction;exports.createTaprootScriptPathSignOptions=l.createTaprootScriptPathSignOptions;exports.getPeginProtocolState=l.getPeginProtocolState;exports.BITCOIN_ADDRESS_RE=u.BITCOIN_ADDRESS_RE;exports.HEX_RE=u.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=u.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=u.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=u.TXID_RE;exports.BIP68NotMatureError=t.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=t.ClaimerPegoutStatusValue;exports.PayoutManager=t.PayoutManager;exports.activateVault=t.activateVault;exports.buildAndBroadcastRefund=t.buildAndBroadcastRefund;exports.computeHashlock=t.computeHashlock;exports.isDepositAmountValid=t.isDepositAmountValid;exports.isPegoutTerminalStatus=t.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=t.isRecognizedPegoutStatus;exports.pollAndSignPayouts=t.pollAndSignPayouts;exports.signDepositorGraph=t.signDepositorGraph;exports.submitWotsPublicKey=t.submitWotsPublicKey;exports.validateDepositAmount=t.validateDepositAmount;exports.validateMultiVaultDepositInputs=t.validateMultiVaultDepositInputs;exports.validateProviderSelection=t.validateProviderSelection;exports.validateRemainingCapacity=t.validateRemainingCapacity;exports.validateSecretAgainstHashlock=t.validateSecretAgainstHashlock;exports.validateVaultAmounts=t.validateVaultAmounts;exports.validateVaultProviderPubkey=t.validateVaultProviderPubkey;exports.waitForPeginStatus=t.waitForPeginStatus;exports.BTC_DUST_SAT=a.BTC_DUST_SAT;exports.DUST_THRESHOLD=a.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=a.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=a.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=a.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=a.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=a.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=a.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=a.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=a.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=a.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=a.fundPeginTransaction;exports.parseUnfundedWasmTransaction=a.parseUnfundedWasmTransaction;exports.peginOutputCount=a.peginOutputCount;exports.rateBasedTxBufferFee=a.rateBasedTxBufferFee;exports.BitcoinScriptType=i.BitcoinScriptType;exports.UtxoNotAvailableError=i.UtxoNotAvailableError;exports.assertUtxosAvailable=i.assertUtxosAvailable;exports.calculateBtcTxHash=i.calculateBtcTxHash;exports.collectReservedUtxoRefs=i.collectReservedUtxoRefs;exports.extractInputsFromTransaction=i.extractInputsFromTransaction;exports.getDustThreshold=i.getDustThreshold;exports.getPsbtInputFields=i.getPsbtInputFields;exports.getScriptType=i.getScriptType;exports.selectUtxosForDeposit=i.selectUtxosForDeposit;exports.selectUtxosForPegin=i.selectUtxosForPegin;exports.shouldAddChangeOutput=i.shouldAddChangeOutput;exports.validateUtxosAvailable=i.validateUtxosAvailable;exports.CONTRACT_ERRORS=r.CONTRACT_ERRORS;exports.PeginManager=r.PeginManager;exports.VAULT_APP_NAME=r.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=r.buildFundingOutpointsCommitment;exports.buildVaultContext=r.buildVaultContext;exports.computeWotsBlockPublicKeysHash=r.computeWotsBlockPublicKeysHash;exports.deriveVaultRoot=r.deriveVaultRoot;exports.deriveWotsBlocksFromSeed=r.deriveWotsBlocksFromSeed;exports.expandAuthAnchor=r.expandAuthAnchor;exports.expandHashlockSecret=r.expandHashlockSecret;exports.expandWotsSeed=r.expandWotsSeed;exports.extractErrorData=r.extractErrorData;exports.getContractErrorMessage=r.getContractErrorMessage;exports.handleContractError=r.handleContractError;exports.isKnownContractError=r.isKnownContractError;exports.isWotsMismatchError=r.isWotsMismatchError;exports.ApplicationRegistryABI=e.ApplicationRegistryABI;exports.MEMPOOL_API_URLS=e.MEMPOOL_API_URLS;exports.ProtocolParamsABI=e.ProtocolParamsABI;exports.ServerIdentityError=e.ServerIdentityError;exports.VaultProviderRpcClient=e.VaultProviderRpcClient;exports.ViemProtocolParamsReader=e.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=e.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=e.ViemVaultKeeperReader;exports.ViemVaultRegistryReader=e.ViemVaultRegistryReader;exports.VpResponseValidationError=e.VpResponseValidationError;exports.VpTokenProvider=e.VpTokenProvider;exports.getAddressTxs=e.getAddressTxs;exports.getAddressUtxos=e.getAddressUtxos;exports.getMempoolApiUrl=e.getMempoolApiUrl;exports.getNetworkFees=e.getNetworkFees;exports.getTxHex=e.getTxHex;exports.getTxInfo=e.getTxInfo;exports.getUtxoInfo=e.getUtxoInfo;exports.pushTx=e.pushTx;exports.resolveProtocolAddresses=e.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=e.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=e.verifyServerIdentity;exports.BTCVaultRegistryABI=s.BTCVaultRegistryABI;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_TERMINAL_STATUSES=s.VP_TERMINAL_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../challengeAssert-BM8m9gPM.cjs"),P=require("@babylonlabs-io/babylon-tbv-rust-wasm"),d=require("../payout-DP6KMFP1.cjs"),o=require("../bitcoin-DIN0OupO.cjs"),l=require("../signing-DHSXjhLM.cjs"),u=require("../validation-u8W7Lp2x.cjs"),t=require("../buildAndBroadcastRefund-DkEpTFkv.cjs"),a=require("../fundPeginTransaction-DaWoYCgO.cjs"),i=require("../psbtInputFields-CB8hqjQ5.cjs"),r=require("../PeginManager-DcjXiKYC.cjs"),e=require("../vault-registry-reader-DdruADqa.cjs"),s=require("../types-jmEyzzhY.cjs");exports.buildChallengeAssertPsbt=n.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=n.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=n.buildNoPayoutPsbt;exports.buildPeginInputPsbt=n.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=n.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=n.buildPrePeginPsbt;exports.computeNumLocalChallengers=n.computeNumLocalChallengers;exports.extractPeginInputSignature=n.extractPeginInputSignature;exports.finalizePeginInputPsbt=n.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>P.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>P.deriveVaultId});exports.buildPayoutPsbt=d.buildPayoutPsbt;exports.buildRefundPsbt=d.buildRefundPsbt;exports.createPayoutScript=d.createPayoutScript;exports.extractPayoutSignature=d.extractPayoutSignature;exports.deriveNativeSegwitAddress=o.deriveNativeSegwitAddress;exports.deriveTaprootAddress=o.deriveTaprootAddress;exports.ensureHexPrefix=o.ensureHexPrefix;exports.formatSatoshisToBtc=o.formatSatoshisToBtc;exports.getNetwork=o.getNetwork;exports.hexToUint8Array=o.hexToUint8Array;exports.isAddressFromPublicKey=o.isAddressFromPublicKey;exports.isValidHex=o.isValidHex;exports.processPublicKeyToXOnly=o.processPublicKeyToXOnly;exports.stripHexPrefix=o.stripHexPrefix;exports.toXOnly=o.toXOnly;exports.uint8ArrayToHex=o.uint8ArrayToHex;exports.validateWalletPubkey=o.validateWalletPubkey;exports.ContractStatus=l.ContractStatus;exports.PeginAction=l.PeginAction;exports.canPerformAction=l.canPerformAction;exports.createTaprootScriptPathSignOptions=l.createTaprootScriptPathSignOptions;exports.getPeginProtocolState=l.getPeginProtocolState;exports.BITCOIN_ADDRESS_RE=u.BITCOIN_ADDRESS_RE;exports.HEX_RE=u.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=u.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=u.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=u.TXID_RE;exports.BIP68NotMatureError=t.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=t.ClaimerPegoutStatusValue;exports.PayoutManager=t.PayoutManager;exports.activateVault=t.activateVault;exports.buildAndBroadcastRefund=t.buildAndBroadcastRefund;exports.computeHashlock=t.computeHashlock;exports.isDepositAmountValid=t.isDepositAmountValid;exports.isPegoutTerminalStatus=t.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=t.isRecognizedPegoutStatus;exports.pollAndSignPayouts=t.pollAndSignPayouts;exports.signDepositorGraph=t.signDepositorGraph;exports.submitWotsPublicKey=t.submitWotsPublicKey;exports.validateDepositAmount=t.validateDepositAmount;exports.validateMultiVaultDepositInputs=t.validateMultiVaultDepositInputs;exports.validateProviderSelection=t.validateProviderSelection;exports.validateRemainingCapacity=t.validateRemainingCapacity;exports.validateSecretAgainstHashlock=t.validateSecretAgainstHashlock;exports.validateVaultAmounts=t.validateVaultAmounts;exports.validateVaultProviderPubkey=t.validateVaultProviderPubkey;exports.waitForPeginStatus=t.waitForPeginStatus;exports.BTC_DUST_SAT=a.BTC_DUST_SAT;exports.DUST_THRESHOLD=a.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=a.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=a.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=a.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=a.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=a.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=a.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=a.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=a.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=a.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=a.fundPeginTransaction;exports.parseUnfundedWasmTransaction=a.parseUnfundedWasmTransaction;exports.peginOutputCount=a.peginOutputCount;exports.rateBasedTxBufferFee=a.rateBasedTxBufferFee;exports.BitcoinScriptType=i.BitcoinScriptType;exports.UtxoNotAvailableError=i.UtxoNotAvailableError;exports.assertUtxosAvailable=i.assertUtxosAvailable;exports.calculateBtcTxHash=i.calculateBtcTxHash;exports.collectReservedUtxoRefs=i.collectReservedUtxoRefs;exports.extractInputsFromTransaction=i.extractInputsFromTransaction;exports.getDustThreshold=i.getDustThreshold;exports.getPsbtInputFields=i.getPsbtInputFields;exports.getScriptType=i.getScriptType;exports.selectUtxosForDeposit=i.selectUtxosForDeposit;exports.selectUtxosForPegin=i.selectUtxosForPegin;exports.shouldAddChangeOutput=i.shouldAddChangeOutput;exports.validateUtxosAvailable=i.validateUtxosAvailable;exports.CONTRACT_ERRORS=r.CONTRACT_ERRORS;exports.PeginManager=r.PeginManager;exports.VAULT_APP_NAME=r.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=r.buildFundingOutpointsCommitment;exports.buildVaultContext=r.buildVaultContext;exports.computeWotsBlockPublicKeysHash=r.computeWotsBlockPublicKeysHash;exports.deriveVaultRoot=r.deriveVaultRoot;exports.deriveWotsBlocksFromSeed=r.deriveWotsBlocksFromSeed;exports.expandAuthAnchor=r.expandAuthAnchor;exports.expandHashlockSecret=r.expandHashlockSecret;exports.expandWotsSeed=r.expandWotsSeed;exports.extractErrorData=r.extractErrorData;exports.getContractErrorMessage=r.getContractErrorMessage;exports.handleContractError=r.handleContractError;exports.isKnownContractError=r.isKnownContractError;exports.isWotsMismatchError=r.isWotsMismatchError;exports.ApplicationRegistryABI=e.ApplicationRegistryABI;exports.MEMPOOL_API_URLS=e.MEMPOOL_API_URLS;exports.ProtocolParamsABI=e.ProtocolParamsABI;exports.ServerIdentityError=e.ServerIdentityError;exports.VaultProviderRpcClient=e.VaultProviderRpcClient;exports.ViemProtocolParamsReader=e.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=e.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=e.ViemVaultKeeperReader;exports.ViemVaultRegistryReader=e.ViemVaultRegistryReader;exports.VpResponseValidationError=e.VpResponseValidationError;exports.VpTokenProvider=e.VpTokenProvider;exports.getAddressTxs=e.getAddressTxs;exports.getAddressUtxos=e.getAddressUtxos;exports.getMempoolApiUrl=e.getMempoolApiUrl;exports.getNetworkFees=e.getNetworkFees;exports.getTxHex=e.getTxHex;exports.getTxInfo=e.getTxInfo;exports.getUtxoInfo=e.getUtxoInfo;exports.pushTx=e.pushTx;exports.resolveProtocolAddresses=e.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=e.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=e.verifyServerIdentity;exports.BTCVaultRegistryABI=s.BTCVaultRegistryABI;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_TERMINAL_STATUSES=s.VP_TERMINAL_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/tbv/index.js CHANGED
@@ -7,7 +7,7 @@ import { B as k, H as W, K as X, M as K, T as w } from "../validation-CxqROCno.j
7
7
  import { B as Y, C as J, P as j, a as Z, m as z, h as q, i as Q, l as $, k as aa, p as sa, b as ea, s as ta, v as ra, g as oa, d as ia, c as na, j as la, e as ua, f as da, w as Pa } from "../buildAndBroadcastRefund-xWS8frc6.js";
8
8
  import { B as Ta, D as pa, F as Sa, L as Aa, M as Ea, P as _a, b as ga, a as Ra, S as ma, T as xa, W as ba, f as Ia, c as fa, p as va, r as Ca } from "../fundPeginTransaction-oV-dNJOU.js";
9
9
  import { B as Oa, U as Va, a as ha, f as ya, c as Na, e as Fa, g as Ba, i as Da, h as Ma, s as Ha, b as La, d as ka, v as Wa } from "../psbtInputFields-DeTFSJOq.js";
10
- import { C as Ka, P as wa, V as Ga, k as Ya, l as Ja, c as ja, m as Za, d as za, b as qa, f as Qa, j as $a, e as as, g as ss, h as es, i as ts, a as rs } from "../PeginManager-DzMSIQ0I.js";
10
+ import { C as Ka, P as wa, V as Ga, k as Ya, l as Ja, c as ja, m as Za, d as za, b as qa, f as Qa, j as $a, e as as, g as ss, h as es, i as ts, a as rs } from "../PeginManager-Dj6oDaH5.js";
11
11
  import { A as is, M as ns, P as ls, S as us, V as ds, k as Ps, l as cs, m as Ts, n as ps, h as Ss, j as As, g as Es, a as _s, b as gs, c as Rs, d as ms, e as xs, f as bs, p as Is, r as fs, v as vs, i as Cs } from "../vault-registry-reader-BywZhqJL.js";
12
12
  import { B as Os, D as Vs, b as hs, J as ys, a as Ns, d as Fs, P as Bs, R as Ds, c as Ms, V as Hs } from "../types-CnG3JsRs.js";
13
13
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonlabs-io/ts-sdk",
3
- "version": "0.28.1",
3
+ "version": "0.29.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,2 +0,0 @@
1
- "use strict";var zt=Object.defineProperty;var Gt=(e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var y=(e,t,n)=>Gt(e,typeof t!="symbol"?t+"":t,n);const M=require("bitcoinjs-lib"),Q=require("buffer"),H=require("viem"),at=require("@babylonlabs-io/babylon-tbv-rust-wasm"),S=require("./challengeAssert-BM8m9gPM.cjs"),d=require("./bitcoin-DIN0OupO.cjs"),Zt=require("./buildAndBroadcastRefund-DkEpTFkv.cjs"),Yt=require("./signing-DHSXjhLM.cjs"),ct=require("./validation-u8W7Lp2x.cjs"),u=require("./sha2-CsTynrfJ.cjs"),O=require("./psbtInputFields-CB8hqjQ5.cjs"),lt=require("./fundPeginTransaction-DaWoYCgO.cjs"),Tt=require("./vault-registry-reader-DdruADqa.cjs"),R=require("./types-jmEyzzhY.cjs");function Qt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Jt=Qt(M),C={"0x04aabf33":"Vault already exists: This Bitcoin transaction has already been registered. Please select different UTXOs or use a different amount to create a unique transaction.","0x4fec082d":"Script mismatch: The Bitcoin transaction's taproot output does not match the expected vault script. This may be caused by incorrect vault participants or key configuration.","0x6cc363a5":"Invalid BTC proof of possession: The signature could not be verified. Please ensure you're signing with the correct Bitcoin wallet.","0x6c3f2bf6":"Invalid BTC public key: The Bitcoin public key format is invalid.","0x2c5211c6":"Invalid amount: The deposit amount is invalid or below the minimum required.","0x0405f772":"Application not registered: The application controller is not registered in the system.","0x24e165cc":"Invalid provider status: The vault provider is not in a valid state to accept deposits.","0xd92e233d":"Zero address: One of the required addresses is the zero address.","0x65aa7007":"BTC key mismatch: The Bitcoin public key does not match the expected key.","0x82b42900":"Unauthorized: You must be the depositor or vault provider to submit this transaction.","0x8baa579f":"Invalid signature: The BTC proof of possession signature could not be verified.","0x2f9d01e9":"Invalid BTC transaction: The Bitcoin transaction format is invalid.","0x5a3c6b3e":"Vault provider not registered: The selected vault provider is not registered.","0x979f4518":"Invalid pegin fee: The ETH fee sent does not match the required amount. This may indicate a fee rate change during the transaction.","0x5fad9694":"This pre-pegin output has already been used to activate another vault.","0x7ed061c9":"This pegin transaction has already been used to activate another vault."};function X(e){if(!e||typeof e!="object")return;const t=e;if(typeof t.data=="string"&&t.data.startsWith("0x"))return t.data;if(typeof t.details=="string"&&t.details.startsWith("0x"))return t.details;let n=t.cause,s=0;const o=5;for(;n&&typeof n=="object"&&s<o;){const a=n;if(typeof a.data=="string"&&a.data.startsWith("0x"))return a.data;n=a.cause,s++}const i=(typeof t.message=="string"?t.message:"").match(/\b(0x[a-fA-F0-9]{8})\b/);if(i)return i[1]}function te(e){const t=X(e);if(t){const n=t.substring(0,10);return C[t]??C[n]}}function ee(e){const t=X(e);if(t===void 0)return!1;const n=t.substring(0,10);return t in C||n in C}function A(e){console.error("[Contract Error] Raw error:",e);const t=X(e);if(console.error("[Contract Error] Extracted error data:",t),t){const s=t.substring(0,10),o=C[t]??C[s];if(o)throw console.error("[Contract Error] Known error:",o),new Error(o)}const n=(e==null?void 0:e.message)||"";if(n.includes("gas limit too high")||n.includes("21000000")||n.includes("Internal JSON-RPC error")){const s=t?` (error code: ${t})`:"";throw console.error("[Contract Error] Transaction rejected. Error code:",t,"Message:",n),new Error(`Transaction failed: The contract rejected this transaction${s}. Possible causes: (1) Vault already exists for this transaction, (2) Invalid signature, (3) Unauthorized caller. Please check your transaction parameters and try again.`)}throw e instanceof Error?(console.error("[Contract Error] Unhandled error:",e.message),e):new Error(`Contract call failed: ${String(e)}`)}const V=BigInt(2**32-1),ut=BigInt(32);function ne(e,t=!1){return t?{h:Number(e&V),l:Number(e>>ut&V)}:{h:Number(e>>ut&V)|0,l:Number(e&V)|0}}function se(e,t=!1){const n=e.length;let s=new Uint32Array(n),o=new Uint32Array(n);for(let r=0;r<n;r++){const{h:i,l:a}=ne(e[r],t);[s[r],o[r]]=[i,a]}return[s,o]}const oe=(e,t,n)=>e<<n|t>>>32-n,re=(e,t,n)=>t<<n|e>>>32-n,ie=(e,t,n)=>t<<n-32|e>>>64-n,ae=(e,t,n)=>e<<n-32|t>>>64-n;class kt{constructor(t,n){y(this,"oHash");y(this,"iHash");y(this,"blockLen");y(this,"outputLen");y(this,"finished",!1);y(this,"destroyed",!1);if(u.ahash(t),u.abytes(n,void 0,"key"),this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(n.length>s?t.create().update(n).digest():n);for(let r=0;r<o.length;r++)o[r]^=54;this.iHash.update(o),this.oHash=t.create();for(let r=0;r<o.length;r++)o[r]^=106;this.oHash.update(o),u.clean(o)}update(t){return u.aexists(this),this.iHash.update(t),this}digestInto(t){u.aexists(this),u.abytes(t,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:s,finished:o,destroyed:r,blockLen:i,outputLen:a}=this;return t=t,t.finished=o,t.destroyed=r,t.blockLen=i,t.outputLen=a,t.oHash=n._cloneInto(t.oHash),t.iHash=s._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const _t=(e,t,n)=>new kt(e,t).update(n).digest();_t.create=(e,t)=>new kt(e,t);const q=Uint8Array.of(0),ht=Uint8Array.of();function nt(e,t,n,s=32){u.ahash(e),u.anumber(s,"length");const o=e.outputLen;if(s>255*o)throw new Error("Length must be <= 255*HashLen");const r=Math.ceil(s/o);n===void 0?n=ht:u.abytes(n,void 0,"info");const i=new Uint8Array(r*o),a=_t.create(e,t),l=a._cloneInto(),h=new Uint8Array(a.outputLen);for(let c=0;c<r;c++)q[0]=c+1,l.update(c===0?ht:h).update(n).update(q).digestInto(h),i.set(h,o*c),a._cloneInto(l);return a.destroy(),l.destroy(),u.clean(h,q),i.slice(0,s)}const j=new TextEncoder().encode("babylonvault"),dt=255,ft=65535,gt=2,ce="hashlock",le="auth-anchor",ue="wots-seed";function vt(e){if(!Number.isInteger(e)||e<0||e>4294967295)throw new Error(`i2osp4: value must be a u32, got ${e}`);const t=new Uint8Array(4);return t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t}function st(e,t=new Uint8Array(0)){const n=new TextEncoder().encode(e);if(n.length===0||n.length>dt)throw new Error(`info: label length must be in [1, ${dt}], got ${n.length}`);if(t.length>ft)throw new Error(`info: ctx length must be in [0, ${ft}], got ${t.length}`);const s=j.length+1+n.length+gt+t.length,o=new Uint8Array(s);let r=0;return o.set(j,r),r+=j.length,o[r]=n.length,r+=1,o.set(n,r),r+=n.length,o[r]=t.length>>>8&255,o[r+1]=t.length&255,r+=gt,o.set(t,r),o}const pt=32,he=32,de=32,fe=64;function ot(e){if(e.length!==pt)throw new Error(`vault-secrets: root must be exactly ${pt} bytes, got ${e.length}`)}function ge(e){return ot(e),nt(u.sha256,e,st(le),he)}function Ht(e,t){return ot(e),nt(u.sha256,e,st(ce,vt(t)),de)}function Bt(e,t){return ot(e),nt(u.sha256,e,st(ue,vt(t)),fe)}const L=32,z=32,J=36,It=32,F=4,pe=F+L+F+It;function tt(e,t,n){e[t]=n>>>24&255,e[t+1]=n>>>16&255,e[t+2]=n>>>8&255,e[t+3]=n&255}function me(e){if(e.txid.length!==z)throw new Error(`outpoint.txid must be exactly ${z} bytes, got ${e.txid.length}`);if(!Number.isInteger(e.vout)||e.vout<0||e.vout>4294967295)throw new Error(`outpoint.vout must be a u32, got ${e.vout}`);const t=new Uint8Array(J);return t.set(e.txid,0),tt(t,z,e.vout),t}function mt(e,t){const n=Math.min(e.length,t.length);for(let s=0;s<n;s++)if(e[s]!==t[s])return e[s]-t[s];return e.length-t.length}function At(e){if(e.length===0)throw new Error("buildFundingOutpointsCommitment: outpoints must be non-empty");const t=e.map(me);t.sort(mt);for(let s=1;s<t.length;s++)if(mt(t[s-1],t[s])===0)throw new Error("buildFundingOutpointsCommitment: duplicate outpoint detected");const n=new Uint8Array(t.length*J);for(let s=0;s<t.length;s++)n.set(t[s],s*J);return u.sha256(n)}function Ct(e){if(e.depositorBtcPubkey.length!==L)throw new Error(`vaultContext: depositorBtcPubkey must be exactly ${L} bytes, got ${e.depositorBtcPubkey.length}`);const t=At(e.fundingOutpoints),n=new Uint8Array(pe);let s=0;return tt(n,s,L),s+=F,n.set(e.depositorBtcPubkey,s),s+=L,tt(n,s,It),s+=F,n.set(t,s),n}const St="babylon-vault",Ot=32,bt=Ot*2,be=/^[0-9a-f]+$/;async function Rt(e,t){const n=Ct(t),s=d.uint8ArrayToHex(n),o=await e.deriveContextHash(St,s);if(typeof o!="string")throw new Error(`deriveVaultRoot: wallet must return a string, got ${typeof o}`);if(o.length!==bt)throw new Error(`deriveVaultRoot: wallet must return a ${bt}-character hex string (${Ot} bytes), got length ${o.length}`);if(!be.test(o))throw new Error("deriveVaultRoot: wallet must return lowercase hex per derive-context-hash.md §2.1; got value with non-lowercase or non-hex characters");return d.hexToUint8Array(o)}const xe=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),$t=Uint8Array.from(new Array(16).fill(0).map((e,t)=>t)),ye=$t.map(e=>(9*e+5)%16),Ut=(()=>{const n=[[$t],[ye]];for(let s=0;s<4;s++)for(let o of n)o.push(o[s].map(r=>xe[r]));return n})(),Lt=Ut[0],Vt=Ut[1],Wt=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>Uint8Array.from(e)),we=Lt.map((e,t)=>e.map(n=>Wt[t][n])),Pe=Vt.map((e,t)=>e.map(n=>Wt[t][n])),Ee=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),Te=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function xt(e,t,n,s){return e===0?t^n^s:e===1?t&n|~t&s:e===2?(t|~n)^s:e===3?t&s|n&~s:t^(n|~s)}const W=new Uint32Array(16);class ke extends u.HashMD{constructor(){super(64,20,8,!0);y(this,"h0",1732584193);y(this,"h1",-271733879);y(this,"h2",-1732584194);y(this,"h3",271733878);y(this,"h4",-1009589776)}get(){const{h0:n,h1:s,h2:o,h3:r,h4:i}=this;return[n,s,o,r,i]}set(n,s,o,r,i){this.h0=n|0,this.h1=s|0,this.h2=o|0,this.h3=r|0,this.h4=i|0}process(n,s){for(let b=0;b<16;b++,s+=4)W[b]=n.getUint32(s,!0);let o=this.h0|0,r=o,i=this.h1|0,a=i,l=this.h2|0,h=l,c=this.h3|0,P=c,m=this.h4|0,f=m;for(let b=0;b<5;b++){const v=4-b,T=Ee[b],B=Te[b],g=Lt[b],E=Vt[b],p=we[b],x=Pe[b];for(let w=0;w<16;w++){const k=u.rotl(o+xt(b,i,l,c)+W[g[w]]+T,p[w])+m|0;o=m,m=c,c=u.rotl(l,10)|0,l=i,i=k}for(let w=0;w<16;w++){const k=u.rotl(r+xt(v,a,h,P)+W[E[w]]+B,x[w])+f|0;r=f,f=P,P=u.rotl(h,10)|0,h=a,a=k}}this.set(this.h1+l+P|0,this.h2+c+f|0,this.h3+m+r|0,this.h4+o+a|0,this.h0+i+h|0)}roundClean(){u.clean(W)}destroy(){this.destroyed=!0,u.clean(this.buffer),this.set(0,0,0,0,0)}}const _e=u.createHasher(()=>new ke),ve=BigInt(0),$=BigInt(1),He=BigInt(2),Be=BigInt(7),Ie=BigInt(256),Ae=BigInt(113),Nt=[],Mt=[],Ft=[];for(let e=0,t=$,n=1,s=0;e<24;e++){[n,s]=[s,(2*n+3*s)%5],Nt.push(2*(5*s+n)),Mt.push((e+1)*(e+2)/2%64);let o=ve;for(let r=0;r<7;r++)t=(t<<$^(t>>Be)*Ae)%Ie,t&He&&(o^=$<<($<<BigInt(r))-$);Ft.push(o)}const Xt=se(Ft,!0),Ce=Xt[0],Se=Xt[1],yt=(e,t,n)=>n>32?ie(e,t,n):oe(e,t,n),wt=(e,t,n)=>n>32?ae(e,t,n):re(e,t,n);function Oe(e,t=24){const n=new Uint32Array(10);for(let s=24-t;s<24;s++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const a=(i+8)%10,l=(i+2)%10,h=n[l],c=n[l+1],P=yt(h,c,1)^n[a],m=wt(h,c,1)^n[a+1];for(let f=0;f<50;f+=10)e[i+f]^=P,e[i+f+1]^=m}let o=e[2],r=e[3];for(let i=0;i<24;i++){const a=Mt[i],l=yt(o,r,a),h=wt(o,r,a),c=Nt[i];o=e[c],r=e[c+1],e[c]=l,e[c+1]=h}for(let i=0;i<50;i+=10){for(let a=0;a<10;a++)n[a]=e[i+a];for(let a=0;a<10;a++)e[i+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=Ce[s],e[1]^=Se[s]}u.clean(n)}class rt{constructor(t,n,s,o=!1,r=24){y(this,"state");y(this,"pos",0);y(this,"posOut",0);y(this,"finished",!1);y(this,"state32");y(this,"destroyed",!1);y(this,"blockLen");y(this,"suffix");y(this,"outputLen");y(this,"enableXOF",!1);y(this,"rounds");if(this.blockLen=t,this.suffix=n,this.outputLen=s,this.enableXOF=o,this.rounds=r,u.anumber(s,"outputLen"),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=u.u32(this.state)}clone(){return this._cloneInto()}keccak(){u.swap32IfBE(this.state32),Oe(this.state32,this.rounds),u.swap32IfBE(this.state32),this.posOut=0,this.pos=0}update(t){u.aexists(this),u.abytes(t);const{blockLen:n,state:s}=this,o=t.length;for(let r=0;r<o;){const i=Math.min(n-this.pos,o-r);for(let a=0;a<i;a++)s[this.pos++]^=t[r++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:s,blockLen:o}=this;t[s]^=n,(n&128)!==0&&s===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){u.aexists(this,!1),u.abytes(t),this.finish();const n=this.state,{blockLen:s}=this;for(let o=0,r=t.length;o<r;){this.posOut>=s&&this.keccak();const i=Math.min(s-this.posOut,r-o);t.set(n.subarray(this.posOut,this.posOut+i),o),this.posOut+=i,o+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return u.anumber(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(u.aoutput(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,u.clean(this.state)}_cloneInto(t){const{blockLen:n,suffix:s,outputLen:o,rounds:r,enableXOF:i}=this;return t||(t=new rt(n,s,o,i,r)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=r,t.suffix=s,t.outputLen=o,t.enableXOF=i,t.destroyed=this.destroyed,t}}const Re=(e,t,n,s={})=>u.createHasher(()=>new rt(t,e,n),s),$e=Re(1,136,32),Pt=64,_=20,et=4,Kt=2,Ue=0,Le=1,N=[64,64],Ve=e=>Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("");function it(e){return _e(u.sha256(e))}function Dt(e){return(1<<e)-1}function We(e){let t=1;for(;t*t<e+1;)t++;return Math.max(t,2)}function Ne(e){const t=et,n=e*Dt(t);return{d:t,n:e,checksum_radix:We(n)}}function G(e,t){const n=[];let s=t;for(;s>0;)n.push(s&255),s>>>=8;const o=new Uint8Array(e.length+n.length);o.set(e);for(let r=0;r<n.length;r++)o[e.length+r]=n[r];return it(o)}function Z(e,t){let n=e;for(let s=0;s<t;s++)n=it(n);return n}function Me(e,t){const n=Dt(t.d),s=t.checksum_radix-1,o=Math.floor(t.n*n/t.checksum_radix),r=[];for(let c=0;c<t.n;c++){const P=G(e,c+Kt),m=Z(P,n);r.push(Array.from(m))}const i=G(e,Ue),a=Z(i,s),l=G(e,Le),h=Z(l,o);return{config:t,message_terminals:r,checksum_major_terminal:Array.from(h),checksum_minor_terminal:Array.from(a)}}async function qt(e){try{if(e.length!==Pt)throw new Error(`WOTS seed must be exactly ${Pt} bytes, got ${e.length}`);const t=[];for(let n=0;n<N.length;n++){const s=N[n],o=Ne(s),r=new Uint8Array(e.length+1);r.set(e),r[e.length]=n;const i=it(r);try{const a=Me(i,o);if(a.config.d!==et)throw new Error(`Block ${n}: expected d=${et}, got d=${a.config.d}`);if(a.config.n!==s)throw new Error(`Block ${n}: expected n=${s}, got n=${a.config.n}`);if(a.message_terminals.length!==s)throw new Error(`Block ${n}: expected ${s} message terminals, got ${a.message_terminals.length}`);for(let l=0;l<a.message_terminals.length;l++)if(a.message_terminals[l].length!==_)throw new Error(`Block ${n} terminal ${l}: expected ${_} bytes, got ${a.message_terminals[l].length}`);if(a.checksum_minor_terminal.length!==_)throw new Error(`Block ${n} checksum_minor: expected ${_} bytes`);if(a.checksum_major_terminal.length!==_)throw new Error(`Block ${n} checksum_major: expected ${_} bytes`);t.push(a)}finally{r.fill(0),i.fill(0)}}if(t.length!==N.length)throw new Error(`Expected ${N.length} blocks, got ${t.length}`);return t}finally{e.fill(0)}}function Y(e,t,n){if(e.length!==_)throw new Error(`Block ${t} ${n}: expected ${_} bytes, got ${e.length}`);for(let s=0;s<e.length;s++){const o=e[s];if(!Number.isInteger(o)||o<0||o>255)throw new Error(`Block ${t} ${n}[${s}]: invalid byte value ${o}`)}}function jt(e){if(e.length===0)throw new Error("Public keys array must not be empty");for(let r=0;r<e.length;r++){const i=e[r];Y(i.checksum_minor_terminal,r,"checksum_minor_terminal"),Y(i.checksum_major_terminal,r,"checksum_major_terminal");for(let a=0;a<i.message_terminals.length;a++)Y(i.message_terminals[a],r,`message_terminal[${a}]`)}let t=0;for(const r of e)t+=Kt+r.message_terminals.length;const n=new Uint8Array(t*_);let s=0;for(const r of e){n.set(r.checksum_minor_terminal,s),s+=_,n.set(r.checksum_major_terminal,s),s+=_;for(const i of r.message_terminals)n.set(i,s),s+=_}const o=$e(n);return`0x${Ve(o)}`}function Fe(e){const t=(e instanceof Error?e.message:typeof e=="string"?e:"").toLowerCase();return t.includes("wots")&&t.includes("hash")&&t.includes("does not match")}const Xe=0,Ke=/^0x[0-9a-f]+$/i,De=/^[0-9a-f]+$/i,qe=/^[A-Za-z0-9+/]+={0,2}$/,je="00".repeat(32);function U(e){if(typeof e!="string"||e.length===0)throw new Error("BTC wallet returned empty public key");return d.processPublicKeyToXOnly(e).toLowerCase()}function ze(e){if(typeof e!="string"||e.length===0)throw new Error("BTC wallet returned empty BIP-322 signature");if(e.startsWith("0x")||e.startsWith("0X")){if(!Ke.test(e)||e.length<4||e.length%2!==0)throw new Error("BTC wallet returned malformed hex BIP-322 signature");return e.toLowerCase()}if(De.test(e)){if(e.length%2!==0)throw new Error("BTC wallet returned malformed hex BIP-322 signature");return`0x${e.toLowerCase()}`}if(!qe.test(e)||e.length%4!==0)throw new Error("BTC wallet returned malformed base64 BIP-322 signature");const t=Q.Buffer.from(e,"base64");if(t.length===0||t.toString("base64")!==e)throw new Error("BTC wallet returned malformed base64 BIP-322 signature");return`0x${t.toString("hex")}`}function Ge(e,t,n,s){const o=n==null?void 0:n[`${e}:${t}`];return o?Promise.resolve({txid:e,vout:t,value:o.value,scriptPubKey:o.scriptPubKey}):Tt.getUtxoInfo(e,t,s)}const Et=12e4;class Ze{constructor(t){y(this,"config");this.config=t}async preparePegin(t){if(t.amounts.length===0)throw new Error("amounts must contain at least one entry");const n=await this.config.btcWallet.getPublicKeyHex(),s=U(n),o=await this.prepareSizing(s,t),r=o.selectedUTXOs.map(f=>({txid:d.hexToUint8Array(f.txid),vout:f.vout})),i=await Rt(this.config.btcWallet,{depositorBtcPubkey:d.hexToUint8Array(s),fundingOutpoints:r}),a=await this.expandPerVaultSecrets(i,t.amounts.length),{perVaultWotsKeys:l,wotsPkHashes:h,htlcSecretHexes:c,hashlocks:P}=a,m=await this.preparePeginCommit({depositorBtcPubkeyRaw:n,depositorBtcPubkey:s,hashlocks:P,sizing:o,params:t});for(let f=0;f<m.perVault.length;f++)if(m.perVault[f].htlcVout!==f)throw new Error(`Internal invariant violation: htlcVout/index mismatch at vault ${f} (expected ${f}, got ${m.perVault[f].htlcVout})`);return{transaction:{...m,selectedUTXOs:o.selectedUTXOs,fee:o.fee,changeAmount:o.changeAmount},depositorBtcPubkey:s,derivedSecrets:{perVaultWotsKeys:l,wotsPkHashes:h,htlcSecretHexes:c}}}async expandPerVaultSecrets(t,n){const s=[],o=[],r=[],i=[];try{for(let a=0;a<n;a++){const l=Bt(t,a);try{const c=await qt(l);s.push(c),o.push(jt(c))}finally{l.fill(0)}const h=Ht(t,a);try{const c=d.uint8ArrayToHex(h);r.push(c),i.push(Zt.computeHashlock(d.ensureHexPrefix(c)).slice(2))}finally{h.fill(0)}}}finally{t.fill(0)}return{perVaultWotsKeys:s,wotsPkHashes:o,htlcSecretHexes:r,hashlocks:i}}async prepareSizing(t,n){const s=n.amounts.map(()=>je),o=n.vaultKeeperBtcPubkeys.length,r=await S.buildPrePeginPsbt({depositorPubkey:t,vaultProviderPubkey:d.stripHexPrefix(n.vaultProviderBtcPubkey),vaultKeeperPubkeys:n.vaultKeeperBtcPubkeys.map(d.stripHexPrefix),universalChallengerPubkeys:n.universalChallengerBtcPubkeys.map(d.stripHexPrefix),hashlocks:s,timelockRefund:n.timelockRefund,pegInAmounts:n.amounts,feeRate:n.protocolFeeRate,numLocalChallengers:o,councilQuorum:n.councilQuorum,councilSize:n.councilSize,network:this.config.btcNetwork}),i=O.selectUtxosForPegin([...n.availableUTXOs],r.totalOutputValue,n.mempoolFeeRate,lt.peginOutputCount(r.htlcValues.length));return{selectedUTXOs:i.selectedUTXOs,fee:i.fee,changeAmount:i.changeAmount}}async preparePeginCommit(t){const{depositorBtcPubkeyRaw:n,depositorBtcPubkey:s,hashlocks:o,sizing:r,params:i}=t,a=d.stripHexPrefix(i.vaultProviderBtcPubkey),l=i.vaultKeeperBtcPubkeys.map(d.stripHexPrefix),h=i.universalChallengerBtcPubkeys.map(d.stripHexPrefix),c=l.length,P={depositorPubkey:s,vaultProviderPubkey:a,vaultKeeperPubkeys:l,universalChallengerPubkeys:h,hashlocks:o,timelockRefund:i.timelockRefund,pegInAmounts:i.amounts,feeRate:i.protocolFeeRate,numLocalChallengers:c,councilQuorum:i.councilQuorum,councilSize:i.councilSize,network:this.config.btcNetwork},m=await S.buildPrePeginPsbt(P),f=d.getNetwork(this.config.btcNetwork),b=lt.fundPeginTransaction({unfundedTxHex:m.psbtHex,selectedUTXOs:r.selectedUTXOs,changeAddress:i.changeAddress,changeAmount:r.changeAmount,network:f}),v=d.stripHexPrefix(O.calculateBtcTxHash(b)),T=[],B=[],g=[];for(let x=0;x<o.length;x++){const w=await S.buildPeginTxFromFundedPrePegin({prePeginParams:P,timelockPegin:i.timelockPegin,fundedPrePeginTxHex:b,htlcVout:x}),k=await S.buildPeginInputPsbt({peginTxHex:w.txHex,fundedPrePeginTxHex:b,depositorPubkey:s,vaultProviderPubkey:a,vaultKeeperPubkeys:l,universalChallengerPubkeys:h,hashlock:o[x],timelockRefund:i.timelockRefund,network:this.config.btcNetwork});T.push(w),B.push(k.psbtHex),g.push(Yt.createTaprootScriptPathSignOptions(n,1))}const E=await this.signPsbtsWithFallback(B,g),p=[];for(let x=0;x<E.length;x++){const w=S.extractPeginInputSignature(E[x],s),k=S.finalizePeginInputPsbt(E[x]);p.push({htlcVout:x,htlcValue:m.htlcValues[x],peginTxHex:k,peginTxid:T[x].txid,peginInputSignature:w,vaultScriptPubKey:T[x].vaultScriptPubKey})}return{fundedPrePeginTxHex:b,prePeginTxid:v,perVault:p}}async signPsbtsWithFallback(t,n){if(typeof this.config.btcWallet.signPsbts=="function"){const o=await this.config.btcWallet.signPsbts(t,n);if(o.length!==t.length)throw new Error(`Expected ${t.length} signed PSBTs but received ${o.length}`);return o}const s=[];for(let o=0;o<t.length;o++){const r=await this.config.btcWallet.signPsbt(t[o],n[o]);s.push(r)}return s}async signAndBroadcast(t){const{fundedPrePeginTxHex:n,depositorBtcPubkey:s}=t,o=n.startsWith("0x")?n.slice(2):n,r=M.Transaction.fromHex(o);if(r.ins.length===0)throw new Error("Transaction has no inputs");const i=new M.Psbt;i.setVersion(r.version),i.setLocktime(r.locktime);const a=Q.Buffer.from(U(s),"hex"),l=this.config.mempoolApiUrl,h=r.ins.map(g=>{const E=Q.Buffer.from(g.hash).reverse().toString("hex"),p=g.index;return Ge(E,p,t.localPrevouts,l).then(x=>({input:g,utxoData:x,txid:E,vout:p}))}),c=await Promise.all(h),P=c.reduce((g,E)=>g+BigInt(E.utxoData.value),0n),m=r.outs.reduce((g,E)=>g+BigInt(E.value),0n);if(P<m)throw new Error(`UTXO value mismatch: total input value (${P} sat) is less than total output value (${m} sat). This may indicate the mempool API returned manipulated UTXO data.`);const f=P-m;if(f>ct.MAX_REASONABLE_FEE_SATS)throw new Error(`Implied transaction fee (${f} sat) exceeds maximum reasonable fee (${ct.MAX_REASONABLE_FEE_SATS} sat). This may indicate manipulated UTXO data.`);for(const{input:g,utxoData:E,txid:p,vout:x}of c){const w=O.getPsbtInputFields({value:E.value,scriptPubKey:E.scriptPubKey},a);i.addInput({hash:g.hash,index:g.index,sequence:g.sequence,...w})}for(const g of r.outs)i.addOutput({script:g.script,value:g.value});const b=await this.config.btcWallet.signPsbt(i.toHex()),v=M.Psbt.fromHex(b);try{v.finalizeAllInputs()}catch(g){if(!v.data.inputs.every(p=>p.finalScriptWitness||p.finalScriptSig))throw new Error(`PSBT finalization failed and wallet did not auto-finalize: ${g}`)}const T=v.extractTransaction().toHex();return await Tt.pushTx(T,l)}async registerPeginOnChain(t){const{unsignedPrePeginTx:n,depositorSignedPeginTx:s,vaultProvider:o,hashlock:r,htlcVout:i,depositorPayoutBtcAddress:a,depositorWotsPkHash:l,popSignature:h}=t;if(!this.config.ethWallet.account)throw new Error("Ethereum wallet account not found");const c=this.config.ethWallet.account.address;if(!H.isAddressEqual(h.depositorEthAddress,c))throw new Error(`Proof of possession was signed for ${h.depositorEthAddress} but the Ethereum wallet is currently connected to ${c}. Reconnect the original account or call signProofOfPossession() again.`);await this.assertPopMatchesBtcWallet(h);const P=h.btcPopSignature,m=d.ensureHexPrefix(h.depositorBtcPubkey),f=d.ensureHexPrefix(n),b=d.ensureHexPrefix(s),v=await this.resolvePayoutScriptPubKey(a),T=O.calculateBtcTxHash(b),B=await at.deriveVaultId(d.stripHexPrefix(T),d.stripHexPrefix(c)),g=d.ensureHexPrefix(B);if(await this.checkVaultExists(g))throw new Error(`Vault already exists (ID: ${g}, peginTxHash: ${T}). Vault IDs are derived from the pegin transaction hash and depositor address. To create a new vault, use different UTXOs or a different amount to generate a unique transaction.`);const p=H.createPublicClient({chain:this.config.ethChain,transport:H.http()});let x;try{x=await p.readContract({address:this.config.vaultContracts.btcVaultRegistry,abi:R.BTCVaultRegistryABI,functionName:"getPegInFee",args:[o]})}catch{throw new Error("Failed to query pegin fee from the contract. Please check your network connection and that the contract address is correct.")}const w=H.encodeFunctionData({abi:R.BTCVaultRegistryABI,functionName:"submitPeginRequest",args:[c,m,P,f,b,o,r,i,v,l]});let k;try{k=await p.estimateGas({to:this.config.vaultContracts.btcVaultRegistry,data:w,value:x,account:this.config.ethWallet.account.address})}catch(D){A(D)}let I;try{I=await this.config.ethWallet.sendTransaction({to:this.config.vaultContracts.btcVaultRegistry,data:w,value:x,account:this.config.ethWallet.account,chain:this.config.ethChain,gas:k})}catch(D){A(D)}const K=await p.waitForTransactionReceipt({hash:I,timeout:Et});return K.status==="reverted"&&A(new Error(`Transaction reverted. Hash: ${I}. Check the transaction on block explorer for details.`)),{ethTxHash:K.transactionHash,vaultId:g,peginTxHash:T}}async registerPeginBatchOnChain(t){const{vaultProvider:n,unsignedPrePeginTx:s,requests:o,popSignature:r}=t;if(o.length===0)throw new Error("Batch pegin requires at least one request");if(!this.config.ethWallet.account)throw new Error("Ethereum wallet account not found");const i=this.config.ethWallet.account.address;if(!H.isAddressEqual(r.depositorEthAddress,i))throw new Error(`Proof of possession was signed for ${r.depositorEthAddress} but the Ethereum wallet is currently connected to ${i}. Reconnect the original account or call signProofOfPossession() again.`);await this.assertPopMatchesBtcWallet(r);const a=r.btcPopSignature,l=[];for(const p of o)l.push(await this.resolvePayoutScriptPubKey(p.depositorPayoutBtcAddress));const h=[];for(const p of o){const x=d.ensureHexPrefix(p.depositorSignedPeginTx),w=O.calculateBtcTxHash(x),k=await at.deriveVaultId(d.stripHexPrefix(w),d.stripHexPrefix(i)),I=d.ensureHexPrefix(k);if(await this.checkVaultExists(I))throw new Error(`Vault already exists (ID: ${I}, peginTxHash: ${w}). To create a new vault, use different UTXOs or a different amount.`);h.push({vaultId:I,peginTxHash:w})}const c=H.createPublicClient({chain:this.config.ethChain,transport:H.http()});let P;try{P=await c.readContract({address:this.config.vaultContracts.btcVaultRegistry,abi:R.BTCVaultRegistryABI,functionName:"getPegInFee",args:[n]})}catch{throw new Error("Failed to query pegin fee from the contract. Please check your network connection and that the contract address is correct.")}const m=P*BigInt(o.length),f=d.ensureHexPrefix(r.depositorBtcPubkey),b=d.ensureHexPrefix(s),v=o.map((p,x)=>({depositorBtcPubKey:f,btcPopSignature:a,unsignedPrePeginTx:b,depositorSignedPeginTx:d.ensureHexPrefix(p.depositorSignedPeginTx),hashlock:p.hashlock,htlcVout:p.htlcVout,referralCode:Xe,depositorPayoutBtcAddress:l[x],depositorWotsPkHash:p.depositorWotsPkHash})),T=H.encodeFunctionData({abi:R.BTCVaultRegistryABI,functionName:"submitPeginRequestBatch",args:[i,n,v]});let B;try{B=await c.estimateGas({to:this.config.vaultContracts.btcVaultRegistry,data:T,value:m,account:this.config.ethWallet.account.address})}catch(p){A(p)}let g;try{g=await this.config.ethWallet.sendTransaction({to:this.config.vaultContracts.btcVaultRegistry,data:T,value:m,account:this.config.ethWallet.account,chain:this.config.ethChain,gas:B})}catch(p){A(p)}const E=await c.waitForTransactionReceipt({hash:g,timeout:Et});return E.status==="reverted"&&A(new Error(`Batch transaction reverted. Hash: ${g}. Check the transaction on block explorer for details.`)),{ethTxHash:E.transactionHash,vaults:h}}async checkVaultExists(t){try{return(await H.createPublicClient({chain:this.config.ethChain,transport:H.http()}).readContract({address:this.config.vaultContracts.btcVaultRegistry,abi:R.BTCVaultRegistryABI,functionName:"getBtcVaultBasicInfo",args:[t]})).depositor!==H.zeroAddress}catch{return!1}}async resolvePayoutScriptPubKey(t){let n;if(t)n=t;else{n=await this.config.btcWallet.getAddress();const o=await this.config.btcWallet.getPublicKeyHex();if(!d.isAddressFromPublicKey(n,o,this.config.btcNetwork))throw new Error("The BTC address from your wallet does not match the wallet's public key. Please ensure your wallet is using a supported address type (Taproot or Native SegWit).")}const s=d.getNetwork(this.config.btcNetwork);try{return`0x${Jt.address.toOutputScript(n,s).toString("hex")}`}catch{throw new Error(`Invalid BTC payout address: "${n}". Please provide a valid Bitcoin address for the ${this.config.btcNetwork} network.`)}}async signProofOfPossession(){if(!this.config.ethWallet.account)throw new Error("Ethereum wallet account not found");const t=this.config.ethWallet.account.address,n=U(await this.config.btcWallet.getPublicKeyHex()),s=this.config.vaultContracts.btcVaultRegistry,o=`${t.toLowerCase()}:${this.config.ethChain.id}:pegin:${s.toLowerCase()}`,r=await this.config.btcWallet.signMessage(o,"bip322-simple");return{btcPopSignature:ze(r),depositorEthAddress:t,depositorBtcPubkey:n}}async assertPopMatchesBtcWallet(t){const n=U(await this.config.btcWallet.getPublicKeyHex()),s=U(t.depositorBtcPubkey);if(n!==s)throw new Error(`Proof of possession was signed with BTC pubkey ${s} but the BTC wallet is currently connected to ${n}. Reconnect the original wallet or call signProofOfPossession() again.`)}getNetwork(){return this.config.btcNetwork}getVaultContractAddress(){return this.config.vaultContracts.btcVaultRegistry}}exports.CONTRACT_ERRORS=C;exports.PeginManager=Ze;exports.VAULT_APP_NAME=St;exports.buildFundingOutpointsCommitment=At;exports.buildVaultContext=Ct;exports.computeWotsBlockPublicKeysHash=jt;exports.deriveVaultRoot=Rt;exports.deriveWotsBlocksFromSeed=qt;exports.expandAuthAnchor=ge;exports.expandHashlockSecret=Ht;exports.expandWotsSeed=Bt;exports.extractErrorData=X;exports.getContractErrorMessage=te;exports.handleContractError=A;exports.isKnownContractError=ee;exports.isWotsMismatchError=Fe;
2
- //# sourceMappingURL=PeginManager-Da4uSHzl.cjs.map