augustdigital-sdk 8.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +349 -0
  3. package/lib/abis/AddressResolver.d.ts +28 -0
  4. package/lib/abis/AddressResolver.js +23 -0
  5. package/lib/abis/ChainlinkV3.d.ts +87 -0
  6. package/lib/abis/ChainlinkV3.js +117 -0
  7. package/lib/abis/ERC20.d.ts +168 -0
  8. package/lib/abis/ERC20.js +226 -0
  9. package/lib/abis/ERC20_Bytes32.d.ts +139 -0
  10. package/lib/abis/ERC20_Bytes32.js +196 -0
  11. package/lib/abis/ERC4626.d.ts +364 -0
  12. package/lib/abis/ERC4626.js +507 -0
  13. package/lib/abis/ERC721.d.ts +231 -0
  14. package/lib/abis/ERC721.js +321 -0
  15. package/lib/abis/FeeOracle.d.ts +120 -0
  16. package/lib/abis/FeeOracle.js +162 -0
  17. package/lib/abis/LendingPool.d.ts +1393 -0
  18. package/lib/abis/LendingPool.js +1807 -0
  19. package/lib/abis/LendingPoolV2.d.ts +1413 -0
  20. package/lib/abis/LendingPoolV2.js +1833 -0
  21. package/lib/abis/LendingPoolV3.d.ts +1677 -0
  22. package/lib/abis/LendingPoolV3.js +1160 -0
  23. package/lib/abis/Loan.d.ts +837 -0
  24. package/lib/abis/Loan.js +1080 -0
  25. package/lib/abis/MultiAssetNativeDepositWrapper.d.ts +137 -0
  26. package/lib/abis/MultiAssetNativeDepositWrapper.js +125 -0
  27. package/lib/abis/Multicall3.d.ts +30 -0
  28. package/lib/abis/Multicall3.js +97 -0
  29. package/lib/abis/OFT.d.ts +116 -0
  30. package/lib/abis/OFT.js +85 -0
  31. package/lib/abis/PoolAdapter.d.ts +36 -0
  32. package/lib/abis/PoolAdapter.js +51 -0
  33. package/lib/abis/RewardDistributor.d.ts +267 -0
  34. package/lib/abis/RewardDistributor.js +352 -0
  35. package/lib/abis/RwaRedeemSubaccount.d.ts +747 -0
  36. package/lib/abis/RwaRedeemSubaccount.js +548 -0
  37. package/lib/abis/SmartAccount.d.ts +17 -0
  38. package/lib/abis/SmartAccount.js +19 -0
  39. package/lib/abis/SwapRouter.d.ts +1043 -0
  40. package/lib/abis/SwapRouter.js +740 -0
  41. package/lib/abis/TextResolver.d.ts +16 -0
  42. package/lib/abis/TextResolver.js +16 -0
  43. package/lib/abis/TokenizedVaultV2.d.ts +1364 -0
  44. package/lib/abis/TokenizedVaultV2.js +1041 -0
  45. package/lib/abis/TokenizedVaultV2DepositWithPermit.d.ts +1456 -0
  46. package/lib/abis/TokenizedVaultV2DepositWithPermit.js +1878 -0
  47. package/lib/abis/TokenizedVaultV2Receipt.d.ts +1568 -0
  48. package/lib/abis/TokenizedVaultV2Receipt.js +1061 -0
  49. package/lib/abis/TokenizedVaultV2SenderAllocationWhitelist.d.ts +454 -0
  50. package/lib/abis/TokenizedVaultV2SenderAllocationWhitelist.js +327 -0
  51. package/lib/abis/TokenizedVaultV2WhitelistedAllocation.d.ts +1466 -0
  52. package/lib/abis/TokenizedVaultV2WhitelistedAllocation.js +1092 -0
  53. package/lib/abis/TokenizedVaultV2WhitelistedAssets.d.ts +274 -0
  54. package/lib/abis/TokenizedVaultV2WhitelistedAssets.js +167 -0
  55. package/lib/abis/UniversalResolverResolve.d.ts +69 -0
  56. package/lib/abis/UniversalResolverResolve.js +35 -0
  57. package/lib/abis/UniversalSignatureValidator.d.ts +17 -0
  58. package/lib/abis/UniversalSignatureValidator.js +30 -0
  59. package/lib/abis/WrapperAdapter.d.ts +71 -0
  60. package/lib/abis/WrapperAdapter.js +77 -0
  61. package/lib/abis/index.d.ts +34 -0
  62. package/lib/abis/index.js +51 -0
  63. package/lib/adapters/evm/getters.d.ts +19 -0
  64. package/lib/adapters/evm/getters.js +209 -0
  65. package/lib/adapters/evm/index.d.ts +353 -0
  66. package/lib/adapters/evm/index.js +434 -0
  67. package/lib/adapters/evm/utils.d.ts +8 -0
  68. package/lib/adapters/evm/utils.js +51 -0
  69. package/lib/adapters/solana/constants.d.ts +33 -0
  70. package/lib/adapters/solana/constants.js +52 -0
  71. package/lib/adapters/solana/getters.d.ts +11 -0
  72. package/lib/adapters/solana/getters.js +165 -0
  73. package/lib/adapters/solana/idl/vault-idl.d.ts +272 -0
  74. package/lib/adapters/solana/idl/vault-idl.js +1084 -0
  75. package/lib/adapters/solana/index.d.ts +233 -0
  76. package/lib/adapters/solana/index.js +291 -0
  77. package/lib/adapters/solana/types.d.ts +67 -0
  78. package/lib/adapters/solana/types.js +3 -0
  79. package/lib/adapters/solana/utils.d.ts +141 -0
  80. package/lib/adapters/solana/utils.js +595 -0
  81. package/lib/adapters/solana/vault.actions.d.ts +57 -0
  82. package/lib/adapters/solana/vault.actions.js +379 -0
  83. package/lib/adapters/stellar/actions.d.ts +28 -0
  84. package/lib/adapters/stellar/actions.js +77 -0
  85. package/lib/adapters/stellar/constants.d.ts +43 -0
  86. package/lib/adapters/stellar/constants.js +53 -0
  87. package/lib/adapters/stellar/getters.d.ts +68 -0
  88. package/lib/adapters/stellar/getters.js +290 -0
  89. package/lib/adapters/stellar/index.d.ts +114 -0
  90. package/lib/adapters/stellar/index.js +175 -0
  91. package/lib/adapters/stellar/soroban.d.ts +123 -0
  92. package/lib/adapters/stellar/soroban.js +613 -0
  93. package/lib/adapters/stellar/submit.d.ts +34 -0
  94. package/lib/adapters/stellar/submit.js +149 -0
  95. package/lib/adapters/stellar/types.d.ts +58 -0
  96. package/lib/adapters/stellar/types.js +6 -0
  97. package/lib/adapters/stellar/utils.d.ts +24 -0
  98. package/lib/adapters/stellar/utils.js +34 -0
  99. package/lib/adapters/sui/constants.d.ts +14 -0
  100. package/lib/adapters/sui/constants.js +29 -0
  101. package/lib/adapters/sui/getters.d.ts +9 -0
  102. package/lib/adapters/sui/getters.js +60 -0
  103. package/lib/adapters/sui/index.d.ts +45 -0
  104. package/lib/adapters/sui/index.js +101 -0
  105. package/lib/adapters/sui/transformer.d.ts +10 -0
  106. package/lib/adapters/sui/transformer.js +107 -0
  107. package/lib/adapters/sui/types.d.ts +66 -0
  108. package/lib/adapters/sui/types.js +3 -0
  109. package/lib/adapters/sui/utils.d.ts +10 -0
  110. package/lib/adapters/sui/utils.js +29 -0
  111. package/lib/core/analytics/chain-name.d.ts +9 -0
  112. package/lib/core/analytics/chain-name.js +34 -0
  113. package/lib/core/analytics/constants.d.ts +5 -0
  114. package/lib/core/analytics/constants.js +9 -0
  115. package/lib/core/analytics/env.d.ts +29 -0
  116. package/lib/core/analytics/env.js +59 -0
  117. package/lib/core/analytics/index.d.ts +36 -0
  118. package/lib/core/analytics/index.js +79 -0
  119. package/lib/core/analytics/instrumentation.d.ts +29 -0
  120. package/lib/core/analytics/instrumentation.js +277 -0
  121. package/lib/core/analytics/method-taxonomy.d.ts +19 -0
  122. package/lib/core/analytics/method-taxonomy.js +128 -0
  123. package/lib/core/analytics/metrics.d.ts +33 -0
  124. package/lib/core/analytics/metrics.js +116 -0
  125. package/lib/core/analytics/sanitize.d.ts +44 -0
  126. package/lib/core/analytics/sanitize.js +260 -0
  127. package/lib/core/analytics/sentry-runtime.d.ts +15 -0
  128. package/lib/core/analytics/sentry-runtime.js +97 -0
  129. package/lib/core/analytics/sentry.d.ts +67 -0
  130. package/lib/core/analytics/sentry.js +613 -0
  131. package/lib/core/analytics/types.d.ts +48 -0
  132. package/lib/core/analytics/types.js +3 -0
  133. package/lib/core/analytics/user-identity.d.ts +41 -0
  134. package/lib/core/analytics/user-identity.js +141 -0
  135. package/lib/core/analytics/version.d.ts +6 -0
  136. package/lib/core/analytics/version.js +10 -0
  137. package/lib/core/attribution.d.ts +111 -0
  138. package/lib/core/attribution.js +142 -0
  139. package/lib/core/auth/index.d.ts +1 -0
  140. package/lib/core/auth/index.js +18 -0
  141. package/lib/core/auth/verify.d.ts +2 -0
  142. package/lib/core/auth/verify.js +31 -0
  143. package/lib/core/base.class.d.ts +152 -0
  144. package/lib/core/base.class.js +172 -0
  145. package/lib/core/cache.d.ts +9 -0
  146. package/lib/core/cache.js +31 -0
  147. package/lib/core/constants/adapters.d.ts +103 -0
  148. package/lib/core/constants/adapters.js +180 -0
  149. package/lib/core/constants/core.d.ts +133 -0
  150. package/lib/core/constants/core.js +209 -0
  151. package/lib/core/constants/swap-router.d.ts +150 -0
  152. package/lib/core/constants/swap-router.js +169 -0
  153. package/lib/core/constants/vaults.d.ts +93 -0
  154. package/lib/core/constants/vaults.js +273 -0
  155. package/lib/core/constants/web3.d.ts +91 -0
  156. package/lib/core/constants/web3.js +229 -0
  157. package/lib/core/errors/index.d.ts +114 -0
  158. package/lib/core/errors/index.js +183 -0
  159. package/lib/core/fetcher.d.ts +198 -0
  160. package/lib/core/fetcher.js +903 -0
  161. package/lib/core/helpers/adapters.d.ts +13 -0
  162. package/lib/core/helpers/adapters.js +39 -0
  163. package/lib/core/helpers/chain-address.d.ts +13 -0
  164. package/lib/core/helpers/chain-address.js +47 -0
  165. package/lib/core/helpers/chain-error.d.ts +207 -0
  166. package/lib/core/helpers/chain-error.js +682 -0
  167. package/lib/core/helpers/chain-support.d.ts +80 -0
  168. package/lib/core/helpers/chain-support.js +115 -0
  169. package/lib/core/helpers/core.d.ts +68 -0
  170. package/lib/core/helpers/core.js +285 -0
  171. package/lib/core/helpers/explorer-link.d.ts +16 -0
  172. package/lib/core/helpers/explorer-link.js +26 -0
  173. package/lib/core/helpers/multicall.d.ts +68 -0
  174. package/lib/core/helpers/multicall.js +103 -0
  175. package/lib/core/helpers/revert-decode.d.ts +248 -0
  176. package/lib/core/helpers/revert-decode.js +515 -0
  177. package/lib/core/helpers/signer.d.ts +52 -0
  178. package/lib/core/helpers/signer.js +145 -0
  179. package/lib/core/helpers/swap-router.d.ts +211 -0
  180. package/lib/core/helpers/swap-router.js +480 -0
  181. package/lib/core/helpers/vault-version.d.ts +23 -0
  182. package/lib/core/helpers/vault-version.js +75 -0
  183. package/lib/core/helpers/vaults.d.ts +89 -0
  184. package/lib/core/helpers/vaults.js +235 -0
  185. package/lib/core/helpers/web3.d.ts +353 -0
  186. package/lib/core/helpers/web3.js +992 -0
  187. package/lib/core/index.d.ts +23 -0
  188. package/lib/core/index.js +40 -0
  189. package/lib/core/logger/index.d.ts +98 -0
  190. package/lib/core/logger/index.js +144 -0
  191. package/lib/core/logger/slack.d.ts +16 -0
  192. package/lib/core/logger/slack.js +57 -0
  193. package/lib/core/vault-metadata.d.ts +12 -0
  194. package/lib/core/vault-metadata.js +42 -0
  195. package/lib/core/version-check.d.ts +58 -0
  196. package/lib/core/version-check.js +182 -0
  197. package/lib/evm/index.d.ts +2 -0
  198. package/lib/evm/index.js +19 -0
  199. package/lib/evm/methods/crossChainVault.d.ts +128 -0
  200. package/lib/evm/methods/crossChainVault.js +853 -0
  201. package/lib/evm/methods/crossChainVaultRegistry.d.ts +93 -0
  202. package/lib/evm/methods/crossChainVaultRegistry.js +240 -0
  203. package/lib/evm/methods/index.d.ts +2 -0
  204. package/lib/evm/methods/index.js +19 -0
  205. package/lib/evm/types/crossChain.d.ts +363 -0
  206. package/lib/evm/types/crossChain.js +20 -0
  207. package/lib/evm/types/index.d.ts +1 -0
  208. package/lib/evm/types/index.js +18 -0
  209. package/lib/index.d.ts +30 -0
  210. package/lib/index.js +52 -0
  211. package/lib/main.d.ts +527 -0
  212. package/lib/main.js +601 -0
  213. package/lib/modules/api/fetcher.d.ts +82 -0
  214. package/lib/modules/api/fetcher.js +150 -0
  215. package/lib/modules/api/index.d.ts +1 -0
  216. package/lib/modules/api/index.js +6 -0
  217. package/lib/modules/api/main.d.ts +313 -0
  218. package/lib/modules/api/main.js +479 -0
  219. package/lib/modules/sub-accounts/fetcher.d.ts +53 -0
  220. package/lib/modules/sub-accounts/fetcher.js +120 -0
  221. package/lib/modules/sub-accounts/index.d.ts +2 -0
  222. package/lib/modules/sub-accounts/index.js +19 -0
  223. package/lib/modules/sub-accounts/main.d.ts +243 -0
  224. package/lib/modules/sub-accounts/main.js +205 -0
  225. package/lib/modules/sub-accounts/utils.d.ts +106 -0
  226. package/lib/modules/sub-accounts/utils.js +112 -0
  227. package/lib/modules/vaults/adapter.helpers.d.ts +64 -0
  228. package/lib/modules/vaults/adapter.helpers.js +184 -0
  229. package/lib/modules/vaults/fetcher.d.ts +147 -0
  230. package/lib/modules/vaults/fetcher.js +368 -0
  231. package/lib/modules/vaults/getters.d.ts +570 -0
  232. package/lib/modules/vaults/getters.js +3051 -0
  233. package/lib/modules/vaults/index.d.ts +20 -0
  234. package/lib/modules/vaults/index.js +44 -0
  235. package/lib/modules/vaults/main.d.ts +601 -0
  236. package/lib/modules/vaults/main.js +1623 -0
  237. package/lib/modules/vaults/prefetch.d.ts +65 -0
  238. package/lib/modules/vaults/prefetch.js +120 -0
  239. package/lib/modules/vaults/read.actions.d.ts +225 -0
  240. package/lib/modules/vaults/read.actions.js +596 -0
  241. package/lib/modules/vaults/types.d.ts +71 -0
  242. package/lib/modules/vaults/types.js +3 -0
  243. package/lib/modules/vaults/utils/call-data-decoder.d.ts +61 -0
  244. package/lib/modules/vaults/utils/call-data-decoder.js +194 -0
  245. package/lib/modules/vaults/utils/date-utils.d.ts +50 -0
  246. package/lib/modules/vaults/utils/date-utils.js +84 -0
  247. package/lib/modules/vaults/utils.d.ts +140 -0
  248. package/lib/modules/vaults/utils.js +799 -0
  249. package/lib/modules/vaults/write.actions.d.ts +529 -0
  250. package/lib/modules/vaults/write.actions.js +1749 -0
  251. package/lib/polyfills.d.ts +1 -0
  252. package/lib/polyfills.js +12 -0
  253. package/lib/sdk.d.ts +26721 -0
  254. package/lib/services/coingecko/fetcher.d.ts +15 -0
  255. package/lib/services/coingecko/fetcher.js +67 -0
  256. package/lib/services/coingecko/index.d.ts +2 -0
  257. package/lib/services/coingecko/index.js +19 -0
  258. package/lib/services/coingecko/utils.d.ts +1 -0
  259. package/lib/services/coingecko/utils.js +24 -0
  260. package/lib/services/debank/fetcher.d.ts +126 -0
  261. package/lib/services/debank/fetcher.js +47 -0
  262. package/lib/services/debank/index.d.ts +2 -0
  263. package/lib/services/debank/index.js +19 -0
  264. package/lib/services/debank/utils.d.ts +38 -0
  265. package/lib/services/debank/utils.js +297 -0
  266. package/lib/services/layerzero/deposits.d.ts +49 -0
  267. package/lib/services/layerzero/deposits.js +166 -0
  268. package/lib/services/layerzero/redeems.d.ts +20 -0
  269. package/lib/services/layerzero/redeems.js +92 -0
  270. package/lib/services/layerzero/utils.d.ts +9 -0
  271. package/lib/services/layerzero/utils.js +22 -0
  272. package/lib/services/octavfi/fetcher.d.ts +9 -0
  273. package/lib/services/octavfi/fetcher.js +103 -0
  274. package/lib/services/octavfi/index.d.ts +3 -0
  275. package/lib/services/octavfi/index.js +20 -0
  276. package/lib/services/octavfi/types.d.ts +34 -0
  277. package/lib/services/octavfi/types.js +3 -0
  278. package/lib/services/octavfi/utils.d.ts +16 -0
  279. package/lib/services/octavfi/utils.js +212 -0
  280. package/lib/services/subgraph/fetcher.d.ts +2 -0
  281. package/lib/services/subgraph/fetcher.js +61 -0
  282. package/lib/services/subgraph/index.d.ts +2 -0
  283. package/lib/services/subgraph/index.js +19 -0
  284. package/lib/services/subgraph/schema.d.ts +45 -0
  285. package/lib/services/subgraph/schema.js +75 -0
  286. package/lib/services/subgraph/vaults.d.ts +25 -0
  287. package/lib/services/subgraph/vaults.js +1106 -0
  288. package/lib/services/swap-quotes/index.d.ts +105 -0
  289. package/lib/services/swap-quotes/index.js +77 -0
  290. package/lib/services/swap-quotes/paraswap.d.ts +51 -0
  291. package/lib/services/swap-quotes/paraswap.js +138 -0
  292. package/lib/types/api.d.ts +280 -0
  293. package/lib/types/api.js +3 -0
  294. package/lib/types/index.d.ts +12 -0
  295. package/lib/types/index.js +28 -0
  296. package/lib/types/points.d.ts +28 -0
  297. package/lib/types/points.js +3 -0
  298. package/lib/types/pools.d.ts +144 -0
  299. package/lib/types/pools.js +3 -0
  300. package/lib/types/staking.d.ts +28 -0
  301. package/lib/types/staking.js +3 -0
  302. package/lib/types/sub-accounts.d.ts +140 -0
  303. package/lib/types/sub-accounts.js +3 -0
  304. package/lib/types/subgraph.d.ts +74 -0
  305. package/lib/types/subgraph.js +3 -0
  306. package/lib/types/typed-contract.d.ts +102 -0
  307. package/lib/types/typed-contract.js +3 -0
  308. package/lib/types/user.d.ts +1 -0
  309. package/lib/types/user.js +3 -0
  310. package/lib/types/vaults.d.ts +714 -0
  311. package/lib/types/vaults.js +24 -0
  312. package/lib/types/web3.d.ts +51 -0
  313. package/lib/types/web3.js +14 -0
  314. package/lib/types/webserver.d.ts +698 -0
  315. package/lib/types/webserver.js +3 -0
  316. package/package.json +78 -0
