@continuumdao/ctm-mpc-defi 0.2.56 → 0.2.58
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/agent/catalog.cjs +749 -171
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +373 -44
- package/dist/agent/catalog.js +738 -173
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/aave-v4/SKILL.md +26 -3
- package/dist/agent/skills/aerodrome/SKILL.md +3 -1
- package/dist/agent/skills/circle-cctp/SKILL.md +1 -1
- package/dist/agent/skills/curve-dao/SKILL.md +2 -2
- package/dist/agent/skills/railgun/SKILL.md +39 -0
- package/dist/agent/skills/uniswap-v4/SKILL.md +2 -2
- package/dist/index.cjs +165 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +166 -20
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/aave-v4/index.cjs +198 -15
- package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/aave-v4/index.d.ts +62 -7
- package/dist/protocols/evm/aave-v4/index.js +189 -16
- package/dist/protocols/evm/aave-v4/index.js.map +1 -1
- package/dist/protocols/evm/aerodrome/index.cjs +152 -63
- package/dist/protocols/evm/aerodrome/index.cjs.map +1 -1
- package/dist/protocols/evm/aerodrome/index.d.ts +30 -58
- package/dist/protocols/evm/aerodrome/index.js +151 -64
- package/dist/protocols/evm/aerodrome/index.js.map +1 -1
- package/dist/protocols/evm/circle-cctp/index.cjs +5 -3
- package/dist/protocols/evm/circle-cctp/index.cjs.map +1 -1
- package/dist/protocols/evm/circle-cctp/index.d.ts +3 -1
- package/dist/protocols/evm/circle-cctp/index.js +5 -4
- package/dist/protocols/evm/circle-cctp/index.js.map +1 -1
- package/dist/protocols/evm/compound-v3/index.cjs +115 -2
- package/dist/protocols/evm/compound-v3/index.cjs.map +1 -1
- package/dist/protocols/evm/compound-v3/index.js +116 -3
- package/dist/protocols/evm/compound-v3/index.js.map +1 -1
- package/dist/protocols/evm/continuum-dao/index.cjs +1 -1
- package/dist/protocols/evm/continuum-dao/index.cjs.map +1 -1
- package/dist/protocols/evm/continuum-dao/index.d.ts +1 -1
- package/dist/protocols/evm/continuum-dao/index.js +1 -1
- package/dist/protocols/evm/continuum-dao/index.js.map +1 -1
- package/dist/protocols/evm/curve-dao/index.cjs +120 -5
- package/dist/protocols/evm/curve-dao/index.cjs.map +1 -1
- package/dist/protocols/evm/curve-dao/index.js +120 -5
- package/dist/protocols/evm/curve-dao/index.js.map +1 -1
- package/dist/protocols/evm/euler-v2/index.cjs +121 -6
- package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
- package/dist/protocols/evm/euler-v2/index.js +121 -6
- package/dist/protocols/evm/euler-v2/index.js.map +1 -1
- package/dist/protocols/evm/morpho/index.cjs +129 -57
- package/dist/protocols/evm/morpho/index.cjs.map +1 -1
- package/dist/protocols/evm/morpho/index.d.ts +2 -1
- package/dist/protocols/evm/morpho/index.js +129 -58
- package/dist/protocols/evm/morpho/index.js.map +1 -1
- package/dist/protocols/evm/pendle/index.cjs +129 -10
- package/dist/protocols/evm/pendle/index.cjs.map +1 -1
- package/dist/protocols/evm/pendle/index.js +129 -10
- package/dist/protocols/evm/pendle/index.js.map +1 -1
- package/dist/protocols/evm/railgun/index.cjs +1261 -0
- package/dist/protocols/evm/railgun/index.cjs.map +1 -0
- package/dist/protocols/evm/railgun/index.d.ts +294 -0
- package/dist/protocols/evm/railgun/index.js +1218 -0
- package/dist/protocols/evm/railgun/index.js.map +1 -0
- package/dist/protocols/evm/uniswap-v4/index.cjs +164 -17
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.js +165 -18
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
- package/package.json +17 -1
|
@@ -52,6 +52,19 @@ type KeyGenSubset = {
|
|
|
52
52
|
/** App-compatible alias used by multisign builders and Permit2 helpers. */
|
|
53
53
|
type KeyGenSubsetForPermit = KeyGenSubset;
|
|
54
54
|
|
|
55
|
+
type CoinbaseB20KnownToken = {
|
|
56
|
+
address: Address;
|
|
57
|
+
symbol: string;
|
|
58
|
+
decimals: number;
|
|
59
|
+
name?: string;
|
|
60
|
+
iconUrl?: string;
|
|
61
|
+
};
|
|
62
|
+
type CoinbaseB20CatalogToken = CoinbaseB20KnownToken & {
|
|
63
|
+
name: string;
|
|
64
|
+
};
|
|
65
|
+
/** Live Coinbase list (PYPLc, AMDc, ORCLc, …). Falls back to the seed when the API is down. */
|
|
66
|
+
declare function ensureCoinbaseB20StockCatalog(): Promise<readonly CoinbaseB20CatalogToken[]>;
|
|
67
|
+
|
|
55
68
|
declare const AAVE_V4_GRAPHQL_URL = "https://api.v4.aave.com/graphql";
|
|
56
69
|
declare function aaveV4Gql<T>(query: string, variables?: Record<string, unknown>): Promise<T>;
|
|
57
70
|
type ChainRowV4 = {
|
|
@@ -164,8 +177,31 @@ type AaveV4ChainTokenCache = {
|
|
|
164
177
|
* Fetches and caches (per process) the list of Aave v4 underlying addresses on a chain and the wrapped native token.
|
|
165
178
|
*/
|
|
166
179
|
declare function ensureAaveV4ChainTokenCache(chainId: number): Promise<AaveV4ChainTokenCache>;
|
|
167
|
-
/**
|
|
168
|
-
|
|
180
|
+
/**
|
|
181
|
+
* UI market segment; maps to an Aave v4 hub by name.
|
|
182
|
+
* Plus ≈ Main, Core, Prime ≈ Bluechip, Coinbase Stocks (Base tokenized equities) ≈ bStocks.
|
|
183
|
+
*/
|
|
184
|
+
type AaveV4UiMarketId = 'main' | 'core' | 'bluechip' | 'bstocks';
|
|
185
|
+
/** Base is the chain where Aave v4 lists the Coinbase Stocks hub. */
|
|
186
|
+
declare const AAVE_V4_BSTOCKS_CHAIN_ID = 8453;
|
|
187
|
+
declare const AAVE_V4_UI_MARKETS: readonly {
|
|
188
|
+
id: AaveV4UiMarketId;
|
|
189
|
+
label: string;
|
|
190
|
+
}[];
|
|
191
|
+
/** Coinbase Stocks hub and the names used in governance / the Aave app. */
|
|
192
|
+
declare function isAaveV4BStocksHubName(hubName: string): boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Parse a UI / MCP market id. Accepts hub aliases (`plus`, `prime`, `stocks`, `equities`).
|
|
195
|
+
* Returns undefined when the string is empty or not a known segment.
|
|
196
|
+
*/
|
|
197
|
+
declare function parseAaveV4UiMarketId(raw: string | null | undefined): AaveV4UiMarketId | undefined;
|
|
198
|
+
/** Like {@link parseAaveV4UiMarketId}, with a fallback for omitted or unknown values. */
|
|
199
|
+
declare function normalizeAaveV4UiMarketId(raw: unknown, fallback?: AaveV4UiMarketId): AaveV4UiMarketId;
|
|
200
|
+
/**
|
|
201
|
+
* ERC-20 address, or a Coinbase bStock ticker (`AAPLc`) from the fetched tokenized-stocks catalog.
|
|
202
|
+
* Native `0x0` is returned checksummed; it is not rewritten to a stock.
|
|
203
|
+
*/
|
|
204
|
+
declare function resolveAaveV4UnderlyingAddress(token: string): Address | null;
|
|
169
205
|
type AaveV4Hub = {
|
|
170
206
|
name: string;
|
|
171
207
|
address: `0x${string}`;
|
|
@@ -238,10 +274,16 @@ type AaveV4HubReserve = {
|
|
|
238
274
|
};
|
|
239
275
|
declare function fetchAaveV4HubsForChain(chainId: number): Promise<readonly AaveV4Hub[]>;
|
|
240
276
|
/**
|
|
241
|
-
* Resolves which Aave v4 hub
|
|
242
|
-
* Main → Plus, Core → Core, Bluechip → Prime.
|
|
277
|
+
* Resolves which Aave v4 hub a UI “market” refers to.
|
|
278
|
+
* Main → Plus, Core → Core, Bluechip → Prime, bStocks → Coinbase Stocks.
|
|
279
|
+
* Main does not fall back onto the Coinbase Stocks hub (Base’s only hub is bStocks).
|
|
243
280
|
*/
|
|
244
281
|
declare function resolveAaveV4HubForUiMarket(hubs: readonly AaveV4Hub[], market: AaveV4UiMarketId, chainId: number): AaveV4Hub | null;
|
|
282
|
+
/** UI markets that have a hub on this chain. */
|
|
283
|
+
declare function aaveV4UiMarketsForHubs(hubs: readonly AaveV4Hub[], chainId: number): readonly {
|
|
284
|
+
id: AaveV4UiMarketId;
|
|
285
|
+
label: string;
|
|
286
|
+
}[];
|
|
245
287
|
/**
|
|
246
288
|
* Inverse of {@link resolveAaveV4HubForUiMarket} label mapping, for switching UI market when a hub is chosen by
|
|
247
289
|
* “first hub on chain that lists this underlying”.
|
|
@@ -264,8 +306,11 @@ declare function findAaveV4HubReserveForChainUnderlying(args: {
|
|
|
264
306
|
chainId: number;
|
|
265
307
|
hubs: readonly AaveV4Hub[];
|
|
266
308
|
underlying: `0x${string}`;
|
|
267
|
-
/**
|
|
268
|
-
|
|
309
|
+
/**
|
|
310
|
+
* Tried first; if the asset is not listed here, other hubs on the same chain are scanned.
|
|
311
|
+
* Omit when the selected UI market has no hub on this chain (for example Main on Base).
|
|
312
|
+
*/
|
|
313
|
+
preferHub?: AaveV4Hub | null;
|
|
269
314
|
/** If set, disambiguate using this debt asset’s `borrowAPY` (and optional liquidity) per hub. */
|
|
270
315
|
debtUnderlying?: `0x${string}` | null;
|
|
271
316
|
/**
|
|
@@ -980,6 +1025,7 @@ declare function aaveReadSupplyMetrics(reserve: unknown, symbolForDisplay: strin
|
|
|
980
1025
|
availableLiquidity: string;
|
|
981
1026
|
};
|
|
982
1027
|
|
|
1028
|
+
declare const AAVE_V4_BSTOCKS_MARKET_NOTES: string;
|
|
983
1029
|
type AaveV4MarketSummaryRow = {
|
|
984
1030
|
chainId: number;
|
|
985
1031
|
hubName: string;
|
|
@@ -1037,6 +1083,15 @@ declare function aaveV4FetchMarketSummary(args: {
|
|
|
1037
1083
|
markets: AaveV4MarketSummaryRow[];
|
|
1038
1084
|
notes: string;
|
|
1039
1085
|
}>;
|
|
1086
|
+
/** MCP: Coinbase Stocks hub (bStocks) — same rows as fetch_markets with marketId bstocks. */
|
|
1087
|
+
declare function aaveV4FetchStockMarketsSummary(args: {
|
|
1088
|
+
chainId?: number;
|
|
1089
|
+
underlying?: string;
|
|
1090
|
+
}): Promise<{
|
|
1091
|
+
chainId: number;
|
|
1092
|
+
markets: AaveV4MarketSummaryRow[];
|
|
1093
|
+
notes: string;
|
|
1094
|
+
}>;
|
|
1040
1095
|
|
|
1041
1096
|
declare const MERKL_API_BASE = "https://api.merkl.xyz";
|
|
1042
1097
|
/**
|
|
@@ -1109,4 +1164,4 @@ declare function aaveV4FetchMerklRewardsSummary(args: {
|
|
|
1109
1164
|
declare const AAVE_V4_PROTOCOL_ID = "aave-v4";
|
|
1110
1165
|
declare const aaveV4ProtocolModule: ProtocolModule;
|
|
1111
1166
|
|
|
1112
|
-
export { AAVE_V4_GRAPHQL_URL, AAVE_V4_PROTOCOL_ID, AAVE_V4_SPOKE_BORROW_DEFAULT_GAS_UNITS, AAVE_V4_SPOKE_REPAY_DEFAULT_GAS_UNITS, AAVE_V4_SPOKE_SUPPLY_DEFAULT_GAS_UNITS, AAVE_V4_SPOKE_WITHDRAW_DEFAULT_GAS_UNITS, type AaveBorrowInfoLike, type AaveDecimalValueLike, type AavePercentValueLike, type AaveSupplyInfoLike, type AaveV4BorrowTableRow, type AaveV4BorrowableDisplay, type AaveV4ClaimRewardsTx, type AaveV4ExchangeAmount, type AaveV4Hub, type AaveV4HubReserve, type AaveV4HubReserveSummary, type AaveV4MarketSummaryRow, type AaveV4MerklClaimableRewardRow, type AaveV4PositionActionPayload, type AaveV4SpokeLiquidationConfig, type AaveV4SpokeOnChainReserveStatus, type AaveV4UiMarketId, type AaveV4UserPositionDetail, type AaveV4UserPositionRow, type AaveV4UserPositionsByAsset, type AaveV4UserSupplyRow, type AaveV4WithdrawHealthGateResult, MERKL_API_BASE, MERKL_DISTRIBUTOR_ADDRESS, MERKL_DISTRIBUTOR_CLAIM_GAS_FALLBACK, MERKL_REWARDS_NOTES, MIN_AAVE_V4_DEPOSIT_GAS_EXEC, type MerklDistributorClaimLeaf, type MerklRewardRow, type MerklRewardsSummary, type V4ReservesListRow, aaveAvailableLiquidityDisplay, aaveReadSupplyMetrics, aaveUnderlyingAddressForContext, aaveV4BorrowHealthGate, aaveV4FetchMarketSummary, aaveV4FetchMarketsSummary, aaveV4FetchMerklRewardsSummary, aaveV4Gql, aaveV4KeyForNodeAssetRow, aaveV4MarketRowFromHubReserve, aaveV4ProtocolModule, aaveV4RepayHealthGate, aaveV4UiMarketIdForHubName, aaveV4UserHasAvailableBorrowCollateralForContextOnSpoke, aaveV4WithdrawHealthGate, aggregateV4SupplyDisplay, borrowableAssetsFromHubReserves, buildAaveV4BorrowTableRowsFromHub, buildEvmMultisignBodyAaveV4DepositBatch, buildEvmMultisignBodyAaveV4MerklClaimRewards, buildEvmMultisignBodyAaveV4MerklDistributorClaim, buildEvmMultisignBodyAaveV4SpokeBorrow, buildEvmMultisignBodyAaveV4SpokeRepay, buildEvmMultisignBodyAaveV4SpokeWithdraw, buildEvmMultisignBodyEulerV2MerklDistributorClaim, buildEvmMultisignBodyEulerV2ReulUnlock, encodeMerklDistributorClaimData, ensureAaveV4ChainTokenCache, fetchAaveV4Chains, fetchAaveV4ClaimRewardsCalldata, fetchAaveV4HubReserves, fetchAaveV4HubsForChain, fetchAaveV4MerklClaimRewardIdsForChain, fetchAaveV4MerklClaimableRewardsForChain, fetchAaveV4NativeWrappedToken, fetchAaveV4ReservesForUnderlying, fetchAaveV4SpokeReserveIdForUnderlying, fetchAaveV4SpokeReserveStatusForUnderlying, fetchAaveV4SupportedUnderlyingAddressSet, fetchAaveV4UserBorrowsDebtByUnderlyingForHub, fetchAaveV4UserPositionById, fetchAaveV4UserPositionsByAssetOnChain, fetchAaveV4UserPositionsForChain, fetchAaveV4UserSuppliesForPosition, fetchAllMerklDistributorClaimLeaves, fetchMerklRewardsSummary, filterActiveAaveV4HubReserves, findAaveV4HubReserveForChainUnderlying, findHubReserveForUnderlying, formatAavePercentDisplay, formatAaveV4AmountHumanFromApiString, formatAaveV4ApyPercentLabel, formatAaveV4DecimalString, formatAaveV4ExchangeLabel, formatAaveV4HealthFactor, formatAaveV4PercentDisplay, formatAaveV4PositionHealthFactor, formatAaveV4PositionPercent, formatAaveV4ReserveLiquidityFromSummary, formatAaveV4RiskDisplay, formatAaveV4RiskNotionalString, formatAaveV4TokenAmount, isAaveV4DepositEvmSignRequest, isAaveV4HubReserveActive, isMerklRewardEulLeaf, isValidAaveChainId, loadAaveV4SupportedChainIds, loadAaveV4SupportedChainIdsFromV4Api, loadMerklUserRewardsJson, merklLeafToRow, merklUserRewardsUrl, parseAaveV4ApyPercent, parseBigDecimalHf, parseMerklUserRewardsToLeaves, pickAaveV4ReserveRowForSpoke, previewAaveV4BorrowResultingHf, previewAaveV4RepayResultingHf, previewAaveV4WithdrawResultingHf, resolveAaveV4DepositGasUnitsFromSignRequest, resolveAaveV4HubForUiMarket, selectFirstRootMerklLeaves, selectWalletWideMerklClaimLeaves };
|
|
1167
|
+
export { AAVE_V4_BSTOCKS_CHAIN_ID, AAVE_V4_BSTOCKS_MARKET_NOTES, AAVE_V4_GRAPHQL_URL, AAVE_V4_PROTOCOL_ID, AAVE_V4_SPOKE_BORROW_DEFAULT_GAS_UNITS, AAVE_V4_SPOKE_REPAY_DEFAULT_GAS_UNITS, AAVE_V4_SPOKE_SUPPLY_DEFAULT_GAS_UNITS, AAVE_V4_SPOKE_WITHDRAW_DEFAULT_GAS_UNITS, AAVE_V4_UI_MARKETS, type AaveBorrowInfoLike, type AaveDecimalValueLike, type AavePercentValueLike, type AaveSupplyInfoLike, type AaveV4BorrowTableRow, type AaveV4BorrowableDisplay, type AaveV4ClaimRewardsTx, type AaveV4ExchangeAmount, type AaveV4Hub, type AaveV4HubReserve, type AaveV4HubReserveSummary, type AaveV4MarketSummaryRow, type AaveV4MerklClaimableRewardRow, type AaveV4PositionActionPayload, type AaveV4SpokeLiquidationConfig, type AaveV4SpokeOnChainReserveStatus, type AaveV4UiMarketId, type AaveV4UserPositionDetail, type AaveV4UserPositionRow, type AaveV4UserPositionsByAsset, type AaveV4UserSupplyRow, type AaveV4WithdrawHealthGateResult, MERKL_API_BASE, MERKL_DISTRIBUTOR_ADDRESS, MERKL_DISTRIBUTOR_CLAIM_GAS_FALLBACK, MERKL_REWARDS_NOTES, MIN_AAVE_V4_DEPOSIT_GAS_EXEC, type MerklDistributorClaimLeaf, type MerklRewardRow, type MerklRewardsSummary, type V4ReservesListRow, aaveAvailableLiquidityDisplay, aaveReadSupplyMetrics, aaveUnderlyingAddressForContext, aaveV4BorrowHealthGate, aaveV4FetchMarketSummary, aaveV4FetchMarketsSummary, aaveV4FetchMerklRewardsSummary, aaveV4FetchStockMarketsSummary, aaveV4Gql, aaveV4KeyForNodeAssetRow, aaveV4MarketRowFromHubReserve, aaveV4ProtocolModule, aaveV4RepayHealthGate, aaveV4UiMarketIdForHubName, aaveV4UiMarketsForHubs, aaveV4UserHasAvailableBorrowCollateralForContextOnSpoke, aaveV4WithdrawHealthGate, aggregateV4SupplyDisplay, borrowableAssetsFromHubReserves, buildAaveV4BorrowTableRowsFromHub, buildEvmMultisignBodyAaveV4DepositBatch, buildEvmMultisignBodyAaveV4MerklClaimRewards, buildEvmMultisignBodyAaveV4MerklDistributorClaim, buildEvmMultisignBodyAaveV4SpokeBorrow, buildEvmMultisignBodyAaveV4SpokeRepay, buildEvmMultisignBodyAaveV4SpokeWithdraw, buildEvmMultisignBodyEulerV2MerklDistributorClaim, buildEvmMultisignBodyEulerV2ReulUnlock, encodeMerklDistributorClaimData, ensureAaveV4ChainTokenCache, ensureCoinbaseB20StockCatalog, fetchAaveV4Chains, fetchAaveV4ClaimRewardsCalldata, fetchAaveV4HubReserves, fetchAaveV4HubsForChain, fetchAaveV4MerklClaimRewardIdsForChain, fetchAaveV4MerklClaimableRewardsForChain, fetchAaveV4NativeWrappedToken, fetchAaveV4ReservesForUnderlying, fetchAaveV4SpokeReserveIdForUnderlying, fetchAaveV4SpokeReserveStatusForUnderlying, fetchAaveV4SupportedUnderlyingAddressSet, fetchAaveV4UserBorrowsDebtByUnderlyingForHub, fetchAaveV4UserPositionById, fetchAaveV4UserPositionsByAssetOnChain, fetchAaveV4UserPositionsForChain, fetchAaveV4UserSuppliesForPosition, fetchAllMerklDistributorClaimLeaves, fetchMerklRewardsSummary, filterActiveAaveV4HubReserves, findAaveV4HubReserveForChainUnderlying, findHubReserveForUnderlying, formatAavePercentDisplay, formatAaveV4AmountHumanFromApiString, formatAaveV4ApyPercentLabel, formatAaveV4DecimalString, formatAaveV4ExchangeLabel, formatAaveV4HealthFactor, formatAaveV4PercentDisplay, formatAaveV4PositionHealthFactor, formatAaveV4PositionPercent, formatAaveV4ReserveLiquidityFromSummary, formatAaveV4RiskDisplay, formatAaveV4RiskNotionalString, formatAaveV4TokenAmount, isAaveV4BStocksHubName, isAaveV4DepositEvmSignRequest, isAaveV4HubReserveActive, isMerklRewardEulLeaf, isValidAaveChainId, loadAaveV4SupportedChainIds, loadAaveV4SupportedChainIdsFromV4Api, loadMerklUserRewardsJson, merklLeafToRow, merklUserRewardsUrl, normalizeAaveV4UiMarketId, parseAaveV4ApyPercent, parseAaveV4UiMarketId, parseBigDecimalHf, parseMerklUserRewardsToLeaves, pickAaveV4ReserveRowForSpoke, previewAaveV4BorrowResultingHf, previewAaveV4RepayResultingHf, previewAaveV4WithdrawResultingHf, resolveAaveV4DepositGasUnitsFromSignRequest, resolveAaveV4HubForUiMarket, resolveAaveV4UnderlyingAddress, selectFirstRootMerklLeaves, selectWalletWideMerklClaimLeaves };
|
|
@@ -23,6 +23,106 @@ async function postJsonViaOptionalProxy(args) {
|
|
|
23
23
|
}
|
|
24
24
|
return await r.json();
|
|
25
25
|
}
|
|
26
|
+
var COINBASE_B20_STOCK_DECIMALS = 8;
|
|
27
|
+
var COINBASE_B20_ASSET_PREFIX = "0xb200000000000000000000";
|
|
28
|
+
function isCoinbaseB20AssetToken(address) {
|
|
29
|
+
try {
|
|
30
|
+
return getAddress(address).toLowerCase().startsWith(COINBASE_B20_ASSET_PREFIX);
|
|
31
|
+
} catch {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function looksLikeCoinbaseStockSymbol(symbol) {
|
|
36
|
+
return /^[A-Za-z][A-Za-z0-9]{0,8}(?:\.[A-Za-z][A-Za-z0-9]{0,4})?c$/.test((symbol ?? "").trim());
|
|
37
|
+
}
|
|
38
|
+
var COINBASE_TOKENIZED_STOCKS_API_URL = "https://api.coinbase.com/v1/tokenized-stocks";
|
|
39
|
+
var CATALOG_TTL_MS = 15 * 60 * 1e3;
|
|
40
|
+
var CATALOG_MAX = 500;
|
|
41
|
+
var catalogRows = null;
|
|
42
|
+
var catalogAt = 0;
|
|
43
|
+
var catalogInflight = null;
|
|
44
|
+
var catalogBySymbol = /* @__PURE__ */ new Map();
|
|
45
|
+
var catalogByAddress = /* @__PURE__ */ new Map();
|
|
46
|
+
function indexCatalog(rows) {
|
|
47
|
+
catalogRows = rows;
|
|
48
|
+
catalogAt = Date.now();
|
|
49
|
+
catalogBySymbol.clear();
|
|
50
|
+
catalogByAddress.clear();
|
|
51
|
+
for (const row of rows) {
|
|
52
|
+
catalogBySymbol.set(row.symbol.toLowerCase(), row);
|
|
53
|
+
catalogByAddress.set(row.address.toLowerCase(), row);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function parseCoinbaseTokenizedStocksPayload(payload) {
|
|
57
|
+
const tokens = Array.isArray(payload) ? payload : payload && typeof payload === "object" && Array.isArray(payload.tokens) ? payload.tokens : [];
|
|
58
|
+
const out = [];
|
|
59
|
+
const seen = /* @__PURE__ */ new Set();
|
|
60
|
+
for (const row of tokens) {
|
|
61
|
+
if (!row || typeof row !== "object") continue;
|
|
62
|
+
const rec = row;
|
|
63
|
+
const symbol = typeof rec.symbol === "string" ? rec.symbol.trim() : "";
|
|
64
|
+
const addressRaw = typeof rec.contract_address === "string" ? rec.contract_address.trim() : "";
|
|
65
|
+
if (!looksLikeCoinbaseStockSymbol(symbol) || !isCoinbaseB20AssetToken(addressRaw)) continue;
|
|
66
|
+
const address = getAddress(addressRaw);
|
|
67
|
+
const key = address.toLowerCase();
|
|
68
|
+
if (seen.has(key)) continue;
|
|
69
|
+
seen.add(key);
|
|
70
|
+
const name = typeof rec.name === "string" && rec.name.trim() ? rec.name.trim() : symbol;
|
|
71
|
+
const iconUrl = typeof rec.icon_url === "string" && rec.icon_url.trim() ? rec.icon_url.trim() : void 0;
|
|
72
|
+
const decimals = typeof rec.decimals === "number" && Number.isInteger(rec.decimals) && rec.decimals >= 0 && rec.decimals <= 18 ? rec.decimals : COINBASE_B20_STOCK_DECIMALS;
|
|
73
|
+
out.push({ address, symbol, name, decimals, iconUrl });
|
|
74
|
+
if (out.length >= CATALOG_MAX) break;
|
|
75
|
+
}
|
|
76
|
+
return out;
|
|
77
|
+
}
|
|
78
|
+
async function fetchCoinbaseB20StockCatalog() {
|
|
79
|
+
const merged = [];
|
|
80
|
+
const seen = /* @__PURE__ */ new Set();
|
|
81
|
+
let pageToken = "";
|
|
82
|
+
for (let page = 0; page < 4; page++) {
|
|
83
|
+
const url = new URL(COINBASE_TOKENIZED_STOCKS_API_URL);
|
|
84
|
+
url.searchParams.set("page_size", "500");
|
|
85
|
+
if (pageToken) url.searchParams.set("page_token", pageToken);
|
|
86
|
+
const res = await fetch(url, { cache: "no-store", signal: AbortSignal.timeout(8e3) });
|
|
87
|
+
if (!res.ok) break;
|
|
88
|
+
const json = await res.json();
|
|
89
|
+
for (const row of parseCoinbaseTokenizedStocksPayload(json)) {
|
|
90
|
+
const key = row.address.toLowerCase();
|
|
91
|
+
if (seen.has(key)) continue;
|
|
92
|
+
seen.add(key);
|
|
93
|
+
merged.push(row);
|
|
94
|
+
if (merged.length >= CATALOG_MAX) break;
|
|
95
|
+
}
|
|
96
|
+
pageToken = typeof json.next_page_token === "string" ? json.next_page_token.trim() : "";
|
|
97
|
+
if (!pageToken || merged.length >= CATALOG_MAX) break;
|
|
98
|
+
}
|
|
99
|
+
if (merged.length > 0) indexCatalog(merged);
|
|
100
|
+
return catalogRows ?? [];
|
|
101
|
+
}
|
|
102
|
+
async function ensureCoinbaseB20StockCatalog() {
|
|
103
|
+
if (catalogRows && catalogRows.length > 0 && Date.now() - catalogAt < CATALOG_TTL_MS) return catalogRows;
|
|
104
|
+
if (!catalogInflight) {
|
|
105
|
+
catalogInflight = fetchCoinbaseB20StockCatalog().finally(() => {
|
|
106
|
+
catalogInflight = null;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
try {
|
|
110
|
+
return await catalogInflight;
|
|
111
|
+
} catch {
|
|
112
|
+
return catalogRows ?? [];
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function lookupCoinbaseB20StockToken(token) {
|
|
116
|
+
const key = (token ?? "").trim();
|
|
117
|
+
if (!key) return null;
|
|
118
|
+
const fromCatalog = catalogBySymbol.get(key.toLowerCase());
|
|
119
|
+
if (fromCatalog) return fromCatalog;
|
|
120
|
+
try {
|
|
121
|
+
return catalogByAddress.get(getAddress(key).toLowerCase()) ?? null;
|
|
122
|
+
} catch {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
26
126
|
|
|
27
127
|
// src/protocols/evm/aave-v4/api.ts
|
|
28
128
|
var AAVE_V4_GRAPHQL_URL = "https://api.v4.aave.com/graphql";
|
|
@@ -264,6 +364,42 @@ function ensureAaveV4ChainTokenCache(chainId) {
|
|
|
264
364
|
aaveV4ChainTokenCache.set(chainId, p);
|
|
265
365
|
return p;
|
|
266
366
|
}
|
|
367
|
+
var AAVE_V4_BSTOCKS_CHAIN_ID = 8453;
|
|
368
|
+
var AAVE_V4_UI_MARKETS = [
|
|
369
|
+
{ id: "main", label: "Main" },
|
|
370
|
+
{ id: "core", label: "Core" },
|
|
371
|
+
{ id: "bluechip", label: "Bluechip" },
|
|
372
|
+
{ id: "bstocks", label: "bStocks" }
|
|
373
|
+
];
|
|
374
|
+
function isAaveV4BStocksHubName(hubName) {
|
|
375
|
+
const n = (hubName ?? "").trim().toLowerCase().replace(/\s+/g, " ");
|
|
376
|
+
if (!n) return false;
|
|
377
|
+
if (n === "coinbase stocks" || n === "coinbase stocks hub" || n === "equities" || n === "equities hub" || n === "tokenised stocks" || n === "tokenized stocks" || n === "base stocks" || n === "bstocks" || n === "b stocks" || n === "mag-7" || n === "mag7") {
|
|
378
|
+
return true;
|
|
379
|
+
}
|
|
380
|
+
return n.includes("coinbase") && n.includes("stock");
|
|
381
|
+
}
|
|
382
|
+
function parseAaveV4UiMarketId(raw) {
|
|
383
|
+
const t = (raw ?? "").trim().toLowerCase().replace(/\s+/g, " ");
|
|
384
|
+
if (!t) return void 0;
|
|
385
|
+
if (t === "core") return "core";
|
|
386
|
+
if (t === "bluechip" || t === "prime" || t === "institutional") return "bluechip";
|
|
387
|
+
if (t === "main" || t === "plus" || t === "default") return "main";
|
|
388
|
+
if (t === "bstocks" || t === "bstock" || t === "b stocks" || t === "stocks" || t === "stock" || t === "equities" || t === "equity" || t === "coinbase stocks" || t === "tokenized stocks" || t === "tokenised stocks") {
|
|
389
|
+
return "bstocks";
|
|
390
|
+
}
|
|
391
|
+
return void 0;
|
|
392
|
+
}
|
|
393
|
+
function normalizeAaveV4UiMarketId(raw, fallback = "main") {
|
|
394
|
+
if (typeof raw !== "string") return fallback;
|
|
395
|
+
return parseAaveV4UiMarketId(raw) ?? fallback;
|
|
396
|
+
}
|
|
397
|
+
function resolveAaveV4UnderlyingAddress(token) {
|
|
398
|
+
const raw = (token ?? "").trim();
|
|
399
|
+
if (!raw) return null;
|
|
400
|
+
if (isAddress(raw)) return getAddress(raw);
|
|
401
|
+
return lookupCoinbaseB20StockToken(raw)?.address ?? null;
|
|
402
|
+
}
|
|
267
403
|
var aaveV4HubsByChain = /* @__PURE__ */ new Map();
|
|
268
404
|
var aaveV4HubReserves = /* @__PURE__ */ new Map();
|
|
269
405
|
function hubReservesKey(chainId, hub) {
|
|
@@ -294,12 +430,22 @@ function resolveAaveV4HubForUiMarket(hubs, market, chainId) {
|
|
|
294
430
|
const set = new Set(names.map((n) => n.toLowerCase()));
|
|
295
431
|
return on.find((h) => set.has((h.name ?? "").trim().toLowerCase())) ?? null;
|
|
296
432
|
};
|
|
433
|
+
if (market === "bstocks") return on.find((h) => isAaveV4BStocksHubName(h.name)) ?? null;
|
|
297
434
|
if (market === "core") return find(["core"]);
|
|
298
435
|
if (market === "bluechip") return find(["prime", "bluechip", "institutional"]);
|
|
299
|
-
|
|
436
|
+
const named = find(["plus", "main", "default"]);
|
|
437
|
+
if (named) return named;
|
|
438
|
+
return on.find((h) => !isAaveV4BStocksHubName(h.name)) ?? null;
|
|
439
|
+
}
|
|
440
|
+
function aaveV4UiMarketsForHubs(hubs, chainId) {
|
|
441
|
+
const available = AAVE_V4_UI_MARKETS.filter(
|
|
442
|
+
(m) => resolveAaveV4HubForUiMarket(hubs, m.id, chainId) != null
|
|
443
|
+
);
|
|
444
|
+
return available.length ? available : AAVE_V4_UI_MARKETS;
|
|
300
445
|
}
|
|
301
446
|
function aaveV4UiMarketIdForHubName(hubName) {
|
|
302
447
|
const n = (hubName ?? "").trim().toLowerCase();
|
|
448
|
+
if (isAaveV4BStocksHubName(hubName)) return "bstocks";
|
|
303
449
|
if (n === "core") return "core";
|
|
304
450
|
if (n === "plus" || n === "main" || n === "default") return "main";
|
|
305
451
|
if (n === "prime" || n === "bluechip" || n === "institutional") return "bluechip";
|
|
@@ -311,6 +457,7 @@ function aaveV4HubAutoPickTiebreakOrder(a, b) {
|
|
|
311
457
|
if (n === "core") return 0;
|
|
312
458
|
if (n === "plus" || n === "main" || n === "default") return 1;
|
|
313
459
|
if (n === "prime" || n === "bluechip" || n === "institutional") return 2;
|
|
460
|
+
if (isAaveV4BStocksHubName(name)) return 4;
|
|
314
461
|
return 3;
|
|
315
462
|
};
|
|
316
463
|
const ra = rank(a.name);
|
|
@@ -337,9 +484,10 @@ function aaveV4SuppliableHumanFromHubReserve(r) {
|
|
|
337
484
|
async function findAaveV4HubReserveForChainUnderlying(args) {
|
|
338
485
|
const onChain = args.hubs.filter((h) => h.chain.chainId === args.chainId);
|
|
339
486
|
if (!onChain.length) return null;
|
|
340
|
-
const prefer = getAddress(args.preferHub.address);
|
|
487
|
+
const prefer = args.preferHub ? getAddress(args.preferHub.address) : null;
|
|
341
488
|
const order = (() => {
|
|
342
|
-
const rest = onChain.filter((h) => getAddress(h.address) !== prefer).sort(aaveV4HubAutoPickTiebreakOrder);
|
|
489
|
+
const rest = onChain.filter((h) => !prefer || getAddress(h.address) !== prefer).sort(aaveV4HubAutoPickTiebreakOrder);
|
|
490
|
+
if (!prefer) return rest;
|
|
343
491
|
const first = onChain.find((h) => getAddress(h.address) === prefer);
|
|
344
492
|
return first ? [first, ...rest] : rest;
|
|
345
493
|
})();
|
|
@@ -370,8 +518,8 @@ async function findAaveV4HubReserveForChainUnderlying(args) {
|
|
|
370
518
|
const sortKey = (a, b) => {
|
|
371
519
|
const d = aaveV4HubReserveBorrowApyForSort(a.debtReserve) - aaveV4HubReserveBorrowApyForSort(b.debtReserve);
|
|
372
520
|
if (d !== 0) return d;
|
|
373
|
-
const pa = getAddress(a.hub.address) === prefer ? 0 : 1;
|
|
374
|
-
const pb = getAddress(b.hub.address) === prefer ? 0 : 1;
|
|
521
|
+
const pa = prefer && getAddress(a.hub.address) === prefer ? 0 : 1;
|
|
522
|
+
const pb = prefer && getAddress(b.hub.address) === prefer ? 0 : 1;
|
|
375
523
|
if (pa !== pb) return pa - pb;
|
|
376
524
|
return aaveV4HubAutoPickTiebreakOrder(a.hub, b.hub);
|
|
377
525
|
};
|
|
@@ -2429,6 +2577,7 @@ function matchesAssetFilter(opts) {
|
|
|
2429
2577
|
}
|
|
2430
2578
|
|
|
2431
2579
|
// src/protocols/evm/aave-v4/reads.ts
|
|
2580
|
+
var AAVE_V4_BSTOCKS_MARKET_NOTES = "Coinbase tokenized stocks (bStocks) on the Aave v4 Coinbase Stocks hub (Base, chainId 8453). AAPLc, AMZNc, GOOGLc, METAc, MSFTc, NVDAc, and TSLAc are collateral-only. USDC is the only borrow asset. marketId is bstocks. Tickers resolve (AAPLc). Chainlink equity feeds are 24/5 (last price held on weekends and US market holidays). Not for U.S. persons. Equity supply APY is typically 0; incentives may appear via Merkl.";
|
|
2432
2581
|
function parseAaveV4ApyPercent(apy) {
|
|
2433
2582
|
const n = parseFloat((apy?.normalized ?? "").trim());
|
|
2434
2583
|
if (Number.isFinite(n) && n >= 0) return n;
|
|
@@ -2508,10 +2657,21 @@ function isAaveV4HubReserveActive(reserve) {
|
|
|
2508
2657
|
function filterActiveAaveV4HubReserves(reserves) {
|
|
2509
2658
|
return reserves.filter(isAaveV4HubReserveActive);
|
|
2510
2659
|
}
|
|
2511
|
-
function
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2660
|
+
function isAaveV4StockListQuery(filter) {
|
|
2661
|
+
return /^(stocks?|bstocks?|b stocks|tokenized stocks|tokenised stocks|coinbase stocks|equities)$/.test(
|
|
2662
|
+
filter.trim().toLowerCase()
|
|
2663
|
+
);
|
|
2664
|
+
}
|
|
2665
|
+
function rowMatchesUnderlyingFilter(row, filter) {
|
|
2666
|
+
if (isAaveV4StockListQuery(filter)) return isCoinbaseB20AssetToken(row.underlying);
|
|
2667
|
+
if (matchesAssetFilter({ address: row.underlying, symbol: row.symbol, filter })) return true;
|
|
2668
|
+
const stock = lookupCoinbaseB20StockToken(filter);
|
|
2669
|
+
if (!stock) return false;
|
|
2670
|
+
try {
|
|
2671
|
+
return getAddress(row.underlying) === stock.address;
|
|
2672
|
+
} catch {
|
|
2673
|
+
return false;
|
|
2674
|
+
}
|
|
2515
2675
|
}
|
|
2516
2676
|
async function collectHubMarketRows(args) {
|
|
2517
2677
|
const markets = [];
|
|
@@ -2530,6 +2690,7 @@ async function collectHubMarketRows(args) {
|
|
|
2530
2690
|
return markets;
|
|
2531
2691
|
}
|
|
2532
2692
|
async function aaveV4FetchMarketsSummary(args) {
|
|
2693
|
+
await ensureCoinbaseB20StockCatalog().catch(() => []);
|
|
2533
2694
|
const hubs = await fetchAaveV4HubsForChain(args.chainId);
|
|
2534
2695
|
if (!hubs.length) {
|
|
2535
2696
|
return {
|
|
@@ -2538,7 +2699,7 @@ async function aaveV4FetchMarketsSummary(args) {
|
|
|
2538
2699
|
notes: `Aave v4 lists no hubs on chain ${args.chainId}. Check get_defi_protocol_supported_chains.`
|
|
2539
2700
|
};
|
|
2540
2701
|
}
|
|
2541
|
-
const wantMarket =
|
|
2702
|
+
const wantMarket = parseAaveV4UiMarketId(args.marketId);
|
|
2542
2703
|
let selected = hubs;
|
|
2543
2704
|
let marketNote = "";
|
|
2544
2705
|
if (wantMarket) {
|
|
@@ -2553,18 +2714,16 @@ async function aaveV4FetchMarketsSummary(args) {
|
|
|
2553
2714
|
let markets = await collectHubMarketRows({ chainId: args.chainId, hubs: selected });
|
|
2554
2715
|
const rawUnderlying = (args.underlying ?? "").trim();
|
|
2555
2716
|
if (rawUnderlying) {
|
|
2556
|
-
markets = markets.filter(
|
|
2557
|
-
(m) => matchesAssetFilter({ address: m.underlying, symbol: m.symbol, filter: rawUnderlying })
|
|
2558
|
-
);
|
|
2717
|
+
markets = markets.filter((m) => rowMatchesUnderlyingFilter(m, rawUnderlying));
|
|
2559
2718
|
}
|
|
2560
2719
|
markets.sort(sortBySupplyApyDesc);
|
|
2561
|
-
const notes = "Supply/borrow APY from Aave v4 GraphQL (api.v4.aave.com). These are APY (compounded), not APR. Each live spoke is a row (unused zero-liquidity listings omitted). Copy underlying + marketId for build_*_multisign. Do not web-search Aave rates." + marketNote;
|
|
2720
|
+
const notes = "Supply/borrow APY from Aave v4 GraphQL (api.v4.aave.com). These are APY (compounded), not APR. Each live spoke is a row (unused zero-liquidity listings omitted). Copy underlying + marketId for build_*_multisign. marketId bstocks is the Base Coinbase Stocks hub (tokenized equities as collateral, USDC borrow). Tickers such as AAPLc resolve. Do not web-search Aave rates." + marketNote;
|
|
2562
2721
|
return { chainId: args.chainId, markets, notes };
|
|
2563
2722
|
}
|
|
2564
2723
|
async function aaveV4FetchMarketSummary(args) {
|
|
2565
2724
|
const addr = (args.underlying ?? "").trim();
|
|
2566
2725
|
if (!addr) {
|
|
2567
|
-
throw new Error("underlying is required (ERC-20 address or ticker such as USDT).");
|
|
2726
|
+
throw new Error("underlying is required (ERC-20 address or ticker such as USDT or AAPLc).");
|
|
2568
2727
|
}
|
|
2569
2728
|
const out = await aaveV4FetchMarketsSummary({
|
|
2570
2729
|
chainId: args.chainId,
|
|
@@ -2579,6 +2738,20 @@ async function aaveV4FetchMarketSummary(args) {
|
|
|
2579
2738
|
}
|
|
2580
2739
|
return out;
|
|
2581
2740
|
}
|
|
2741
|
+
async function aaveV4FetchStockMarketsSummary(args) {
|
|
2742
|
+
const chainId = args.chainId ?? AAVE_V4_BSTOCKS_CHAIN_ID;
|
|
2743
|
+
const out = await aaveV4FetchMarketsSummary({
|
|
2744
|
+
chainId,
|
|
2745
|
+
marketId: "bstocks",
|
|
2746
|
+
underlying: args.underlying
|
|
2747
|
+
});
|
|
2748
|
+
const extra = out.markets.length ? "" : " No Coinbase Stocks hub reserves matched.";
|
|
2749
|
+
return {
|
|
2750
|
+
chainId: out.chainId,
|
|
2751
|
+
markets: out.markets,
|
|
2752
|
+
notes: `${AAVE_V4_BSTOCKS_MARKET_NOTES}${extra} ${out.notes}`
|
|
2753
|
+
};
|
|
2754
|
+
}
|
|
2582
2755
|
var MERKL_API_BASE = "https://api.merkl.xyz";
|
|
2583
2756
|
var MERKL_DISTRIBUTOR_ADDRESS = "0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae";
|
|
2584
2757
|
var MERKL_DISTRIBUTOR_CLAIM_GAS_FALLBACK = 500000n;
|
|
@@ -2754,6 +2927,6 @@ var aaveV4ProtocolModule = {
|
|
|
2754
2927
|
};
|
|
2755
2928
|
registerProtocolModule(aaveV4ProtocolModule);
|
|
2756
2929
|
|
|
2757
|
-
export { AAVE_V4_GRAPHQL_URL, AAVE_V4_PROTOCOL_ID, AAVE_V4_SPOKE_BORROW_DEFAULT_GAS_UNITS, AAVE_V4_SPOKE_REPAY_DEFAULT_GAS_UNITS, AAVE_V4_SPOKE_SUPPLY_DEFAULT_GAS_UNITS, AAVE_V4_SPOKE_WITHDRAW_DEFAULT_GAS_UNITS, MERKL_API_BASE, MERKL_DISTRIBUTOR_ADDRESS, MERKL_DISTRIBUTOR_CLAIM_GAS_FALLBACK, MERKL_REWARDS_NOTES, MIN_AAVE_V4_DEPOSIT_GAS_EXEC, aaveAvailableLiquidityDisplay, aaveReadSupplyMetrics, aaveUnderlyingAddressForContext, aaveV4BorrowHealthGate, aaveV4FetchMarketSummary, aaveV4FetchMarketsSummary, aaveV4FetchMerklRewardsSummary, aaveV4Gql, aaveV4KeyForNodeAssetRow, aaveV4MarketRowFromHubReserve, aaveV4ProtocolModule, aaveV4RepayHealthGate, aaveV4UiMarketIdForHubName, aaveV4UserHasAvailableBorrowCollateralForContextOnSpoke, aaveV4WithdrawHealthGate, aggregateV4SupplyDisplay, borrowableAssetsFromHubReserves, buildAaveV4BorrowTableRowsFromHub, buildEvmMultisignBodyAaveV4DepositBatch, buildEvmMultisignBodyAaveV4MerklClaimRewards, buildEvmMultisignBodyAaveV4MerklDistributorClaim, buildEvmMultisignBodyAaveV4SpokeBorrow, buildEvmMultisignBodyAaveV4SpokeRepay, buildEvmMultisignBodyAaveV4SpokeWithdraw, buildEvmMultisignBodyEulerV2MerklDistributorClaim, buildEvmMultisignBodyEulerV2ReulUnlock, encodeMerklDistributorClaimData, ensureAaveV4ChainTokenCache, fetchAaveV4Chains, fetchAaveV4ClaimRewardsCalldata, fetchAaveV4HubReserves, fetchAaveV4HubsForChain, fetchAaveV4MerklClaimRewardIdsForChain, fetchAaveV4MerklClaimableRewardsForChain, fetchAaveV4NativeWrappedToken, fetchAaveV4ReservesForUnderlying, fetchAaveV4SpokeReserveIdForUnderlying, fetchAaveV4SpokeReserveStatusForUnderlying, fetchAaveV4SupportedUnderlyingAddressSet, fetchAaveV4UserBorrowsDebtByUnderlyingForHub, fetchAaveV4UserPositionById, fetchAaveV4UserPositionsByAssetOnChain, fetchAaveV4UserPositionsForChain, fetchAaveV4UserSuppliesForPosition, fetchAllMerklDistributorClaimLeaves, fetchMerklRewardsSummary, filterActiveAaveV4HubReserves, findAaveV4HubReserveForChainUnderlying, findHubReserveForUnderlying, formatAavePercentDisplay, formatAaveV4AmountHumanFromApiString, formatAaveV4ApyPercentLabel, formatAaveV4DecimalString, formatAaveV4ExchangeLabel, formatAaveV4HealthFactor, formatAaveV4PercentDisplay, formatAaveV4PositionHealthFactor, formatAaveV4PositionPercent, formatAaveV4ReserveLiquidityFromSummary, formatAaveV4RiskDisplay, formatAaveV4RiskNotionalString, formatAaveV4TokenAmount, isAaveV4DepositEvmSignRequest, isAaveV4HubReserveActive, isMerklRewardEulLeaf, isValidAaveChainId, loadAaveV4SupportedChainIds, loadAaveV4SupportedChainIdsFromV4Api, loadMerklUserRewardsJson, merklLeafToRow, merklUserRewardsUrl, parseAaveV4ApyPercent, parseBigDecimalHf, parseMerklUserRewardsToLeaves, pickAaveV4ReserveRowForSpoke, previewAaveV4BorrowResultingHf, previewAaveV4RepayResultingHf, previewAaveV4WithdrawResultingHf, resolveAaveV4DepositGasUnitsFromSignRequest, resolveAaveV4HubForUiMarket, selectFirstRootMerklLeaves, selectWalletWideMerklClaimLeaves };
|
|
2930
|
+
export { AAVE_V4_BSTOCKS_CHAIN_ID, AAVE_V4_BSTOCKS_MARKET_NOTES, AAVE_V4_GRAPHQL_URL, AAVE_V4_PROTOCOL_ID, AAVE_V4_SPOKE_BORROW_DEFAULT_GAS_UNITS, AAVE_V4_SPOKE_REPAY_DEFAULT_GAS_UNITS, AAVE_V4_SPOKE_SUPPLY_DEFAULT_GAS_UNITS, AAVE_V4_SPOKE_WITHDRAW_DEFAULT_GAS_UNITS, AAVE_V4_UI_MARKETS, MERKL_API_BASE, MERKL_DISTRIBUTOR_ADDRESS, MERKL_DISTRIBUTOR_CLAIM_GAS_FALLBACK, MERKL_REWARDS_NOTES, MIN_AAVE_V4_DEPOSIT_GAS_EXEC, aaveAvailableLiquidityDisplay, aaveReadSupplyMetrics, aaveUnderlyingAddressForContext, aaveV4BorrowHealthGate, aaveV4FetchMarketSummary, aaveV4FetchMarketsSummary, aaveV4FetchMerklRewardsSummary, aaveV4FetchStockMarketsSummary, aaveV4Gql, aaveV4KeyForNodeAssetRow, aaveV4MarketRowFromHubReserve, aaveV4ProtocolModule, aaveV4RepayHealthGate, aaveV4UiMarketIdForHubName, aaveV4UiMarketsForHubs, aaveV4UserHasAvailableBorrowCollateralForContextOnSpoke, aaveV4WithdrawHealthGate, aggregateV4SupplyDisplay, borrowableAssetsFromHubReserves, buildAaveV4BorrowTableRowsFromHub, buildEvmMultisignBodyAaveV4DepositBatch, buildEvmMultisignBodyAaveV4MerklClaimRewards, buildEvmMultisignBodyAaveV4MerklDistributorClaim, buildEvmMultisignBodyAaveV4SpokeBorrow, buildEvmMultisignBodyAaveV4SpokeRepay, buildEvmMultisignBodyAaveV4SpokeWithdraw, buildEvmMultisignBodyEulerV2MerklDistributorClaim, buildEvmMultisignBodyEulerV2ReulUnlock, encodeMerklDistributorClaimData, ensureAaveV4ChainTokenCache, ensureCoinbaseB20StockCatalog, fetchAaveV4Chains, fetchAaveV4ClaimRewardsCalldata, fetchAaveV4HubReserves, fetchAaveV4HubsForChain, fetchAaveV4MerklClaimRewardIdsForChain, fetchAaveV4MerklClaimableRewardsForChain, fetchAaveV4NativeWrappedToken, fetchAaveV4ReservesForUnderlying, fetchAaveV4SpokeReserveIdForUnderlying, fetchAaveV4SpokeReserveStatusForUnderlying, fetchAaveV4SupportedUnderlyingAddressSet, fetchAaveV4UserBorrowsDebtByUnderlyingForHub, fetchAaveV4UserPositionById, fetchAaveV4UserPositionsByAssetOnChain, fetchAaveV4UserPositionsForChain, fetchAaveV4UserSuppliesForPosition, fetchAllMerklDistributorClaimLeaves, fetchMerklRewardsSummary, filterActiveAaveV4HubReserves, findAaveV4HubReserveForChainUnderlying, findHubReserveForUnderlying, formatAavePercentDisplay, formatAaveV4AmountHumanFromApiString, formatAaveV4ApyPercentLabel, formatAaveV4DecimalString, formatAaveV4ExchangeLabel, formatAaveV4HealthFactor, formatAaveV4PercentDisplay, formatAaveV4PositionHealthFactor, formatAaveV4PositionPercent, formatAaveV4ReserveLiquidityFromSummary, formatAaveV4RiskDisplay, formatAaveV4RiskNotionalString, formatAaveV4TokenAmount, isAaveV4BStocksHubName, isAaveV4DepositEvmSignRequest, isAaveV4HubReserveActive, isMerklRewardEulLeaf, isValidAaveChainId, loadAaveV4SupportedChainIds, loadAaveV4SupportedChainIdsFromV4Api, loadMerklUserRewardsJson, merklLeafToRow, merklUserRewardsUrl, normalizeAaveV4UiMarketId, parseAaveV4ApyPercent, parseAaveV4UiMarketId, parseBigDecimalHf, parseMerklUserRewardsToLeaves, pickAaveV4ReserveRowForSpoke, previewAaveV4BorrowResultingHf, previewAaveV4RepayResultingHf, previewAaveV4WithdrawResultingHf, resolveAaveV4DepositGasUnitsFromSignRequest, resolveAaveV4HubForUiMarket, resolveAaveV4UnderlyingAddress, selectFirstRootMerklLeaves, selectWalletWideMerklClaimLeaves };
|
|
2758
2931
|
//# sourceMappingURL=index.js.map
|
|
2759
2932
|
//# sourceMappingURL=index.js.map
|