@babylonlabs-io/ts-sdk 0.18.0 → 0.19.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/errors-DVNYib5y.cjs +2 -0
- package/dist/errors-DVNYib5y.cjs.map +1 -0
- package/dist/errors-aMocmFr-.js +1225 -0
- package/dist/errors-aMocmFr-.js.map +1 -0
- package/dist/index-BX-V3C9t.js +995 -0
- package/dist/index-BX-V3C9t.js.map +1 -0
- package/dist/index-BgnxXV5G.cjs +2 -0
- package/dist/index-BgnxXV5G.cjs.map +1 -0
- package/dist/index-BvFLf3vm.js +1513 -0
- package/dist/index-BvFLf3vm.js.map +1 -0
- package/dist/index-DpKhuCta.cjs +2 -0
- package/dist/index-DpKhuCta.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +84 -74
- package/dist/tbv/core/clients/eth/__tests__/protocol-params-reader.test.d.ts +2 -0
- package/dist/tbv/core/clients/eth/__tests__/protocol-params-reader.test.d.ts.map +1 -0
- package/dist/tbv/core/clients/eth/__tests__/signer-set-reader.test.d.ts +2 -0
- package/dist/tbv/core/clients/eth/__tests__/signer-set-reader.test.d.ts.map +1 -0
- package/dist/tbv/core/clients/eth/contract-address-resolver.d.ts +18 -0
- package/dist/tbv/core/clients/eth/contract-address-resolver.d.ts.map +1 -0
- package/dist/tbv/core/clients/eth/index.d.ts +4 -1
- package/dist/tbv/core/clients/eth/index.d.ts.map +1 -1
- package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts +27 -0
- package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts.map +1 -0
- package/dist/tbv/core/clients/eth/signer-set-reader.d.ts +37 -0
- package/dist/tbv/core/clients/eth/signer-set-reader.d.ts.map +1 -0
- package/dist/tbv/core/clients/eth/types.d.ts +80 -0
- package/dist/tbv/core/clients/eth/types.d.ts.map +1 -1
- package/dist/tbv/core/clients/index.cjs +1 -1
- package/dist/tbv/core/clients/index.js +25 -21
- package/dist/tbv/core/contracts/abis/ApplicationRegistry.abi.d.ts +74 -0
- package/dist/tbv/core/contracts/abis/ApplicationRegistry.abi.d.ts.map +1 -0
- package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +20 -0
- package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
- package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts +233 -0
- package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts.map +1 -0
- package/dist/tbv/core/contracts/index.d.ts +2 -0
- package/dist/tbv/core/contracts/index.d.ts.map +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +86 -76
- package/dist/tbv/core/services/htlc/__tests__/htlc.test.d.ts +2 -0
- package/dist/tbv/core/services/htlc/__tests__/htlc.test.d.ts.map +1 -0
- package/dist/tbv/core/services/htlc/index.d.ts +25 -0
- package/dist/tbv/core/services/htlc/index.d.ts.map +1 -0
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.d.ts +1 -0
- package/dist/tbv/core/services/index.d.ts.map +1 -1
- package/dist/tbv/core/services/index.js +6 -4
- package/dist/tbv/core/wots/__tests__/blockDerivation.test.d.ts +2 -0
- package/dist/tbv/core/wots/__tests__/blockDerivation.test.d.ts.map +1 -0
- package/dist/tbv/core/wots/blockDerivation.d.ts +36 -0
- package/dist/tbv/core/wots/blockDerivation.d.ts.map +1 -0
- package/dist/tbv/core/wots/index.d.ts +1 -0
- package/dist/tbv/core/wots/index.d.ts.map +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +86 -76
- package/package.json +1 -1
- package/dist/errors-DAKpPfl7.cjs +0 -2
- package/dist/errors-DAKpPfl7.cjs.map +0 -1
- package/dist/errors-DARTQrP3.js +0 -1510
- package/dist/errors-DARTQrP3.js.map +0 -1
- package/dist/index-DKfhZvdn.cjs +0 -2
- package/dist/index-DKfhZvdn.cjs.map +0 -1
- package/dist/index-qIcjkxLw.js +0 -911
- package/dist/index-qIcjkxLw.js.map +0 -1
- package/dist/signAndSubmitPayouts-CAOEAQp9.js +0 -490
- package/dist/signAndSubmitPayouts-CAOEAQp9.js.map +0 -1
- package/dist/signAndSubmitPayouts-CSJmcPQN.cjs +0 -2
- package/dist/signAndSubmitPayouts-CSJmcPQN.cjs.map +0 -1
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProtocolParams Contract ABI
|
|
3
|
+
*
|
|
4
|
+
* Minimal ABI containing only the read functions needed by the SDK.
|
|
5
|
+
* Generated from vault-contracts-aave-v4 IProtocolParams.sol interface.
|
|
6
|
+
*
|
|
7
|
+
* @module contracts/abis/ProtocolParams
|
|
8
|
+
*/
|
|
9
|
+
export declare const ProtocolParamsABI: readonly [{
|
|
10
|
+
readonly type: "function";
|
|
11
|
+
readonly name: "getTBVProtocolParams";
|
|
12
|
+
readonly inputs: readonly [];
|
|
13
|
+
readonly outputs: readonly [{
|
|
14
|
+
readonly name: "";
|
|
15
|
+
readonly type: "tuple";
|
|
16
|
+
readonly internalType: "struct IProtocolParams.TBVProtocolParams";
|
|
17
|
+
readonly components: readonly [{
|
|
18
|
+
readonly name: "minimumPegInAmount";
|
|
19
|
+
readonly type: "uint64";
|
|
20
|
+
readonly internalType: "uint64";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "maxPegInAmount";
|
|
23
|
+
readonly type: "uint64";
|
|
24
|
+
readonly internalType: "uint64";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "pegInAckTimeout";
|
|
27
|
+
readonly type: "uint64";
|
|
28
|
+
readonly internalType: "uint64";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "pegInActivationTimeout";
|
|
31
|
+
readonly type: "uint64";
|
|
32
|
+
readonly internalType: "uint64";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "maxHtlcOutputCount";
|
|
35
|
+
readonly type: "uint8";
|
|
36
|
+
readonly internalType: "uint8";
|
|
37
|
+
}];
|
|
38
|
+
}];
|
|
39
|
+
readonly stateMutability: "view";
|
|
40
|
+
}, {
|
|
41
|
+
readonly type: "function";
|
|
42
|
+
readonly name: "getLatestOffchainParams";
|
|
43
|
+
readonly inputs: readonly [];
|
|
44
|
+
readonly outputs: readonly [{
|
|
45
|
+
readonly name: "";
|
|
46
|
+
readonly type: "tuple";
|
|
47
|
+
readonly internalType: "struct IProtocolParams.VersionedOffchainParams";
|
|
48
|
+
readonly components: readonly [{
|
|
49
|
+
readonly name: "timelockAssert";
|
|
50
|
+
readonly type: "uint256";
|
|
51
|
+
readonly internalType: "uint256";
|
|
52
|
+
}, {
|
|
53
|
+
readonly name: "timelockChallengeAssert";
|
|
54
|
+
readonly type: "uint256";
|
|
55
|
+
readonly internalType: "uint256";
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "securityCouncilKeys";
|
|
58
|
+
readonly type: "bytes32[]";
|
|
59
|
+
readonly internalType: "bytes32[]";
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "councilQuorum";
|
|
62
|
+
readonly type: "uint8";
|
|
63
|
+
readonly internalType: "uint8";
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "feeRate";
|
|
66
|
+
readonly type: "uint64";
|
|
67
|
+
readonly internalType: "uint64";
|
|
68
|
+
}, {
|
|
69
|
+
readonly name: "babeTotalInstances";
|
|
70
|
+
readonly type: "uint16";
|
|
71
|
+
readonly internalType: "uint16";
|
|
72
|
+
}, {
|
|
73
|
+
readonly name: "babeInstancesToFinalize";
|
|
74
|
+
readonly type: "uint8";
|
|
75
|
+
readonly internalType: "uint8";
|
|
76
|
+
}, {
|
|
77
|
+
readonly name: "minVpCommissionBps";
|
|
78
|
+
readonly type: "uint16";
|
|
79
|
+
readonly internalType: "uint16";
|
|
80
|
+
}, {
|
|
81
|
+
readonly name: "tRefund";
|
|
82
|
+
readonly type: "uint32";
|
|
83
|
+
readonly internalType: "uint32";
|
|
84
|
+
}, {
|
|
85
|
+
readonly name: "tStale";
|
|
86
|
+
readonly type: "uint32";
|
|
87
|
+
readonly internalType: "uint32";
|
|
88
|
+
}, {
|
|
89
|
+
readonly name: "minPeginFeeRate";
|
|
90
|
+
readonly type: "uint64";
|
|
91
|
+
readonly internalType: "uint64";
|
|
92
|
+
}, {
|
|
93
|
+
readonly name: "proverProgramVersion";
|
|
94
|
+
readonly type: "uint16";
|
|
95
|
+
readonly internalType: "uint16";
|
|
96
|
+
}, {
|
|
97
|
+
readonly name: "minPrepeginDepth";
|
|
98
|
+
readonly type: "uint32";
|
|
99
|
+
readonly internalType: "uint32";
|
|
100
|
+
}];
|
|
101
|
+
}];
|
|
102
|
+
readonly stateMutability: "view";
|
|
103
|
+
}, {
|
|
104
|
+
readonly type: "function";
|
|
105
|
+
readonly name: "getOffchainParamsByVersion";
|
|
106
|
+
readonly inputs: readonly [{
|
|
107
|
+
readonly name: "versionNumber";
|
|
108
|
+
readonly type: "uint16";
|
|
109
|
+
readonly internalType: "uint16";
|
|
110
|
+
}];
|
|
111
|
+
readonly outputs: readonly [{
|
|
112
|
+
readonly name: "";
|
|
113
|
+
readonly type: "tuple";
|
|
114
|
+
readonly internalType: "struct IProtocolParams.VersionedOffchainParams";
|
|
115
|
+
readonly components: readonly [{
|
|
116
|
+
readonly name: "timelockAssert";
|
|
117
|
+
readonly type: "uint256";
|
|
118
|
+
readonly internalType: "uint256";
|
|
119
|
+
}, {
|
|
120
|
+
readonly name: "timelockChallengeAssert";
|
|
121
|
+
readonly type: "uint256";
|
|
122
|
+
readonly internalType: "uint256";
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "securityCouncilKeys";
|
|
125
|
+
readonly type: "bytes32[]";
|
|
126
|
+
readonly internalType: "bytes32[]";
|
|
127
|
+
}, {
|
|
128
|
+
readonly name: "councilQuorum";
|
|
129
|
+
readonly type: "uint8";
|
|
130
|
+
readonly internalType: "uint8";
|
|
131
|
+
}, {
|
|
132
|
+
readonly name: "feeRate";
|
|
133
|
+
readonly type: "uint64";
|
|
134
|
+
readonly internalType: "uint64";
|
|
135
|
+
}, {
|
|
136
|
+
readonly name: "babeTotalInstances";
|
|
137
|
+
readonly type: "uint16";
|
|
138
|
+
readonly internalType: "uint16";
|
|
139
|
+
}, {
|
|
140
|
+
readonly name: "babeInstancesToFinalize";
|
|
141
|
+
readonly type: "uint8";
|
|
142
|
+
readonly internalType: "uint8";
|
|
143
|
+
}, {
|
|
144
|
+
readonly name: "minVpCommissionBps";
|
|
145
|
+
readonly type: "uint16";
|
|
146
|
+
readonly internalType: "uint16";
|
|
147
|
+
}, {
|
|
148
|
+
readonly name: "tRefund";
|
|
149
|
+
readonly type: "uint32";
|
|
150
|
+
readonly internalType: "uint32";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "tStale";
|
|
153
|
+
readonly type: "uint32";
|
|
154
|
+
readonly internalType: "uint32";
|
|
155
|
+
}, {
|
|
156
|
+
readonly name: "minPeginFeeRate";
|
|
157
|
+
readonly type: "uint64";
|
|
158
|
+
readonly internalType: "uint64";
|
|
159
|
+
}, {
|
|
160
|
+
readonly name: "proverProgramVersion";
|
|
161
|
+
readonly type: "uint16";
|
|
162
|
+
readonly internalType: "uint16";
|
|
163
|
+
}, {
|
|
164
|
+
readonly name: "minPrepeginDepth";
|
|
165
|
+
readonly type: "uint32";
|
|
166
|
+
readonly internalType: "uint32";
|
|
167
|
+
}];
|
|
168
|
+
}];
|
|
169
|
+
readonly stateMutability: "view";
|
|
170
|
+
}, {
|
|
171
|
+
readonly type: "function";
|
|
172
|
+
readonly name: "latestOffchainParamsVersion";
|
|
173
|
+
readonly inputs: readonly [];
|
|
174
|
+
readonly outputs: readonly [{
|
|
175
|
+
readonly name: "";
|
|
176
|
+
readonly type: "uint16";
|
|
177
|
+
readonly internalType: "uint16";
|
|
178
|
+
}];
|
|
179
|
+
readonly stateMutability: "view";
|
|
180
|
+
}, {
|
|
181
|
+
readonly type: "function";
|
|
182
|
+
readonly name: "getUniversalChallengersByVersion";
|
|
183
|
+
readonly inputs: readonly [{
|
|
184
|
+
readonly name: "versionNumber";
|
|
185
|
+
readonly type: "uint16";
|
|
186
|
+
readonly internalType: "uint16";
|
|
187
|
+
}];
|
|
188
|
+
readonly outputs: readonly [{
|
|
189
|
+
readonly name: "";
|
|
190
|
+
readonly type: "tuple[]";
|
|
191
|
+
readonly internalType: "struct BTCVaultTypes.AddressBTCKeyPair[]";
|
|
192
|
+
readonly components: readonly [{
|
|
193
|
+
readonly name: "ethAddress";
|
|
194
|
+
readonly type: "address";
|
|
195
|
+
readonly internalType: "address";
|
|
196
|
+
}, {
|
|
197
|
+
readonly name: "btcPubKey";
|
|
198
|
+
readonly type: "bytes32";
|
|
199
|
+
readonly internalType: "bytes32";
|
|
200
|
+
}];
|
|
201
|
+
}];
|
|
202
|
+
readonly stateMutability: "view";
|
|
203
|
+
}, {
|
|
204
|
+
readonly type: "function";
|
|
205
|
+
readonly name: "getCurrentUniversalChallengers";
|
|
206
|
+
readonly inputs: readonly [];
|
|
207
|
+
readonly outputs: readonly [{
|
|
208
|
+
readonly name: "";
|
|
209
|
+
readonly type: "tuple[]";
|
|
210
|
+
readonly internalType: "struct BTCVaultTypes.AddressBTCKeyPair[]";
|
|
211
|
+
readonly components: readonly [{
|
|
212
|
+
readonly name: "ethAddress";
|
|
213
|
+
readonly type: "address";
|
|
214
|
+
readonly internalType: "address";
|
|
215
|
+
}, {
|
|
216
|
+
readonly name: "btcPubKey";
|
|
217
|
+
readonly type: "bytes32";
|
|
218
|
+
readonly internalType: "bytes32";
|
|
219
|
+
}];
|
|
220
|
+
}];
|
|
221
|
+
readonly stateMutability: "view";
|
|
222
|
+
}, {
|
|
223
|
+
readonly type: "function";
|
|
224
|
+
readonly name: "latestUniversalChallengersVersion";
|
|
225
|
+
readonly inputs: readonly [];
|
|
226
|
+
readonly outputs: readonly [{
|
|
227
|
+
readonly name: "";
|
|
228
|
+
readonly type: "uint16";
|
|
229
|
+
readonly internalType: "uint16";
|
|
230
|
+
}];
|
|
231
|
+
readonly stateMutability: "view";
|
|
232
|
+
}];
|
|
233
|
+
//# sourceMappingURL=ProtocolParams.abi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProtocolParams.abi.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/contracts/abis/ProtocolParams.abi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiSpB,CAAC"}
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module contracts
|
|
8
8
|
*/
|
|
9
|
+
export { ApplicationRegistryABI } from './abis/ApplicationRegistry.abi';
|
|
9
10
|
export { BTCVaultRegistryABI } from './abis/BTCVaultRegistry.abi';
|
|
11
|
+
export { ProtocolParamsABI } from './abis/ProtocolParams.abi';
|
|
10
12
|
export { CONTRACT_ERRORS, extractErrorData, getContractErrorMessage, isKnownContractError, handleContractError, } from './errors';
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/contracts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/contracts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,UAAU,CAAC"}
|
package/dist/tbv/core/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../challengeAssert-D_k_ADgP.cjs"),u=require("@babylonlabs-io/babylon-tbv-rust-wasm"),n=require("../../payout-CfsDnjKI.cjs"),e=require("../../constants-EiyZkXce.cjs"),s=require("../../psbtInputFields-C0nKn_GD.cjs"),l=require("../../fundPeginTransaction-EbrZzlrh.cjs"),P=require("../../signing-Deg5lCoC.cjs"),r=require("../../errors-DVNYib5y.cjs"),a=require("../../index-BgnxXV5G.cjs"),t=require("../../index-DpKhuCta.cjs"),i=require("../../types-DEWiqXYp.cjs");exports.buildChallengeAssertPsbt=o.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=o.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=o.buildNoPayoutPsbt;exports.buildPeginInputPsbt=o.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=o.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=o.buildPrePeginPsbt;exports.buildRefundPsbt=o.buildRefundPsbt;exports.computeNumLocalChallengers=o.computeNumLocalChallengers;exports.extractPeginInputSignature=o.extractPeginInputSignature;exports.finalizePeginInputPsbt=o.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>u.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>u.deriveVaultId});exports.buildPayoutPsbt=n.buildPayoutPsbt;exports.createPayoutScript=n.createPayoutScript;exports.extractPayoutSignature=n.extractPayoutSignature;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.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.getNetwork=e.getNetwork;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;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;exports.BitcoinScriptType=s.BitcoinScriptType;exports.calculateBtcTxHash=s.calculateBtcTxHash;exports.getDustThreshold=s.getDustThreshold;exports.getPsbtInputFields=s.getPsbtInputFields;exports.getScriptType=s.getScriptType;exports.selectUtxosForPegin=s.selectUtxosForPegin;exports.shouldAddChangeOutput=s.shouldAddChangeOutput;exports.fundPeginTransaction=l.fundPeginTransaction;exports.parseUnfundedWasmTransaction=l.parseUnfundedWasmTransaction;exports.createTaprootScriptPathSignOptions=P.createTaprootScriptPathSignOptions;exports.CONTRACT_ERRORS=r.CONTRACT_ERRORS;exports.PeginManager=r.PeginManager;exports.computeWotsBlockPublicKeysHash=r.computeWotsBlockPublicKeysHash;exports.computeWotsPkHash=r.computeWotsPkHash;exports.deriveWotsBlockPublicKeys=r.deriveWotsBlockPublicKeys;exports.deriveWotsKeypair=r.deriveWotsKeypair;exports.deriveWotsPkHash=r.deriveWotsPkHash;exports.extractErrorData=r.extractErrorData;exports.getContractErrorMessage=r.getContractErrorMessage;exports.handleContractError=r.handleContractError;exports.isKnownContractError=r.isKnownContractError;exports.isWotsMismatchError=r.isWotsMismatchError;exports.keypairToPublicKey=r.keypairToPublicKey;exports.mnemonicToWotsSeed=r.mnemonicToWotsSeed;exports.PayoutManager=a.PayoutManager;exports.computeHashlock=a.computeHashlock;exports.pollAndSignPayouts=a.pollAndSignPayouts;exports.signDepositorGraph=a.signDepositorGraph;exports.submitWotsPublicKey=a.submitWotsPublicKey;exports.validateSecretAgainstHashlock=a.validateSecretAgainstHashlock;exports.waitForPeginStatus=a.waitForPeginStatus;exports.ApplicationRegistryABI=t.ApplicationRegistryABI;exports.BTCVaultRegistryABI=t.BTCVaultRegistryABI;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.ProtocolParamsABI=t.ProtocolParamsABI;exports.VaultProviderRpcClient=t.VaultProviderRpcClient;exports.ViemProtocolParamsReader=t.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=t.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=t.ViemVaultKeeperReader;exports.ViemVaultRegistryReader=t.ViemVaultRegistryReader;exports.VpResponseValidationError=t.VpResponseValidationError;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.pushTx=t.pushTx;exports.resolveProtocolAddresses=t.resolveProtocolAddresses;exports.DaemonStatus=i.DaemonStatus;exports.JSON_RPC_ERROR_CODES=i.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=i.JsonRpcClient;exports.JsonRpcError=i.JsonRpcError;exports.POST_WOTS_STATUSES=i.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=i.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=i.RpcErrorCode;exports.VP_TERMINAL_STATUSES=i.VP_TERMINAL_STATUSES;exports.VP_TRANSIENT_STATUSES=i.VP_TRANSIENT_STATUSES;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/tbv/core/index.js
CHANGED
|
@@ -1,102 +1,112 @@
|
|
|
1
|
-
import { j as e, h as t, i as r, d as o, a as i, b as n, g as
|
|
2
|
-
import { computeMinClaimValue as
|
|
3
|
-
import { b as
|
|
4
|
-
import { B as
|
|
5
|
-
import { B as G, c as Y, g as J, d as
|
|
1
|
+
import { j as e, h as t, i as r, d as o, a as i, b as n, g as P, c as l, e as T, f as u } from "../../challengeAssert-k5_LWUtO.js";
|
|
2
|
+
import { computeMinClaimValue as p, deriveVaultId as c } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
+
import { b as E, c as g, e as _ } from "../../payout-Ce9vSs9e.js";
|
|
4
|
+
import { B as R, D as m, F as b, L as x, M as I, P as f, c as y, S as O, T as h, W as C, d as U, a as F, e as V, g as N, h as B, i as H, b as D, f as L, p as M, r as v, s as W, t as k, u as K, v as w } from "../../constants-Q7v2O7Ps.js";
|
|
5
|
+
import { B as G, c as Y, g as J, d as j, b as Z, s as z, a as q } from "../../psbtInputFields-DO0ELwiv.js";
|
|
6
6
|
import { f as $, p as aa } from "../../fundPeginTransaction-DpwnDslW.js";
|
|
7
7
|
import { c as ea } from "../../signing-Drwr3bXB.js";
|
|
8
|
-
import { C as ra, P as oa,
|
|
9
|
-
import { P as
|
|
10
|
-
import { B as
|
|
11
|
-
import { D as
|
|
8
|
+
import { C as ra, P as oa, b as ia, c as na, a as Pa, d as la, f as Ta, e as ua, g as da, h as pa, i as ca, j as Sa, k as Ea, m as ga } from "../../errors-aMocmFr-.js";
|
|
9
|
+
import { P as Aa, c as Ra, p as ma, a as ba, s as xa, v as Ia, w as fa } from "../../index-BX-V3C9t.js";
|
|
10
|
+
import { A as Oa, B as ha, M as Ca, P as Ua, V as Fa, i as Va, j as Na, k as Ba, l as Ha, h as Da, g as La, a as Ma, b as va, c as Wa, d as ka, e as Ka, f as wa, p as Xa, r as Ga } from "../../index-BvFLf3vm.js";
|
|
11
|
+
import { D as Ja, b as ja, J as Za, a as za, d as qa, P as Qa, R as $a, c as as, V as ss } from "../../types-D1rYwwCu.js";
|
|
12
12
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
Oa as ApplicationRegistryABI,
|
|
14
|
+
ha as BTCVaultRegistryABI,
|
|
15
|
+
R as BTC_DUST_SAT,
|
|
15
16
|
G as BitcoinScriptType,
|
|
16
17
|
ra as CONTRACT_ERRORS,
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
m as DUST_THRESHOLD,
|
|
19
|
+
Ja as DaemonStatus,
|
|
19
20
|
b as FEE_SAFETY_MARGIN,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
ja as JSON_RPC_ERROR_CODES,
|
|
22
|
+
Za as JsonRpcClient,
|
|
23
|
+
za as JsonRpcError,
|
|
24
|
+
x as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
25
|
+
I as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
26
|
+
Ca as MEMPOOL_API_URLS,
|
|
27
|
+
f as P2TR_INPUT_SIZE,
|
|
28
|
+
y as PEGIN_FIXED_OUTPUTS,
|
|
29
|
+
qa as POST_WOTS_STATUSES,
|
|
30
|
+
Qa as PRE_DEPOSITOR_SIGNATURES_STATES,
|
|
31
|
+
Aa as PayoutManager,
|
|
31
32
|
oa as PeginManager,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
Ua as ProtocolParamsABI,
|
|
34
|
+
$a as RpcErrorCode,
|
|
35
|
+
O as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
36
|
+
h as TX_BUFFER_SIZE_OVERHEAD,
|
|
37
|
+
as as VP_TERMINAL_STATUSES,
|
|
38
|
+
ss as VP_TRANSIENT_STATUSES,
|
|
39
|
+
Fa as VaultProviderRpcClient,
|
|
40
|
+
Va as ViemProtocolParamsReader,
|
|
41
|
+
Na as ViemUniversalChallengerReader,
|
|
42
|
+
Ba as ViemVaultKeeperReader,
|
|
43
|
+
Ha as ViemVaultRegistryReader,
|
|
44
|
+
Da as VpResponseValidationError,
|
|
45
|
+
C as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
41
46
|
e as buildChallengeAssertPsbt,
|
|
42
47
|
t as buildDepositorPayoutPsbt,
|
|
43
48
|
r as buildNoPayoutPsbt,
|
|
44
|
-
|
|
49
|
+
E as buildPayoutPsbt,
|
|
45
50
|
o as buildPeginInputPsbt,
|
|
46
51
|
i as buildPeginTxFromFundedPrePegin,
|
|
47
52
|
n as buildPrePeginPsbt,
|
|
48
|
-
|
|
53
|
+
P as buildRefundPsbt,
|
|
49
54
|
Y as calculateBtcTxHash,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
Ra as computeHashlock,
|
|
56
|
+
p as computeMinClaimValue,
|
|
57
|
+
l as computeNumLocalChallengers,
|
|
58
|
+
ia as computeWotsBlockPublicKeysHash,
|
|
59
|
+
na as computeWotsPkHash,
|
|
60
|
+
g as createPayoutScript,
|
|
54
61
|
ea as createTaprootScriptPathSignOptions,
|
|
55
|
-
|
|
62
|
+
U as deriveNativeSegwitAddress,
|
|
56
63
|
F as deriveTaprootAddress,
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
c as deriveVaultId,
|
|
65
|
+
Pa as deriveWotsBlockPublicKeys,
|
|
66
|
+
la as deriveWotsKeypair,
|
|
59
67
|
Ta as deriveWotsPkHash,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
V as ensureHexPrefix,
|
|
69
|
+
ua as extractErrorData,
|
|
70
|
+
_ as extractPayoutSignature,
|
|
71
|
+
T as extractPeginInputSignature,
|
|
72
|
+
u as finalizePeginInputPsbt,
|
|
65
73
|
$ as fundPeginTransaction,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
La as getAddressTxs,
|
|
75
|
+
Ma as getAddressUtxos,
|
|
76
|
+
da as getContractErrorMessage,
|
|
69
77
|
J as getDustThreshold,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
va as getMempoolApiUrl,
|
|
79
|
+
N as getNetwork,
|
|
80
|
+
Wa as getNetworkFees,
|
|
81
|
+
j as getPsbtInputFields,
|
|
82
|
+
Z as getScriptType,
|
|
83
|
+
ka as getTxHex,
|
|
84
|
+
Ka as getTxInfo,
|
|
85
|
+
wa as getUtxoInfo,
|
|
78
86
|
pa as handleContractError,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
B as hexToUint8Array,
|
|
88
|
+
H as isAddressFromPublicKey,
|
|
89
|
+
ca as isKnownContractError,
|
|
90
|
+
D as isValidHex,
|
|
91
|
+
Sa as isWotsMismatchError,
|
|
92
|
+
Ea as keypairToPublicKey,
|
|
93
|
+
ga as mnemonicToWotsSeed,
|
|
86
94
|
aa as parseUnfundedWasmTransaction,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
L as peginOutputCount,
|
|
96
|
+
ma as pollAndSignPayouts,
|
|
97
|
+
M as processPublicKeyToXOnly,
|
|
98
|
+
Xa as pushTx,
|
|
99
|
+
v as rateBasedTxBufferFee,
|
|
100
|
+
Ga as resolveProtocolAddresses,
|
|
92
101
|
z as selectUtxosForPegin,
|
|
93
102
|
q as shouldAddChangeOutput,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
103
|
+
ba as signDepositorGraph,
|
|
104
|
+
W as stripHexPrefix,
|
|
105
|
+
xa as submitWotsPublicKey,
|
|
97
106
|
k as toXOnly,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
107
|
+
K as uint8ArrayToHex,
|
|
108
|
+
Ia as validateSecretAgainstHashlock,
|
|
109
|
+
w as validateWalletPubkey,
|
|
110
|
+
fa as waitForPeginStatus
|
|
101
111
|
};
|
|
102
112
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htlc.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/htlc/__tests__/htlc.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Hex } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* Compute the SHA-256 hashlock from a secret preimage.
|
|
4
|
+
*
|
|
5
|
+
* Matches the on-chain validation: `sha256(abi.encodePacked(s))` where `s` is a `bytes32`.
|
|
6
|
+
* `abi.encodePacked(bytes32)` is just the raw 32 bytes — no ABI padding.
|
|
7
|
+
*
|
|
8
|
+
* @param secret - 0x-prefixed bytes32 secret (66 hex chars)
|
|
9
|
+
* @returns 0x-prefixed bytes32 SHA-256 hash
|
|
10
|
+
* @throws if secret is not exactly 32 bytes
|
|
11
|
+
*/
|
|
12
|
+
export declare function computeHashlock(secret: Hex): Hex;
|
|
13
|
+
/**
|
|
14
|
+
* Validate that a secret's SHA-256 hash matches the expected hashlock.
|
|
15
|
+
*
|
|
16
|
+
* Use this for client-side pre-validation before sending the activation
|
|
17
|
+
* transaction to avoid wasting gas on a contract revert.
|
|
18
|
+
*
|
|
19
|
+
* @param secret - 0x-prefixed bytes32 secret (66 hex chars)
|
|
20
|
+
* @param hashlock - 0x-prefixed bytes32 expected hashlock from the vault
|
|
21
|
+
* @returns true if SHA-256(secret) matches the hashlock
|
|
22
|
+
* @throws if secret or hashlock is not exactly 32 bytes
|
|
23
|
+
*/
|
|
24
|
+
export declare function validateSecretAgainstHashlock(secret: Hex, hashlock: Hex): boolean;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/htlc/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAgDhC;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,CAKhD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,GAAG,EACX,QAAQ,EAAE,GAAG,GACZ,OAAO,CAQT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../index-BgnxXV5G.cjs");exports.computeHashlock=t.computeHashlock;exports.pollAndSignPayouts=t.pollAndSignPayouts;exports.signDepositorGraph=t.signDepositorGraph;exports.submitWotsPublicKey=t.submitWotsPublicKey;exports.validateSecretAgainstHashlock=t.validateSecretAgainstHashlock;exports.waitForPeginStatus=t.waitForPeginStatus;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/services/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/services/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { p as o, a as
|
|
1
|
+
import { c as t, p as o, a as i, s as e, v as c, w as l } from "../../../index-BX-V3C9t.js";
|
|
2
2
|
export {
|
|
3
|
+
t as computeHashlock,
|
|
3
4
|
o as pollAndSignPayouts,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
i as signDepositorGraph,
|
|
6
|
+
e as submitWotsPublicKey,
|
|
7
|
+
c as validateSecretAgainstHashlock,
|
|
8
|
+
l as waitForPeginStatus
|
|
7
9
|
};
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockDerivation.test.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/wots/__tests__/blockDerivation.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { WotsBlockPublicKey } from '../clients/vault-provider/types';
|
|
2
|
+
import { Hex } from 'viem';
|
|
3
|
+
/**
|
|
4
|
+
* Derive deterministic WOTS block public keys for a specific vault.
|
|
5
|
+
*
|
|
6
|
+
* Produces an array of {@link WotsBlockPublicKey} (one per assert block),
|
|
7
|
+
* matching the Rust `Vec<babe::wots::PublicKey>` format expected by the
|
|
8
|
+
* vault provider's `submitDepositorWotsKey` RPC.
|
|
9
|
+
*
|
|
10
|
+
* The VP expects exactly 2 blocks and validates that keccak256 of the
|
|
11
|
+
* concatenated chain tips matches the on-chain `depositorWotsPkHash`.
|
|
12
|
+
*
|
|
13
|
+
* @param seed - 64-byte seed (e.g. from `mnemonicToWotsSeed`). Zeroed after use.
|
|
14
|
+
* @param vaultId - Vault identifier / pegin tx hash (hex, with or without 0x prefix).
|
|
15
|
+
* @param depositorPk - Depositor's BTC public key (hex, with or without 0x prefix).
|
|
16
|
+
* @param appContractAddress - Application contract address.
|
|
17
|
+
* @returns Array of 2 WOTS block public keys.
|
|
18
|
+
* @throws If seed is not exactly 64 bytes.
|
|
19
|
+
*/
|
|
20
|
+
export declare function deriveWotsBlockPublicKeys(seed: Uint8Array, vaultId: string, depositorPk: string, appContractAddress: string): Promise<WotsBlockPublicKey[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Compute the keccak256 hash of WOTS block public keys.
|
|
23
|
+
*
|
|
24
|
+
* Matches Rust `btc_vault::wots_public_keys_keccak256`: for each block,
|
|
25
|
+
* chain tips are concatenated in canonical order
|
|
26
|
+
* `[checksum_minor, checksum_major, message_terminals...]`, then all
|
|
27
|
+
* blocks are concatenated and hashed.
|
|
28
|
+
*
|
|
29
|
+
* The result is committed on-chain as `depositorWotsPkHash` so the vault
|
|
30
|
+
* provider can verify submitted WOTS public keys.
|
|
31
|
+
*
|
|
32
|
+
* @param publicKeys - Array of WOTS block public keys (must not be empty).
|
|
33
|
+
* @returns 0x-prefixed keccak256 hex string.
|
|
34
|
+
*/
|
|
35
|
+
export declare function computeWotsBlockPublicKeysHash(publicKeys: WotsBlockPublicKey[]): Hex;
|
|
36
|
+
//# sourceMappingURL=blockDerivation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockDerivation.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/wots/blockDerivation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAEnB,MAAM,iCAAiC,CAAC;AAMzC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAmMhC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAuF/B;AAuBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,kBAAkB,EAAE,GAC/B,GAAG,CAsCL"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { WotsKeypair, WotsPublicKey, WotsKeyProvider } from './types';
|
|
2
2
|
export { mnemonicToWotsSeed, deriveWotsKeypair, keypairToPublicKey, computeWotsPkHash, } from './derivation';
|
|
3
|
+
export { deriveWotsBlockPublicKeys, computeWotsBlockPublicKeysHash, } from './blockDerivation';
|
|
3
4
|
export { deriveWotsPkHash } from './deriveWotsPkHash';
|
|
4
5
|
export { isWotsMismatchError } from './errors';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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
|
+
{"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,EACL,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/tbv/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../challengeAssert-D_k_ADgP.cjs"),u=require("@babylonlabs-io/babylon-tbv-rust-wasm"),n=require("../payout-CfsDnjKI.cjs"),e=require("../constants-EiyZkXce.cjs"),s=require("../psbtInputFields-C0nKn_GD.cjs"),l=require("../fundPeginTransaction-EbrZzlrh.cjs"),P=require("../signing-Deg5lCoC.cjs"),r=require("../errors-DVNYib5y.cjs"),a=require("../index-BgnxXV5G.cjs"),t=require("../index-DpKhuCta.cjs"),i=require("../types-DEWiqXYp.cjs");exports.buildChallengeAssertPsbt=o.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=o.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=o.buildNoPayoutPsbt;exports.buildPeginInputPsbt=o.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=o.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=o.buildPrePeginPsbt;exports.buildRefundPsbt=o.buildRefundPsbt;exports.computeNumLocalChallengers=o.computeNumLocalChallengers;exports.extractPeginInputSignature=o.extractPeginInputSignature;exports.finalizePeginInputPsbt=o.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>u.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>u.deriveVaultId});exports.buildPayoutPsbt=n.buildPayoutPsbt;exports.createPayoutScript=n.createPayoutScript;exports.extractPayoutSignature=n.extractPayoutSignature;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.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.getNetwork=e.getNetwork;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;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;exports.BitcoinScriptType=s.BitcoinScriptType;exports.calculateBtcTxHash=s.calculateBtcTxHash;exports.getDustThreshold=s.getDustThreshold;exports.getPsbtInputFields=s.getPsbtInputFields;exports.getScriptType=s.getScriptType;exports.selectUtxosForPegin=s.selectUtxosForPegin;exports.shouldAddChangeOutput=s.shouldAddChangeOutput;exports.fundPeginTransaction=l.fundPeginTransaction;exports.parseUnfundedWasmTransaction=l.parseUnfundedWasmTransaction;exports.createTaprootScriptPathSignOptions=P.createTaprootScriptPathSignOptions;exports.CONTRACT_ERRORS=r.CONTRACT_ERRORS;exports.PeginManager=r.PeginManager;exports.computeWotsBlockPublicKeysHash=r.computeWotsBlockPublicKeysHash;exports.computeWotsPkHash=r.computeWotsPkHash;exports.deriveWotsBlockPublicKeys=r.deriveWotsBlockPublicKeys;exports.deriveWotsKeypair=r.deriveWotsKeypair;exports.deriveWotsPkHash=r.deriveWotsPkHash;exports.extractErrorData=r.extractErrorData;exports.getContractErrorMessage=r.getContractErrorMessage;exports.handleContractError=r.handleContractError;exports.isKnownContractError=r.isKnownContractError;exports.isWotsMismatchError=r.isWotsMismatchError;exports.keypairToPublicKey=r.keypairToPublicKey;exports.mnemonicToWotsSeed=r.mnemonicToWotsSeed;exports.PayoutManager=a.PayoutManager;exports.computeHashlock=a.computeHashlock;exports.pollAndSignPayouts=a.pollAndSignPayouts;exports.signDepositorGraph=a.signDepositorGraph;exports.submitWotsPublicKey=a.submitWotsPublicKey;exports.validateSecretAgainstHashlock=a.validateSecretAgainstHashlock;exports.waitForPeginStatus=a.waitForPeginStatus;exports.ApplicationRegistryABI=t.ApplicationRegistryABI;exports.BTCVaultRegistryABI=t.BTCVaultRegistryABI;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.ProtocolParamsABI=t.ProtocolParamsABI;exports.VaultProviderRpcClient=t.VaultProviderRpcClient;exports.ViemProtocolParamsReader=t.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=t.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=t.ViemVaultKeeperReader;exports.ViemVaultRegistryReader=t.ViemVaultRegistryReader;exports.VpResponseValidationError=t.VpResponseValidationError;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.pushTx=t.pushTx;exports.resolveProtocolAddresses=t.resolveProtocolAddresses;exports.DaemonStatus=i.DaemonStatus;exports.JSON_RPC_ERROR_CODES=i.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=i.JsonRpcClient;exports.JsonRpcError=i.JsonRpcError;exports.POST_WOTS_STATUSES=i.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=i.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=i.RpcErrorCode;exports.VP_TERMINAL_STATUSES=i.VP_TERMINAL_STATUSES;exports.VP_TRANSIENT_STATUSES=i.VP_TRANSIENT_STATUSES;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|