@@ -0,0 +1,548 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RWA_REDEEM_SUBACCOUNT = void 0;
4
+ exports.RWA_REDEEM_SUBACCOUNT = [
5
+ {
6
+ inputs: [
7
+ { internalType: 'address', name: '_vault', type: 'address' },
8
+ { internalType: 'address', name: '_referenceAsset', type: 'address' },
9
+ { internalType: 'address', name: '_idleVault', type: 'address' },
10
+ ],
11
+ stateMutability: 'nonpayable',
12
+ type: 'constructor',
13
+ },
14
+ { inputs: [], name: 'AssetMismatch', type: 'error' },
15
+ {
16
+ inputs: [{ internalType: 'address', name: 'asset', type: 'address' }],
17
+ name: 'AssetNotRedeemable',
18
+ type: 'error',
19
+ },
20
+ { inputs: [], name: 'CannotSweepIdleVaultShares', type: 'error' },
21
+ { inputs: [], name: 'CannotSweepReferenceAsset', type: 'error' },
22
+ { inputs: [], name: 'DepositFailed', type: 'error' },
23
+ {
24
+ inputs: [
25
+ { internalType: 'uint256', name: 'required', type: 'uint256' },
26
+ { internalType: 'uint256', name: 'available', type: 'uint256' },
27
+ ],
28
+ name: 'InsufficientLiquidity',
29
+ type: 'error',
30
+ },
31
+ {
32
+ inputs: [
33
+ { internalType: 'uint256', name: 'requested', type: 'uint256' },
34
+ { internalType: 'uint256', name: 'actual', type: 'uint256' },
35
+ ],
36
+ name: 'InsufficientWithdrawal',
37
+ type: 'error',
38
+ },
39
+ { inputs: [], name: 'InvalidOracleDecimals', type: 'error' },
40
+ { inputs: [], name: 'InvalidOraclePrice', type: 'error' },
41
+ { inputs: [], name: 'InvalidOracleTimestamp', type: 'error' },
42
+ { inputs: [], name: 'InvalidReceiver', type: 'error' },
43
+ { inputs: [], name: 'InvalidTimePeriod', type: 'error' },
44
+ { inputs: [], name: 'InvalidTokenDecimals', type: 'error' },
45
+ { inputs: [], name: 'OnlyVault', type: 'error' },
46
+ { inputs: [], name: 'OnlyVaultOwner', type: 'error' },
47
+ { inputs: [], name: 'OnlyVaultOwnerOrOperator', type: 'error' },
48
+ {
49
+ inputs: [
50
+ { internalType: 'uint256', name: 'provided', type: 'uint256' },
51
+ { internalType: 'uint256', name: 'minimum', type: 'uint256' },
52
+ ],
53
+ name: 'OracleStalenessTooLow',
54
+ type: 'error',
55
+ },
56
+ {
57
+ inputs: [
58
+ { internalType: 'uint256', name: 'referenceValue', type: 'uint256' },
59
+ { internalType: 'uint256', name: 'normalizedAmount', type: 'uint256' },
60
+ ],
61
+ name: 'PriceDeviationExceeded',
62
+ type: 'error',
63
+ },
64
+ {
65
+ inputs: [
66
+ { internalType: 'uint256', name: 'requested', type: 'uint256' },
67
+ { internalType: 'uint256', name: 'limit', type: 'uint256' },
68
+ ],
69
+ name: 'RedemptionExceedsLimit',
70
+ type: 'error',
71
+ },
72
+ { inputs: [], name: 'RedemptionsPaused', type: 'error' },
73
+ { inputs: [], name: 'RoundNotComplete', type: 'error' },
74
+ { inputs: [], name: 'SenderNotWhitelisted', type: 'error' },
75
+ {
76
+ inputs: [
77
+ { internalType: 'uint256', name: 'expected', type: 'uint256' },
78
+ { internalType: 'uint256', name: 'actual', type: 'uint256' },
79
+ ],
80
+ name: 'SlippageExceeded',
81
+ type: 'error',
82
+ },
83
+ {
84
+ inputs: [
85
+ { internalType: 'uint256', name: 'provided', type: 'uint256' },
86
+ { internalType: 'uint256', name: 'maximum', type: 'uint256' },
87
+ ],
88
+ name: 'SpreadTooHigh',
89
+ type: 'error',
90
+ },
91
+ {
92
+ inputs: [
93
+ { internalType: 'uint256', name: 'provided', type: 'uint256' },
94
+ { internalType: 'uint256', name: 'minimum', type: 'uint256' },
95
+ ],
96
+ name: 'SpreadTooLow',
97
+ type: 'error',
98
+ },
99
+ { inputs: [], name: 'StalePrice', type: 'error' },
100
+ { inputs: [], name: 'ZeroAddress', type: 'error' },
101
+ { inputs: [], name: 'ZeroAmount', type: 'error' },
102
+ {
103
+ anonymous: false,
104
+ inputs: [
105
+ { indexed: true, internalType: 'address', name: 'user', type: 'address' },
106
+ {
107
+ indexed: true,
108
+ internalType: 'address',
109
+ name: 'asset',
110
+ type: 'address',
111
+ },
112
+ {
113
+ indexed: false,
114
+ internalType: 'uint256',
115
+ name: 'assetIn',
116
+ type: 'uint256',
117
+ },
118
+ {
119
+ indexed: false,
120
+ internalType: 'uint256',
121
+ name: 'referenceOut',
122
+ type: 'uint256',
123
+ },
124
+ { indexed: false, internalType: 'uint256', name: 'fee', type: 'uint256' },
125
+ ],
126
+ name: 'AssetRedeemed',
127
+ type: 'event',
128
+ },
129
+ {
130
+ anonymous: false,
131
+ inputs: [
132
+ {
133
+ indexed: true,
134
+ internalType: 'address',
135
+ name: 'token',
136
+ type: 'address',
137
+ },
138
+ {
139
+ indexed: false,
140
+ internalType: 'uint256',
141
+ name: 'amount',
142
+ type: 'uint256',
143
+ },
144
+ ],
145
+ name: 'Deposited',
146
+ type: 'event',
147
+ },
148
+ {
149
+ anonymous: false,
150
+ inputs: [
151
+ {
152
+ indexed: false,
153
+ internalType: 'uint256',
154
+ name: 'requested',
155
+ type: 'uint256',
156
+ },
157
+ {
158
+ indexed: false,
159
+ internalType: 'uint256',
160
+ name: 'actual',
161
+ type: 'uint256',
162
+ },
163
+ ],
164
+ name: 'EmergencyWithdrawAll',
165
+ type: 'event',
166
+ },
167
+ {
168
+ anonymous: false,
169
+ inputs: [
170
+ {
171
+ indexed: false,
172
+ internalType: 'uint256',
173
+ name: 'amount',
174
+ type: 'uint256',
175
+ },
176
+ { indexed: false, internalType: 'bytes', name: 'reason', type: 'bytes' },
177
+ ],
178
+ name: 'IdleDepositFailed',
179
+ type: 'event',
180
+ },
181
+ {
182
+ anonymous: false,
183
+ inputs: [
184
+ {
185
+ indexed: false,
186
+ internalType: 'uint256',
187
+ name: 'amount',
188
+ type: 'uint256',
189
+ },
190
+ ],
191
+ name: 'IdleDeposited',
192
+ type: 'event',
193
+ },
194
+ {
195
+ anonymous: false,
196
+ inputs: [
197
+ {
198
+ indexed: false,
199
+ internalType: 'uint256',
200
+ name: 'amount',
201
+ type: 'uint256',
202
+ },
203
+ { indexed: false, internalType: 'bytes', name: 'reason', type: 'bytes' },
204
+ ],
205
+ name: 'IdleVaultFallback',
206
+ type: 'event',
207
+ },
208
+ {
209
+ anonymous: false,
210
+ inputs: [
211
+ {
212
+ indexed: false,
213
+ internalType: 'uint256',
214
+ name: 'requested',
215
+ type: 'uint256',
216
+ },
217
+ {
218
+ indexed: false,
219
+ internalType: 'uint256',
220
+ name: 'actual',
221
+ type: 'uint256',
222
+ },
223
+ ],
224
+ name: 'IdleWithdrawn',
225
+ type: 'event',
226
+ },
227
+ {
228
+ anonymous: false,
229
+ inputs: [
230
+ {
231
+ indexed: false,
232
+ internalType: 'uint256',
233
+ name: 'oldLimit',
234
+ type: 'uint256',
235
+ },
236
+ {
237
+ indexed: false,
238
+ internalType: 'uint256',
239
+ name: 'newLimit',
240
+ type: 'uint256',
241
+ },
242
+ ],
243
+ name: 'MaxRedemptionPerTxUpdated',
244
+ type: 'event',
245
+ },
246
+ {
247
+ anonymous: false,
248
+ inputs: [
249
+ {
250
+ indexed: true,
251
+ internalType: 'address',
252
+ name: 'asset',
253
+ type: 'address',
254
+ },
255
+ { indexed: false, internalType: 'bool', name: 'enabled', type: 'bool' },
256
+ {
257
+ indexed: false,
258
+ internalType: 'uint256',
259
+ name: 'spreadBps',
260
+ type: 'uint256',
261
+ },
262
+ {
263
+ indexed: false,
264
+ internalType: 'address',
265
+ name: 'oracle',
266
+ type: 'address',
267
+ },
268
+ {
269
+ indexed: false,
270
+ internalType: 'uint256',
271
+ name: 'maxPriceDeviationBps',
272
+ type: 'uint256',
273
+ },
274
+ ],
275
+ name: 'RedeemableAssetSet',
276
+ type: 'event',
277
+ },
278
+ {
279
+ anonymous: false,
280
+ inputs: [
281
+ { indexed: false, internalType: 'bool', name: 'paused', type: 'bool' },
282
+ ],
283
+ name: 'RedemptionsPausedUpdated',
284
+ type: 'event',
285
+ },
286
+ {
287
+ anonymous: false,
288
+ inputs: [
289
+ {
290
+ indexed: true,
291
+ internalType: 'address',
292
+ name: 'token',
293
+ type: 'address',
294
+ },
295
+ {
296
+ indexed: false,
297
+ internalType: 'uint256',
298
+ name: 'amount',
299
+ type: 'uint256',
300
+ },
301
+ { indexed: true, internalType: 'address', name: 'to', type: 'address' },
302
+ ],
303
+ name: 'TokenSwept',
304
+ type: 'event',
305
+ },
306
+ {
307
+ anonymous: false,
308
+ inputs: [
309
+ {
310
+ indexed: true,
311
+ internalType: 'address',
312
+ name: 'token',
313
+ type: 'address',
314
+ },
315
+ {
316
+ indexed: false,
317
+ internalType: 'uint256',
318
+ name: 'amount',
319
+ type: 'uint256',
320
+ },
321
+ { indexed: true, internalType: 'address', name: 'to', type: 'address' },
322
+ ],
323
+ name: 'Withdrawn',
324
+ type: 'event',
325
+ },
326
+ {
327
+ inputs: [],
328
+ name: 'MAX_SPREAD_BPS',
329
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
330
+ stateMutability: 'view',
331
+ type: 'function',
332
+ },
333
+ {
334
+ inputs: [],
335
+ name: 'MIN_ORACLE_STALENESS',
336
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
337
+ stateMutability: 'view',
338
+ type: 'function',
339
+ },
340
+ {
341
+ inputs: [],
342
+ name: 'MIN_SPREAD_BPS',
343
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
344
+ stateMutability: 'view',
345
+ type: 'function',
346
+ },
347
+ {
348
+ inputs: [],
349
+ name: 'availableLiquidity',
350
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
351
+ stateMutability: 'view',
352
+ type: 'function',
353
+ },
354
+ {
355
+ inputs: [
356
+ { internalType: 'address', name: 'tokenAddr', type: 'address' },
357
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
358
+ ],
359
+ name: 'deposit',
360
+ outputs: [],
361
+ stateMutability: 'nonpayable',
362
+ type: 'function',
363
+ },
364
+ {
365
+ inputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }],
366
+ name: 'depositToIdle',
367
+ outputs: [],
368
+ stateMutability: 'nonpayable',
369
+ type: 'function',
370
+ },
371
+ {
372
+ inputs: [{ internalType: 'uint256', name: 'minActual', type: 'uint256' }],
373
+ name: 'emergencyWithdrawAll',
374
+ outputs: [{ internalType: 'uint256', name: 'actual', type: 'uint256' }],
375
+ stateMutability: 'nonpayable',
376
+ type: 'function',
377
+ },
378
+ {
379
+ inputs: [],
380
+ name: 'getIdleUtilization',
381
+ outputs: [
382
+ { internalType: 'uint256', name: 'idle', type: 'uint256' },
383
+ { internalType: 'uint256', name: 'idleVaultValue', type: 'uint256' },
384
+ ],
385
+ stateMutability: 'view',
386
+ type: 'function',
387
+ },
388
+ {
389
+ inputs: [],
390
+ name: 'getRedeemableAssetsList',
391
+ outputs: [{ internalType: 'address[]', name: '', type: 'address[]' }],
392
+ stateMutability: 'view',
393
+ type: 'function',
394
+ },
395
+ {
396
+ inputs: [],
397
+ name: 'IDLE_VAULT',
398
+ outputs: [{ internalType: 'contract IERC4626', name: '', type: 'address' }],
399
+ stateMutability: 'view',
400
+ type: 'function',
401
+ },
402
+ {
403
+ inputs: [],
404
+ name: 'maxRedemptionPerTx',
405
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
406
+ stateMutability: 'view',
407
+ type: 'function',
408
+ },
409
+ {
410
+ inputs: [
411
+ { internalType: 'address', name: 'asset', type: 'address' },
412
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
413
+ ],
414
+ name: 'previewRedemption',
415
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
416
+ stateMutability: 'view',
417
+ type: 'function',
418
+ },
419
+ {
420
+ inputs: [
421
+ { internalType: 'address', name: 'asset', type: 'address' },
422
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
423
+ { internalType: 'uint256', name: 'minOut', type: 'uint256' },
424
+ ],
425
+ name: 'redeemAsset',
426
+ outputs: [
427
+ { internalType: 'uint256', name: 'referenceOut', type: 'uint256' },
428
+ ],
429
+ stateMutability: 'nonpayable',
430
+ type: 'function',
431
+ },
432
+ {
433
+ inputs: [{ internalType: 'address', name: '', type: 'address' }],
434
+ name: 'redeemableAssets',
435
+ outputs: [
436
+ { internalType: 'address', name: 'oracle', type: 'address' },
437
+ { internalType: 'uint8', name: 'oracleDecimals', type: 'uint8' },
438
+ { internalType: 'uint8', name: 'tokenDecimals', type: 'uint8' },
439
+ { internalType: 'uint256', name: 'spreadBps', type: 'uint256' },
440
+ { internalType: 'uint256', name: 'maxOracleStaleness', type: 'uint256' },
441
+ {
442
+ internalType: 'uint256',
443
+ name: 'maxPriceDeviationBps',
444
+ type: 'uint256',
445
+ },
446
+ { internalType: 'bool', name: 'enabled', type: 'bool' },
447
+ ],
448
+ stateMutability: 'view',
449
+ type: 'function',
450
+ },
451
+ {
452
+ inputs: [],
453
+ name: 'redemptionsPaused',
454
+ outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
455
+ stateMutability: 'view',
456
+ type: 'function',
457
+ },
458
+ {
459
+ inputs: [],
460
+ name: 'REFERENCE_ASSET',
461
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
462
+ stateMutability: 'view',
463
+ type: 'function',
464
+ },
465
+ {
466
+ inputs: [],
467
+ name: 'REFERENCE_ASSET_DECIMALS',
468
+ outputs: [{ internalType: 'uint8', name: '', type: 'uint8' }],
469
+ stateMutability: 'view',
470
+ type: 'function',
471
+ },
472
+ {
473
+ inputs: [{ internalType: 'uint256', name: 'limit', type: 'uint256' }],
474
+ name: 'setMaxRedemptionPerTx',
475
+ outputs: [],
476
+ stateMutability: 'nonpayable',
477
+ type: 'function',
478
+ },
479
+ {
480
+ inputs: [
481
+ { internalType: 'address', name: 'asset', type: 'address' },
482
+ { internalType: 'bool', name: 'enabled', type: 'bool' },
483
+ { internalType: 'uint256', name: 'spreadBps', type: 'uint256' },
484
+ { internalType: 'address', name: 'oracle', type: 'address' },
485
+ { internalType: 'uint256', name: 'maxStaleness', type: 'uint256' },
486
+ {
487
+ internalType: 'uint256',
488
+ name: 'maxPriceDeviationBps',
489
+ type: 'uint256',
490
+ },
491
+ ],
492
+ name: 'setRedeemableAsset',
493
+ outputs: [],
494
+ stateMutability: 'nonpayable',
495
+ type: 'function',
496
+ },
497
+ {
498
+ inputs: [{ internalType: 'bool', name: 'paused', type: 'bool' }],
499
+ name: 'setRedemptionsPaused',
500
+ outputs: [],
501
+ stateMutability: 'nonpayable',
502
+ type: 'function',
503
+ },
504
+ {
505
+ inputs: [
506
+ { internalType: 'address', name: 'token', type: 'address' },
507
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
508
+ { internalType: 'address', name: 'to', type: 'address' },
509
+ ],
510
+ name: 'sweepToken',
511
+ outputs: [],
512
+ stateMutability: 'nonpayable',
513
+ type: 'function',
514
+ },
515
+ {
516
+ inputs: [],
517
+ name: 'VAULT',
518
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
519
+ stateMutability: 'view',
520
+ type: 'function',
521
+ },
522
+ {
523
+ inputs: [
524
+ { internalType: 'address', name: 'tokenAddr', type: 'address' },
525
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
526
+ {
527
+ internalType: 'address payable',
528
+ name: 'receivingAddr',
529
+ type: 'address',
530
+ },
531
+ ],
532
+ name: 'withdraw',
533
+ outputs: [],
534
+ stateMutability: 'nonpayable',
535
+ type: 'function',
536
+ },
537
+ {
538
+ inputs: [
539
+ { internalType: 'uint256', name: 'amount', type: 'uint256' },
540
+ { internalType: 'uint256', name: 'minActual', type: 'uint256' },
541
+ ],
542
+ name: 'withdrawFromIdle',
543
+ outputs: [],
544
+ stateMutability: 'nonpayable',
545
+ type: 'function',
546
+ },
547
+ ];
548
+ //# sourceMappingURL=RwaRedeemSubaccount.js.map
@@ -0,0 +1,17 @@
1
+ /** @internal */
2
+ export declare const ABI_SMART_ACCOUNT: readonly [{
3
+ readonly name: "isValidSignature";
4
+ readonly type: "function";
5
+ readonly stateMutability: "view";
6
+ readonly inputs: readonly [{
7
+ readonly name: "hash";
8
+ readonly type: "bytes32";
9
+ }, {
10
+ readonly name: "signature";
11
+ readonly type: "bytes";
12
+ }];
13
+ readonly outputs: readonly [{
14
+ readonly name: "";
15
+ readonly type: "bytes4";
16
+ }];
17
+ }];
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ABI_SMART_ACCOUNT = void 0;
4
+ // ERC-1271
5
+ // isValidSignature(bytes32 hash, bytes signature) → bytes4 magicValue
6
+ /** @internal */
7
+ exports.ABI_SMART_ACCOUNT = [
8
+ {
9
+ name: 'isValidSignature',
10
+ type: 'function',
11
+ stateMutability: 'view',
12
+ inputs: [
13
+ { name: 'hash', type: 'bytes32' },
14
+ { name: 'signature', type: 'bytes' },
15
+ ],
16
+ outputs: [{ name: '', type: 'bytes4' }],
17
+ },
18
+ ];
19
+ //# sourceMappingURL=SmartAccount.js.map