@upshiftfinance/sdk 0.0.0-stage → 0.2.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 (344) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +408 -2
  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 +953 -0
  40. package/lib/abis/SwapRouter.js +1228 -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 +249 -0
  65. package/lib/adapters/evm/index.d.ts +539 -0
  66. package/lib/adapters/evm/index.js +656 -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/confirm.d.ts +88 -0
  70. package/lib/adapters/solana/confirm.js +291 -0
  71. package/lib/adapters/solana/constants.d.ts +42 -0
  72. package/lib/adapters/solana/constants.js +59 -0
  73. package/lib/adapters/solana/getters.d.ts +42 -0
  74. package/lib/adapters/solana/getters.js +275 -0
  75. package/lib/adapters/solana/idl/vault-idl.d.ts +700 -0
  76. package/lib/adapters/solana/idl/vault-idl.js +2101 -0
  77. package/lib/adapters/solana/idl/withdrawal-queue-idl.d.ts +795 -0
  78. package/lib/adapters/solana/idl/withdrawal-queue-idl.js +1864 -0
  79. package/lib/adapters/solana/index.d.ts +372 -0
  80. package/lib/adapters/solana/index.js +459 -0
  81. package/lib/adapters/solana/pricing.d.ts +184 -0
  82. package/lib/adapters/solana/pricing.js +239 -0
  83. package/lib/adapters/solana/queue-hints.d.ts +29 -0
  84. package/lib/adapters/solana/queue-hints.js +59 -0
  85. package/lib/adapters/solana/queue.actions.d.ts +97 -0
  86. package/lib/adapters/solana/queue.actions.js +468 -0
  87. package/lib/adapters/solana/token-reads.d.ts +108 -0
  88. package/lib/adapters/solana/token-reads.js +145 -0
  89. package/lib/adapters/solana/types.d.ts +325 -0
  90. package/lib/adapters/solana/types.js +3 -0
  91. package/lib/adapters/solana/utils.d.ts +229 -0
  92. package/lib/adapters/solana/utils.js +773 -0
  93. package/lib/adapters/solana/vault.actions.d.ts +140 -0
  94. package/lib/adapters/solana/vault.actions.js +657 -0
  95. package/lib/adapters/solana/withdrawal-queue.d.ts +125 -0
  96. package/lib/adapters/solana/withdrawal-queue.js +301 -0
  97. package/lib/adapters/stellar/actions.d.ts +41 -0
  98. package/lib/adapters/stellar/actions.js +126 -0
  99. package/lib/adapters/stellar/constants.d.ts +43 -0
  100. package/lib/adapters/stellar/constants.js +53 -0
  101. package/lib/adapters/stellar/getters.d.ts +68 -0
  102. package/lib/adapters/stellar/getters.js +290 -0
  103. package/lib/adapters/stellar/index.d.ts +126 -0
  104. package/lib/adapters/stellar/index.js +187 -0
  105. package/lib/adapters/stellar/invocation.d.ts +55 -0
  106. package/lib/adapters/stellar/invocation.js +92 -0
  107. package/lib/adapters/stellar/soroban.d.ts +131 -0
  108. package/lib/adapters/stellar/soroban.js +617 -0
  109. package/lib/adapters/stellar/submit.d.ts +42 -0
  110. package/lib/adapters/stellar/submit.js +195 -0
  111. package/lib/adapters/stellar/types.d.ts +57 -0
  112. package/lib/adapters/stellar/types.js +6 -0
  113. package/lib/adapters/stellar/utils.d.ts +24 -0
  114. package/lib/adapters/stellar/utils.js +34 -0
  115. package/lib/adapters/sui/client.d.ts +83 -0
  116. package/lib/adapters/sui/client.js +216 -0
  117. package/lib/adapters/sui/constants.d.ts +33 -0
  118. package/lib/adapters/sui/constants.js +31 -0
  119. package/lib/adapters/sui/index.d.ts +57 -0
  120. package/lib/adapters/sui/index.js +100 -0
  121. package/lib/adapters/sui/targets.d.ts +171 -0
  122. package/lib/adapters/sui/targets.js +225 -0
  123. package/lib/adapters/sui/utils.d.ts +8 -0
  124. package/lib/adapters/sui/utils.js +17 -0
  125. package/lib/core/analytics/app-name.d.ts +27 -0
  126. package/lib/core/analytics/app-name.js +48 -0
  127. package/lib/core/analytics/chain-name.d.ts +9 -0
  128. package/lib/core/analytics/chain-name.js +34 -0
  129. package/lib/core/analytics/constants.d.ts +15 -0
  130. package/lib/core/analytics/constants.js +28 -0
  131. package/lib/core/analytics/env.d.ts +46 -0
  132. package/lib/core/analytics/env.js +147 -0
  133. package/lib/core/analytics/index.d.ts +39 -0
  134. package/lib/core/analytics/index.js +83 -0
  135. package/lib/core/analytics/instrumentation.d.ts +29 -0
  136. package/lib/core/analytics/instrumentation.js +292 -0
  137. package/lib/core/analytics/method-taxonomy.d.ts +19 -0
  138. package/lib/core/analytics/method-taxonomy.js +156 -0
  139. package/lib/core/analytics/metrics.d.ts +48 -0
  140. package/lib/core/analytics/metrics.js +142 -0
  141. package/lib/core/analytics/sanitize.d.ts +57 -0
  142. package/lib/core/analytics/sanitize.js +272 -0
  143. package/lib/core/analytics/sentry-runtime.d.ts +15 -0
  144. package/lib/core/analytics/sentry-runtime.js +131 -0
  145. package/lib/core/analytics/sentry.d.ts +100 -0
  146. package/lib/core/analytics/sentry.js +696 -0
  147. package/lib/core/analytics/types.d.ts +55 -0
  148. package/lib/core/analytics/types.js +3 -0
  149. package/lib/core/analytics/user-identity.d.ts +55 -0
  150. package/lib/core/analytics/user-identity.js +218 -0
  151. package/lib/core/analytics/version.d.ts +6 -0
  152. package/lib/core/analytics/version.js +10 -0
  153. package/lib/core/attribution.d.ts +159 -0
  154. package/lib/core/attribution.js +194 -0
  155. package/lib/core/auth/index.d.ts +1 -0
  156. package/lib/core/auth/index.js +18 -0
  157. package/lib/core/auth/verify.d.ts +2 -0
  158. package/lib/core/auth/verify.js +35 -0
  159. package/lib/core/base.class.d.ts +193 -0
  160. package/lib/core/base.class.js +163 -0
  161. package/lib/core/cache.d.ts +9 -0
  162. package/lib/core/cache.js +31 -0
  163. package/lib/core/constants/adapters.d.ts +103 -0
  164. package/lib/core/constants/adapters.js +180 -0
  165. package/lib/core/constants/core.d.ts +162 -0
  166. package/lib/core/constants/core.js +281 -0
  167. package/lib/core/constants/swap-router.d.ts +180 -0
  168. package/lib/core/constants/swap-router.js +203 -0
  169. package/lib/core/constants/vaults.d.ts +93 -0
  170. package/lib/core/constants/vaults.js +277 -0
  171. package/lib/core/constants/web3.d.ts +106 -0
  172. package/lib/core/constants/web3.js +251 -0
  173. package/lib/core/errors/index.d.ts +177 -0
  174. package/lib/core/errors/index.js +257 -0
  175. package/lib/core/fetcher.d.ts +237 -0
  176. package/lib/core/fetcher.js +1103 -0
  177. package/lib/core/helpers/adapters.d.ts +13 -0
  178. package/lib/core/helpers/adapters.js +39 -0
  179. package/lib/core/helpers/chain-address.d.ts +13 -0
  180. package/lib/core/helpers/chain-address.js +47 -0
  181. package/lib/core/helpers/chain-error.d.ts +207 -0
  182. package/lib/core/helpers/chain-error.js +697 -0
  183. package/lib/core/helpers/chain-support.d.ts +98 -0
  184. package/lib/core/helpers/chain-support.js +139 -0
  185. package/lib/core/helpers/concurrency.d.ts +51 -0
  186. package/lib/core/helpers/concurrency.js +79 -0
  187. package/lib/core/helpers/core.d.ts +92 -0
  188. package/lib/core/helpers/core.js +368 -0
  189. package/lib/core/helpers/explorer-link.d.ts +16 -0
  190. package/lib/core/helpers/explorer-link.js +26 -0
  191. package/lib/core/helpers/multicall.d.ts +68 -0
  192. package/lib/core/helpers/multicall.js +103 -0
  193. package/lib/core/helpers/revert-decode.d.ts +248 -0
  194. package/lib/core/helpers/revert-decode.js +515 -0
  195. package/lib/core/helpers/signer.d.ts +61 -0
  196. package/lib/core/helpers/signer.js +184 -0
  197. package/lib/core/helpers/swap-router.d.ts +269 -0
  198. package/lib/core/helpers/swap-router.js +542 -0
  199. package/lib/core/helpers/vault-version.d.ts +24 -0
  200. package/lib/core/helpers/vault-version.js +83 -0
  201. package/lib/core/helpers/vaults.d.ts +89 -0
  202. package/lib/core/helpers/vaults.js +241 -0
  203. package/lib/core/helpers/web3.d.ts +366 -0
  204. package/lib/core/helpers/web3.js +1034 -0
  205. package/lib/core/index.d.ts +23 -0
  206. package/lib/core/index.js +40 -0
  207. package/lib/core/logger/curator-alert.d.ts +217 -0
  208. package/lib/core/logger/curator-alert.js +276 -0
  209. package/lib/core/logger/index.d.ts +99 -0
  210. package/lib/core/logger/index.js +163 -0
  211. package/lib/core/logger/slack.d.ts +49 -0
  212. package/lib/core/logger/slack.js +111 -0
  213. package/lib/core/vault-metadata.d.ts +12 -0
  214. package/lib/core/vault-metadata.js +42 -0
  215. package/lib/core/version-check.d.ts +58 -0
  216. package/lib/core/version-check.js +182 -0
  217. package/lib/evm/index.d.ts +2 -0
  218. package/lib/evm/index.js +19 -0
  219. package/lib/evm/methods/crossChainVault.d.ts +132 -0
  220. package/lib/evm/methods/crossChainVault.js +857 -0
  221. package/lib/evm/methods/crossChainVaultRegistry.d.ts +92 -0
  222. package/lib/evm/methods/crossChainVaultRegistry.js +239 -0
  223. package/lib/evm/methods/index.d.ts +2 -0
  224. package/lib/evm/methods/index.js +19 -0
  225. package/lib/evm/types/crossChain.d.ts +363 -0
  226. package/lib/evm/types/crossChain.js +20 -0
  227. package/lib/evm/types/index.d.ts +1 -0
  228. package/lib/evm/types/index.js +18 -0
  229. package/lib/index.d.ts +30 -0
  230. package/lib/index.js +52 -0
  231. package/lib/main.d.ts +596 -0
  232. package/lib/main.js +681 -0
  233. package/lib/modules/api/fetcher.d.ts +108 -0
  234. package/lib/modules/api/fetcher.js +187 -0
  235. package/lib/modules/api/index.d.ts +1 -0
  236. package/lib/modules/api/index.js +6 -0
  237. package/lib/modules/api/main.d.ts +587 -0
  238. package/lib/modules/api/main.js +911 -0
  239. package/lib/modules/sub-accounts/fetcher.d.ts +53 -0
  240. package/lib/modules/sub-accounts/fetcher.js +96 -0
  241. package/lib/modules/sub-accounts/index.d.ts +2 -0
  242. package/lib/modules/sub-accounts/index.js +19 -0
  243. package/lib/modules/sub-accounts/main.d.ts +249 -0
  244. package/lib/modules/sub-accounts/main.js +211 -0
  245. package/lib/modules/sub-accounts/utils.d.ts +106 -0
  246. package/lib/modules/sub-accounts/utils.js +112 -0
  247. package/lib/modules/vaults/adapter.helpers.d.ts +84 -0
  248. package/lib/modules/vaults/adapter.helpers.js +202 -0
  249. package/lib/modules/vaults/fetcher.d.ts +147 -0
  250. package/lib/modules/vaults/fetcher.js +357 -0
  251. package/lib/modules/vaults/getters.d.ts +1060 -0
  252. package/lib/modules/vaults/getters.js +4079 -0
  253. package/lib/modules/vaults/index.d.ts +20 -0
  254. package/lib/modules/vaults/index.js +44 -0
  255. package/lib/modules/vaults/main.d.ts +607 -0
  256. package/lib/modules/vaults/main.js +1687 -0
  257. package/lib/modules/vaults/prefetch.d.ts +65 -0
  258. package/lib/modules/vaults/prefetch.js +120 -0
  259. package/lib/modules/vaults/read.actions.d.ts +406 -0
  260. package/lib/modules/vaults/read.actions.js +891 -0
  261. package/lib/modules/vaults/types.d.ts +149 -0
  262. package/lib/modules/vaults/types.js +3 -0
  263. package/lib/modules/vaults/utils/call-data-decoder.d.ts +61 -0
  264. package/lib/modules/vaults/utils/call-data-decoder.js +194 -0
  265. package/lib/modules/vaults/utils/date-utils.d.ts +50 -0
  266. package/lib/modules/vaults/utils/date-utils.js +84 -0
  267. package/lib/modules/vaults/utils.d.ts +153 -0
  268. package/lib/modules/vaults/utils.js +818 -0
  269. package/lib/modules/vaults/write.actions.d.ts +812 -0
  270. package/lib/modules/vaults/write.actions.js +2377 -0
  271. package/lib/polyfills.d.ts +1 -0
  272. package/lib/polyfills.js +12 -0
  273. package/lib/sdk.d.ts +30173 -0
  274. package/lib/services/coingecko/fetcher.d.ts +15 -0
  275. package/lib/services/coingecko/fetcher.js +67 -0
  276. package/lib/services/coingecko/index.d.ts +2 -0
  277. package/lib/services/coingecko/index.js +19 -0
  278. package/lib/services/coingecko/utils.d.ts +1 -0
  279. package/lib/services/coingecko/utils.js +24 -0
  280. package/lib/services/debank/fetcher.d.ts +126 -0
  281. package/lib/services/debank/fetcher.js +47 -0
  282. package/lib/services/debank/index.d.ts +2 -0
  283. package/lib/services/debank/index.js +19 -0
  284. package/lib/services/debank/utils.d.ts +50 -0
  285. package/lib/services/debank/utils.js +325 -0
  286. package/lib/services/layerzero/deposits.d.ts +55 -0
  287. package/lib/services/layerzero/deposits.js +174 -0
  288. package/lib/services/layerzero/redeems.d.ts +20 -0
  289. package/lib/services/layerzero/redeems.js +92 -0
  290. package/lib/services/layerzero/utils.d.ts +9 -0
  291. package/lib/services/layerzero/utils.js +22 -0
  292. package/lib/services/octavfi/fetcher.d.ts +33 -0
  293. package/lib/services/octavfi/fetcher.js +39 -0
  294. package/lib/services/octavfi/index.d.ts +3 -0
  295. package/lib/services/octavfi/index.js +20 -0
  296. package/lib/services/octavfi/types.d.ts +34 -0
  297. package/lib/services/octavfi/types.js +3 -0
  298. package/lib/services/octavfi/utils.d.ts +16 -0
  299. package/lib/services/octavfi/utils.js +244 -0
  300. package/lib/services/subgraph/fetcher.d.ts +2 -0
  301. package/lib/services/subgraph/fetcher.js +66 -0
  302. package/lib/services/subgraph/index.d.ts +2 -0
  303. package/lib/services/subgraph/index.js +19 -0
  304. package/lib/services/subgraph/schema.d.ts +48 -0
  305. package/lib/services/subgraph/schema.js +87 -0
  306. package/lib/services/subgraph/vaults.d.ts +83 -0
  307. package/lib/services/subgraph/vaults.js +1282 -0
  308. package/lib/services/swap-quotes/index.d.ts +105 -0
  309. package/lib/services/swap-quotes/index.js +77 -0
  310. package/lib/services/swap-quotes/paraswap.d.ts +51 -0
  311. package/lib/services/swap-quotes/paraswap.js +138 -0
  312. package/lib/services/untangled/fetcher.d.ts +40 -0
  313. package/lib/services/untangled/fetcher.js +110 -0
  314. package/lib/services/untangled/index.d.ts +3 -0
  315. package/lib/services/untangled/index.js +20 -0
  316. package/lib/services/untangled/types.d.ts +83 -0
  317. package/lib/services/untangled/types.js +10 -0
  318. package/lib/services/untangled/utils.d.ts +91 -0
  319. package/lib/services/untangled/utils.js +339 -0
  320. package/lib/types/api.d.ts +498 -0
  321. package/lib/types/api.js +3 -0
  322. package/lib/types/index.d.ts +12 -0
  323. package/lib/types/index.js +28 -0
  324. package/lib/types/points.d.ts +28 -0
  325. package/lib/types/points.js +3 -0
  326. package/lib/types/pools.d.ts +144 -0
  327. package/lib/types/pools.js +3 -0
  328. package/lib/types/staking.d.ts +28 -0
  329. package/lib/types/staking.js +3 -0
  330. package/lib/types/sub-accounts.d.ts +150 -0
  331. package/lib/types/sub-accounts.js +3 -0
  332. package/lib/types/subgraph.d.ts +84 -0
  333. package/lib/types/subgraph.js +3 -0
  334. package/lib/types/typed-contract.d.ts +102 -0
  335. package/lib/types/typed-contract.js +3 -0
  336. package/lib/types/user.d.ts +1 -0
  337. package/lib/types/user.js +3 -0
  338. package/lib/types/vaults.d.ts +886 -0
  339. package/lib/types/vaults.js +30 -0
  340. package/lib/types/web3.d.ts +100 -0
  341. package/lib/types/web3.js +14 -0
  342. package/lib/types/webserver.d.ts +730 -0
  343. package/lib/types/webserver.js +3 -0
  344. package/package.json +79 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 August Digital
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,409 @@
1
- # Temporary Holding Version
1
+ # Upshift SDK
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ TypeScript SDK for interacting with Upshift vaults across EVM, Solana, Stellar, and Sui chains.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @upshiftfinance/sdk ethers
9
+ # or
10
+ pnpm add @upshiftfinance/sdk ethers
11
+ # or
12
+ yarn add @upshiftfinance/sdk ethers
13
+ ```
14
+
15
+ ### Wagmi/Viem Support
16
+
17
+ The SDK supports both ethers and wagmi/viem signers. If you're using wagmi in your React app, also install viem:
18
+
19
+ ```bash
20
+ npm install viem
21
+ ```
22
+
23
+ The SDK automatically converts viem `WalletClient` to an ethers-compatible signer.
24
+
25
+ ## Quick Start
26
+
27
+ ```typescript
28
+ import UpshiftSDK from '@upshiftfinance/sdk';
29
+
30
+ const sdk = new UpshiftSDK({
31
+ // Required: stable kebab-case slug identifying your application.
32
+ appName: 'acme-trader',
33
+ providers: {
34
+ 1: 'https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY',
35
+ 42161: 'https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY',
36
+ -1: 'https://api.mainnet-beta.solana.com', // Solana
37
+ },
38
+ keys: {
39
+ upshift: 'YOUR_API_KEY', // Optional: vault reads, allocations and vault-linked sub-account reads work without it
40
+ },
41
+ monitoring: {
42
+ env: 'DEV', // Optional: 'DEV' enables console logging (defaults to 'PROD')
43
+ },
44
+ });
45
+
46
+ // Fetch all vaults
47
+ const vaults = await sdk.getVaults();
48
+
49
+ // Fetch a specific vault with loans and allocations
50
+ const vault = await sdk.getVault({
51
+ vault: '0x...',
52
+ options: { loans: true, allocations: true },
53
+ });
54
+
55
+ // Get user positions
56
+ const positions = await sdk.getVaultPositions({
57
+ wallet: '0x...',
58
+ showAllVaults: true,
59
+ });
60
+ ```
61
+
62
+ ### App Name
63
+
64
+ `appName` is required on every `UpshiftSDK` constructor call. Pass a stable kebab-case slug
65
+ identifying your application (e.g. `'acme-trader'`, `'my-defi-app'`):
66
+
67
+ - **What it's used for.** Upshift tags analytics events with `app.name = <yourSlug>` to
68
+ attribute error spikes and prioritize bug fixes by consuming app.
69
+ - **What it is not.** Not a secret, not a license key, not a display label. Pick a slug once
70
+ and reuse it across deployments.
71
+ - **Constraints.** 3–64 characters, only `[a-zA-Z0-9._-]`. The SDK throws synchronously from
72
+ the constructor if the value is missing or invalid.
73
+
74
+ ```typescript
75
+ // Will throw — appName is required.
76
+ new UpshiftSDK({ providers: { /* ... */ } } as any);
77
+
78
+ // Will throw — spaces not allowed. Use 'acme-trader'.
79
+ new UpshiftSDK({ appName: 'Acme Trader', providers: { /* ... */ } });
80
+
81
+ // Correct.
82
+ new UpshiftSDK({ appName: 'acme-trader', providers: { /* ... */ } });
83
+ ```
84
+
85
+ ### Origin-Code Attribution (SwapRouter)
86
+
87
+ An integrator with an origin (referral / fee-sharing) code registered on the SwapRouter sets it once on the
88
+ SDK instance. Deposits made through the SDK then carry it on-chain:
89
+
90
+ ```typescript
91
+ const sdk = new UpshiftSDK({
92
+ appName: 'acme-trader',
93
+ providers: { 1: 'https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY' },
94
+ attribution: {
95
+ originCode: '0x…', // bytes32 registered on the SwapRouter with addOrigin
96
+ strictOrigin: false, // optional: true throws instead of falling back
97
+ },
98
+ });
99
+
100
+ // Check the code before you ship it.
101
+ const { registered, originFeeBps, collector } = await sdk.getOriginInfo({
102
+ chainId: 1,
103
+ originCode: '0x…',
104
+ });
105
+ ```
106
+
107
+ - **Ethereum mainnet only.** The instance code is sent on chain 1 (`ORIGIN_ATTRIBUTION_CHAINS`) and on no other
108
+ chain, even where a SwapRouter is configured.
109
+ - **Where it applies.** `vaultDeposit` sends a deposit through `SwapRouter.deposit` with the code when
110
+ `sdk.evm.getDepositRoute()` returns `via: 'router'`: the vault is registered on the router, the vault accepts
111
+ the asset as-is (its reference asset, or a Tokenized Vault V2 whitelisted asset — never swapped), the router
112
+ whitelists the asset, the router is not paused, the deposit is not a permit, native-token or adapter deposit,
113
+ and the code is registered. `swapRouterDeposit`, `swapAndDeposit`, `depositViaSwapRouter` and `depositNativeViaSwapRouter`
114
+ send it too.
115
+ - **Precedence.** An `originCode` passed to a router method wins, then the instance code, then the all-zero
116
+ sentinel (no origin fee). Pass the zero sentinel to opt one call out.
117
+ - **Fallback.** When the code cannot be applied — it is not registered, the chain is not mainnet, the router
118
+ is paused (`router-paused`, checked with a 15-second cache) or does not whitelist the asset, the vault does
119
+ not accept it or is not registered on the router, or it is a permit, native-token or adapter deposit —
120
+ `vaultDeposit` takes the vault's native path and logs
121
+ `vaultDeposit:attribution-skipped` with the reason (Sentry tag `sdk.attribution.origin=skipped`). The router
122
+ methods send the zero sentinel for an unregistered instance code and log `<method>:attribution-skipped`.
123
+ With `strictOrigin: true` an unregistered instance code throws `UpshiftValidationError` before any approval
124
+ instead; a paused router falls back to native even then. An `originCode` passed to a router method that is
125
+ not registered always throws `UpshiftValidationError` before any approval. While the router is paused, the
126
+ router methods throw `UpshiftSDKError` (`context.reason: 'router-paused'`) before any approval.
127
+ - **Approve `route.spender`, not the vault.** A routed deposit is pulled by the SwapRouter. `vaultDeposit` and
128
+ `approve` handle this; if you send approvals yourself, read the spender first:
129
+
130
+ ```typescript
131
+ const route = await sdk.evm.getDepositRoute({ target: vault, depositAsset: usdc });
132
+ // route.spender is the SwapRouter when route.via === 'router', else the vault (or adapter wrapper)
133
+ ```
134
+
135
+ - **Gas.** Measured on a mainnet fork (repeat 1,000 USDC deposits into Core USDC): direct deposit 102,067 gas;
136
+ router with a 0% code 161,744 (+59.7k); router with a 1% code 173,135 (+71.1k). A routed deposit also needs a
137
+ one-time approval of the router per token.
138
+ - **Zero-fee codes.** A code registered with a 0 bps fee is valid for attribution only, but the router emits no
139
+ `OriginFeeApplied` event for it. Its deposits are attributable only from the transaction calldata and SDK
140
+ telemetry.
141
+ - **Process-global.** `attribution` is process-global: the last `UpshiftSDK` constructed wins, and one
142
+ constructed without `attribution` clears it. Run one attribution configuration per process.
143
+
144
+ ## Architecture
145
+
146
+ ```
147
+ src.ts/
148
+ ├── main.ts # Main SDK class (UpshiftSDK)
149
+ ├── core/ # Base utilities
150
+ │ ├── base.class.ts # Base SDK functionality
151
+ │ ├── fetcher.ts # API client with retry logic
152
+ │ └── web3.helpers.ts # Blockchain utilities
153
+ ├── adapters/ # Chain-specific implementations
154
+ │ ├── evm/ # EVM adapter (approve, deposit, redeem, read helpers)
155
+ │ ├── solana/ # Solana program adapters
156
+ │ ├── stellar/ # Stellar vault adapters
157
+ │ └── sui/ # Sui config and chain-identity helpers
158
+ ├── evm/ # EVM cross-chain (LayerZero OVault)
159
+ ├── modules/ # Feature modules
160
+ │ ├── vaults/ # Vault read operations
161
+ │ ├── sub-accounts/ # Sub-account queries
162
+ │ └── api/ # Upshift backend API integration
163
+ ├── services/ # External service integrations
164
+ │ ├── debank/ # DeFi allocation data
165
+ │ ├── coingecko/ # Token pricing
166
+ │ └── subgraph/ # Historical transaction data
167
+ └── types/ # TypeScript interfaces
168
+ ```
169
+
170
+ ## Key Concepts
171
+
172
+ ### Multi-Chain Support
173
+
174
+ - **EVM Chains**: Ethereum, Arbitrum, Base, BSC, Avalanche, and more — `wagmi/viem` and `ethers` signers supported
175
+ - **Solana**: Native Solana program support with full vault functionality
176
+ - **Stellar**: Stellar vault deposit, redeem, and position queries
177
+ - **Sui**: chain ID `-2`, address and version (`sui-0`) recognition; vault reads are not supported yet
178
+ - Unified interface across all chains
179
+
180
+ ### Vault Versions
181
+
182
+ - `evm-0/evm-1`: Legacy vault contracts
183
+ - `evm-2`: Current EVM vault architecture (separate receipt tokens)
184
+ - `sol-0`: Solana program-based vaults
185
+ - `stellar-0`: Stellar-based vaults
186
+
187
+ ### Data Enrichment
188
+
189
+ All vault queries support optional enrichment:
190
+
191
+ - `loans`: Include active loan data
192
+ - `allocations`: DeFi/CeFi/OTC position breakdowns
193
+ - `wallet`: User-specific position data
194
+
195
+ ## API Reference
196
+
197
+ ### Vault Queries
198
+
199
+ | Method | Description |
200
+ | --- | --- |
201
+ | `getVaults(options?)` | Fetch all vaults across chains |
202
+ | `getVault({ vault, chainId?, options? })` | Get single vault details |
203
+ | `getVaultLoans({ vault, chainId? })` | Fetch active loans |
204
+ | `getVaultAllocations({ vault, chainId? })` | Get allocation breakdown |
205
+ | `getVaultHistoricalTimeseries({ vault, chainId? })` | Historical APY and TVL timeseries |
206
+ | `getVaultApy({ vault, historical? })` | **@deprecated** — use `getVaultHistoricalTimeseries` |
207
+ | `getVaultTvl({ vault, historical? })` | Current/historical TVL |
208
+ | `getVaultAnnualizedApy({ vault })` | Annualized APY for a vault |
209
+ | `getVaultSummary({ vault })` | Aggregated vault summary |
210
+ | `getVaultPnl({ vault, chainId? })` | Vault-level PnL |
211
+ | `getVaultUnrealizedPnlHistory({ vault, chainId?, ... })` | Unrealized PnL timeseries |
212
+ | `getLatestUnrealizedPnl()` | Latest unrealized PnL snapshot across all vaults |
213
+ | `getYieldLastRealizedOn({ vault, chainId? })` | Timestamp of last yield realization |
214
+ | `getTotalDeposited(options?)` | Total deposited across vaults |
215
+
216
+ ### User Positions
217
+
218
+ | Method | Description |
219
+ | --- | --- |
220
+ | `getVaultPositions({ wallet?, vault?, chainId? })` | User vault positions |
221
+ | `getVaultAvailableRedemptions({ vault, wallet?, chainId, verbose? })` | Claimable redemptions |
222
+ | `getVaultRedemptionHistory({ vault, wallet?, chainId? })` | Historical redemptions |
223
+ | `getVaultUserHistory({ wallet, vault?, chainId? })` | Transaction history |
224
+ | `getVaultUserTransfers({ wallet, vault?, chainId? })` | Transfer history |
225
+ | `getVaultUserLifetimePnl({ wallet, vault?, chainId? })` | Lifetime PnL for a wallet |
226
+ | `getVaultStakingPositions({ wallet, chainId })` | Staking positions |
227
+ | `getVaultBorrowerHealthFactor(props?)` | Borrower health factor |
228
+ | `getVaultWithdrawals({ vault, chainId? })` | Pending withdrawals |
229
+
230
+ ### Points
231
+
232
+ | Method | Description |
233
+ | --- | --- |
234
+ | `getUserPoints(userAddress)` | Points balance for a wallet |
235
+ | `registerUserForPoints({ wallet, referral? })` | Register a wallet for the points program |
236
+ | `fetchPointsLeaderboard(params?)` | Points leaderboard |
237
+
238
+ ### Write Operations (top-level)
239
+
240
+ | Method | Description |
241
+ | --- | --- |
242
+ | `vaultDeposit(signer, options)` | Deposit into a vault |
243
+ | `previewRedemption(props)` | Preview redemption output before broadcasting |
244
+
245
+ ### Cross-Chain (LayerZero)
246
+
247
+ | Method | Description |
248
+ | --- | --- |
249
+ | `getLayerZeroDeposits({ wallet?, chainId? })` | LayerZero deposit history |
250
+ | `getLayerZeroRedeems(props?)` | LayerZero redemption history |
251
+
252
+ ### Utilities
253
+
254
+ | Method | Description |
255
+ | --- | --- |
256
+ | `getPrice(symbol)` | Token price in USD |
257
+ | `switchNetwork(chainId)` | Change active chain |
258
+ | `updateWallet(address)` | Set active wallet for tracking |
259
+
260
+ ### Sub-Accounts (`sdk.subAccountsModule`)
261
+
262
+ | Method | Description |
263
+ | --- | --- |
264
+ | `getSubaccountHealthFactor(address)` | Health factor for a sub-account |
265
+ | `getSubaccountLoans(address)` | Active loans for a sub-account |
266
+ | `getSubaccountCefiPositions(address)` | CeFi positions |
267
+ | `getSubaccountOtcPositions(address)` | OTC positions |
268
+ | `getSubaccountSummary(address)` | Aggregated sub-account summary |
269
+
270
+ ### EVM Adapter (`sdk.evm`)
271
+
272
+ Set a signer before calling write methods:
273
+
274
+ ```typescript
275
+ // ethers
276
+ import { JsonRpcProvider, Wallet } from 'ethers';
277
+ const wallet = new Wallet(process.env.PRIVATE_KEY!, new JsonRpcProvider(rpcUrl));
278
+ sdk.evm.setSigner(wallet);
279
+
280
+ // wagmi/viem (browser)
281
+ import { useWalletClient } from 'wagmi';
282
+ const { data: walletClient } = useWalletClient();
283
+ if (walletClient) sdk.evm.setSigner(walletClient);
284
+ ```
285
+
286
+ **Write methods:**
287
+
288
+ | Method | Description |
289
+ | --- | --- |
290
+ | `vaultApprove(options)` | Approve token spend for a vault |
291
+ | `approve(options)` | Generic ERC-20 approve |
292
+ | `vaultDeposit(options)` | Deposit assets into a vault |
293
+ | `vaultRequestRedeem(options)` | Request a withdrawal/redemption |
294
+ | `vaultRedeem(signer, options)` | Claim an available redemption |
295
+ | `depositNative(options)` | Deposit native tokens (ETH, etc.) |
296
+ | `swapAndDeposit(options)` | Swap and deposit in one call |
297
+ | `depositViaSwapRouter(options)` | Deposit via the swap router |
298
+ | `depositNativeViaSwapRouter(options)` | Deposit native via the swap router |
299
+
300
+ **Read helpers (return raw `bigint`):**
301
+
302
+ | Method | Description |
303
+ | --- | --- |
304
+ | `previewDeposit(options)` | Shares minted for a deposit amount |
305
+ | `previewRedeem(options)` | Assets returned for a share amount |
306
+ | `allowance(options)` | ERC-20 allowance granted to the vault |
307
+ | `balanceOf(options)` | ERC-20 balance for any token/owner |
308
+ | `maxDeposit(options)` | Maximum deposit accepted by the vault |
309
+ | `vaultAllowance(options)` | Vault-specific allowance check |
310
+ | `getDeposited(options)` | Current deposited balance |
311
+ | `getRemainingAllocations(options)` | Remaining allocation capacity |
312
+ | `isWhitelisted(options)` | Check whitelist status |
313
+
314
+ ### Solana Adapter (`sdk.solana`)
315
+
316
+ | Method | Description |
317
+ | --- | --- |
318
+ | `getVaultState(...)` | Vault state from the Solana program |
319
+ | `getVaultStateReadOnly(...)` | Read-only vault state |
320
+ | `getToken(mintAddress)` | SPL token info |
321
+ | `getTokenSymbol(mintAddress)` | Token symbol |
322
+ | `fetchUserTokenBalance(publicKey, mint)` | User SPL token balance |
323
+ | `fetchUserShareBalance(publicKey, vault)` | User share balance |
324
+ | `fetchUserShareBalanceRaw(publicKey, vault)` | Raw share balance (bigint) |
325
+
326
+ ### Stellar Adapter (`sdk.stellar`)
327
+
328
+ | Method | Description |
329
+ | --- | --- |
330
+ | `vaultDeposit(options)` | Deposit into a Stellar vault |
331
+ | `vaultRedeem(options)` | Redeem from a Stellar vault |
332
+ | `submitTransaction(signedXdr)` | Submit a signed XDR transaction |
333
+ | `getUserPosition(options)` | User position in a Stellar vault |
334
+ | `convertToShares(options)` | Convert an asset amount to shares |
335
+
336
+ ### Sui Adapter (`sdk.sui`)
337
+
338
+ | Method | Description |
339
+ | --- | --- |
340
+ | `isSuiAddress(address)` | Whether a string is a Sui address / object ID (`0x` + 64 hex) |
341
+ | `isSuiVault(chainId)` | Whether a chain ID is Sui's (`-2`) |
342
+ | `network`, `rpcUrl` | The `sui` config passed to `new UpshiftSDK({ sui })` |
343
+
344
+ ## Code Conventions
345
+
346
+ ### Naming Patterns
347
+
348
+ - **Interfaces**: Prefixed with `I` (e.g., `IVault`, `IVaultLoan`)
349
+ - **ABIs**: Prefixed with `ABI_` (e.g., `ABI_LENDING_POOL_V2`)
350
+ - **Types**: Descriptive names (e.g., `IAddress`, `IChainId`)
351
+
352
+ ### Special Comment Tags
353
+
354
+ Search the codebase for these to find important areas:
355
+
356
+ - `@todo`: Planned improvements or missing features
357
+ - `@hardcoded`: Hardcoded values that may need configuration
358
+ - `@solana`: Solana-specific logic or notes
359
+
360
+ ### Error Handling
361
+
362
+ Every public method throws typed errors that subclass `UpshiftSDKError`:
363
+
364
+ ```typescript
365
+ import { UpshiftValidationError, UpshiftTimeoutError, UpshiftSDKError } from '@upshiftfinance/sdk';
366
+
367
+ try {
368
+ await sdk.evm.vaultDeposit({ target: '0x...', wallet: owner, amount: '1' });
369
+ } catch (err) {
370
+ if (err instanceof UpshiftValidationError) showFormError(err.message);
371
+ else if (err instanceof UpshiftTimeoutError) scheduleRetry(err.timeoutMs);
372
+ else if (err instanceof UpshiftSDKError) reportError(err.code, err.cause);
373
+ else throw err;
374
+ }
375
+ ```
376
+
377
+ - Automatic retry with exponential backoff for network errors
378
+ - 90-second request timeout (configurable via `REQUEST_TIMEOUT_MS`)
379
+ - Correlation IDs in errors for debugging
380
+
381
+ ### Environment Configuration
382
+
383
+ ```typescript
384
+ // Development mode — enables console logging
385
+ const sdk = new UpshiftSDK({ appName: 'my-app', providers: { /* ... */ }, monitoring: { env: 'DEV' } });
386
+
387
+ // Production mode — default, no console logs
388
+ const sdk = new UpshiftSDK({ appName: 'my-app', providers: { /* ... */ } });
389
+ ```
390
+
391
+ ## Development
392
+
393
+ ### Running Tests
394
+
395
+ ```bash
396
+ pnpm test
397
+ ```
398
+
399
+ ### Building
400
+
401
+ ```bash
402
+ pnpm build
403
+ ```
404
+
405
+ ## Support
406
+
407
+ - **Issues**: [GitHub Issues](https://github.com/upshift-protocol/upshift-sdk/issues)
408
+ - **Documentation**: [docs.augustdigital.io](https://docs.augustdigital.io/developers/javascript-sdk)
409
+ - **Example App**: [starter.upshift.finance](https://starter.upshift.finance/)
@@ -0,0 +1,28 @@
1
+ export declare const ABI_ADDRESS_RESOLVER: readonly [{
2
+ readonly name: "addr";
3
+ readonly type: "function";
4
+ readonly stateMutability: "view";
5
+ readonly inputs: readonly [{
6
+ readonly name: "name";
7
+ readonly type: "bytes32";
8
+ }];
9
+ readonly outputs: readonly [{
10
+ readonly name: "";
11
+ readonly type: "address";
12
+ }];
13
+ }, {
14
+ readonly name: "addr";
15
+ readonly type: "function";
16
+ readonly stateMutability: "view";
17
+ readonly inputs: readonly [{
18
+ readonly name: "name";
19
+ readonly type: "bytes32";
20
+ }, {
21
+ readonly name: "coinType";
22
+ readonly type: "uint256";
23
+ }];
24
+ readonly outputs: readonly [{
25
+ readonly name: "";
26
+ readonly type: "bytes";
27
+ }];
28
+ }];
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ABI_ADDRESS_RESOLVER = void 0;
4
+ exports.ABI_ADDRESS_RESOLVER = [
5
+ {
6
+ name: 'addr',
7
+ type: 'function',
8
+ stateMutability: 'view',
9
+ inputs: [{ name: 'name', type: 'bytes32' }],
10
+ outputs: [{ name: '', type: 'address' }],
11
+ },
12
+ {
13
+ name: 'addr',
14
+ type: 'function',
15
+ stateMutability: 'view',
16
+ inputs: [
17
+ { name: 'name', type: 'bytes32' },
18
+ { name: 'coinType', type: 'uint256' },
19
+ ],
20
+ outputs: [{ name: '', type: 'bytes' }],
21
+ },
22
+ ];
23
+ //# sourceMappingURL=AddressResolver.js.map
@@ -0,0 +1,87 @@
1
+ export declare const ABI_CHAINLINK_V3: readonly [{
2
+ readonly inputs: readonly [];
3
+ readonly name: "decimals";
4
+ readonly outputs: readonly [{
5
+ readonly internalType: "uint8";
6
+ readonly name: "";
7
+ readonly type: "uint8";
8
+ }];
9
+ readonly stateMutability: "view";
10
+ readonly type: "function";
11
+ }, {
12
+ readonly inputs: readonly [];
13
+ readonly name: "description";
14
+ readonly outputs: readonly [{
15
+ readonly internalType: "string";
16
+ readonly name: "";
17
+ readonly type: "string";
18
+ }];
19
+ readonly stateMutability: "view";
20
+ readonly type: "function";
21
+ }, {
22
+ readonly inputs: readonly [{
23
+ readonly internalType: "uint80";
24
+ readonly name: "_roundId";
25
+ readonly type: "uint80";
26
+ }];
27
+ readonly name: "getRoundData";
28
+ readonly outputs: readonly [{
29
+ readonly internalType: "uint80";
30
+ readonly name: "roundId";
31
+ readonly type: "uint80";
32
+ }, {
33
+ readonly internalType: "int256";
34
+ readonly name: "answer";
35
+ readonly type: "int256";
36
+ }, {
37
+ readonly internalType: "uint256";
38
+ readonly name: "startedAt";
39
+ readonly type: "uint256";
40
+ }, {
41
+ readonly internalType: "uint256";
42
+ readonly name: "updatedAt";
43
+ readonly type: "uint256";
44
+ }, {
45
+ readonly internalType: "uint80";
46
+ readonly name: "answeredInRound";
47
+ readonly type: "uint80";
48
+ }];
49
+ readonly stateMutability: "view";
50
+ readonly type: "function";
51
+ }, {
52
+ readonly inputs: readonly [];
53
+ readonly name: "latestRoundData";
54
+ readonly outputs: readonly [{
55
+ readonly internalType: "uint80";
56
+ readonly name: "roundId";
57
+ readonly type: "uint80";
58
+ }, {
59
+ readonly internalType: "int256";
60
+ readonly name: "answer";
61
+ readonly type: "int256";
62
+ }, {
63
+ readonly internalType: "uint256";
64
+ readonly name: "startedAt";
65
+ readonly type: "uint256";
66
+ }, {
67
+ readonly internalType: "uint256";
68
+ readonly name: "updatedAt";
69
+ readonly type: "uint256";
70
+ }, {
71
+ readonly internalType: "uint80";
72
+ readonly name: "answeredInRound";
73
+ readonly type: "uint80";
74
+ }];
75
+ readonly stateMutability: "view";
76
+ readonly type: "function";
77
+ }, {
78
+ readonly inputs: readonly [];
79
+ readonly name: "version";
80
+ readonly outputs: readonly [{
81
+ readonly internalType: "uint256";
82
+ readonly name: "";
83
+ readonly type: "uint256";
84
+ }];
85
+ readonly stateMutability: "view";
86
+ readonly type: "function";
87
+ }];
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ABI_CHAINLINK_V3 = void 0;
4
+ exports.ABI_CHAINLINK_V3 = [
5
+ {
6
+ inputs: [],
7
+ name: 'decimals',
8
+ outputs: [
9
+ {
10
+ internalType: 'uint8',
11
+ name: '',
12
+ type: 'uint8',
13
+ },
14
+ ],
15
+ stateMutability: 'view',
16
+ type: 'function',
17
+ },
18
+ {
19
+ inputs: [],
20
+ name: 'description',
21
+ outputs: [
22
+ {
23
+ internalType: 'string',
24
+ name: '',
25
+ type: 'string',
26
+ },
27
+ ],
28
+ stateMutability: 'view',
29
+ type: 'function',
30
+ },
31
+ {
32
+ inputs: [
33
+ {
34
+ internalType: 'uint80',
35
+ name: '_roundId',
36
+ type: 'uint80',
37
+ },
38
+ ],
39
+ name: 'getRoundData',
40
+ outputs: [
41
+ {
42
+ internalType: 'uint80',
43
+ name: 'roundId',
44
+ type: 'uint80',
45
+ },
46
+ {
47
+ internalType: 'int256',
48
+ name: 'answer',
49
+ type: 'int256',
50
+ },
51
+ {
52
+ internalType: 'uint256',
53
+ name: 'startedAt',
54
+ type: 'uint256',
55
+ },
56
+ {
57
+ internalType: 'uint256',
58
+ name: 'updatedAt',
59
+ type: 'uint256',
60
+ },
61
+ {
62
+ internalType: 'uint80',
63
+ name: 'answeredInRound',
64
+ type: 'uint80',
65
+ },
66
+ ],
67
+ stateMutability: 'view',
68
+ type: 'function',
69
+ },
70
+ {
71
+ inputs: [],
72
+ name: 'latestRoundData',
73
+ outputs: [
74
+ {
75
+ internalType: 'uint80',
76
+ name: 'roundId',
77
+ type: 'uint80',
78
+ },
79
+ {
80
+ internalType: 'int256',
81
+ name: 'answer',
82
+ type: 'int256',
83
+ },
84
+ {
85
+ internalType: 'uint256',
86
+ name: 'startedAt',
87
+ type: 'uint256',
88
+ },
89
+ {
90
+ internalType: 'uint256',
91
+ name: 'updatedAt',
92
+ type: 'uint256',
93
+ },
94
+ {
95
+ internalType: 'uint80',
96
+ name: 'answeredInRound',
97
+ type: 'uint80',
98
+ },
99
+ ],
100
+ stateMutability: 'view',
101
+ type: 'function',
102
+ },
103
+ {
104
+ inputs: [],
105
+ name: 'version',
106
+ outputs: [
107
+ {
108
+ internalType: 'uint256',
109
+ name: '',
110
+ type: 'uint256',
111
+ },
112
+ ],
113
+ stateMutability: 'view',
114
+ type: 'function',
115
+ },
116
+ ];
117
+ //# sourceMappingURL=ChainlinkV3.js.map