upshift-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
@@ -0,0 +1,353 @@
1
+ import { type IContractWriteOptions, type INativeDepositOptions, type ApproveResult } from '../../modules/vaults/write.actions';
2
+ import type { ISwapAndDepositOptions, ISwapRouterDirectDepositOptions, ISwapRouterNativeDepositOptions, ISwapRouterDepositOptions, ISwapRouterDepositResultOptions } from '../../types';
3
+ import { type IPreviewDepositOptions, type IPreviewRedeemOptions, type IAllowanceOptions, type IBalanceOfOptions, type IMaxDepositOptions } from '../../modules/vaults/read.actions';
4
+ import { type CompatibleSigner } from '../../core/helpers/signer';
5
+ import type { IAddress } from '../../types';
6
+ export * from './getters';
7
+ /**
8
+ * EVM Adapter for August SDK
9
+ * Supports both ethers Signer/Wallet and wagmi/viem WalletClient
10
+ *
11
+ * @example
12
+ * To access the EVM adapter instance
13
+ * ```
14
+ * const sdk = new AugustSDK()
15
+ * sdk.evm.vaultRedeem()
16
+ * ```
17
+ */
18
+ declare class EVMAdapter {
19
+ private signer?;
20
+ private rawSigner?;
21
+ constructor(signer?: CompatibleSigner);
22
+ /**
23
+ * Set a new signer (supports both ethers and viem/wagmi)
24
+ * @param signer - Either an ethers Signer/Wallet or viem WalletClient
25
+ */
26
+ setSigner(signer: CompatibleSigner): void;
27
+ /**
28
+ * Get the normalized ethers-compatible signer
29
+ * Converts viem WalletClient to ethers Signer if needed
30
+ */
31
+ private getSigner;
32
+ vaultApprove(options: IContractWriteOptions): Promise<string>;
33
+ /**
34
+ * Approve a vault to spend a deposit token, returning a discriminated
35
+ * {@link ApproveResult} so callers can tell `sent` from `sufficient`
36
+ * (existing allowance covers) and `native` (no allowance applies).
37
+ * Prefer this over {@link vaultApprove} for new integrations.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const r = await augustSdk.evm.approve({
42
+ * target: vaultAddress,
43
+ * wallet: walletAddress,
44
+ * amount: '100',
45
+ * wait: true,
46
+ * });
47
+ * if (r.kind === 'sent') console.log('approve tx', r.hash);
48
+ * ```
49
+ */
50
+ approve(options: IContractWriteOptions): Promise<ApproveResult>;
51
+ /**
52
+ * Read the ERC-20 allowance the wallet has granted the vault to spend its
53
+ * underlying asset, returned as a normalized number. For the newer typed
54
+ * read that returns a raw `bigint` and accepts an explicit `asset` override,
55
+ * use {@link EVMAdapter.allowance}.
56
+ *
57
+ * Only `target` (vault address) and `wallet` are read from `options`; the
58
+ * remaining {@link IContractWriteOptions} fields are ignored.
59
+ *
60
+ * @param options - `{ target, wallet }` (other fields ignored).
61
+ * @returns Normalized allowance (`{ raw, normalized }`), or `undefined` when
62
+ * `target` / `wallet` fail address validation.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * const a = await augustSdk.evm.vaultAllowance({
67
+ * target: vaultAddress,
68
+ * wallet: walletAddress,
69
+ * });
70
+ * console.log(a?.normalized);
71
+ * ```
72
+ */
73
+ vaultAllowance(options: IContractWriteOptions): Promise<import("../../types").INormalizedNumber>;
74
+ /**
75
+ * Deposit into an August vault. Routes automatically: V1 single-asset vaults
76
+ * deposit the underlying directly; V2 multi-asset vaults route through the
77
+ * adapter for non-underlying `depositAsset`. If allowance is insufficient
78
+ * the method submits an approve transaction first (the approve step always
79
+ * waits for confirmation to close a race window, regardless of `wait`).
80
+ *
81
+ * @param options - {@link IContractWriteOptions}. `target` and `wallet` are
82
+ * required; pass `amount`, `depositAsset` (defaults to the vault's
83
+ * underlying), `chainId`, `poolName`, `wait`, and `isDepositWithPermit`
84
+ * as needed.
85
+ * @returns The deposit `TransactionResponse`, or `undefined` if an
86
+ * approval-only path was taken and no deposit transaction was sent.
87
+ * @throws AugustValidationError on invalid inputs (bad address, bad amount).
88
+ * @throws AugustSDKError on RPC / contract revert during the deposit.
89
+ *
90
+ * @example
91
+ * ```ts
92
+ * const tx = await augustSdk.evm.vaultDeposit({
93
+ * target: vaultAddress,
94
+ * wallet: walletAddress,
95
+ * amount: '100',
96
+ * wait: true,
97
+ * });
98
+ * ```
99
+ */
100
+ vaultDeposit(options: IContractWriteOptions): Promise<string>;
101
+ /**
102
+ * Submit a redemption request against a vault. Shares are escrowed and the
103
+ * underlying assets are released asynchronously by the protocol; callers
104
+ * collect the matured assets via {@link EVMAdapter.vaultRedeem}, or use the
105
+ * instant-redeem variant by setting `isInstantRedeem: true`.
106
+ *
107
+ * @param options - {@link IContractWriteOptions}. `target`, `wallet`, and
108
+ * `amount` (in shares) are required. Set `isInstantRedeem: true` to take
109
+ * the instant-redeem path when the vault supports it.
110
+ * @returns The request `TransactionResponse`, or `undefined` if the request
111
+ * could not be built (validation failure).
112
+ * @throws AugustValidationError on invalid inputs.
113
+ * @throws AugustSDKError on RPC / contract revert.
114
+ *
115
+ * @example
116
+ * ```ts
117
+ * const tx = await augustSdk.evm.vaultRequestRedeem({
118
+ * target: vaultAddress,
119
+ * wallet: walletAddress,
120
+ * amount: shareAmount,
121
+ * wait: true,
122
+ * });
123
+ * ```
124
+ */
125
+ vaultRequestRedeem(options: IContractWriteOptions): Promise<string>;
126
+ /**
127
+ * Deposit the chain's native asset (ETH / AVAX / etc.) into a vault by
128
+ * routing through the `MultiAssetNativeDepositWrapper`. The wrapper handles
129
+ * native-to-wrapped conversion and the subsequent vault deposit in a single
130
+ * transaction.
131
+ *
132
+ * @param options - {@link INativeDepositOptions}: `wrapperAddress`, `amount`
133
+ * (native, scaled by the chain's native decimals), optional `receiver`
134
+ * (defaults to the signer), and optional `wait`.
135
+ * @returns The deposit `TransactionResponse`.
136
+ * @throws AugustValidationError on invalid inputs.
137
+ * @throws AugustSDKError on RPC / contract revert.
138
+ *
139
+ * @example
140
+ * ```ts
141
+ * const tx = await augustSdk.evm.depositNative({
142
+ * wrapperAddress: nativeWrapperAddress,
143
+ * amount: parseEther('1'),
144
+ * wait: true,
145
+ * });
146
+ * ```
147
+ */
148
+ depositNative(options: INativeDepositOptions): Promise<string>;
149
+ /**
150
+ * Swap one or more whitelisted ERC-20s into a vault's reference asset via
151
+ * the on-chain `SwapRouter` and deposit the proceeds. The router handles
152
+ * fee accrual, slippage protection, and the v1/v3 vs v2 deposit-interface
153
+ * branching. Approval is sent automatically for each `swaps[i].tokenIn`
154
+ * when the caller's allowance against the SwapRouter is below `amountIn`.
155
+ *
156
+ * @param options - {@link ISwapAndDepositOptions}.
157
+ * @returns The transaction hash of the `swapAndDeposit` call.
158
+ * @throws AugustValidationError on invalid inputs (bad chain, empty swaps).
159
+ * @throws AugustSDKError on RPC / contract revert.
160
+ *
161
+ * @example
162
+ * ```ts
163
+ * const quote = await fetchSwapQuote({
164
+ * chainId: 1, srcToken: WBTC, srcDecimals: 8,
165
+ * destToken: USDC, destDecimals: 6, amount: 100_000_000n,
166
+ * receiver: SWAP_ROUTER_ADDRESSES[1]!,
167
+ * });
168
+ * const hash = await augustSdk.evm.swapAndDeposit({
169
+ * chainId: 1, vault, receiver: wallet,
170
+ * swaps: [{ tokenIn: WBTC, tokenOut: USDC, amountIn: 100_000_000n,
171
+ * minAmountOut: quote.minAmountOut, router: quote.router, payload: quote.payload }],
172
+ * });
173
+ * ```
174
+ */
175
+ swapAndDeposit(options: ISwapAndDepositOptions): Promise<string>;
176
+ /**
177
+ * Deposit a vault's reference asset through the SwapRouter — no swap.
178
+ * Use this when the caller already holds the reference asset but wants
179
+ * the origin/referral fee accounting that the SwapRouter path provides.
180
+ *
181
+ * @param options - {@link ISwapRouterDirectDepositOptions}.
182
+ * @returns The transaction hash of the `deposit` call.
183
+ */
184
+ depositViaSwapRouter(options: ISwapRouterDirectDepositOptions): Promise<string>;
185
+ /**
186
+ * Deposit native ETH (or chain-native equivalent) into a vault via the
187
+ * SwapRouter. Only valid when the vault's reference asset is the chain's
188
+ * wrapped-native token — the SwapRouter wraps `amount` and deposits.
189
+ *
190
+ * @param options - {@link ISwapRouterNativeDepositOptions}.
191
+ * @returns The transaction hash of the `depositNativeToken` call.
192
+ */
193
+ depositNativeViaSwapRouter(options: ISwapRouterNativeDepositOptions): Promise<string>;
194
+ /**
195
+ * Deposit into a vault through the on-chain `SwapRouter`, choosing the router
196
+ * path from `depositAsset` (direct deposit, native wrap, or a swap to the
197
+ * reference asset). The high-level, explicit counterpart to the SwapRouter
198
+ * branch inside {@link vaultDeposit} — the caller opts into the router
199
+ * deliberately, so a native-deposit vault is never accidentally swapped.
200
+ *
201
+ * Reads the vault's reference asset + decimals on-chain, resolves the swap
202
+ * quote and fail-closes on aggregator/whitelist drift, and sends the ERC-20
203
+ * approval to the SwapRouter when allowance is short.
204
+ *
205
+ * @param options - {@link ISwapRouterDepositOptions}.
206
+ * @returns The transaction hash of the router deposit call.
207
+ * @throws AugustValidationError on unsupported chain, invalid address, zero
208
+ * amount, a native deposit into a non-wrapped-native vault, or quote drift.
209
+ * @example
210
+ * ```ts
211
+ * const hash = await augustSdk.evm.swapRouterDeposit({
212
+ * chainId: 1, vault, depositAsset: USDT, amount: '100', slippageBps: 50,
213
+ * });
214
+ * ```
215
+ */
216
+ swapRouterDeposit(options: ISwapRouterDepositOptions): Promise<string>;
217
+ /**
218
+ * Resolves the real, post-execution outcome of a SwapRouter deposit from
219
+ * its mined receipt — the actual amount that reached the vault (and shares
220
+ * minted), decoded from the vault's own `Deposit` event, rather than the
221
+ * pre-trade quote shown before submission.
222
+ *
223
+ * @param options - {@link ISwapRouterDepositResultOptions}.
224
+ * @returns The decoded {@link ISwapRouterDepositResult}, or `null` if the
225
+ * receipt isn't found yet or carries no matching `Deposit` log.
226
+ * @example
227
+ * ```ts
228
+ * const hash = await augustSdk.evm.swapRouterDeposit({ ... });
229
+ * const result = await augustSdk.evm.getSwapRouterDepositResult({ txHash: hash, vault });
230
+ * ```
231
+ */
232
+ getSwapRouterDepositResult(options: ISwapRouterDepositResultOptions): Promise<import("../../types").ISwapRouterDepositResult>;
233
+ /**
234
+ * Claim assets from a matured redemption request on a dated-redemption
235
+ * (RWA-style) vault. The `year`, `month`, `day`, and `receiverIndex` tuple
236
+ * identifies which batch of the user's matured requests to redeem from —
237
+ * these are emitted at request-time and indexed by the subgraph.
238
+ *
239
+ * For non-dated vaults that complete their redemption via `instantRedeem`,
240
+ * see {@link EVMAdapter.vaultRequestRedeem} with `isInstantRedeem: true`.
241
+ *
242
+ * @param options - {@link IContractWriteOptions} plus `year` / `month` /
243
+ * `day` / `receiverIndex` identifying the matured batch to claim.
244
+ * @returns The redeem `TransactionResponse`.
245
+ * @throws AugustValidationError on invalid inputs.
246
+ * @throws AugustSDKError on RPC / contract revert.
247
+ *
248
+ * @example
249
+ * ```ts
250
+ * const tx = await augustSdk.evm.vaultRedeem({
251
+ * target: vaultAddress,
252
+ * wallet: walletAddress,
253
+ * amount: shareAmount,
254
+ * year: '2026',
255
+ * month: '06',
256
+ * day: '02',
257
+ * receiverIndex: '0',
258
+ * wait: true,
259
+ * });
260
+ * ```
261
+ */
262
+ vaultRedeem(options: IContractWriteOptions & {
263
+ year: string;
264
+ month: string;
265
+ day: string;
266
+ receiverIndex: string;
267
+ }): Promise<string>;
268
+ sendersWhitelistAddress(options: {
269
+ vault: IAddress;
270
+ }): Promise<`0x${string}`>;
271
+ isWhitelisted(options: {
272
+ whitelist: IAddress;
273
+ wallet: IAddress;
274
+ }): Promise<boolean>;
275
+ getDeposited(options: {
276
+ whitelist: IAddress;
277
+ wallet: IAddress;
278
+ vault: IAddress;
279
+ }): Promise<import("../../types").INormalizedNumber>;
280
+ getRemainingAllocations(options: {
281
+ whitelist: IAddress;
282
+ wallet: IAddress;
283
+ vault: IAddress;
284
+ depositCapAmount?: bigint;
285
+ }): Promise<import("../../types").INormalizedNumber>;
286
+ /**
287
+ * Preview the share output of a deposit without broadcasting a transaction.
288
+ * See {@link readPreviewDeposit} for the routing details (EVM-1 vs EVM-2
289
+ * multi-asset vaults).
290
+ *
291
+ * @returns Shares minted in raw on-chain units (share-token decimals).
292
+ *
293
+ * @example
294
+ * ```ts
295
+ * const shares = await augustSdk.evm.previewDeposit({
296
+ * vault: '0x...',
297
+ * amount: 1_000_000n,
298
+ * });
299
+ * ```
300
+ */
301
+ previewDeposit(options: IPreviewDepositOptions): Promise<bigint>;
302
+ /**
303
+ * Preview the assets returned by redeeming a number of shares, without
304
+ * broadcasting a transaction.
305
+ *
306
+ * @returns Assets returned in raw on-chain units (asset decimals).
307
+ *
308
+ * @example
309
+ * ```ts
310
+ * const assets = await augustSdk.evm.previewRedeem({
311
+ * vault: '0x...',
312
+ * shares: 1_000_000_000_000_000_000n,
313
+ * });
314
+ * ```
315
+ */
316
+ previewRedeem(options: IPreviewRedeemOptions): Promise<bigint>;
317
+ /**
318
+ * Read the ERC-20 allowance an owner has granted the vault. Defaults to the
319
+ * vault's underlying asset; pass `asset` to override.
320
+ *
321
+ * @returns Allowance as a raw `bigint`.
322
+ *
323
+ * @example
324
+ * ```ts
325
+ * const raw = await augustSdk.evm.allowance({ vault, owner });
326
+ * ```
327
+ */
328
+ allowance(options: IAllowanceOptions): Promise<bigint>;
329
+ /**
330
+ * Read an ERC-20 token balance.
331
+ *
332
+ * @returns Balance as a raw `bigint`.
333
+ *
334
+ * @example
335
+ * ```ts
336
+ * const raw = await augustSdk.evm.balanceOf({ asset: usdcAddress, owner });
337
+ * ```
338
+ */
339
+ balanceOf(options: IBalanceOfOptions): Promise<bigint>;
340
+ /**
341
+ * Read the maximum deposit accepted by the vault for the supplied
342
+ * receiver. Useful for "vault is full" gates.
343
+ *
344
+ * @returns Max deposit as a raw `bigint`.
345
+ *
346
+ * @example
347
+ * ```ts
348
+ * const cap = await augustSdk.evm.maxDeposit({ vault });
349
+ * ```
350
+ */
351
+ maxDeposit(options: IMaxDepositOptions): Promise<bigint>;
352
+ }
353
+ export default EVMAdapter;