@chainstream-io/sdk 0.1.4 → 0.1.6
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.
- package/README.md +46 -0
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +77 -61
- package/dist/esm/openapi/apis/BlockchainApi.js +118 -0
- package/dist/esm/openapi/apis/DefiSolanaMoonshotApi.js +109 -0
- package/dist/esm/openapi/apis/DefiSolanaPumpfunApi.js +69 -0
- package/dist/esm/openapi/apis/DexApi.js +347 -0
- package/dist/esm/openapi/apis/DexPoolApi.js +87 -0
- package/dist/esm/openapi/apis/EndpointApi.js +316 -0
- package/dist/esm/openapi/apis/IpfsApi.js +68 -0
- package/dist/esm/openapi/apis/JobsApi.js +107 -0
- package/dist/esm/openapi/{src/apis → apis}/RankingApi.js +278 -249
- package/dist/esm/openapi/apis/RedPacketApi.js +454 -0
- package/dist/esm/openapi/apis/TokenApi.js +1837 -0
- package/dist/esm/openapi/apis/TradeApi.js +450 -0
- package/dist/esm/openapi/apis/TransactionApi.js +73 -0
- package/dist/esm/openapi/apis/WalletApi.js +272 -0
- package/dist/esm/openapi/apis/WatchlistApi.js +87 -0
- package/dist/esm/openapi/{src/runtime.js → runtime.js} +81 -69
- package/dist/esm/stream/index.d.ts +3 -0
- package/dist/esm/stream/index.js +3 -0
- package/dist/{api → esm/stream}/stream.d.ts +1 -1
- package/dist/esm/{api → stream}/stream.js +36 -29
- package/dist/{api → esm/stream}/stream.model.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +92 -76
- package/dist/openapi/apis/BlockchainApi.js +122 -0
- package/dist/openapi/apis/DefiSolanaMoonshotApi.js +113 -0
- package/dist/openapi/apis/DefiSolanaPumpfunApi.js +73 -0
- package/dist/openapi/apis/DexApi.js +351 -0
- package/dist/openapi/apis/DexPoolApi.js +91 -0
- package/dist/openapi/apis/EndpointApi.js +320 -0
- package/dist/openapi/apis/IpfsApi.js +72 -0
- package/dist/openapi/apis/JobsApi.js +111 -0
- package/dist/openapi/{src/apis → apis}/RankingApi.js +279 -283
- package/dist/openapi/apis/RedPacketApi.js +458 -0
- package/dist/openapi/apis/TokenApi.js +1841 -0
- package/dist/openapi/apis/TradeApi.js +454 -0
- package/dist/openapi/apis/TransactionApi.js +77 -0
- package/dist/openapi/apis/WalletApi.js +276 -0
- package/dist/openapi/apis/WatchlistApi.js +91 -0
- package/dist/openapi/{src/runtime.js → runtime.js} +81 -69
- package/dist/stream/index.d.ts +3 -0
- package/dist/stream/index.js +19 -0
- package/dist/{esm/api → stream}/stream.d.ts +1 -1
- package/dist/{api → stream}/stream.js +36 -29
- package/dist/{esm/api → stream}/stream.model.d.ts +1 -1
- package/package.json +29 -29
- package/dist/esm/openapi/src/apis/BlockchainApi.js +0 -101
- package/dist/esm/openapi/src/apis/DefiSolanaMoonshotApi.js +0 -92
- package/dist/esm/openapi/src/apis/DefiSolanaPumpfunApi.js +0 -56
- package/dist/esm/openapi/src/apis/DexApi.js +0 -318
- package/dist/esm/openapi/src/apis/DexPoolApi.js +0 -74
- package/dist/esm/openapi/src/apis/EndpointApi.js +0 -279
- package/dist/esm/openapi/src/apis/IpfsApi.js +0 -55
- package/dist/esm/openapi/src/apis/JobsApi.js +0 -90
- package/dist/esm/openapi/src/apis/RedPacketApi.js +0 -413
- package/dist/esm/openapi/src/apis/TokenApi.js +0 -1748
- package/dist/esm/openapi/src/apis/TradeApi.js +0 -425
- package/dist/esm/openapi/src/apis/TransactionApi.js +0 -60
- package/dist/esm/openapi/src/apis/WalletApi.js +0 -247
- package/dist/esm/openapi/src/apis/WatchlistApi.js +0 -74
- package/dist/openapi/src/apis/BlockchainApi.js +0 -138
- package/dist/openapi/src/apis/DefiSolanaMoonshotApi.js +0 -129
- package/dist/openapi/src/apis/DefiSolanaPumpfunApi.js +0 -93
- package/dist/openapi/src/apis/DexApi.js +0 -355
- package/dist/openapi/src/apis/DexPoolApi.js +0 -111
- package/dist/openapi/src/apis/EndpointApi.js +0 -316
- package/dist/openapi/src/apis/IpfsApi.js +0 -92
- package/dist/openapi/src/apis/JobsApi.js +0 -127
- package/dist/openapi/src/apis/RedPacketApi.js +0 -450
- package/dist/openapi/src/apis/TokenApi.js +0 -1785
- package/dist/openapi/src/apis/TradeApi.js +0 -462
- package/dist/openapi/src/apis/TransactionApi.js +0 -97
- package/dist/openapi/src/apis/WalletApi.js +0 -284
- package/dist/openapi/src/apis/WatchlistApi.js +0 -111
- package/src/api/stream.fields.ts +0 -271
- package/src/api/stream.model.ts +0 -307
- package/src/api/stream.ts +0 -1086
- package/src/index.ts +0 -188
- package/src/openapi/src/apis/BlockchainApi.ts +0 -140
- package/src/openapi/src/apis/DefiSolanaMoonshotApi.ts +0 -145
- package/src/openapi/src/apis/DefiSolanaPumpfunApi.ts +0 -86
- package/src/openapi/src/apis/DexApi.ts +0 -490
- package/src/openapi/src/apis/DexPoolApi.ts +0 -107
- package/src/openapi/src/apis/EndpointApi.ts +0 -421
- package/src/openapi/src/apis/IpfsApi.ts +0 -66
- package/src/openapi/src/apis/JobsApi.ts +0 -135
- package/src/openapi/src/apis/RankingApi.ts +0 -939
- package/src/openapi/src/apis/RedPacketApi.ts +0 -621
- package/src/openapi/src/apis/TokenApi.ts +0 -2569
- package/src/openapi/src/apis/TradeApi.ts +0 -596
- package/src/openapi/src/apis/TransactionApi.ts +0 -95
- package/src/openapi/src/apis/WalletApi.ts +0 -365
- package/src/openapi/src/apis/WatchlistApi.ts +0 -107
- package/src/openapi/src/apis/index.ts +0 -17
- package/src/openapi/src/index.ts +0 -5
- package/src/openapi/src/models/BlockchainDTO.ts +0 -93
- package/src/openapi/src/models/BlockchainLatestBlockDTO.ts +0 -75
- package/src/openapi/src/models/BooleanResultDTO.ts +0 -66
- package/src/openapi/src/models/CalculatePnlInput.ts +0 -65
- package/src/openapi/src/models/Candle.ts +0 -130
- package/src/openapi/src/models/ClaimRedPacketInput.ts +0 -90
- package/src/openapi/src/models/CreateEndpointInput.ts +0 -121
- package/src/openapi/src/models/CreateRedPacketInput.ts +0 -124
- package/src/openapi/src/models/CreateRedPacketReply.ts +0 -75
- package/src/openapi/src/models/CreateTokenInput.ts +0 -139
- package/src/openapi/src/models/CreateTokenReply.ts +0 -75
- package/src/openapi/src/models/DexDTO.ts +0 -90
- package/src/openapi/src/models/DexPage.ts +0 -114
- package/src/openapi/src/models/DexPoolDTO.ts +0 -141
- package/src/openapi/src/models/EndpointListResponse.ts +0 -97
- package/src/openapi/src/models/EndpointOperationResponse.ts +0 -65
- package/src/openapi/src/models/EndpointResponse.ts +0 -145
- package/src/openapi/src/models/EndpointSecretResponse.ts +0 -65
- package/src/openapi/src/models/FilterCondition.ts +0 -135
- package/src/openapi/src/models/GainersAndLosersDTO.ts +0 -93
- package/src/openapi/src/models/GainersAndLosersPage.ts +0 -114
- package/src/openapi/src/models/JobDTO.ts +0 -75
- package/src/openapi/src/models/JobStreamingDTO.ts +0 -75
- package/src/openapi/src/models/Link.ts +0 -88
- package/src/openapi/src/models/MoonshotCreateTokenInput.ts +0 -182
- package/src/openapi/src/models/MoonshotCreateTokenReply.ts +0 -75
- package/src/openapi/src/models/MoonshotSubmitCreateToken200Response.ts +0 -73
- package/src/openapi/src/models/MoonshotSubmitCreateTokenInput.ts +0 -74
- package/src/openapi/src/models/PumpCreateTokenInput.ts +0 -180
- package/src/openapi/src/models/PumpCreateTokenReply.ts +0 -74
- package/src/openapi/src/models/QuoteResponse.ts +0 -105
- package/src/openapi/src/models/RedPacketClaimDTO.ts +0 -148
- package/src/openapi/src/models/RedPacketClaimsPage.ts +0 -110
- package/src/openapi/src/models/RedPacketDTO.ts +0 -229
- package/src/openapi/src/models/RedPacketReply.ts +0 -66
- package/src/openapi/src/models/RedPacketSendTxInput.ts +0 -66
- package/src/openapi/src/models/RedPacketSendTxResponse.ts +0 -66
- package/src/openapi/src/models/RedPacketsPage.ts +0 -110
- package/src/openapi/src/models/Resolution.ts +0 -61
- package/src/openapi/src/models/SendTxInput.ts +0 -93
- package/src/openapi/src/models/SendTxResponse.ts +0 -84
- package/src/openapi/src/models/SwapInput.ts +0 -157
- package/src/openapi/src/models/SwapReply.ts +0 -75
- package/src/openapi/src/models/SwapRouteInput.ts +0 -186
- package/src/openapi/src/models/SwapRouteResponse.ts +0 -101
- package/src/openapi/src/models/Token.ts +0 -251
- package/src/openapi/src/models/TokenCreationDTO.ts +0 -131
- package/src/openapi/src/models/TokenCreationPage.ts +0 -114
- package/src/openapi/src/models/TokenCreatorsDTO.ts +0 -81
- package/src/openapi/src/models/TokenExtraDTO.ts +0 -225
- package/src/openapi/src/models/TokenHolder.ts +0 -93
- package/src/openapi/src/models/TokenHolderPage.ts +0 -114
- package/src/openapi/src/models/TokenListPage.ts +0 -114
- package/src/openapi/src/models/TokenMarketData.ts +0 -190
- package/src/openapi/src/models/TokenMetadata.ts +0 -188
- package/src/openapi/src/models/TokenPage.ts +0 -122
- package/src/openapi/src/models/TokenPriceDTO.ts +0 -93
- package/src/openapi/src/models/TokenPricePage.ts +0 -114
- package/src/openapi/src/models/TokenSocialMediasDTO.ts +0 -161
- package/src/openapi/src/models/TokenStat.ts +0 -1152
- package/src/openapi/src/models/TopTradersDTO.ts +0 -164
- package/src/openapi/src/models/TopTradersPage.ts +0 -114
- package/src/openapi/src/models/TradeDetailDTO.ts +0 -282
- package/src/openapi/src/models/TradeEvent.ts +0 -184
- package/src/openapi/src/models/TradePage.ts +0 -114
- package/src/openapi/src/models/TradeType.ts +0 -53
- package/src/openapi/src/models/UpdateEndpointInput.ts +0 -129
- package/src/openapi/src/models/WalletBalanceDetailDTO.ts +0 -282
- package/src/openapi/src/models/WalletBalancesDTO.ts +0 -92
- package/src/openapi/src/models/WalletPnlDTO.ts +0 -264
- package/src/openapi/src/models/index.ts +0 -72
- package/src/openapi/src/runtime.ts +0 -432
- /package/dist/esm/openapi/{src/apis → apis}/BlockchainApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/DefiSolanaMoonshotApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/DefiSolanaPumpfunApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/DexApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/DexPoolApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/EndpointApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/IpfsApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/JobsApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/RankingApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/RedPacketApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/TokenApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/TradeApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/TransactionApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/WalletApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/WatchlistApi.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/index.d.ts +0 -0
- /package/dist/esm/openapi/{src/apis → apis}/index.js +0 -0
- /package/dist/esm/openapi/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/esm/openapi/{src/index.js → index.js} +0 -0
- /package/dist/esm/openapi/{src/models → models}/BlockchainDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/BlockchainDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/BlockchainLatestBlockDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/BlockchainLatestBlockDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/BooleanResultDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/BooleanResultDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/CalculatePnlInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/CalculatePnlInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/Candle.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/Candle.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/ClaimRedPacketInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/ClaimRedPacketInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/CreateEndpointInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/CreateEndpointInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/CreateRedPacketInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/CreateRedPacketInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/CreateRedPacketReply.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/CreateRedPacketReply.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/CreateTokenInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/CreateTokenInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/CreateTokenReply.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/CreateTokenReply.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/DexDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/DexDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/DexPage.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/DexPage.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/DexPoolDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/DexPoolDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/EndpointListResponse.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/EndpointListResponse.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/EndpointOperationResponse.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/EndpointOperationResponse.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/EndpointResponse.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/EndpointResponse.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/EndpointSecretResponse.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/EndpointSecretResponse.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/FilterCondition.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/FilterCondition.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/GainersAndLosersDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/GainersAndLosersDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/GainersAndLosersPage.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/GainersAndLosersPage.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/JobDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/JobDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/JobStreamingDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/JobStreamingDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/Link.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/Link.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/MoonshotCreateTokenInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/MoonshotCreateTokenInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/MoonshotCreateTokenReply.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/MoonshotCreateTokenReply.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/MoonshotSubmitCreateToken200Response.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/MoonshotSubmitCreateToken200Response.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/MoonshotSubmitCreateTokenInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/MoonshotSubmitCreateTokenInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/PumpCreateTokenInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/PumpCreateTokenInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/PumpCreateTokenReply.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/PumpCreateTokenReply.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/QuoteResponse.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/QuoteResponse.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketClaimDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketClaimDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketClaimsPage.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketClaimsPage.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketReply.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketReply.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketSendTxInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketSendTxInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketSendTxResponse.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketSendTxResponse.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketsPage.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/RedPacketsPage.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/Resolution.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/Resolution.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/SendTxInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/SendTxInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/SendTxResponse.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/SendTxResponse.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/SwapInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/SwapInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/SwapReply.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/SwapReply.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/SwapRouteInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/SwapRouteInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/SwapRouteResponse.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/SwapRouteResponse.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/Token.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/Token.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenCreationDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenCreationDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenCreationPage.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenCreationPage.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenCreatorsDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenCreatorsDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenExtraDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenExtraDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenHolder.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenHolder.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenHolderPage.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenHolderPage.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenListPage.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenListPage.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenMarketData.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenMarketData.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenMetadata.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenMetadata.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenPage.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenPage.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenPriceDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenPriceDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenPricePage.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenPricePage.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenSocialMediasDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenSocialMediasDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenStat.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TokenStat.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TopTradersDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TopTradersDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TopTradersPage.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TopTradersPage.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TradeDetailDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TradeDetailDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TradeEvent.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TradeEvent.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TradePage.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TradePage.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/TradeType.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/TradeType.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/UpdateEndpointInput.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/UpdateEndpointInput.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/WalletBalanceDetailDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/WalletBalanceDetailDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/WalletBalancesDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/WalletBalancesDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/WalletPnlDTO.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/WalletPnlDTO.js +0 -0
- /package/dist/esm/openapi/{src/models → models}/index.d.ts +0 -0
- /package/dist/esm/openapi/{src/models → models}/index.js +0 -0
- /package/dist/esm/openapi/{src/runtime.d.ts → runtime.d.ts} +0 -0
- /package/dist/{api → esm/stream}/stream.fields.d.ts +0 -0
- /package/dist/esm/{api → stream}/stream.fields.js +0 -0
- /package/dist/esm/{api → stream}/stream.model.js +0 -0
- /package/dist/openapi/{src/apis → apis}/BlockchainApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/DefiSolanaMoonshotApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/DefiSolanaPumpfunApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/DexApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/DexPoolApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/EndpointApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/IpfsApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/JobsApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/RankingApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/RedPacketApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/TokenApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/TradeApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/TransactionApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/WalletApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/WatchlistApi.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/index.d.ts +0 -0
- /package/dist/openapi/{src/apis → apis}/index.js +0 -0
- /package/dist/openapi/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/openapi/{src/index.js → index.js} +0 -0
- /package/dist/openapi/{src/models → models}/BlockchainDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/BlockchainDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/BlockchainLatestBlockDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/BlockchainLatestBlockDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/BooleanResultDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/BooleanResultDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/CalculatePnlInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/CalculatePnlInput.js +0 -0
- /package/dist/openapi/{src/models → models}/Candle.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/Candle.js +0 -0
- /package/dist/openapi/{src/models → models}/ClaimRedPacketInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/ClaimRedPacketInput.js +0 -0
- /package/dist/openapi/{src/models → models}/CreateEndpointInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/CreateEndpointInput.js +0 -0
- /package/dist/openapi/{src/models → models}/CreateRedPacketInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/CreateRedPacketInput.js +0 -0
- /package/dist/openapi/{src/models → models}/CreateRedPacketReply.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/CreateRedPacketReply.js +0 -0
- /package/dist/openapi/{src/models → models}/CreateTokenInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/CreateTokenInput.js +0 -0
- /package/dist/openapi/{src/models → models}/CreateTokenReply.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/CreateTokenReply.js +0 -0
- /package/dist/openapi/{src/models → models}/DexDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/DexDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/DexPage.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/DexPage.js +0 -0
- /package/dist/openapi/{src/models → models}/DexPoolDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/DexPoolDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/EndpointListResponse.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/EndpointListResponse.js +0 -0
- /package/dist/openapi/{src/models → models}/EndpointOperationResponse.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/EndpointOperationResponse.js +0 -0
- /package/dist/openapi/{src/models → models}/EndpointResponse.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/EndpointResponse.js +0 -0
- /package/dist/openapi/{src/models → models}/EndpointSecretResponse.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/EndpointSecretResponse.js +0 -0
- /package/dist/openapi/{src/models → models}/FilterCondition.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/FilterCondition.js +0 -0
- /package/dist/openapi/{src/models → models}/GainersAndLosersDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/GainersAndLosersDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/GainersAndLosersPage.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/GainersAndLosersPage.js +0 -0
- /package/dist/openapi/{src/models → models}/JobDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/JobDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/JobStreamingDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/JobStreamingDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/Link.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/Link.js +0 -0
- /package/dist/openapi/{src/models → models}/MoonshotCreateTokenInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/MoonshotCreateTokenInput.js +0 -0
- /package/dist/openapi/{src/models → models}/MoonshotCreateTokenReply.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/MoonshotCreateTokenReply.js +0 -0
- /package/dist/openapi/{src/models → models}/MoonshotSubmitCreateToken200Response.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/MoonshotSubmitCreateToken200Response.js +0 -0
- /package/dist/openapi/{src/models → models}/MoonshotSubmitCreateTokenInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/MoonshotSubmitCreateTokenInput.js +0 -0
- /package/dist/openapi/{src/models → models}/PumpCreateTokenInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/PumpCreateTokenInput.js +0 -0
- /package/dist/openapi/{src/models → models}/PumpCreateTokenReply.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/PumpCreateTokenReply.js +0 -0
- /package/dist/openapi/{src/models → models}/QuoteResponse.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/QuoteResponse.js +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketClaimDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketClaimDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketClaimsPage.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketClaimsPage.js +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketReply.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketReply.js +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketSendTxInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketSendTxInput.js +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketSendTxResponse.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketSendTxResponse.js +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketsPage.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/RedPacketsPage.js +0 -0
- /package/dist/openapi/{src/models → models}/Resolution.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/Resolution.js +0 -0
- /package/dist/openapi/{src/models → models}/SendTxInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/SendTxInput.js +0 -0
- /package/dist/openapi/{src/models → models}/SendTxResponse.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/SendTxResponse.js +0 -0
- /package/dist/openapi/{src/models → models}/SwapInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/SwapInput.js +0 -0
- /package/dist/openapi/{src/models → models}/SwapReply.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/SwapReply.js +0 -0
- /package/dist/openapi/{src/models → models}/SwapRouteInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/SwapRouteInput.js +0 -0
- /package/dist/openapi/{src/models → models}/SwapRouteResponse.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/SwapRouteResponse.js +0 -0
- /package/dist/openapi/{src/models → models}/Token.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/Token.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenCreationDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenCreationDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenCreationPage.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenCreationPage.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenCreatorsDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenCreatorsDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenExtraDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenExtraDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenHolder.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenHolder.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenHolderPage.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenHolderPage.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenListPage.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenListPage.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenMarketData.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenMarketData.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenMetadata.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenMetadata.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenPage.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenPage.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenPriceDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenPriceDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenPricePage.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenPricePage.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenSocialMediasDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenSocialMediasDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/TokenStat.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TokenStat.js +0 -0
- /package/dist/openapi/{src/models → models}/TopTradersDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TopTradersDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/TopTradersPage.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TopTradersPage.js +0 -0
- /package/dist/openapi/{src/models → models}/TradeDetailDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TradeDetailDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/TradeEvent.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TradeEvent.js +0 -0
- /package/dist/openapi/{src/models → models}/TradePage.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TradePage.js +0 -0
- /package/dist/openapi/{src/models → models}/TradeType.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/TradeType.js +0 -0
- /package/dist/openapi/{src/models → models}/UpdateEndpointInput.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/UpdateEndpointInput.js +0 -0
- /package/dist/openapi/{src/models → models}/WalletBalanceDetailDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/WalletBalanceDetailDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/WalletBalancesDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/WalletBalancesDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/WalletPnlDTO.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/WalletPnlDTO.js +0 -0
- /package/dist/openapi/{src/models → models}/index.d.ts +0 -0
- /package/dist/openapi/{src/models → models}/index.js +0 -0
- /package/dist/openapi/{src/runtime.d.ts → runtime.d.ts} +0 -0
- /package/dist/{esm/api → stream}/stream.fields.d.ts +0 -0
- /package/dist/{api → stream}/stream.fields.js +0 -0
- /package/dist/{api → stream}/stream.model.js +0 -0
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Dex Aggregator API
|
|
6
|
-
* Dex Aggregator API ⚡️
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 1.0
|
|
9
|
-
* Contact: ai@sx.ai
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
-
}
|
|
21
|
-
Object.defineProperty(o, k2, desc);
|
|
22
|
-
}) : (function(o, m, k, k2) {
|
|
23
|
-
if (k2 === undefined) k2 = k;
|
|
24
|
-
o[k2] = m[k];
|
|
25
|
-
}));
|
|
26
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
-
}) : function(o, v) {
|
|
29
|
-
o["default"] = v;
|
|
30
|
-
});
|
|
31
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
-
var ownKeys = function(o) {
|
|
33
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
-
var ar = [];
|
|
35
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
-
return ar;
|
|
37
|
-
};
|
|
38
|
-
return ownKeys(o);
|
|
39
|
-
};
|
|
40
|
-
return function (mod) {
|
|
41
|
-
if (mod && mod.__esModule) return mod;
|
|
42
|
-
var result = {};
|
|
43
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
-
__setModuleDefault(result, mod);
|
|
45
|
-
return result;
|
|
46
|
-
};
|
|
47
|
-
})();
|
|
48
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
-
exports.GetPnlStatsChainEnum = exports.GetPnlChainEnum = exports.GetBalanceChainEnum = exports.CalculatePnlChainEnum = exports.WalletApi = void 0;
|
|
50
|
-
const runtime = __importStar(require("../runtime"));
|
|
51
|
-
const index_1 = require("../models/index");
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
class WalletApi extends runtime.BaseAPI {
|
|
56
|
-
/**
|
|
57
|
-
* CONTROLLER.WALLET.CALCULATE_PNL.DESCRIPTION
|
|
58
|
-
* CONTROLLER.WALLET.CALCULATE_PNL.SUMMARY
|
|
59
|
-
*/
|
|
60
|
-
async calculatePnlRaw(requestParameters, initOverrides) {
|
|
61
|
-
if (requestParameters['chain'] == null) {
|
|
62
|
-
throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling calculatePnl().');
|
|
63
|
-
}
|
|
64
|
-
if (requestParameters['walletAddress'] == null) {
|
|
65
|
-
throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling calculatePnl().');
|
|
66
|
-
}
|
|
67
|
-
if (requestParameters['calculatePnlInput'] == null) {
|
|
68
|
-
throw new runtime.RequiredError('calculatePnlInput', 'Required parameter "calculatePnlInput" was null or undefined when calling calculatePnl().');
|
|
69
|
-
}
|
|
70
|
-
const queryParameters = {};
|
|
71
|
-
const headerParameters = {};
|
|
72
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
73
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
74
|
-
const token = this.configuration.accessToken;
|
|
75
|
-
const tokenString = await token("bearer", []);
|
|
76
|
-
if (tokenString) {
|
|
77
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
let urlPath = `/v1/wallet/{chain}/{walletAddress}/calculate-pnl`;
|
|
81
|
-
urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
|
|
82
|
-
urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
|
|
83
|
-
const response = await this.request({
|
|
84
|
-
path: urlPath,
|
|
85
|
-
method: 'POST',
|
|
86
|
-
headers: headerParameters,
|
|
87
|
-
query: queryParameters,
|
|
88
|
-
body: (0, index_1.CalculatePnlInputToJSON)(requestParameters['calculatePnlInput']),
|
|
89
|
-
}, initOverrides);
|
|
90
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BooleanResultDTOFromJSON)(jsonValue));
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* CONTROLLER.WALLET.CALCULATE_PNL.DESCRIPTION
|
|
94
|
-
* CONTROLLER.WALLET.CALCULATE_PNL.SUMMARY
|
|
95
|
-
*/
|
|
96
|
-
async calculatePnl(requestParameters, initOverrides) {
|
|
97
|
-
const response = await this.calculatePnlRaw(requestParameters, initOverrides);
|
|
98
|
-
return await response.value();
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* CONTROLLER.WALLET.GET_BALANCES.DESCRIPTION
|
|
102
|
-
* CONTROLLER.WALLET.GET_BALANCES.SUMMARY
|
|
103
|
-
*/
|
|
104
|
-
async getBalanceRaw(requestParameters, initOverrides) {
|
|
105
|
-
if (requestParameters['chain'] == null) {
|
|
106
|
-
throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling getBalance().');
|
|
107
|
-
}
|
|
108
|
-
if (requestParameters['walletAddress'] == null) {
|
|
109
|
-
throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling getBalance().');
|
|
110
|
-
}
|
|
111
|
-
const queryParameters = {};
|
|
112
|
-
if (requestParameters['tokenAddress'] != null) {
|
|
113
|
-
queryParameters['tokenAddress'] = requestParameters['tokenAddress'];
|
|
114
|
-
}
|
|
115
|
-
const headerParameters = {};
|
|
116
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
117
|
-
const token = this.configuration.accessToken;
|
|
118
|
-
const tokenString = await token("bearer", []);
|
|
119
|
-
if (tokenString) {
|
|
120
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
let urlPath = `/v1/wallet/{chain}/{walletAddress}/balance`;
|
|
124
|
-
urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
|
|
125
|
-
urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
|
|
126
|
-
const response = await this.request({
|
|
127
|
-
path: urlPath,
|
|
128
|
-
method: 'GET',
|
|
129
|
-
headers: headerParameters,
|
|
130
|
-
query: queryParameters,
|
|
131
|
-
}, initOverrides);
|
|
132
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WalletBalancesDTOFromJSON)(jsonValue));
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* CONTROLLER.WALLET.GET_BALANCES.DESCRIPTION
|
|
136
|
-
* CONTROLLER.WALLET.GET_BALANCES.SUMMARY
|
|
137
|
-
*/
|
|
138
|
-
async getBalance(requestParameters, initOverrides) {
|
|
139
|
-
const response = await this.getBalanceRaw(requestParameters, initOverrides);
|
|
140
|
-
return await response.value();
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* CONTROLLER.WALLET.GET_PNL.DESCRIPTION
|
|
144
|
-
* CONTROLLER.WALLET.GET_PNL.SUMMARY
|
|
145
|
-
*/
|
|
146
|
-
async getPnlRaw(requestParameters, initOverrides) {
|
|
147
|
-
if (requestParameters['chain'] == null) {
|
|
148
|
-
throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling getPnl().');
|
|
149
|
-
}
|
|
150
|
-
if (requestParameters['walletAddress'] == null) {
|
|
151
|
-
throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling getPnl().');
|
|
152
|
-
}
|
|
153
|
-
const queryParameters = {};
|
|
154
|
-
if (requestParameters['tokenAddress'] != null) {
|
|
155
|
-
queryParameters['tokenAddress'] = requestParameters['tokenAddress'];
|
|
156
|
-
}
|
|
157
|
-
const headerParameters = {};
|
|
158
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
159
|
-
const token = this.configuration.accessToken;
|
|
160
|
-
const tokenString = await token("bearer", []);
|
|
161
|
-
if (tokenString) {
|
|
162
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
let urlPath = `/v1/wallet/{chain}/{walletAddress}`;
|
|
166
|
-
urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
|
|
167
|
-
urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
|
|
168
|
-
const response = await this.request({
|
|
169
|
-
path: urlPath,
|
|
170
|
-
method: 'GET',
|
|
171
|
-
headers: headerParameters,
|
|
172
|
-
query: queryParameters,
|
|
173
|
-
}, initOverrides);
|
|
174
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.WalletPnlDTOFromJSON));
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* CONTROLLER.WALLET.GET_PNL.DESCRIPTION
|
|
178
|
-
* CONTROLLER.WALLET.GET_PNL.SUMMARY
|
|
179
|
-
*/
|
|
180
|
-
async getPnl(requestParameters, initOverrides) {
|
|
181
|
-
const response = await this.getPnlRaw(requestParameters, initOverrides);
|
|
182
|
-
return await response.value();
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* CONTROLLER.WALLET.GET_PNL_STATS.DESCRIPTION
|
|
186
|
-
* CONTROLLER.WALLET.GET_PNL_STATS.SUMMARY
|
|
187
|
-
*/
|
|
188
|
-
async getPnlStatsRaw(requestParameters, initOverrides) {
|
|
189
|
-
if (requestParameters['chain'] == null) {
|
|
190
|
-
throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling getPnlStats().');
|
|
191
|
-
}
|
|
192
|
-
if (requestParameters['walletAddress'] == null) {
|
|
193
|
-
throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling getPnlStats().');
|
|
194
|
-
}
|
|
195
|
-
const queryParameters = {};
|
|
196
|
-
const headerParameters = {};
|
|
197
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
198
|
-
const token = this.configuration.accessToken;
|
|
199
|
-
const tokenString = await token("bearer", []);
|
|
200
|
-
if (tokenString) {
|
|
201
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
let urlPath = `/v1/wallet/{chain}/{walletAddress}/stats`;
|
|
205
|
-
urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
|
|
206
|
-
urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
|
|
207
|
-
const response = await this.request({
|
|
208
|
-
path: urlPath,
|
|
209
|
-
method: 'GET',
|
|
210
|
-
headers: headerParameters,
|
|
211
|
-
query: queryParameters,
|
|
212
|
-
}, initOverrides);
|
|
213
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.WalletPnlDTOFromJSON));
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* CONTROLLER.WALLET.GET_PNL_STATS.DESCRIPTION
|
|
217
|
-
* CONTROLLER.WALLET.GET_PNL_STATS.SUMMARY
|
|
218
|
-
*/
|
|
219
|
-
async getPnlStats(requestParameters, initOverrides) {
|
|
220
|
-
const response = await this.getPnlStatsRaw(requestParameters, initOverrides);
|
|
221
|
-
return await response.value();
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
exports.WalletApi = WalletApi;
|
|
225
|
-
/**
|
|
226
|
-
* @export
|
|
227
|
-
*/
|
|
228
|
-
exports.CalculatePnlChainEnum = {
|
|
229
|
-
Sol: 'sol',
|
|
230
|
-
Base: 'base',
|
|
231
|
-
Bsc: 'bsc',
|
|
232
|
-
Polygon: 'polygon',
|
|
233
|
-
Arbitrum: 'arbitrum',
|
|
234
|
-
Optimism: 'optimism',
|
|
235
|
-
Avalanche: 'avalanche',
|
|
236
|
-
Ethereum: 'ethereum',
|
|
237
|
-
Zksync: 'zksync',
|
|
238
|
-
Sui: 'sui'
|
|
239
|
-
};
|
|
240
|
-
/**
|
|
241
|
-
* @export
|
|
242
|
-
*/
|
|
243
|
-
exports.GetBalanceChainEnum = {
|
|
244
|
-
Sol: 'sol',
|
|
245
|
-
Base: 'base',
|
|
246
|
-
Bsc: 'bsc',
|
|
247
|
-
Polygon: 'polygon',
|
|
248
|
-
Arbitrum: 'arbitrum',
|
|
249
|
-
Optimism: 'optimism',
|
|
250
|
-
Avalanche: 'avalanche',
|
|
251
|
-
Ethereum: 'ethereum',
|
|
252
|
-
Zksync: 'zksync',
|
|
253
|
-
Sui: 'sui'
|
|
254
|
-
};
|
|
255
|
-
/**
|
|
256
|
-
* @export
|
|
257
|
-
*/
|
|
258
|
-
exports.GetPnlChainEnum = {
|
|
259
|
-
Sol: 'sol',
|
|
260
|
-
Base: 'base',
|
|
261
|
-
Bsc: 'bsc',
|
|
262
|
-
Polygon: 'polygon',
|
|
263
|
-
Arbitrum: 'arbitrum',
|
|
264
|
-
Optimism: 'optimism',
|
|
265
|
-
Avalanche: 'avalanche',
|
|
266
|
-
Ethereum: 'ethereum',
|
|
267
|
-
Zksync: 'zksync',
|
|
268
|
-
Sui: 'sui'
|
|
269
|
-
};
|
|
270
|
-
/**
|
|
271
|
-
* @export
|
|
272
|
-
*/
|
|
273
|
-
exports.GetPnlStatsChainEnum = {
|
|
274
|
-
Sol: 'sol',
|
|
275
|
-
Base: 'base',
|
|
276
|
-
Bsc: 'bsc',
|
|
277
|
-
Polygon: 'polygon',
|
|
278
|
-
Arbitrum: 'arbitrum',
|
|
279
|
-
Optimism: 'optimism',
|
|
280
|
-
Avalanche: 'avalanche',
|
|
281
|
-
Ethereum: 'ethereum',
|
|
282
|
-
Zksync: 'zksync',
|
|
283
|
-
Sui: 'sui'
|
|
284
|
-
};
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Dex Aggregator API
|
|
6
|
-
* Dex Aggregator API ⚡️
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 1.0
|
|
9
|
-
* Contact: ai@sx.ai
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
-
}
|
|
21
|
-
Object.defineProperty(o, k2, desc);
|
|
22
|
-
}) : (function(o, m, k, k2) {
|
|
23
|
-
if (k2 === undefined) k2 = k;
|
|
24
|
-
o[k2] = m[k];
|
|
25
|
-
}));
|
|
26
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
-
}) : function(o, v) {
|
|
29
|
-
o["default"] = v;
|
|
30
|
-
});
|
|
31
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
-
var ownKeys = function(o) {
|
|
33
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
-
var ar = [];
|
|
35
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
-
return ar;
|
|
37
|
-
};
|
|
38
|
-
return ownKeys(o);
|
|
39
|
-
};
|
|
40
|
-
return function (mod) {
|
|
41
|
-
if (mod && mod.__esModule) return mod;
|
|
42
|
-
var result = {};
|
|
43
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
-
__setModuleDefault(result, mod);
|
|
45
|
-
return result;
|
|
46
|
-
};
|
|
47
|
-
})();
|
|
48
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
-
exports.WatchlistAddChainEnum = exports.WatchlistApi = void 0;
|
|
50
|
-
const runtime = __importStar(require("../runtime"));
|
|
51
|
-
const index_1 = require("../models/index");
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
class WatchlistApi extends runtime.BaseAPI {
|
|
56
|
-
/**
|
|
57
|
-
* CONTROLLER.WATCHLIST.ADD.DESCRIPTION
|
|
58
|
-
* CONTROLLER.WATCHLIST.ADD.SUMMARY
|
|
59
|
-
*/
|
|
60
|
-
async watchlistAddRaw(requestParameters, initOverrides) {
|
|
61
|
-
if (requestParameters['chain'] == null) {
|
|
62
|
-
throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling watchlistAdd().');
|
|
63
|
-
}
|
|
64
|
-
if (requestParameters['walletAddress'] == null) {
|
|
65
|
-
throw new runtime.RequiredError('walletAddress', 'Required parameter "walletAddress" was null or undefined when calling watchlistAdd().');
|
|
66
|
-
}
|
|
67
|
-
const queryParameters = {};
|
|
68
|
-
const headerParameters = {};
|
|
69
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
70
|
-
const token = this.configuration.accessToken;
|
|
71
|
-
const tokenString = await token("bearer", []);
|
|
72
|
-
if (tokenString) {
|
|
73
|
-
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
let urlPath = `/v1/watchlist/{chain}/{walletAddress}`;
|
|
77
|
-
urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
|
|
78
|
-
urlPath = urlPath.replace(`{${"walletAddress"}}`, encodeURIComponent(String(requestParameters['walletAddress'])));
|
|
79
|
-
const response = await this.request({
|
|
80
|
-
path: urlPath,
|
|
81
|
-
method: 'POST',
|
|
82
|
-
headers: headerParameters,
|
|
83
|
-
query: queryParameters,
|
|
84
|
-
}, initOverrides);
|
|
85
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BooleanResultDTOFromJSON)(jsonValue));
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* CONTROLLER.WATCHLIST.ADD.DESCRIPTION
|
|
89
|
-
* CONTROLLER.WATCHLIST.ADD.SUMMARY
|
|
90
|
-
*/
|
|
91
|
-
async watchlistAdd(requestParameters, initOverrides) {
|
|
92
|
-
const response = await this.watchlistAddRaw(requestParameters, initOverrides);
|
|
93
|
-
return await response.value();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
exports.WatchlistApi = WatchlistApi;
|
|
97
|
-
/**
|
|
98
|
-
* @export
|
|
99
|
-
*/
|
|
100
|
-
exports.WatchlistAddChainEnum = {
|
|
101
|
-
Sol: 'sol',
|
|
102
|
-
Base: 'base',
|
|
103
|
-
Bsc: 'bsc',
|
|
104
|
-
Polygon: 'polygon',
|
|
105
|
-
Arbitrum: 'arbitrum',
|
|
106
|
-
Optimism: 'optimism',
|
|
107
|
-
Avalanche: 'avalanche',
|
|
108
|
-
Ethereum: 'ethereum',
|
|
109
|
-
Zksync: 'zksync',
|
|
110
|
-
Sui: 'sui'
|
|
111
|
-
};
|
package/src/api/stream.fields.ts
DELETED
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Field mappings for CEL filter expressions
|
|
3
|
-
* Maps human-readable field names to short field names used in the API
|
|
4
|
-
* Organized by subscription method to handle field name conflicts
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export interface FieldMapping {
|
|
8
|
-
readonly [key: string]: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface MethodFieldMappings {
|
|
12
|
-
readonly [methodName: string]: FieldMapping;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Field mappings organized by subscription method
|
|
17
|
-
* Each method can have its own field mappings to handle conflicts
|
|
18
|
-
*/
|
|
19
|
-
export const CEL_FIELD_MAPPINGS: MethodFieldMappings = {
|
|
20
|
-
// Wallet balance subscription fields
|
|
21
|
-
"subscribeWalletBalance": {
|
|
22
|
-
"walletAddress": "a",
|
|
23
|
-
"tokenAddress": "ta",
|
|
24
|
-
"tokenPriceInUsd": "tpiu",
|
|
25
|
-
"balance": "b",
|
|
26
|
-
"timestamp": "t",
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
// Token candles subscription fields
|
|
30
|
-
"subscribeTokenCandles": {
|
|
31
|
-
"open": "o",
|
|
32
|
-
"close": "c",
|
|
33
|
-
"high": "h",
|
|
34
|
-
"low": "l",
|
|
35
|
-
"volume": "v",
|
|
36
|
-
"resolution": "r",
|
|
37
|
-
"time": "t",
|
|
38
|
-
"number": "n",
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
// Token stats subscription fields
|
|
42
|
-
"subscribeTokenStats": {
|
|
43
|
-
"address": "a",
|
|
44
|
-
"timestamp": "t",
|
|
45
|
-
"buys1m": "b1m",
|
|
46
|
-
"sells1m": "s1m",
|
|
47
|
-
"buyers1m": "be1m",
|
|
48
|
-
"sellers1m": "se1m",
|
|
49
|
-
"buyVolumeInUsd1m": "bviu1m",
|
|
50
|
-
"sellVolumeInUsd1m": "sviu1m",
|
|
51
|
-
"price1m": "p1m",
|
|
52
|
-
"openInUsd1m": "oiu1m",
|
|
53
|
-
"closeInUsd1m": "ciu1m",
|
|
54
|
-
"buys5m": "b5m",
|
|
55
|
-
"sells5m": "s5m",
|
|
56
|
-
"buyers5m": "be5m",
|
|
57
|
-
"sellers5m": "se5m",
|
|
58
|
-
"buyVolumeInUsd5m": "bviu5m",
|
|
59
|
-
"sellVolumeInUsd5m": "sviu5m",
|
|
60
|
-
"price5m": "p5m",
|
|
61
|
-
"openInUsd5m": "oiu5m",
|
|
62
|
-
"closeInUsd5m": "ciu5m",
|
|
63
|
-
"buys15m": "b15m",
|
|
64
|
-
"sells15m": "s15m",
|
|
65
|
-
"buyers15m": "be15m",
|
|
66
|
-
"sellers15m": "se15m",
|
|
67
|
-
"buyVolumeInUsd15m": "bviu15m",
|
|
68
|
-
"sellVolumeInUsd15m": "sviu15m",
|
|
69
|
-
"price15m": "p15m",
|
|
70
|
-
"openInUsd15m": "oiu15m",
|
|
71
|
-
"closeInUsd15m": "ciu15m",
|
|
72
|
-
"buys30m": "b30m",
|
|
73
|
-
"sells30m": "s30m",
|
|
74
|
-
"buyers30m": "be30m",
|
|
75
|
-
"sellers30m": "se30m",
|
|
76
|
-
"buyVolumeInUsd30m": "bviu30m",
|
|
77
|
-
"sellVolumeInUsd30m": "sviu30m",
|
|
78
|
-
"price30m": "p30m",
|
|
79
|
-
"openInUsd30m": "oiu30m",
|
|
80
|
-
"closeInUsd30m": "ciu30m",
|
|
81
|
-
"buys1h": "b1h",
|
|
82
|
-
"sells1h": "s1h",
|
|
83
|
-
"buyers1h": "be1h",
|
|
84
|
-
"sellers1h": "se1h",
|
|
85
|
-
"buyVolumeInUsd1h": "bviu1h",
|
|
86
|
-
"sellVolumeInUsd1h": "sviu1h",
|
|
87
|
-
"price1h": "p1h",
|
|
88
|
-
"openInUsd1h": "oiu1h",
|
|
89
|
-
"closeInUsd1h": "ciu1h",
|
|
90
|
-
"buys4h": "b4h",
|
|
91
|
-
"sells4h": "s4h",
|
|
92
|
-
"buyers4h": "be4h",
|
|
93
|
-
"sellers4h": "se4h",
|
|
94
|
-
"buyVolumeInUsd4h": "bviu4h",
|
|
95
|
-
"sellVolumeInUsd4h": "sviu4h",
|
|
96
|
-
"price4h": "p4h",
|
|
97
|
-
"openInUsd4h": "oiu4h",
|
|
98
|
-
"closeInUsd4h": "ciu4h",
|
|
99
|
-
"buys24h": "b24h",
|
|
100
|
-
"sells24h": "s24h",
|
|
101
|
-
"buyers24h": "be24h",
|
|
102
|
-
"sellers24h": "se24h",
|
|
103
|
-
"buyVolumeInUsd24h": "bviu24h",
|
|
104
|
-
"sellVolumeInUsd24h": "sviu24h",
|
|
105
|
-
"price24h": "p24h",
|
|
106
|
-
"price": "p",
|
|
107
|
-
"openInUsd24h": "oiu24h",
|
|
108
|
-
"closeInUsd24h": "ciu24h",
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
// Token holder subscription fields
|
|
112
|
-
"subscribeTokenHolders": {
|
|
113
|
-
"tokenAddress": "a",
|
|
114
|
-
"holders": "h",
|
|
115
|
-
"top100Amount": "t100a",
|
|
116
|
-
"top10Amount": "t10a",
|
|
117
|
-
"top100Holders": "t100h",
|
|
118
|
-
"top10Holders": "t10h",
|
|
119
|
-
"top100Ratio": "t100r",
|
|
120
|
-
"top10Ratio": "t10r",
|
|
121
|
-
"timestamp": "ts",
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
// New token subscription fields
|
|
125
|
-
"subscribeNewToken": {
|
|
126
|
-
"tokenAddress": "a",
|
|
127
|
-
"name": "n",
|
|
128
|
-
"symbol": "s",
|
|
129
|
-
"createdAtMs": "cts",
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
// Token supply subscription fields
|
|
133
|
-
"subscribeTokenSupply": {
|
|
134
|
-
"tokenAddress": "a",
|
|
135
|
-
"supply": "s",
|
|
136
|
-
"timestamp": "ts",
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
// Dex pool balance subscription fields
|
|
140
|
-
"subscribeDexPoolBalance": {
|
|
141
|
-
"poolAddress": "a",
|
|
142
|
-
"tokenAAddress": "taa",
|
|
143
|
-
"tokenALiquidityInUsd": "taliu",
|
|
144
|
-
"tokenBAddress": "tba",
|
|
145
|
-
"tokenBLiquidityInUsd": "tbliu",
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
// Token liquidity subscription fields
|
|
149
|
-
"subscribeTokenLiquidity": {
|
|
150
|
-
"tokenAddress": "a",
|
|
151
|
-
"metricType": "t",
|
|
152
|
-
"value": "v",
|
|
153
|
-
"timestamp": "ts",
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
// New token metadata subscription fields
|
|
157
|
-
"subscribeNewTokensMetadata": {
|
|
158
|
-
"tokenAddress": "a",
|
|
159
|
-
"name": "n",
|
|
160
|
-
"symbol": "s",
|
|
161
|
-
"imageUrl": "iu",
|
|
162
|
-
"description": "de",
|
|
163
|
-
"socialMedia": "sm",
|
|
164
|
-
"createdAtMs": "cts",
|
|
165
|
-
},
|
|
166
|
-
|
|
167
|
-
// Token trades subscription fields
|
|
168
|
-
"subscribeTokenTrades": {
|
|
169
|
-
"tokenAddress": "a",
|
|
170
|
-
"timestamp": "t",
|
|
171
|
-
"kind": "k",
|
|
172
|
-
"buyAmount": "ba",
|
|
173
|
-
"buyAmountInUsd": "baiu",
|
|
174
|
-
"buyTokenAddress": "btma",
|
|
175
|
-
"buyTokenName": "btn",
|
|
176
|
-
"buyTokenSymbol": "bts",
|
|
177
|
-
"buyWalletAddress": "bwa",
|
|
178
|
-
"sellAmount": "sa",
|
|
179
|
-
"sellAmountInUsd": "saiu",
|
|
180
|
-
"sellTokenAddress": "stma",
|
|
181
|
-
"sellTokenName": "stn",
|
|
182
|
-
"sellTokenSymbol": "sts",
|
|
183
|
-
"sellWalletAddress": "swa",
|
|
184
|
-
"txHash": "h",
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
// Wallet token PnL subscription fields
|
|
188
|
-
"subscribeWalletPnl": {
|
|
189
|
-
"walletAddress": "a",
|
|
190
|
-
"tokenAddress": "ta",
|
|
191
|
-
"tokenPriceInUsd": "tpiu",
|
|
192
|
-
"timestamp": "t",
|
|
193
|
-
"opentime": "ot",
|
|
194
|
-
"lasttime": "lt",
|
|
195
|
-
"closetime": "ct",
|
|
196
|
-
"buyAmount": "ba",
|
|
197
|
-
"buyAmountInUsd": "baiu",
|
|
198
|
-
"buyCount": "bs",
|
|
199
|
-
"buyCount30d": "bs30d",
|
|
200
|
-
"buyCount7d": "bs7d",
|
|
201
|
-
"sellAmount": "sa",
|
|
202
|
-
"sellAmountInUsd": "saiu",
|
|
203
|
-
"sellCount": "ss",
|
|
204
|
-
"sellCount30d": "ss30d",
|
|
205
|
-
"sellCount7d": "ss7d",
|
|
206
|
-
"heldDurationTimestamp": "hdts",
|
|
207
|
-
"averageBuyPriceInUsd": "abpiu",
|
|
208
|
-
"averageSellPriceInUsd": "aspiu",
|
|
209
|
-
"unrealizedProfitInUsd": "upiu",
|
|
210
|
-
"unrealizedProfitRatio": "upr",
|
|
211
|
-
"realizedProfitInUsd": "rpiu",
|
|
212
|
-
"realizedProfitRatio": "rpr",
|
|
213
|
-
"totalRealizedProfitInUsd": "trpiu",
|
|
214
|
-
"totalRealizedProfitRatio": "trr",
|
|
215
|
-
},
|
|
216
|
-
} as const;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Get field mappings for a specific subscription method
|
|
220
|
-
* @param methodName - The name of the subscription method
|
|
221
|
-
* @returns Field mapping object for the method, or empty object if not found
|
|
222
|
-
*/
|
|
223
|
-
export function getFieldMappings(methodName: string): FieldMapping {
|
|
224
|
-
return CEL_FIELD_MAPPINGS[methodName] || {};
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Replace long field names with short field names in a filter expression
|
|
229
|
-
* Automatically adds meta. prefix if not present
|
|
230
|
-
* @param filter - Original filter expression
|
|
231
|
-
* @param methodName - The name of the subscription method
|
|
232
|
-
* @returns Filter expression with short field names and meta. prefix
|
|
233
|
-
*/
|
|
234
|
-
export function replaceFilterFields(filter: string, methodName: string): string {
|
|
235
|
-
if (!filter) {return filter}
|
|
236
|
-
|
|
237
|
-
const fieldMappings = getFieldMappings(methodName);
|
|
238
|
-
let result = filter;
|
|
239
|
-
|
|
240
|
-
// Replace all long field names with short field names
|
|
241
|
-
for (const [longField, shortField] of Object.entries(fieldMappings)) {
|
|
242
|
-
// Handle both cases: with and without meta. prefix
|
|
243
|
-
const patterns = [
|
|
244
|
-
// Pattern 1: fieldName (without meta. prefix)
|
|
245
|
-
new RegExp(`\\b${longField}\\b`, "g"),
|
|
246
|
-
// Pattern 2: meta.fieldName (with meta. prefix)
|
|
247
|
-
new RegExp(`\\bmeta\\.${longField}\\b`, "g"),
|
|
248
|
-
];
|
|
249
|
-
|
|
250
|
-
patterns.forEach((pattern) => {
|
|
251
|
-
result = result.replace(pattern, `meta.${shortField}`);
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
return result;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Type-safe field mapping for specific subscription methods
|
|
260
|
-
*/
|
|
261
|
-
export type SubscriptionMethod = keyof typeof CEL_FIELD_MAPPINGS;
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Get available field names for a specific subscription method
|
|
265
|
-
* @param methodName - The name of the subscription method
|
|
266
|
-
* @returns Array of available field names
|
|
267
|
-
*/
|
|
268
|
-
export function getAvailableFields(methodName: string): string[] {
|
|
269
|
-
const mappings = getFieldMappings(methodName);
|
|
270
|
-
return Object.keys(mappings);
|
|
271
|
-
}
|