augustdigital-sdk 8.20.1

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.
Files changed (316) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +349 -0
  3. package/lib/abis/AddressResolver.d.ts +28 -0
  4. package/lib/abis/AddressResolver.js +23 -0
  5. package/lib/abis/ChainlinkV3.d.ts +87 -0
  6. package/lib/abis/ChainlinkV3.js +117 -0
  7. package/lib/abis/ERC20.d.ts +168 -0
  8. package/lib/abis/ERC20.js +226 -0
  9. package/lib/abis/ERC20_Bytes32.d.ts +139 -0
  10. package/lib/abis/ERC20_Bytes32.js +196 -0
  11. package/lib/abis/ERC4626.d.ts +364 -0
  12. package/lib/abis/ERC4626.js +507 -0
  13. package/lib/abis/ERC721.d.ts +231 -0
  14. package/lib/abis/ERC721.js +321 -0
  15. package/lib/abis/FeeOracle.d.ts +120 -0
  16. package/lib/abis/FeeOracle.js +162 -0
  17. package/lib/abis/LendingPool.d.ts +1393 -0
  18. package/lib/abis/LendingPool.js +1807 -0
  19. package/lib/abis/LendingPoolV2.d.ts +1413 -0
  20. package/lib/abis/LendingPoolV2.js +1833 -0
  21. package/lib/abis/LendingPoolV3.d.ts +1677 -0
  22. package/lib/abis/LendingPoolV3.js +1160 -0
  23. package/lib/abis/Loan.d.ts +837 -0
  24. package/lib/abis/Loan.js +1080 -0
  25. package/lib/abis/MultiAssetNativeDepositWrapper.d.ts +137 -0
  26. package/lib/abis/MultiAssetNativeDepositWrapper.js +125 -0
  27. package/lib/abis/Multicall3.d.ts +30 -0
  28. package/lib/abis/Multicall3.js +97 -0
  29. package/lib/abis/OFT.d.ts +116 -0
  30. package/lib/abis/OFT.js +85 -0
  31. package/lib/abis/PoolAdapter.d.ts +36 -0
  32. package/lib/abis/PoolAdapter.js +51 -0
  33. package/lib/abis/RewardDistributor.d.ts +267 -0
  34. package/lib/abis/RewardDistributor.js +352 -0
  35. package/lib/abis/RwaRedeemSubaccount.d.ts +747 -0
  36. package/lib/abis/RwaRedeemSubaccount.js +548 -0
  37. package/lib/abis/SmartAccount.d.ts +17 -0
  38. package/lib/abis/SmartAccount.js +19 -0
  39. package/lib/abis/SwapRouter.d.ts +1043 -0
  40. package/lib/abis/SwapRouter.js +740 -0
  41. package/lib/abis/TextResolver.d.ts +16 -0
  42. package/lib/abis/TextResolver.js +16 -0
  43. package/lib/abis/TokenizedVaultV2.d.ts +1364 -0
  44. package/lib/abis/TokenizedVaultV2.js +1041 -0
  45. package/lib/abis/TokenizedVaultV2DepositWithPermit.d.ts +1456 -0
  46. package/lib/abis/TokenizedVaultV2DepositWithPermit.js +1878 -0
  47. package/lib/abis/TokenizedVaultV2Receipt.d.ts +1568 -0
  48. package/lib/abis/TokenizedVaultV2Receipt.js +1061 -0
  49. package/lib/abis/TokenizedVaultV2SenderAllocationWhitelist.d.ts +454 -0
  50. package/lib/abis/TokenizedVaultV2SenderAllocationWhitelist.js +327 -0
  51. package/lib/abis/TokenizedVaultV2WhitelistedAllocation.d.ts +1466 -0
  52. package/lib/abis/TokenizedVaultV2WhitelistedAllocation.js +1092 -0
  53. package/lib/abis/TokenizedVaultV2WhitelistedAssets.d.ts +274 -0
  54. package/lib/abis/TokenizedVaultV2WhitelistedAssets.js +167 -0
  55. package/lib/abis/UniversalResolverResolve.d.ts +69 -0
  56. package/lib/abis/UniversalResolverResolve.js +35 -0
  57. package/lib/abis/UniversalSignatureValidator.d.ts +17 -0
  58. package/lib/abis/UniversalSignatureValidator.js +30 -0
  59. package/lib/abis/WrapperAdapter.d.ts +71 -0
  60. package/lib/abis/WrapperAdapter.js +77 -0
  61. package/lib/abis/index.d.ts +34 -0
  62. package/lib/abis/index.js +51 -0
  63. package/lib/adapters/evm/getters.d.ts +19 -0
  64. package/lib/adapters/evm/getters.js +209 -0
  65. package/lib/adapters/evm/index.d.ts +353 -0
  66. package/lib/adapters/evm/index.js +434 -0
  67. package/lib/adapters/evm/utils.d.ts +8 -0
  68. package/lib/adapters/evm/utils.js +51 -0
  69. package/lib/adapters/solana/constants.d.ts +33 -0
  70. package/lib/adapters/solana/constants.js +52 -0
  71. package/lib/adapters/solana/getters.d.ts +11 -0
  72. package/lib/adapters/solana/getters.js +165 -0
  73. package/lib/adapters/solana/idl/vault-idl.d.ts +272 -0
  74. package/lib/adapters/solana/idl/vault-idl.js +1084 -0
  75. package/lib/adapters/solana/index.d.ts +233 -0
  76. package/lib/adapters/solana/index.js +291 -0
  77. package/lib/adapters/solana/types.d.ts +67 -0
  78. package/lib/adapters/solana/types.js +3 -0
  79. package/lib/adapters/solana/utils.d.ts +141 -0
  80. package/lib/adapters/solana/utils.js +595 -0
  81. package/lib/adapters/solana/vault.actions.d.ts +57 -0
  82. package/lib/adapters/solana/vault.actions.js +379 -0
  83. package/lib/adapters/stellar/actions.d.ts +28 -0
  84. package/lib/adapters/stellar/actions.js +77 -0
  85. package/lib/adapters/stellar/constants.d.ts +43 -0
  86. package/lib/adapters/stellar/constants.js +53 -0
  87. package/lib/adapters/stellar/getters.d.ts +68 -0
  88. package/lib/adapters/stellar/getters.js +290 -0
  89. package/lib/adapters/stellar/index.d.ts +114 -0
  90. package/lib/adapters/stellar/index.js +175 -0
  91. package/lib/adapters/stellar/soroban.d.ts +123 -0
  92. package/lib/adapters/stellar/soroban.js +613 -0
  93. package/lib/adapters/stellar/submit.d.ts +34 -0
  94. package/lib/adapters/stellar/submit.js +149 -0
  95. package/lib/adapters/stellar/types.d.ts +58 -0
  96. package/lib/adapters/stellar/types.js +6 -0
  97. package/lib/adapters/stellar/utils.d.ts +24 -0
  98. package/lib/adapters/stellar/utils.js +34 -0
  99. package/lib/adapters/sui/constants.d.ts +14 -0
  100. package/lib/adapters/sui/constants.js +29 -0
  101. package/lib/adapters/sui/getters.d.ts +9 -0
  102. package/lib/adapters/sui/getters.js +60 -0
  103. package/lib/adapters/sui/index.d.ts +45 -0
  104. package/lib/adapters/sui/index.js +101 -0
  105. package/lib/adapters/sui/transformer.d.ts +10 -0
  106. package/lib/adapters/sui/transformer.js +107 -0
  107. package/lib/adapters/sui/types.d.ts +66 -0
  108. package/lib/adapters/sui/types.js +3 -0
  109. package/lib/adapters/sui/utils.d.ts +10 -0
  110. package/lib/adapters/sui/utils.js +29 -0
  111. package/lib/core/analytics/chain-name.d.ts +9 -0
  112. package/lib/core/analytics/chain-name.js +34 -0
  113. package/lib/core/analytics/constants.d.ts +5 -0
  114. package/lib/core/analytics/constants.js +9 -0
  115. package/lib/core/analytics/env.d.ts +29 -0
  116. package/lib/core/analytics/env.js +59 -0
  117. package/lib/core/analytics/index.d.ts +36 -0
  118. package/lib/core/analytics/index.js +79 -0
  119. package/lib/core/analytics/instrumentation.d.ts +29 -0
  120. package/lib/core/analytics/instrumentation.js +277 -0
  121. package/lib/core/analytics/method-taxonomy.d.ts +19 -0
  122. package/lib/core/analytics/method-taxonomy.js +128 -0
  123. package/lib/core/analytics/metrics.d.ts +33 -0
  124. package/lib/core/analytics/metrics.js +116 -0
  125. package/lib/core/analytics/sanitize.d.ts +44 -0
  126. package/lib/core/analytics/sanitize.js +260 -0
  127. package/lib/core/analytics/sentry-runtime.d.ts +15 -0
  128. package/lib/core/analytics/sentry-runtime.js +97 -0
  129. package/lib/core/analytics/sentry.d.ts +67 -0
  130. package/lib/core/analytics/sentry.js +613 -0
  131. package/lib/core/analytics/types.d.ts +48 -0
  132. package/lib/core/analytics/types.js +3 -0
  133. package/lib/core/analytics/user-identity.d.ts +41 -0
  134. package/lib/core/analytics/user-identity.js +141 -0
  135. package/lib/core/analytics/version.d.ts +6 -0
  136. package/lib/core/analytics/version.js +10 -0
  137. package/lib/core/attribution.d.ts +111 -0
  138. package/lib/core/attribution.js +142 -0
  139. package/lib/core/auth/index.d.ts +1 -0
  140. package/lib/core/auth/index.js +18 -0
  141. package/lib/core/auth/verify.d.ts +2 -0
  142. package/lib/core/auth/verify.js +31 -0
  143. package/lib/core/base.class.d.ts +152 -0
  144. package/lib/core/base.class.js +172 -0
  145. package/lib/core/cache.d.ts +9 -0
  146. package/lib/core/cache.js +31 -0
  147. package/lib/core/constants/adapters.d.ts +103 -0
  148. package/lib/core/constants/adapters.js +180 -0
  149. package/lib/core/constants/core.d.ts +133 -0
  150. package/lib/core/constants/core.js +209 -0
  151. package/lib/core/constants/swap-router.d.ts +150 -0
  152. package/lib/core/constants/swap-router.js +169 -0
  153. package/lib/core/constants/vaults.d.ts +93 -0
  154. package/lib/core/constants/vaults.js +273 -0
  155. package/lib/core/constants/web3.d.ts +91 -0
  156. package/lib/core/constants/web3.js +229 -0
  157. package/lib/core/errors/index.d.ts +114 -0
  158. package/lib/core/errors/index.js +183 -0
  159. package/lib/core/fetcher.d.ts +198 -0
  160. package/lib/core/fetcher.js +903 -0
  161. package/lib/core/helpers/adapters.d.ts +13 -0
  162. package/lib/core/helpers/adapters.js +39 -0
  163. package/lib/core/helpers/chain-address.d.ts +13 -0
  164. package/lib/core/helpers/chain-address.js +47 -0
  165. package/lib/core/helpers/chain-error.d.ts +207 -0
  166. package/lib/core/helpers/chain-error.js +682 -0
  167. package/lib/core/helpers/chain-support.d.ts +80 -0
  168. package/lib/core/helpers/chain-support.js +115 -0
  169. package/lib/core/helpers/core.d.ts +68 -0
  170. package/lib/core/helpers/core.js +285 -0
  171. package/lib/core/helpers/explorer-link.d.ts +16 -0
  172. package/lib/core/helpers/explorer-link.js +26 -0
  173. package/lib/core/helpers/multicall.d.ts +68 -0
  174. package/lib/core/helpers/multicall.js +103 -0
  175. package/lib/core/helpers/revert-decode.d.ts +248 -0
  176. package/lib/core/helpers/revert-decode.js +515 -0
  177. package/lib/core/helpers/signer.d.ts +52 -0
  178. package/lib/core/helpers/signer.js +145 -0
  179. package/lib/core/helpers/swap-router.d.ts +211 -0
  180. package/lib/core/helpers/swap-router.js +480 -0
  181. package/lib/core/helpers/vault-version.d.ts +23 -0
  182. package/lib/core/helpers/vault-version.js +75 -0
  183. package/lib/core/helpers/vaults.d.ts +89 -0
  184. package/lib/core/helpers/vaults.js +235 -0
  185. package/lib/core/helpers/web3.d.ts +353 -0
  186. package/lib/core/helpers/web3.js +992 -0
  187. package/lib/core/index.d.ts +23 -0
  188. package/lib/core/index.js +40 -0
  189. package/lib/core/logger/index.d.ts +98 -0
  190. package/lib/core/logger/index.js +144 -0
  191. package/lib/core/logger/slack.d.ts +16 -0
  192. package/lib/core/logger/slack.js +57 -0
  193. package/lib/core/vault-metadata.d.ts +12 -0
  194. package/lib/core/vault-metadata.js +42 -0
  195. package/lib/core/version-check.d.ts +58 -0
  196. package/lib/core/version-check.js +182 -0
  197. package/lib/evm/index.d.ts +2 -0
  198. package/lib/evm/index.js +19 -0
  199. package/lib/evm/methods/crossChainVault.d.ts +128 -0
  200. package/lib/evm/methods/crossChainVault.js +853 -0
  201. package/lib/evm/methods/crossChainVaultRegistry.d.ts +93 -0
  202. package/lib/evm/methods/crossChainVaultRegistry.js +240 -0
  203. package/lib/evm/methods/index.d.ts +2 -0
  204. package/lib/evm/methods/index.js +19 -0
  205. package/lib/evm/types/crossChain.d.ts +363 -0
  206. package/lib/evm/types/crossChain.js +20 -0
  207. package/lib/evm/types/index.d.ts +1 -0
  208. package/lib/evm/types/index.js +18 -0
  209. package/lib/index.d.ts +30 -0
  210. package/lib/index.js +52 -0
  211. package/lib/main.d.ts +527 -0
  212. package/lib/main.js +601 -0
  213. package/lib/modules/api/fetcher.d.ts +82 -0
  214. package/lib/modules/api/fetcher.js +150 -0
  215. package/lib/modules/api/index.d.ts +1 -0
  216. package/lib/modules/api/index.js +6 -0
  217. package/lib/modules/api/main.d.ts +313 -0
  218. package/lib/modules/api/main.js +479 -0
  219. package/lib/modules/sub-accounts/fetcher.d.ts +53 -0
  220. package/lib/modules/sub-accounts/fetcher.js +120 -0
  221. package/lib/modules/sub-accounts/index.d.ts +2 -0
  222. package/lib/modules/sub-accounts/index.js +19 -0
  223. package/lib/modules/sub-accounts/main.d.ts +243 -0
  224. package/lib/modules/sub-accounts/main.js +205 -0
  225. package/lib/modules/sub-accounts/utils.d.ts +106 -0
  226. package/lib/modules/sub-accounts/utils.js +112 -0
  227. package/lib/modules/vaults/adapter.helpers.d.ts +64 -0
  228. package/lib/modules/vaults/adapter.helpers.js +184 -0
  229. package/lib/modules/vaults/fetcher.d.ts +147 -0
  230. package/lib/modules/vaults/fetcher.js +368 -0
  231. package/lib/modules/vaults/getters.d.ts +570 -0
  232. package/lib/modules/vaults/getters.js +3051 -0
  233. package/lib/modules/vaults/index.d.ts +20 -0
  234. package/lib/modules/vaults/index.js +44 -0
  235. package/lib/modules/vaults/main.d.ts +601 -0
  236. package/lib/modules/vaults/main.js +1623 -0
  237. package/lib/modules/vaults/prefetch.d.ts +65 -0
  238. package/lib/modules/vaults/prefetch.js +120 -0
  239. package/lib/modules/vaults/read.actions.d.ts +225 -0
  240. package/lib/modules/vaults/read.actions.js +596 -0
  241. package/lib/modules/vaults/types.d.ts +71 -0
  242. package/lib/modules/vaults/types.js +3 -0
  243. package/lib/modules/vaults/utils/call-data-decoder.d.ts +61 -0
  244. package/lib/modules/vaults/utils/call-data-decoder.js +194 -0
  245. package/lib/modules/vaults/utils/date-utils.d.ts +50 -0
  246. package/lib/modules/vaults/utils/date-utils.js +84 -0
  247. package/lib/modules/vaults/utils.d.ts +140 -0
  248. package/lib/modules/vaults/utils.js +799 -0
  249. package/lib/modules/vaults/write.actions.d.ts +529 -0
  250. package/lib/modules/vaults/write.actions.js +1749 -0
  251. package/lib/polyfills.d.ts +1 -0
  252. package/lib/polyfills.js +12 -0
  253. package/lib/sdk.d.ts +26721 -0
  254. package/lib/services/coingecko/fetcher.d.ts +15 -0
  255. package/lib/services/coingecko/fetcher.js +67 -0
  256. package/lib/services/coingecko/index.d.ts +2 -0
  257. package/lib/services/coingecko/index.js +19 -0
  258. package/lib/services/coingecko/utils.d.ts +1 -0
  259. package/lib/services/coingecko/utils.js +24 -0
  260. package/lib/services/debank/fetcher.d.ts +126 -0
  261. package/lib/services/debank/fetcher.js +47 -0
  262. package/lib/services/debank/index.d.ts +2 -0
  263. package/lib/services/debank/index.js +19 -0
  264. package/lib/services/debank/utils.d.ts +38 -0
  265. package/lib/services/debank/utils.js +297 -0
  266. package/lib/services/layerzero/deposits.d.ts +49 -0
  267. package/lib/services/layerzero/deposits.js +166 -0
  268. package/lib/services/layerzero/redeems.d.ts +20 -0
  269. package/lib/services/layerzero/redeems.js +92 -0
  270. package/lib/services/layerzero/utils.d.ts +9 -0
  271. package/lib/services/layerzero/utils.js +22 -0
  272. package/lib/services/octavfi/fetcher.d.ts +9 -0
  273. package/lib/services/octavfi/fetcher.js +103 -0
  274. package/lib/services/octavfi/index.d.ts +3 -0
  275. package/lib/services/octavfi/index.js +20 -0
  276. package/lib/services/octavfi/types.d.ts +34 -0
  277. package/lib/services/octavfi/types.js +3 -0
  278. package/lib/services/octavfi/utils.d.ts +16 -0
  279. package/lib/services/octavfi/utils.js +212 -0
  280. package/lib/services/subgraph/fetcher.d.ts +2 -0
  281. package/lib/services/subgraph/fetcher.js +61 -0
  282. package/lib/services/subgraph/index.d.ts +2 -0
  283. package/lib/services/subgraph/index.js +19 -0
  284. package/lib/services/subgraph/schema.d.ts +45 -0
  285. package/lib/services/subgraph/schema.js +75 -0
  286. package/lib/services/subgraph/vaults.d.ts +25 -0
  287. package/lib/services/subgraph/vaults.js +1106 -0
  288. package/lib/services/swap-quotes/index.d.ts +105 -0
  289. package/lib/services/swap-quotes/index.js +77 -0
  290. package/lib/services/swap-quotes/paraswap.d.ts +51 -0
  291. package/lib/services/swap-quotes/paraswap.js +138 -0
  292. package/lib/types/api.d.ts +280 -0
  293. package/lib/types/api.js +3 -0
  294. package/lib/types/index.d.ts +12 -0
  295. package/lib/types/index.js +28 -0
  296. package/lib/types/points.d.ts +28 -0
  297. package/lib/types/points.js +3 -0
  298. package/lib/types/pools.d.ts +144 -0
  299. package/lib/types/pools.js +3 -0
  300. package/lib/types/staking.d.ts +28 -0
  301. package/lib/types/staking.js +3 -0
  302. package/lib/types/sub-accounts.d.ts +140 -0
  303. package/lib/types/sub-accounts.js +3 -0
  304. package/lib/types/subgraph.d.ts +74 -0
  305. package/lib/types/subgraph.js +3 -0
  306. package/lib/types/typed-contract.d.ts +102 -0
  307. package/lib/types/typed-contract.js +3 -0
  308. package/lib/types/user.d.ts +1 -0
  309. package/lib/types/user.js +3 -0
  310. package/lib/types/vaults.d.ts +714 -0
  311. package/lib/types/vaults.js +24 -0
  312. package/lib/types/web3.d.ts +51 -0
  313. package/lib/types/web3.js +14 -0
  314. package/lib/types/webserver.d.ts +698 -0
  315. package/lib/types/webserver.js +3 -0
  316. package/package.json +78 -0
