@augustdigital/sdk 8.3.2 → 8.5.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.
Files changed (204) hide show
  1. package/lib/abis/ERC20_Bytes32.d.ts +4 -0
  2. package/lib/abis/ERC20_Bytes32.js +4 -0
  3. package/lib/abis/ERC4626.d.ts +1 -0
  4. package/lib/abis/ERC4626.js +1 -0
  5. package/lib/abis/ERC721.d.ts +1 -0
  6. package/lib/abis/ERC721.js +1 -0
  7. package/lib/abis/FeeOracle.js +1 -0
  8. package/lib/abis/LendingPool.js +1 -0
  9. package/lib/abis/LendingPoolV2.js +1 -0
  10. package/lib/abis/Multicall3.js +3 -0
  11. package/lib/abis/OFT.d.ts +20 -0
  12. package/lib/abis/OFT.js +20 -0
  13. package/lib/abis/SmartAccount.d.ts +1 -0
  14. package/lib/abis/SmartAccount.js +3 -0
  15. package/lib/abis/SwapRouter.d.ts +1 -0
  16. package/lib/abis/SwapRouter.js +1 -0
  17. package/lib/abis/UniversalSignatureValidator.js +3 -0
  18. package/lib/abis/index.d.ts +5 -0
  19. package/lib/abis/index.js +5 -0
  20. package/lib/adapters/evm/getters.d.ts +17 -2
  21. package/lib/adapters/evm/getters.js +35 -3
  22. package/lib/adapters/evm/index.d.ts +262 -0
  23. package/lib/adapters/evm/index.js +268 -1
  24. package/lib/adapters/evm/utils.d.ts +6 -0
  25. package/lib/adapters/evm/utils.js +7 -0
  26. package/lib/adapters/solana/constants.js +4 -1
  27. package/lib/adapters/solana/getters.d.ts +8 -0
  28. package/lib/adapters/solana/getters.js +21 -0
  29. package/lib/adapters/solana/idl/vault-idl.js +9 -0
  30. package/lib/adapters/solana/index.d.ts +55 -0
  31. package/lib/adapters/solana/index.js +57 -0
  32. package/lib/adapters/solana/utils.d.ts +28 -0
  33. package/lib/adapters/solana/utils.js +79 -4
  34. package/lib/adapters/solana/vault.actions.d.ts +19 -0
  35. package/lib/adapters/solana/vault.actions.js +47 -3
  36. package/lib/adapters/stellar/actions.d.ts +25 -0
  37. package/lib/adapters/stellar/actions.js +33 -0
  38. package/lib/adapters/stellar/constants.d.ts +26 -0
  39. package/lib/adapters/stellar/constants.js +29 -0
  40. package/lib/adapters/stellar/getters.d.ts +56 -0
  41. package/lib/adapters/stellar/getters.js +81 -0
  42. package/lib/adapters/stellar/index.d.ts +48 -0
  43. package/lib/adapters/stellar/index.js +48 -0
  44. package/lib/adapters/stellar/soroban.d.ts +20 -0
  45. package/lib/adapters/stellar/soroban.js +46 -0
  46. package/lib/adapters/stellar/submit.d.ts +12 -0
  47. package/lib/adapters/stellar/submit.js +19 -0
  48. package/lib/adapters/stellar/types.d.ts +27 -0
  49. package/lib/adapters/stellar/types.js +3 -0
  50. package/lib/adapters/stellar/utils.d.ts +10 -0
  51. package/lib/adapters/stellar/utils.js +10 -0
  52. package/lib/adapters/sui/getters.d.ts +6 -0
  53. package/lib/adapters/sui/getters.js +6 -0
  54. package/lib/adapters/sui/index.d.ts +15 -0
  55. package/lib/adapters/sui/index.js +15 -0
  56. package/lib/adapters/sui/transformer.d.ts +6 -0
  57. package/lib/adapters/sui/transformer.js +6 -0
  58. package/lib/adapters/sui/utils.d.ts +6 -0
  59. package/lib/adapters/sui/utils.js +6 -0
  60. package/lib/core/analytics/chain-name.d.ts +8 -0
  61. package/lib/core/analytics/chain-name.js +8 -0
  62. package/lib/core/analytics/constants.d.ts +4 -0
  63. package/lib/core/analytics/constants.js +4 -0
  64. package/lib/core/analytics/env.d.ts +25 -0
  65. package/lib/core/analytics/env.js +26 -0
  66. package/lib/core/analytics/index.d.ts +26 -0
  67. package/lib/core/analytics/index.js +35 -0
  68. package/lib/core/analytics/instrumentation.d.ts +26 -0
  69. package/lib/core/analytics/instrumentation.js +66 -2
  70. package/lib/core/analytics/method-taxonomy.d.ts +16 -0
  71. package/lib/core/analytics/method-taxonomy.js +18 -0
  72. package/lib/core/analytics/metrics.d.ts +23 -0
  73. package/lib/core/analytics/metrics.js +40 -0
  74. package/lib/core/analytics/sanitize.d.ts +38 -0
  75. package/lib/core/analytics/sanitize.js +46 -0
  76. package/lib/core/analytics/sentry-runtime.d.ts +11 -0
  77. package/lib/core/analytics/sentry-runtime.js +19 -0
  78. package/lib/core/analytics/sentry.d.ts +45 -0
  79. package/lib/core/analytics/sentry.js +115 -2
  80. package/lib/core/analytics/types.d.ts +27 -0
  81. package/lib/core/analytics/user-identity.d.ts +34 -0
  82. package/lib/core/analytics/user-identity.js +42 -0
  83. package/lib/core/analytics/version.d.ts +6 -1
  84. package/lib/core/analytics/version.js +6 -1
  85. package/lib/core/auth/verify.js +5 -0
  86. package/lib/core/base.class.d.ts +75 -0
  87. package/lib/core/base.class.js +56 -0
  88. package/lib/core/cache.d.ts +5 -0
  89. package/lib/core/cache.js +6 -0
  90. package/lib/core/constants/adapters.d.ts +15 -0
  91. package/lib/core/constants/adapters.js +28 -8
  92. package/lib/core/constants/core.d.ts +12 -1
  93. package/lib/core/constants/core.js +12 -0
  94. package/lib/core/constants/swap-router.d.ts +46 -0
  95. package/lib/core/constants/swap-router.js +50 -0
  96. package/lib/core/constants/vaults.d.ts +56 -0
  97. package/lib/core/constants/vaults.js +66 -1
  98. package/lib/core/constants/web3.d.ts +3 -0
  99. package/lib/core/constants/web3.js +18 -5
  100. package/lib/core/errors/index.d.ts +36 -0
  101. package/lib/core/errors/index.js +29 -0
  102. package/lib/core/fetcher.d.ts +134 -0
  103. package/lib/core/fetcher.js +191 -5
  104. package/lib/core/helpers/adapters.d.ts +9 -0
  105. package/lib/core/helpers/adapters.js +11 -0
  106. package/lib/core/helpers/chain-address.d.ts +10 -0
  107. package/lib/core/helpers/chain-address.js +11 -0
  108. package/lib/core/helpers/core.d.ts +42 -0
  109. package/lib/core/helpers/core.js +66 -1
  110. package/lib/core/helpers/explorer-link.d.ts +14 -0
  111. package/lib/core/helpers/explorer-link.js +14 -0
  112. package/lib/core/helpers/signer.d.ts +26 -0
  113. package/lib/core/helpers/signer.js +39 -0
  114. package/lib/core/helpers/swap-router.d.ts +32 -0
  115. package/lib/core/helpers/swap-router.js +32 -0
  116. package/lib/core/helpers/vault-version.d.ts +1 -0
  117. package/lib/core/helpers/vault-version.js +2 -0
  118. package/lib/core/helpers/vaults.d.ts +8 -0
  119. package/lib/core/helpers/vaults.js +22 -8
  120. package/lib/core/helpers/web3.d.ts +152 -0
  121. package/lib/core/helpers/web3.js +183 -6
  122. package/lib/core/logger/index.d.ts +55 -0
  123. package/lib/core/logger/index.js +19 -0
  124. package/lib/core/logger/slack.d.ts +3 -0
  125. package/lib/core/logger/slack.js +3 -0
  126. package/lib/core/vault-metadata.d.ts +6 -0
  127. package/lib/core/vault-metadata.js +6 -0
  128. package/lib/core/version-check.d.ts +52 -0
  129. package/lib/core/version-check.js +81 -0
  130. package/lib/evm/methods/crossChainVault.d.ts +90 -0
  131. package/lib/evm/methods/crossChainVault.js +186 -1
  132. package/lib/evm/methods/crossChainVaultRegistry.d.ts +93 -0
  133. package/lib/evm/methods/crossChainVaultRegistry.js +240 -0
  134. package/lib/evm/methods/index.d.ts +1 -0
  135. package/lib/evm/methods/index.js +1 -0
  136. package/lib/evm/types/crossChain.d.ts +202 -0
  137. package/lib/evm/types/crossChain.js +11 -0
  138. package/lib/index.d.ts +16 -0
  139. package/lib/index.js +19 -0
  140. package/lib/main.d.ts +288 -5
  141. package/lib/main.js +305 -0
  142. package/lib/modules/api/index.d.ts +1 -0
  143. package/lib/modules/api/index.js +6 -0
  144. package/lib/modules/api/main.d.ts +52 -0
  145. package/lib/modules/api/main.js +130 -0
  146. package/lib/modules/sub-accounts/fetcher.d.ts +15 -0
  147. package/lib/modules/sub-accounts/fetcher.js +15 -0
  148. package/lib/modules/sub-accounts/main.d.ts +33 -0
  149. package/lib/modules/sub-accounts/main.js +38 -0
  150. package/lib/modules/sub-accounts/utils.d.ts +3 -0
  151. package/lib/modules/sub-accounts/utils.js +3 -0
  152. package/lib/modules/vaults/adapter.helpers.d.ts +18 -0
  153. package/lib/modules/vaults/adapter.helpers.js +34 -0
  154. package/lib/modules/vaults/fetcher.d.ts +20 -0
  155. package/lib/modules/vaults/fetcher.js +40 -3
  156. package/lib/modules/vaults/getters.d.ts +295 -0
  157. package/lib/modules/vaults/getters.js +552 -12
  158. package/lib/modules/vaults/index.d.ts +12 -0
  159. package/lib/modules/vaults/index.js +12 -0
  160. package/lib/modules/vaults/main.d.ts +292 -4
  161. package/lib/modules/vaults/main.js +379 -7
  162. package/lib/modules/vaults/read.actions.d.ts +168 -0
  163. package/lib/modules/vaults/read.actions.js +143 -0
  164. package/lib/modules/vaults/types.d.ts +34 -0
  165. package/lib/modules/vaults/utils/call-data-decoder.d.ts +47 -0
  166. package/lib/modules/vaults/utils/call-data-decoder.js +56 -0
  167. package/lib/modules/vaults/utils/date-utils.d.ts +39 -0
  168. package/lib/modules/vaults/utils/date-utils.js +47 -1
  169. package/lib/modules/vaults/utils.d.ts +69 -0
  170. package/lib/modules/vaults/utils.js +104 -5
  171. package/lib/modules/vaults/write.actions.d.ts +363 -3
  172. package/lib/modules/vaults/write.actions.js +364 -2
  173. package/lib/polyfills.js +2 -0
  174. package/lib/sdk.d.ts +23705 -0
  175. package/lib/services/coingecko/fetcher.d.ts +13 -0
  176. package/lib/services/coingecko/fetcher.js +17 -0
  177. package/lib/services/debank/fetcher.d.ts +14 -0
  178. package/lib/services/debank/fetcher.js +12 -0
  179. package/lib/services/debank/utils.js +17 -0
  180. package/lib/services/layerzero/deposits.d.ts +11 -0
  181. package/lib/services/layerzero/deposits.js +34 -11
  182. package/lib/services/layerzero/redeems.d.ts +10 -0
  183. package/lib/services/layerzero/redeems.js +13 -0
  184. package/lib/services/layerzero/utils.d.ts +8 -0
  185. package/lib/services/layerzero/utils.js +11 -0
  186. package/lib/services/octavfi/fetcher.d.ts +7 -0
  187. package/lib/services/octavfi/fetcher.js +25 -0
  188. package/lib/services/octavfi/utils.d.ts +12 -0
  189. package/lib/services/octavfi/utils.js +44 -10
  190. package/lib/services/subgraph/fetcher.js +4 -2
  191. package/lib/services/subgraph/vaults.d.ts +12 -0
  192. package/lib/services/subgraph/vaults.js +43 -2
  193. package/lib/services/swap-quotes/index.d.ts +71 -0
  194. package/lib/services/swap-quotes/index.js +25 -0
  195. package/lib/services/swap-quotes/paraswap.d.ts +17 -0
  196. package/lib/services/swap-quotes/paraswap.js +14 -0
  197. package/lib/types/pools.d.ts +3 -0
  198. package/lib/types/typed-contract.d.ts +64 -0
  199. package/lib/types/vaults.d.ts +137 -2
  200. package/lib/types/vaults.js +10 -0
  201. package/lib/types/web3.d.ts +8 -0
  202. package/lib/types/web3.js +1 -0
  203. package/lib/types/webserver.d.ts +45 -0
  204. package/package.json +6 -5
