@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
@@ -1,8 +1,20 @@
1
+ /**
2
+ * Export getters
3
+ */
1
4
  export * from './getters';
2
5
  export * from './utils';
6
+ /**
7
+ * AugustVaults class
8
+ */
3
9
  export * from './main';
10
+ /**
11
+ * Export points-related functions
12
+ */
4
13
  export { getUserPoints, registerUserForPoints, fetchPointsLeaderboard, getYieldLastRealizedOn, } from './getters';
5
14
  export { fetchVaultMetadata } from './fetcher';
6
15
  export { getRewardMultiplierByTimestamp } from './utils';
16
+ /**
17
+ * Export write/read actions
18
+ */
7
19
  export * from './write.actions';
8
20
  export * from './read.actions';
@@ -15,9 +15,18 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.getRewardMultiplierByTimestamp = exports.fetchVaultMetadata = exports.getYieldLastRealizedOn = exports.fetchPointsLeaderboard = exports.registerUserForPoints = exports.getUserPoints = void 0;
18
+ /**
19
+ * Export getters
20
+ */
18
21
  __exportStar(require("./getters"), exports);
19
22
  __exportStar(require("./utils"), exports);
23
+ /**
24
+ * AugustVaults class
25
+ */
20
26
  __exportStar(require("./main"), exports);
27
+ /**
28
+ * Export points-related functions
29
+ */
21
30
  var getters_1 = require("./getters");
22
31
  Object.defineProperty(exports, "getUserPoints", { enumerable: true, get: function () { return getters_1.getUserPoints; } });
23
32
  Object.defineProperty(exports, "registerUserForPoints", { enumerable: true, get: function () { return getters_1.registerUserForPoints; } });
@@ -27,6 +36,9 @@ var fetcher_1 = require("./fetcher");
27
36
  Object.defineProperty(exports, "fetchVaultMetadata", { enumerable: true, get: function () { return fetcher_1.fetchVaultMetadata; } });
28
37
  var utils_1 = require("./utils");
29
38
  Object.defineProperty(exports, "getRewardMultiplierByTimestamp", { enumerable: true, get: function () { return utils_1.getRewardMultiplierByTimestamp; } });
39
+ /**
40
+ * Export write/read actions
41
+ */
30
42
  __exportStar(require("./write.actions"), exports);
31
43
  __exportStar(require("./read.actions"), exports);
32
44
  //# sourceMappingURL=index.js.map
@@ -1,28 +1,96 @@
1
+ /**
2
+ * The August Vaults Module.
3
+ *
4
+ * @module AugustVaults
5
+ */
6
+ /**
7
+ * Export getters
8
+ */
1
9
  export * from './getters';
2
10
  import type { IAddress, IChainId, INormalizedNumber, IVaultHistoricalParams, IVaultPosition, IVaultUserHistoryItem } from '../../types';
3
- import SolanaAdapter from '../../adapters/solana';
4
- import { AugustBase, IAugustBase } from '../../core';
11
+ import type SolanaAdapter from '../../adapters/solana';
12
+ import { AugustBase, type IAugustBase } from '../../core';
5
13
  import SuiAdapter from '../../adapters/sui';
6
- import { IContractWriteOptions, INativeDepositOptions } from './write.actions';
7
- import { Signer, Wallet } from 'ethers';
14
+ import { type IContractWriteOptions, type INativeDepositOptions } from './write.actions';
15
+ import type { Signer, Wallet } from 'ethers';
8
16
  import type { IVaultBaseOptions, IVaultCustomOptions } from './types';
9
17
  export type { IVaultBaseOptions, IVaultCustomOptions } from './types';
