@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
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./shared/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./shared/index.cjs"),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"),T=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.BitcoinNetworks=P.BitcoinNetworks;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=T.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/index.js
CHANGED
|
@@ -1,104 +1,114 @@
|
|
|
1
1
|
import { BitcoinNetworks as e } from "./shared/index.js";
|
|
2
|
-
import { j as r, h as o, i, d as n, a as
|
|
3
|
-
import { computeMinClaimValue as
|
|
4
|
-
import { b as
|
|
5
|
-
import { B as
|
|
6
|
-
import { B as J, c as
|
|
2
|
+
import { j as r, h as o, i, d as n, a as P, b as l, g as T, c as u, e as d, f as p } from "./challengeAssert-k5_LWUtO.js";
|
|
3
|
+
import { computeMinClaimValue as S, deriveVaultId as E } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
4
|
+
import { b as _, c as A, e as R } from "./payout-Ce9vSs9e.js";
|
|
5
|
+
import { B as x, D as b, F as f, L as I, M as y, P as O, c as h, S as C, T as U, W as F, d as N, a as V, e as B, g as H, h as D, i as L, b as M, f as v, p as W, r as k, s as K, t as w, u as X, v as G } from "./constants-Q7v2O7Ps.js";
|
|
6
|
+
import { B as J, c as j, g as Z, d as z, b as q, s as Q, a as $ } from "./psbtInputFields-DO0ELwiv.js";
|
|
7
7
|
import { f as sa, p as ea } from "./fundPeginTransaction-DpwnDslW.js";
|
|
8
8
|
import { c as ra } from "./signing-Drwr3bXB.js";
|
|
9
|
-
import { C as ia, P as na, c as Ta, d as
|
|
10
|
-
import { P as
|
|
11
|
-
import { B as
|
|
12
|
-
import { D as
|
|
9
|
+
import { C as ia, P as na, b as Pa, c as la, a as Ta, d as ua, f as da, e as pa, g as ca, h as Sa, i as Ea, j as ga, k as _a, m as Aa } from "./errors-aMocmFr-.js";
|
|
10
|
+
import { P as ma, c as xa, p as ba, a as fa, s as Ia, v as ya, w as Oa } from "./index-BX-V3C9t.js";
|
|
11
|
+
import { A as Ca, B as Ua, M as Fa, P as Na, V as Va, i as Ba, j as Ha, k as Da, l as La, h as Ma, g as va, a as Wa, b as ka, c as Ka, d as wa, e as Xa, f as Ga, p as Ya, r as Ja } from "./index-BvFLf3vm.js";
|
|
12
|
+
import { D as Za, b as za, J as qa, a as Qa, d as $a, P as as, R as ss, c as es, V as ts } from "./types-D1rYwwCu.js";
|
|
13
13
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
Ca as ApplicationRegistryABI,
|
|
15
|
+
Ua as BTCVaultRegistryABI,
|
|
16
|
+
x as BTC_DUST_SAT,
|
|
16
17
|
e as BitcoinNetworks,
|
|
17
18
|
J as BitcoinScriptType,
|
|
18
19
|
ia as CONTRACT_ERRORS,
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
b as DUST_THRESHOLD,
|
|
21
|
+
Za as DaemonStatus,
|
|
21
22
|
f as FEE_SAFETY_MARGIN,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
za as JSON_RPC_ERROR_CODES,
|
|
24
|
+
qa as JsonRpcClient,
|
|
25
|
+
Qa as JsonRpcError,
|
|
25
26
|
I as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
y as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
28
|
+
Fa as MEMPOOL_API_URLS,
|
|
29
|
+
O as P2TR_INPUT_SIZE,
|
|
30
|
+
h as PEGIN_FIXED_OUTPUTS,
|
|
31
|
+
$a as POST_WOTS_STATUSES,
|
|
32
|
+
as as PRE_DEPOSITOR_SIGNATURES_STATES,
|
|
33
|
+
ma as PayoutManager,
|
|
33
34
|
na as PeginManager,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
Na as ProtocolParamsABI,
|
|
36
|
+
ss as RpcErrorCode,
|
|
37
|
+
C as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
38
|
+
U as TX_BUFFER_SIZE_OVERHEAD,
|
|
39
|
+
es as VP_TERMINAL_STATUSES,
|
|
40
|
+
ts as VP_TRANSIENT_STATUSES,
|
|
41
|
+
Va as VaultProviderRpcClient,
|
|
42
|
+
Ba as ViemProtocolParamsReader,
|
|
43
|
+
Ha as ViemUniversalChallengerReader,
|
|
44
|
+
Da as ViemVaultKeeperReader,
|
|
45
|
+
La as ViemVaultRegistryReader,
|
|
46
|
+
Ma as VpResponseValidationError,
|
|
42
47
|
F as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
43
48
|
r as buildChallengeAssertPsbt,
|
|
44
49
|
o as buildDepositorPayoutPsbt,
|
|
45
50
|
i as buildNoPayoutPsbt,
|
|
46
|
-
|
|
51
|
+
_ as buildPayoutPsbt,
|
|
47
52
|
n as buildPeginInputPsbt,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
P as buildPeginTxFromFundedPrePegin,
|
|
54
|
+
l as buildPrePeginPsbt,
|
|
55
|
+
T as buildRefundPsbt,
|
|
56
|
+
j as calculateBtcTxHash,
|
|
57
|
+
xa as computeHashlock,
|
|
58
|
+
S as computeMinClaimValue,
|
|
59
|
+
u as computeNumLocalChallengers,
|
|
60
|
+
Pa as computeWotsBlockPublicKeysHash,
|
|
61
|
+
la as computeWotsPkHash,
|
|
62
|
+
A as createPayoutScript,
|
|
56
63
|
ra as createTaprootScriptPathSignOptions,
|
|
57
64
|
N as deriveNativeSegwitAddress,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
ua as
|
|
62
|
-
|
|
65
|
+
V as deriveTaprootAddress,
|
|
66
|
+
E as deriveVaultId,
|
|
67
|
+
Ta as deriveWotsBlockPublicKeys,
|
|
68
|
+
ua as deriveWotsKeypair,
|
|
69
|
+
da as deriveWotsPkHash,
|
|
70
|
+
B as ensureHexPrefix,
|
|
63
71
|
pa as extractErrorData,
|
|
64
|
-
|
|
72
|
+
R as extractPayoutSignature,
|
|
65
73
|
d as extractPeginInputSignature,
|
|
66
|
-
|
|
74
|
+
p as finalizePeginInputPsbt,
|
|
67
75
|
sa as fundPeginTransaction,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
va as getAddressTxs,
|
|
77
|
+
Wa as getAddressUtxos,
|
|
78
|
+
ca as getContractErrorMessage,
|
|
79
|
+
Z as getDustThreshold,
|
|
80
|
+
ka as getMempoolApiUrl,
|
|
81
|
+
H as getNetwork,
|
|
82
|
+
Ka as getNetworkFees,
|
|
75
83
|
z as getPsbtInputFields,
|
|
76
84
|
q as getScriptType,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
wa as getTxHex,
|
|
86
|
+
Xa as getTxInfo,
|
|
87
|
+
Ga as getUtxoInfo,
|
|
88
|
+
Sa as handleContractError,
|
|
89
|
+
D as hexToUint8Array,
|
|
90
|
+
L as isAddressFromPublicKey,
|
|
91
|
+
Ea as isKnownContractError,
|
|
92
|
+
M as isValidHex,
|
|
93
|
+
ga as isWotsMismatchError,
|
|
94
|
+
_a as keypairToPublicKey,
|
|
95
|
+
Aa as mnemonicToWotsSeed,
|
|
88
96
|
ea as parseUnfundedWasmTransaction,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
v as peginOutputCount,
|
|
98
|
+
ba as pollAndSignPayouts,
|
|
99
|
+
W as processPublicKeyToXOnly,
|
|
100
|
+
Ya as pushTx,
|
|
93
101
|
k as rateBasedTxBufferFee,
|
|
102
|
+
Ja as resolveProtocolAddresses,
|
|
94
103
|
Q as selectUtxosForPegin,
|
|
95
104
|
$ as shouldAddChangeOutput,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
105
|
+
fa as signDepositorGraph,
|
|
106
|
+
K as stripHexPrefix,
|
|
107
|
+
Ia as submitWotsPublicKey,
|
|
108
|
+
w as toXOnly,
|
|
100
109
|
X as uint8ArrayToHex,
|
|
110
|
+
ya as validateSecretAgainstHashlock,
|
|
101
111
|
G as validateWalletPubkey,
|
|
102
|
-
|
|
112
|
+
Oa as waitForPeginStatus
|
|
103
113
|
};
|
|
104
114
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol-params-reader.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/clients/eth/__tests__/protocol-params-reader.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signer-set-reader.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/clients/eth/__tests__/signer-set-reader.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Address, PublicClient } from 'viem';
|
|
2
|
+
export interface ProtocolAddresses {
|
|
3
|
+
/** Address of the ProtocolParams contract */
|
|
4
|
+
protocolParams: Address;
|
|
5
|
+
/** Address of the ApplicationRegistry contract */
|
|
6
|
+
applicationRegistry: Address;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Resolve ProtocolParams and ApplicationRegistry addresses from BTCVaultRegistry.
|
|
10
|
+
*
|
|
11
|
+
* Uses a single multicall for atomicity and efficiency.
|
|
12
|
+
*
|
|
13
|
+
* @param publicClient - viem PublicClient instance
|
|
14
|
+
* @param btcVaultRegistryAddress - Address of the BTCVaultRegistry contract
|
|
15
|
+
* @returns Resolved contract addresses
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveProtocolAddresses(publicClient: PublicClient, btcVaultRegistryAddress: Address): Promise<ProtocolAddresses>;
|
|
18
|
+
//# sourceMappingURL=contract-address-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-address-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/eth/contract-address-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIlD,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,cAAc,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,CAC5C,YAAY,EAAE,YAAY,EAC1B,uBAAuB,EAAE,OAAO,GAC/B,OAAO,CAAC,iBAAiB,CAAC,CAqB5B"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { resolveProtocolAddresses, type ProtocolAddresses, } from './contract-address-resolver';
|
|
2
|
+
export { ViemProtocolParamsReader } from './protocol-params-reader';
|
|
3
|
+
export { ViemUniversalChallengerReader, ViemVaultKeeperReader, } from './signer-set-reader';
|
|
1
4
|
export { ViemVaultRegistryReader } from './vault-registry-reader';
|
|
2
|
-
export type {
|
|
5
|
+
export type { AddressBTCKeyPair, PegInConfiguration, ProtocolParamsReader, TBVProtocolParams, UniversalChallengerReader, VaultBasicInfo, VaultData, VaultKeeperReader, VaultProtocolInfo, VaultRegistryReader, VersionedOffchainParams, } from './types';
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/eth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,YAAY,EACV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/eth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,iBAAiB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Address, PublicClient } from 'viem';
|
|
2
|
+
import { PegInConfiguration, ProtocolParamsReader, TBVProtocolParams, VersionedOffchainParams } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Concrete protocol params reader using viem.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* ```ts
|
|
8
|
+
* const reader = new ViemProtocolParamsReader(publicClient, protocolParamsAddress);
|
|
9
|
+
* const config = await reader.getPegInConfiguration();
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare class ViemProtocolParamsReader implements ProtocolParamsReader {
|
|
13
|
+
private publicClient;
|
|
14
|
+
private contractAddress;
|
|
15
|
+
constructor(publicClient: PublicClient, contractAddress: Address);
|
|
16
|
+
getTBVProtocolParams(): Promise<TBVProtocolParams>;
|
|
17
|
+
getLatestOffchainParams(): Promise<VersionedOffchainParams>;
|
|
18
|
+
getOffchainParamsByVersion(version: number): Promise<VersionedOffchainParams>;
|
|
19
|
+
getLatestOffchainParamsVersion(): Promise<number>;
|
|
20
|
+
getTimelockPeginByVersion(version: number): Promise<number>;
|
|
21
|
+
/**
|
|
22
|
+
* Read TBV protocol params and latest offchain params atomically via multicall.
|
|
23
|
+
* Prevents TOCTOU inconsistency if governance updates params between reads.
|
|
24
|
+
*/
|
|
25
|
+
getPegInConfiguration(): Promise<PegInConfiguration>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=protocol-params-reader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol-params-reader.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/eth/protocol-params-reader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAO,YAAY,EAAE,MAAM,MAAM,CAAC;AAGvD,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAsFjB;;;;;;;;GAQG;AACH,qBAAa,wBAAyB,YAAW,oBAAoB;IAEjE,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,eAAe;gBADf,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,OAAO;IAG5B,oBAAoB,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAUlD,uBAAuB,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAU3D,0BAA0B,CAC9B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,uBAAuB,CAAC;IAW7B,8BAA8B,IAAI,OAAO,CAAC,MAAM,CAAC;IAUjD,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKjE;;;OAGG;IACG,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAgC3D"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Address, PublicClient } from 'viem';
|
|
2
|
+
import { AddressBTCKeyPair, UniversalChallengerReader, VaultKeeperReader } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Reads vault keepers from the ApplicationRegistry contract.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* ```ts
|
|
8
|
+
* const reader = new ViemVaultKeeperReader(publicClient, applicationRegistryAddress);
|
|
9
|
+
* const keepers = await reader.getCurrentVaultKeepers(appEntryPoint);
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare class ViemVaultKeeperReader implements VaultKeeperReader {
|
|
13
|
+
private publicClient;
|
|
14
|
+
private contractAddress;
|
|
15
|
+
constructor(publicClient: PublicClient, contractAddress: Address);
|
|
16
|
+
getVaultKeepersByVersion(appEntryPoint: Address, version: number): Promise<AddressBTCKeyPair[]>;
|
|
17
|
+
getCurrentVaultKeepers(appEntryPoint: Address): Promise<AddressBTCKeyPair[]>;
|
|
18
|
+
getCurrentVaultKeepersVersion(appEntryPoint: Address): Promise<number>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Reads universal challengers from the ProtocolParams contract.
|
|
22
|
+
*
|
|
23
|
+
* Usage:
|
|
24
|
+
* ```ts
|
|
25
|
+
* const reader = new ViemUniversalChallengerReader(publicClient, protocolParamsAddress);
|
|
26
|
+
* const challengers = await reader.getCurrentUniversalChallengers();
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare class ViemUniversalChallengerReader implements UniversalChallengerReader {
|
|
30
|
+
private publicClient;
|
|
31
|
+
private contractAddress;
|
|
32
|
+
constructor(publicClient: PublicClient, contractAddress: Address);
|
|
33
|
+
getUniversalChallengersByVersion(version: number): Promise<AddressBTCKeyPair[]>;
|
|
34
|
+
getCurrentUniversalChallengers(): Promise<AddressBTCKeyPair[]>;
|
|
35
|
+
getLatestUniversalChallengersVersion(): Promise<number>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=signer-set-reader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signer-set-reader.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/eth/signer-set-reader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAO,YAAY,EAAE,MAAM,MAAM,CAAC;AAIvD,OAAO,KAAK,EACV,iBAAiB,EACjB,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAYjB;;;;;;;;GAQG;AACH,qBAAa,qBAAsB,YAAW,iBAAiB;IAE3D,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,eAAe;gBADf,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,OAAO;IAG5B,wBAAwB,CAC5B,aAAa,EAAE,OAAO,EACtB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAWzB,sBAAsB,CAC1B,aAAa,EAAE,OAAO,GACrB,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAWzB,6BAA6B,CACjC,aAAa,EAAE,OAAO,GACrB,OAAO,CAAC,MAAM,CAAC;CAUnB;AAED;;;;;;;;GAQG;AACH,qBAAa,6BAA8B,YAAW,yBAAyB;IAE3E,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,eAAe;gBADf,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,OAAO;IAG5B,gCAAgC,CACpC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAWzB,8BAA8B,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAU9D,oCAAoC,IAAI,OAAO,CAAC,MAAM,CAAC;CAS9D"}
|
|
@@ -34,4 +34,84 @@ export interface VaultRegistryReader {
|
|
|
34
34
|
getVaultProtocolInfo(vaultId: Hex): Promise<VaultProtocolInfo>;
|
|
35
35
|
getVaultData(vaultId: Hex): Promise<VaultData>;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* TBV protocol parameters from the ProtocolParams contract.
|
|
39
|
+
* Matches Solidity struct `IProtocolParams.TBVProtocolParams` exactly.
|
|
40
|
+
*
|
|
41
|
+
* All uint64 amounts use bigint (satoshi values can exceed 2^53).
|
|
42
|
+
* uint8 uses number (bounded, max 255).
|
|
43
|
+
*/
|
|
44
|
+
export interface TBVProtocolParams {
|
|
45
|
+
minimumPegInAmount: bigint;
|
|
46
|
+
maxPegInAmount: bigint;
|
|
47
|
+
pegInAckTimeout: bigint;
|
|
48
|
+
pegInActivationTimeout: bigint;
|
|
49
|
+
maxHtlcOutputCount: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Versioned offchain parameters from the ProtocolParams contract.
|
|
53
|
+
* Matches Solidity struct `IProtocolParams.VersionedOffchainParams` exactly.
|
|
54
|
+
*
|
|
55
|
+
* bigint for: uint256 timelocks, uint64 fee rates/amounts.
|
|
56
|
+
* number for: uint8/uint16/uint32 fields (bounded, safe for JS arithmetic).
|
|
57
|
+
*/
|
|
58
|
+
export interface VersionedOffchainParams {
|
|
59
|
+
timelockAssert: bigint;
|
|
60
|
+
timelockChallengeAssert: bigint;
|
|
61
|
+
securityCouncilKeys: Hex[];
|
|
62
|
+
councilQuorum: number;
|
|
63
|
+
feeRate: bigint;
|
|
64
|
+
babeTotalInstances: number;
|
|
65
|
+
babeInstancesToFinalize: number;
|
|
66
|
+
minVpCommissionBps: number;
|
|
67
|
+
tRefund: number;
|
|
68
|
+
tStale: number;
|
|
69
|
+
minPeginFeeRate: bigint;
|
|
70
|
+
proverProgramVersion: number;
|
|
71
|
+
minPrepeginDepth: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Combined peg-in configuration read atomically via multicall.
|
|
75
|
+
* Prevents TOCTOU inconsistency if governance updates params between reads.
|
|
76
|
+
*/
|
|
77
|
+
export interface PegInConfiguration {
|
|
78
|
+
minimumPegInAmount: bigint;
|
|
79
|
+
maxPegInAmount: bigint;
|
|
80
|
+
pegInAckTimeout: bigint;
|
|
81
|
+
pegInActivationTimeout: bigint;
|
|
82
|
+
maxHtlcOutputCount: number;
|
|
83
|
+
timelockPegin: number;
|
|
84
|
+
timelockRefund: number;
|
|
85
|
+
minVpCommissionBps: number;
|
|
86
|
+
offchainParams: VersionedOffchainParams;
|
|
87
|
+
}
|
|
88
|
+
/** Interface for reading protocol parameters from the ProtocolParams contract. */
|
|
89
|
+
export interface ProtocolParamsReader {
|
|
90
|
+
getTBVProtocolParams(): Promise<TBVProtocolParams>;
|
|
91
|
+
getOffchainParamsByVersion(version: number): Promise<VersionedOffchainParams>;
|
|
92
|
+
getLatestOffchainParams(): Promise<VersionedOffchainParams>;
|
|
93
|
+
getLatestOffchainParamsVersion(): Promise<number>;
|
|
94
|
+
getTimelockPeginByVersion(version: number): Promise<number>;
|
|
95
|
+
getPegInConfiguration(): Promise<PegInConfiguration>;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Matches Solidity struct `BTCVaultTypes.AddressBTCKeyPair` exactly.
|
|
99
|
+
* Used for vault keepers and universal challengers.
|
|
100
|
+
*/
|
|
101
|
+
export interface AddressBTCKeyPair {
|
|
102
|
+
ethAddress: Address;
|
|
103
|
+
btcPubKey: Hex;
|
|
104
|
+
}
|
|
105
|
+
/** Interface for reading vault keepers from the ApplicationRegistry contract. */
|
|
106
|
+
export interface VaultKeeperReader {
|
|
107
|
+
getVaultKeepersByVersion(appEntryPoint: Address, version: number): Promise<AddressBTCKeyPair[]>;
|
|
108
|
+
getCurrentVaultKeepers(appEntryPoint: Address): Promise<AddressBTCKeyPair[]>;
|
|
109
|
+
getCurrentVaultKeepersVersion(appEntryPoint: Address): Promise<number>;
|
|
110
|
+
}
|
|
111
|
+
/** Interface for reading universal challengers from the ProtocolParams contract. */
|
|
112
|
+
export interface UniversalChallengerReader {
|
|
113
|
+
getUniversalChallengersByVersion(version: number): Promise<AddressBTCKeyPair[]>;
|
|
114
|
+
getCurrentUniversalChallengers(): Promise<AddressBTCKeyPair[]>;
|
|
115
|
+
getLatestUniversalChallengersVersion(): Promise<number>;
|
|
116
|
+
}
|
|
37
117
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/eth/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/eth/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../index-DpKhuCta.cjs"),r=require("../../../types-DEWiqXYp.cjs");exports.MEMPOOL_API_URLS=e.MEMPOOL_API_URLS;exports.VaultProviderRpcClient=e.VaultProviderRpcClient;exports.ViemProtocolParamsReader=e.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=e.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=e.ViemVaultKeeperReader;exports.ViemVaultRegistryReader=e.ViemVaultRegistryReader;exports.VpResponseValidationError=e.VpResponseValidationError;exports.getAddressTxs=e.getAddressTxs;exports.getAddressUtxos=e.getAddressUtxos;exports.getMempoolApiUrl=e.getMempoolApiUrl;exports.getNetworkFees=e.getNetworkFees;exports.getTxHex=e.getTxHex;exports.getTxInfo=e.getTxInfo;exports.getUtxoInfo=e.getUtxoInfo;exports.pushTx=e.pushTx;exports.resolveProtocolAddresses=e.resolveProtocolAddresses;exports.DaemonStatus=r.DaemonStatus;exports.JSON_RPC_ERROR_CODES=r.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=r.JsonRpcClient;exports.JsonRpcError=r.JsonRpcError;exports.POST_WOTS_STATUSES=r.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=r.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=r.RpcErrorCode;exports.VP_TERMINAL_STATUSES=r.VP_TERMINAL_STATUSES;exports.VP_TRANSIENT_STATUSES=r.VP_TRANSIENT_STATUSES;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
import { M as
|
|
2
|
-
import { D as g, b as
|
|
1
|
+
import { M as a, V as r, i as o, j as t, k as R, l as S, h as T, g as d, a as l, b as E, c as _, d as i, e as p, f as P, p as V, r as A } from "../../../index-BvFLf3vm.js";
|
|
2
|
+
import { D as g, b as m, J as x, a as O, d as U, P as c, R as I, c as C, V as N } from "../../../types-D1rYwwCu.js";
|
|
3
3
|
export {
|
|
4
4
|
g as DaemonStatus,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
5
|
+
m as JSON_RPC_ERROR_CODES,
|
|
6
|
+
x as JsonRpcClient,
|
|
7
|
+
O as JsonRpcError,
|
|
8
|
+
a as MEMPOOL_API_URLS,
|
|
9
|
+
U as POST_WOTS_STATUSES,
|
|
10
|
+
c as PRE_DEPOSITOR_SIGNATURES_STATES,
|
|
11
|
+
I as RpcErrorCode,
|
|
12
|
+
C as VP_TERMINAL_STATUSES,
|
|
13
|
+
N as VP_TRANSIENT_STATUSES,
|
|
14
|
+
r as VaultProviderRpcClient,
|
|
15
|
+
o as ViemProtocolParamsReader,
|
|
16
|
+
t as ViemUniversalChallengerReader,
|
|
17
|
+
R as ViemVaultKeeperReader,
|
|
18
|
+
S as ViemVaultRegistryReader,
|
|
19
|
+
T as VpResponseValidationError,
|
|
20
|
+
d as getAddressTxs,
|
|
21
|
+
l as getAddressUtxos,
|
|
22
|
+
E as getMempoolApiUrl,
|
|
23
|
+
_ as getNetworkFees,
|
|
24
|
+
i as getTxHex,
|
|
22
25
|
p as getTxInfo,
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
P as getUtxoInfo,
|
|
27
|
+
V as pushTx,
|
|
28
|
+
A as resolveProtocolAddresses
|
|
25
29
|
};
|
|
26
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ApplicationRegistry Contract ABI
|
|
3
|
+
*
|
|
4
|
+
* Minimal ABI containing only the vault keeper read functions needed by the SDK.
|
|
5
|
+
* Generated from vault-contracts-aave-v4 IApplicationRegistry.sol interface.
|
|
6
|
+
*
|
|
7
|
+
* @module contracts/abis/ApplicationRegistry
|
|
8
|
+
*/
|
|
9
|
+
export declare const ApplicationRegistryABI: readonly [{
|
|
10
|
+
readonly type: "function";
|
|
11
|
+
readonly name: "getVaultKeepersByVersion";
|
|
12
|
+
readonly inputs: readonly [{
|
|
13
|
+
readonly name: "appEntryPoint";
|
|
14
|
+
readonly type: "address";
|
|
15
|
+
readonly internalType: "address";
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "versionNumber";
|
|
18
|
+
readonly type: "uint16";
|
|
19
|
+
readonly internalType: "uint16";
|
|
20
|
+
}];
|
|
21
|
+
readonly outputs: readonly [{
|
|
22
|
+
readonly name: "";
|
|
23
|
+
readonly type: "tuple[]";
|
|
24
|
+
readonly internalType: "struct BTCVaultTypes.AddressBTCKeyPair[]";
|
|
25
|
+
readonly components: readonly [{
|
|
26
|
+
readonly name: "ethAddress";
|
|
27
|
+
readonly type: "address";
|
|
28
|
+
readonly internalType: "address";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "btcPubKey";
|
|
31
|
+
readonly type: "bytes32";
|
|
32
|
+
readonly internalType: "bytes32";
|
|
33
|
+
}];
|
|
34
|
+
}];
|
|
35
|
+
readonly stateMutability: "view";
|
|
36
|
+
}, {
|
|
37
|
+
readonly type: "function";
|
|
38
|
+
readonly name: "getCurrentVaultKeepers";
|
|
39
|
+
readonly inputs: readonly [{
|
|
40
|
+
readonly name: "appEntryPoint";
|
|
41
|
+
readonly type: "address";
|
|
42
|
+
readonly internalType: "address";
|
|
43
|
+
}];
|
|
44
|
+
readonly outputs: readonly [{
|
|
45
|
+
readonly name: "";
|
|
46
|
+
readonly type: "tuple[]";
|
|
47
|
+
readonly internalType: "struct BTCVaultTypes.AddressBTCKeyPair[]";
|
|
48
|
+
readonly components: readonly [{
|
|
49
|
+
readonly name: "ethAddress";
|
|
50
|
+
readonly type: "address";
|
|
51
|
+
readonly internalType: "address";
|
|
52
|
+
}, {
|
|
53
|
+
readonly name: "btcPubKey";
|
|
54
|
+
readonly type: "bytes32";
|
|
55
|
+
readonly internalType: "bytes32";
|
|
56
|
+
}];
|
|
57
|
+
}];
|
|
58
|
+
readonly stateMutability: "view";
|
|
59
|
+
}, {
|
|
60
|
+
readonly type: "function";
|
|
61
|
+
readonly name: "getCurrentVaultKeepersVersion";
|
|
62
|
+
readonly inputs: readonly [{
|
|
63
|
+
readonly name: "appEntryPoint";
|
|
64
|
+
readonly type: "address";
|
|
65
|
+
readonly internalType: "address";
|
|
66
|
+
}];
|
|
67
|
+
readonly outputs: readonly [{
|
|
68
|
+
readonly name: "";
|
|
69
|
+
readonly type: "uint16";
|
|
70
|
+
readonly internalType: "uint16";
|
|
71
|
+
}];
|
|
72
|
+
readonly stateMutability: "view";
|
|
73
|
+
}];
|
|
74
|
+
//# sourceMappingURL=ApplicationRegistry.abi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationRegistry.abi.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/contracts/abis/ApplicationRegistry.abi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuFzB,CAAC"}
|
|
@@ -337,5 +337,25 @@ export declare const BTCVaultRegistryABI: readonly [{
|
|
|
337
337
|
readonly internalType: "uint16";
|
|
338
338
|
}];
|
|
339
339
|
readonly stateMutability: "view";
|
|
340
|
+
}, {
|
|
341
|
+
readonly type: "function";
|
|
342
|
+
readonly name: "protocolParams";
|
|
343
|
+
readonly inputs: readonly [];
|
|
344
|
+
readonly outputs: readonly [{
|
|
345
|
+
readonly name: "";
|
|
346
|
+
readonly type: "address";
|
|
347
|
+
readonly internalType: "contract IProtocolParams";
|
|
348
|
+
}];
|
|
349
|
+
readonly stateMutability: "view";
|
|
350
|
+
}, {
|
|
351
|
+
readonly type: "function";
|
|
352
|
+
readonly name: "applicationRegistry";
|
|
353
|
+
readonly inputs: readonly [];
|
|
354
|
+
readonly outputs: readonly [{
|
|
355
|
+
readonly name: "";
|
|
356
|
+
readonly type: "address";
|
|
357
|
+
readonly internalType: "contract IApplicationRegistry";
|
|
358
|
+
}];
|
|
359
|
+
readonly stateMutability: "view";
|
|
340
360
|
}];
|
|
341
361
|
//# sourceMappingURL=BTCVaultRegistry.abi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BTCVaultRegistry.abi.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/contracts/abis/BTCVaultRegistry.abi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"BTCVaultRegistry.abi.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/contracts/abis/BTCVaultRegistry.abi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmXtB,CAAC"}
|