@alphafi/alphafi-sdk 0.0.94 → 0.0.95

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 (224) hide show
  1. package/dist/cjs/graphql/fetchData.js +1 -1
  2. package/dist/cjs/graphql/fetchData.js.map +1 -1
  3. package/dist/cjs/graphql/getMultiReceipts.d.ts.map +1 -1
  4. package/dist/cjs/graphql/getMultiReceipts.js +8 -6
  5. package/dist/cjs/graphql/getMultiReceipts.js.map +1 -1
  6. package/dist/cjs/graphql/queries/getMultiReceipts.js +1 -1
  7. package/dist/cjs/graphql/queries/getMultiReceipts.js.map +1 -1
  8. package/dist/esm/graphql/fetchData.js +1 -1
  9. package/dist/esm/graphql/fetchData.js.map +1 -1
  10. package/dist/esm/graphql/getMultiReceipts.d.ts.map +1 -1
  11. package/dist/esm/graphql/getMultiReceipts.js +8 -6
  12. package/dist/esm/graphql/getMultiReceipts.js.map +1 -1
  13. package/dist/esm/graphql/queries/getMultiReceipts.js +1 -1
  14. package/dist/esm/graphql/queries/getMultiReceipts.js.map +1 -1
  15. package/docs/functions/alphaLpBreakdown.html +1 -1
  16. package/docs/functions/cetusLpBreakdown.html +1 -1
  17. package/docs/functions/claimRewardTxb.html +1 -1
  18. package/docs/functions/claimRewardsTxb.html +1 -1
  19. package/docs/functions/coinAmountToXTokensDoubleAsset.html +1 -1
  20. package/docs/functions/coinAmountToXTokensSingleAsset.html +1 -1
  21. package/docs/functions/coinsInPool.html +1 -1
  22. package/docs/functions/collectAndSwapRewardsSingleLoop.html +1 -1
  23. package/docs/functions/collectRewardTxb.html +1 -1
  24. package/docs/functions/collectRewards.html +1 -1
  25. package/docs/functions/deposit.html +1 -1
  26. package/docs/functions/depositDoubleAssetTxb.html +1 -1
  27. package/docs/functions/depositSingleAssetTxb.html +1 -1
  28. package/docs/functions/fetchAfterTransactionEvents.html +1 -1
  29. package/docs/functions/fetchAirdropClaimEvents.html +1 -1
  30. package/docs/functions/fetchAutoCompoundingEvents.html +1 -1
  31. package/docs/functions/fetchAutoCompoundingEventsGql.html +1 -1
  32. package/docs/functions/fetchCetusPools.html +1 -1
  33. package/docs/functions/fetchChainIdentifier.html +1 -1
  34. package/docs/functions/fetchCheckRatioEvents.html +1 -1
  35. package/docs/functions/fetchEvents.html +1 -1
  36. package/docs/functions/fetchLiquidityChangeEvents.html +1 -1
  37. package/docs/functions/fetchMultiCategoryEvents.html +1 -1
  38. package/docs/functions/fetchMultiReceipts.html +1 -1
  39. package/docs/functions/fetchNftHolders.html +1 -1
  40. package/docs/functions/fetchPools.html +1 -1
  41. package/docs/functions/fetchPortfolioData.html +1 -1
  42. package/docs/functions/fetchProtocolData.html +1 -1
  43. package/docs/functions/fetchRequiredPrices.html +1 -1
  44. package/docs/functions/fetchTVL.html +1 -1
  45. package/docs/functions/fetchTransactions.html +1 -1
  46. package/docs/functions/fetchUserVaultBalances.html +1 -1
  47. package/docs/functions/fetchUserVaults.html +1 -1
  48. package/docs/functions/fetchUserWalletData.html +1 -1
  49. package/docs/functions/fetchVoloExchangeRate.html +1 -1
  50. package/docs/functions/fetchWithdrawV2Events.html +1 -1
  51. package/docs/functions/getAirdropShare.html +1 -1
  52. package/docs/functions/getAllDoubleAssetVaults.html +1 -1
  53. package/docs/functions/getAllSingleAssetVaults.html +1 -1
  54. package/docs/functions/getAllVaultBalances.html +1 -1
  55. package/docs/functions/getAllVaults.html +1 -1
  56. package/docs/functions/getAlphaUnlocks.html +1 -1
  57. package/docs/functions/getAlphaVaultBalance.html +1 -1
  58. package/docs/functions/getAmounts.html +1 -1
  59. package/docs/functions/getApr.html +1 -1
  60. package/docs/functions/getAprs.html +1 -1
  61. package/docs/functions/getApy.html +1 -1
  62. package/docs/functions/getApys.html +1 -1
  63. package/docs/functions/getCetusInvestorTicksMap.html +1 -1
  64. package/docs/functions/getCetusPool.html +1 -1
  65. package/docs/functions/getCetusSqrtPriceMap.html +1 -1
  66. package/docs/functions/getCoinAmountsFromLiquidity.html +1 -1
  67. package/docs/functions/getConf.html +1 -1
  68. package/docs/functions/getCurrentTick.html +1 -1
  69. package/docs/functions/getDistributor.html +1 -1
  70. package/docs/functions/getDoubleAssetVaultBalance.html +1 -1
  71. package/docs/functions/getDoubleAssetVaults.html +1 -1
  72. package/docs/functions/getInvestor.html +1 -1
  73. package/docs/functions/getInvestorPoolMap.html +1 -1
  74. package/docs/functions/getLastAutoCompoundTime.html +1 -1
  75. package/docs/functions/getLatestPrices.html +1 -1
  76. package/docs/functions/getLiquidity.html +1 -1
  77. package/docs/functions/getMultiCetusPool.html +1 -1
  78. package/docs/functions/getMultiInvestor.html +1 -1
  79. package/docs/functions/getMultiLatestPrices.html +1 -1
  80. package/docs/functions/getMultiParentPool.html +1 -1
  81. package/docs/functions/getMultiPool.html +1 -1
  82. package/docs/functions/getMultiReceipts.html +1 -1
  83. package/docs/functions/getParentPool.html +1 -1
  84. package/docs/functions/getPool.html +1 -1
  85. package/docs/functions/getPoolExchangeRate.html +1 -1
  86. package/docs/functions/getPoolExchangeRateMap.html +1 -1
  87. package/docs/functions/getPoolsWeightDistribution.html +1 -1
  88. package/docs/functions/getPositionRange.html +1 -1
  89. package/docs/functions/getPositionRanges.html +1 -1
  90. package/docs/functions/getPositionTicks.html +1 -1
  91. package/docs/functions/getPriceToTick.html +1 -1
  92. package/docs/functions/getRebalanceHistories.html +1 -1
  93. package/docs/functions/getRebalanceHistory.html +1 -1
  94. package/docs/functions/getReceipts.html +1 -1
  95. package/docs/functions/getSingleAssetVaultBalance.html +1 -1
  96. package/docs/functions/getSingleAssetVaults.html +1 -1
  97. package/docs/functions/getSuiClient.html +2 -2
  98. package/docs/functions/getSuiNodeUrl.html +2 -2
  99. package/docs/functions/getTVLs-1.html +1 -1
  100. package/docs/functions/getTickSpacing.html +1 -1
  101. package/docs/functions/getTickToPrice.html +1 -1
  102. package/docs/functions/getTvls.html +1 -1
  103. package/docs/functions/getVaultBalance.html +1 -1
  104. package/docs/functions/getVaults.html +1 -1
  105. package/docs/functions/lastAutocompoundTime.html +1 -1
  106. package/docs/functions/liquidityToTokens.html +1 -1
  107. package/docs/functions/migrateBoostedToLoop.html +1 -1
  108. package/docs/functions/multiLiquidityToTokens.html +1 -1
  109. package/docs/functions/multiTokensToUsd.html +1 -1
  110. package/docs/functions/multiXTokensToLiquidity.html +1 -1
  111. package/docs/functions/parseUserWalletData.html +1 -1
  112. package/docs/functions/pendingRewardAmount.html +1 -1
  113. package/docs/functions/setCustomSuiClient.html +2 -2
  114. package/docs/functions/setSuiClient.html +2 -2
  115. package/docs/functions/setSuiNodeUrl.html +2 -2
  116. package/docs/functions/setWeights.html +1 -1
  117. package/docs/functions/withdraw.html +1 -1
  118. package/docs/functions/withdrawAlphaTxb.html +1 -1
  119. package/docs/functions/withdrawTxb.html +1 -1
  120. package/docs/functions/zapDepositQuoteTxb.html +1 -1
  121. package/docs/functions/zapDepositTxb.html +1 -1
  122. package/docs/hierarchy.html +1 -1
  123. package/docs/index.html +2 -2
  124. package/docs/interfaces/Coin.html +6 -6
  125. package/docs/interfaces/CoinPair.html +2 -2
  126. package/docs/interfaces/CommonEventAttributes.html +2 -2
  127. package/docs/interfaces/NaviVoloData.html +2 -2
  128. package/docs/interfaces/PoolData.html +2 -2
  129. package/docs/interfaces/PoolWeightDistribution.html +2 -2
  130. package/docs/interfaces/RebalanceHistoryType.html +2 -2
  131. package/docs/modules.html +1 -1
  132. package/docs/types/AfterTransactionEventNode.html +1 -1
  133. package/docs/types/AirdropClaimEventNode.html +1 -1
  134. package/docs/types/Allocator.html +2 -2
  135. package/docs/types/AlphaFiDoubleAssetVault.html +2 -2
  136. package/docs/types/AlphaFiMultiVaultBalance.html +1 -1
  137. package/docs/types/AlphaFiSingleAssetVault.html +2 -2
  138. package/docs/types/AlphaFiVault.html +1 -1
  139. package/docs/types/AlphaFiVaultBalance.html +1 -1
  140. package/docs/types/AlphaLendInvestor.html +1 -1
  141. package/docs/types/AlphaPoolType.html +2 -2
  142. package/docs/types/AlphaReceipt.html +2 -2
  143. package/docs/types/AlphaReceiptFields.html +2 -2
  144. package/docs/types/AlphaVaultBalance.html +2 -2
  145. package/docs/types/AutoBalancePoolNames.html +1 -1
  146. package/docs/types/AutoCompoundingEventNode.html +1 -1
  147. package/docs/types/BluefinInvestor.html +1 -1
  148. package/docs/types/BluefinPoolType.html +2 -2
  149. package/docs/types/BucketInvestor.html +2 -2
  150. package/docs/types/CetusInvestor.html +2 -2
  151. package/docs/types/CetusPoolType.html +2 -2
  152. package/docs/types/CetusSwapOptions.html +1 -1
  153. package/docs/types/CoinAmounts.html +2 -2
  154. package/docs/types/CoinName.html +1 -1
  155. package/docs/types/CoinType.html +1 -1
  156. package/docs/types/CommonInvestorFields.html +2 -2
  157. package/docs/types/CreatePoolOptions.html +2 -2
  158. package/docs/types/Distributor.html +2 -2
  159. package/docs/types/DoubleAssetMultiVaultBalance.html +2 -2
  160. package/docs/types/DoubleAssetPoolNames.html +1 -1
  161. package/docs/types/DoubleAssetTokenHoldings.html +2 -2
  162. package/docs/types/DoubleAssetVaultBalance.html +2 -2
  163. package/docs/types/EventCategory.html +1 -1
  164. package/docs/types/EventNode.html +1 -1
  165. package/docs/types/GetHoldersParams.html +2 -2
  166. package/docs/types/GetTokenHoldingsParams.html +2 -2
  167. package/docs/types/GetUserTokensFromTransactionsParams.html +2 -2
  168. package/docs/types/GetUserTokensInUsdFromTransactionsParams.html +2 -2
  169. package/docs/types/GetVaultBalanceParams.html +1 -1
  170. package/docs/types/HoldingsObj.html +2 -2
  171. package/docs/types/Icon.html +1 -1
  172. package/docs/types/Investor.html +1 -1
  173. package/docs/types/LiquidityChangeEventNode.html +1 -1
  174. package/docs/types/LiquidityToTokensParams.html +2 -2
  175. package/docs/types/LiquidityToUsdParams.html +2 -2
  176. package/docs/types/LoopingDebt.html +2 -2
  177. package/docs/types/LoopingPoolNames.html +1 -1
  178. package/docs/types/LpBreakdownType.html +2 -2
  179. package/docs/types/MemberPoolDataType.html +2 -2
  180. package/docs/types/MemberType.html +2 -2
  181. package/docs/types/MultiGetVaultBalancesParams.html +2 -2
  182. package/docs/types/NaviInvestor.html +2 -2
  183. package/docs/types/OtherReceiptFields.html +2 -2
  184. package/docs/types/PoolName.html +1 -1
  185. package/docs/types/PoolReceipt.html +1 -1
  186. package/docs/types/PoolType.html +2 -2
  187. package/docs/types/Receipt.html +2 -2
  188. package/docs/types/ReceiptGQL.html +2 -2
  189. package/docs/types/SingleAssetMultiVaultBalance.html +2 -2
  190. package/docs/types/SingleAssetPoolNames.html +1 -1
  191. package/docs/types/SingleAssetTokenHoldings.html +2 -2
  192. package/docs/types/SingleAssetVaultBalance.html +2 -2
  193. package/docs/types/SingleGetVaultBalancesParams.html +2 -2
  194. package/docs/types/StrategyType.html +1 -1
  195. package/docs/types/SuiNetwork.html +1 -1
  196. package/docs/types/SwapOptions.html +1 -1
  197. package/docs/types/TickSpacing.html +1 -1
  198. package/docs/types/TotalWeightType.html +2 -2
  199. package/docs/types/TransactionBlockType.html +2 -2
  200. package/docs/types/UserPoolLiquidity.html +2 -2
  201. package/docs/types/UserPoolTokenHoldings.html +1 -1
  202. package/docs/types/UserUsdHoldings.html +2 -2
  203. package/docs/types/VaultBalance.html +1 -1
  204. package/docs/types/VoteCastEvent.html +1 -1
  205. package/docs/types/WithdrawV2EventNode.html +1 -1
  206. package/docs/variables/AUTOBALANCE_SUI_FIRST_POOLS.html +1 -1
  207. package/docs/variables/AUTOBALANCE_SUI_SECOND_POOLS.html +1 -1
  208. package/docs/variables/AUTOBALANCE_TYPE_1_POOLS.html +1 -1
  209. package/docs/variables/alphalendMarketIdMap.html +1 -1
  210. package/docs/variables/bluefinPoolMap.html +1 -1
  211. package/docs/variables/cetusPoolMap.html +1 -1
  212. package/docs/variables/coinsList.html +1 -1
  213. package/docs/variables/defunctPoolsSet.html +1 -1
  214. package/docs/variables/doubleAssetPoolCoinMap.html +1 -1
  215. package/docs/variables/eventCategories.html +1 -1
  216. package/docs/variables/ignoredWalletsForDailyRevenue.html +1 -1
  217. package/docs/variables/loopingAccountAddresses.html +1 -1
  218. package/docs/variables/loopingPoolCoinMap.html +1 -1
  219. package/docs/variables/naviAssetMap.html +1 -1
  220. package/docs/variables/poolIdPoolNameMap.html +1 -1
  221. package/docs/variables/poolInfo.html +1 -1
  222. package/docs/variables/singleAssetPoolCoinMap.html +1 -1
  223. package/docs/variables/stableCoins.html +1 -1
  224. package/package.json +1 -1