package/lib/index.js CHANGED
@@ -16,6 +16,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.VAULT_ADDRESSES = void 0;
18
18
  require("./polyfills");
19
+ /**
20
+ * Export other packages
21
+ */
19
22
  __exportStar(require("./types"), exports);
20
23
  __exportStar(require("./core"), exports);
21
24
  __exportStar(require("./abis"), exports);
@@ -23,11 +26,27 @@ __exportStar(require("./services/debank"), exports);
23
26
  __exportStar(require("./services/swap-quotes"), exports);
24
27
  __exportStar(require("./modules/vaults"), exports);
25
28
  __exportStar(require("./modules/sub-accounts"), exports);
29
+ __exportStar(require("./modules/api"), exports);
30
+ /**
31
+ * EVM cross-chain (LayerZero OVault) exports
32
+ */
26
33
  __exportStar(require("./evm"), exports);
34
+ /**
35
+ * Solana export
36
+ */
27
37
  __exportStar(require("./adapters/solana"), exports);
38
+ /**
39
+ * Stellar export
40
+ */
28
41
  __exportStar(require("./adapters/stellar"), exports);
42
+ /**
43
+ * Upshift Vaults
44
+ */
29
45
  const vaults_1 = require("./core/constants/vaults");
30
46
  exports.VAULT_ADDRESSES = vaults_1.VAULT_SYMBOLS_REVERSE;
