@babylonlabs-io/ts-sdk 0.1.0 → 0.2.1-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PayoutManager-Dg_i_S7w.cjs.map +1 -1
- package/dist/PayoutManager-rMj54HDh.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +58 -56
- package/dist/index.js.map +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +59 -57
- package/dist/tbv/core/index.js.map +1 -1
- package/dist/tbv/core/managers/PeginManager.d.ts +6 -0
- 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 +10 -0
- package/dist/tbv/core/primitives/index.d.ts.map +1 -1
- package/dist/tbv/core/primitives/index.js +19 -17
- package/dist/tbv/core/primitives/index.js.map +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +59 -57
- package/dist/tbv/index.js.map +1 -1
- package/package.json +20 -20
- package/LICENSE +0 -169
package/dist/index.js
CHANGED
|
@@ -1,63 +1,65 @@
|
|
|
1
1
|
import { M as e, a as t } from "./MockEthereumWallet-ibdry7pZ.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { computeMinClaimValue as o } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
+
import { f as n, c as T, d as l, a as u, b as d, g as c, h as E, i as A, e as P, m as g, j as _, k as p, l as x, p as S, s as b, t as y, u as R, v as C } from "./challengeAssert-DVErOd8l.js";
|
|
4
|
+
import { x as U, B as O, e as f, C as F, D as h, F as m, L as I, M as B, v as H, P as L, k as N, j as D, T as k, W, c as v, b as w, d as V, y as X, f as Y, l as K, m as Z, z as j, g as G, n as q, o as z, i as J, h as Q, q as $, t as aa, u as sa, E as ea, A as ta, p as ra, w as oa, r as ia, s as na, a as Ta } from "./PayoutManager-rMj54HDh.js";
|
|
4
5
|
export {
|
|
5
6
|
U as BTCVaultsManagerABI,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
O as BTC_DUST_SAT,
|
|
8
|
+
f as BitcoinScriptType,
|
|
9
|
+
F as CONTRACT_ERRORS,
|
|
10
|
+
h as DUST_THRESHOLD,
|
|
11
|
+
m as FEE_SAFETY_MARGIN,
|
|
12
|
+
I as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
13
|
+
B as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
14
|
+
H as MEMPOOL_API_URLS,
|
|
14
15
|
e as MockBitcoinWallet,
|
|
15
16
|
t as MockEthereumWallet,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Y as
|
|
36
|
-
K as
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
17
|
+
L as P2TR_INPUT_SIZE,
|
|
18
|
+
N as PayoutManager,
|
|
19
|
+
D as PeginManager,
|
|
20
|
+
k as TX_BUFFER_SIZE_OVERHEAD,
|
|
21
|
+
W as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
22
|
+
n as buildChallengeAssertPsbt,
|
|
23
|
+
T as buildDepositorPayoutPsbt,
|
|
24
|
+
l as buildNoPayoutPsbt,
|
|
25
|
+
u as buildPayoutPsbt,
|
|
26
|
+
d as buildPeginPsbt,
|
|
27
|
+
v as calculateBtcTxHash,
|
|
28
|
+
o as computeMinClaimValue,
|
|
29
|
+
c as createPayoutScript,
|
|
30
|
+
w as createSplitTransaction,
|
|
31
|
+
V as createSplitTransactionPsbt,
|
|
32
|
+
E as deriveNativeSegwitAddress,
|
|
33
|
+
A as deriveTaprootAddress,
|
|
34
|
+
X as extractErrorData,
|
|
35
|
+
P as extractPayoutSignature,
|
|
36
|
+
Y as fundPeginTransaction,
|
|
37
|
+
K as getAddressTxs,
|
|
38
|
+
Z as getAddressUtxos,
|
|
39
|
+
j as getContractErrorMessage,
|
|
40
|
+
G as getDustThreshold,
|
|
41
|
+
q as getMempoolApiUrl,
|
|
42
|
+
g as getNetwork,
|
|
43
|
+
z as getNetworkFees,
|
|
44
|
+
J as getPsbtInputFields,
|
|
45
|
+
Q as getScriptType,
|
|
46
|
+
$ as getTxHex,
|
|
47
|
+
aa as getTxInfo,
|
|
48
|
+
sa as getUtxoInfo,
|
|
49
|
+
ea as handleContractError,
|
|
50
|
+
_ as hexToUint8Array,
|
|
51
|
+
p as isAddressFromPublicKey,
|
|
52
|
+
ta as isKnownContractError,
|
|
53
|
+
x as isValidHex,
|
|
54
|
+
ra as parseUnfundedWasmTransaction,
|
|
55
|
+
S as processPublicKeyToXOnly,
|
|
56
|
+
oa as pushTx,
|
|
57
|
+
ia as rateBasedTxBufferFee,
|
|
58
|
+
na as selectUtxosForPegin,
|
|
59
|
+
Ta as shouldAddChangeOutput,
|
|
60
|
+
b as stripHexPrefix,
|
|
61
|
+
y as toXOnly,
|
|
62
|
+
R as uint8ArrayToHex,
|
|
63
|
+
C as validateWalletPubkey
|
|
62
64
|
};
|
|
63
65
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/tbv/core/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../challengeAssert-34HqeVFH.cjs"),e=require("../../PayoutManager-Dg_i_S7w.cjs");exports.buildChallengeAssertPsbt=t.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=t.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=t.buildNoPayoutPsbt;exports.buildPayoutPsbt=t.buildPayoutPsbt;exports.buildPeginPsbt=t.buildPeginPsbt;exports.createPayoutScript=t.createPayoutScript;exports.deriveNativeSegwitAddress=t.deriveNativeSegwitAddress;exports.deriveTaprootAddress=t.deriveTaprootAddress;exports.extractPayoutSignature=t.extractPayoutSignature;exports.getNetwork=t.getNetwork;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.BTCVaultsManagerABI=e.BTCVaultsManagerABI;exports.BTC_DUST_SAT=e.BTC_DUST_SAT;exports.BitcoinScriptType=e.BitcoinScriptType;exports.CONTRACT_ERRORS=e.CONTRACT_ERRORS;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.MEMPOOL_API_URLS=e.MEMPOOL_API_URLS;exports.P2TR_INPUT_SIZE=e.P2TR_INPUT_SIZE;exports.PayoutManager=e.PayoutManager;exports.PeginManager=e.PeginManager;exports.TX_BUFFER_SIZE_OVERHEAD=e.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=e.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.calculateBtcTxHash=e.calculateBtcTxHash;exports.createSplitTransaction=e.createSplitTransaction;exports.createSplitTransactionPsbt=e.createSplitTransactionPsbt;exports.extractErrorData=e.extractErrorData;exports.fundPeginTransaction=e.fundPeginTransaction;exports.getAddressTxs=e.getAddressTxs;exports.getAddressUtxos=e.getAddressUtxos;exports.getContractErrorMessage=e.getContractErrorMessage;exports.getDustThreshold=e.getDustThreshold;exports.getMempoolApiUrl=e.getMempoolApiUrl;exports.getNetworkFees=e.getNetworkFees;exports.getPsbtInputFields=e.getPsbtInputFields;exports.getScriptType=e.getScriptType;exports.getTxHex=e.getTxHex;exports.getTxInfo=e.getTxInfo;exports.getUtxoInfo=e.getUtxoInfo;exports.handleContractError=e.handleContractError;exports.isKnownContractError=e.isKnownContractError;exports.parseUnfundedWasmTransaction=e.parseUnfundedWasmTransaction;exports.pushTx=e.pushTx;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.selectUtxosForPegin=e.selectUtxosForPegin;exports.shouldAddChangeOutput=e.shouldAddChangeOutput;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../../challengeAssert-34HqeVFH.cjs"),e=require("../../PayoutManager-Dg_i_S7w.cjs");Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});exports.buildChallengeAssertPsbt=t.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=t.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=t.buildNoPayoutPsbt;exports.buildPayoutPsbt=t.buildPayoutPsbt;exports.buildPeginPsbt=t.buildPeginPsbt;exports.createPayoutScript=t.createPayoutScript;exports.deriveNativeSegwitAddress=t.deriveNativeSegwitAddress;exports.deriveTaprootAddress=t.deriveTaprootAddress;exports.extractPayoutSignature=t.extractPayoutSignature;exports.getNetwork=t.getNetwork;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.BTCVaultsManagerABI=e.BTCVaultsManagerABI;exports.BTC_DUST_SAT=e.BTC_DUST_SAT;exports.BitcoinScriptType=e.BitcoinScriptType;exports.CONTRACT_ERRORS=e.CONTRACT_ERRORS;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.MEMPOOL_API_URLS=e.MEMPOOL_API_URLS;exports.P2TR_INPUT_SIZE=e.P2TR_INPUT_SIZE;exports.PayoutManager=e.PayoutManager;exports.PeginManager=e.PeginManager;exports.TX_BUFFER_SIZE_OVERHEAD=e.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=e.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.calculateBtcTxHash=e.calculateBtcTxHash;exports.createSplitTransaction=e.createSplitTransaction;exports.createSplitTransactionPsbt=e.createSplitTransactionPsbt;exports.extractErrorData=e.extractErrorData;exports.fundPeginTransaction=e.fundPeginTransaction;exports.getAddressTxs=e.getAddressTxs;exports.getAddressUtxos=e.getAddressUtxos;exports.getContractErrorMessage=e.getContractErrorMessage;exports.getDustThreshold=e.getDustThreshold;exports.getMempoolApiUrl=e.getMempoolApiUrl;exports.getNetworkFees=e.getNetworkFees;exports.getPsbtInputFields=e.getPsbtInputFields;exports.getScriptType=e.getScriptType;exports.getTxHex=e.getTxHex;exports.getTxInfo=e.getTxInfo;exports.getUtxoInfo=e.getUtxoInfo;exports.handleContractError=e.handleContractError;exports.isKnownContractError=e.isKnownContractError;exports.parseUnfundedWasmTransaction=e.parseUnfundedWasmTransaction;exports.pushTx=e.pushTx;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.selectUtxosForPegin=e.selectUtxosForPegin;exports.shouldAddChangeOutput=e.shouldAddChangeOutput;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/tbv/core/index.js
CHANGED
|
@@ -1,60 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { computeMinClaimValue as e } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
2
|
+
import { f as r, c as o, d as i, a as T, b as n, g as d, h as l, i as u, e as A, m as E, j as P, k as c, l as g, p as _, s as p, t as x, u as S, v as b } from "../../challengeAssert-DVErOd8l.js";
|
|
3
|
+
import { x as R, B as C, e as U, C as O, D as F, F as f, L as I, M, v as h, P as m, k as B, j as H, T as L, W as N, c as D, b as v, d as k, y as w, f as W, l as V, m as X, z as Y, g as K, n as Z, o as j, i as G, h as q, q as z, t as J, u as Q, E as $, A as aa, p as sa, w as ea, r as ta, s as ra, a as oa } from "../../PayoutManager-rMj54HDh.js";
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
X as
|
|
35
|
-
Y as
|
|
36
|
-
K as
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
5
|
+
R as BTCVaultsManagerABI,
|
|
6
|
+
C as BTC_DUST_SAT,
|
|
7
|
+
U as BitcoinScriptType,
|
|
8
|
+
O as CONTRACT_ERRORS,
|
|
9
|
+
F as DUST_THRESHOLD,
|
|
10
|
+
f as FEE_SAFETY_MARGIN,
|
|
11
|
+
I as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
12
|
+
M as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
13
|
+
h as MEMPOOL_API_URLS,
|
|
14
|
+
m as P2TR_INPUT_SIZE,
|
|
15
|
+
B as PayoutManager,
|
|
16
|
+
H as PeginManager,
|
|
17
|
+
L as TX_BUFFER_SIZE_OVERHEAD,
|
|
18
|
+
N as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
19
|
+
r as buildChallengeAssertPsbt,
|
|
20
|
+
o as buildDepositorPayoutPsbt,
|
|
21
|
+
i as buildNoPayoutPsbt,
|
|
22
|
+
T as buildPayoutPsbt,
|
|
23
|
+
n as buildPeginPsbt,
|
|
24
|
+
D as calculateBtcTxHash,
|
|
25
|
+
e as computeMinClaimValue,
|
|
26
|
+
d as createPayoutScript,
|
|
27
|
+
v as createSplitTransaction,
|
|
28
|
+
k as createSplitTransactionPsbt,
|
|
29
|
+
l as deriveNativeSegwitAddress,
|
|
30
|
+
u as deriveTaprootAddress,
|
|
31
|
+
w as extractErrorData,
|
|
32
|
+
A as extractPayoutSignature,
|
|
33
|
+
W as fundPeginTransaction,
|
|
34
|
+
V as getAddressTxs,
|
|
35
|
+
X as getAddressUtxos,
|
|
36
|
+
Y as getContractErrorMessage,
|
|
37
|
+
K as getDustThreshold,
|
|
38
|
+
Z as getMempoolApiUrl,
|
|
39
|
+
E as getNetwork,
|
|
40
|
+
j as getNetworkFees,
|
|
41
|
+
G as getPsbtInputFields,
|
|
42
|
+
q as getScriptType,
|
|
43
|
+
z as getTxHex,
|
|
44
|
+
J as getTxInfo,
|
|
45
|
+
Q as getUtxoInfo,
|
|
46
|
+
$ as handleContractError,
|
|
47
|
+
P as hexToUint8Array,
|
|
48
|
+
c as isAddressFromPublicKey,
|
|
49
|
+
aa as isKnownContractError,
|
|
50
|
+
g as isValidHex,
|
|
51
|
+
sa as parseUnfundedWasmTransaction,
|
|
52
|
+
_ as processPublicKeyToXOnly,
|
|
53
|
+
ea as pushTx,
|
|
54
|
+
ta as rateBasedTxBufferFee,
|
|
55
|
+
ra as selectUtxosForPegin,
|
|
56
|
+
oa as shouldAddChangeOutput,
|
|
57
|
+
p as stripHexPrefix,
|
|
58
|
+
x as toXOnly,
|
|
59
|
+
S as uint8ArrayToHex,
|
|
60
|
+
b as validateWalletPubkey
|
|
59
61
|
};
|
|
60
62
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -178,6 +178,12 @@ export interface RegisterPeginParams {
|
|
|
178
178
|
* Useful for multi-vault deposits where PoP only needs to be signed once.
|
|
179
179
|
*/
|
|
180
180
|
preSignedBtcPopSignature?: Hex;
|
|
181
|
+
/**
|
|
182
|
+
* SHA-256 hash of the depositor's secret (bytes32).
|
|
183
|
+
* Required for the new peg-in flow deposits.
|
|
184
|
+
* TODO: Wire into submitPeginRequest contract call when contract ABI is updated to support the new peg-in flow.
|
|
185
|
+
*/
|
|
186
|
+
depositorSecretHash?: Hex;
|
|
181
187
|
}
|
|
182
188
|
/**
|
|
183
189
|
* Result of registering a peg-in on Ethereum.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PeginManager.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/PeginManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAKL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mDAAmD,CAAC;AAG9E,OAAO,EAAkB,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAK7D,OAAO,EAML,KAAK,IAAI,EACV,MAAM,UAAU,CAAC;AAElB;;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;KAC3B,CAAC;IAEF;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;;OAGG;IACH,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAEhC;;;OAGG;IACH,6BAA6B,EAAE,MAAM,EAAE,CAAC;IAExC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,cAAc,EAAE,IAAI,EAAE,CAAC;IAEvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,aAAa,EAAE,IAAI,EAAE,CAAC;IAEtB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC;;;;;;OAMG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC,qEAAqE;IACrE,sBAAsB,EAAE,GAAG,CAAC;IAE5B;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"PeginManager.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/PeginManager.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../challengeAssert-34HqeVFH.cjs");exports.buildChallengeAssertPsbt=e.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=e.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=e.buildNoPayoutPsbt;exports.buildPayoutPsbt=e.buildPayoutPsbt;exports.buildPeginPsbt=e.buildPeginPsbt;exports.createPayoutScript=e.createPayoutScript;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.extractPayoutSignature=e.extractPayoutSignature;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@babylonlabs-io/babylon-tbv-rust-wasm"),e=require("../../../challengeAssert-34HqeVFH.cjs");Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>t.computeMinClaimValue});exports.buildChallengeAssertPsbt=e.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=e.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=e.buildNoPayoutPsbt;exports.buildPayoutPsbt=e.buildPayoutPsbt;exports.buildPeginPsbt=e.buildPeginPsbt;exports.createPayoutScript=e.createPayoutScript;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.extractPayoutSignature=e.extractPayoutSignature;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -49,6 +49,14 @@
|
|
|
49
49
|
* ### Script Generators
|
|
50
50
|
* - {@link createPayoutScript} - Generate taproot payout script
|
|
51
51
|
*
|
|
52
|
+
* ### WASM Functions
|
|
53
|
+
* - {@link computeMinClaimValue} - Compute the minimum claim value accepted by the vault provider
|
|
54
|
+
*
|
|
55
|
+
* ### Connector Parameter Types
|
|
56
|
+
* - `AssertPayoutNoPayoutConnectorParams` - Connector params for NoPayout/AssertPayout PSBTs
|
|
57
|
+
* - `ChallengeAssertConnectorParams` - Connector params for ChallengeAssert PSBTs
|
|
58
|
+
* - `PayoutConnectorParams` - Connector params for Payout PSBTs
|
|
59
|
+
*
|
|
52
60
|
* ### Bitcoin Utilities
|
|
53
61
|
* - {@link processPublicKeyToXOnly} - Convert any pubkey format to x-only
|
|
54
62
|
* - {@link validateWalletPubkey} - Validate wallet matches expected depositor
|
|
@@ -61,6 +69,8 @@
|
|
|
61
69
|
* @module primitives
|
|
62
70
|
*/
|
|
63
71
|
export type { Network } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
72
|
+
export { computeMinClaimValue } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
73
|
+
export type { AssertPayoutNoPayoutConnectorParams, ChallengeAssertConnectorParams, PayoutConnectorParams, } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
64
74
|
export { buildPeginPsbt } from './psbt/pegin';
|
|
65
75
|
export type { PeginParams, PeginPsbtResult } from './psbt/pegin';
|
|
66
76
|
export { buildPayoutPsbt, extractPayoutSignature } from './psbt/payout';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/primitives/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/primitives/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAGH,YAAY,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,YAAY,EACV,mCAAmC,EACnC,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,uCAAuC,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACxE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAG/E,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,UAAU,EACV,uBAAuB,EACvB,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,KAAK,4BAA4B,GAClC,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computeMinClaimValue as e } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
2
|
+
import { f as i, c as r, d as o, a as l, b as u, g as d, h as P, i as b, e as y, j as p, k as c, l as n, p as x, s as A, t as g, u as m, v } from "../../../challengeAssert-DVErOd8l.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
i as buildChallengeAssertPsbt,
|
|
5
|
+
r as buildDepositorPayoutPsbt,
|
|
6
|
+
o as buildNoPayoutPsbt,
|
|
7
|
+
l as buildPayoutPsbt,
|
|
8
|
+
u as buildPeginPsbt,
|
|
9
|
+
e as computeMinClaimValue,
|
|
8
10
|
d as createPayoutScript,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
P as deriveNativeSegwitAddress,
|
|
12
|
+
b as deriveTaprootAddress,
|
|
13
|
+
y as extractPayoutSignature,
|
|
14
|
+
p as hexToUint8Array,
|
|
15
|
+
c as isAddressFromPublicKey,
|
|
16
|
+
n as isValidHex,
|
|
17
|
+
x as processPublicKeyToXOnly,
|
|
18
|
+
A as stripHexPrefix,
|
|
19
|
+
g as toXOnly,
|
|
20
|
+
m as uint8ArrayToHex,
|
|
21
|
+
v as validateWalletPubkey
|
|
20
22
|
};
|
|
21
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/tbv/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../challengeAssert-34HqeVFH.cjs"),e=require("../PayoutManager-Dg_i_S7w.cjs");exports.buildChallengeAssertPsbt=t.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=t.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=t.buildNoPayoutPsbt;exports.buildPayoutPsbt=t.buildPayoutPsbt;exports.buildPeginPsbt=t.buildPeginPsbt;exports.createPayoutScript=t.createPayoutScript;exports.deriveNativeSegwitAddress=t.deriveNativeSegwitAddress;exports.deriveTaprootAddress=t.deriveTaprootAddress;exports.extractPayoutSignature=t.extractPayoutSignature;exports.getNetwork=t.getNetwork;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.BTCVaultsManagerABI=e.BTCVaultsManagerABI;exports.BTC_DUST_SAT=e.BTC_DUST_SAT;exports.BitcoinScriptType=e.BitcoinScriptType;exports.CONTRACT_ERRORS=e.CONTRACT_ERRORS;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.MEMPOOL_API_URLS=e.MEMPOOL_API_URLS;exports.P2TR_INPUT_SIZE=e.P2TR_INPUT_SIZE;exports.PayoutManager=e.PayoutManager;exports.PeginManager=e.PeginManager;exports.TX_BUFFER_SIZE_OVERHEAD=e.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=e.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.calculateBtcTxHash=e.calculateBtcTxHash;exports.createSplitTransaction=e.createSplitTransaction;exports.createSplitTransactionPsbt=e.createSplitTransactionPsbt;exports.extractErrorData=e.extractErrorData;exports.fundPeginTransaction=e.fundPeginTransaction;exports.getAddressTxs=e.getAddressTxs;exports.getAddressUtxos=e.getAddressUtxos;exports.getContractErrorMessage=e.getContractErrorMessage;exports.getDustThreshold=e.getDustThreshold;exports.getMempoolApiUrl=e.getMempoolApiUrl;exports.getNetworkFees=e.getNetworkFees;exports.getPsbtInputFields=e.getPsbtInputFields;exports.getScriptType=e.getScriptType;exports.getTxHex=e.getTxHex;exports.getTxInfo=e.getTxInfo;exports.getUtxoInfo=e.getUtxoInfo;exports.handleContractError=e.handleContractError;exports.isKnownContractError=e.isKnownContractError;exports.parseUnfundedWasmTransaction=e.parseUnfundedWasmTransaction;exports.pushTx=e.pushTx;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.selectUtxosForPegin=e.selectUtxosForPegin;exports.shouldAddChangeOutput=e.shouldAddChangeOutput;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../challengeAssert-34HqeVFH.cjs"),e=require("../PayoutManager-Dg_i_S7w.cjs");Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});exports.buildChallengeAssertPsbt=t.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=t.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=t.buildNoPayoutPsbt;exports.buildPayoutPsbt=t.buildPayoutPsbt;exports.buildPeginPsbt=t.buildPeginPsbt;exports.createPayoutScript=t.createPayoutScript;exports.deriveNativeSegwitAddress=t.deriveNativeSegwitAddress;exports.deriveTaprootAddress=t.deriveTaprootAddress;exports.extractPayoutSignature=t.extractPayoutSignature;exports.getNetwork=t.getNetwork;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.BTCVaultsManagerABI=e.BTCVaultsManagerABI;exports.BTC_DUST_SAT=e.BTC_DUST_SAT;exports.BitcoinScriptType=e.BitcoinScriptType;exports.CONTRACT_ERRORS=e.CONTRACT_ERRORS;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.MEMPOOL_API_URLS=e.MEMPOOL_API_URLS;exports.P2TR_INPUT_SIZE=e.P2TR_INPUT_SIZE;exports.PayoutManager=e.PayoutManager;exports.PeginManager=e.PeginManager;exports.TX_BUFFER_SIZE_OVERHEAD=e.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=e.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.calculateBtcTxHash=e.calculateBtcTxHash;exports.createSplitTransaction=e.createSplitTransaction;exports.createSplitTransactionPsbt=e.createSplitTransactionPsbt;exports.extractErrorData=e.extractErrorData;exports.fundPeginTransaction=e.fundPeginTransaction;exports.getAddressTxs=e.getAddressTxs;exports.getAddressUtxos=e.getAddressUtxos;exports.getContractErrorMessage=e.getContractErrorMessage;exports.getDustThreshold=e.getDustThreshold;exports.getMempoolApiUrl=e.getMempoolApiUrl;exports.getNetworkFees=e.getNetworkFees;exports.getPsbtInputFields=e.getPsbtInputFields;exports.getScriptType=e.getScriptType;exports.getTxHex=e.getTxHex;exports.getTxInfo=e.getTxInfo;exports.getUtxoInfo=e.getUtxoInfo;exports.handleContractError=e.handleContractError;exports.isKnownContractError=e.isKnownContractError;exports.parseUnfundedWasmTransaction=e.parseUnfundedWasmTransaction;exports.pushTx=e.pushTx;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.selectUtxosForPegin=e.selectUtxosForPegin;exports.shouldAddChangeOutput=e.shouldAddChangeOutput;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/tbv/index.js
CHANGED
|
@@ -1,60 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { computeMinClaimValue as e } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
2
|
+
import { f as r, c as o, d as i, a as T, b as n, g as d, h as l, i as u, e as A, m as E, j as P, k as c, l as g, p as _, s as p, t as x, u as S, v as b } from "../challengeAssert-DVErOd8l.js";
|
|
3
|
+
import { x as R, B as C, e as U, C as O, D as F, F as f, L as I, M, v as h, P as m, k as B, j as H, T as L, W as N, c as D, b as v, d as k, y as w, f as W, l as V, m as X, z as Y, g as K, n as Z, o as j, i as G, h as q, q as z, t as J, u as Q, E as $, A as aa, p as sa, w as ea, r as ta, s as ra, a as oa } from "../PayoutManager-rMj54HDh.js";
|
|
3
4
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
X as
|
|
35
|
-
Y as
|
|
36
|
-
K as
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
5
|
+
R as BTCVaultsManagerABI,
|
|
6
|
+
C as BTC_DUST_SAT,
|
|
7
|
+
U as BitcoinScriptType,
|
|
8
|
+
O as CONTRACT_ERRORS,
|
|
9
|
+
F as DUST_THRESHOLD,
|
|
10
|
+
f as FEE_SAFETY_MARGIN,
|
|
11
|
+
I as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
12
|
+
M as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
13
|
+
h as MEMPOOL_API_URLS,
|
|
14
|
+
m as P2TR_INPUT_SIZE,
|
|
15
|
+
B as PayoutManager,
|
|
16
|
+
H as PeginManager,
|
|
17
|
+
L as TX_BUFFER_SIZE_OVERHEAD,
|
|
18
|
+
N as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
19
|
+
r as buildChallengeAssertPsbt,
|
|
20
|
+
o as buildDepositorPayoutPsbt,
|
|
21
|
+
i as buildNoPayoutPsbt,
|
|
22
|
+
T as buildPayoutPsbt,
|
|
23
|
+
n as buildPeginPsbt,
|
|
24
|
+
D as calculateBtcTxHash,
|
|
25
|
+
e as computeMinClaimValue,
|
|
26
|
+
d as createPayoutScript,
|
|
27
|
+
v as createSplitTransaction,
|
|
28
|
+
k as createSplitTransactionPsbt,
|
|
29
|
+
l as deriveNativeSegwitAddress,
|
|
30
|
+
u as deriveTaprootAddress,
|
|
31
|
+
w as extractErrorData,
|
|
32
|
+
A as extractPayoutSignature,
|
|
33
|
+
W as fundPeginTransaction,
|
|
34
|
+
V as getAddressTxs,
|
|
35
|
+
X as getAddressUtxos,
|
|
36
|
+
Y as getContractErrorMessage,
|
|
37
|
+
K as getDustThreshold,
|
|
38
|
+
Z as getMempoolApiUrl,
|
|
39
|
+
E as getNetwork,
|
|
40
|
+
j as getNetworkFees,
|
|
41
|
+
G as getPsbtInputFields,
|
|
42
|
+
q as getScriptType,
|
|
43
|
+
z as getTxHex,
|
|
44
|
+
J as getTxInfo,
|
|
45
|
+
Q as getUtxoInfo,
|
|
46
|
+
$ as handleContractError,
|
|
47
|
+
P as hexToUint8Array,
|
|
48
|
+
c as isAddressFromPublicKey,
|
|
49
|
+
aa as isKnownContractError,
|
|
50
|
+
g as isValidHex,
|
|
51
|
+
sa as parseUnfundedWasmTransaction,
|
|
52
|
+
_ as processPublicKeyToXOnly,
|
|
53
|
+
ea as pushTx,
|
|
54
|
+
ta as rateBasedTxBufferFee,
|
|
55
|
+
ra as selectUtxosForPegin,
|
|
56
|
+
oa as shouldAddChangeOutput,
|
|
57
|
+
p as stripHexPrefix,
|
|
58
|
+
x as toXOnly,
|
|
59
|
+
S as uint8ArrayToHex,
|
|
60
|
+
b as validateWalletPubkey
|
|
59
61
|
};
|
|
60
62
|
//# sourceMappingURL=index.js.map
|
package/dist/tbv/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babylonlabs-io/ts-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.2.1-rc.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -41,6 +41,20 @@
|
|
|
41
41
|
"import": "./dist/shared/index.js"
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "tsc -b --noEmit tsconfig.lib.json && vite build",
|
|
46
|
+
"format": "prettier --check \"src/**/*.ts\"",
|
|
47
|
+
"format:fix": "prettier --write \"src/**/*.ts\"",
|
|
48
|
+
"lint": "eslint .",
|
|
49
|
+
"lint:fix": "eslint . --fix",
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"test:watch": "vitest",
|
|
52
|
+
"test:ui": "vitest --ui",
|
|
53
|
+
"test:coverage": "vitest run --coverage",
|
|
54
|
+
"docs:generate": "typedoc",
|
|
55
|
+
"docs:clean": "rm -rf docs/api && pnpm docs:generate",
|
|
56
|
+
"docs:validate": "typedoc --emit none"
|
|
57
|
+
},
|
|
44
58
|
"files": [
|
|
45
59
|
"dist",
|
|
46
60
|
"dist/**/*.d.ts"
|
|
@@ -62,15 +76,16 @@
|
|
|
62
76
|
"license": "ISC",
|
|
63
77
|
"description": "TypeScript SDK for Babylon protocol integrations",
|
|
64
78
|
"dependencies": {
|
|
79
|
+
"@babylonlabs-io/babylon-tbv-rust-wasm": "workspace:*",
|
|
65
80
|
"@bitcoin-js/tiny-secp256k1-asmjs": "2.2.3",
|
|
66
81
|
"bitcoinjs-lib": "6.1.7",
|
|
67
|
-
"buffer": "6.0.3"
|
|
68
|
-
"@babylonlabs-io/babylon-tbv-rust-wasm": "0.1.0"
|
|
82
|
+
"buffer": "6.0.3"
|
|
69
83
|
},
|
|
70
84
|
"peerDependencies": {
|
|
71
85
|
"viem": "^2.38.2"
|
|
72
86
|
},
|
|
73
87
|
"devDependencies": {
|
|
88
|
+
"@internal/eslint-config": "workspace:*",
|
|
74
89
|
"@vitest/coverage-v8": "^4.0.8",
|
|
75
90
|
"@vitest/ui": "^4.0.8",
|
|
76
91
|
"eslint-plugin-jsdoc": "^50.6.17",
|
|
@@ -83,25 +98,10 @@
|
|
|
83
98
|
"viem": "^2.38.2",
|
|
84
99
|
"vite": "^6.4.1",
|
|
85
100
|
"vite-plugin-dts": "^4.3.0",
|
|
86
|
-
"vitest": "^4.0.8"
|
|
87
|
-
"@internal/eslint-config": "0.0.0"
|
|
101
|
+
"vitest": "^4.0.8"
|
|
88
102
|
},
|
|
89
103
|
"publishConfig": {
|
|
90
104
|
"access": "public",
|
|
91
105
|
"provenance": true
|
|
92
|
-
},
|
|
93
|
-
"scripts": {
|
|
94
|
-
"build": "tsc -b --noEmit tsconfig.lib.json && vite build",
|
|
95
|
-
"format": "prettier --check \"src/**/*.ts\"",
|
|
96
|
-
"format:fix": "prettier --write \"src/**/*.ts\"",
|
|
97
|
-
"lint": "eslint .",
|
|
98
|
-
"lint:fix": "eslint . --fix",
|
|
99
|
-
"test": "vitest run",
|
|
100
|
-
"test:watch": "vitest",
|
|
101
|
-
"test:ui": "vitest --ui",
|
|
102
|
-
"test:coverage": "vitest run --coverage",
|
|
103
|
-
"docs:generate": "typedoc",
|
|
104
|
-
"docs:clean": "rm -rf docs/api && pnpm docs:generate",
|
|
105
|
-
"docs:validate": "typedoc --emit none"
|
|
106
106
|
}
|
|
107
|
-
}
|
|
107
|
+
}
|