18
+ /**
19
+ * Vault operations class handling multi-chain vault queries and user positions.
20
+ * Supports both EVM and Solana vaults with unified interface.
21
+ */
10
22
  export declare class AugustVaults extends AugustBase {
11
23
  private solanaService;
12
24
  private suiService;
13
25
  private headers;
14
26
  constructor(baseConfig: IAugustBase, solana: SolanaAdapter, sui: SuiAdapter);
27
+ /**
28
+ * @description deposit underlying token into the specified pool with adapter support. This is for when we cannot pass in a signer in sdk and need to do so as an arg
29
+ * @param signer signer / wallet object
30
+ * @param options object including pool contract address, user wallet address, string amount, and optional depositAsset
31
+ * @returns deposit tx hash
32
+ */
15
33
  vaultDeposit(signer: Signer | Wallet, options: IContractWriteOptions): Promise<string>;
34
+ /**
35
+ * @description deposit native token (ETH/AVAX/etc) into a vault using MultiAssetNativeDepositWrapper
36
+ * @param signer signer / wallet object
37
+ * @param options object including wrapper contract address, receiver address (optional), and amount
38
+ * @returns deposit tx hash
39
+ */
16
40
  depositNative(signer: Signer | Wallet, options: INativeDepositOptions): Promise<string>;
41
+ /**
42
+ * Fetch all vaults across configured networks with optional enrichment.
43
+ * Automatically filters by available providers and optionally by chain IDs.
44
+ * Includes closed vaults that are still visible (`status: 'closed'`,
45
+ * `is_visible: true`) so consumers can render positions held in closed
46
+ * vaults; closed vaults with `is_visible: false` are excluded.
47
+ * @param options Filtering and enrichment configuration
48
+ * @returns Array of vault objects with optional loans/allocations/positions
49
+ */
17
50
  getVaults(options?: {
18
51
  chainIds?: number[];
19
52
  loadSubaccounts?: boolean;
20
53
  loadSnapshots?: boolean;
54
+ /**
55
+ * Portfolio mode: include closed vaults in the result.
56
+ *
57
+ * By default (`false`) closed vaults are excluded, so marketplace /
58
+ * discovery callers never receive a `status: 'closed'` vault. When set,
59
+ * closed vaults are returned regardless of `is_visible` (closed +
60
+ * invisible vaults bucket as closed), so a consumer joining user
61
+ * positions can render a position held in a closed vault on the
62
+ * portfolio page.
63
+ *
64
+ * In this mode, loans/allocations enrichment is also skipped for closed
65
+ * vaults: they have none, and the per-vault enrichment
66
+ * (`getVault` → `getVaultAllocations`) otherwise re-throws when a closed
67
+ * vault has no live strategy/debank data or no subaccounts, which would
68
+ * land the vault in the `failed` bucket and silently drop it before it
69
+ * reaches the filter. Skipping enrichment lets the vault survive on its
70
+ * backend metadata + base on-chain read.
71
+ *
72
+ * @default false
73
+ */
74
+ includeClosed?: boolean;
21
75
  } & IVaultCustomOptions): Promise<import("../../types").IVault[]>;
76
+ /**
77
+ * Calculate total deposited across all tokenized vaults by summing latest_reported_tvl.
78
+ * Uses the /tokenized_vault endpoint which returns latest_reported_tvl in USD.
79
+ * @param options Optional configuration for loading vaults
80
+ * @returns Total deposited amount in USD (sum of all latest_reported_tvl values)
81
+ */
22
82
  getTotalDeposited(options?: {
23
83
  loadSubaccounts?: boolean;
24
84
  loadSnapshots?: boolean;
25
85
  }): Promise<number>;
86
+ /**
87
+ * Fetch detailed data for a single vault with optional enrichment.
88
+ * Automatically includes loans and allocations unless explicitly disabled.
89
+ * @param vault Vault contract address
90
+ * @param chainId Optional chain ID (uses active network if not provided)
91
+ * @param options Enrichment and wallet options
92
+ * @returns Single vault object with optional position data
93
+ */
26
94
  getVault({ vault, chainId, options, loadSubaccounts, loadSnapshots, }: {
27
95
  vault: IAddress;
28
96
  chainId?: IChainId;
@@ -30,14 +98,23 @@ export declare class AugustVaults extends AugustBase {
30
98
  loadSubaccounts?: boolean;
31
99
  loadSnapshots?: boolean;
32
100
  }): Promise<import("../../types").IVault>;
101
+ /**
102
+ *
103
+ */
33
104
  getVaultLoans({ vault, chainId, }: {
34
105
  vault: IAddress;
35
106
  chainId?: IChainId;
36
107
  }): Promise<import("../../types").IVaultLoan[]>;
108
+ /**
109
+ *
110
+ */
37
111
  getVaultSubaccountLoans({ vault, chainId, }: {
38
112
  vault: IAddress;
39
113
  chainId?: IChainId;
40
114
  }): Promise<import("../../types").IVaultLoan[]>;
115
+ /**
116
+ *
117
+ */
41
118
  getVaultAllocations({ vault, chainId, }: {
42
119
  vault: IAddress;
43
120
  chainId?: IChainId;
@@ -45,6 +122,13 @@ export declare class AugustVaults extends AugustBase {
45
122
  status: number;
46
123
  message: string;
47
124
  }>;
125
+ /**
126
+ * @deprecated use getVaultHistoricalTimeseries instead
127
+ * @function getVaultApy gets the vault/pool APR, both current and historical
128
+ * @param vault pool/vault contract address
129
+ * @param historical (optional) When passed, returns the historical records of the pool/vault APR
130
+ * @returns a value or array of objects containing the APR and timestamp
131
+ */
48
132
  getVaultApy({ vault, historical, }: {
49
133
  vault: IAddress;
50
134
  historical?: Partial<IVaultHistoricalParams>;
@@ -52,10 +136,19 @@ export declare class AugustVaults extends AugustBase {
52
136
  value: number;
53
137
  timestamp: string;
54
138
  }[]>;
139
+ /**
140
+ * @function getVaultHistoricalTimeseries gets historical timeseries data for a vault
141
+ * @param vault Vault contract address
142
+ * @param nDays Number of days of historical data (default 30, min 1)
143
+ * @returns Historical timeseries data with TVL, APY, PnL, share price, and other metrics
144
+ */
55
145
  getVaultHistoricalTimeseries({ vault, nDays, }: {
56
146
  vault: IAddress;
57
147
  nDays?: number;
58
148
  }): Promise<import("../../types").IHistoricalTimeseriesResponse>;
149
+ /**
150
+ *
151
+ */
59
152
  getVaultAvailableRedemptions({ vault, chainId, wallet, verbose, }: {
60
153
  vault: IAddress;
61
154
  chainId?: number;
@@ -67,12 +160,44 @@ export declare class AugustVaults extends AugustBase {
67
160
  availableRedemptions: import("../../types").IVaultAvailableRedemption[];
68
161
  pendingRedemptions: import("../../types").IVaultAvailableRedemption[];
69
162
  }>;
163
+ /**
164
+ * Historical redemption requests for a vault (settled, cancelled, and
165
+ * pending-but-out-of-window). Filterable by wallet.
166
+ *
167
+ * Stellar vaults return `[]` — on-chain redemption history is not yet
168
+ * indexed for that adapter.
169
+ *
170
+ * @param vault - Vault address (EVM or Stellar). Stellar input is
171
+ * accepted but always resolves to an empty array for now.
172
+ * @param chainId - Chain id to resolve the RPC URL against. Falls
173
+ * back to the active network.
174
+ * @param wallet - Optional EVM wallet filter; when omitted the
175
+ * response includes every wallet that has ever redeemed against
176
+ * the vault.
177
+ * @param lookbackBlocks - How far back to scan for redemption logs.
178
+ * Defaults to the SDK's internal lookback when omitted.
179
+ * @returns The same array shape `getVaultRedemptionHistory` returns
180
+ * at the module level — historical redemption records, newest
181
+ * first.
182
+ *
183
+ * @example
184
+ * ```ts
185
+ * const history = await sdk.vaultsModule.getVaultRedemptionHistory({
186
+ * vault: '0xVault',
187
+ * chainId: 8453,
188
+ * wallet: '0xWallet',
189
+ * });
190
+ * ```
191
+ */
70
192
  getVaultRedemptionHistory({ vault, chainId, wallet, lookbackBlocks, }: {
71
193
  vault: IAddress;
72
194
  chainId?: IChainId;
73
195
  wallet?: IAddress;
74
196
  lookbackBlocks?: number;
75
197
  }): Promise<import("../../types").IVaultRedemptionHistoryItem[]>;
198
+ /**
199
+ *
200
+ */
76
201
  getVaultPositions({ vault, wallet, chainId, showAllVaults, solanaWallet, stellarWallet, options, }: {
77
202
  vault?: IAddress;
78
203
  wallet?: IAddress;
@@ -82,21 +207,38 @@ export declare class AugustVaults extends AugustBase {
82
207
  stellarWallet?: string;
83
208
  options?: IVaultBaseOptions;
84
209
  }): Promise<IVaultPosition[]>;
210
+ /**
211
+ *
212
+ */
85
213
  getUserHistory({ wallet, chainId, vault, }: {
86
214
  wallet: IAddress;
87
215
  chainId?: IChainId;
88
216
  vault?: IAddress;
89
217
  options?: IVaultBaseOptions;
90
218
  }): Promise<IVaultUserHistoryItem[]>;
219
+ /**
220
+ * Get lifetime PnL for a user in a specific vault.
221
+ * @param props Vault address, wallet address, and optional chain ID
222
+ * @returns Lifetime PnL data including realized and unrealized PnL
223
+ */
91
224
  getVaultUserLifetimePnl({ vault, wallet, chainId, }: {
92
225
  vault: IAddress;
93
226
  wallet: IAddress;
94
227
  chainId?: IChainId;
95
228
  }): Promise<import("../../types").IVaultUserLifetimePnl>;
229
+ /**
230
+ * Get PnL for a vault (vault-level, not user-specific).
231
+ * Returns the vault's overall profit and loss across all users.
232
+ * @param props Vault address and optional chain ID
233
+ * @returns Vault PnL in USD and notional value
234
+ */
96
235
  getVaultPnl({ vault, chainId, }: {
97
236
  vault: IAddress;
98
237
  chainId?: IChainId;
99
238
  }): Promise<import("../../types").IVaultPnl>;
239
+ /**
240
+ *
241
+ */
100
242
  getUserTransfers({ wallet, chainId, vault, options, }: {
101
243
  wallet: IAddress;
102
244
  chainId?: IChainId;
@@ -112,7 +254,19 @@ export declare class AugustVaults extends AugustBase {
112
254
  timestamp: number;
113
255
  transactionHash: string;
114
256
  }[]>;
257
+ /**
258
+ * @function getStakingPositions gets all available reward staking positions
259
+ * @param wallet optionally passed user wallet address
260
+ * @param chainId optionally passed chainId
261
+ * @returns all available staking positions for connected or passed network(s)
262
+ */
115
263
  getStakingPositions(wallet?: IAddress, chainId?: IChainId): Promise<import("../../types").IActiveStakingPosition[]>;
264
+ /**
265
+ * @function getVaultTvl gets the vault/pool TVL, both current and historical
266
+ * @param vault pool/vault contract address
267
+ * @param historical (optional) When passed, returns the historical records of the pool/vault TVL
268
+ * @returns an object or array of objects containing the TVL and timestamp
269
+ */
116
270
  getVaultTvl({ vault, chainId, historical, }: {
117
271
  vault: IAddress;
118
272
  chainId?: IChainId;
@@ -121,32 +275,157 @@ export declare class AugustVaults extends AugustBase {
121
275
  value: INormalizedNumber;
122
276
  timestamp: string;
123
277
  }[]>;
278
+ /**
279
+ * @function getYieldLastRealizedOn gets the timestamp when yield was last realized for a vault
280
+ * @param vault Vault contract address
281
+ * @param chainId Optional chain ID (uses active network if not provided)
282
+ * @returns Timestamp (Unix timestamp in seconds) when yield was last realized
283
+ */
124
284
  getYieldLastRealizedOn({ vault, chainId, }: {
125
285
  vault: IAddress;
126
286
  chainId?: IChainId;
127
287
  }): Promise<number>;
288
+ /**
289
+ * Gets borrower health-factor data for vaults on a chain, optionally
290
+ * scoped to a single vault.
291
+ *
292
+ * Pass `vault` whenever the caller knows which pool it cares about —
293
+ * this skips the all-vaults cross-chain fanout and only reads the loans
294
+ * for that one pool. The response map is keyed by **lowercased** vault
295
+ * address; look entries up with `address.toLowerCase()`.
296
+ *
297
+ * Individual loan failures (bad/test loan contracts, unrecognized
298
+ * borrowers) are isolated and logged rather than rejecting the batch.
299
+ *
300
+ * @param chainId Optional chain to scope the read to. When omitted,
301
+ * iterates the SDK's configured providers and returns the flattened
302
+ * list (legacy shape — prefer passing a chain).
303
+ * @param vault Optional vault address. When provided alongside
304
+ * `chainId`, only that vault's data is fetched.
305
+ * @returns When `chainId` is set, an object map of lowercased vault
306
+ * address → array of borrower-health-factor rows. When `chainId` is
307
+ * omitted, a flat array (legacy behavior, kept for backward compat).
308
+ */
128
309
  getVaultBorrowerHealthFactor(chainId?: IChainId, vault?: IAddress): Promise<Record<string, import("../../types").IVaultBorrowerHealthFactor[]> | Record<string, import("../../types").IVaultBorrowerHealthFactor[]>[]>;
310
+ /**
311
+ * @function getUserPoints fetches user points from the backend API
312
+ * @param userAddress User wallet address
313
+ * @returns Points data from the backend API
314
+ */
129
315
  getUserPoints(userAddress: IAddress): Promise<any>;
316
+ /**
317
+ * Register a user for the points program, authenticated by a wallet signature.
318
+ *
319
+ * The caller produces a personal_sign signature over a canonical message
320
+ * built from these primitives — see `registerUserForPoints` in
321
+ * `./getters` for the exact template and a worked example.
322
+ *
323
+ * @param userAddress EVM wallet address being registered.
324
+ * @param referrerAddress Optional referrer EVM address.
325
+ * @param chainId Chain on which the wallet signed; powers the EIP-1271
326
+ * fallback for smart-contract wallets and pins the signature cross-chain.
327
+ * @param signature 0x-prefixed hex personal_sign signature over the canonical message.
328
+ * @param nonce Single-use random string (8–128 chars).
329
+ * @param expiry Unix seconds; must be in the future, within the backend's TTL.
330
+ * @returns Raw `Response` from the backend.
331
+ */
130
332
  registerUserForPoints(userAddress: IAddress, referrerAddress: IAddress | undefined, chainId: number, signature: string, nonce: string, expiry: number): Promise<Response>;
333
+ /**
334
+ * @function fetchPointsLeaderboard fetches the points leaderboard data
335
+ * @param params Optional parameters for pagination and sorting
336
+ * @returns Leaderboard response data
337
+ */
131
338
  fetchPointsLeaderboard(params?: {
132
339
  page?: number;
133
340
  perPage?: number;
134
341
  sortBy?: 'streakDays' | 'totalPoints';
135
342
  }): Promise<any>;
343
+ /**
344
+ * Get annualized APY metrics for a vault.
345
+ *
346
+ * Supported Vaults: cUSDO, tETH, wstETH, rsETH
347
+ *
348
+ * @deprecated The `hgETH30dLiquidAPY` and `hgETH7dLiquidAPY` response fields are deprecated.
349
+ * These fields will be removed on 2026-01-01.
350
+ * Use `liquidAPY30Day` and `liquidAPY7Day` fields instead.
351
+ *
352
+ * @param vault Vault address
353
+ * @returns Annualized APY data including liquidity APY
354
+ */
136
355
  getVaultAnnualizedApy(vault: IAddress): Promise<import("../../types").IVaultAnnualizedApy>;
356
+ /**
357
+ * Get summary data for a vault (name, type, chain, recent returns).
358
+ * @param vault Vault address
359
+ * @returns Vault summary data
360
+ */
137
361
  getVaultSummary(vault: IAddress): Promise<import("../../types").IVaultSummary>;
362
+ /**
363
+ * Get withdrawal summary and pending queue for a vault.
364
+ * @param vault Vault address
365
+ * @param chainId Chain ID (will be converted to chain name)
366
+ * @returns Withdrawal summary and pending queue
367
+ */
138
368
  getVaultWithdrawals(vault: IAddress, chainId?: number): Promise<import("../../types").IVaultWithdrawals>;
369
+ /**
370
+ * Fetch pending redemptions for a vault with liquidity analysis.
371
+ * @param vault - Vault contract address
372
+ * @param pastDays - Number of past days to include (default 7, min 1, max 30)
373
+ * @param futureDays - Number of future days to include (default 14, min 1, max 30)
374
+ * @returns Pending redemptions grouped by date with liquidity summary
375
+ */
139
376
  getVaultPendingRedemptions({ vault, pastDays, futureDays, }: {
140
377
  vault: IAddress;
141
378
  pastDays?: number;
142
379
  futureDays?: number;
143
380
  }): Promise<import("../../types").IVaultPendingRedemptions>;
381
+ /**
382
+ * Preview the amount of assets that would be received for redeeming shares (queued redemption).
383
+ * @param vault Vault contract address
384
+ * @param sharesAmount Amount of shares to redeem (human-readable, raw bigint, or string)
385
+ * @param chainId Optional chain ID (uses active network if not provided)
386
+ * @returns The amount of assets as INormalizedNumber { normalized, raw }
387
+ */
144
388
  previewRedemption({ vault, sharesAmount, chainId, }: {
145
389
  vault: IAddress;
146
390
  sharesAmount: string | bigint | number;
147
391
  chainId?: IChainId;
148
392
  }): Promise<INormalizedNumber>;
393
+ /**
394
+ * Get all withdrawal requests for a vault with deterministic status tracking.
395
+ *
396
+ * Matches requests to processed events by `(receiver, claimableDate)` tuple.
397
+ *
398
+ * **Status values:**
399
+ * - `'processed'` — Matching `WithdrawalProcessed` event found on-chain.
400
+ * - `'ready_to_claim'` — Claimable date has passed, no processed event found yet.
401
+ * - `'pending'` — Claimable date is still in the future.
402
+ *
403
+ * **Lookback window:** Processed events are fetched from on-chain logs, which
404
+ * only cover a finite block range. Requests whose claimable date is older than
405
+ * this window with no matching processed event are excluded (assumed already
406
+ * processed). Use `lookbackBlocks` to widen or narrow the scan range.
407
+ *
408
+ * @param vault - Vault contract address
409
+ * @param receiver - Optional receiver address to filter by
410
+ * @param lookbackBlocks - Optional on-chain log lookback window in blocks.
411
+ * Defaults to chain-specific value (e.g. 150,000 for Ethereum, 3,456,000 for Monad).
412
+ * @param chainId - Optional chain id for the vault address
413
+ * @returns Array of withdrawal requests with status and claimable dates
414
+ */
149
415
  getWithdrawalRequestsWithStatus(vault: IAddress, receiver?: IAddress, lookbackBlocks?: number, chainId?: number): Promise<import("./getters").WithdrawalRequestStatus[]>;
416
+ /**
417
+ * Redeem vault shares for an underlying asset via instant redemption (RWA subaccount).
418
+ * Resolves the vault address to the RwaRedeemSubaccount internally.
419
+ * Handles vault share approval automatically.
420
+ * @param signer - Signer / wallet object
421
+ * @param vault - Vault contract address
422
+ * @param asset - Redeemable asset address (e.g. USDC, USDT)
423
+ * @param amount - Amount of vault shares to redeem
424
+ * @param minOut - Minimum output amount in output asset units (slippage protection)
425
+ * @param chainId - Optional chain ID (uses active network if not provided)
426
+ * @param wait - Wait for transaction confirmation
427
+ * @returns transaction hash
428
+ */
150
429
  rwaRedeemAsset(signer: Signer | Wallet, { vault, asset, amount, minOut, chainId, wait, }: {
151
430
  vault: IAddress;
152
431
  asset: IAddress;
@@ -155,6 +434,15 @@ export declare class AugustVaults extends AugustBase {
155
434
  chainId?: IChainId;
156
435
  wait?: boolean;
157
436
  }): Promise<string>;
437
+ /**
438
+ * Preview the output amount for an RWA instant redemption.
439
+ * Resolves the vault address to the RwaRedeemSubaccount internally.
440
+ * @param vault - Vault contract address
441
+ * @param asset - Redeemable asset address (e.g. USDC, USDT)
442
+ * @param amount - Amount of vault shares to preview
443
+ * @param chainId - Optional chain ID (uses active network if not provided)
444
+ * @returns normalized number of the expected output amount (in output asset decimals)
445
+ */
158
446
  previewRwaRedemption({ vault, asset, amount, chainId, }: {
159
447
  vault: IAddress;
160
448
  asset: IAddress;