47
+ /**
48
+ * Export the SDK class as default
49
+ */
31
50
  const main_1 = require("./main");
32
51
  exports.default = main_1.AugustSDK;
33
52
  //# sourceMappingURL=index.js.map
package/lib/main.d.ts CHANGED
@@ -1,27 +1,84 @@
1
+ /**
2
+ * The main August SDK class.
3
+ *
4
+ * @module AugustSDK
5
+ */
1
6
  import SolanaAdapter from './adapters/solana';
2
7
  import SuiAdapter from './adapters/sui';
3
8
  import StellarAdapter from './adapters/stellar';
4
9
  import EVMAdapter from './adapters/evm';
5
- import { IAddress, IChainId, IVaultHistoricalParams, IWSMonitorHeaders } from './types';
6
- import { AugustBase, IAugustBase } from './core';
7
- import { AugustVaults, IVaultBaseOptions, IVaultCustomOptions } from './modules/vaults';
8
- import { Signer, Wallet } from 'ethers';
9
- import { IContractWriteOptions } from './modules/vaults/write.actions';
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';
10
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
+ */
11
21
  export declare class AugustSDK extends AugustBase {
12
22
  private vaults;
13
23
  private subaccounts;
24
+ private api;
14
25
  solana: SolanaAdapter;
15
26
  sui: SuiAdapter;
16
27
  stellar: StellarAdapter;
17
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
+ */
18
33
  constructor(baseConfig: IAugustBase);
34
+ /**
35
+ * Get the Sub-Accounts module instance.
36
+ */
19
37
  get subAccountsModule(): AugustSubAccounts;
38
+ /**
39
+ * Get the Vaults module instance.
40
+ */
20
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
+ */
21
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
+ */
22
57
  updateWallet(address: IAddress): void;
58
+ /**
59
+ * Clear the active wallet address from the SDK state and monitoring headers.
60
+ */
23
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
+ */
24
72
  getPrice(symbol: string): Promise<any>;
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
+ */
25
82
  getVaults(options?: {
26
83
  chainIds?: number[];
27
84
  headers?: IWSMonitorHeaders;
@@ -32,7 +89,18 @@ export declare class AugustSDK extends AugustBase {
32
89
  loadSubaccounts?: boolean;
33
90
  loadSnapshots?: boolean;
34
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
+ */
35
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
+ */
36
104
  getVault(props: {
37
105
  vault: IAddress;
38
106
  chainId?: IChainId;
@@ -40,10 +108,20 @@ export declare class AugustSDK extends AugustBase {
40
108
  loadSubaccounts?: boolean;
41
109
  loadSnapshots?: boolean;
42
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
+ */
43
116
  getVaultLoans(props: {
44
117
  vault: IAddress;
45
118
  chainId?: IChainId;
46
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
+ */
47
125
  getVaultAllocations(props: {
48
126
  vault: IAddress;
49
127
  chainId?: IChainId;
@@ -51,6 +129,14 @@ export declare class AugustSDK extends AugustBase {
51
129
  status: number;
52
130
  message: string;
53
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
+ */
54
140
  getVaultApy(props: {
55
141
  vault: IAddress;
56
142
  historical?: {
@@ -60,6 +146,11 @@ export declare class AugustSDK extends AugustBase {
60
146
  value: number;
61
147
  timestamp: string;
62
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
+ */
63
154
  getVaultTvl(props: {
64
155
  vault: IAddress;
65
156
  historical?: IVaultHistoricalParams;
@@ -68,14 +159,29 @@ export declare class AugustSDK extends AugustBase {
68
159
  value: import("./types").INormalizedNumber;
69
160
  timestamp: string;
70
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
+ */
71
167
  getVaultHistoricalTimeseries(props: {
72
168
  vault: IAddress;
73
169
  nDays?: number;
74
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
+ */
75
176
  getYieldLastRealizedOn(props: {
76
177
  vault: IAddress;
77
178
  chainId?: IChainId;
78
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
+ */
79
185
  getVaultAvailableRedemptions(props: {
80
186
  vault: IAddress;
81
187
  chainId?: IChainId;
@@ -87,12 +193,26 @@ export declare class AugustSDK extends AugustBase {
87
193
  availableRedemptions: import("./types").IVaultAvailableRedemption[];
88
194
  pendingRedemptions: import("./types").IVaultAvailableRedemption[];
89
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
+ */
90
204
  getVaultRedemptionHistory(props: {
91
205
  vault: IAddress;
92
206
  chainId?: IChainId;
93
207
  wallet?: IAddress;
94
208
  lookbackBlocks?: number;
95
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
+ */
96
216
  getVaultPositions(props: {
97
217
  vault?: IAddress;
98
218
  wallet?: IAddress;
@@ -102,12 +222,22 @@ export declare class AugustSDK extends AugustBase {
102
222
  stellarWallet?: string;
103
223
  options?: IVaultBaseOptions;
104
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
+ */
105
230
  getVaultUserHistory(props: {
106
231
  wallet: IAddress;
107
232
  chainId?: IChainId;
108
233
  vault?: IAddress;
109
234
  options?: IVaultBaseOptions;
110
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
+ */
111
241
  getVaultUserTransfers(props: {
112
242
  wallet: IAddress;
113
243
  chainId?: IChainId;
@@ -123,49 +253,202 @@ export declare class AugustSDK extends AugustBase {
123
253
  timestamp: number;
124
254
  transactionHash: string;
125
255
  }[]>;
256
+ /**
257
+ * Get lifetime PnL for a user in a specific vault.
258
+ * Calculates realized and unrealized PnL based on deposit/withdrawal history and current position.
259
+ * @param props - Vault address, wallet address, and optional chain ID
260
+ * @returns Lifetime PnL data including realized and unrealized PnL in both native token and USD
261
+ */
126
262
  getVaultUserLifetimePnl(props: {
127
263
  vault: IAddress;
128
264
  wallet: IAddress;
129
265
  chainId?: IChainId;
130
266
  }): Promise<import("./types").IVaultUserLifetimePnl>;
267
+ /**
268
+ * Get PnL for a vault (vault-level, not user-specific).
269
+ * Returns the vault's overall profit and loss across all users.
270
+ * @param props - Vault address and optional chain ID
271
+ * @returns Vault PnL in USD and notional value
272
+ */
131
273
  getVaultPnl(props: {
132
274
  vault: IAddress;
133
275
  chainId?: IChainId;
134
276
  }): Promise<import("./types").IVaultPnl>;
277
+ /**
278
+ * Get user's staking positions for vault receipt tokens.
279
+ * @param props - Wallet address and optional chain ID
280
+ * @returns Array of staking positions with rewards
281
+ */
135
282
  getVaultStakingPositions(props: {
136
283
  wallet?: IAddress;
137
284
  chainId?: IChainId;
138
285
  }): Promise<import("./types").IActiveStakingPosition[]>;
286
+ /**
287
+ * Get the borrower's health factor by vault.
288
+ *
289
+ * Pass `vault` whenever the caller knows which pool it cares about — it
290
+ * skips the all-vaults cross-chain fanout and only reads the loans for
291
+ * that one pool. The response map is keyed by **lowercased** vault
292
+ * address; look entries up with `address.toLowerCase()`.
293
+ *
294
+ * @param props.chainId Optional chain to scope the read to.
295
+ * @param props.vault Optional vault address. When provided alongside
296
+ * `chainId`, only that vault's borrower-health-factor data is fetched.
297
+ * @returns Object containing the borrower's health factor by vault.
298
+ */
139
299
  getVaultBorrowerHealthFactor(props?: {
140
300
  chainId?: IChainId;
141
301
  vault?: IAddress;
142
302
  }): Promise<Record<string, import("./types").IVaultBorrowerHealthFactor[]> | Record<string, import("./types").IVaultBorrowerHealthFactor[]>[]>;
303
+ /**
304
+ * Get user points from the backend API.
305
+ * This fetches processed points data directly from the backend,
306
+ * removing the need for client-side points calculation.
307
+ * @param userAddress - User wallet address
308
+ * @returns Points data from the backend API
309
+ */
143
310
  getUserPoints(userAddress: IAddress): Promise<any>;
311
+ /**
312
+ * Register a user for the points program, authenticated by a wallet signature.
313
+ *
314
+ * The caller produces a personal_sign signature over a canonical message
315
+ * containing the user address, referrer (or `"none"`), chain, nonce, and
316
+ * expiry — see `AugustVaults.registerUserForPoints` for the exact template.
317
+ *
318
+ * @param userAddress - EVM wallet address being registered.
319
+ * @param referrerAddress - Optional EVM referrer address.
320
+ * @param chainId - Chain on which the wallet signed; powers the EIP-1271
321
+ * fallback for smart-contract wallets and pins the signature cross-chain.
322
+ * @param signature - 0x-prefixed personal_sign signature over the canonical message.
323
+ * @param nonce - Single-use random string (8–128 chars).
324
+ * @param expiry - Unix seconds; must be in the future, within the backend's TTL.
325
+ * @returns Raw `Response` from the backend.
326
+ */
144
327
  registerUserForPoints(userAddress: IAddress, referrerAddress: IAddress | undefined, chainId: number, signature: string, nonce: string, expiry: number): Promise<Response>;
328
+ /**
329
+ * Fetch the points leaderboard data.
330
+ * @param params - Optional parameters for pagination and sorting
331
+ * @returns Leaderboard response data
332
+ */
145
333
  fetchPointsLeaderboard(params?: {
146
334
  page?: number;
147
335
  perPage?: number;
148
336
  sortBy?: 'streakDays' | 'totalPoints';
149
337
  }): Promise<any>;
338
+ /**
339
+ * Fetch the historical unrealized-PnL series for a vault, newest first.
340
+ * Delegates to {@link AugustApi.getVaultUnrealizedPnlHistory} — see it for
341
+ * parameter semantics and thrown errors.
342
+ */
343
+ getVaultUnrealizedPnlHistory(params: {
344
+ vault: string;
345
+ limit?: number;
346
+ }): Promise<import("./types").IUnrealizedPnlSnapshot[]>;
347
+ /**
348
+ * Fetch the latest unrealized-PnL snapshot for every tracked vault.
349
+ * Delegates to {@link AugustApi.getLatestUnrealizedPnl} — see it for
350
+ * return shape and thrown errors.
351
+ */
352
+ getLatestUnrealizedPnl(): Promise<import("./types").IUnrealizedPnlSnapshot[]>;
353
+ /**
354
+ * Get annualized APY metrics for a vault.
355
+ *
356
+ * Supported Vaults: cUSDO, tETH, wstETH, rsETH
357
+ *
358
+ * @deprecated The `hgETH30dLiquidAPY` and `hgETH7dLiquidAPY` response fields are deprecated.
359
+ * These fields will be removed on 2026-01-01.
360
+ * Use `liquidAPY30Day` and `liquidAPY7Day` fields instead.
361
+ *
362
+ * @param props - Vault address
363
+ * @returns Annualized APY data including liquidity APY
364
+ */
150
365
  getVaultAnnualizedApy(props: {
151
366
  vault: IAddress;
152
367
  }): Promise<import("./types").IVaultAnnualizedApy>;
368
+ /**
369
+ * Get summary data for a vault (name, type, chain, recent returns).
370
+ * @param props - Vault address
371
+ * @returns Vault summary data
372
+ */
153
373
  getVaultSummary(props: {
154
374
  vault: IAddress;
155
375
  }): Promise<import("./types").IVaultSummary>;
376
+ /**
377
+ * Get withdrawal summary and pending queue for a vault.
378
+ * @param props - Vault address and optional chain ID
379
+ * @returns Withdrawal summary and pending queue
380
+ */
156
381
  getVaultWithdrawals(props: {
157
382
  vault: IAddress;
158
383
  chainId?: IChainId;
159
384
  }): Promise<import("./types").IVaultWithdrawals>;
385
+ /**
386
+ * Preview the amount of assets that would be received for redeeming shares (queued redemption).
387
+ * @param props - Vault contract address, shares amount, and optional chain ID
388
+ * @returns The amount of assets as {@link INormalizedNumber}
389
+ */
160
390
  previewRedemption(props: {
161
391
  vault: IAddress;
162
392
  sharesAmount: string | bigint | number;
163
393
  chainId?: IChainId;
164
394
  }): Promise<import("./types").INormalizedNumber>;
395
+ /**
396
+ * Query LayerZero USDC deposits from the august-layerzero subgraphs.
397
+ * Returns all deposits or filters by sender wallet address if provided.
398
+ *
399
+ * **Important Notes:**
400
+ * - Only deposit transactions are tracked (not withdrawals or other operations)
401
+ * - Sender and recipient addresses are stored in bytes32 format in the subgraph
402
+ * - Timestamps are available from the subgraph
403
+ *
404
+ * **Supported Vaults:**
405
+ * - `upusdc`: 0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42
406
+ * - `coreusdc`: 0xE9B725010A9E419412ed67d0fA5f3A5f40159D32
407
+ * - `earnausd`: 0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA
408
+ *
409
+ * @param props - Receipt token type ('upusdc', 'coreusdc', or 'earnausd') and optional wallet address to filter by sender
410
+ * @returns Array of deposit events with the following structure:
411
+ * - `assetAmt`: Amount of assets deposited (as string)
412
+ * - `shareAmt`: Amount of shares received (as string)
413
+ * - `sender`: Sender address in bytes32 format
414
+ * - `recipient`: Recipient address in bytes32 format
415
+ * - `dstEid`: Destination endpoint ID (LayerZero chain identifier)
416
+ * - `transactionHash_`: Transaction hash
417
+ *
418
+ * @throws Error if receipt token is invalid or GraphQL request fails
419
+ *
420
+ * @example
421
+ * ```typescript
422
+ * // Get all coreUSDC deposits
423
+ * const allDeposits = await sdk.getLayerZeroDeposits({
424
+ * receiptToken: 'coreusdc'
425
+ * });
426
+ *
427
+ * // Get deposits for a specific wallet
428
+ * const userDeposits = await sdk.getLayerZeroDeposits({
429
+ * receiptToken: 'upusdc',
430
+ * wallet: '0xb0280B58F541131b29D1B33319CD440a99eA0305'
431
+ * });
432
+ * ```
433
+ */
165
434
  getLayerZeroDeposits(props: {
166
435
  receiptToken: 'upusdc' | 'coreusdc' | 'earnausd';
167
436
  wallet?: IAddress;
168
437
  }): Promise<import("./services/layerzero/deposits").ILayerZeroDeposit[]>;
438
+ /**
439
+ * Get LayerZero redeems for earnAUSD vault
440
+ *
441
+ * @example
442
+ * ```typescript
443
+ * // Get all earnAUSD redeems
444
+ * const allRedeems = await sdk.getLayerZeroRedeems();
445
+ *
446
+ * // Get redeems for a specific wallet
447
+ * const userRedeems = await sdk.getLayerZeroRedeems({
448
+ * wallet: '0x2de1DCB8EaAd40fAd327fa3eE3F48774b8e20649'
449
+ * });
450
+ * ```
451
+ */
169
452
  getLayerZeroRedeems(props?: {
170
453
  wallet?: IAddress;
171
454
  }): Promise<import("./services/layerzero/redeems").ILayerZeroRedeem[]>;