@babylonlabs-io/ts-sdk 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/challengeAssert-BpzES0KW.cjs +2 -0
- package/dist/challengeAssert-BpzES0KW.cjs.map +1 -0
- package/dist/challengeAssert-CenzzhZU.js +724 -0
- package/dist/challengeAssert-CenzzhZU.js.map +1 -0
- package/dist/errors-B2aR9f2F.cjs +2 -0
- package/dist/errors-B2aR9f2F.cjs.map +1 -0
- package/dist/{errors-DOJdtNTD.js → errors-ZoUEvcDE.js} +162 -156
- package/dist/errors-ZoUEvcDE.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +59 -58
- package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +15 -7
- package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.d.ts +1 -1
- package/dist/tbv/core/index.d.ts.map +1 -1
- package/dist/tbv/core/index.js +59 -58
- package/dist/tbv/core/managers/PeginManager.d.ts +2 -2
- package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
- package/dist/tbv/core/primitives/index.cjs +1 -1
- package/dist/tbv/core/primitives/index.d.ts +2 -0
- package/dist/tbv/core/primitives/index.d.ts.map +1 -1
- package/dist/tbv/core/primitives/index.js +21 -20
- package/dist/tbv/core/primitives/psbt/refund.d.ts +42 -0
- package/dist/tbv/core/primitives/psbt/refund.d.ts.map +1 -0
- package/dist/tbv/core/wots/__tests__/derivation.test.d.ts.map +1 -0
- package/dist/tbv/core/{lamport → wots}/derivation.d.ts +16 -16
- package/dist/tbv/core/wots/derivation.d.ts.map +1 -0
- package/dist/tbv/core/wots/deriveWotsPkHash.d.ts +9 -0
- package/dist/tbv/core/wots/deriveWotsPkHash.d.ts.map +1 -0
- package/dist/tbv/core/wots/errors.d.ts +7 -0
- package/dist/tbv/core/wots/errors.d.ts.map +1 -0
- package/dist/tbv/core/wots/index.d.ts +5 -0
- package/dist/tbv/core/wots/index.d.ts.map +1 -0
- package/dist/tbv/core/{lamport → wots}/types.d.ts +8 -8
- package/dist/tbv/core/wots/types.d.ts.map +1 -0
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +59 -58
- package/dist/tbv/integrations/aave/clients/abis/AaveIntegrationAdapter.abi.json.d.ts +459 -485
- package/dist/tbv/integrations/aave/index.cjs +1 -1
- package/dist/tbv/integrations/aave/index.cjs.map +1 -1
- package/dist/tbv/integrations/aave/index.js +91 -91
- package/package.json +3 -3
- package/dist/challengeAssert-DW0sEUgn.cjs +0 -2
- package/dist/challengeAssert-DW0sEUgn.cjs.map +0 -1
- package/dist/challengeAssert-DnnliaRt.js +0 -645
- package/dist/challengeAssert-DnnliaRt.js.map +0 -1
- package/dist/errors-DOJdtNTD.js.map +0 -1
- package/dist/errors-DbATYfYA.cjs +0 -2
- package/dist/errors-DbATYfYA.cjs.map +0 -1
- package/dist/tbv/core/lamport/__tests__/derivation.test.d.ts.map +0 -1
- package/dist/tbv/core/lamport/derivation.d.ts.map +0 -1
- package/dist/tbv/core/lamport/deriveLamportPkHash.d.ts +0 -9
- package/dist/tbv/core/lamport/deriveLamportPkHash.d.ts.map +0 -1
- package/dist/tbv/core/lamport/errors.d.ts +0 -7
- package/dist/tbv/core/lamport/errors.d.ts.map +0 -1
- package/dist/tbv/core/lamport/index.d.ts +0 -5
- package/dist/tbv/core/lamport/index.d.ts.map +0 -1
- package/dist/tbv/core/lamport/types.d.ts.map +0 -1
- /package/dist/tbv/core/{lamport → wots}/__tests__/derivation.test.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WotsKeypair, WotsPublicKey } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Convert a BIP-39 mnemonic into a 64-byte seed.
|
|
4
4
|
*
|
|
@@ -6,11 +6,11 @@ import { LamportKeypair, LamportPublicKey } from './types';
|
|
|
6
6
|
* `"mnemonic"` (no user password), per the BIP-39 specification.
|
|
7
7
|
*
|
|
8
8
|
* @param mnemonic - A valid 12-word BIP-39 mnemonic.
|
|
9
|
-
* @returns 64-byte seed suitable for {@link
|
|
9
|
+
* @returns 64-byte seed suitable for {@link deriveWotsKeypair}.
|
|
10
10
|
*/
|
|
11
|
-
export declare function
|
|
11
|
+
export declare function mnemonicToWotsSeed(mnemonic: string): Uint8Array;
|
|
12
12
|
/**
|
|
13
|
-
* Derive a deterministic
|
|
13
|
+
* Derive a deterministic WOTS keypair for a specific vault.
|
|
14
14
|
*
|
|
15
15
|
* ### Derivation steps
|
|
16
16
|
*
|
|
@@ -41,38 +41,38 @@ export declare function mnemonicToLamportSeed(mnemonic: string): Uint8Array;
|
|
|
41
41
|
* The same (mnemonic, vaultId, depositorPk, appContractAddress) tuple always
|
|
42
42
|
* produces the same keypair, enabling recovery from the mnemonic alone.
|
|
43
43
|
*
|
|
44
|
-
* @param seed - 64-byte seed from {@link
|
|
44
|
+
* @param seed - 64-byte seed from {@link mnemonicToWotsSeed}.
|
|
45
45
|
* @param vaultId - Unique identifier of the vault (e.g. pegin tx hash).
|
|
46
46
|
* @param depositorPk - Depositor's public key (hex string).
|
|
47
47
|
* @param appContractAddress - Ethereum address of the application contract.
|
|
48
|
-
* @returns A {@link
|
|
48
|
+
* @returns A {@link WotsKeypair} with 508 preimage/hash pairs per branch.
|
|
49
49
|
*/
|
|
50
|
-
export declare function
|
|
50
|
+
export declare function deriveWotsKeypair(seed: Uint8Array, vaultId: string, depositorPk: string, appContractAddress: string): Promise<WotsKeypair>;
|
|
51
51
|
/**
|
|
52
|
-
* Extract the public key from a
|
|
52
|
+
* Extract the public key from a WOTS keypair.
|
|
53
53
|
*
|
|
54
54
|
* The public key consists of the Hash160 digests (hex-encoded) for both
|
|
55
55
|
* the `false` and `true` branch of each bit position. This is the value
|
|
56
56
|
* submitted on-chain and to the vault provider for later signature
|
|
57
57
|
* verification.
|
|
58
58
|
*
|
|
59
|
-
* @param keypair - A derived {@link
|
|
60
|
-
* @returns The {@link
|
|
59
|
+
* @param keypair - A derived {@link WotsKeypair}.
|
|
60
|
+
* @returns The {@link WotsPublicKey} with `false_list` and `true_list`,
|
|
61
61
|
* each containing 508 hex strings of 40 characters (20 bytes).
|
|
62
62
|
*/
|
|
63
|
-
export declare function keypairToPublicKey(keypair:
|
|
63
|
+
export declare function keypairToPublicKey(keypair: WotsKeypair): WotsPublicKey;
|
|
64
64
|
/**
|
|
65
|
-
* Compute the keccak256 hash of a
|
|
65
|
+
* Compute the keccak256 hash of a WOTS keypair's public key.
|
|
66
66
|
*
|
|
67
67
|
* Matches the Rust `InputLabelHashes::keccak256_hash()` implementation:
|
|
68
68
|
* `keccak256(falseHashes[0] || falseHashes[1] || ... || trueHashes[0] || trueHashes[1] || ...)`
|
|
69
69
|
*
|
|
70
70
|
* Each hash is 20 bytes (Hash160). Total input: `PI_1_BITS * 20 * 2` bytes.
|
|
71
|
-
* The result is committed on-chain as `
|
|
72
|
-
* provider can later verify submitted
|
|
71
|
+
* The result is committed on-chain as `depositorWotsPkHash` so the vault
|
|
72
|
+
* provider can later verify submitted WOTS public keys.
|
|
73
73
|
*
|
|
74
|
-
* @param keypair - A derived {@link
|
|
74
|
+
* @param keypair - A derived {@link WotsKeypair}.
|
|
75
75
|
* @returns 32-byte keccak256 digest as a `0x`-prefixed hex string.
|
|
76
76
|
*/
|
|
77
|
-
export declare function
|
|
77
|
+
export declare function computeWotsPkHash(keypair: WotsKeypair): `0x${string}`;
|
|
78
78
|
//# sourceMappingURL=derivation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"derivation.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/wots/derivation.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAmG1D;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAK/D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,WAAW,CAAC,CAuFtB;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,aAAa,CAKtE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,KAAK,MAAM,EAAE,CAuBrE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convenience wrapper: derive a WOTS keypair from a mnemonic and return
|
|
3
|
+
* the keccak256 hash of its public key. Handles seed creation and cleanup.
|
|
4
|
+
*
|
|
5
|
+
* Used before the ETH transaction to produce the `depositorWotsPkHash`
|
|
6
|
+
* that gets committed on-chain.
|
|
7
|
+
*/
|
|
8
|
+
export declare function deriveWotsPkHash(mnemonic: string, peginTxid: string, depositorBtcPubkey: string, appContractAddress: string): Promise<`0x${string}`>;
|
|
9
|
+
//# sourceMappingURL=deriveWotsPkHash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deriveWotsPkHash.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/wots/deriveWotsPkHash.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,MAAM,EAC1B,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,KAAK,MAAM,EAAE,CAAC,CAkBxB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check whether an error from the vault provider indicates that the
|
|
3
|
+
* submitted WOTS public key hash does not match the on-chain
|
|
4
|
+
* commitment. This signals that the wrong mnemonic was used.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isWotsMismatchError(error: unknown): boolean;
|
|
7
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/wots/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAc3D"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { WotsKeypair, WotsPublicKey, WotsKeyProvider } from './types';
|
|
2
|
+
export { mnemonicToWotsSeed, deriveWotsKeypair, keypairToPublicKey, computeWotsPkHash, } from './derivation';
|
|
3
|
+
export { deriveWotsPkHash } from './deriveWotsPkHash';
|
|
4
|
+
export { isWotsMismatchError } from './errors';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/wots/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A
|
|
2
|
+
* A WOTS keypair consisting of preimages (private) and their hashes
|
|
3
3
|
* (public) for both the `false` and `true` branch of each bit position.
|
|
4
4
|
*
|
|
5
5
|
* - `falsePreimages[i]` / `truePreimages[i]` — 16-byte secret preimages.
|
|
@@ -7,27 +7,27 @@
|
|
|
7
7
|
*
|
|
8
8
|
* All arrays have length 508 (PI_1_BITS).
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
10
|
+
export interface WotsKeypair {
|
|
11
11
|
falsePreimages: Uint8Array[];
|
|
12
12
|
truePreimages: Uint8Array[];
|
|
13
13
|
falseHashes: Uint8Array[];
|
|
14
14
|
trueHashes: Uint8Array[];
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* Serialized
|
|
17
|
+
* Serialized WOTS public key as two lists of hex-encoded Hash160 digests.
|
|
18
18
|
* This is the format submitted on-chain and to the vault provider.
|
|
19
19
|
*/
|
|
20
|
-
export interface
|
|
20
|
+
export interface WotsPublicKey {
|
|
21
21
|
false_list: string[];
|
|
22
22
|
true_list: string[];
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Provider interface for
|
|
25
|
+
* Provider interface for WOTS key operations.
|
|
26
26
|
* Frontend implements with mnemonic-based derivation;
|
|
27
27
|
* backend services can implement with HSM/KMS.
|
|
28
28
|
*/
|
|
29
|
-
export interface
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
export interface WotsKeyProvider {
|
|
30
|
+
deriveWotsKeypair(vaultId: string): Promise<WotsKeypair>;
|
|
31
|
+
getWotsPublicKey(vaultId: string): Promise<WotsPublicKey>;
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/wots/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,UAAU,EAAE,CAAC;IAC7B,aAAa,EAAE,UAAU,EAAE,CAAC;IAC5B,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,UAAU,EAAE,UAAU,EAAE,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACzD,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAC3D"}
|
package/dist/tbv/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../challengeAssert-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../challengeAssert-BpzES0KW.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../errors-B2aR9f2F.cjs");exports.BTC_DUST_SAT=e.BTC_DUST_SAT;exports.DUST_THRESHOLD=e.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=e.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=e.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=e.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=e.P2TR_INPUT_SIZE;exports.PEGIN_FIXED_OUTPUTS=e.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=e.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=e.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=e.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.buildChallengeAssertPsbt=e.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=e.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=e.buildNoPayoutPsbt;exports.buildPayoutPsbt=e.buildPayoutPsbt;exports.buildPeginInputPsbt=e.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=e.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=e.buildPrePeginPsbt;exports.buildRefundPsbt=e.buildRefundPsbt;exports.computeNumLocalChallengers=e.computeNumLocalChallengers;exports.createPayoutScript=e.createPayoutScript;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.extractPayoutSignature=e.extractPayoutSignature;exports.extractPeginInputSignature=e.extractPeginInputSignature;exports.finalizePeginInputPsbt=e.finalizePeginInputPsbt;exports.fundPeginTransaction=e.fundPeginTransaction;exports.getNetwork=e.getNetwork;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.parseUnfundedWasmTransaction=e.parseUnfundedWasmTransaction;exports.peginOutputCount=e.peginOutputCount;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>r.deriveVaultId});exports.BTCVaultRegistryABI=t.BTCVaultRegistryABI;exports.BitcoinScriptType=t.BitcoinScriptType;exports.CONTRACT_ERRORS=t.CONTRACT_ERRORS;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.PayoutManager=t.PayoutManager;exports.PeginManager=t.PeginManager;exports.calculateBtcTxHash=t.calculateBtcTxHash;exports.computeWotsPkHash=t.computeWotsPkHash;exports.createSplitTransaction=t.createSplitTransaction;exports.createSplitTransactionPsbt=t.createSplitTransactionPsbt;exports.createTaprootScriptPathSignOptions=t.createTaprootScriptPathSignOptions;exports.deriveWotsKeypair=t.deriveWotsKeypair;exports.deriveWotsPkHash=t.deriveWotsPkHash;exports.extractErrorData=t.extractErrorData;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getContractErrorMessage=t.getContractErrorMessage;exports.getDustThreshold=t.getDustThreshold;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getPsbtInputFields=t.getPsbtInputFields;exports.getScriptType=t.getScriptType;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.handleContractError=t.handleContractError;exports.isKnownContractError=t.isKnownContractError;exports.isWotsMismatchError=t.isWotsMismatchError;exports.keypairToPublicKey=t.keypairToPublicKey;exports.mnemonicToWotsSeed=t.mnemonicToWotsSeed;exports.pushTx=t.pushTx;exports.selectUtxosForPegin=t.selectUtxosForPegin;exports.shouldAddChangeOutput=t.shouldAddChangeOutput;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/tbv/index.js
CHANGED
|
@@ -1,78 +1,79 @@
|
|
|
1
|
-
import { B as e, D as t, F as r, L as i, M as o, P as n,
|
|
1
|
+
import { B as e, D as t, F as r, L as i, M as o, P as n, z as u, S as T, T as P, W as d, l, j as c, k as g, h as p, d as E, a as _, b as A, g as S, c as x, m as b, n as y, o as I, s as R, i as C, e as F, f as U, E as m, G as O, p as h, q as f, r as L, C as M, A as H, t as N, y as B, u as D, v as W, w as v, x as k } from "../challengeAssert-CenzzhZU.js";
|
|
2
2
|
import { computeMinClaimValue as X, deriveVaultId as K } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
-
import { r as
|
|
3
|
+
import { r as Y, B as G, C as z, M as Z, i as j, P as q, c as J, A as Q, b as $, d as aa, h as sa, y as ea, D as ta, t as ra, j as ia, k as oa, u as na, g as ua, l as Ta, m as Pa, f as da, e as la, n as ca, o as ga, p as pa, w as Ea, v as _a, E as Aa, z as Sa, x as xa, q as ba, s as ya, a as Ia } from "../errors-ZoUEvcDE.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
Y as BTCVaultRegistryABI,
|
|
6
6
|
e as BTC_DUST_SAT,
|
|
7
|
-
|
|
7
|
+
G as BitcoinScriptType,
|
|
8
8
|
z as CONTRACT_ERRORS,
|
|
9
9
|
t as DUST_THRESHOLD,
|
|
10
10
|
r as FEE_SAFETY_MARGIN,
|
|
11
11
|
i as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
12
12
|
o as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
13
|
-
|
|
13
|
+
Z as MEMPOOL_API_URLS,
|
|
14
14
|
n as P2TR_INPUT_SIZE,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
u as PEGIN_FIXED_OUTPUTS,
|
|
16
|
+
j as PayoutManager,
|
|
17
|
+
q as PeginManager,
|
|
18
|
+
T as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
19
19
|
P as TX_BUFFER_SIZE_OVERHEAD,
|
|
20
20
|
d as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
l as buildChallengeAssertPsbt,
|
|
22
|
+
c as buildDepositorPayoutPsbt,
|
|
23
|
+
g as buildNoPayoutPsbt,
|
|
24
|
+
p as buildPayoutPsbt,
|
|
25
25
|
E as buildPeginInputPsbt,
|
|
26
26
|
_ as buildPeginTxFromFundedPrePegin,
|
|
27
27
|
A as buildPrePeginPsbt,
|
|
28
|
-
|
|
29
|
-
J as
|
|
28
|
+
S as buildRefundPsbt,
|
|
29
|
+
J as calculateBtcTxHash,
|
|
30
30
|
X as computeMinClaimValue,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
$ as
|
|
35
|
-
aa as
|
|
36
|
-
sa as
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
m as deriveTaprootAddress,
|
|
31
|
+
x as computeNumLocalChallengers,
|
|
32
|
+
Q as computeWotsPkHash,
|
|
33
|
+
b as createPayoutScript,
|
|
34
|
+
$ as createSplitTransaction,
|
|
35
|
+
aa as createSplitTransactionPsbt,
|
|
36
|
+
sa as createTaprootScriptPathSignOptions,
|
|
37
|
+
y as deriveNativeSegwitAddress,
|
|
38
|
+
I as deriveTaprootAddress,
|
|
40
39
|
K as deriveVaultId,
|
|
41
|
-
|
|
42
|
-
ta as
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
C as
|
|
46
|
-
F as
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
ea as deriveWotsKeypair,
|
|
41
|
+
ta as deriveWotsPkHash,
|
|
42
|
+
R as ensureHexPrefix,
|
|
43
|
+
ra as extractErrorData,
|
|
44
|
+
C as extractPayoutSignature,
|
|
45
|
+
F as extractPeginInputSignature,
|
|
46
|
+
U as finalizePeginInputPsbt,
|
|
47
|
+
m as fundPeginTransaction,
|
|
48
|
+
ia as getAddressTxs,
|
|
49
|
+
oa as getAddressUtxos,
|
|
50
|
+
na as getContractErrorMessage,
|
|
51
|
+
ua as getDustThreshold,
|
|
51
52
|
Ta as getMempoolApiUrl,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
53
|
+
O as getNetwork,
|
|
54
|
+
Pa as getNetworkFees,
|
|
55
|
+
da as getPsbtInputFields,
|
|
56
|
+
la as getScriptType,
|
|
57
|
+
ca as getTxHex,
|
|
58
|
+
ga as getTxInfo,
|
|
59
|
+
pa as getUtxoInfo,
|
|
60
|
+
Ea as handleContractError,
|
|
61
|
+
h as hexToUint8Array,
|
|
62
|
+
f as isAddressFromPublicKey,
|
|
63
|
+
_a as isKnownContractError,
|
|
64
|
+
L as isValidHex,
|
|
65
|
+
Aa as isWotsMismatchError,
|
|
66
|
+
Sa as keypairToPublicKey,
|
|
67
|
+
xa as mnemonicToWotsSeed,
|
|
68
|
+
M as parseUnfundedWasmTransaction,
|
|
69
|
+
H as peginOutputCount,
|
|
70
|
+
N as processPublicKeyToXOnly,
|
|
71
|
+
ba as pushTx,
|
|
72
|
+
B as rateBasedTxBufferFee,
|
|
73
|
+
ya as selectUtxosForPegin,
|
|
74
|
+
Ia as shouldAddChangeOutput,
|
|
75
|
+
D as stripHexPrefix,
|
|
76
|
+
W as toXOnly,
|
|
76
77
|
v as uint8ArrayToHex,
|
|
77
78
|
k as validateWalletPubkey
|
|
78
79
|
};
|