@babylonlabs-io/ts-sdk 0.15.3 → 0.16.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-UqmtfBtv.js → errors-BEUjAw2k.js} +363 -453
- package/dist/errors-BEUjAw2k.js.map +1 -0
- package/dist/errors-DnMc1lLU.cjs +2 -0
- package/dist/errors-DnMc1lLU.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +31 -33
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +33 -35
- package/dist/tbv/core/utils/transaction/index.d.ts +0 -1
- package/dist/tbv/core/utils/transaction/index.d.ts.map +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +33 -35
- package/dist/tbv/integrations/aave/clients/abis/AaveSpoke.abi.json.d.ts +15 -25
- package/dist/tbv/integrations/aave/clients/index.d.ts +1 -1
- package/dist/tbv/integrations/aave/clients/index.d.ts.map +1 -1
- package/dist/tbv/integrations/aave/clients/spoke.d.ts +59 -26
- package/dist/tbv/integrations/aave/clients/spoke.d.ts.map +1 -1
- package/dist/tbv/integrations/aave/constants.d.ts +0 -35
- package/dist/tbv/integrations/aave/constants.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 +2 -2
- package/dist/tbv/integrations/aave/index.d.ts.map +1 -1
- package/dist/tbv/integrations/aave/index.js +201 -190
- package/dist/tbv/integrations/aave/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/errors-BZc3Urez.cjs +0 -2
- package/dist/errors-BZc3Urez.cjs.map +0 -1
- package/dist/errors-UqmtfBtv.js.map +0 -1
- package/dist/tbv/core/utils/transaction/__tests__/createSplitTransaction.test.d.ts +0 -5
- package/dist/tbv/core/utils/transaction/__tests__/createSplitTransaction.test.d.ts.map +0 -1
- package/dist/tbv/core/utils/transaction/createSplitTransaction.d.ts +0 -106
- package/dist/tbv/core/utils/transaction/createSplitTransaction.d.ts.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./shared/index.cjs"),e=require("./challengeAssert-D7SqsNpQ.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("./errors-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./shared/index.cjs"),e=require("./challengeAssert-D7SqsNpQ.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("./errors-DnMc1lLU.cjs");exports.BitcoinNetworks=i.BitcoinNetworks;exports.BTC_DUST_SAT=e.BTC_DUST_SAT;exports.DUST_THRESHOLD=e.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=e.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=e.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=e.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=e.P2TR_INPUT_SIZE;exports.PEGIN_FIXED_OUTPUTS=e.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=e.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=e.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=e.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.buildChallengeAssertPsbt=e.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=e.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=e.buildNoPayoutPsbt;exports.buildPayoutPsbt=e.buildPayoutPsbt;exports.buildPeginInputPsbt=e.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=e.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=e.buildPrePeginPsbt;exports.buildRefundPsbt=e.buildRefundPsbt;exports.computeNumLocalChallengers=e.computeNumLocalChallengers;exports.createPayoutScript=e.createPayoutScript;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.extractPayoutSignature=e.extractPayoutSignature;exports.extractPeginInputSignature=e.extractPeginInputSignature;exports.finalizePeginInputPsbt=e.finalizePeginInputPsbt;exports.fundPeginTransaction=e.fundPeginTransaction;exports.getNetwork=e.getNetwork;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.parseUnfundedWasmTransaction=e.parseUnfundedWasmTransaction;exports.peginOutputCount=e.peginOutputCount;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>r.deriveVaultId});exports.BTCVaultRegistryABI=t.BTCVaultRegistryABI;exports.BitcoinScriptType=t.BitcoinScriptType;exports.CONTRACT_ERRORS=t.CONTRACT_ERRORS;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.PayoutManager=t.PayoutManager;exports.PeginManager=t.PeginManager;exports.calculateBtcTxHash=t.calculateBtcTxHash;exports.computeWotsPkHash=t.computeWotsPkHash;exports.createTaprootScriptPathSignOptions=t.createTaprootScriptPathSignOptions;exports.deriveWotsKeypair=t.deriveWotsKeypair;exports.deriveWotsPkHash=t.deriveWotsPkHash;exports.extractErrorData=t.extractErrorData;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getContractErrorMessage=t.getContractErrorMessage;exports.getDustThreshold=t.getDustThreshold;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getPsbtInputFields=t.getPsbtInputFields;exports.getScriptType=t.getScriptType;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.handleContractError=t.handleContractError;exports.isKnownContractError=t.isKnownContractError;exports.isWotsMismatchError=t.isWotsMismatchError;exports.keypairToPublicKey=t.keypairToPublicKey;exports.mnemonicToWotsSeed=t.mnemonicToWotsSeed;exports.pushTx=t.pushTx;exports.selectUtxosForPegin=t.selectUtxosForPegin;exports.shouldAddChangeOutput=t.shouldAddChangeOutput;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BitcoinNetworks as e } from "./shared/index.js";
|
|
2
|
-
import { B as r, D as o, F as i, L as n, M as u, P
|
|
2
|
+
import { B as r, D as o, F as i, L as n, M as u, P, z as T, S as d, T as l, W as g, l as p, j as E, k as c, h as _, d as A, a as x, b as S, g as b, c as y, m as I, n as R, o as m, s as C, i as F, e as U, f as O, E as f, G as h, p as L, q as M, r as H, C as N, A as B, t as D, y as W, u as k, v, w, x as X } from "./challengeAssert-C5DQSUnp.js";
|
|
3
3
|
import { computeMinClaimValue as V, deriveVaultId as Y } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
4
|
-
import {
|
|
4
|
+
import { o as z, B as Z, C as j, M as q, f as J, P as Q, c as $, y as ss, e as as, w as es, z as ts, q as rs, h as os, i as is, r as ns, g as us, j as Ps, k as Ts, d as ds, b as ls, l as gs, m as ps, n as Es, u as cs, t as _s, A as As, x as xs, v as Ss, p as bs, s as ys, a as Is } from "./errors-BEUjAw2k.js";
|
|
5
5
|
export {
|
|
6
6
|
z as BTCVaultRegistryABI,
|
|
7
7
|
r as BTC_DUST_SAT,
|
|
@@ -13,16 +13,16 @@ export {
|
|
|
13
13
|
n as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
14
14
|
u as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
15
15
|
q as MEMPOOL_API_URLS,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
P as P2TR_INPUT_SIZE,
|
|
17
|
+
T as PEGIN_FIXED_OUTPUTS,
|
|
18
18
|
J as PayoutManager,
|
|
19
19
|
Q as PeginManager,
|
|
20
20
|
d as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
21
21
|
l as TX_BUFFER_SIZE_OVERHEAD,
|
|
22
|
-
|
|
22
|
+
g as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
23
23
|
p as buildChallengeAssertPsbt,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
E as buildDepositorPayoutPsbt,
|
|
25
|
+
c as buildNoPayoutPsbt,
|
|
26
26
|
_ as buildPayoutPsbt,
|
|
27
27
|
A as buildPeginInputPsbt,
|
|
28
28
|
x as buildPeginTxFromFundedPrePegin,
|
|
@@ -31,49 +31,47 @@ export {
|
|
|
31
31
|
$ as calculateBtcTxHash,
|
|
32
32
|
V as computeMinClaimValue,
|
|
33
33
|
y as computeNumLocalChallengers,
|
|
34
|
-
|
|
34
|
+
ss as computeWotsPkHash,
|
|
35
35
|
I as createPayoutScript,
|
|
36
|
-
|
|
37
|
-
ea as createSplitTransactionPsbt,
|
|
38
|
-
ta as createTaprootScriptPathSignOptions,
|
|
36
|
+
as as createTaprootScriptPathSignOptions,
|
|
39
37
|
R as deriveNativeSegwitAddress,
|
|
40
38
|
m as deriveTaprootAddress,
|
|
41
39
|
Y as deriveVaultId,
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
es as deriveWotsKeypair,
|
|
41
|
+
ts as deriveWotsPkHash,
|
|
44
42
|
C as ensureHexPrefix,
|
|
45
|
-
|
|
43
|
+
rs as extractErrorData,
|
|
46
44
|
F as extractPayoutSignature,
|
|
47
45
|
U as extractPeginInputSignature,
|
|
48
46
|
O as finalizePeginInputPsbt,
|
|
49
47
|
f as fundPeginTransaction,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
os as getAddressTxs,
|
|
49
|
+
is as getAddressUtxos,
|
|
50
|
+
ns as getContractErrorMessage,
|
|
51
|
+
us as getDustThreshold,
|
|
52
|
+
Ps as getMempoolApiUrl,
|
|
55
53
|
h as getNetwork,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
Ts as getNetworkFees,
|
|
55
|
+
ds as getPsbtInputFields,
|
|
56
|
+
ls as getScriptType,
|
|
57
|
+
gs as getTxHex,
|
|
58
|
+
ps as getTxInfo,
|
|
59
|
+
Es as getUtxoInfo,
|
|
60
|
+
cs as handleContractError,
|
|
63
61
|
L as hexToUint8Array,
|
|
64
62
|
M as isAddressFromPublicKey,
|
|
65
|
-
|
|
63
|
+
_s as isKnownContractError,
|
|
66
64
|
H as isValidHex,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
As as isWotsMismatchError,
|
|
66
|
+
xs as keypairToPublicKey,
|
|
67
|
+
Ss as mnemonicToWotsSeed,
|
|
70
68
|
N as parseUnfundedWasmTransaction,
|
|
71
69
|
B as peginOutputCount,
|
|
72
70
|
D as processPublicKeyToXOnly,
|
|
73
|
-
|
|
71
|
+
bs as pushTx,
|
|
74
72
|
W as rateBasedTxBufferFee,
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
ys as selectUtxosForPegin,
|
|
74
|
+
Is as shouldAddChangeOutput,
|
|
77
75
|
k as stripHexPrefix,
|
|
78
76
|
v as toXOnly,
|
|
79
77
|
w as uint8ArrayToHex,
|
package/dist/tbv/core/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../challengeAssert-D7SqsNpQ.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../../errors-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../challengeAssert-D7SqsNpQ.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../../errors-DnMc1lLU.cjs");exports.BTC_DUST_SAT=e.BTC_DUST_SAT;exports.DUST_THRESHOLD=e.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=e.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=e.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=e.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=e.P2TR_INPUT_SIZE;exports.PEGIN_FIXED_OUTPUTS=e.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=e.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=e.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=e.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.buildChallengeAssertPsbt=e.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=e.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=e.buildNoPayoutPsbt;exports.buildPayoutPsbt=e.buildPayoutPsbt;exports.buildPeginInputPsbt=e.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=e.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=e.buildPrePeginPsbt;exports.buildRefundPsbt=e.buildRefundPsbt;exports.computeNumLocalChallengers=e.computeNumLocalChallengers;exports.createPayoutScript=e.createPayoutScript;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.extractPayoutSignature=e.extractPayoutSignature;exports.extractPeginInputSignature=e.extractPeginInputSignature;exports.finalizePeginInputPsbt=e.finalizePeginInputPsbt;exports.fundPeginTransaction=e.fundPeginTransaction;exports.getNetwork=e.getNetwork;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.parseUnfundedWasmTransaction=e.parseUnfundedWasmTransaction;exports.peginOutputCount=e.peginOutputCount;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>r.deriveVaultId});exports.BTCVaultRegistryABI=t.BTCVaultRegistryABI;exports.BitcoinScriptType=t.BitcoinScriptType;exports.CONTRACT_ERRORS=t.CONTRACT_ERRORS;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.PayoutManager=t.PayoutManager;exports.PeginManager=t.PeginManager;exports.calculateBtcTxHash=t.calculateBtcTxHash;exports.computeWotsPkHash=t.computeWotsPkHash;exports.createTaprootScriptPathSignOptions=t.createTaprootScriptPathSignOptions;exports.deriveWotsKeypair=t.deriveWotsKeypair;exports.deriveWotsPkHash=t.deriveWotsPkHash;exports.extractErrorData=t.extractErrorData;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getContractErrorMessage=t.getContractErrorMessage;exports.getDustThreshold=t.getDustThreshold;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getPsbtInputFields=t.getPsbtInputFields;exports.getScriptType=t.getScriptType;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.handleContractError=t.handleContractError;exports.isKnownContractError=t.isKnownContractError;exports.isWotsMismatchError=t.isWotsMismatchError;exports.keypairToPublicKey=t.keypairToPublicKey;exports.mnemonicToWotsSeed=t.mnemonicToWotsSeed;exports.pushTx=t.pushTx;exports.selectUtxosForPegin=t.selectUtxosForPegin;exports.shouldAddChangeOutput=t.shouldAddChangeOutput;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/tbv/core/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as e, D as t, F as r, L as
|
|
1
|
+
import { B as e, D as t, F as r, L as o, M as i, P as n, z as u, S as P, T, W as d, l, j as g, k as E, h as p, d as c, a as _, b as A, g as x, c as S, m as b, n as y, o as I, s as R, i as C, e as F, f as U, E as m, G as O, p as h, q as f, r as L, C as M, A as H, t as N, y as B, u as D, v as W, w as v, x as k } from "../../challengeAssert-C5DQSUnp.js";
|
|
2
2
|
import { computeMinClaimValue as X, deriveVaultId as K } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
-
import {
|
|
3
|
+
import { o as Y, B as G, C as z, M as Z, f as j, P as q, c as J, y as Q, e as $, w as aa, z as sa, q as ea, h as ta, i as ra, r as oa, g as ia, j as na, k as ua, d as Pa, b as Ta, l as da, m as la, n as ga, u as Ea, t as pa, A as ca, x as _a, v as Aa, p as xa, s as Sa, a as ba } from "../../errors-BEUjAw2k.js";
|
|
4
4
|
export {
|
|
5
5
|
Y as BTCVaultRegistryABI,
|
|
6
6
|
e as BTC_DUST_SAT,
|
|
@@ -8,70 +8,68 @@ export {
|
|
|
8
8
|
z as CONTRACT_ERRORS,
|
|
9
9
|
t as DUST_THRESHOLD,
|
|
10
10
|
r as FEE_SAFETY_MARGIN,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
o as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
12
|
+
i as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
13
13
|
Z as MEMPOOL_API_URLS,
|
|
14
14
|
n as P2TR_INPUT_SIZE,
|
|
15
15
|
u as PEGIN_FIXED_OUTPUTS,
|
|
16
16
|
j as PayoutManager,
|
|
17
17
|
q as PeginManager,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
P as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
19
|
+
T as TX_BUFFER_SIZE_OVERHEAD,
|
|
20
20
|
d as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
21
21
|
l as buildChallengeAssertPsbt,
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
g as buildDepositorPayoutPsbt,
|
|
23
|
+
E as buildNoPayoutPsbt,
|
|
24
24
|
p as buildPayoutPsbt,
|
|
25
|
-
|
|
25
|
+
c as buildPeginInputPsbt,
|
|
26
26
|
_ as buildPeginTxFromFundedPrePegin,
|
|
27
27
|
A as buildPrePeginPsbt,
|
|
28
|
-
|
|
28
|
+
x as buildRefundPsbt,
|
|
29
29
|
J as calculateBtcTxHash,
|
|
30
30
|
X as computeMinClaimValue,
|
|
31
|
-
|
|
31
|
+
S as computeNumLocalChallengers,
|
|
32
32
|
Q as computeWotsPkHash,
|
|
33
33
|
b as createPayoutScript,
|
|
34
|
-
$ as
|
|
35
|
-
aa as createSplitTransactionPsbt,
|
|
36
|
-
sa as createTaprootScriptPathSignOptions,
|
|
34
|
+
$ as createTaprootScriptPathSignOptions,
|
|
37
35
|
y as deriveNativeSegwitAddress,
|
|
38
36
|
I as deriveTaprootAddress,
|
|
39
37
|
K as deriveVaultId,
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
aa as deriveWotsKeypair,
|
|
39
|
+
sa as deriveWotsPkHash,
|
|
42
40
|
R as ensureHexPrefix,
|
|
43
|
-
|
|
41
|
+
ea as extractErrorData,
|
|
44
42
|
C as extractPayoutSignature,
|
|
45
43
|
F as extractPeginInputSignature,
|
|
46
44
|
U as finalizePeginInputPsbt,
|
|
47
45
|
m as fundPeginTransaction,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
ta as getAddressTxs,
|
|
47
|
+
ra as getAddressUtxos,
|
|
48
|
+
oa as getContractErrorMessage,
|
|
49
|
+
ia as getDustThreshold,
|
|
50
|
+
na as getMempoolApiUrl,
|
|
53
51
|
O as getNetwork,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
ua as getNetworkFees,
|
|
53
|
+
Pa as getPsbtInputFields,
|
|
54
|
+
Ta as getScriptType,
|
|
55
|
+
da as getTxHex,
|
|
56
|
+
la as getTxInfo,
|
|
57
|
+
ga as getUtxoInfo,
|
|
60
58
|
Ea as handleContractError,
|
|
61
59
|
h as hexToUint8Array,
|
|
62
60
|
f as isAddressFromPublicKey,
|
|
63
|
-
|
|
61
|
+
pa as isKnownContractError,
|
|
64
62
|
L as isValidHex,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
ca as isWotsMismatchError,
|
|
64
|
+
_a as keypairToPublicKey,
|
|
65
|
+
Aa as mnemonicToWotsSeed,
|
|
68
66
|
M as parseUnfundedWasmTransaction,
|
|
69
67
|
H as peginOutputCount,
|
|
70
68
|
N as processPublicKeyToXOnly,
|
|
71
|
-
|
|
69
|
+
xa as pushTx,
|
|
72
70
|
B as rateBasedTxBufferFee,
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
Sa as selectUtxosForPegin,
|
|
72
|
+
ba as shouldAddChangeOutput,
|
|
75
73
|
D as stripHexPrefix,
|
|
76
74
|
W as toXOnly,
|
|
77
75
|
v as uint8ArrayToHex,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/utils/transaction/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/utils/transaction/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC"}
|
package/dist/tbv/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../challengeAssert-D7SqsNpQ.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../errors-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../challengeAssert-D7SqsNpQ.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../errors-DnMc1lLU.cjs");exports.BTC_DUST_SAT=e.BTC_DUST_SAT;exports.DUST_THRESHOLD=e.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=e.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=e.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=e.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=e.P2TR_INPUT_SIZE;exports.PEGIN_FIXED_OUTPUTS=e.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=e.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=e.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=e.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.buildChallengeAssertPsbt=e.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=e.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=e.buildNoPayoutPsbt;exports.buildPayoutPsbt=e.buildPayoutPsbt;exports.buildPeginInputPsbt=e.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=e.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=e.buildPrePeginPsbt;exports.buildRefundPsbt=e.buildRefundPsbt;exports.computeNumLocalChallengers=e.computeNumLocalChallengers;exports.createPayoutScript=e.createPayoutScript;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.extractPayoutSignature=e.extractPayoutSignature;exports.extractPeginInputSignature=e.extractPeginInputSignature;exports.finalizePeginInputPsbt=e.finalizePeginInputPsbt;exports.fundPeginTransaction=e.fundPeginTransaction;exports.getNetwork=e.getNetwork;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.parseUnfundedWasmTransaction=e.parseUnfundedWasmTransaction;exports.peginOutputCount=e.peginOutputCount;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>r.deriveVaultId});exports.BTCVaultRegistryABI=t.BTCVaultRegistryABI;exports.BitcoinScriptType=t.BitcoinScriptType;exports.CONTRACT_ERRORS=t.CONTRACT_ERRORS;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.PayoutManager=t.PayoutManager;exports.PeginManager=t.PeginManager;exports.calculateBtcTxHash=t.calculateBtcTxHash;exports.computeWotsPkHash=t.computeWotsPkHash;exports.createTaprootScriptPathSignOptions=t.createTaprootScriptPathSignOptions;exports.deriveWotsKeypair=t.deriveWotsKeypair;exports.deriveWotsPkHash=t.deriveWotsPkHash;exports.extractErrorData=t.extractErrorData;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getContractErrorMessage=t.getContractErrorMessage;exports.getDustThreshold=t.getDustThreshold;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getPsbtInputFields=t.getPsbtInputFields;exports.getScriptType=t.getScriptType;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.handleContractError=t.handleContractError;exports.isKnownContractError=t.isKnownContractError;exports.isWotsMismatchError=t.isWotsMismatchError;exports.keypairToPublicKey=t.keypairToPublicKey;exports.mnemonicToWotsSeed=t.mnemonicToWotsSeed;exports.pushTx=t.pushTx;exports.selectUtxosForPegin=t.selectUtxosForPegin;exports.shouldAddChangeOutput=t.shouldAddChangeOutput;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/tbv/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as e, D as t, F as r, L as
|
|
1
|
+
import { B as e, D as t, F as r, L as o, M as i, P as n, z as u, S as P, T, W as d, l, j as g, k as E, h as p, d as c, a as _, b as A, g as x, c as S, m as b, n as y, o as I, s as R, i as C, e as F, f as U, E as m, G as O, p as h, q as f, r as L, C as M, A as H, t as N, y as B, u as D, v as W, w as v, x as k } from "../challengeAssert-C5DQSUnp.js";
|
|
2
2
|
import { computeMinClaimValue as X, deriveVaultId as K } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
-
import {
|
|
3
|
+
import { o as Y, B as G, C as z, M as Z, f as j, P as q, c as J, y as Q, e as $, w as aa, z as sa, q as ea, h as ta, i as ra, r as oa, g as ia, j as na, k as ua, d as Pa, b as Ta, l as da, m as la, n as ga, u as Ea, t as pa, A as ca, x as _a, v as Aa, p as xa, s as Sa, a as ba } from "../errors-BEUjAw2k.js";
|
|
4
4
|
export {
|
|
5
5
|
Y as BTCVaultRegistryABI,
|
|
6
6
|
e as BTC_DUST_SAT,
|
|
@@ -8,70 +8,68 @@ export {
|
|
|
8
8
|
z as CONTRACT_ERRORS,
|
|
9
9
|
t as DUST_THRESHOLD,
|
|
10
10
|
r as FEE_SAFETY_MARGIN,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
o as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
12
|
+
i as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
13
13
|
Z as MEMPOOL_API_URLS,
|
|
14
14
|
n as P2TR_INPUT_SIZE,
|
|
15
15
|
u as PEGIN_FIXED_OUTPUTS,
|
|
16
16
|
j as PayoutManager,
|
|
17
17
|
q as PeginManager,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
P as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
19
|
+
T as TX_BUFFER_SIZE_OVERHEAD,
|
|
20
20
|
d as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
21
21
|
l as buildChallengeAssertPsbt,
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
g as buildDepositorPayoutPsbt,
|
|
23
|
+
E as buildNoPayoutPsbt,
|
|
24
24
|
p as buildPayoutPsbt,
|
|
25
|
-
|
|
25
|
+
c as buildPeginInputPsbt,
|
|
26
26
|
_ as buildPeginTxFromFundedPrePegin,
|
|
27
27
|
A as buildPrePeginPsbt,
|
|
28
|
-
|
|
28
|
+
x as buildRefundPsbt,
|
|
29
29
|
J as calculateBtcTxHash,
|
|
30
30
|
X as computeMinClaimValue,
|
|
31
|
-
|
|
31
|
+
S as computeNumLocalChallengers,
|
|
32
32
|
Q as computeWotsPkHash,
|
|
33
33
|
b as createPayoutScript,
|
|
34
|
-
$ as
|
|
35
|
-
aa as createSplitTransactionPsbt,
|
|
36
|
-
sa as createTaprootScriptPathSignOptions,
|
|
34
|
+
$ as createTaprootScriptPathSignOptions,
|
|
37
35
|
y as deriveNativeSegwitAddress,
|
|
38
36
|
I as deriveTaprootAddress,
|
|
39
37
|
K as deriveVaultId,
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
aa as deriveWotsKeypair,
|
|
39
|
+
sa as deriveWotsPkHash,
|
|
42
40
|
R as ensureHexPrefix,
|
|
43
|
-
|
|
41
|
+
ea as extractErrorData,
|
|
44
42
|
C as extractPayoutSignature,
|
|
45
43
|
F as extractPeginInputSignature,
|
|
46
44
|
U as finalizePeginInputPsbt,
|
|
47
45
|
m as fundPeginTransaction,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
ta as getAddressTxs,
|
|
47
|
+
ra as getAddressUtxos,
|
|
48
|
+
oa as getContractErrorMessage,
|
|
49
|
+
ia as getDustThreshold,
|
|
50
|
+
na as getMempoolApiUrl,
|
|
53
51
|
O as getNetwork,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
ua as getNetworkFees,
|
|
53
|
+
Pa as getPsbtInputFields,
|
|
54
|
+
Ta as getScriptType,
|
|
55
|
+
da as getTxHex,
|
|
56
|
+
la as getTxInfo,
|
|
57
|
+
ga as getUtxoInfo,
|
|
60
58
|
Ea as handleContractError,
|
|
61
59
|
h as hexToUint8Array,
|
|
62
60
|
f as isAddressFromPublicKey,
|
|
63
|
-
|
|
61
|
+
pa as isKnownContractError,
|
|
64
62
|
L as isValidHex,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
ca as isWotsMismatchError,
|
|
64
|
+
_a as keypairToPublicKey,
|
|
65
|
+
Aa as mnemonicToWotsSeed,
|
|
68
66
|
M as parseUnfundedWasmTransaction,
|
|
69
67
|
H as peginOutputCount,
|
|
70
68
|
N as processPublicKeyToXOnly,
|
|
71
|
-
|
|
69
|
+
xa as pushTx,
|
|
72
70
|
B as rateBasedTxBufferFee,
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
Sa as selectUtxosForPegin,
|
|
72
|
+
ba as shouldAddChangeOutput,
|
|
75
73
|
D as stripHexPrefix,
|
|
76
74
|
W as toXOnly,
|
|
77
75
|
v as uint8ArrayToHex,
|
|
@@ -73,8 +73,8 @@ declare const _default: [
|
|
|
73
73
|
"outputs": [
|
|
74
74
|
{
|
|
75
75
|
"name": "dynamicConfigKey",
|
|
76
|
-
"type": "
|
|
77
|
-
"internalType": "
|
|
76
|
+
"type": "uint32",
|
|
77
|
+
"internalType": "uint32"
|
|
78
78
|
}
|
|
79
79
|
],
|
|
80
80
|
"stateMutability": "nonpayable"
|
|
@@ -202,8 +202,8 @@ declare const _default: [
|
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
"name": "dynamicConfigKey",
|
|
205
|
-
"type": "
|
|
206
|
-
"internalType": "
|
|
205
|
+
"type": "uint32",
|
|
206
|
+
"internalType": "uint32"
|
|
207
207
|
}
|
|
208
208
|
],
|
|
209
209
|
"outputs": [
|
|
@@ -341,29 +341,19 @@ declare const _default: [
|
|
|
341
341
|
"internalType": "uint8"
|
|
342
342
|
},
|
|
343
343
|
{
|
|
344
|
-
"name": "
|
|
344
|
+
"name": "collateralRisk",
|
|
345
345
|
"type": "uint24",
|
|
346
346
|
"internalType": "uint24"
|
|
347
347
|
},
|
|
348
348
|
{
|
|
349
|
-
"name": "
|
|
350
|
-
"type": "
|
|
351
|
-
"internalType": "
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
"name": "frozen",
|
|
355
|
-
"type": "bool",
|
|
356
|
-
"internalType": "bool"
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
"name": "borrowable",
|
|
360
|
-
"type": "bool",
|
|
361
|
-
"internalType": "bool"
|
|
349
|
+
"name": "flags",
|
|
350
|
+
"type": "uint8",
|
|
351
|
+
"internalType": "ReserveFlags"
|
|
362
352
|
},
|
|
363
353
|
{
|
|
364
|
-
"name": "
|
|
365
|
-
"type": "
|
|
366
|
-
"internalType": "
|
|
354
|
+
"name": "dynamicConfigKey",
|
|
355
|
+
"type": "uint32",
|
|
356
|
+
"internalType": "uint32"
|
|
367
357
|
}
|
|
368
358
|
]
|
|
369
359
|
}
|
|
@@ -638,8 +628,8 @@ declare const _default: [
|
|
|
638
628
|
},
|
|
639
629
|
{
|
|
640
630
|
"name": "dynamicConfigKey",
|
|
641
|
-
"type": "
|
|
642
|
-
"internalType": "
|
|
631
|
+
"type": "uint32",
|
|
632
|
+
"internalType": "uint32"
|
|
643
633
|
}
|
|
644
634
|
]
|
|
645
635
|
}
|
|
@@ -1061,8 +1051,8 @@ declare const _default: [
|
|
|
1061
1051
|
},
|
|
1062
1052
|
{
|
|
1063
1053
|
"name": "dynamicConfigKey",
|
|
1064
|
-
"type": "
|
|
1065
|
-
"internalType": "
|
|
1054
|
+
"type": "uint32",
|
|
1055
|
+
"internalType": "uint32"
|
|
1066
1056
|
},
|
|
1067
1057
|
{
|
|
1068
1058
|
"name": "dynamicConfig",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { getPosition, getPositionCollateral } from './query.js';
|
|
2
|
-
export {
|
|
2
|
+
export { getDynamicReserveConfig, getReserve, getTargetHealthFactor, getUserAccountData, getUserPosition, getUserTotalDebt, hasCollateral, hasDebt, } from './spoke.js';
|
|
3
3
|
export { buildBorrowTx, buildReorderVaultsTx, buildRepayTx, buildWithdrawCollateralsTx, } from './transaction.js';
|
|
4
4
|
//# 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,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGhE,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/integrations/aave/clients/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGhE,OAAO,EACL,uBAAuB,EACvB,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,OAAO,GACR,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,YAAY,EACZ,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC"}
|
|
@@ -119,43 +119,76 @@ export declare function hasCollateral(publicClient: PublicClient, spokeAddress:
|
|
|
119
119
|
* - For partial repayment, use any amount less than total debt
|
|
120
120
|
*/
|
|
121
121
|
export declare function getUserTotalDebt(publicClient: PublicClient, spokeAddress: Address, reserveId: bigint, userAddress: Address): Promise<bigint>;
|
|
122
|
+
/** Result type from the `getReserve` contract call.
|
|
123
|
+
*
|
|
124
|
+
* Matches the on-chain `Reserve` struct defined in `ITBVAaveSpoke.sol`:
|
|
125
|
+
* struct Reserve {
|
|
126
|
+
* address underlying;
|
|
127
|
+
* address hub;
|
|
128
|
+
* uint16 assetId;
|
|
129
|
+
* uint8 decimals;
|
|
130
|
+
* uint24 collateralRisk;
|
|
131
|
+
* ReserveFlags flags; // uint8 bitmap
|
|
132
|
+
* uint32 dynamicConfigKey;
|
|
133
|
+
* }
|
|
134
|
+
*
|
|
135
|
+
* Note: this is the `Reserve` struct, NOT `ReserveConfig` — the contract
|
|
136
|
+
* exposes both as separate functions and they return different shapes.
|
|
137
|
+
*/
|
|
138
|
+
type ReserveResult = {
|
|
139
|
+
underlying: Address;
|
|
140
|
+
hub: Address;
|
|
141
|
+
assetId: number;
|
|
142
|
+
decimals: number;
|
|
143
|
+
collateralRisk: number;
|
|
144
|
+
flags: number;
|
|
145
|
+
dynamicConfigKey: number;
|
|
146
|
+
};
|
|
122
147
|
/**
|
|
123
|
-
* Get
|
|
148
|
+
* Get reserve data from the Core Spoke contract via the `getReserve` selector.
|
|
124
149
|
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
150
|
+
* Returns static reserve properties including the `dynamicConfigKey` needed
|
|
151
|
+
* for `getDynamicReserveConfig` calls. Use this as a fallback when reserve
|
|
152
|
+
* data is not available from the GraphQL indexer.
|
|
127
153
|
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* @returns Target health factor in WAD (1e18 = 1.0). Example: 1.10 = 1_100_000_000_000_000_000n
|
|
154
|
+
* Do NOT confuse with the contract's separate `getReserveConfig` function,
|
|
155
|
+
* which returns `{collateralRisk, paused, frozen, borrowable, receiveSharesEnabled}`.
|
|
131
156
|
*
|
|
132
|
-
*
|
|
157
|
+
* @param publicClient - Viem public client for reading contracts
|
|
158
|
+
* @param spokeAddress - Core Spoke contract address
|
|
159
|
+
* @param reserveId - Reserve ID
|
|
160
|
+
* @returns Reserve data including `dynamicConfigKey`
|
|
133
161
|
*/
|
|
134
|
-
export declare function
|
|
162
|
+
export declare function getReserve(publicClient: PublicClient, spokeAddress: Address, reserveId: bigint): Promise<ReserveResult>;
|
|
163
|
+
/** Result type from getDynamicReserveConfig contract call */
|
|
164
|
+
type DynamicReserveConfigResult = {
|
|
165
|
+
collateralFactor: bigint;
|
|
166
|
+
maxLiquidationBonus: bigint;
|
|
167
|
+
liquidationFee: bigint;
|
|
168
|
+
};
|
|
135
169
|
/**
|
|
136
|
-
* Get the
|
|
137
|
-
*
|
|
138
|
-
* Determines what fraction of collateral value counts toward borrowing power.
|
|
139
|
-
* Default is 75% (7500 BPS), configurable per spoke.
|
|
170
|
+
* Get the target health factor (THF) from the Core Spoke contract.
|
|
140
171
|
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
* @returns Collateral factor in BPS (10000 = 100%). Example: 0.75 = 7500n
|
|
172
|
+
* Per-spoke governance parameter. After a liquidation, the protocol targets
|
|
173
|
+
* restoring the position to this health factor.
|
|
144
174
|
*
|
|
145
|
-
*
|
|
175
|
+
* @param publicClient - Viem public client for reading contracts
|
|
176
|
+
* @param spokeAddress - Core Spoke contract address
|
|
177
|
+
* @returns Target health factor in WAD (1e18 = 1.0). Example: 1.10 = 1_100_000_000_000_000_000n
|
|
146
178
|
*/
|
|
147
|
-
export declare function
|
|
179
|
+
export declare function getTargetHealthFactor(publicClient: PublicClient, spokeAddress: Address): Promise<bigint>;
|
|
148
180
|
/**
|
|
149
|
-
* Get the
|
|
150
|
-
*
|
|
151
|
-
* The bonus multiplier awarded to liquidators. Fixed at 1.05 (5% bonus)
|
|
152
|
-
* with min = max (no Dutch auction).
|
|
181
|
+
* Get the dynamic reserve config from the Core Spoke contract.
|
|
153
182
|
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
* @returns Liquidation bonus in WAD (1e18 = 1.0). Example: 1.05 = 1_050_000_000_000_000_000n
|
|
183
|
+
* Returns collateral factor, max liquidation bonus, and liquidation fee
|
|
184
|
+
* for a specific reserve and dynamic config key.
|
|
157
185
|
*
|
|
158
|
-
*
|
|
186
|
+
* @param publicClient - Viem public client for reading contracts
|
|
187
|
+
* @param spokeAddress - Core Spoke contract address
|
|
188
|
+
* @param reserveId - Reserve ID (e.g., vBTC reserve ID from indexer config)
|
|
189
|
+
* @param dynamicConfigKey - Dynamic config key (from reserve data)
|
|
190
|
+
* @returns Dynamic reserve config with collateralFactor (BPS), maxLiquidationBonus (BPS), liquidationFee (BPS)
|
|
159
191
|
*/
|
|
160
|
-
export declare function
|
|
192
|
+
export declare function getDynamicReserveConfig(publicClient: PublicClient, spokeAddress: Address, reserveId: bigint, dynamicConfigKey: number): Promise<DynamicReserveConfigResult>;
|
|
193
|
+
export {};
|
|
161
194
|
//# sourceMappingURL=spoke.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spoke.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/integrations/aave/clients/spoke.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"spoke.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/integrations/aave/clients/spoke.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAElD,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAuCrB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAsB,kBAAkB,CACtC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,OAAO,EACrB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,wBAAwB,CAAC,CAkBnC;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,eAAe,CACnC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,OAAO,EACrB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAShC;AAED;;;;;;;;GAQG;AACH,wBAAsB,OAAO,CAC3B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,OAAO,EACrB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CACjC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,OAAO,EACrB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,gBAAgB,CACpC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,OAAO,EACrB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,MAAM,CAAC,CASjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,KAAK,aAAa,GAAG;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,UAAU,CAC9B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,OAAO,EACrB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,CAAC,CAQxB;AASD,6DAA6D;AAC7D,KAAK,0BAA0B,GAAG;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CACzC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,OAAO,GACpB,OAAO,CAAC,MAAM,CAAC,CAQjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,OAAO,EACrB,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,0BAA0B,CAAC,CAQrC"}
|