package/lib/main.d.ts ADDED
@@ -0,0 +1,527 @@
1
+ /**
2
+ * The main August SDK class.
3
+ *
4
+ * @module AugustSDK
5
+ */
6
+ import SolanaAdapter from './adapters/solana';
7
+ import SuiAdapter from './adapters/sui';
8
+ import StellarAdapter from './adapters/stellar';
9
+ import EVMAdapter from './adapters/evm';
10
+ import type { IAddress, IChainId, IVaultHistoricalParams, IWSMonitorHeaders } from './types';
11
+ import { AugustBase, type IAugustBase } from './core';
12
+ import { AugustVaults, type IVaultBaseOptions, type IVaultCustomOptions } from './modules/vaults';
13
+ import type { Signer, Wallet } from 'ethers';
14
+ import type { IContractWriteOptions } from './modules/vaults/write.actions';
15
+ import { AugustSubAccounts } from './modules/sub-accounts';
16
+ import { AugustApi } from './modules/api';
17
+ /**
18
+ * Main SDK class for interacting with August Digital vaults and services.
19
+ * Provides unified access to EVM, Solana, Sui, and Stellar blockchain adapters.
20
+ */
21
+ export declare class AugustSDK extends AugustBase {
22
+ private vaults;
23
+ private subaccounts;
24
+ private api;
25
+ solana: SolanaAdapter;
26
+ sui: SuiAdapter;
27
+ stellar: StellarAdapter;
28
+ evm: EVMAdapter;
29
+ /**
30
+ * Initialize the August SDK with provider configuration.
31
+ * Automatically sets up EVM adapter and optionally initializes Solana if RPC URL is provided.
32
+ */
33
+ constructor(baseConfig: IAugustBase);
34
+ /**
35
+ * Get the Sub-Accounts module instance.
36
+ */
37
+ get subAccountsModule(): AugustSubAccounts;
38
+ /**
39
+ * Get the Vaults module instance.
40
+ */
41
+ get vaultsModule(): AugustVaults;
42
+ /**
43
+ * Get the backend API module instance ({@link AugustApi}) — read-only
44
+ * access to backend-computed data with no on-chain equivalent
45
+ * (unrealized-PnL series).
46
+ */
47
+ get apiModule(): AugustApi;
48
+ /**
49
+ * Switch the active network for vault operations.
50
+ * Updates the SDK's active chain and RPC provider.
51
+ */
52
+ switchNetwork(chainId: IChainId): void;
53
+ /**
54
+ * Set the active wallet address for tracking user-specific vault data.
55
+ * Updates monitoring headers with the wallet address.
56
+ */
57
+ updateWallet(address: IAddress): void;
58
+ /**
59
+ * Clear the active wallet address from the SDK state and monitoring headers.
60
+ */
61
+ clearWallet(): void;
62
+ /**
63
+ * Pricing and Market Data
64
+ */
65
+ /**
66
+ * Get the current USD price of a token by symbol or contract address.
67
+ * Falls back to CoinGecko if primary price source fails.
68
+ *
69
+ * @param symbol - Token symbol or contract address
70
+ * @returns Current price in USD
71
+ */
72
+ getPrice(symbol: string): Promise<number>;
73
+ /**
74
+ * Vault Data and Operations
75
+ */
76
+ /**
77
+ * Fetch all available vaults across configured networks.
78
+ * Optionally filter by chain IDs and include loan/allocation data.
79
+ * @param options - Configuration for filtering and enriching vault data
80
+ * @returns Array of vault objects with metadata and optional position data
81
+ */
82
+ getVaults(options?: {
83
+ chainIds?: number[];
84
+ headers?: IWSMonitorHeaders;
85
+ loadSubaccounts?: boolean;
86
+ loadSnapshots?: boolean;
87
+ } & IVaultCustomOptions): Promise<import("./types").IVault[]>;
88
+ getTotalDeposited(options?: {
89
+ loadSubaccounts?: boolean;
90
+ loadSnapshots?: boolean;
91
+ }): Promise<number>;
92
+ /**
93
+ * Fetch all available vaults across configured networks.
94
+ * Optionally filter by chain IDs and include loan/allocation data.
95
+ * @param options - Configuration for filtering and enriching vault data
96
+ * @returns Array of vault objects with metadata and optional position data
97
+ */
98
+ vaultDeposit(signer: Signer | Wallet, options: IContractWriteOptions): Promise<string>;
99
+ /**
100
+ * Fetch detailed information for a specific vault.
101
+ * @param props - Vault address, chain ID, and optional enrichment options
102
+ * @returns Single vault object with full metadata
103
+ */
104
+ getVault(props: {
105
+ vault: IAddress;
106
+ chainId?: IChainId;
107
+ options?: IVaultCustomOptions;
108
+ loadSubaccounts?: boolean;
109
+ loadSnapshots?: boolean;
110
+ }): Promise<import("./types").IVault>;
111
+ /**
112
+ * Get active loans deployed from a vault.
113
+ * @param props - Vault address and chain ID
114
+ * @returns Array of loan details including borrower, principal, APR
115
+ */
116
+ getVaultLoans(props: {
117
+ vault: IAddress;
118
+ chainId?: IChainId;
119
+ }): Promise<import("./types").IVaultLoan[]>;
120
+ /**
121
+ * Get vault asset allocations across DeFi protocols, CeFi, and OTC positions.
122
+ * @param props - Vault address and chain ID
123
+ * @returns Detailed breakdown of vault allocations by category
124
+ */
125
+ getVaultAllocations(props: {
126
+ vault: IAddress;
127
+ chainId?: IChainId;
128
+ }): Promise<import("./types").IVaultAllocations | {
129
+ status: number;
130
+ message: string;
131
+ }>;
132
+ /**
133
+ * Get current or historical APY for a vault.
134
+ *
135
+ * @deprecated use getVaultHistoricalTimeseries instead
136
+ *
137
+ * @param props - Vault address and optional historical lookback period
138
+ * @returns APY data including rewards breakdown
139
+ */
140
+ getVaultApy(props: {
141
+ vault: IAddress;
142
+ historical?: {
143
+ daysAgo?: number;
144
+ };
145
+ }): Promise<{
146
+ value: number;
147
+ timestamp: string;
148
+ }[]>;
149
+ /**
150
+ * Get current or historical TVL for a vault.
151
+ * @param props - Vault address and optional historical parameters
152
+ * @returns TVL in vault's base asset units
153
+ */
154
+ getVaultTvl(props: {
155
+ vault: IAddress;
156
+ historical?: IVaultHistoricalParams;
157
+ chainId?: IChainId;
158
+ }): Promise<{
159
+ value: import("./types").INormalizedNumber;
160
+ timestamp: string;
161
+ }[]>;
162
+ /**
163
+ * Get historical timeseries data for a vault.
164
+ * @param props - Vault address and optional number of days
165
+ * @returns Historical timeseries data with TVL, APY, PnL, share price, and other metrics
166
+ */
167
+ getVaultHistoricalTimeseries(props: {
168
+ vault: IAddress;
169
+ nDays?: number;
170
+ }): Promise<import("./types").IHistoricalTimeseriesResponse>;
171
+ /**
172
+ * Get the timestamp when yield was last realized for a vault.
173
+ * @param props - Vault address and optional chain ID
174
+ * @returns Timestamp (Unix timestamp in seconds) when yield was last realized
175
+ */
176
+ getYieldLastRealizedOn(props: {
177
+ vault: IAddress;
178
+ chainId?: IChainId;
179
+ }): Promise<number>;
180
+ /**
181
+ * Get redemption requests that are ready to be claimed.
182
+ * @param props - Vault address, chain ID, and optional wallet filter
183
+ * @returns Array of available redemption requests with amounts and timestamps
184
+ */
185
+ getVaultAvailableRedemptions(props: {
186
+ vault: IAddress;
187
+ chainId?: IChainId;
188
+ wallet?: IAddress;
189
+ verbose?: boolean;
190
+ }): Promise<{
191
+ processedWithdrawals: import("./types").ISubgraphWithdrawProccessed[];
192
+ requestedWithdrawals: import("./types").ISubgraphWithdrawRequest[];
193
+ availableRedemptions: import("./types").IVaultAvailableRedemption[];
194
+ pendingRedemptions: import("./types").IVaultAvailableRedemption[];
195
+ }>;
196
+ /**
197
+ * Get historical redemption requests for a vault (settled, cancelled,
198
+ * pending-but-out-of-window), optionally filtered to one wallet.
199
+ *
200
+ * @param props - Vault address, chain ID, optional wallet, and an
201
+ * optional `lookbackBlocks` for how far back to scan.
202
+ * @returns Historical redemption records, newest first.
203
+ */
204
+ getVaultRedemptionHistory(props: {
205
+ vault: IAddress;
206
+ chainId?: IChainId;
207
+ wallet?: IAddress;
208
+ lookbackBlocks?: number;
209
+ }): Promise<import("./types").IVaultRedemptionHistoryItem[]>;
210
+ /**
211
+ * Get user positions across vaults including shares and claimable redemptions.
212
+ * Supports both EVM and Solana vaults.
213
+ * @param props - Wallet address, chain ID, and optional vault filter
214
+ * @returns Array of positions with balances and pending redemptions
215
+ */
216
+ getVaultPositions(props: {
217
+ vault?: IAddress;
218
+ wallet?: IAddress;
219
+ chainId?: IChainId;
220
+ showAllVaults?: boolean;
221
+ solanaWallet?: string;
222
+ stellarWallet?: string;
223
+ options?: IVaultBaseOptions;
224
+ }): Promise<import("./types").IVaultPosition[]>;
225
+ /**
226
+ * Get user's historical vault interactions including deposits and withdrawals.
227
+ * @param props - Wallet address and optional vault/chain filters
228
+ * @returns Array of historical transactions with amounts and timestamps
229
+ */
230
+ getVaultUserHistory(props: {
231
+ wallet: IAddress;
232
+ chainId?: IChainId;
233
+ vault?: IAddress;
234
+ options?: IVaultBaseOptions;
235
+ }): Promise<import("./types").IVaultUserHistoryItem[]>;
236
+ /**
237
+ * Get user's vault share transfer history from subgraph.
238
+ * @param props - Wallet address and optional vault/chain filters
239
+ * @returns Array of transfer events
240
+ */
241
+ getVaultUserTransfers(props: {
242
+ wallet: IAddress;
243
+ chainId?: IChainId;
244
+ vault?: IAddress;
245
+ options?: IVaultBaseOptions;
246
+ }): Promise<{
247
+ id: string;
248
+ value: string;
249
+ to: string;
250
+ from: string;
251
+ pool: string;
252
+ block: number;
253
+ timestamp: number;
254
+ transactionHash: string;
255
+ }[]>;
256
+ /**
257
+ * Get a vault's deposit/withdrawal activity across every participant.
258
+ *
259
+ * The vault-wide counterpart to {@link AugustSDK.getVaultUserHistory} — use
260
+ * it to answer flow questions ("how many deposits in the last 7 days", "net
261
+ * flow this week") that point-in-time TVL cannot. Reads from the Goldsky
262
+ * subgraph, paginated so busy vaults are not truncated; a `sinceTs` window
263
+ * keeps short lookbacks cheap.
264
+ * @param props - Vault address, optional chain id, optional `sinceTs`/`untilTs`
265
+ * Unix-second bounds, and an optional `types` filter.
266
+ * @returns Array of activity items (oldest-first) with normalized amounts,
267
+ * actor addresses, event type, and transaction hashes.
268
+ * @throws If `vault` is not a valid address or no chain id can be resolved.
269
+ * @example
270
+ * ```ts
271
+ * const weekAgo = Math.floor(Date.now() / 1000) - 7 * 86_400;
272
+ * const items = await sdk.getVaultActivity({ vault, chainId: 143, sinceTs: weekAgo });
273
+ * ```
274
+ */
275
+ getVaultActivity(props: {
276
+ vault: IAddress;
277
+ chainId?: IChainId;
278
+ sinceTs?: number;
279
+ untilTs?: number;
280
+ types?: ('withdraw-request' | 'deposit' | 'withdraw-processed' | 'redeem')[];
281
+ }): Promise<import("./types").IVaultUserHistoryItem[]>;
282
+ /**
283
+ * Resolve the ERC-20 tokens currently whitelisted for the `SwapRouter` on a
284
+ * chain — the any-token set a deposit UI can offer as swap-and-deposit inputs.
285
+ *
286
+ * Delegates to {@link AugustVaults.getSwapRouterWhitelistedTokens}, which
287
+ * reconstructs the set from the router's `TokenEnabled` events and verifies
288
+ * each against the on-chain `whitelistedTokens` mapping (not enumerable).
289
+ * Returns `[]` when no router is deployed on `chainId` or no provider is
290
+ * configured for it.
291
+ *
292
+ * @param chainId - EVM chain ID to resolve the allowlist for.
293
+ * @param options - Optional `fromBlock` to override the deploy-block scan floor.
294
+ * @returns Checksummed whitelisted token addresses; `[]` when unavailable.
295
+ * @throws AugustSDKError when an `eth_getLogs` scan chunk fails.
296
+ * @example
297
+ * ```ts
298
+ * const tokens = await augustSdk.getSwapRouterWhitelistedTokens(1);
299
+ * ```
300
+ */
301
+ getSwapRouterWhitelistedTokens(chainId: number, options?: {
302
+ fromBlock?: number;
303
+ }): Promise<IAddress[]>;
304
+ /**
305
+ * Resolve the vaults currently eligible for the any-token `SwapRouter`
306
+ * deposit surface on a chain — every vault the router has `enableVault`-ed
307
+ * whose on-chain registration is still live.
308
+ *
309
+ * Delegates to {@link AugustVaults.getSwapRouterEligibleVaults}, which
310
+ * reconstructs the set from the router's `VaultEnabled` events and verifies
311
+ * each vault's current `vaultInfo` registration (not enumerable). Returns
312
+ * `[]` when no router is deployed on `chainId` or no provider is configured
313
+ * for it. On-chain eligibility only — app-level policy (e.g. OVault
314
+ * exclusions) remains the caller's responsibility.
315
+ *
316
+ * @param chainId - EVM chain ID to resolve eligible vaults for.
317
+ * @param options - Optional `fromBlock` to override the deploy-block scan floor.
318
+ * @returns Checksummed eligible vault addresses; `[]` when unavailable.
319
+ * @throws AugustSDKError when an `eth_getLogs` scan chunk fails.
320
+ * @example
321
+ * ```ts
322
+ * const vaults = await augustSdk.getSwapRouterEligibleVaults(1);
323
+ * ```
324
+ */
325
+ getSwapRouterEligibleVaults(chainId: number, options?: {
326
+ fromBlock?: number;
327
+ }): Promise<IAddress[]>;
328
+ /**
329
+ * Get lifetime PnL for a user in a specific vault.
330
+ * Calculates realized and unrealized PnL based on deposit/withdrawal history and current position.
331
+ * @param props - Vault address, wallet address, and optional chain ID
332
+ * @returns Lifetime PnL data including realized and unrealized PnL in both native token and USD
333
+ */
334
+ getVaultUserLifetimePnl(props: {
335
+ vault: IAddress;
336
+ wallet: IAddress;
337
+ chainId?: IChainId;
338
+ }): Promise<import("./types").IVaultUserLifetimePnl>;
339
+ /**
340
+ * Get PnL for a vault (vault-level, not user-specific).
341
+ * Returns the vault's overall profit and loss across all users.
342
+ * @param props - Vault address and optional chain ID
343
+ * @returns Vault PnL in USD and notional value
344
+ */
345
+ getVaultPnl(props: {
346
+ vault: IAddress;
347
+ chainId?: IChainId;
348
+ }): Promise<import("./types").IVaultPnl>;
349
+ /**
350
+ * Get user's staking positions for vault receipt tokens.
351
+ * @param props - Wallet address and optional chain ID
352
+ * @returns Array of staking positions with rewards
353
+ */
354
+ getVaultStakingPositions(props: {
355
+ wallet?: IAddress;
356
+ chainId?: IChainId;
357
+ }): Promise<import("./types").IActiveStakingPosition[]>;
358
+ /**
359
+ * Get the borrower's health factor by vault.
360
+ *
361
+ * Pass `vault` whenever the caller knows which pool it cares about — it
362
+ * skips the all-vaults cross-chain fanout and only reads the loans for
363
+ * that one pool. The response map is keyed by **lowercased** vault
364
+ * address; look entries up with `address.toLowerCase()`.
365
+ *
366
+ * @param props.chainId Optional chain to scope the read to.
367
+ * @param props.vault Optional vault address. When provided alongside
368
+ * `chainId`, only that vault's borrower-health-factor data is fetched.
369
+ * @returns Object containing the borrower's health factor by vault.
370
+ */
371
+ getVaultBorrowerHealthFactor(props?: {
372
+ chainId?: IChainId;
373
+ vault?: IAddress;
374
+ }): Promise<Record<string, import("./types").IVaultBorrowerHealthFactor[]> | Record<string, import("./types").IVaultBorrowerHealthFactor[]>[]>;
375
+ /**
376
+ * Get user points from the backend API.
377
+ * This fetches processed points data directly from the backend,
378
+ * removing the need for client-side points calculation.
379
+ * @param userAddress - User wallet address
380
+ * @returns Points data from the backend API
381
+ */
382
+ getUserPoints(userAddress: IAddress): Promise<any>;
383
+ /**
384
+ * Register a user for the points program, authenticated by a wallet signature.
385
+ *
386
+ * The caller produces a personal_sign signature over a canonical message
387
+ * containing the user address, referrer (or `"none"`), chain, nonce, and
388
+ * expiry — see `AugustVaults.registerUserForPoints` for the exact template.
389
+ *
390
+ * @param userAddress - EVM wallet address being registered.
391
+ * @param referrerAddress - Optional EVM referrer address.
392
+ * @param chainId - Chain on which the wallet signed; powers the EIP-1271
393
+ * fallback for smart-contract wallets and pins the signature cross-chain.
394
+ * @param signature - 0x-prefixed personal_sign signature over the canonical message.
395
+ * @param nonce - Single-use random string (8–128 chars).
396
+ * @param expiry - Unix seconds; must be in the future, within the backend's TTL.
397
+ * @returns Raw `Response` from the backend.
398
+ */
399
+ registerUserForPoints(userAddress: IAddress, referrerAddress: IAddress | undefined, chainId: number, signature: string, nonce: string, expiry: number): Promise<Response>;
400
+ /**
401
+ * Fetch the points leaderboard data.
402
+ * @param params - Optional parameters for pagination and sorting
403
+ * @returns Leaderboard response data
404
+ */
405
+ fetchPointsLeaderboard(params?: {
406
+ page?: number;
407
+ perPage?: number;
408
+ sortBy?: 'streakDays' | 'totalPoints';
409
+ }): Promise<any>;
410
+ /**
411
+ * Fetch the historical unrealized-PnL series for a vault, newest first.
412
+ * Delegates to {@link AugustApi.getVaultUnrealizedPnlHistory} — see it for
413
+ * parameter semantics and thrown errors.
414
+ */
415
+ getVaultUnrealizedPnlHistory(params: {
416
+ vault: string;
417
+ limit?: number;
418
+ }): Promise<import("./types").IUnrealizedPnlSnapshot[]>;
419
+ /**
420
+ * Fetch the latest unrealized-PnL snapshot for every tracked vault.
421
+ * Delegates to {@link AugustApi.getLatestUnrealizedPnl} — see it for
422
+ * return shape and thrown errors.
423
+ */
424
+ getLatestUnrealizedPnl(): Promise<import("./types").IUnrealizedPnlSnapshot[]>;
425
+ /**
426
+ * Get annualized APY metrics for a vault.
427
+ *
428
+ * Supported Vaults: cUSDO, tETH, wstETH, rsETH
429
+ *
430
+ * @deprecated The `hgETH30dLiquidAPY` and `hgETH7dLiquidAPY` response fields are deprecated.
431
+ * These fields will be removed on 2026-01-01.
432
+ * Use `liquidAPY30Day` and `liquidAPY7Day` fields instead.
433
+ *
434
+ * @param props - Vault address
435
+ * @returns Annualized APY data including liquidity APY
436
+ */
437
+ getVaultAnnualizedApy(props: {
438
+ vault: IAddress;
439
+ }): Promise<import("./types").IVaultAnnualizedApy>;
440
+ /**
441
+ * Get summary data for a vault (name, type, chain, recent returns).
442
+ * @param props - Vault address
443
+ * @returns Vault summary data
444
+ */
445
+ getVaultSummary(props: {
446
+ vault: IAddress;
447
+ }): Promise<import("./types").IVaultSummary>;
448
+ /**
449
+ * Get withdrawal summary and pending queue for a vault.
450
+ * @param props - Vault address and optional chain ID
451
+ * @returns Withdrawal summary and pending queue
452
+ */
453
+ getVaultWithdrawals(props: {
454
+ vault: IAddress;
455
+ chainId?: IChainId;
456
+ }): Promise<import("./types").IVaultWithdrawals>;
457
+ /**
458
+ * Preview the amount of assets that would be received for redeeming shares (queued redemption).
459
+ * @param props - Vault contract address, shares amount, and optional chain ID
460
+ * @returns The amount of assets as {@link INormalizedNumber}
461
+ */
462
+ previewRedemption(props: {
463
+ vault: IAddress;
464
+ sharesAmount: string | bigint | number;
465
+ chainId?: IChainId;
466
+ }): Promise<import("./types").INormalizedNumber>;
467
+ /**
468
+ * Query LayerZero USDC deposits from the august-layerzero subgraphs.
469
+ * Returns all deposits or filters by sender wallet address if provided.
470
+ *
471
+ * **Important Notes:**
472
+ * - Only deposit transactions are tracked (not withdrawals or other operations)
473
+ * - Sender and recipient addresses are stored in bytes32 format in the subgraph
474
+ * - Timestamps are available from the subgraph
475
+ *
476
+ * **Supported Vaults:**
477
+ * - `upusdc`: 0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42
478
+ * - `coreusdc`: 0xE9B725010A9E419412ed67d0fA5f3A5f40159D32
479
+ * - `earnausd`: 0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA
480
+ *
481
+ * @param props - Receipt token type ('upusdc', 'coreusdc', or 'earnausd') and optional wallet address to filter by sender
482
+ * @returns Array of deposit events with the following structure:
483
+ * - `assetAmt`: Amount of assets deposited (as string)
484
+ * - `shareAmt`: Amount of shares received (as string)
485
+ * - `sender`: Sender address in bytes32 format
486
+ * - `recipient`: Recipient address in bytes32 format
487
+ * - `dstEid`: Destination endpoint ID (LayerZero chain identifier)
488
+ * - `transactionHash_`: Transaction hash
489
+ *
490
+ * @throws Error if receipt token is invalid or GraphQL request fails
491
+ *
492
+ * @example
493
+ * ```typescript
494
+ * // Get all coreUSDC deposits
495
+ * const allDeposits = await sdk.getLayerZeroDeposits({
496
+ * receiptToken: 'coreusdc'
497
+ * });
498
+ *
499
+ * // Get deposits for a specific wallet
500
+ * const userDeposits = await sdk.getLayerZeroDeposits({
501
+ * receiptToken: 'upusdc',
502
+ * wallet: '0xb0280B58F541131b29D1B33319CD440a99eA0305'
503
+ * });
504
+ * ```
505
+ */
506
+ getLayerZeroDeposits(props: {
507
+ receiptToken: 'upusdc' | 'coreusdc' | 'earnausd';
508
+ wallet?: IAddress;
509
+ }): Promise<import("./services/layerzero/deposits").ILayerZeroDeposit[]>;
510
+ /**
511
+ * Get LayerZero redeems for earnAUSD vault
512
+ *
513
+ * @example
514
+ * ```typescript
515
+ * // Get all earnAUSD redeems
516
+ * const allRedeems = await sdk.getLayerZeroRedeems();
517
+ *
518
+ * // Get redeems for a specific wallet
519
+ * const userRedeems = await sdk.getLayerZeroRedeems({
520
+ * wallet: '0x2de1DCB8EaAd40fAd327fa3eE3F48774b8e20649'
521
+ * });
522
+ * ```
523
+ */
524
+ getLayerZeroRedeems(props?: {
525
+ wallet?: IAddress;
526
+ }): Promise<import("./services/layerzero/redeems").ILayerZeroRedeem[]>;
527
+ }