@@ -49,7 +49,7 @@ async function fetchUserVaults(walletAddress) {
49
49
  address: walletAddress,
50
50
  },
51
51
  });
52
- return data?.owner;
52
+ return data?.address;
53
53
  }
54
54
  async function fetchUserVaultBalances(walletAddress) {
55
55
  const { data: poolsData } = await client_js_1.default.query({
@@ -1 +1 @@
1
- {"version":3,"file":"fetchData.js","sourceRoot":"","sources":["../../../src/graphql/fetchData.ts"],"names":[],"mappings":";AAAA,2BAA2B;;;AA+B3B,kDAMC;AAED,8CAKC;AAED,gDAMC;AAED,oDAKC;AAED,0CAQC;AAED,wDA2BC;AAED,gCAKC;AAED,0CAKC;;AA9GD;;GAEG;AAEH,oEAAiC;AACjC,6CAUsB;AAcf,KAAK,UAAU,mBAAmB,CAAC,OAAe;IACvD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,mBAAM,CAAC,KAAK,CAAiB;QAClD,KAAK,EAAE,iCAAoB;QAC3B,SAAS,EAAE,EAAE,OAAO,EAAE;KACvB,CAAC,CAAC;IACH,OAAO,IAAI,EAAE,UAAU,CAAC;AAC1B,CAAC;AAEM,KAAK,UAAU,iBAAiB;IACrC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,mBAAM,CAAC,KAAK,CAAe;QAChD,KAAK,EAAE,8BAAiB;KACzB,CAAC,CAAC;IACH,OAAO,IAAI,EAAE,YAAY,CAAC;AAC5B,CAAC;AAEM,KAAK,UAAU,kBAAkB,CAAC,OAAe;IACtD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,mBAAM,CAAC,KAAK,CAAgB;QACjD,KAAK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,CAAC;QACzB,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC;QACxB,GAAG,CAAC,qBAAqB,IAAI,EAAE,CAAC;KACjC,CAAC;IAEF,OAAO,IAAI,CAAC;AACd,CAAC;AAEM,KAAK,UAAU,UAAU;IAC9B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,mBAAM,CAAC,KAAK,CAA0B;QAC3D,KAAK,EAAE,sBAAS;KACjB,CAAC,CAAC;IACH,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AAEM,KAAK,UAAU,eAAe;IACnC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,mBAAM,CAAC,KAAK,CAA0B;QAC3D,KAAK,EAAE,4BAAe;KACvB,CAAC,CAAC;IACH,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AAED,uFAG4C;AAF1C,iJAAA,6BAA6B,OAAA;AAG/B,2DAAuD;AAA9C,qHAAA,eAAe,OAAA;AAExB,0DAA0D","sourcesContent":["// src/graphql/fetchData.ts\n\n/* This file will contain functions that use the Apollo Client to\n/* execute the queries and return data.\n */\n\nimport client from \"./client.js\";\nimport {\n GET_USER_WALLET_DATA,\n GET_PROTOCOL_DATA,\n GET_PORTFOLIO_DATA,\n GET_CHAIN_IDENTIFIER,\n GET_USER_VAULTS,\n GET_USER_VAULT_BALANCES,\n GET_POOLS,\n GET_INVESTORS,\n GET_CETUS_POOLS,\n} from \"./queries.js\";\n\ntype UserWalletData = {\n userWallet: { coins: { name: string; amount: string }[] };\n};\ntype ProtocolData = {\n protocolData: {\n totalValueLocked: unknown;\n pools: { name: string; tvl: unknown }[];\n };\n};\ntype PortfolioData = { portfolio: { poolName: string; investment: unknown }[] };\ntype ChainIdentifier = { chainIdentifier: string };\n\nexport async function fetchUserWalletData(address: string) {\n const { data } = await client.query<UserWalletData>({\n query: GET_USER_WALLET_DATA,\n variables: { address },\n });\n return data?.userWallet;\n}\n\nexport async function fetchProtocolData() {\n const { data } = await client.query<ProtocolData>({\n query: GET_PROTOCOL_DATA,\n });\n return data?.protocolData;\n}\n\nexport async function fetchPortfolioData(address: string) {\n const { data } = await client.query<PortfolioData>({\n query: GET_PORTFOLIO_DATA,\n variables: { address },\n });\n return data?.portfolio;\n}\n\nexport async function fetchChainIdentifier() {\n const { data } = await client.query<ChainIdentifier>({\n query: GET_CHAIN_IDENTIFIER,\n });\n return data?.chainIdentifier;\n}\n\nexport async function fetchUserVaults(walletAddress: string) {\n const { data } = await client.query<{ owner: unknown }>({\n query: GET_USER_VAULTS,\n variables: {\n address: walletAddress,\n },\n });\n return (data as any)?.owner;\n}\n\nexport async function fetchUserVaultBalances(walletAddress: string) {\n const { data: poolsData } = await client.query<Record<string, unknown>>({\n query: GET_POOLS,\n });\n const { data: cetusPoolsData } = await client.query<Record<string, unknown>>({\n query: GET_CETUS_POOLS,\n });\n const { data: investorsData } = await client.query<Record<string, unknown>>({\n query: GET_INVESTORS,\n });\n const { data: userVaultBalancesData } = await client.query<\n Record<string, unknown>\n >({\n query: GET_USER_VAULT_BALANCES,\n variables: {\n address: walletAddress,\n },\n });\n\n const data = {\n ...(poolsData ?? {}),\n ...(cetusPoolsData ?? {}),\n ...(investorsData ?? {}),\n ...(userVaultBalancesData ?? {}),\n };\n\n return data;\n}\n\nexport async function fetchPools() {\n const { data } = await client.query<Record<string, unknown>>({\n query: GET_POOLS,\n });\n return data ?? {};\n}\n\nexport async function fetchCetusPools() {\n const { data } = await client.query<Record<string, unknown>>({\n query: GET_CETUS_POOLS,\n });\n return data ?? {};\n}\n\nexport {\n fetchAutoCompoundingEventsGql,\n AutoCompoundingEventNode,\n} from \"./fetchAutoCompoundingEventsGql.js\";\nexport { fetchNftHolders } from \"./fetchNftHolders.js\";\n\n// Add more functions for other data fetching requirements\n"]}
1
+ {"version":3,"file":"fetchData.js","sourceRoot":"","sources":["../../../src/graphql/fetchData.ts"],"names":[],"mappings":";AAAA,2BAA2B;;;AA+B3B,kDAMC;AAED,8CAKC;AAED,gDAMC;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e,OAAA;AAExB,0DAA0D","sourcesContent":["// src/graphql/fetchData.ts\n\n/* This file will contain functions that use the Apollo Client to\n/* execute the queries and return data.\n */\n\nimport client from \"./client.js\";\nimport {\n GET_USER_WALLET_DATA,\n GET_PROTOCOL_DATA,\n GET_PORTFOLIO_DATA,\n GET_CHAIN_IDENTIFIER,\n GET_USER_VAULTS,\n GET_USER_VAULT_BALANCES,\n GET_POOLS,\n GET_INVESTORS,\n GET_CETUS_POOLS,\n} from \"./queries.js\";\n\ntype UserWalletData = {\n userWallet: { coins: { name: string; amount: string }[] };\n};\ntype ProtocolData = {\n protocolData: {\n totalValueLocked: unknown;\n pools: { name: string; tvl: unknown }[];\n };\n};\ntype PortfolioData = { portfolio: { poolName: string; investment: unknown }[] };\ntype ChainIdentifier = { chainIdentifier: string };\n\nexport async function fetchUserWalletData(address: string) {\n const { data } = await client.query<UserWalletData>({\n query: GET_USER_WALLET_DATA,\n variables: { address },\n });\n return data?.userWallet;\n}\n\nexport async function fetchProtocolData() {\n const { data } = await client.query<ProtocolData>({\n query: GET_PROTOCOL_DATA,\n });\n return data?.protocolData;\n}\n\nexport async function fetchPortfolioData(address: string) {\n const { data } = await client.query<PortfolioData>({\n query: GET_PORTFOLIO_DATA,\n variables: { address },\n });\n return data?.portfolio;\n}\n\nexport async function fetchChainIdentifier() {\n const { data } = await client.query<ChainIdentifier>({\n query: GET_CHAIN_IDENTIFIER,\n });\n return data?.chainIdentifier;\n}\n\nexport async function fetchUserVaults(walletAddress: string) {\n const { data } = await client.query<{ address: unknown }>({\n query: GET_USER_VAULTS,\n variables: {\n address: walletAddress,\n },\n });\n return (data as any)?.address;\n}\n\nexport async function fetchUserVaultBalances(walletAddress: string) {\n const { data: poolsData } = await client.query<Record<string, unknown>>({\n query: GET_POOLS,\n });\n const { data: cetusPoolsData } = await client.query<Record<string, unknown>>({\n query: GET_CETUS_POOLS,\n });\n const { data: investorsData } = await client.query<Record<string, unknown>>({\n query: GET_INVESTORS,\n });\n const { data: userVaultBalancesData } = await client.query<\n Record<string, unknown>\n >({\n query: GET_USER_VAULT_BALANCES,\n variables: {\n address: walletAddress,\n },\n });\n\n const data = {\n ...(poolsData ?? {}),\n ...(cetusPoolsData ?? {}),\n ...(investorsData ?? {}),\n ...(userVaultBalancesData ?? {}),\n };\n\n return data;\n}\n\nexport async function fetchPools() {\n const { data } = await client.query<Record<string, unknown>>({\n query: GET_POOLS,\n });\n return data ?? {};\n}\n\nexport async function fetchCetusPools() {\n const { data } = await client.query<Record<string, unknown>>({\n query: GET_CETUS_POOLS,\n });\n return data ?? {};\n}\n\nexport {\n fetchAutoCompoundingEventsGql,\n AutoCompoundingEventNode,\n} from \"./fetchAutoCompoundingEventsGql.js\";\nexport { fetchNftHolders } from \"./fetchNftHolders.js\";\n\n// Add more functions for other data fetching requirements\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"getMultiReceipts.d.ts","sourceRoot":"","sources":["../../../src/graphql/getMultiReceipts.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA6CxC,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAqFpC"}
1
+ {"version":3,"file":"getMultiReceipts.d.ts","sourceRoot":"","sources":["../../../src/graphql/getMultiReceipts.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA6CxC,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAuFpC"}
@@ -6,18 +6,18 @@ const getMultiReceipts_js_1 = require("./queries/getMultiReceipts.js");
6
6
  const maps_js_1 = require("../common/maps.js");
7
7
  const client = new core_1.ApolloClient({
8
8
  link: new core_1.HttpLink({
9
- uri: "https://sui-mainnet.mystenlabs.com/graphql",
9
+ uri: "https://graphql.mainnet.sui.io/graphql",
10
10
  }),
11
11
  cache: new core_1.InMemoryCache({
12
12
  typePolicies: {
13
- Owner: {
14
- keyFields: (owner) => {
15
- const objectKeys = Object.keys(owner)
13
+ Address: {
14
+ keyFields: (addressObj) => {
15
+ const objectKeys = Object.keys(addressObj)
16
16
  .filter((k) => k !== "__typename")
17
17
  .sort();
18
18
  const uniqueKey = objectKeys.join(",");
19
19
  // Return the final unique ID string
20
- return `Owner:${uniqueKey}`;
20
+ return `Address:${uniqueKey}`;
21
21
  },
22
22
  },
23
23
  },
@@ -66,10 +66,12 @@ async function fetchMultiReceipts(address) {
66
66
  address: address,
67
67
  },
68
68
  });
69
+ console.log("result", result);
69
70
  const data = result.data;
70
71
  if (!data)
71
72
  break;
72
- const receipts = data.owner;
73
+ const receipts = data.address;
74
+ console.log("receipts", receipts);
73
75
  hasNextPage = false;
74
76
  Object.keys(receipts).forEach((key) => {
75
77
  if (key !== "__typename") {
@@ -1 +1 @@
1
- {"version":3,"file":"getMultiReceipts.js","sourceRoot":"","sources":["../../../src/graphql/getMultiReceipts.ts"],"names":[],"mappings":";;AAoDA,gDAuFC;AA3ID,8CAK6B;AAC7B,uEAAsE;AAEtE,+CAA6C;AAO7C,MAAM,MAAM,GAAG,IAAI,mBAAY,CAAC;IAC9B,IAAI,EAAE,IAAI,eAAQ,CAAC;QACjB,GAAG,EAAE,4CAA4C;KAClD,CAAC;IACF,KAAK,EAAE,IAAI,oBAAa,CAAC;QACvB,YAAY,EAAE;YACZ,KAAK,EAAE;gBACL,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE;oBACnB,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;yBAClC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,YAAY,CAAC;yBACjC,IAAI,EAAE,CAAC;oBACV,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBAEvC,oCAA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C,MAAM,GAAG,GAAG,CAAC;wBACpC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE;4BAC1B,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;wBAC3B,CAAC,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CACV,yEAAyE,EACzE,KAAK,CACN,CAAC;QACJ,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBACxC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,EAAE,CAAC;YAChC,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM,UAAU,GAA8B,IAAI,GAAG,EAAE,CAAC;IACxD,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAChC,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QACxC,IAAI,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,GAAG;YAAE,GAAG,GAAG,EAAE,CAAC;QACnB,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClB,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IACH,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import {\n ApolloClient,\n gql,\n HttpLink,\n InMemoryCache,\n} from \"@apollo/client/core\";\nimport { getMultiReceiptsQuery } from \"./queries/getMultiReceipts.js\";\nimport { ReceiptGQL } from \"./types.js\";\nimport { poolInfo } from \"../common/maps.js\";\n\ntype ReceiptType = {\n type: string;\n cursor: string;\n};\n\nconst client = new ApolloClient({\n link: new HttpLink({\n uri: \"https://sui-mainnet.mystenlabs.com/graphql\",\n }),\n cache: new InMemoryCache({\n typePolicies: {\n Owner: {\n keyFields: (owner) => {\n const objectKeys = Object.keys(owner)\n .filter((k) => k !== \"__typename\")\n .sort();\n const uniqueKey = objectKeys.join(\",\");\n\n // Return the final unique ID string\n return `Owner:${uniqueKey}`;\n },\n },\n },\n }),\n});\n\nconst getReceiptTypes = () => {\n const receiptTypes: { [key: string]: ReceiptType } = {};\n const mySet: Set<string> = new Set();\n Object.keys(poolInfo).forEach((pool) => {\n const key = pool.replace(/-/g, \"_\");\n if (!mySet.has(poolInfo[pool].receiptType)) {\n receiptTypes[key] = {\n type: poolInfo[pool].receiptType,\n cursor: \"\",\n } as ReceiptType;\n mySet.add(poolInfo[pool].receiptType);\n }\n });\n return receiptTypes;\n};\n\nexport async function fetchMultiReceipts(\n address: string,\n): Promise<Map<string, ReceiptGQL[]>> {\n const multiReceipts: any[] = [];\n\n const receiptTypes = getReceiptTypes();\n const batchSize = 10; // Set the desired batch size\n\n // Convert the receiptTypes object into an array of entries\n const entries = Object.entries(receiptTypes);\n\n // Create an array to hold the batches\n const batches: { [k: string]: ReceiptType }[] = [];\n //const batches = [];\n // Loop through the entries array and create batches\n for (let i = 0; i < entries.length; i += batchSize) {\n const batchEntries = entries.slice(i, i + batchSize);\n batches.push(Object.fromEntries(batchEntries)); // Convert to object before pushing\n }\n\n for (const receiptTypes of batches) {\n let hasNextPage = true;\n\n try {\n while (hasNextPage) {\n const query = getMultiReceiptsQuery(receiptTypes);\n const GET_RECEIPTS = gql`\n ${query}\n `;\n\n type ReceiptBatchResponse = {\n owner: Record<\n string,\n | undefined\n | {\n pageInfo: { hasNextPage: boolean; endCursor: string };\n nodes: any[];\n }\n >;\n };\n const result = await client.query<ReceiptBatchResponse>({\n query: GET_RECEIPTS,\n variables: {\n address: address,\n },\n });\n\n const data = result.data;\n if (!data) break;\n const receipts = data.owner;\n hasNextPage = false;\n\n Object.keys(receipts).forEach((key) => {\n if (key !== \"__typename\") {\n const entry = receipts[key];\n if (!entry) return;\n const { pageInfo, nodes } = entry;\n hasNextPage = hasNextPage || pageInfo.hasNextPage;\n if (hasNextPage) receiptTypes[key].cursor = pageInfo.endCursor;\n else receiptTypes[key].cursor = \"0\";\n nodes.forEach((node: any) => {\n multiReceipts.push(node);\n });\n }\n });\n }\n } catch (error) {\n console.warn(\n \"Error fetching receipts from GraphQL, now fetching from suiClient query\",\n error,\n );\n } finally {\n Object.keys(receiptTypes).forEach((key) => {\n receiptTypes[key].cursor = \"\";\n });\n }\n }\n\n const receiptMap: Map<string, ReceiptGQL[]> = new Map();\n multiReceipts.forEach((receipt) => {\n const name = receipt.contents.json.name;\n let arr = receiptMap.get(name);\n if (!arr) arr = [];\n arr.push(receipt);\n receiptMap.set(name, arr);\n });\n return receiptMap;\n}\n"]}
1
+ {"version":3,"file":"getMultiReceipts.js","sourceRoot":"","sources":["../../../src/graphql/getMultiReceipts.ts"],"names":[],"mappings":";;AAoDA,gDAyFC;AA7ID,8CAK6B;AAC7B,uEAAsE;AAEtE,+CAA6C;AAO7C,MAAM,MAAM,GAAG,IAAI,mBAAY,CAAC;IAC9B,IAAI,EAAE,IAAI,eAAQ,CAAC;QACjB,GAAG,EAAE,wCAAwC;KAC9C,CAAC;IACF,KAAK,EAAE,IAAI,oBAAa,CAAC;QACvB,YAAY,EAAE;YACZ,OAAO,EAAE;gBACP,SAAS,EAAE,CAAC,UAAU,EAAE,EAAE;oBACxB,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;yBACvC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,YAAY,CAAC;yBACjC,IAAI,EAAE,CAAC;oBACV,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBAEvC,oCAAoC;oBACpC,OAAO,WAAW,SAAS,EAAE,CAAC;gBAChC,CAAC;aACF;SACF;KACF,CAAC;CACH,CAAC,CAAC;A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1D,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC;wBACpC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE;4BAC1B,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;wBAC3B,CAAC,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CACV,yEAAyE,EACzE,KAAK,CACN,CAAC;QACJ,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBACxC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,EAAE,CAAC;YAChC,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM,UAAU,GAA8B,IAAI,GAAG,EAAE,CAAC;IACxD,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAChC,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QACxC,IAAI,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,GAAG;YAAE,GAAG,GAAG,EAAE,CAAC;QACnB,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClB,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IACH,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import {\n ApolloClient,\n gql,\n HttpLink,\n InMemoryCache,\n} from \"@apollo/client/core\";\nimport { getMultiReceiptsQuery } from \"./queries/getMultiReceipts.js\";\nimport { ReceiptGQL } from \"./types.js\";\nimport { poolInfo } from \"../common/maps.js\";\n\ntype ReceiptType = {\n type: string;\n cursor: string;\n};\n\nconst client = new ApolloClient({\n link: new HttpLink({\n uri: \"https://graphql.mainnet.sui.io/graphql\",\n }),\n cache: new InMemoryCache({\n typePolicies: {\n Address: {\n keyFields: (addressObj) => {\n const objectKeys = Object.keys(addressObj)\n .filter((k) => k !== \"__typename\")\n .sort();\n const uniqueKey = objectKeys.join(\",\");\n\n // Return the final unique ID string\n return `Address:${uniqueKey}`;\n },\n },\n },\n }),\n});\n\nconst getReceiptTypes = () => {\n const receiptTypes: { [key: string]: ReceiptType } = {};\n const mySet: Set<string> = new Set();\n Object.keys(poolInfo).forEach((pool) => {\n const key = pool.replace(/-/g, \"_\");\n if (!mySet.has(poolInfo[pool].receiptType)) {\n receiptTypes[key] = {\n type: poolInfo[pool].receiptType,\n cursor: \"\",\n } as ReceiptType;\n mySet.add(poolInfo[pool].receiptType);\n }\n });\n return receiptTypes;\n};\n\nexport async function fetchMultiReceipts(\n address: string,\n): Promise<Map<string, ReceiptGQL[]>> {\n const multiReceipts: any[] = [];\n\n const receiptTypes = getReceiptTypes();\n const batchSize = 10; // Set the desired batch size\n\n // Convert the receiptTypes object into an array of entries\n const entries = Object.entries(receiptTypes);\n\n // Create an array to hold the batches\n const batches: { [k: string]: ReceiptType }[] = [];\n //const batches = [];\n // Loop through the entries array and create batches\n for (let i = 0; i < entries.length; i += batchSize) {\n const batchEntries = entries.slice(i, i + batchSize);\n batches.push(Object.fromEntries(batchEntries)); // Convert to object before pushing\n }\n\n for (const receiptTypes of batches) {\n let hasNextPage = true;\n\n try {\n while (hasNextPage) {\n const query = getMultiReceiptsQuery(receiptTypes);\n const GET_RECEIPTS = gql`\n ${query}\n `;\n\n type ReceiptBatchResponse = {\n address: Record<\n string,\n | undefined\n | {\n pageInfo: { hasNextPage: boolean; endCursor: string };\n nodes: any[];\n }\n >;\n };\n const result = await client.query<ReceiptBatchResponse>({\n query: GET_RECEIPTS,\n variables: {\n address: address,\n },\n });\n console.log(\"result\", result);\n\n const data = result.data;\n if (!data) break;\n const receipts = data.address;\n console.log(\"receipts\", receipts);\n hasNextPage = false;\n\n Object.keys(receipts).forEach((key) => {\n if (key !== \"__typename\") {\n const entry = receipts[key];\n if (!entry) return;\n const { pageInfo, nodes } = entry;\n hasNextPage = hasNextPage || pageInfo.hasNextPage;\n if (hasNextPage) receiptTypes[key].cursor = pageInfo.endCursor;\n else receiptTypes[key].cursor = \"0\";\n nodes.forEach((node: any) => {\n multiReceipts.push(node);\n });\n }\n });\n }\n } catch (error) {\n console.warn(\n \"Error fetching receipts from GraphQL, now fetching from suiClient query\",\n error,\n );\n } finally {\n Object.keys(receiptTypes).forEach((key) => {\n receiptTypes[key].cursor = \"\";\n });\n }\n }\n\n const receiptMap: Map<string, ReceiptGQL[]> = new Map();\n multiReceipts.forEach((receipt) => {\n const name = receipt.contents.json.name;\n let arr = receiptMap.get(name);\n if (!arr) arr = [];\n arr.push(receipt);\n receiptMap.set(name, arr);\n });\n return receiptMap;\n}\n"]}
@@ -4,7 +4,7 @@ exports.getMultiReceiptsQuery = getMultiReceiptsQuery;
4
4
  function getMultiReceiptsQuery(receiptTypes) {
5
5
  let query = `
6
6
  query GetUserVaultBalances($address: SuiAddress!) {
7
- owner(address: $address) {`;
7
+ address(address: $address) {`;
8
8
  Object.keys(receiptTypes).forEach((key) => {
9
9
  if (receiptTypes[key].cursor === "") {
10
10
  query += `
@@ -1 +1 @@
1
- {"version":3,"file":"getMultiReceipts.js","sourceRoot":"","sources":["../../../../src/graphql/queries/getMultiReceipts.ts"],"names":[],"mappings":";;AAAA,sDAsDC;AAtDD,SAAgB,qBAAqB,CAAC,YAAiB;IACrD,IAAI,KAAK,GAAG;;iCAEmB,CAAC;IAEhC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACxC,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;YACpC,KAAK,IAAI;UACL,GAAG;;qBAEQ,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI;;;;;UAKjC,CAAC;QACP,CAAC;aAAM,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC5C,KAAK,IAAI;UACL,GAAG;;qBAEQ,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI;sBACrB,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM;;;;;UAKpC,CAAC;QACP,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;;KAsBN,CAAC;IACJ,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["export function getMultiReceiptsQuery(receiptTypes: any) {\n let query = `\n query GetUserVaultBalances($address: SuiAddress!) {\n owner(address: $address) {`;\n\n Object.keys(receiptTypes).forEach((key) => {\n if (receiptTypes[key].cursor === \"\") {\n query += `\n ${key}: objects(\n filter: {\n type: \"${receiptTypes[key].type}\"\n }\n first: 10\n ) {\n ...ReceiptFields\n }`;\n } else if (receiptTypes[key].cursor !== \"0\") {\n query += `\n ${key}: objects(\n filter: {\n type: \"${receiptTypes[key].type}\"\n after: \"${receiptTypes[key].cursor}\"\n }\n first: 10\n ) {\n ...ReceiptFields\n }`;\n }\n });\n\n query += `\n }\n }\n \n fragment ReceiptFields on MoveObjectConnection {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n address\n version\n digest\n hasPublicTransfer\n contents {\n type {\n repr\n }\n json\n }\n }\n }\n `;\n return query;\n}\n"]}
1
+ {"version":3,"file":"getMultiReceipts.js","sourceRoot":"","sources":["../../../../src/graphql/queries/getMultiReceipts.ts"],"names":[],"mappings":";;AAAA,sDAsDC;AAtDD,SAAgB,qBAAqB,CAAC,YAAiB;IACrD,IAAI,KAAK,GAAG;;mCAEqB,CAAC;IAElC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACxC,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;YACpC,KAAK,IAAI;UACL,GAAG;;qBAEQ,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI;;;;;UAKjC,CAAC;QACP,CAAC;aAAM,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC5C,KAAK,IAAI;UACL,GAAG;;qBAEQ,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI;sBACrB,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM;;;;;UAKpC,CAAC;QACP,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;;KAsBN,CAAC;IACJ,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["export function getMultiReceiptsQuery(receiptTypes: any) {\n let query = `\n query GetUserVaultBalances($address: SuiAddress!) {\n address(address: $address) {`;\n\n Object.keys(receiptTypes).forEach((key) => {\n if (receiptTypes[key].cursor === \"\") {\n query += `\n ${key}: objects(\n filter: {\n type: \"${receiptTypes[key].type}\"\n }\n first: 10\n ) {\n ...ReceiptFields\n }`;\n } else if (receiptTypes[key].cursor !== \"0\") {\n query += `\n ${key}: objects(\n filter: {\n type: \"${receiptTypes[key].type}\"\n after: \"${receiptTypes[key].cursor}\"\n }\n first: 10\n ) {\n ...ReceiptFields\n }`;\n }\n });\n\n query += `\n }\n }\n \n fragment ReceiptFields on MoveObjectConnection {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n address\n version\n digest\n hasPublicTransfer\n contents {\n type {\n repr\n }\n json\n }\n }\n }\n `;\n return query;\n}\n"]}
@@ -37,7 +37,7 @@ export async function fetchUserVaults(walletAddress) {
37
37
  address: walletAddress,
38
38
  },
39
39
  });
40
- return data?.owner;
40
+ return data?.address;
41
41
  }
42
42
  export async function fetchUserVaultBalances(walletAddress) {
43
43
  const { data: poolsData } = await client.query({
@@ -1 +1 @@
1
- {"version":3,"file":"fetchData.js","sour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AAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAA0B;QAC3D,KAAK,EAAE,eAAe;KACvB,CAAC,CAAC;IACH,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AAED,OAAO,EACL,6BAA6B,GAE9B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,0DAA0D","sourcesContent":["// src/graphql/fetchData.ts\n\n/* This file will contain functions that use the Apollo Client to\n/* execute the queries and return data.\n */\n\nimport client from \"./client.js\";\nimport {\n GET_USER_WALLET_DATA,\n GET_PROTOCOL_DATA,\n GET_PORTFOLIO_DATA,\n GET_CHAIN_IDENTIFIER,\n GET_USER_VAULTS,\n GET_USER_VAULT_BALANCES,\n GET_POOLS,\n GET_INVESTORS,\n GET_CETUS_POOLS,\n} from \"./queries.js\";\n\ntype UserWalletData = {\n userWallet: { coins: { name: string; amount: string }[] };\n};\ntype ProtocolData = {\n protocolData: {\n totalValueLocked: unknown;\n pools: { name: string; tvl: unknown }[];\n };\n};\ntype PortfolioData = { portfolio: { poolName: string; investment: unknown }[] };\ntype ChainIdentifier = { chainIdentifier: string };\n\nexport async function fetchUserWalletData(address: string) {\n const { data } = await client.query<UserWalletData>({\n query: GET_USER_WALLET_DATA,\n variables: { address },\n });\n return data?.userWallet;\n}\n\nexport async function fetchProtocolData() {\n const { data } = await client.query<ProtocolData>({\n query: GET_PROTOCOL_DATA,\n });\n return data?.protocolData;\n}\n\nexport async function fetchPortfolioData(address: string) {\n const { data } = await client.query<PortfolioData>({\n query: GET_PORTFOLIO_DATA,\n variables: { address },\n });\n return data?.portfolio;\n}\n\nexport async function fetchChainIdentifier() {\n const { data } = await client.query<ChainIdentifier>({\n query: GET_CHAIN_IDENTIFIER,\n });\n return data?.chainIdentifier;\n}\n\nexport async function fetchUserVaults(walletAddress: string) {\n const { data } = await client.query<{ owner: unknown }>({\n query: GET_USER_VAULTS,\n variables: {\n address: walletAddress,\n },\n });\n return (data as any)?.owner;\n}\n\nexport async function fetchUserVaultBalances(walletAddress: string) {\n const { data: poolsData } = await client.query<Record<string, unknown>>({\n query: GET_POOLS,\n });\n const { data: cetusPoolsData } = await client.query<Record<string, unknown>>({\n query: GET_CETUS_POOLS,\n });\n const { data: investorsData } = await client.query<Record<string, unknown>>({\n query: GET_INVESTORS,\n });\n const { data: userVaultBalancesData } = await client.query<\n Record<string, unknown>\n >({\n query: GET_USER_VAULT_BALANCES,\n variables: {\n address: walletAddress,\n },\n });\n\n const data = {\n ...(poolsData ?? {}),\n ...(cetusPoolsData ?? {}),\n ...(investorsData ?? {}),\n ...(userVaultBalancesData ?? {}),\n };\n\n return data;\n}\n\nexport async function fetchPools() {\n const { data } = await client.query<Record<string, unknown>>({\n query: GET_POOLS,\n });\n return data ?? {};\n}\n\nexport async function fetchCetusPools() {\n const { data } = await client.query<Record<string, unknown>>({\n query: GET_CETUS_POOLS,\n });\n return data ?? {};\n}\n\nexport {\n fetchAutoCompoundingEventsGql,\n AutoCompoundingEventNode,\n} from \"./fetchAutoCompoundingEventsGql.js\";\nexport { fetchNftHolders } from \"./fetchNftHolders.js\";\n\n// Add more functions for other data fetching requirements\n"]}
1
+ {"version":3,"file":"fetchData.js","sourceRoot":"","sources":["../../../src/graphql/fetchData.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAE3B;;GAEG;AAEH,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,SAAS,EACT,aAAa,EACb,eAAe,GAChB,MAAM,cAAc,CAAC;AActB,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,OAAe;IACvD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAAiB;QAClD,KAAK,EAAE,oBAAoB;QAC3B,SAAS,EAAE,EAAE,OAAO,EAAE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;KACvB,CAAC,CAAC;IACH,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAA0B;QAC1E,KAAK,EAAE,aAAa;KACrB,CAAC,CAAC;IACH,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAExD;QACA,KAAK,EAAE,uBAAuB;QAC9B,SAAS,EAAE;YACT,OAAO,EAAE,aAAa;SACvB;KACF,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG;QACX,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC;QACpB,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC;QACzB,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC;QACxB,GAAG,CAAC,qBAAqB,IAAI,EAAE,CAAC;KACjC,CAAC;IAEF,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAA0B;QAC3D,KAAK,EAAE,SAAS;KACjB,CAAC,CAAC;IACH,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAA0B;QAC3D,KAAK,EAAE,eAAe;KACvB,CAAC,CAAC;IACH,OAAO,IAAI,IAAI,EAAE,CAAC;AACpB,CAAC;AAED,OAAO,EACL,6BAA6B,GAE9B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,0DAA0D","sourcesContent":["// src/graphql/fetchData.ts\n\n/* This file will contain functions that use the Apollo Client to\n/* execute the queries and return data.\n */\n\nimport client from \"./client.js\";\nimport {\n GET_USER_WALLET_DATA,\n GET_PROTOCOL_DATA,\n GET_PORTFOLIO_DATA,\n GET_CHAIN_IDENTIFIER,\n GET_USER_VAULTS,\n GET_USER_VAULT_BALANCES,\n GET_POOLS,\n GET_INVESTORS,\n GET_CETUS_POOLS,\n} from \"./queries.js\";\n\ntype UserWalletData = {\n userWallet: { coins: { name: string; amount: string }[] };\n};\ntype ProtocolData = {\n protocolData: {\n totalValueLocked: unknown;\n pools: { name: string; tvl: unknown }[];\n };\n};\ntype PortfolioData = { portfolio: { poolName: string; investment: unknown }[] };\ntype ChainIdentifier = { chainIdentifier: string };\n\nexport async function fetchUserWalletData(address: string) {\n const { data } = await client.query<UserWalletData>({\n query: GET_USER_WALLET_DATA,\n variables: { address },\n });\n return data?.userWallet;\n}\n\nexport async function fetchProtocolData() {\n const { data } = await client.query<ProtocolData>({\n query: GET_PROTOCOL_DATA,\n });\n return data?.protocolData;\n}\n\nexport async function fetchPortfolioData(address: string) {\n const { data } = await client.query<PortfolioData>({\n query: GET_PORTFOLIO_DATA,\n variables: { address },\n });\n return data?.portfolio;\n}\n\nexport async function fetchChainIdentifier() {\n const { data } = await client.query<ChainIdentifier>({\n query: GET_CHAIN_IDENTIFIER,\n });\n return data?.chainIdentifier;\n}\n\nexport async function fetchUserVaults(walletAddress: string) {\n const { data } = await client.query<{ address: unknown }>({\n query: GET_USER_VAULTS,\n variables: {\n address: walletAddress,\n },\n });\n return (data as any)?.address;\n}\n\nexport async function fetchUserVaultBalances(walletAddress: string) {\n const { data: poolsData } = await client.query<Record<string, unknown>>({\n query: GET_POOLS,\n });\n const { data: cetusPoolsData } = await client.query<Record<string, unknown>>({\n query: GET_CETUS_POOLS,\n });\n const { data: investorsData } = await client.query<Record<string, unknown>>({\n query: GET_INVESTORS,\n });\n const { data: userVaultBalancesData } = await client.query<\n Record<string, unknown>\n >({\n query: GET_USER_VAULT_BALANCES,\n variables: {\n address: walletAddress,\n },\n });\n\n const data = {\n ...(poolsData ?? {}),\n ...(cetusPoolsData ?? {}),\n ...(investorsData ?? {}),\n ...(userVaultBalancesData ?? {}),\n };\n\n return data;\n}\n\nexport async function fetchPools() {\n const { data } = await client.query<Record<string, unknown>>({\n query: GET_POOLS,\n });\n return data ?? {};\n}\n\nexport async function fetchCetusPools() {\n const { data } = await client.query<Record<string, unknown>>({\n query: GET_CETUS_POOLS,\n });\n return data ?? {};\n}\n\nexport {\n fetchAutoCompoundingEventsGql,\n AutoCompoundingEventNode,\n} from \"./fetchAutoCompoundingEventsGql.js\";\nexport { fetchNftHolders } from \"./fetchNftHolders.js\";\n\n// Add more functions for other data fetching requirements\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"getMultiReceipts.d.ts","sourceRoot":"","sources":["../../../src/graphql/getMultiReceipts.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA6CxC,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAqFpC"}
1
+ {"version":3,"file":"getMultiReceipts.d.ts","sourceRoot":"","sources":["../../../src/graphql/getMultiReceipts.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AA6CxC,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAuFpC"}
@@ -3,18 +3,18 @@ import { getMultiReceiptsQuery } from "./queries/getMultiReceipts.js";
3
3
  import { poolInfo } from "../common/maps.js";
4
4
  const client = new ApolloClient({
5
5
  link: new HttpLink({
6
- uri: "https://sui-mainnet.mystenlabs.com/graphql",
6
+ uri: "https://graphql.mainnet.sui.io/graphql",
7
7
  }),
8
8
  cache: new InMemoryCache({
9
9
  typePolicies: {
10
- Owner: {
11
- keyFields: (owner) => {
12
- const objectKeys = Object.keys(owner)
10
+ Address: {
11
+ keyFields: (addressObj) => {
12
+ const objectKeys = Object.keys(addressObj)
13
13
  .filter((k) => k !== "__typename")
14
14
  .sort();
15
15
  const uniqueKey = objectKeys.join(",");
16
16
  // Return the final unique ID string
17
- return `Owner:${uniqueKey}`;
17
+ return `Address:${uniqueKey}`;
18
18
  },
19
19
  },
20
20
  },
@@ -63,10 +63,12 @@ export async function fetchMultiReceipts(address) {
63
63
  address: address,
64
64
  },
65
65
  });
66
+ console.log("result", result);
66
67
  const data = result.data;
67
68
  if (!data)
68
69
  break;
69
- const receipts = data.owner;
70
+ const receipts = data.address;
71
+ console.log("receipts", receipts);
70
72
  hasNextPage = false;
71
73
  Object.keys(receipts).forEach((key) => {
72
74
  if (key !== "__typename") {
@@ -1 +1 @@
1
- {"version":3,"file":"getMultiReceipts.js","sourceRoot":"","sources":["../../../src/graphql/getMultiReceipts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,GAAG,EACH,QAAQ,EACR,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAO7C,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC;IAC9B,IAAI,EAAE,IAAI,QAAQ,CAAC;QACjB,GAAG,EAAE,4CAA4C;KAClD,CAAC;IACF,KAAK,EAAE,IAAI,aAAa,CAAC;QACvB,YAAY,EAAE;YACZ,KAAK,EAAE;gBACL,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE;oBACnB,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;yBAClC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,YAAY,CAAC;yBACjC,IAAI,EAAE,CAAC;oBACV,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBAEvC,oCAAoC;oBACpC,OAAO,SAAS,SAAS,EAAE,CAAC;gBAC9B,CAAC;aACF;SACF;KACF,CAAC;CACH,CAAC,CA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a,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;wBAC3B,CAAC,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CACV,yEAAyE,EACzE,KAAK,CACN,CAAC;QACJ,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBACxC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,EAAE,CAAC;YAChC,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM,UAAU,GAA8B,IAAI,GAAG,EAAE,CAAC;IACxD,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAChC,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QACxC,IAAI,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,GAAG;YAAE,GAAG,GAAG,EAAE,CAAC;QACnB,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClB,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IACH,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import {\n ApolloClient,\n gql,\n HttpLink,\n InMemoryCache,\n} from \"@apollo/client/core\";\nimport { getMultiReceiptsQuery } from \"./queries/getMultiReceipts.js\";\nimport { ReceiptGQL } from \"./types.js\";\nimport { poolInfo } from \"../common/maps.js\";\n\ntype ReceiptType = {\n type: string;\n cursor: string;\n};\n\nconst client = new ApolloClient({\n link: new HttpLink({\n uri: \"https://sui-mainnet.mystenlabs.com/graphql\",\n }),\n cache: new InMemoryCache({\n typePolicies: {\n Owner: {\n keyFields: (owner) => {\n const objectKeys = Object.keys(owner)\n .filter((k) => k !== \"__typename\")\n .sort();\n const uniqueKey = objectKeys.join(\",\");\n\n // Return the final unique ID string\n return `Owner:${uniqueKey}`;\n },\n },\n },\n }),\n});\n\nconst getReceiptTypes = () => {\n const receiptTypes: { [key: string]: ReceiptType } = {};\n const mySet: Set<string> = new Set();\n Object.keys(poolInfo).forEach((pool) => {\n const key = pool.replace(/-/g, \"_\");\n if (!mySet.has(poolInfo[pool].receiptType)) {\n receiptTypes[key] = {\n type: poolInfo[pool].receiptType,\n cursor: \"\",\n } as ReceiptType;\n mySet.add(poolInfo[pool].receiptType);\n }\n });\n return receiptTypes;\n};\n\nexport async function fetchMultiReceipts(\n address: string,\n): Promise<Map<string, ReceiptGQL[]>> {\n const multiReceipts: any[] = [];\n\n const receiptTypes = getReceiptTypes();\n const batchSize = 10; // Set the desired batch size\n\n // Convert the receiptTypes object into an array of entries\n const entries = Object.entries(receiptTypes);\n\n // Create an array to hold the batches\n const batches: { [k: string]: ReceiptType }[] = [];\n //const batches = [];\n // Loop through the entries array and create batches\n for (let i = 0; i < entries.length; i += batchSize) {\n const batchEntries = entries.slice(i, i + batchSize);\n batches.push(Object.fromEntries(batchEntries)); // Convert to object before pushing\n }\n\n for (const receiptTypes of batches) {\n let hasNextPage = true;\n\n try {\n while (hasNextPage) {\n const query = getMultiReceiptsQuery(receiptTypes);\n const GET_RECEIPTS = gql`\n ${query}\n `;\n\n type ReceiptBatchResponse = {\n owner: Record<\n string,\n | undefined\n | {\n pageInfo: { hasNextPage: boolean; endCursor: string };\n nodes: any[];\n }\n >;\n };\n const result = await client.query<ReceiptBatchResponse>({\n query: GET_RECEIPTS,\n variables: {\n address: address,\n },\n });\n\n const data = result.data;\n if (!data) break;\n const receipts = data.owner;\n hasNextPage = false;\n\n Object.keys(receipts).forEach((key) => {\n if (key !== \"__typename\") {\n const entry = receipts[key];\n if (!entry) return;\n const { pageInfo, nodes } = entry;\n hasNextPage = hasNextPage || pageInfo.hasNextPage;\n if (hasNextPage) receiptTypes[key].cursor = pageInfo.endCursor;\n else receiptTypes[key].cursor = \"0\";\n nodes.forEach((node: any) => {\n multiReceipts.push(node);\n });\n }\n });\n }\n } catch (error) {\n console.warn(\n \"Error fetching receipts from GraphQL, now fetching from suiClient query\",\n error,\n );\n } finally {\n Object.keys(receiptTypes).forEach((key) => {\n receiptTypes[key].cursor = \"\";\n });\n }\n }\n\n const receiptMap: Map<string, ReceiptGQL[]> = new Map();\n multiReceipts.forEach((receipt) => {\n const name = receipt.contents.json.name;\n let arr = receiptMap.get(name);\n if (!arr) arr = [];\n arr.push(receipt);\n receiptMap.set(name, arr);\n });\n return receiptMap;\n}\n"]}
1
+ {"version":3,"file":"getMultiReceipts.js","sourceRoot":"","sources":["../../../src/graphql/getMultiReceipts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,GAAG,EACH,QAAQ,EACR,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAO7C,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC;IAC9B,IAAI,EAAE,IAAI,QAAQ,CAAC;QACjB,GAAG,EAAE,wCAAwC;KAC9C,CAAC;IACF,KAAK,EAAE,IAAI,aAAa,CAAC;QACvB,YAAY,EAAE;YACZ,OAAO,EAAE;gBACP,SAAS,EAAE,CAAC,UAAU,EAAE,EAAE;oBACxB,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;yBACvC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,YAAY,CAAC;yBACjC,IAAI,EAAE,CAAC;oBACV,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBAEvC,oCAAoC;oBACpC,OAAO,WAAW,SAAS,EAAE,CAAC;gBAChC,CAAC;aACF;SACF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,CAAC,SAAS,CAAC;;4BAC1D,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC;wBACpC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE;4BAC1B,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;wBAC3B,CAAC,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CACV,yEAAyE,EACzE,KAAK,CACN,CAAC;QACJ,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBACxC,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,EAAE,CAAC;YAChC,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM,UAAU,GAA8B,IAAI,GAAG,EAAE,CAAC;IACxD,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAChC,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QACxC,IAAI,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,GAAG;YAAE,GAAG,GAAG,EAAE,CAAC;QACnB,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClB,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;IACH,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import {\n ApolloClient,\n gql,\n HttpLink,\n InMemoryCache,\n} from \"@apollo/client/core\";\nimport { getMultiReceiptsQuery } from \"./queries/getMultiReceipts.js\";\nimport { ReceiptGQL } from \"./types.js\";\nimport { poolInfo } from \"../common/maps.js\";\n\ntype ReceiptType = {\n type: string;\n cursor: string;\n};\n\nconst client = new ApolloClient({\n link: new HttpLink({\n uri: \"https://graphql.mainnet.sui.io/graphql\",\n }),\n cache: new InMemoryCache({\n typePolicies: {\n Address: {\n keyFields: (addressObj) => {\n const objectKeys = Object.keys(addressObj)\n .filter((k) => k !== \"__typename\")\n .sort();\n const uniqueKey = objectKeys.join(\",\");\n\n // Return the final unique ID string\n return `Address:${uniqueKey}`;\n },\n },\n },\n }),\n});\n\nconst getReceiptTypes = () => {\n const receiptTypes: { [key: string]: ReceiptType } = {};\n const mySet: Set<string> = new Set();\n Object.keys(poolInfo).forEach((pool) => {\n const key = pool.replace(/-/g, \"_\");\n if (!mySet.has(poolInfo[pool].receiptType)) {\n receiptTypes[key] = {\n type: poolInfo[pool].receiptType,\n cursor: \"\",\n } as ReceiptType;\n mySet.add(poolInfo[pool].receiptType);\n }\n });\n return receiptTypes;\n};\n\nexport async function fetchMultiReceipts(\n address: string,\n): Promise<Map<string, ReceiptGQL[]>> {\n const multiReceipts: any[] = [];\n\n const receiptTypes = getReceiptTypes();\n const batchSize = 10; // Set the desired batch size\n\n // Convert the receiptTypes object into an array of entries\n const entries = Object.entries(receiptTypes);\n\n // Create an array to hold the batches\n const batches: { [k: string]: ReceiptType }[] = [];\n //const batches = [];\n // Loop through the entries array and create batches\n for (let i = 0; i < entries.length; i += batchSize) {\n const batchEntries = entries.slice(i, i + batchSize);\n batches.push(Object.fromEntries(batchEntries)); // Convert to object before pushing\n }\n\n for (const receiptTypes of batches) {\n let hasNextPage = true;\n\n try {\n while (hasNextPage) {\n const query = getMultiReceiptsQuery(receiptTypes);\n const GET_RECEIPTS = gql`\n ${query}\n `;\n\n type ReceiptBatchResponse = {\n address: Record<\n string,\n | undefined\n | {\n pageInfo: { hasNextPage: boolean; endCursor: string };\n nodes: any[];\n }\n >;\n };\n const result = await client.query<ReceiptBatchResponse>({\n query: GET_RECEIPTS,\n variables: {\n address: address,\n },\n });\n console.log(\"result\", result);\n\n const data = result.data;\n if (!data) break;\n const receipts = data.address;\n console.log(\"receipts\", receipts);\n hasNextPage = false;\n\n Object.keys(receipts).forEach((key) => {\n if (key !== \"__typename\") {\n const entry = receipts[key];\n if (!entry) return;\n const { pageInfo, nodes } = entry;\n hasNextPage = hasNextPage || pageInfo.hasNextPage;\n if (hasNextPage) receiptTypes[key].cursor = pageInfo.endCursor;\n else receiptTypes[key].cursor = \"0\";\n nodes.forEach((node: any) => {\n multiReceipts.push(node);\n });\n }\n });\n }\n } catch (error) {\n console.warn(\n \"Error fetching receipts from GraphQL, now fetching from suiClient query\",\n error,\n );\n } finally {\n Object.keys(receiptTypes).forEach((key) => {\n receiptTypes[key].cursor = \"\";\n });\n }\n }\n\n const receiptMap: Map<string, ReceiptGQL[]> = new Map();\n multiReceipts.forEach((receipt) => {\n const name = receipt.contents.json.name;\n let arr = receiptMap.get(name);\n if (!arr) arr = [];\n arr.push(receipt);\n receiptMap.set(name, arr);\n });\n return receiptMap;\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  export function getMultiReceiptsQuery(receiptTypes) {
2
2
  let query = `
3
3
  query GetUserVaultBalances($address: SuiAddress!) {
4
- owner(address: $address) {`;
4
+ address(address: $address) {`;
5
5
  Object.keys(receiptTypes).forEach((key) => {
6
6
  if (receiptTypes[key].cursor === "") {
7
7
  query += `
@@ -1 +1 @@
1
- {"version":3,"file":"getMultiReceipts.js","sourceRoot":"","sources":["../../../../src/graphql/queries/getMultiReceipts.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,qBAAqB,CAAC,YAAiB;IACrD,IAAI,KAAK,GAAG;;iCAEmB,CAAC;IAEhC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACxC,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;YACpC,KAAK,IAAI;UACL,GAAG;;qBAEQ,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI;;;;;UAKjC,CAAC;QACP,CAAC;aAAM,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC5C,KAAK,IAAI;UACL,GAAG;;qBAEQ,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI;sBACrB,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM;;;;;UAKpC,CAAC;QACP,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;;KAsBN,CAAC;IACJ,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["export function getMultiReceiptsQuery(receiptTypes: any) {\n let query = `\n query GetUserVaultBalances($address: SuiAddress!) {\n owner(address: $address) {`;\n\n Object.keys(receiptTypes).forEach((key) => {\n if (receiptTypes[key].cursor === \"\") {\n query += `\n ${key}: objects(\n filter: {\n type: \"${receiptTypes[key].type}\"\n }\n first: 10\n ) {\n ...ReceiptFields\n }`;\n } else if (receiptTypes[key].cursor !== \"0\") {\n query += `\n ${key}: objects(\n filter: {\n type: \"${receiptTypes[key].type}\"\n after: \"${receiptTypes[key].cursor}\"\n }\n first: 10\n ) {\n ...ReceiptFields\n }`;\n }\n });\n\n query += `\n }\n }\n \n fragment ReceiptFields on MoveObjectConnection {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n address\n version\n digest\n hasPublicTransfer\n contents {\n type {\n repr\n }\n json\n }\n }\n }\n `;\n return query;\n}\n"]}
1
+ {"version":3,"file":"getMultiReceipts.js","sourceRoot":"","sources":["../../../../src/graphql/queries/getMultiReceipts.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,qBAAqB,CAAC,YAAiB;IACrD,IAAI,KAAK,GAAG;;mCAEqB,CAAC;IAElC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACxC,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;YACpC,KAAK,IAAI;UACL,GAAG;;qBAEQ,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI;;;;;UAKjC,CAAC;QACP,CAAC;aAAM,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;YAC5C,KAAK,IAAI;UACL,GAAG;;qBAEQ,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI;sBACrB,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM;;;;;UAKpC,CAAC;QACP,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;;KAsBN,CAAC;IACJ,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["export function getMultiReceiptsQuery(receiptTypes: any) {\n let query = `\n query GetUserVaultBalances($address: SuiAddress!) {\n address(address: $address) {`;\n\n Object.keys(receiptTypes).forEach((key) => {\n if (receiptTypes[key].cursor === \"\") {\n query += `\n ${key}: objects(\n filter: {\n type: \"${receiptTypes[key].type}\"\n }\n first: 10\n ) {\n ...ReceiptFields\n }`;\n } else if (receiptTypes[key].cursor !== \"0\") {\n query += `\n ${key}: objects(\n filter: {\n type: \"${receiptTypes[key].type}\"\n after: \"${receiptTypes[key].cursor}\"\n }\n first: 10\n ) {\n ...ReceiptFields\n }`;\n }\n });\n\n query += `\n }\n }\n \n fragment ReceiptFields on MoveObjectConnection {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n address\n version\n digest\n hasPublicTransfer\n contents {\n type {\n repr\n }\n json\n }\n }\n }\n `;\n return query;\n}\n"]}
@@ -1 +1 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>alphaLpBreakdown | @alphafi/alphafi-sdk - v0.0.94</title><meta name="description" content="Documentation for @alphafi/alphafi-sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@alphafi/alphafi-sdk - v0.0.94</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">alphaLpBreakdown</a></li></ul><h1>Function alphaLpBreakdown</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="alphalpbreakdown"><span class="tsd-kind-call-signature">alphaLpBreakdown</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">poolName</span><span class="tsd-signature-symbol">:</span> <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/LpBreakdownType.html" class="tsd-signature-type tsd-kind-type-alias">LpBreakdownType</a><span class="tsd-signature-symbol">&gt;</span><a href="#alphalpbreakdown" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">poolName</span>: <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/LpBreakdownType.html" class="tsd-signature-type tsd-kind-type-alias">LpBreakdownType</a><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/AlphaFiTech/alphafi-sdk/blob/4b83e1868676913bfc811017bc2b64a2ee53b51f/src/vaultFunctions.ts#L5">vaultFunctions.ts:5</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@alphafi/alphafi-sdk - v0.0.94</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>alphaLpBreakdown | @alphafi/alphafi-sdk - v0.0.95</title><meta name="description" content="Documentation for @alphafi/alphafi-sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@alphafi/alphafi-sdk - v0.0.95</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">alphaLpBreakdown</a></li></ul><h1>Function alphaLpBreakdown</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="alphalpbreakdown"><span class="tsd-kind-call-signature">alphaLpBreakdown</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">poolName</span><span class="tsd-signature-symbol">:</span> <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/LpBreakdownType.html" class="tsd-signature-type tsd-kind-type-alias">LpBreakdownType</a><span class="tsd-signature-symbol">&gt;</span><a href="#alphalpbreakdown" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">poolName</span>: <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/LpBreakdownType.html" class="tsd-signature-type tsd-kind-type-alias">LpBreakdownType</a><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/AlphaFiTech/alphafi-sdk/blob/9d348228bc655f625d9b23fc306cbd54c6154910/src/vaultFunctions.ts#L5">vaultFunctions.ts:5</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@alphafi/alphafi-sdk - v0.0.95</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>cetusLpBreakdown | @alphafi/alphafi-sdk - v0.0.94</title><meta name="description" content="Documentation for @alphafi/alphafi-sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@alphafi/alphafi-sdk - v0.0.94</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">cetusLpBreakdown</a></li></ul><h1>Function cetusLpBreakdown</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="cetuslpbreakdown"><span class="tsd-kind-call-signature">cetusLpBreakdown</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">poolName</span><span class="tsd-signature-symbol">:</span> <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/LpBreakdownType.html" class="tsd-signature-type tsd-kind-type-alias">LpBreakdownType</a><span class="tsd-signature-symbol">&gt;</span><a href="#cetuslpbreakdown" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">poolName</span>: <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/LpBreakdownType.html" class="tsd-signature-type tsd-kind-type-alias">LpBreakdownType</a><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/AlphaFiTech/alphafi-sdk/blob/4b83e1868676913bfc811017bc2b64a2ee53b51f/src/vaultFunctions.ts#L20">vaultFunctions.ts:20</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@alphafi/alphafi-sdk - v0.0.94</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>cetusLpBreakdown | @alphafi/alphafi-sdk - v0.0.95</title><meta name="description" content="Documentation for @alphafi/alphafi-sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@alphafi/alphafi-sdk - v0.0.95</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">cetusLpBreakdown</a></li></ul><h1>Function cetusLpBreakdown</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="cetuslpbreakdown"><span class="tsd-kind-call-signature">cetusLpBreakdown</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">poolName</span><span class="tsd-signature-symbol">:</span> <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/LpBreakdownType.html" class="tsd-signature-type tsd-kind-type-alias">LpBreakdownType</a><span class="tsd-signature-symbol">&gt;</span><a href="#cetuslpbreakdown" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">poolName</span>: <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../types/LpBreakdownType.html" class="tsd-signature-type tsd-kind-type-alias">LpBreakdownType</a><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/AlphaFiTech/alphafi-sdk/blob/9d348228bc655f625d9b23fc306cbd54c6154910/src/vaultFunctions.ts#L20">vaultFunctions.ts:20</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@alphafi/alphafi-sdk - v0.0.95</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>claimRewardTxb | @alphafi/alphafi-sdk - v0.0.94</title><meta name="description" content="Documentation for @alphafi/alphafi-sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@alphafi/alphafi-sdk - v0.0.94</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">claimRewardTxb</a></li></ul><h1>Function claimRewardTxb</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="claimrewardtxb"><span class="tsd-kind-call-signature">claimRewardTxb</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">address</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">&gt;</span><a href="#claimrewardtxb" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">address</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/AlphaFiTech/alphafi-sdk/blob/4b83e1868676913bfc811017bc2b64a2ee53b51f/src/transactions/collect_rewards.ts#L13">transactions/collect_rewards.ts:13</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@alphafi/alphafi-sdk - v0.0.94</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>claimRewardTxb | @alphafi/alphafi-sdk - v0.0.95</title><meta name="description" content="Documentation for @alphafi/alphafi-sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@alphafi/alphafi-sdk - v0.0.95</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">claimRewardTxb</a></li></ul><h1>Function claimRewardTxb</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="claimrewardtxb"><span class="tsd-kind-call-signature">claimRewardTxb</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">address</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">&gt;</span><a href="#claimrewardtxb" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">address</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Transaction</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/AlphaFiTech/alphafi-sdk/blob/9d348228bc655f625d9b23fc306cbd54c6154910/src/transactions/collect_rewards.ts#L13">transactions/collect_rewards.ts:13</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@alphafi/alphafi-sdk - v0.0.95</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>claimRewardsTxb | @alphafi/alphafi-sdk - v0.0.94</title><meta name="description" content="Documentation for @alphafi/alphafi-sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@alphafi/alphafi-sdk - v0.0.94</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">claimRewardsTxb</a></li></ul><h1>Function claimRewardsTxb</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="claimrewardstxb"><span class="tsd-kind-call-signature">claimRewardsTxb</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">userAddress</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">poolName</span><span class="tsd-signature-symbol">:</span> <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">ClaimRewardResponse</span><span class="tsd-signature-symbol">&gt;</span><a href="#claimrewardstxb" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">userAddress</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">poolName</span>: <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">ClaimRewardResponse</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/AlphaFiTech/alphafi-sdk/blob/4b83e1868676913bfc811017bc2b64a2ee53b51f/src/transactions/blueRewards.ts#L109">transactions/blueRewards.ts:109</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@alphafi/alphafi-sdk - v0.0.94</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>claimRewardsTxb | @alphafi/alphafi-sdk - v0.0.95</title><meta name="description" content="Documentation for @alphafi/alphafi-sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@alphafi/alphafi-sdk - v0.0.95</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">claimRewardsTxb</a></li></ul><h1>Function claimRewardsTxb</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="claimrewardstxb"><span class="tsd-kind-call-signature">claimRewardsTxb</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">userAddress</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">poolName</span><span class="tsd-signature-symbol">:</span> <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">ClaimRewardResponse</span><span class="tsd-signature-symbol">&gt;</span><a href="#claimrewardstxb" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">userAddress</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">poolName</span>: <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">undefined</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">ClaimRewardResponse</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/AlphaFiTech/alphafi-sdk/blob/9d348228bc655f625d9b23fc306cbd54c6154910/src/transactions/blueRewards.ts#L109">transactions/blueRewards.ts:109</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@alphafi/alphafi-sdk - v0.0.95</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>coinAmountToXTokensDoubleAsset | @alphafi/alphafi-sdk - v0.0.94</title><meta name="description" content="Documentation for @alphafi/alphafi-sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@alphafi/alphafi-sdk - v0.0.94</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">coinAmountToXTokensDoubleAsset</a></li></ul><h1>Function coinAmountToXTokensDoubleAsset</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="coinamounttoxtokensdoubleasset"><span class="tsd-kind-call-signature">coinAmountToXTokensDoubleAsset</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">amount</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">poolName</span><span class="tsd-signature-symbol">:</span> <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">isAmountA</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#coinamounttoxtokensdoubleasset" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">amount</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">poolName</span>: <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a></span></li><li><span><span class="tsd-kind-parameter">isAmountA</span>: <span class="tsd-signature-type">boolean</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/AlphaFiTech/alphafi-sdk/blob/4b83e1868676913bfc811017bc2b64a2ee53b51f/src/transactions/withdraw.ts#L113">transactions/withdraw.ts:113</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@alphafi/alphafi-sdk - v0.0.94</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>coinAmountToXTokensDoubleAsset | @alphafi/alphafi-sdk - v0.0.95</title><meta name="description" content="Documentation for @alphafi/alphafi-sdk"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@alphafi/alphafi-sdk - v0.0.95</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">coinAmountToXTokensDoubleAsset</a></li></ul><h1>Function coinAmountToXTokensDoubleAsset</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="coinamounttoxtokensdoubleasset"><span class="tsd-kind-call-signature">coinAmountToXTokensDoubleAsset</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">amount</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">poolName</span><span class="tsd-signature-symbol">:</span> <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">isAmountA</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#coinamounttoxtokensdoubleasset" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">amount</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">poolName</span>: <a href="../types/PoolName.html" class="tsd-signature-type tsd-kind-type-alias">PoolName</a></span></li><li><span><span class="tsd-kind-parameter">isAmountA</span>: <span class="tsd-signature-type">boolean</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/AlphaFiTech/alphafi-sdk/blob/9d348228bc655f625d9b23fc306cbd54c6154910/src/transactions/withdraw.ts#L113">transactions/withdraw.ts:113</a></li></ul></aside></div></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@alphafi/alphafi-sdk - v0.0.95</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>