@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,14 +1,23 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import { Centrifuge } from "@chainstream-io/centrifuge";
|
|
2
11
|
import { replaceFilterFields } from "./stream.fields";
|
|
3
12
|
export class StreamApi {
|
|
4
13
|
constructor(context) {
|
|
5
14
|
const realtimeEndpoint = context.streamUrl;
|
|
6
15
|
this.realtimeClient = new Centrifuge(realtimeEndpoint, {
|
|
7
|
-
getToken:
|
|
16
|
+
getToken: (_ctx) => __awaiter(this, void 0, void 0, function* () {
|
|
8
17
|
return typeof context.accessToken === "string"
|
|
9
18
|
? context.accessToken
|
|
10
|
-
:
|
|
11
|
-
},
|
|
19
|
+
: yield context.accessToken.getToken();
|
|
20
|
+
}),
|
|
12
21
|
});
|
|
13
22
|
this.realtimeClient
|
|
14
23
|
.on("connected", () => {
|
|
@@ -79,10 +88,7 @@ export class StreamApi {
|
|
|
79
88
|
console.log("[xrealtime] create new sub: ", channel);
|
|
80
89
|
// Process filter expression with method-specific field mappings
|
|
81
90
|
const processedFilter = filter && methodName ? replaceFilterFields(filter, methodName) : filter;
|
|
82
|
-
sub = this.realtimeClient.newSubscription(channel, {
|
|
83
|
-
delta: "fossil",
|
|
84
|
-
...(processedFilter && { filter: processedFilter }),
|
|
85
|
-
});
|
|
91
|
+
sub = this.realtimeClient.newSubscription(channel, Object.assign({ delta: "fossil" }, (processedFilter && { filter: processedFilter })));
|
|
86
92
|
sub
|
|
87
93
|
.on("subscribed", () => {
|
|
88
94
|
console.log("[xrealtime] subscribed", channel);
|
|
@@ -92,11 +98,11 @@ export class StreamApi {
|
|
|
92
98
|
})
|
|
93
99
|
.on("publication", (ctx) => {
|
|
94
100
|
// console.log('[xrealtime] publication, ctx.data: ', ctx.data);
|
|
95
|
-
listeners
|
|
101
|
+
listeners === null || listeners === void 0 ? void 0 : listeners.forEach((it) => it(ctx.data));
|
|
96
102
|
})
|
|
97
103
|
.subscribe();
|
|
98
104
|
}
|
|
99
|
-
listeners
|
|
105
|
+
listeners === null || listeners === void 0 ? void 0 : listeners.add(fn);
|
|
100
106
|
return new StreamUnsubscrible(this, channel, fn);
|
|
101
107
|
}
|
|
102
108
|
unsubscribe(channel, fn) {
|
|
@@ -267,44 +273,45 @@ export class StreamApi {
|
|
|
267
273
|
imageUrl: it.iu,
|
|
268
274
|
description: it.de,
|
|
269
275
|
socialMedia: (() => {
|
|
276
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
270
277
|
const socialMedia = {};
|
|
271
|
-
if (it.sm
|
|
278
|
+
if ((_a = it.sm) === null || _a === void 0 ? void 0 : _a.tw) {
|
|
272
279
|
socialMedia.twitter = it.sm.tw;
|
|
273
280
|
}
|
|
274
|
-
if (it.sm
|
|
281
|
+
if ((_b = it.sm) === null || _b === void 0 ? void 0 : _b.tg) {
|
|
275
282
|
socialMedia.telegram = it.sm.tg;
|
|
276
283
|
}
|
|
277
|
-
if (it.sm
|
|
284
|
+
if ((_c = it.sm) === null || _c === void 0 ? void 0 : _c.w) {
|
|
278
285
|
socialMedia.website = it.sm.w;
|
|
279
286
|
}
|
|
280
|
-
if (it.sm
|
|
287
|
+
if ((_d = it.sm) === null || _d === void 0 ? void 0 : _d.tt) {
|
|
281
288
|
socialMedia.tiktok = it.sm.tt;
|
|
282
289
|
}
|
|
283
|
-
if (it.sm
|
|
290
|
+
if ((_e = it.sm) === null || _e === void 0 ? void 0 : _e.dc) {
|
|
284
291
|
socialMedia.discord = it.sm.dc;
|
|
285
292
|
}
|
|
286
|
-
if (it.sm
|
|
293
|
+
if ((_f = it.sm) === null || _f === void 0 ? void 0 : _f.fb) {
|
|
287
294
|
socialMedia.facebook = it.sm.fb;
|
|
288
295
|
}
|
|
289
|
-
if (it.sm
|
|
296
|
+
if ((_g = it.sm) === null || _g === void 0 ? void 0 : _g.gh) {
|
|
290
297
|
socialMedia.github = it.sm.gh;
|
|
291
298
|
}
|
|
292
|
-
if (it.sm
|
|
299
|
+
if ((_h = it.sm) === null || _h === void 0 ? void 0 : _h.ig) {
|
|
293
300
|
socialMedia.instagram = it.sm.ig;
|
|
294
301
|
}
|
|
295
|
-
if (it.sm
|
|
302
|
+
if ((_j = it.sm) === null || _j === void 0 ? void 0 : _j.li) {
|
|
296
303
|
socialMedia.linkedin = it.sm.li;
|
|
297
304
|
}
|
|
298
|
-
if (it.sm
|
|
305
|
+
if ((_k = it.sm) === null || _k === void 0 ? void 0 : _k.md) {
|
|
299
306
|
socialMedia.medium = it.sm.md;
|
|
300
307
|
}
|
|
301
|
-
if (it.sm
|
|
308
|
+
if ((_l = it.sm) === null || _l === void 0 ? void 0 : _l.rd) {
|
|
302
309
|
socialMedia.reddit = it.sm.rd;
|
|
303
310
|
}
|
|
304
|
-
if (it.sm
|
|
311
|
+
if ((_m = it.sm) === null || _m === void 0 ? void 0 : _m.yt) {
|
|
305
312
|
socialMedia.youtube = it.sm.yt;
|
|
306
313
|
}
|
|
307
|
-
if (it.sm
|
|
314
|
+
if ((_o = it.sm) === null || _o === void 0 ? void 0 : _o.bb) {
|
|
308
315
|
socialMedia.bitbucket = it.sm.bb;
|
|
309
316
|
}
|
|
310
317
|
return socialMedia;
|
|
@@ -355,7 +362,7 @@ export class StreamApi {
|
|
|
355
362
|
}
|
|
356
363
|
subscribeRankingTokensLiquidity({ chain, channelType, callback, }) {
|
|
357
364
|
const channel = `dex-ranking-token-general_stat_num-list:${chain}_${channelType}`;
|
|
358
|
-
return this.subscribe(channel, (data) => callback(data
|
|
365
|
+
return this.subscribe(channel, (data) => callback(data === null || data === void 0 ? void 0 : data.map((it) => ({
|
|
359
366
|
tokenAddress: it.a,
|
|
360
367
|
metricType: it.t,
|
|
361
368
|
value: it.v,
|
|
@@ -366,7 +373,7 @@ export class StreamApi {
|
|
|
366
373
|
const channel = dex
|
|
367
374
|
? `dex-ranking-list:${chain}_${ranking_type}_${dex}`
|
|
368
375
|
: `dex-ranking-list:${chain}_${ranking_type}`;
|
|
369
|
-
return this.subscribe(channel, (data) => callback(data
|
|
376
|
+
return this.subscribe(channel, (data) => callback(data === null || data === void 0 ? void 0 : data.map((item) => {
|
|
370
377
|
const result = {};
|
|
371
378
|
// TokenMetadata (t)
|
|
372
379
|
if (item.t) {
|
|
@@ -721,7 +728,7 @@ export class StreamApi {
|
|
|
721
728
|
}
|
|
722
729
|
subscribeRankingTokensStats({ chain, channelType, callback, }) {
|
|
723
730
|
const channel = `dex-ranking-token-stats-list:${chain}_${channelType}`;
|
|
724
|
-
return this.subscribe(channel, (data) => callback(data
|
|
731
|
+
return this.subscribe(channel, (data) => callback(data === null || data === void 0 ? void 0 : data.map((it) => ({
|
|
725
732
|
address: it.a,
|
|
726
733
|
timestamp: it.t,
|
|
727
734
|
buys1m: it.b1m,
|
|
@@ -792,7 +799,7 @@ export class StreamApi {
|
|
|
792
799
|
}
|
|
793
800
|
subscribeRankingTokensHolders({ chain, channelType, callback, }) {
|
|
794
801
|
const channel = `dex-ranking-token-holding-list:${chain}_${channelType}`;
|
|
795
|
-
return this.subscribe(channel, (data) => callback(data
|
|
802
|
+
return this.subscribe(channel, (data) => callback(data === null || data === void 0 ? void 0 : data.map((it) => ({
|
|
796
803
|
tokenAddress: it.a,
|
|
797
804
|
holders: it.h,
|
|
798
805
|
top100Amount: this.formatScientificNotation(it.t100a),
|
|
@@ -806,7 +813,7 @@ export class StreamApi {
|
|
|
806
813
|
}
|
|
807
814
|
subscribeRankingTokensSupply({ chain, channelType, callback, }) {
|
|
808
815
|
const channel = `dex-ranking-token-supply-list:${chain}_${channelType}`;
|
|
809
|
-
return this.subscribe(channel, (data) => callback(data
|
|
816
|
+
return this.subscribe(channel, (data) => callback(data === null || data === void 0 ? void 0 : data.map((it) => ({
|
|
810
817
|
tokenAddress: it.a,
|
|
811
818
|
supply: it.s,
|
|
812
819
|
marketCapInUsd: it.mc,
|
|
@@ -815,7 +822,7 @@ export class StreamApi {
|
|
|
815
822
|
}
|
|
816
823
|
subscribeRankingTokensBondingCurve({ chain, callback, }) {
|
|
817
824
|
const channel = `dex-ranking-token-bounding-curve-list:${chain}_new`;
|
|
818
|
-
return this.subscribe(channel, (data) => callback(data
|
|
825
|
+
return this.subscribe(channel, (data) => callback(data === null || data === void 0 ? void 0 : data.map((it) => ({
|
|
819
826
|
tokenAddress: it.a,
|
|
820
827
|
progressRatio: it.pr,
|
|
821
828
|
}))));
|
|
@@ -898,7 +905,7 @@ export class StreamApi {
|
|
|
898
905
|
}
|
|
899
906
|
subscribeWalletPnlList({ chain, walletAddress, callback, }) {
|
|
900
907
|
const channel = `dex-wallet-pnl-list:${chain}_${walletAddress}`;
|
|
901
|
-
return this.subscribe(channel, (data) => callback(data
|
|
908
|
+
return this.subscribe(channel, (data) => callback(data === null || data === void 0 ? void 0 : data.map((it) => ({
|
|
902
909
|
walletAddress: it.a,
|
|
903
910
|
buys: it.bs,
|
|
904
911
|
buyAmount: it.ba,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StreamApi } from "./
|
|
2
|
-
import { DexApi, Configuration, TransactionApi, DefiSolanaMoonshotApi, DefiSolanaPumpfunApi, DexPoolApi, TokenApi, RankingApi, TradeApi, WalletApi, RedPacketApi, IpfsApi, WatchlistApi, BlockchainApi, JobsApi } from "./openapi
|
|
1
|
+
import { StreamApi } from "./stream";
|
|
2
|
+
import { DexApi, Configuration, TransactionApi, DefiSolanaMoonshotApi, DefiSolanaPumpfunApi, DexPoolApi, TokenApi, RankingApi, TradeApi, WalletApi, RedPacketApi, IpfsApi, WatchlistApi, BlockchainApi, JobsApi } from "./openapi";
|
|
3
3
|
export interface TokenProvider {
|
|
4
4
|
getToken(): Promise<string> | string;
|
|
5
5
|
}
|
|
@@ -13,7 +13,7 @@ export interface DexAggregatorOptions {
|
|
|
13
13
|
serverUrl?: string;
|
|
14
14
|
streamUrl?: string;
|
|
15
15
|
}
|
|
16
|
-
export declare const LIB_VERSION = "0.1.
|
|
16
|
+
export declare const LIB_VERSION = "0.1.5";
|
|
17
17
|
export declare class DexClient {
|
|
18
18
|
readonly requestCtx: DexRequestContext;
|
|
19
19
|
readonly _configuration: Configuration;
|
package/dist/index.js
CHANGED
|
@@ -1,111 +1,127 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.DexClient = exports.LIB_VERSION = void 0;
|
|
4
|
-
const stream_1 = require("./
|
|
5
|
-
const
|
|
13
|
+
const stream_1 = require("./stream");
|
|
14
|
+
const openapi_1 = require("./openapi");
|
|
6
15
|
const event_source_polyfill_1 = require("event-source-polyfill");
|
|
7
|
-
exports.LIB_VERSION = "0.1.
|
|
16
|
+
exports.LIB_VERSION = "0.1.5";
|
|
8
17
|
class UserAgentMiddleware {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
context.init.headers
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
context.init.headers
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
pre(context) {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
if (!context.init.headers) {
|
|
21
|
+
context.init.headers = {};
|
|
22
|
+
}
|
|
23
|
+
if (context.init.headers instanceof Headers) {
|
|
24
|
+
context.init.headers.set("User-Agent", `dex/${exports.LIB_VERSION}/javascript`);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
context.init.headers["User-Agent"] = `dex/${exports.LIB_VERSION}/javascript`;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
19
30
|
}
|
|
20
|
-
|
|
31
|
+
post(context) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () { });
|
|
21
33
|
}
|
|
22
34
|
}
|
|
23
35
|
class DexClient {
|
|
24
36
|
constructor(accessToken, options = {}) {
|
|
25
|
-
|
|
26
|
-
const
|
|
37
|
+
var _a, _b;
|
|
38
|
+
const baseUrl = (_a = options.serverUrl) !== null && _a !== void 0 ? _a : "https://api-dex.chainstream.io";
|
|
39
|
+
const streamUrl = (_b = options.streamUrl) !== null && _b !== void 0 ? _b : "wss://realtime-dex.chainstream.io/connection/websocket";
|
|
27
40
|
const tokenProvider = typeof accessToken === "string"
|
|
28
41
|
? {
|
|
29
42
|
getToken: () => accessToken,
|
|
30
43
|
}
|
|
31
44
|
: accessToken;
|
|
32
45
|
this.requestCtx = { baseUrl, streamUrl, accessToken };
|
|
33
|
-
const config = new
|
|
46
|
+
const config = new openapi_1.Configuration({
|
|
34
47
|
basePath: baseUrl,
|
|
35
48
|
middleware: [new UserAgentMiddleware()],
|
|
36
|
-
accessToken:
|
|
49
|
+
accessToken: () => __awaiter(this, void 0, void 0, function* () {
|
|
37
50
|
return typeof accessToken === "string"
|
|
38
51
|
? accessToken
|
|
39
|
-
:
|
|
40
|
-
},
|
|
52
|
+
: yield accessToken.getToken();
|
|
53
|
+
}),
|
|
41
54
|
headers: {
|
|
42
|
-
|
|
43
|
-
}
|
|
55
|
+
"User-Agent": `dex/${exports.LIB_VERSION}/javascript`,
|
|
56
|
+
},
|
|
44
57
|
});
|
|
45
58
|
this._configuration = config;
|
|
46
|
-
this.dex = new
|
|
47
|
-
this.dexpool = new
|
|
48
|
-
this.token = new
|
|
49
|
-
this.trade = new
|
|
50
|
-
this.ranking = new
|
|
51
|
-
this.transaction = new
|
|
52
|
-
this.moonshot = new
|
|
53
|
-
this.pumpfun = new
|
|
59
|
+
this.dex = new openapi_1.DexApi(config);
|
|
60
|
+
this.dexpool = new openapi_1.DexPoolApi(config);
|
|
61
|
+
this.token = new openapi_1.TokenApi(config);
|
|
62
|
+
this.trade = new openapi_1.TradeApi(config);
|
|
63
|
+
this.ranking = new openapi_1.RankingApi(config);
|
|
64
|
+
this.transaction = new openapi_1.TransactionApi(config);
|
|
65
|
+
this.moonshot = new openapi_1.DefiSolanaMoonshotApi(config);
|
|
66
|
+
this.pumpfun = new openapi_1.DefiSolanaPumpfunApi(config);
|
|
54
67
|
this.stream = new stream_1.StreamApi(this.requestCtx);
|
|
55
|
-
this.wallet = new
|
|
56
|
-
this.redPacket = new
|
|
57
|
-
this.ipfs = new
|
|
58
|
-
this.blockchain = new
|
|
59
|
-
this.watchlist = new
|
|
60
|
-
this.jobs = new
|
|
68
|
+
this.wallet = new openapi_1.WalletApi(config);
|
|
69
|
+
this.redPacket = new openapi_1.RedPacketApi(config);
|
|
70
|
+
this.ipfs = new openapi_1.IpfsApi(config);
|
|
71
|
+
this.blockchain = new openapi_1.BlockchainApi(config);
|
|
72
|
+
this.watchlist = new openapi_1.WatchlistApi(config);
|
|
73
|
+
this.jobs = new openapi_1.JobsApi(config);
|
|
61
74
|
this.stream.connect();
|
|
62
75
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
waitForJob(jobId_1) {
|
|
77
|
+
return __awaiter(this, arguments, void 0, function* (jobId, timeout = 60000) {
|
|
78
|
+
const accessToken = typeof this.requestCtx.accessToken === "string"
|
|
79
|
+
? this.requestCtx.accessToken
|
|
80
|
+
: yield this.requestCtx.accessToken.getToken();
|
|
81
|
+
return new Promise((resolve, reject) => {
|
|
82
|
+
const sse = new event_source_polyfill_1.EventSourcePolyfill(`${this.requestCtx.baseUrl}/jobs/${jobId}/streaming`, {
|
|
83
|
+
headers: {
|
|
84
|
+
Authorization: `Bearer ${accessToken}`,
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
const timeoutId = setTimeout(() => {
|
|
88
|
+
sse.close();
|
|
89
|
+
reject(new Error(`Job ${jobId} timed out after ${timeout}ms`));
|
|
90
|
+
}, timeout);
|
|
91
|
+
sse.onmessage = (event) => {
|
|
92
|
+
try {
|
|
93
|
+
console.log("event.data: ", event.data);
|
|
94
|
+
const data = JSON.parse(event.data);
|
|
95
|
+
if (data.status === "error") {
|
|
96
|
+
sse.close();
|
|
97
|
+
reject(new Error(`Error: ${data.message}`));
|
|
98
|
+
}
|
|
99
|
+
else if (data.status === "completed") {
|
|
100
|
+
clearTimeout(timeoutId);
|
|
101
|
+
sse.close();
|
|
102
|
+
resolve(data);
|
|
103
|
+
}
|
|
84
104
|
}
|
|
85
|
-
|
|
105
|
+
catch (e) {
|
|
86
106
|
clearTimeout(timeoutId);
|
|
87
107
|
sse.close();
|
|
88
|
-
|
|
108
|
+
reject(new Error("Error parsing event data"));
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
sse.onopen = () => {
|
|
112
|
+
console.log("SSE connection opened");
|
|
113
|
+
};
|
|
114
|
+
sse.onerror = (error) => {
|
|
115
|
+
var _a;
|
|
116
|
+
if ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes("No activity within")) {
|
|
117
|
+
console.log("SSE reconnecting due to inactivity...");
|
|
118
|
+
return;
|
|
89
119
|
}
|
|
90
|
-
}
|
|
91
|
-
catch (e) {
|
|
92
120
|
clearTimeout(timeoutId);
|
|
93
121
|
sse.close();
|
|
94
|
-
reject(new Error(
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
sse.onopen = () => {
|
|
98
|
-
console.log("SSE connection opened");
|
|
99
|
-
};
|
|
100
|
-
sse.onerror = (error) => {
|
|
101
|
-
if (error.message?.includes("No activity within")) {
|
|
102
|
-
console.log("SSE reconnecting due to inactivity...");
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
clearTimeout(timeoutId);
|
|
106
|
-
sse.close();
|
|
107
|
-
reject(new Error(`Error in SSE connection: ${error}`));
|
|
108
|
-
};
|
|
122
|
+
reject(new Error(`Error in SSE connection: ${error}`));
|
|
123
|
+
};
|
|
124
|
+
});
|
|
109
125
|
});
|
|
110
126
|
}
|
|
111
127
|
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.GetLatestBlockChainEnum = exports.BlockchainApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class BlockchainApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* CONTROLLER.GET_LATEST_BLOCK.DESCRIPTION
|
|
34
|
+
* CONTROLLER.GET_LATEST_BLOCK.SUMMARY
|
|
35
|
+
*/
|
|
36
|
+
getLatestBlockRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['chain'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('chain', 'Required parameter "chain" was null or undefined when calling getLatestBlock().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
44
|
+
const token = this.configuration.accessToken;
|
|
45
|
+
const tokenString = yield token("bearer", []);
|
|
46
|
+
if (tokenString) {
|
|
47
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
let urlPath = `/v1/blockchain/{chain}/latest_block`;
|
|
51
|
+
urlPath = urlPath.replace(`{${"chain"}}`, encodeURIComponent(String(requestParameters['chain'])));
|
|
52
|
+
const response = yield this.request({
|
|
53
|
+
path: urlPath,
|
|
54
|
+
method: 'GET',
|
|
55
|
+
headers: headerParameters,
|
|
56
|
+
query: queryParameters,
|
|
57
|
+
}, initOverrides);
|
|
58
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BlockchainLatestBlockDTOFromJSON)(jsonValue));
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* CONTROLLER.GET_LATEST_BLOCK.DESCRIPTION
|
|
63
|
+
* CONTROLLER.GET_LATEST_BLOCK.SUMMARY
|
|
64
|
+
*/
|
|
65
|
+
getLatestBlock(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const response = yield this.getLatestBlockRaw(requestParameters, initOverrides);
|
|
68
|
+
return yield response.value();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* CONTROLLER.GET_SUPPORTED_BLOCKCHAINS.DESCRIPTION
|
|
73
|
+
* CONTROLLER.GET_SUPPORTED_BLOCKCHAINS.SUMMARY
|
|
74
|
+
*/
|
|
75
|
+
getSupportedBlockchainsRaw(initOverrides) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
const queryParameters = {};
|
|
78
|
+
const headerParameters = {};
|
|
79
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
80
|
+
const token = this.configuration.accessToken;
|
|
81
|
+
const tokenString = yield token("bearer", []);
|
|
82
|
+
if (tokenString) {
|
|
83
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
let urlPath = `/v1/blockchain`;
|
|
87
|
+
const response = yield this.request({
|
|
88
|
+
path: urlPath,
|
|
89
|
+
method: 'GET',
|
|
90
|
+
headers: headerParameters,
|
|
91
|
+
query: queryParameters,
|
|
92
|
+
}, initOverrides);
|
|
93
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.BlockchainDTOFromJSON));
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* CONTROLLER.GET_SUPPORTED_BLOCKCHAINS.DESCRIPTION
|
|
98
|
+
* CONTROLLER.GET_SUPPORTED_BLOCKCHAINS.SUMMARY
|
|
99
|
+
*/
|
|
100
|
+
getSupportedBlockchains(initOverrides) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
const response = yield this.getSupportedBlockchainsRaw(initOverrides);
|
|
103
|
+
return yield response.value();
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.BlockchainApi = BlockchainApi;
|
|
108
|
+
/**
|
|
109
|
+
* @export
|
|
110
|
+
*/
|
|
111
|
+
exports.GetLatestBlockChainEnum = {
|
|
112
|
+
Sol: 'sol',
|
|
113
|
+
Base: 'base',
|
|
114
|
+
Bsc: 'bsc',
|
|
115
|
+
Polygon: 'polygon',
|
|
116
|
+
Arbitrum: 'arbitrum',
|
|
117
|
+
Optimism: 'optimism',
|
|
118
|
+
Avalanche: 'avalanche',
|
|
119
|
+
Ethereum: 'ethereum',
|
|
120
|
+
Zksync: 'zksync',
|
|
121
|
+
Sui: 'sui'
|
|
122
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.DefiSolanaMoonshotApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class DefiSolanaMoonshotApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* CONTROLLER.MOONSHOT.CREATE_TOKEN.DESCRIPTION
|
|
34
|
+
* CONTROLLER.MOONSHOT.CREATE_TOKEN.SUMMARY
|
|
35
|
+
*/
|
|
36
|
+
moonshotCreateTokenRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['moonshotCreateTokenInput'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('moonshotCreateTokenInput', 'Required parameter "moonshotCreateTokenInput" was null or undefined when calling moonshotCreateToken().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
44
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
45
|
+
const token = this.configuration.accessToken;
|
|
46
|
+
const tokenString = yield token("bearer", []);
|
|
47
|
+
if (tokenString) {
|
|
48
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
let urlPath = `/v1/solana/moonshot/create`;
|
|
52
|
+
const response = yield this.request({
|
|
53
|
+
path: urlPath,
|
|
54
|
+
method: 'POST',
|
|
55
|
+
headers: headerParameters,
|
|
56
|
+
query: queryParameters,
|
|
57
|
+
body: (0, index_1.MoonshotCreateTokenInputToJSON)(requestParameters['moonshotCreateTokenInput']),
|
|
58
|
+
}, initOverrides);
|
|
59
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MoonshotCreateTokenReplyFromJSON)(jsonValue));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* CONTROLLER.MOONSHOT.CREATE_TOKEN.DESCRIPTION
|
|
64
|
+
* CONTROLLER.MOONSHOT.CREATE_TOKEN.SUMMARY
|
|
65
|
+
*/
|
|
66
|
+
moonshotCreateToken(requestParameters, initOverrides) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const response = yield this.moonshotCreateTokenRaw(requestParameters, initOverrides);
|
|
69
|
+
return yield response.value();
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* CONTROLLER.MOONSHOT.SUBMIT_CREATE_TOKEN.DESCRIPTION
|
|
74
|
+
* CONTROLLER.MOONSHOT.SUBMIT_CREATE_TOKEN.SUMMARY
|
|
75
|
+
*/
|
|
76
|
+
moonshotSubmitCreateTokenRaw(requestParameters, initOverrides) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
if (requestParameters['moonshotSubmitCreateTokenInput'] == null) {
|
|
79
|
+
throw new runtime.RequiredError('moonshotSubmitCreateTokenInput', 'Required parameter "moonshotSubmitCreateTokenInput" was null or undefined when calling moonshotSubmitCreateToken().');
|
|
80
|
+
}
|
|
81
|
+
const queryParameters = {};
|
|
82
|
+
const headerParameters = {};
|
|
83
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
84
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
85
|
+
const token = this.configuration.accessToken;
|
|
86
|
+
const tokenString = yield token("bearer", []);
|
|
87
|
+
if (tokenString) {
|
|
88
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
let urlPath = `/v1/solana/moonshot/submitCreateToken`;
|
|
92
|
+
const response = yield this.request({
|
|
93
|
+
path: urlPath,
|
|
94
|
+
method: 'POST',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
body: (0, index_1.MoonshotSubmitCreateTokenInputToJSON)(requestParameters['moonshotSubmitCreateTokenInput']),
|
|
98
|
+
}, initOverrides);
|
|
99
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.MoonshotSubmitCreateToken200ResponseFromJSON)(jsonValue));
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* CONTROLLER.MOONSHOT.SUBMIT_CREATE_TOKEN.DESCRIPTION
|
|
104
|
+
* CONTROLLER.MOONSHOT.SUBMIT_CREATE_TOKEN.SUMMARY
|
|
105
|
+
*/
|
|
106
|
+
moonshotSubmitCreateToken(requestParameters, initOverrides) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
const response = yield this.moonshotSubmitCreateTokenRaw(requestParameters, initOverrides);
|
|
109
|
+
return yield response.value();
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
exports.DefiSolanaMoonshotApi = DefiSolanaMoonshotApi;
|