@babylonlabs-io/ts-sdk 0.48.0 → 0.48.2
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-BbemBIo9.js → PayoutManager-D02AePm4.js} +78 -65
- package/dist/PayoutManager-D02AePm4.js.map +1 -0
- package/dist/PayoutManager-DD1audlx.cjs +2 -0
- package/dist/PayoutManager-DD1audlx.cjs.map +1 -0
- package/dist/{PeginManager-BMO6R9I9.js → PeginManager-6seoi9mV.js} +217 -198
- package/dist/PeginManager-6seoi9mV.js.map +1 -0
- package/dist/PeginManager-CHZieoEQ.cjs +2 -0
- package/dist/PeginManager-CHZieoEQ.cjs.map +1 -0
- package/dist/buildAndBroadcastRefund-Bi07LxuY.cjs +2 -0
- package/dist/buildAndBroadcastRefund-Bi07LxuY.cjs.map +1 -0
- package/dist/{buildAndBroadcastRefund-sfl7Aac9.js → buildAndBroadcastRefund-DXHs6unL.js} +412 -362
- package/dist/buildAndBroadcastRefund-DXHs6unL.js.map +1 -0
- package/dist/{challengeAssert-1fy_EzAi.js → challengeAssert-ChvLypwc.js} +7 -7
- package/dist/{challengeAssert-1fy_EzAi.js.map → challengeAssert-ChvLypwc.js.map} +1 -1
- package/dist/challengeAssert-Culc7DoS.cjs +2 -0
- package/dist/{challengeAssert-DEw-z3n9.cjs.map → challengeAssert-Culc7DoS.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +170 -169
- package/dist/noPayout-CA4-x5vZ.js +174 -0
- package/dist/noPayout-CA4-x5vZ.js.map +1 -0
- package/dist/noPayout-CJ_Acpl_.cjs +2 -0
- package/dist/noPayout-CJ_Acpl_.cjs.map +1 -0
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +168 -167
- package/dist/tbv/core/managers/PayoutManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/index.cjs +1 -1
- package/dist/tbv/core/managers/index.js +2 -2
- package/dist/tbv/core/primitives/index.cjs +1 -1
- package/dist/tbv/core/primitives/index.d.ts +8 -7
- package/dist/tbv/core/primitives/index.d.ts.map +1 -1
- package/dist/tbv/core/primitives/index.js +30 -29
- package/dist/tbv/core/primitives/psbt/__tests__/verifyScriptPathSchnorrSignature.test.d.ts +14 -0
- package/dist/tbv/core/primitives/psbt/__tests__/verifyScriptPathSchnorrSignature.test.d.ts.map +1 -0
- package/dist/tbv/core/primitives/psbt/refund.d.ts.map +1 -1
- package/dist/tbv/core/primitives/psbt/verifyScriptPathSchnorrSignature.d.ts +53 -0
- package/dist/tbv/core/primitives/psbt/verifyScriptPathSchnorrSignature.d.ts.map +1 -0
- package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts.map +1 -1
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.js +2 -2
- package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts +20 -0
- package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts.map +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +168 -167
- package/dist/tbv/integrations/aave/clients/__tests__/hub.test.d.ts +2 -0
- package/dist/tbv/integrations/aave/clients/__tests__/hub.test.d.ts.map +1 -0
- package/dist/tbv/integrations/aave/clients/abis/AaveHub.abi.json.d.ts +24 -0
- package/dist/tbv/integrations/aave/clients/hub.d.ts +28 -0
- package/dist/tbv/integrations/aave/clients/hub.d.ts.map +1 -0
- package/dist/tbv/integrations/aave/clients/index.d.ts +1 -0
- package/dist/tbv/integrations/aave/clients/index.d.ts.map +1 -1
- package/dist/tbv/integrations/aave/index.cjs +1 -1
- package/dist/tbv/integrations/aave/index.cjs.map +1 -1
- package/dist/tbv/integrations/aave/index.d.ts +1 -1
- package/dist/tbv/integrations/aave/index.d.ts.map +1 -1
- package/dist/tbv/integrations/aave/index.js +246 -193
- package/dist/tbv/integrations/aave/index.js.map +1 -1
- package/dist/verifyScriptPathSchnorrSignature-D43cncKJ.cjs +2 -0
- package/dist/verifyScriptPathSchnorrSignature-D43cncKJ.cjs.map +1 -0
- package/dist/verifyScriptPathSchnorrSignature-DFJAEleY.js +563 -0
- package/dist/verifyScriptPathSchnorrSignature-DFJAEleY.js.map +1 -0
- package/package.json +3 -3
- package/dist/PayoutManager-BLpgkfOS.cjs +0 -2
- package/dist/PayoutManager-BLpgkfOS.cjs.map +0 -1
- package/dist/PayoutManager-BbemBIo9.js.map +0 -1
- package/dist/PeginManager-BMO6R9I9.js.map +0 -1
- package/dist/PeginManager-CfkjDMy7.cjs +0 -2
- package/dist/PeginManager-CfkjDMy7.cjs.map +0 -1
- package/dist/assertPsbtUnsignedTxMatches-BHyBdtxs.js +0 -481
- package/dist/assertPsbtUnsignedTxMatches-BHyBdtxs.js.map +0 -1
- package/dist/assertPsbtUnsignedTxMatches-s9H0Qqkl.cjs +0 -2
- package/dist/assertPsbtUnsignedTxMatches-s9H0Qqkl.cjs.map +0 -1
- package/dist/buildAndBroadcastRefund-sfl7Aac9.js.map +0 -1
- package/dist/buildAndBroadcastRefund-tR9sGPwy.cjs +0 -2
- package/dist/buildAndBroadcastRefund-tR9sGPwy.cjs.map +0 -1
- package/dist/challengeAssert-DEw-z3n9.cjs +0 -2
- package/dist/noPayout-5-wtWQ_f.js +0 -154
- package/dist/noPayout-5-wtWQ_f.js.map +0 -1
- package/dist/noPayout-DNevEzJR.cjs +0 -2
- package/dist/noPayout-DNevEzJR.cjs.map +0 -1
package/dist/tbv/index.js
CHANGED
|
@@ -1,191 +1,192 @@
|
|
|
1
|
-
import { a as s, b as t, c as r } from "../challengeAssert-
|
|
2
|
-
import { computeMinClaimValue as i, computeMinPeginFee as n, deriveVaultId as u, expandAuthAnchor as l, expandHashlockSecret as p, expandWotsSeed as
|
|
3
|
-
import { P as c, d as T,
|
|
4
|
-
import { b as
|
|
5
|
-
import { a as
|
|
6
|
-
import { d as
|
|
7
|
-
import { c as
|
|
8
|
-
import { B as
|
|
9
|
-
import { P as
|
|
10
|
-
import { P as
|
|
11
|
-
import { A as da, P as
|
|
12
|
-
import { B as
|
|
13
|
-
import { C as Aa, e as
|
|
14
|
-
import { B as
|
|
15
|
-
import { B as
|
|
16
|
-
import { U as
|
|
17
|
-
import { M as
|
|
18
|
-
import { O as Re, S as
|
|
19
|
-
import { A as
|
|
20
|
-
import { i as
|
|
21
|
-
import { B as
|
|
22
|
-
import { C as
|
|
1
|
+
import { a as s, b as t, c as r } from "../challengeAssert-ChvLypwc.js";
|
|
2
|
+
import { computeMinClaimValue as i, computeMinPeginFee as n, deriveVaultId as u, expandAuthAnchor as l, expandHashlockSecret as p, expandWotsSeed as P } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
+
import { P as c, d as T, f as E, c as S, b as A, a as _, g, e as R } from "../verifyScriptPathSchnorrSignature-DFJAEleY.js";
|
|
4
|
+
import { b as x, e as f, f as b } from "../peginInput-BPRB9tUi.js";
|
|
5
|
+
import { a as O, b as V } from "../noPayout-CA4-x5vZ.js";
|
|
6
|
+
import { d as C, a as F, b as h, e as U, f as N, j as y, g as B, h as D, i as M, c as H, p as L, s as X, t as k, u as W, v as K } from "../bitcoin-B5aNKtsk.js";
|
|
7
|
+
import { c as G } from "../signing-DaLvGwQe.js";
|
|
8
|
+
import { B as Z, H as J, K as j, M as q, T as z } from "../validation-CxqROCno.js";
|
|
9
|
+
import { P as $, V as aa, b as ea, a as sa, c as ta, f as ra, d as oa, e as ia } from "../PeginManager-6seoi9mV.js";
|
|
10
|
+
import { P as ua, c as la, v as pa } from "../PayoutManager-D02AePm4.js";
|
|
11
|
+
import { A as da, P as ca } from "../ApplicationRegistry.abi-Dn2qk6JG.js";
|
|
12
|
+
import { B as Ea } from "../BTCVaultRegistry.abi-Chs4AFBj.js";
|
|
13
|
+
import { C as Aa, e as _a, g as ga, h as Ra, i as ma } from "../errors-Blc-JWnI.js";
|
|
14
|
+
import { B as fa, a as ba, f as Ia, c as Oa, b as Va, d as va, g as Ca, i as Fa, h as ha, s as Ua, e as Na, w as ya } from "../waitForTransactionReceiptSmartAware-Ckg_oZAo.js";
|
|
15
|
+
import { B as Da, D as Ma, F as Ha, L as La, M as Xa, c as ka, P as Wa, b as Ka, a as wa, S as Ga, T as Ya, W as Za, f as Ja, d as ja, p as qa, r as za } from "../fundPeginTransaction-96FxwYYJ.js";
|
|
16
|
+
import { U as $a, a as ae, e as ee, f as se, v as te } from "../reservation-BxvKbQH2.js";
|
|
17
|
+
import { M as oe, V as ie, g as ne, a as ue, b as le, c as pe, d as Pe, e as de, f as ce, h as Te, p as Ee, v as Se, i as Ae, j as _e } from "../mempoolApi-BxT89SAq.js";
|
|
18
|
+
import { O as Re, S as me, V as xe, g as fe, h as be, i as Ie, a as Oe, d as Ve, b as ve, f as Ce, p as Fe, r as he, v as Ue, c as Ne, e as ye } from "../primeVpAuth-rbejoBPu.js";
|
|
19
|
+
import { A as De, D as Me, b as He, J as Le, a as Xe, d as ke, P as We, R as Ke, e as we, c as Ge, V as Ye } from "../types-CQDRQvV-.js";
|
|
20
|
+
import { i as Je, p as je } from "../errors-9AkghWyk.js";
|
|
21
|
+
import { B as ze, C as Qe, p as $e, q as as, t as es, u as ss, R as ts, a as rs, n as os, o as is, i as ns, m as us, l as ls, j as ps, r as Ps, b as ds, s as cs, v as Ts, g as Es, h as Ss, d as As, c as _s, e as gs, f as Rs, k as ms, w as xs } from "../buildAndBroadcastRefund-DXHs6unL.js";
|
|
22
|
+
import { C as bs, P as Is, c as Os, g as Vs } from "../peginState-CBAlxgXk.js";
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
De as AUTH_EXPIRED_DATA_KIND,
|
|
25
25
|
da as ApplicationRegistryABI,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
ze as BIP68NotMatureError,
|
|
27
|
+
Z as BITCOIN_ADDRESS_RE,
|
|
28
|
+
Ea as BTCVaultRegistryABI,
|
|
29
|
+
Da as BTC_DUST_SAT,
|
|
30
|
+
fa as BitcoinScriptType,
|
|
31
31
|
Aa as CONTRACT_ERRORS,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
32
|
+
Qe as ClaimerPegoutStatusValue,
|
|
33
|
+
bs as ContractStatus,
|
|
34
|
+
Ma as DUST_THRESHOLD,
|
|
35
|
+
Me as DaemonStatus,
|
|
36
|
+
Ha as FEE_SAFETY_MARGIN,
|
|
37
|
+
J as HEX_RE,
|
|
38
|
+
He as JSON_RPC_ERROR_CODES,
|
|
39
|
+
Le as JsonRpcClient,
|
|
40
|
+
Xe as JsonRpcError,
|
|
41
|
+
j as KNOWN_SCRIPT_PREFIXES,
|
|
42
|
+
La as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
43
|
+
Xa as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
44
|
+
q as MAX_REASONABLE_FEE_SATS,
|
|
45
|
+
ka as MAX_REASONABLE_PEGIN_VBYTES,
|
|
46
|
+
oe as MEMPOOL_API_URLS,
|
|
47
47
|
Re as OnChainBtcVaultStatus,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
Wa as P2TR_INPUT_SIZE,
|
|
49
|
+
Ka as PEGIN_AUTH_ANCHOR_OUTPUTS,
|
|
50
|
+
wa as PEGIN_FIXED_OUTPUTS,
|
|
51
|
+
ke as POST_WOTS_STATUSES,
|
|
52
|
+
We as PRE_DEPOSITOR_SIGNATURES_STATES,
|
|
53
|
+
ua as PayoutManager,
|
|
54
|
+
Is as PeginAction,
|
|
55
|
+
$ as PeginManager,
|
|
56
|
+
ca as ProtocolParamsABI,
|
|
57
57
|
c as PsbtSubstitutionError,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
58
|
+
$e as REFUND_MAX_FEE_FRACTION_DENOMINATOR,
|
|
59
|
+
as as REFUND_MAX_FEE_FRACTION_NUMERATOR,
|
|
60
|
+
es as REFUND_MAX_FEE_RATE_SATS_VB,
|
|
61
|
+
ss as REFUND_VSIZE,
|
|
62
|
+
ts as RegisteredVaultVersionMismatchError,
|
|
63
|
+
Ke as RpcErrorCode,
|
|
64
|
+
Ga as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
65
|
+
me as ServerIdentityError,
|
|
66
|
+
z as TXID_RE,
|
|
67
|
+
Ya as TX_BUFFER_SIZE_OVERHEAD,
|
|
68
|
+
$a as UtxoNotAvailableError,
|
|
69
|
+
aa as VAULT_APP_NAME,
|
|
70
|
+
we as VP_BATCH_MAX_SIZE,
|
|
71
|
+
Ge as VP_TERMINAL_FAILURE_STATUSES,
|
|
72
|
+
Ye as VP_TRANSIENT_STATUSES,
|
|
73
|
+
xe as VaultProviderRpcClient,
|
|
74
|
+
fe as ViemProtocolParamsReader,
|
|
75
|
+
be as ViemUniversalChallengerReader,
|
|
76
|
+
Ie as ViemVaultKeeperReader,
|
|
77
|
+
ie as ViemVaultRegistryReader,
|
|
78
|
+
Oe as VpResponseValidationError,
|
|
79
|
+
Ve as VpTokenRegistry,
|
|
80
|
+
Za as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
81
|
+
rs as activateVault,
|
|
82
|
+
ba as applyChangeOutputPolicy,
|
|
83
83
|
T as assertPsbtUnsignedTxMatches,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
E as assertScriptPathSchnorrSignature,
|
|
85
|
+
ae as assertUtxosAvailable,
|
|
86
|
+
ve as batchPollByProvider,
|
|
87
|
+
os as buildAndBroadcastRefund,
|
|
87
88
|
s as buildChallengeAssertPsbt,
|
|
88
89
|
t as buildDepositorPayoutPsbt,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
ea as buildFundingOutpointsCommitment,
|
|
91
|
+
O as buildNoPayoutPsbt,
|
|
92
|
+
S as buildPayoutPsbt,
|
|
93
|
+
x as buildPeginInputPsbt,
|
|
93
94
|
A as buildPeginTxFromFundedPrePegin,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
_ as buildPrePeginPsbt,
|
|
96
|
+
V as buildRefundPsbt,
|
|
97
|
+
sa as buildVaultContext,
|
|
98
|
+
Ia as calculateBtcTxHash,
|
|
99
|
+
Os as canPerformAction,
|
|
100
|
+
Oa as computeChangeOutputFeeSats,
|
|
101
|
+
la as computeHashlock,
|
|
102
|
+
Va as computeMaxDeposit,
|
|
102
103
|
i as computeMinClaimValue,
|
|
103
104
|
n as computeMinPeginFee,
|
|
104
105
|
r as computeNumLocalChallengers,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
106
|
+
va as computePeginBaseFeeSats,
|
|
107
|
+
ta as computeWotsBlockPublicKeysHash,
|
|
108
|
+
Ce as createAuthenticatedVpClient,
|
|
109
|
+
g as createPayoutScript,
|
|
110
|
+
G as createTaprootScriptPathSignOptions,
|
|
111
|
+
C as deriveBip86ScriptPubKeyHex,
|
|
112
|
+
F as deriveNativeSegwitAddress,
|
|
113
|
+
h as deriveTaprootAddress,
|
|
113
114
|
u as deriveVaultId,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
ra as deriveVaultRoot,
|
|
116
|
+
oa as deriveWotsBlocksFromSeed,
|
|
117
|
+
U as ensureHexPrefix,
|
|
118
|
+
is as estimateRefundFeeSats,
|
|
119
|
+
ia as estimateSubmitPeginRequestBatchGas,
|
|
119
120
|
l as expandAuthAnchor,
|
|
120
121
|
p as expandHashlockSecret,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
P as expandWotsSeed,
|
|
123
|
+
_a as extractErrorData,
|
|
124
|
+
ee as extractInputsFromTransaction,
|
|
124
125
|
R as extractPayoutSignature,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
126
|
+
f as extractPeginInputSignature,
|
|
127
|
+
b as finalizePeginInputPsbt,
|
|
128
|
+
se as findOverlappingPendingVaults,
|
|
129
|
+
N as formatSatoshisToBtc,
|
|
130
|
+
Ja as fundPeginTransaction,
|
|
131
|
+
ne as getAddressTxs,
|
|
132
|
+
ue as getAddressUtxos,
|
|
133
|
+
ga as getContractErrorMessage,
|
|
134
|
+
Ca as getDustThreshold,
|
|
135
|
+
le as getMempoolApiUrl,
|
|
136
|
+
y as getNetwork,
|
|
137
|
+
pe as getNetworkFees,
|
|
138
|
+
Vs as getPeginProtocolState,
|
|
139
|
+
Fa as getPsbtInputFields,
|
|
140
|
+
ha as getScriptType,
|
|
141
|
+
B as getSortedXOnlyPubkeys,
|
|
142
|
+
Pe as getTipHeight,
|
|
142
143
|
de as getTxHex,
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
ce as getTxInfo,
|
|
145
|
+
Te as getUtxoInfo,
|
|
145
146
|
Ra as handleContractError,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
147
|
+
D as hexToUint8Array,
|
|
148
|
+
M as isAddressFromPublicKey,
|
|
149
|
+
ns as isDepositAmountValid,
|
|
150
|
+
ma as isKnownContractError,
|
|
151
|
+
us as isPegoutTerminalStatus,
|
|
152
|
+
ls as isRecognizedPegoutStatus,
|
|
153
|
+
ps as isRegisteredVaultVersionMismatchError,
|
|
154
|
+
H as isValidHex,
|
|
155
|
+
Je as isWotsMismatchError,
|
|
156
|
+
je as parseFundingOutpointsFromTx,
|
|
157
|
+
ja as parseUnfundedWasmTransaction,
|
|
158
|
+
qa as peginOutputCount,
|
|
159
|
+
Fe as primeVpTokenRegistry,
|
|
160
|
+
L as processPublicKeyToXOnly,
|
|
161
|
+
Ee as pushTx,
|
|
162
|
+
za as rateBasedTxBufferFee,
|
|
163
|
+
he as resolveProtocolAddresses,
|
|
164
|
+
Ps as runDepositorPresignFlow,
|
|
165
|
+
Ua as selectUtxosForPegin,
|
|
166
|
+
Na as shouldAddChangeOutput,
|
|
166
167
|
ds as signDepositorGraph,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
168
|
+
X as stripHexPrefix,
|
|
169
|
+
cs as submitWotsPublicKey,
|
|
170
|
+
k as toXOnly,
|
|
171
|
+
W as uint8ArrayToHex,
|
|
172
|
+
Ts as validateDepositAmount,
|
|
173
|
+
Es as validateMultiVaultDepositInputs,
|
|
174
|
+
Se as validateOffchainParams,
|
|
175
|
+
Ss as validateOnChainParticipantKeys,
|
|
175
176
|
Ae as validatePegInConfiguration,
|
|
176
177
|
As as validateProviderSelection,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
_s as validateRemainingCapacity,
|
|
179
|
+
Ue as validateRequestDepositorClaimerArtifactsResponse,
|
|
180
|
+
pa as validateSecretAgainstHashlock,
|
|
181
|
+
_e as validateTBVProtocolParams,
|
|
182
|
+
te as validateUtxosAvailable,
|
|
183
|
+
gs as validateVaultAmounts,
|
|
183
184
|
Rs as validateVaultProviderPubkey,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
185
|
+
K as validateWalletPubkey,
|
|
186
|
+
ms as verifyRegisteredVaultVersions,
|
|
187
|
+
Ne as verifyServerIdentity,
|
|
188
|
+
ye as vpTokenRegistry,
|
|
189
|
+
xs as waitForPeginStatus,
|
|
190
|
+
ya as waitForTransactionReceiptSmartAware
|
|
190
191
|
};
|
|
191
192
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hub.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/integrations/aave/clients/__tests__/hub.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const _default: [
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "getAssetDrawnRate",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "assetId",
|
|
8
|
+
"type": "uint256",
|
|
9
|
+
"internalType": "uint256"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"outputs": [
|
|
13
|
+
{
|
|
14
|
+
"name": "",
|
|
15
|
+
"type": "uint256",
|
|
16
|
+
"internalType": "uint256"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"stateMutability": "view"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
;
|
|
23
|
+
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Address, PublicClient } from 'viem';
|
|
2
|
+
/** Identifies one Hub asset to read the drawn rate for. */
|
|
3
|
+
export interface AssetDrawnRateRequest {
|
|
4
|
+
/** Hub contract address (from the reserve's `hub` field). */
|
|
5
|
+
hub: Address;
|
|
6
|
+
/** Asset identifier on that Hub (from the reserve's `assetId` field). */
|
|
7
|
+
assetId: number;
|
|
8
|
+
}
|
|
9
|
+
export interface AssetDrawnRateResult {
|
|
10
|
+
hub: Address;
|
|
11
|
+
assetId: number;
|
|
12
|
+
/** Annual borrow (drawn) rate in RAY (1e27 = 100%), or null on revert. */
|
|
13
|
+
rateRay: bigint | null;
|
|
14
|
+
error: Error | null;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Per-asset isolated read of `getAssetDrawnRate` for display lists (one bad
|
|
18
|
+
* asset ≠ whole list blank). One multicall round-trip instead of one
|
|
19
|
+
* `eth_call` per asset, with `allowFailure: true` so a single reverting asset
|
|
20
|
+
* isolates to its own error entry. A network-level multicall failure marks
|
|
21
|
+
* every asset failed rather than throwing — callers (display hooks) rely on
|
|
22
|
+
* always getting a per-asset result array.
|
|
23
|
+
*
|
|
24
|
+
* The returned rate is the linear annual rate in RAY (the Hub accrues
|
|
25
|
+
* interest as `rate * dt / SECONDS_PER_YEAR`), i.e. an APR, not an APY.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getAssetDrawnRatesSafe(publicClient: PublicClient, requests: AssetDrawnRateRequest[]): Promise<AssetDrawnRateResult[]>;
|
|
28
|
+
//# sourceMappingURL=hub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/integrations/aave/clients/hub.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAO,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIvD,2DAA2D;AAC3D,MAAM,WAAW,qBAAqB;IACpC,6DAA6D;IAC7D,GAAG,EAAE,OAAO,CAAC;IACb,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAC1C,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,qBAAqB,EAAE,GAChC,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAmCjC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { getPosition, getPositionSizeParams, } from './query.js';
|
|
2
2
|
export { getDynamicReserveConfig, getReserve, getTargetHealthFactor, getUserAccountData, getUserPosition, getUserPositionAndAccountData, getUserPositions, getUserTotalDebt, getUserTotalDebts, hasCollateral, hasDebt, } from './spoke.js';
|
|
3
3
|
export { getOracleAddress, getReservesPrices, getReservesPricesSafe, type ReservePriceResult, } from './oracle.js';
|
|
4
|
+
export { getAssetDrawnRatesSafe, type AssetDrawnRateRequest, type AssetDrawnRateResult, } from './hub.js';
|
|
4
5
|
export { buildBorrowTx, buildReorderVaultsTx, buildRepayTx, buildWithdrawCollateralsTx, } from './transaction.js';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/integrations/aave/clients/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,uBAAuB,EACvB,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,6BAA6B,EAC7B,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,OAAO,GACR,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/integrations/aave/clients/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,uBAAuB,EACvB,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,6BAA6B,EAC7B,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,OAAO,GACR,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,sBAAsB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC"}
|