@gala-chain/launchpad-sdk 8.1.0 → 9.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +837 -0
- package/EXAMPLES.md +95 -681
- package/MIGRATING-TO-9.0.md +343 -0
- package/README.md +46 -17
- package/dist/LaunchpadSDK.d.ts +536 -616
- package/dist/LaunchpadSDK.d.ts.map +1 -1
- package/dist/api/LaunchpadAPI.d.ts +6 -176
- package/dist/api/LaunchpadAPI.d.ts.map +1 -1
- package/dist/auth/SessionAuthService.d.ts +32 -2
- package/dist/auth/SessionAuthService.d.ts.map +1 -1
- package/dist/auth/SignatureAuth.d.ts +2 -2
- package/dist/auth/SignatureAuth.d.ts.map +1 -1
- package/dist/auth/session.d.ts +59 -0
- package/dist/auth/session.d.ts.map +1 -0
- package/dist/auth/types.d.ts +7 -2
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/config/environments.d.ts +7 -2
- package/dist/config/environments.d.ts.map +1 -1
- package/dist/constants/decimals.d.ts +0 -23
- package/dist/constants/decimals.d.ts.map +1 -1
- package/dist/constants/endpoints.d.ts +19 -8
- package/dist/constants/endpoints.d.ts.map +1 -1
- package/dist/constants/enums.d.ts +19 -0
- package/dist/constants/enums.d.ts.map +1 -1
- package/dist/constants/version.generated.d.ts +1 -1
- package/dist/constants/version.generated.d.ts.map +1 -1
- package/dist/errors/LaunchpadSDKError.d.ts +18 -0
- package/dist/errors/LaunchpadSDKError.d.ts.map +1 -1
- package/dist/helpers/sdk.d.ts.map +1 -1
- package/dist/index.browser.d.ts +40 -45
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.esm.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.node.d.ts +4 -5
- package/dist/index.node.d.ts.map +1 -1
- package/dist/launchpad/bundle-submission.d.ts +57 -10
- package/dist/launchpad/bundle-submission.d.ts.map +1 -1
- package/dist/launchpad/create-sale-validation.d.ts +19 -0
- package/dist/launchpad/create-sale-validation.d.ts.map +1 -0
- package/dist/launchpad/transport.d.ts +33 -2
- package/dist/launchpad/transport.d.ts.map +1 -1
- package/dist/launchpad/writes.d.ts +37 -11
- package/dist/launchpad/writes.d.ts.map +1 -1
- package/dist/native.cjs +1 -1
- package/dist/native.d.ts +4 -5
- package/dist/native.d.ts.map +1 -1
- package/dist/native.esm.js +1 -1
- package/dist/schemas/launchpad.d.ts +3 -2
- package/dist/schemas/launchpad.d.ts.map +1 -1
- package/dist/schemas/primitives.d.ts +12 -2
- package/dist/schemas/primitives.d.ts.map +1 -1
- package/dist/schemas/user.d.ts +3 -18
- package/dist/schemas/user.d.ts.map +1 -1
- package/dist/schemas/validators.d.ts +3 -3
- package/dist/services/AbstractCacheService.d.ts +2 -2
- package/dist/services/ApiKeyService.d.ts +1 -1
- package/dist/services/BanService.d.ts +1 -1
- package/dist/services/ChartService.d.ts.map +1 -1
- package/dist/services/ContentReactionService.d.ts +6 -18
- package/dist/services/ContentReactionService.d.ts.map +1 -1
- package/dist/services/EventsQueryService.d.ts +47 -0
- package/dist/services/EventsQueryService.d.ts.map +1 -0
- package/dist/services/GalaChainBalanceService.d.ts +17 -89
- package/dist/services/GalaChainBalanceService.d.ts.map +1 -1
- package/dist/services/GalaChainLockService.d.ts +19 -20
- package/dist/services/GalaChainLockService.d.ts.map +1 -1
- package/dist/services/GalaChainService.d.ts +28 -15
- package/dist/services/GalaChainService.d.ts.map +1 -1
- package/dist/services/GalaChainTokenService.d.ts +25 -53
- package/dist/services/GalaChainTokenService.d.ts.map +1 -1
- package/dist/services/GalaChainTransferService.d.ts +42 -41
- package/dist/services/GalaChainTransferService.d.ts.map +1 -1
- package/dist/services/HealthService.d.ts +33 -0
- package/dist/services/HealthService.d.ts.map +1 -0
- package/dist/services/ImageService.d.ts +3 -3
- package/dist/services/ImageService.d.ts.map +1 -1
- package/dist/services/LaunchpadPriceService.d.ts +66 -0
- package/dist/services/LaunchpadPriceService.d.ts.map +1 -0
- package/dist/services/LaunchpadService.d.ts +34 -42
- package/dist/services/LaunchpadService.d.ts.map +1 -1
- package/dist/services/MessagesService.d.ts +12 -44
- package/dist/services/MessagesService.d.ts.map +1 -1
- package/dist/services/ModeratorService.d.ts +2 -2
- package/dist/services/ModeratorService.d.ts.map +1 -1
- package/dist/services/NftCollectionService.d.ts +22 -6
- package/dist/services/NftCollectionService.d.ts.map +1 -1
- package/dist/services/OverseerService.d.ts +3 -3
- package/dist/services/OverseerService.d.ts.map +1 -1
- package/dist/services/PlatformStatsService.d.ts +1 -2
- package/dist/services/PlatformStatsService.d.ts.map +1 -1
- package/dist/services/PoolService.d.ts +28 -65
- package/dist/services/PoolService.d.ts.map +1 -1
- package/dist/services/RestrictedNamesService.d.ts +1 -1
- package/dist/services/RestrictedNamesService.d.ts.map +1 -1
- package/dist/services/StreamChatService.d.ts +8 -19
- package/dist/services/StreamChatService.d.ts.map +1 -1
- package/dist/services/StreamTokenServiceBase.d.ts +2 -1
- package/dist/services/StreamTokenServiceBase.d.ts.map +1 -1
- package/dist/services/StreamWebSocketService.d.ts +423 -451
- package/dist/services/StreamWebSocketService.d.ts.map +1 -1
- package/dist/services/StreamingService.d.ts +14 -15
- package/dist/services/StreamingService.d.ts.map +1 -1
- package/dist/services/TokenBanService.d.ts +1 -1
- package/dist/services/TokenResolverService.d.ts +5 -5
- package/dist/services/TokenResolverService.d.ts.map +1 -1
- package/dist/services/TradeService.d.ts +13 -9
- package/dist/services/TradeService.d.ts.map +1 -1
- package/dist/services/TradingQuotesService.d.ts.map +1 -1
- package/dist/services/UserService.d.ts +64 -20
- package/dist/services/UserService.d.ts.map +1 -1
- package/dist/services/gateway-transport.d.ts +32 -0
- package/dist/services/gateway-transport.d.ts.map +1 -0
- package/dist/services/gateway-writes.d.ts +83 -0
- package/dist/services/gateway-writes.d.ts.map +1 -0
- package/dist/services/realtime/event-catalog.d.ts +456 -0
- package/dist/services/realtime/event-catalog.d.ts.map +1 -0
- package/dist/services/shared/pagination-helpers.d.ts +22 -5
- package/dist/services/shared/pagination-helpers.d.ts.map +1 -1
- package/dist/services/shared/service-validators.d.ts.map +1 -1
- package/dist/signing/index.d.ts +2 -3
- package/dist/signing/index.d.ts.map +1 -1
- package/dist/signing/signers.d.ts +64 -9
- package/dist/signing/signers.d.ts.map +1 -1
- package/dist/signing/types.d.ts +7 -10
- package/dist/signing/types.d.ts.map +1 -1
- package/dist/types/api-key.dto.d.ts +1 -1
- package/dist/types/ban.dto.d.ts +21 -16
- package/dist/types/ban.dto.d.ts.map +1 -1
- package/dist/types/burn.dto.d.ts +4 -2
- package/dist/types/burn.dto.d.ts.map +1 -1
- package/dist/types/chat-messages.dto.d.ts +10 -72
- package/dist/types/chat-messages.dto.d.ts.map +1 -1
- package/dist/types/comments.dto.d.ts +8 -78
- package/dist/types/comments.dto.d.ts.map +1 -1
- package/dist/types/common.d.ts +42 -85
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/constraints.d.ts +47 -23
- package/dist/types/constraints.d.ts.map +1 -1
- package/dist/types/content-flag.dto.d.ts +5 -1
- package/dist/types/content-flag.dto.d.ts.map +1 -1
- package/dist/types/content-reactions.dto.d.ts +0 -4
- package/dist/types/content-reactions.dto.d.ts.map +1 -1
- package/dist/types/dto.d.ts +0 -5
- package/dist/types/dto.d.ts.map +1 -1
- package/dist/types/engagement-stats.dto.d.ts +16 -27
- package/dist/types/engagement-stats.dto.d.ts.map +1 -1
- package/dist/types/events.dto.d.ts +89 -0
- package/dist/types/events.dto.d.ts.map +1 -1
- package/dist/types/global-feed.dto.d.ts +23 -164
- package/dist/types/global-feed.dto.d.ts.map +1 -1
- package/dist/types/health.dto.d.ts +32 -0
- package/dist/types/health.dto.d.ts.map +1 -0
- package/dist/types/launchpad.dto.d.ts +77 -323
- package/dist/types/launchpad.dto.d.ts.map +1 -1
- package/dist/types/lock.dto.d.ts +12 -7
- package/dist/types/lock.dto.d.ts.map +1 -1
- package/dist/types/messages.dto.d.ts +168 -118
- package/dist/types/messages.dto.d.ts.map +1 -1
- package/dist/types/moderator.dto.d.ts +1 -1
- package/dist/types/options.dto.d.ts +8 -36
- package/dist/types/options.dto.d.ts.map +1 -1
- package/dist/types/overseer.dto.d.ts +2 -1
- package/dist/types/overseer.dto.d.ts.map +1 -1
- package/dist/types/platform-stats.dto.d.ts +3 -3
- package/dist/types/realtime-events.dto.d.ts +340 -0
- package/dist/types/realtime-events.dto.d.ts.map +1 -0
- package/dist/types/restricted-names.dto.d.ts +2 -2
- package/dist/types/restricted-names.dto.d.ts.map +1 -1
- package/dist/types/stream-chat.dto.d.ts +15 -14
- package/dist/types/stream-chat.dto.d.ts.map +1 -1
- package/dist/types/streaming.dto.d.ts +73 -104
- package/dist/types/streaming.dto.d.ts.map +1 -1
- package/dist/types/token-ban.dto.d.ts.map +1 -1
- package/dist/types/token-config.dto.d.ts +34 -19
- package/dist/types/token-config.dto.d.ts.map +1 -1
- package/dist/types/trades-query.dto.d.ts +8 -24
- package/dist/types/trades-query.dto.d.ts.map +1 -1
- package/dist/types/user.dto.d.ts +133 -112
- package/dist/types/user.dto.d.ts.map +1 -1
- package/dist/types/websocket-events.dto.d.ts +5 -5
- package/dist/types/websocket-events.dto.d.ts.map +1 -1
- package/dist/utils/address-formatter.d.ts +25 -2
- package/dist/utils/address-formatter.d.ts.map +1 -1
- package/dist/utils/agent-config.d.ts +9 -4
- package/dist/utils/agent-config.d.ts.map +1 -1
- package/dist/utils/auto-pagination.d.ts +7 -240
- package/dist/utils/auto-pagination.d.ts.map +1 -1
- package/dist/utils/bignumber-helpers.d.ts +3 -2
- package/dist/utils/bignumber-helpers.d.ts.map +1 -1
- package/dist/utils/delimiter-parser.d.ts +0 -13
- package/dist/utils/delimiter-parser.d.ts.map +1 -1
- package/dist/utils/error-factories.d.ts +4 -3
- package/dist/utils/error-factories.d.ts.map +1 -1
- package/dist/utils/error-patterns.d.ts +0 -47
- package/dist/utils/error-patterns.d.ts.map +1 -1
- package/dist/utils/error-wrapper.d.ts +5 -5
- package/dist/utils/errors.d.ts +53 -318
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/http.d.ts +36 -3
- package/dist/utils/http.d.ts.map +1 -1
- package/dist/utils/message-validators.d.ts.map +1 -1
- package/dist/utils/pagination-helpers.d.ts +17 -0
- package/dist/utils/pagination-helpers.d.ts.map +1 -1
- package/dist/utils/pagination-validation.d.ts +2 -2
- package/dist/utils/response-handlers.d.ts.map +1 -1
- package/dist/utils/service-validators.d.ts +6 -6
- package/dist/utils/service-validators.d.ts.map +1 -1
- package/dist/utils/token-format-converter.d.ts +1 -1
- package/dist/utils/token-parser.d.ts +6 -127
- package/dist/utils/token-parser.d.ts.map +1 -1
- package/dist/utils/token-stringification.d.ts +7 -7
- package/dist/utils/token-stringification.d.ts.map +1 -1
- package/dist/utils/tokenNameNormalizer.d.ts +2 -2
- package/dist/utils/tokenNormalizer.d.ts +5 -29
- package/dist/utils/tokenNormalizer.d.ts.map +1 -1
- package/dist/utils/unique-key-generator.d.ts +7 -134
- package/dist/utils/unique-key-generator.d.ts.map +1 -1
- package/dist/utils/validation-helpers.d.ts +21 -64
- package/dist/utils/validation-helpers.d.ts.map +1 -1
- package/dist/utils/validation.d.ts +4 -1
- package/dist/utils/validation.d.ts.map +1 -1
- package/package.json +47 -87
- package/dist/api/dto/BurnTokensDto.d.ts +0 -77
- package/dist/api/dto/BurnTokensDto.d.ts.map +0 -1
- package/dist/api/dto/LockTokenDto.d.ts +0 -85
- package/dist/api/dto/LockTokenDto.d.ts.map +0 -1
- package/dist/api/dto/TransferTokenDto.d.ts +0 -64
- package/dist/api/dto/TransferTokenDto.d.ts.map +0 -1
- package/dist/api/dto/UnlockTokenDto.d.ts +0 -74
- package/dist/api/dto/UnlockTokenDto.d.ts.map +0 -1
- package/dist/bridge/BridgeService.d.ts +0 -484
- package/dist/bridge/BridgeService.d.ts.map +0 -1
- package/dist/bridge/GalaConnectClient.d.ts +0 -170
- package/dist/bridge/GalaConnectClient.d.ts.map +0 -1
- package/dist/bridge/constants/index.d.ts +0 -7
- package/dist/bridge/constants/index.d.ts.map +0 -1
- package/dist/bridge/constants/tokens.d.ts +0 -212
- package/dist/bridge/constants/tokens.d.ts.map +0 -1
- package/dist/bridge/index.d.ts +0 -24
- package/dist/bridge/index.d.ts.map +0 -1
- package/dist/bridge/public-types.d.ts +0 -2
- package/dist/bridge/public-types.d.ts.map +0 -1
- package/dist/bridge/strategies/BridgeStrategy.d.ts +0 -204
- package/dist/bridge/strategies/BridgeStrategy.d.ts.map +0 -1
- package/dist/bridge/strategies/EthereumBridgeStrategy.d.ts +0 -178
- package/dist/bridge/strategies/EthereumBridgeStrategy.d.ts.map +0 -1
- package/dist/bridge/strategies/SolanaBridgeStrategy.d.ts +0 -236
- package/dist/bridge/strategies/SolanaBridgeStrategy.d.ts.map +0 -1
- package/dist/bridge/types/bridge.dto.d.ts +0 -772
- package/dist/bridge/types/bridge.dto.d.ts.map +0 -1
- package/dist/bridge/types/bridgeable-token.dto.d.ts +0 -209
- package/dist/bridge/types/bridgeable-token.dto.d.ts.map +0 -1
- package/dist/bridge/types/eip712.d.ts +0 -66
- package/dist/bridge/types/eip712.d.ts.map +0 -1
- package/dist/bridge/types/index.d.ts +0 -8
- package/dist/bridge/types/index.d.ts.map +0 -1
- package/dist/bridge/utils/RateLimiter.d.ts +0 -34
- package/dist/bridge/utils/RateLimiter.d.ts.map +0 -1
- package/dist/bridge/utils/address-formatter.d.ts +0 -25
- package/dist/bridge/utils/address-formatter.d.ts.map +0 -1
- package/dist/bridge/utils/addressValidation.d.ts +0 -200
- package/dist/bridge/utils/addressValidation.d.ts.map +0 -1
- package/dist/bridge/utils/balanceHelpers.d.ts +0 -215
- package/dist/bridge/utils/balanceHelpers.d.ts.map +0 -1
- package/dist/bridge/utils/bridgeErrors.d.ts +0 -98
- package/dist/bridge/utils/bridgeErrors.d.ts.map +0 -1
- package/dist/bridge/utils/bridgeOutHelpers.d.ts +0 -68
- package/dist/bridge/utils/bridgeOutHelpers.d.ts.map +0 -1
- package/dist/bridge/utils/bridgePayload.d.ts +0 -98
- package/dist/bridge/utils/bridgePayload.d.ts.map +0 -1
- package/dist/bridge/utils/bridgeStatusParser.d.ts +0 -76
- package/dist/bridge/utils/bridgeStatusParser.d.ts.map +0 -1
- package/dist/bridge/utils/eip712Helpers.d.ts +0 -66
- package/dist/bridge/utils/eip712Helpers.d.ts.map +0 -1
- package/dist/bridge/utils/index.d.ts +0 -19
- package/dist/bridge/utils/index.d.ts.map +0 -1
- package/dist/bridge/utils/retry.d.ts +0 -112
- package/dist/bridge/utils/retry.d.ts.map +0 -1
- package/dist/bridge/utils/strategyDelegation.d.ts +0 -126
- package/dist/bridge/utils/strategyDelegation.d.ts.map +0 -1
- package/dist/bridge/utils/tokenIdUtils.d.ts +0 -86
- package/dist/bridge/utils/tokenIdUtils.d.ts.map +0 -1
- package/dist/bridge/utils/tokenMath.d.ts +0 -39
- package/dist/bridge/utils/tokenMath.d.ts.map +0 -1
- package/dist/bridge/utils/tokenMetadataResolver.d.ts +0 -97
- package/dist/bridge/utils/tokenMetadataResolver.d.ts.map +0 -1
- package/dist/helpers/wallet.d.ts +0 -151
- package/dist/helpers/wallet.d.ts.map +0 -1
- package/dist/react/WalletContext.d.ts +0 -60
- package/dist/react/WalletContext.d.ts.map +0 -1
- package/dist/react/index.d.ts +0 -65
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/types.d.ts +0 -76
- package/dist/react/types.d.ts.map +0 -1
- package/dist/react/useWallet.d.ts +0 -123
- package/dist/react/useWallet.d.ts.map +0 -1
- package/dist/react/useWalletConnection.d.ts +0 -89
- package/dist/react/useWalletConnection.d.ts.map +0 -1
- package/dist/react/useWalletDetection.d.ts +0 -81
- package/dist/react/useWalletDetection.d.ts.map +0 -1
- package/dist/react.cjs +0 -1
- package/dist/react.esm.js +0 -1
- package/dist/services/AbstractTokenFetchService.d.ts +0 -150
- package/dist/services/AbstractTokenFetchService.d.ts.map +0 -1
- package/dist/services/BatchedCacheService.d.ts +0 -133
- package/dist/services/BatchedCacheService.d.ts.map +0 -1
- package/dist/services/BridgeableTokenCache.d.ts +0 -120
- package/dist/services/BridgeableTokenCache.d.ts.map +0 -1
- package/dist/services/BridgeableTokenService.d.ts +0 -218
- package/dist/services/BridgeableTokenService.d.ts.map +0 -1
- package/dist/services/DexService.d.ts +0 -440
- package/dist/services/DexService.d.ts.map +0 -1
- package/dist/services/NetworkKeyedCacheService.d.ts +0 -185
- package/dist/services/NetworkKeyedCacheService.d.ts.map +0 -1
- package/dist/services/PriceHistoryService.d.ts +0 -209
- package/dist/services/PriceHistoryService.d.ts.map +0 -1
- package/dist/services/StreamingEventService.d.ts +0 -441
- package/dist/services/StreamingEventService.d.ts.map +0 -1
- package/dist/services/WrapService.d.ts +0 -171
- package/dist/services/WrapService.d.ts.map +0 -1
- package/dist/services/WrappableTokenCache.d.ts +0 -100
- package/dist/services/WrappableTokenCache.d.ts.map +0 -1
- package/dist/services/WrappableTokenService.d.ts +0 -130
- package/dist/services/WrappableTokenService.d.ts.map +0 -1
- package/dist/setup.d.ts +0 -8
- package/dist/setup.d.ts.map +0 -1
- package/dist/tokens/transfers.d.ts +0 -95
- package/dist/tokens/transfers.d.ts.map +0 -1
- package/dist/types/comment.dto.d.ts +0 -176
- package/dist/types/comment.dto.d.ts.map +0 -1
- package/dist/types/galachain-api.types.d.ts +0 -297
- package/dist/types/galachain-api.types.d.ts.map +0 -1
- package/dist/types/priceHistory.dto.d.ts +0 -134
- package/dist/types/priceHistory.dto.d.ts.map +0 -1
- package/dist/types/streaming-events.dto.d.ts +0 -605
- package/dist/types/streaming-events.dto.d.ts.map +0 -1
- package/dist/types/token.types.d.ts +0 -359
- package/dist/types/token.types.d.ts.map +0 -1
- package/dist/types/wrappable-token.dto.d.ts +0 -305
- package/dist/types/wrappable-token.dto.d.ts.map +0 -1
- package/dist/utils/crypto-compat.d.ts +0 -40
- package/dist/utils/crypto-compat.d.ts.map +0 -1
- package/dist/utils/load-env.d.ts +0 -31
- package/dist/utils/load-env.d.ts.map +0 -1
- package/dist/utils/token-instance-key.d.ts +0 -57
- package/dist/utils/token-instance-key.d.ts.map +0 -1
- package/dist/utils/wallet.d.ts +0 -166
- package/dist/utils/wallet.d.ts.map +0 -1
- package/dist/wallet/ExternalWalletProvider.d.ts +0 -90
- package/dist/wallet/ExternalWalletProvider.d.ts.map +0 -1
- package/dist/wallet/GalaWalletProvider.d.ts +0 -122
- package/dist/wallet/GalaWalletProvider.d.ts.map +0 -1
- package/dist/wallet/PrivateKeyProvider.d.ts +0 -90
- package/dist/wallet/PrivateKeyProvider.d.ts.map +0 -1
- package/dist/wallet/detection.d.ts +0 -107
- package/dist/wallet/detection.d.ts.map +0 -1
- package/dist/wallet/event-handlers.d.ts +0 -50
- package/dist/wallet/event-handlers.d.ts.map +0 -1
- package/dist/wallet/index.d.ts +0 -51
- package/dist/wallet/index.d.ts.map +0 -1
- package/dist/wallet/signing-operation.d.ts +0 -19
- package/dist/wallet/signing-operation.d.ts.map +0 -1
- package/dist/wallet/typed-data-helpers.d.ts +0 -68
- package/dist/wallet/typed-data-helpers.d.ts.map +0 -1
- package/dist/wallet/types.d.ts +0 -267
- package/dist/wallet/types.d.ts.map +0 -1
- package/dist/wallet/utils.d.ts +0 -117
- package/dist/wallet/utils.d.ts.map +0 -1
- package/dist/wallet.cjs +0 -1
- package/dist/wallet.esm.js +0 -1
package/dist/LaunchpadSDK.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import type { GalaChainTokenClass, GalaChainTokenDetails, GalaChainTokenClassKey, HttpRequestor } from '@gala-chain/gala-core-sdk';
|
|
2
|
+
import type * as CoreBridgeModule from '@gala-chain/gala-core-sdk/bridge';
|
|
3
|
+
import type { BridgeableNetwork, BridgeFeeEstimate, BridgeInParams, BridgeOutParams, BridgeStatus, BridgeToken, BridgeTransaction, EstimateBridgeFeeParams, EthereumTransactionStatus, EthereumWalletBalanceResult, ExternalChainBalance, FetchBridgeableTokensOptions, FetchBridgeableTokensResult, FetchWrappableTokensOptions, FetchWrappableTokensResult, IsTokenBridgeableOptions, IsTokenBridgeableResult, IsTokenWrappableResult, SolanaTransactionStatus, SolanaWalletBalanceResult, UnwrapTokenOptions, WrappableToken, WrapTokenOptions, WrapUnwrapFeeEstimate, WrapUnwrapResult } from '@gala-chain/gala-core-sdk/bridge';
|
|
1
4
|
import { Wallet } from 'ethers';
|
|
2
|
-
import {
|
|
3
|
-
import type { BridgeFeeEstimate, BridgeInParams, BridgeOutParams, BridgeStatus, BridgeToken, BridgeTransaction, EstimateBridgeFeeParams, EthereumTransactionStatus, EthereumWalletBalanceResult, ExternalChainBalance, SolanaTransactionStatus, SolanaWalletBalanceResult } from './bridge/types/bridge.dto';
|
|
4
|
-
import type { BridgeableNetwork, FetchBridgeableTokensOptions, FetchBridgeableTokensResult, IsTokenBridgeableOptions, IsTokenBridgeableResult } from './bridge/types/bridgeable-token.dto';
|
|
5
|
+
import { type LaunchpadSession } from './auth/session';
|
|
5
6
|
import type { Environment } from './config/environments';
|
|
6
7
|
import { EventsBatcherService } from './services/EventsBatcherService';
|
|
7
|
-
import type { StreamEventCallbacks } from './services/
|
|
8
|
+
import type { StreamEventCallbacks } from './services/realtime/event-catalog';
|
|
9
|
+
import type { RealtimeListener, Unsubscribe } from './services/StreamWebSocketService';
|
|
10
|
+
import { StreamWebSocketService } from './services/StreamWebSocketService';
|
|
11
|
+
import { type SocketFactory } from './launchpad/bundle-submission';
|
|
8
12
|
import { LaunchpadWrites } from './launchpad/writes';
|
|
9
|
-
import type { HttpRequestor } from './launchpad/bundle-submission';
|
|
10
13
|
import type { LaunchpadSigner } from './signing';
|
|
11
|
-
import { TokenWrites } from './tokens/transfers';
|
|
12
14
|
import type { GetAIModerationOptions, GetAIModerationResult, GetAIModerationSettingsResult, GetAIModerationStatusResult, TriggerAIModerationOptions, TriggerAIModerationResult, UpdateAIModerationSettingsOptions, UpdateAIModerationSettingsResult } from './types/ai-moderation.dto';
|
|
13
15
|
import type { ApiKeyData, ApiKeyListResponse, CreateApiKeyOptions, CreateApiKeyResponse, ListApiKeysOptions, UpdateApiKeyOptions } from './types/api-key.dto';
|
|
14
16
|
import type { ActiveUsersResult, BanListResult, BanStatusResult, CreateBanOptions, CreateBanResult, CreateGlobalBanOptions, CreateGlobalBanResult, GetActiveUsersOptions, GetBanStatusOptions, GetGlobalBanOptions, GlobalBanListResult, GlobalBanStatusResult, ListBansOptions, ListGlobalBansOptions, RemoveBanOptions, RemoveBanResult, RemoveGlobalBanOptions, RemoveGlobalBanResult } from './types/ban.dto';
|
|
@@ -17,14 +19,14 @@ import type { FlushResult } from './types/cache-management.dto';
|
|
|
17
19
|
import type { CreateChatMessageOptions, CreateChatMessageResult, GetChatMessagesOptions, GetChatMessagesResult, UpdateChatMessageOptions, UpdateChatMessageResult } from './types/chat-messages.dto';
|
|
18
20
|
import type { GetClientFlagsResult } from './types/client-config.dto';
|
|
19
21
|
import type { CommentsResult, CreateCommentOptions, CreateCommentResult, DeleteCommentResult, GetCommentsOptions, UpdateCommentOptions, UpdateCommentResult } from './types/comments.dto';
|
|
20
|
-
import type { AddressFormat, ApiResponse, SDKConfig,
|
|
22
|
+
import type { AddressFormat, ApiResponse, SDKConfig, TokenId } from './types/common';
|
|
21
23
|
import type { ActionFlagOptions, ActionFlagResult, CreateFlagOptions, CreateFlagResult, DismissFlagOptions, DismissFlagResult, FlagListResult, ListFlagsOptions, ListGlobalFlagsOptions } from './types/content-flag.dto';
|
|
22
24
|
import type { AddContentReactionOptions, AddContentReactionResult, RemoveContentReactionOptions, RemoveContentReactionResult } from './types/content-reactions.dto';
|
|
23
25
|
import type { FetchTokenStatsResult } from './types/engagement-stats.dto';
|
|
24
|
-
import type { AmountCalculationResult,
|
|
26
|
+
import type { AmountCalculationResult, FetchPoolsOptions, GraduationCalculationResult, GraphDataResult, LaunchTokenData, PoolData, PoolsResult, SaleDetailsResult, TokenDistributionResult, TokenHolder, TokenSpotPrice, TradeQuoteParams, UserHolderContext, ValidateTokenResponse } from './types/launchpad.dto';
|
|
25
27
|
import type { LockTokensData, LockTokensResult, UnlockTokensData, UnlockTokensResult } from './types/lock.dto';
|
|
26
|
-
import type { CreateMessageOptions, CreateMessageResult, DeleteMessageResult, FetchMessagesOptions, FetchMessagesResult,
|
|
27
|
-
import type { TokenConfigData } from './types/token-config.dto';
|
|
28
|
+
import type { CreateMessageOptions, CreateMessageResult, DeleteMessageResult, FetchMessagesOptions, FetchMessagesResult, MessageStats, MessageType, PinMessageResult, PinnedMessageResult, UpdateMessageOptions, UpdateMessageResult } from './types/messages.dto';
|
|
29
|
+
import type { TokenConfigData, UpdateTokenConfigOptions } from './types/token-config.dto';
|
|
28
30
|
import type { ClaimModeratorInviteOptions, ClaimModeratorInviteResult, CreateModeratorInviteOptions, CreateModeratorInviteResult, GetModeratedTokensOptions, ListModeratorInvitesOptions, ModeratedTokensResult, ModeratorInviteListResult, PublicInviteInfo, UpdateInviteRoleOptions, UpdateInviteRoleResult, UpdateModeratorInviteOptions, UpdateModeratorInviteResult } from './types/moderator.dto';
|
|
29
31
|
import type { ClaimCollectionParams, ClaimCollectionResult, CreateTokenClassParams, CreateTokenClassResult, EstimateMintFeeParams, EstimateNftFeesParams, FetchTokenClassesParams, MintNftParams, MintNftResult, NftBalance, NftCollectionAuthorization, NftFeeEstimate, NftTokenClassWithSupply } from './types/nft.dto';
|
|
30
32
|
import type { GetNotificationPreferencesResult, RegisterPushTokenParams, RegisterPushTokenResult, UnregisterPushTokenResult, UpdateNotificationPreferencesParams, UpdateNotificationPreferencesResult } from './types/notification.dto';
|
|
@@ -32,28 +34,26 @@ import type { GetHomeOEmbedJsonResult, GetHomeOEmbedOptions, GetPoolOEmbedJsonRe
|
|
|
32
34
|
import type { BanStatsResponse, CreateOverseerDirectOptions, CreateOverseerInviteOptions, FlagStatsResponse, InviteStatsResponse, ListOverseerInvitesOptions, ListOverseersOptions, ListUsersOptions, Overseer, OverseerInviteWithUrl, OverseerStatusResponse, OverseerSummaryResponse, PaginatedOverseerInvites, PaginatedOverseers, PublicOverseerInviteInfo, TokenBanStatsResponse, UsersListResponse, UserStatsResponse, UserSummaryResponse } from './types/overseer.dto';
|
|
33
35
|
import type { PlatformConfig, UpdatePlatformConfigOptions } from './types/platform-config.dto';
|
|
34
36
|
import type { GetPlatformStatsResult } from './types/platform-stats.dto';
|
|
37
|
+
import type { EventStats, QueryEventsOptions, QueryEventsResult } from './types/events.dto';
|
|
38
|
+
import type { HealthCheckResponse } from './types/health.dto';
|
|
35
39
|
import type { GetRestrictedNamesResult, UpdateRestrictedNamesRequest, UpdateRestrictedNamesResult } from './types/restricted-names.dto';
|
|
36
40
|
import type { TokenLaunchResult, TradeResult } from './types/result.types';
|
|
37
|
-
import type { LoginResponse, RefreshResponse, SessionInfo } from './types/session-auth.dto';
|
|
41
|
+
import type { LoginRequest, LoginResponse, RefreshResponse, SessionInfo } from './types/session-auth.dto';
|
|
38
42
|
import type { AddSimulcastTargetOptions, AddSimulcastTargetResult, FetchRecordingsOptions, GetStreamRoleOptions, GetTokenAccessOptions, GlobalStreamingStatus, RecordingDownloadResult, RecordingsResult, ResetStreamKeyResult, SimulcastTargetsResult, StartStreamResult, StreamCredentialsResult, StreamRoleResponse, StreamSubscribedEvent, TokenAccessResult } from './types/streaming.dto';
|
|
39
43
|
import type { BanTokenOptions, BanTokenResult, GetTokenBanOptions, ListTokenBansOptions, TokenBanListResult, TokenBanStatusResult, UnbanTokenOptions, UnbanTokenResult } from './types/token-ban.dto';
|
|
40
44
|
import type { PoolDetailsData, TradesResult } from './types/trade.dto';
|
|
41
45
|
import type { GetTradesOptions, TradesQueryResult } from './types/trades-query.dto';
|
|
42
46
|
import type { GalaChainTransferReceipt, TransferGalaData, TransferTokenData } from './types/transfer.dto';
|
|
43
|
-
import type { AllReferralsResult, AvailableBalanceResult, FetchReferralsOptions, FetchReferralsSummaryOptions, FetchTokenBalanceOptions, GetManagedTokensOptions, LockedBalanceResult, ManagedTokensResult, ReferralsResult, ReferralsSummaryResult, ReferralUrlResult, TokenBalanceResult, UpdateProfileData, UploadProfileImageOptions, UserTokenListResult } from './types/user.dto';
|
|
47
|
+
import type { AllReferralsResult, AvailableBalanceResult, FetchReferralsOptions, FetchReferralsSummaryOptions, FetchTokenBalanceOptions, GetManagedTokensOptions, LockedBalanceResult, ManagedTokensResult, PublicUserProfile, ReferralCode, ReferralsResult, ReferralsSummaryResult, ReferralUrlResult, TokenBalanceResult, UpdateProfileData, UploadProfileImageOptions, UserGalaBalance, UserTokenListResult } from './types/user.dto';
|
|
44
48
|
import type { BalanceUpdatedPayload, ChatMessagePayload, ChatStatusPayload, ConnectedClient, ConnectedClientsResponse, DownloadReadyPayload, FeatureStatusPayload, GetConnectedClientsOptions, ModeratorAddedPayload, ModeratorRemovedPayload, RecordingsCountUpdatedPayload, EmitWebSocketEventRequest, RecordingStatusPayload, SiteConfigChangedPayload, StreamCountdownPayload, StreamStatusPayload, TokenBannedPayload, TokenUnbannedPayload, TradeExecutedPayload, TypingIndicatorPayload, UserProfileUpdatedPayload, ViewerCountPayload } from './types/websocket-admin.dto';
|
|
45
|
-
import type { EngagementStatsUpdatedEvent } from './types/websocket-events.dto';
|
|
46
49
|
import type { CommentCreatedEvent, HolderCountUpdatedEvent, ModeratorAddedEvent, PoolMetadataUpdatedEvent, TokenBannedEvent, TradeExecutedEvent } from './types/websocket-events.dto';
|
|
47
50
|
import type { GetTokenWeeklyHistoryOptions, GetTokenWeeklyHistoryResult, GetWeeklyChallengeOptions, GetWeeklyChallengeResult } from './types/weekly-challenge.dto';
|
|
48
|
-
import type { FetchWrappableTokensOptions, FetchWrappableTokensResult, IsTokenWrappableResult, UnwrapTokenOptions, WrappableToken, WrapTokenOptions, WrapUnwrapFeeEstimate, WrapUnwrapResult, WrapUnwrapStatusResult } from './types/wrappable-token.dto';
|
|
49
51
|
import { TransactionFailedError, WebSocketError, WebSocketTimeoutError } from './utils/websocket-errors';
|
|
50
|
-
import type
|
|
52
|
+
import { type WalletProvider } from '@gala-chain/gala-core-sdk/providers';
|
|
51
53
|
export { TransactionFailedError, WebSocketError, WebSocketTimeoutError, };
|
|
52
54
|
import type { BuyTokenOptions, CalculateBuyAmountForGraduationOptions, CalculateBuyAmountLocalOptions, CalculateBuyAmountOptions, CalculateSellAmountLocalOptions, CalculateSellAmountOptions, FetchTokensCreatedOptions, FetchTokensHeldOptions, FetchTokenSpotPriceParams, FetchTradesOptions, FetchVolumeDataOptions, GraduateTokenOptions, SellTokenOptions, UploadImageByTokenNameOptions } from './types/options.dto';
|
|
53
|
-
import type {
|
|
54
|
-
import type { GetPinnedMessageResult as LegacyGetPinnedMessageResult, PinMessageResult as LegacyPinMessageResult, UnpinMessageResult as LegacyUnpinMessageResult } from './types/stream-chat.dto';
|
|
55
|
+
import type { ChatStatusResponse, GetPinnedMessageResult, UnpinMessageResult } from './types/stream-chat.dto';
|
|
55
56
|
import type { AvailableRolesResponse } from './types/streaming.dto';
|
|
56
|
-
import type { AuthenticatedEvent, BanEnforcementEvent, ChatStatusChangedEvent, ConnectionEvent, ContentFlaggedEvent, ContentReactionAddedEvent, ContentReactionRemovedEvent, DownloadReadyEvent, FlagResolvedEvent, RecordingsCountUpdatedEvent, RecordingStatusChangedEvent, RoomLeftEvent, RoomSubscribedEvent, SimulcastStatusChangedEvent, StreamChatDeletedEvent, StreamChatMessageEvent, StreamChatPinnedEvent, StreamChatUnpinnedEvent, StreamChatUpdatedEvent, StreamControlStatusChangedEvent, StreamCountdownUpdatedEvent, StreamLanguageUpdatedEvent, StreamReactionEvent, StreamStatusChangedEvent, TokenSubscribedEvent, TokenUnsubscribedEvent, UserBannedEvent, UserTypingEvent, UserUnbannedEvent, ViewerCountChangedEvent } from './types/streaming-events.dto';
|
|
57
57
|
/**
|
|
58
58
|
* Configuration for initializing the Launchpad SDK
|
|
59
59
|
*
|
|
@@ -106,10 +106,45 @@ export type LaunchpadSDKConfigResponse = Omit<LaunchpadSDKConfig, 'wallet' | 'wa
|
|
|
106
106
|
export interface LaunchpadSDKConfig extends SDKConfig {
|
|
107
107
|
/** Native or typed-data signer used by the v6 write surfaces. */
|
|
108
108
|
signer?: LaunchpadSigner;
|
|
109
|
+
/**
|
|
110
|
+
* An app-owned launchpad-backend session (a browser app's httpOnly-cookie JWT session). Every
|
|
111
|
+
* launchpad-backend request then takes its bearer from the session, a 401 is handed to the session
|
|
112
|
+
* (one retry with the token it returns), those requests carry the browser's cookies, and the SDK
|
|
113
|
+
* stores no token: log in with {@link LaunchpadSDK.loginWithSignature}, refresh with
|
|
114
|
+
* {@link LaunchpadSDK.refreshToken}, end it with {@link LaunchpadSDK.logout}. Exclusive with
|
|
115
|
+
* `accessToken`. Pair it with `signer` + `walletAddress` (never `wallet` / `walletProvider`, which
|
|
116
|
+
* sign every request).
|
|
117
|
+
*
|
|
118
|
+
* @since 9.0.0
|
|
119
|
+
*/
|
|
120
|
+
session?: LaunchpadSession;
|
|
109
121
|
/** Registered GalaChain address used as the write sender and bundler header. */
|
|
110
122
|
walletAddress?: string;
|
|
111
123
|
/** Fetch-compatible requestor used by v6 write surfaces and tests. */
|
|
112
124
|
httpRequestor?: HttpRequestor;
|
|
125
|
+
/**
|
|
126
|
+
* The app's own bundler socket (socket.io to the bundle backend, with the app's reconnect
|
|
127
|
+
* settings), for the confirmation of `sdk.launchpad` writes. Called once per `wait()` with the
|
|
128
|
+
* bundle base URL; the SDK adds its listener for the bundle's event on the socket returned and
|
|
129
|
+
* removes it when the wait ends, and never disconnects it. Without it each `wait()` opens a socket
|
|
130
|
+
* of its own and closes it afterwards.
|
|
131
|
+
*
|
|
132
|
+
* @since 9.0.0
|
|
133
|
+
*/
|
|
134
|
+
bundleSocketFactory?: SocketFactory;
|
|
135
|
+
/**
|
|
136
|
+
* Loads gala-core-sdk's `./bridge`, which the bridge and wrap methods (`bridgeOut`, `bridgeIn`,
|
|
137
|
+
* `wrapToken`, `getSupportedBridgeTokens`, the external-chain balances, ...) run on:
|
|
138
|
+
* `bridge: () => import('@gala-chain/gala-core-sdk/bridge')`. That module loads `ethers`,
|
|
139
|
+
* `@solana/web3.js` and `@solana/spl-token` (core's optional peers), so launchpad-sdk never
|
|
140
|
+
* names it itself: an app that does not pass this loader bundles and installs no Solana, and its
|
|
141
|
+
* bridge and wrap calls throw a `ConfigurationError` naming this option. Loaded once per SDK, at
|
|
142
|
+
* the first such call; a failed load (the peers are not installed) is a `ConfigurationError`
|
|
143
|
+
* naming them, tried again at the next call.
|
|
144
|
+
*
|
|
145
|
+
* @since 9.0.0
|
|
146
|
+
*/
|
|
147
|
+
bridge?: CoreBridgeLoader;
|
|
113
148
|
/**
|
|
114
149
|
* The ethers wallet for authentication (optional)
|
|
115
150
|
* - Required for: Trading (buy/sell), transfers, token creation, profile updates
|
|
@@ -131,7 +166,7 @@ export interface LaunchpadSDKConfig extends SDKConfig {
|
|
|
131
166
|
*
|
|
132
167
|
* @example Using private key (Node.js/CLI)
|
|
133
168
|
* ```typescript
|
|
134
|
-
* import { PrivateKeyProvider } from '@gala-chain/
|
|
169
|
+
* import { PrivateKeyProvider } from '@gala-chain/gala-core-sdk/providers';
|
|
135
170
|
*
|
|
136
171
|
* const provider = new PrivateKeyProvider('0x...');
|
|
137
172
|
* const sdk = new LaunchpadSDK({
|
|
@@ -142,7 +177,7 @@ export interface LaunchpadSDKConfig extends SDKConfig {
|
|
|
142
177
|
*
|
|
143
178
|
* @example Using browser wallet (React/Vue)
|
|
144
179
|
* ```typescript
|
|
145
|
-
* import { ExternalWalletProvider, detectWallets } from '@gala-chain/
|
|
180
|
+
* import { ExternalWalletProvider, detectWallets } from '@gala-chain/gala-core-sdk/providers';
|
|
146
181
|
*
|
|
147
182
|
* const { wallets } = await detectWallets();
|
|
148
183
|
* const provider = new ExternalWalletProvider(wallets[0].provider);
|
|
@@ -270,6 +305,26 @@ export interface LaunchpadSDKConfig extends SDKConfig {
|
|
|
270
305
|
* ```
|
|
271
306
|
*/
|
|
272
307
|
streamWebSocketUrl?: string;
|
|
308
|
+
/**
|
|
309
|
+
* How many times the stream socket retries a lost connection before giving up (default 5;
|
|
310
|
+
* `Infinity` never gives up, which is what a long-lived browser app wants).
|
|
311
|
+
*
|
|
312
|
+
* @since 9.0.0
|
|
313
|
+
*/
|
|
314
|
+
streamReconnectAttempts?: number;
|
|
315
|
+
/**
|
|
316
|
+
* The stream socket's delay before its first reconnection attempt in ms (default 2000; the delay
|
|
317
|
+
* grows toward `streamReconnectDelayMax`).
|
|
318
|
+
*
|
|
319
|
+
* @since 9.0.0
|
|
320
|
+
*/
|
|
321
|
+
streamReconnectDelay?: number;
|
|
322
|
+
/**
|
|
323
|
+
* The longest delay between the stream socket's reconnection attempts in ms (socket.io's default 5000).
|
|
324
|
+
*
|
|
325
|
+
* @since 9.0.0
|
|
326
|
+
*/
|
|
327
|
+
streamReconnectDelayMax?: number;
|
|
273
328
|
/**
|
|
274
329
|
* Optional Admin API key for stream management operations.
|
|
275
330
|
*
|
|
@@ -282,6 +337,16 @@ export interface LaunchpadSDKConfig extends SDKConfig {
|
|
|
282
337
|
*/
|
|
283
338
|
streamAdminApiKey?: string;
|
|
284
339
|
}
|
|
340
|
+
/** gala-core-sdk's `./bridge` module. */
|
|
341
|
+
type CoreBridge = typeof CoreBridgeModule;
|
|
342
|
+
/**
|
|
343
|
+
* Loads gala-core-sdk's `./bridge` for the bridge and wrap methods: `LaunchpadSDKConfig.bridge`.
|
|
344
|
+
* Pass `() => import('@gala-chain/gala-core-sdk/bridge')` (a page without a bundler: a function
|
|
345
|
+
* resolving to the bridge module it loaded itself; gala-core-sdk ships no script-tag build of it).
|
|
346
|
+
*
|
|
347
|
+
* @since 9.0.0
|
|
348
|
+
*/
|
|
349
|
+
export type CoreBridgeLoader = () => Promise<CoreBridge>;
|
|
285
350
|
export declare class LaunchpadSDK {
|
|
286
351
|
/** Default slippage tolerance factor (15%) - Higher for volatile bonding curve tokens */
|
|
287
352
|
static readonly DEFAULT_SLIPPAGE_TOLERANCE_FACTOR = 0.15;
|
|
@@ -292,9 +357,15 @@ export declare class LaunchpadSDK {
|
|
|
292
357
|
/** Default calculation mode for all amount calculations - 'local' for instant client-side bonding curve calculations */
|
|
293
358
|
static readonly DEFAULT_CALCULATE_AMOUNT_MODE: 'local' | 'external';
|
|
294
359
|
private wallet;
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
360
|
+
/** Declared `galaChainAddress` (e.g. a `client|` alias): the construction key's, dropped when the wallet changes. */
|
|
361
|
+
private galaChainAddressOverride;
|
|
362
|
+
/**
|
|
363
|
+
* Declared identity: explicit `walletAddress`, else (without a wallet) the signer's own address.
|
|
364
|
+
* Dropped when the wallet changes (it named the construction key, not the new one).
|
|
365
|
+
*/
|
|
366
|
+
private signerWalletAddress;
|
|
367
|
+
/** The token-write signer and identity of an SDK with no wallet (`{ signer, walletAddress }`). */
|
|
368
|
+
private tokenWriter;
|
|
298
369
|
private readonly auth;
|
|
299
370
|
private readonly jwtAuth;
|
|
300
371
|
private readonly sessionAuth;
|
|
@@ -310,33 +381,29 @@ export declare class LaunchpadSDK {
|
|
|
310
381
|
private readonly maxAcceptableReverseBondingCurveFeeSlippageFactor;
|
|
311
382
|
private readonly calculateAmountMode;
|
|
312
383
|
private readonly logger;
|
|
313
|
-
private readonly dexClient;
|
|
314
384
|
private readonly tokenResolverService;
|
|
315
385
|
private readonly launchpadService;
|
|
316
|
-
|
|
317
|
-
private
|
|
318
|
-
private readonly
|
|
386
|
+
/** Rebuilt whenever the wallet changes: its token writes sign as the wallet it was built with. */
|
|
387
|
+
private galaChainService;
|
|
388
|
+
private readonly priceService;
|
|
389
|
+
/** Signs bundle trades as the wallet: rebuilt when the wallet changes (see onWalletChanged). */
|
|
390
|
+
private bundleService;
|
|
391
|
+
/** The sell fee ceiling resolver every BundleService of this SDK uses. */
|
|
392
|
+
private readonly sellFeeCeiling;
|
|
319
393
|
private readonly websocketService;
|
|
320
|
-
private readonly priceHistoryService;
|
|
321
394
|
private readonly cache;
|
|
322
|
-
|
|
395
|
+
/** Counts wallet changes: a bridge call that started under one wallet never runs under the next. */
|
|
396
|
+
private walletGeneration;
|
|
397
|
+
/** The load of gala-core-sdk's `./bridge` through `config.bridge`; cleared when it fails. */
|
|
398
|
+
private coreBridgeLoad;
|
|
399
|
+
private _bridgeService;
|
|
323
400
|
private _bridgeableTokenService?;
|
|
324
401
|
private _wrappableTokenService?;
|
|
325
|
-
private _wrapService
|
|
326
|
-
private _galaConnectClient
|
|
402
|
+
private _wrapService;
|
|
403
|
+
private _galaConnectClient;
|
|
327
404
|
private _streamingService;
|
|
328
405
|
private _streamChatService;
|
|
329
406
|
private _streamWebSocketService;
|
|
330
|
-
/** Per-token room refcount shared across every watchTokenRoomEvent() event type, so the
|
|
331
|
-
* room is only left via unsubscribeFromStream() once nothing is still watching it. */
|
|
332
|
-
private _tokenRoomRefCounts;
|
|
333
|
-
/** Fan-out listener sets, keyed by `${eventKey}:${tokenName}`, so concurrent watchers of the
|
|
334
|
-
* SAME event+token never clobber each other's single roomCallbacks slot on StreamWebSocketService. */
|
|
335
|
-
private _tokenRoomListeners;
|
|
336
|
-
/** The single real subscribeXxx() unsubscribe per `${eventKey}:${tokenName}`, shared by every
|
|
337
|
-
* watcher of that key so whichever watcher leaves LAST releases it (not just the first one). */
|
|
338
|
-
private _tokenRoomUnsubscribers;
|
|
339
|
-
private _streamingEventService;
|
|
340
407
|
private _banService;
|
|
341
408
|
private _tokenBanService;
|
|
342
409
|
private _aiModerationService;
|
|
@@ -353,6 +420,8 @@ export declare class LaunchpadSDK {
|
|
|
353
420
|
private _weeklyChallengeService;
|
|
354
421
|
private _oembedService;
|
|
355
422
|
private _platformStatsService;
|
|
423
|
+
private _healthService;
|
|
424
|
+
private _eventsQueryService;
|
|
356
425
|
private _notificationService;
|
|
357
426
|
private _clientConfigService;
|
|
358
427
|
private readonly nftCollectionService;
|
|
@@ -360,8 +429,6 @@ export declare class LaunchpadSDK {
|
|
|
360
429
|
private readonly launchpadAPI;
|
|
361
430
|
/** v6 launchpad write surface. */
|
|
362
431
|
readonly launchpad: LaunchpadWrites;
|
|
363
|
-
/** v6 native token write surface. */
|
|
364
|
-
readonly tokens: TokenWrites;
|
|
365
432
|
constructor(config: LaunchpadSDKConfig);
|
|
366
433
|
/**
|
|
367
434
|
* Creates a temporary SDK instance with a different wallet for privateKey override operations.
|
|
@@ -373,18 +440,6 @@ export declare class LaunchpadSDK {
|
|
|
373
440
|
* @throws Error if privateKey format is invalid
|
|
374
441
|
*/
|
|
375
442
|
private createOverrideSdk;
|
|
376
|
-
/**
|
|
377
|
-
* Access the shared GSwap DEX client.
|
|
378
|
-
*
|
|
379
|
-
* @returns The single `@gala-chain/gswap-sdk` client configured with this SDK's signer and hosts.
|
|
380
|
-
*
|
|
381
|
-
* @example
|
|
382
|
-
* ```typescript
|
|
383
|
-
* const quote = await sdk.dex.quoting.quoteExactInput('GALA', 'GUSDC', '1');
|
|
384
|
-
* console.log(quote.amountOut);
|
|
385
|
-
* ```
|
|
386
|
-
*/
|
|
387
|
-
get dex(): GSwap;
|
|
388
443
|
/**
|
|
389
444
|
* Gets the authenticated user's address in backend format
|
|
390
445
|
*
|
|
@@ -480,6 +535,11 @@ export declare class LaunchpadSDK {
|
|
|
480
535
|
* ```
|
|
481
536
|
*/
|
|
482
537
|
validateWallet(): Wallet;
|
|
538
|
+
/**
|
|
539
|
+
* Token writes (transfer, burn, lock, unlock) need the wallet, or (an SDK configured with
|
|
540
|
+
* `{ signer, walletAddress }`) a declared signer and identity. Same error as `validateWallet`.
|
|
541
|
+
*/
|
|
542
|
+
private assertTokenWriter;
|
|
483
543
|
/**
|
|
484
544
|
* Sets or updates the wallet for the SDK
|
|
485
545
|
*
|
|
@@ -516,6 +576,27 @@ export declare class LaunchpadSDK {
|
|
|
516
576
|
* ```
|
|
517
577
|
*/
|
|
518
578
|
setWallet(wallet: Wallet): void;
|
|
579
|
+
/**
|
|
580
|
+
* Everything the SDK built around the previous wallet's key or address follows the new one, so no
|
|
581
|
+
* write signs as, and no request is sent from, an identity the SDK no longer has:
|
|
582
|
+
* - an identity declared at construction (`walletAddress`, `galaChainAddress`) named the
|
|
583
|
+
* construction key: it is dropped, and `getAddress()` is the new wallet's;
|
|
584
|
+
* - the token writes (transfer, burn, lock, unlock) and the bundle trades (`buyTokens`,
|
|
585
|
+
* `sellTokens`) are rebuilt for the new wallet now;
|
|
586
|
+
* - the bridge service, the wrap service and the GalaConnect client (built on first use with the
|
|
587
|
+
* wallet's key and address) are dropped, and the next bridge, wrap or GalaConnect call builds
|
|
588
|
+
* them for the new wallet.
|
|
589
|
+
*/
|
|
590
|
+
private onWalletChanged;
|
|
591
|
+
/** The bundle trading service, signing as the current wallet (none: trading is refused). */
|
|
592
|
+
private createBundleService;
|
|
593
|
+
/**
|
|
594
|
+
* The token writes (transfer, burn, lock, unlock) sign as the wallet the GalaChain service was
|
|
595
|
+
* built with, so the service is rebuilt whenever the wallet changes: a write never signs as, or
|
|
596
|
+
* is made from, an identity the SDK no longer has. A declared `{ signer, walletAddress }` identity
|
|
597
|
+
* from construction no longer applies once the wallet changes (no wallet then means no writes).
|
|
598
|
+
*/
|
|
599
|
+
private rebuildTokenWrites;
|
|
519
600
|
/**
|
|
520
601
|
* Sets or updates the wallet provider for authentication
|
|
521
602
|
*
|
|
@@ -526,7 +607,7 @@ export declare class LaunchpadSDK {
|
|
|
526
607
|
*
|
|
527
608
|
* @example
|
|
528
609
|
* ```typescript
|
|
529
|
-
* import { ExternalWalletProvider, detectWallets } from '@gala-chain/
|
|
610
|
+
* import { ExternalWalletProvider, detectWallets } from '@gala-chain/gala-core-sdk/providers';
|
|
530
611
|
*
|
|
531
612
|
* // Detect available wallets
|
|
532
613
|
* const { wallets } = await detectWallets();
|
|
@@ -730,6 +811,10 @@ export declare class LaunchpadSDK {
|
|
|
730
811
|
* (reverse bonding curve fees, vault addresses) for every pool returned. This enables
|
|
731
812
|
* instant local calculations without additional API calls.
|
|
732
813
|
*
|
|
814
|
+
* Options are those `GET /v1/tokens` accepts: `type` RECENT / POPULAR / RECORDINGS /
|
|
815
|
+
* SECONDS_STREAMED and `streamStatus` IDLE / ACTIVE / DISABLED (any case), `pageSize` 1 to 100
|
|
816
|
+
* (default 10); anything else is a `ValidationError` before a request is made.
|
|
817
|
+
*
|
|
733
818
|
* @category Pool Information
|
|
734
819
|
* @param options Optional filters for pool fetching
|
|
735
820
|
* @returns Promise<PoolsResult> with pagination metadata
|
|
@@ -737,7 +822,7 @@ export declare class LaunchpadSDK {
|
|
|
737
822
|
*
|
|
738
823
|
* @example Basic pool fetching
|
|
739
824
|
* ```typescript
|
|
740
|
-
* const result = await sdk.fetchPools({ type: '
|
|
825
|
+
* const result = await sdk.fetchPools({ type: 'RECENT', pageSize: 20 });
|
|
741
826
|
* console.log(`Fetched ${result.items.length} pools`);
|
|
742
827
|
* console.log(`Total pools: ${result.total}`);
|
|
743
828
|
* ```
|
|
@@ -836,11 +921,7 @@ export declare class LaunchpadSDK {
|
|
|
836
921
|
* console.log('Calculated 10 prices instantly using cached metadata');
|
|
837
922
|
* ```
|
|
838
923
|
*/
|
|
839
|
-
fetchAllPools(options?:
|
|
840
|
-
search?: string;
|
|
841
|
-
tokenName?: string;
|
|
842
|
-
type?: 'recent' | 'popular';
|
|
843
|
-
}): Promise<PoolsResult>;
|
|
924
|
+
fetchAllPools(options?: Omit<FetchPoolsOptions, 'cursor' | 'pageSize'>): Promise<PoolsResult>;
|
|
844
925
|
/**
|
|
845
926
|
* Fetch token ownership distribution with holder percentages
|
|
846
927
|
*
|
|
@@ -1021,74 +1102,47 @@ export declare class LaunchpadSDK {
|
|
|
1021
1102
|
*/
|
|
1022
1103
|
fetchUserHolderContext(tokenName: string, userAddress: string): Promise<UserHolderContext>;
|
|
1023
1104
|
/**
|
|
1024
|
-
* Fetch
|
|
1105
|
+
* Fetch a launchpad token's USD spot price.
|
|
1025
1106
|
*
|
|
1026
|
-
*
|
|
1027
|
-
*
|
|
1028
|
-
* -
|
|
1029
|
-
* - **tokenId** → DEX Backend API `/market/price` (direct pricing)
|
|
1107
|
+
* - A token still on its bonding curve: GALA's USD price divided by the tokens 1 GALA buys
|
|
1108
|
+
* (the launchpad backend's bonding-curve calculation).
|
|
1109
|
+
* - A graduated token: its USD price on the swap backend.
|
|
1030
1110
|
*
|
|
1031
|
-
*
|
|
1032
|
-
*
|
|
1111
|
+
* Only launchpad tokens (by name) are priced here. Any token by class key, and GALA itself, is
|
|
1112
|
+
* priced by gswap-sdk: `gSwap.market.getPrice('GALA|Unit|none|none')`.
|
|
1033
1113
|
*
|
|
1034
|
-
* @
|
|
1035
|
-
*
|
|
1036
|
-
* const price = await sdk.fetchTokenPrice({ tokenName: 'galadog' });
|
|
1037
|
-
* console.log(`${price.symbol}: $${price.price.toFixed(6)}`);
|
|
1038
|
-
* // Returns DEX price for graduated tokens, bonding curve price for active tokens
|
|
1039
|
-
* ```
|
|
1114
|
+
* @param params The launchpad token's name
|
|
1115
|
+
* @returns Promise<TokenSpotPrice> The token's symbol and USD price
|
|
1040
1116
|
*
|
|
1041
|
-
* @example
|
|
1117
|
+
* @example
|
|
1042
1118
|
* ```typescript
|
|
1043
|
-
* const price = await sdk.fetchTokenPrice({
|
|
1044
|
-
* tokenId: 'Token|Unit|GDOG|eth:0x...'
|
|
1045
|
-
* });
|
|
1119
|
+
* const price = await sdk.fetchTokenPrice({ tokenName: 'galadog' });
|
|
1046
1120
|
* console.log(`${price.symbol}: $${price.price.toFixed(6)}`);
|
|
1047
1121
|
* ```
|
|
1048
1122
|
*
|
|
1049
|
-
* @throws ValidationError if
|
|
1050
|
-
* @throws
|
|
1051
|
-
* @throws Error if API request fails or token not found
|
|
1123
|
+
* @throws ValidationError if `tokenName` is missing or empty, or a `tokenId` is given
|
|
1124
|
+
* @throws NetworkError if the calculation or a price read fails
|
|
1052
1125
|
*/
|
|
1053
1126
|
fetchTokenPrice(params: FetchTokenSpotPriceParams): Promise<TokenSpotPrice>;
|
|
1054
1127
|
/**
|
|
1055
|
-
* Fetch
|
|
1056
|
-
*
|
|
1057
|
-
* Convenience method for fetching GALA price specifically via the DEX Backend API.
|
|
1058
|
-
* Uses the smart router with the standard GALA token ID.
|
|
1128
|
+
* Fetch comprehensive token details from GalaChain
|
|
1059
1129
|
*
|
|
1060
|
-
*
|
|
1061
|
-
*
|
|
1062
|
-
* @example
|
|
1063
|
-
* ```typescript
|
|
1064
|
-
* const galaPrice = await sdk.fetchGalaPrice();
|
|
1065
|
-
* console.log(`GALA: $${galaPrice.price.toFixed(6)}`);
|
|
1066
|
-
* ```
|
|
1067
|
-
*
|
|
1068
|
-
* @throws Error if GALA price not available
|
|
1069
|
-
* @throws Error if DEX Backend API client not configured
|
|
1070
|
-
*/
|
|
1071
|
-
fetchGalaPrice(): Promise<TokenSpotPrice>;
|
|
1072
|
-
/**
|
|
1073
|
-
* Fetch comprehensive token details from DEX API platform
|
|
1074
|
-
*
|
|
1075
|
-
* Queries the DEX API platform endpoint to retrieve complete token metadata
|
|
1076
|
-
* including image, decimals, description, verification status, network information,
|
|
1077
|
-
* and trading capabilities.
|
|
1130
|
+
* Reads the token's GalaChain token class (symbol, decimals, name, image, description, network,
|
|
1131
|
+
* contract address).
|
|
1078
1132
|
*
|
|
1079
1133
|
* Supports flexible token identification using either string or object format:
|
|
1080
1134
|
* - String: `'GUSDC|Unit|none|eth:0x...'` (pipe-delimited)
|
|
1081
1135
|
* - Object: `{ collection, category, type, additionalKey }`
|
|
1082
1136
|
*
|
|
1083
1137
|
* @param tokenId Token identifier in flexible format
|
|
1084
|
-
* @returns Promise<
|
|
1138
|
+
* @returns Promise<GalaChainTokenDetails> The token class's details (gala-core-sdk's type)
|
|
1085
1139
|
*
|
|
1086
1140
|
* @example String format
|
|
1087
1141
|
* ```typescript
|
|
1088
1142
|
* const details = await sdk.fetchTokenDetails('GUSDC|Unit|none|none');
|
|
1089
1143
|
* console.log(details.symbol); // 'GUSDC'
|
|
1090
1144
|
* console.log(details.decimals); // 6
|
|
1091
|
-
* console.log(details.
|
|
1145
|
+
* console.log(details.network); // the token's network
|
|
1092
1146
|
* console.log(details.image); // 'https://...'
|
|
1093
1147
|
* ```
|
|
1094
1148
|
*
|
|
@@ -1106,156 +1160,6 @@ export declare class LaunchpadSDK {
|
|
|
1106
1160
|
* @throws {NetworkError} If API request fails or token not found
|
|
1107
1161
|
*/
|
|
1108
1162
|
fetchTokenDetails(tokenId: TokenId): Promise<GalaChainTokenDetails>;
|
|
1109
|
-
/**
|
|
1110
|
-
* Fetch all available DEX leaderboard seasons
|
|
1111
|
-
*
|
|
1112
|
-
* Returns all season configurations with time ranges. Use season IDs
|
|
1113
|
-
* to fetch specific leaderboards with `fetchDexLeaderboardBySeasonId()`.
|
|
1114
|
-
*
|
|
1115
|
-
* @category DEX Leaderboard
|
|
1116
|
-
* @returns Promise<DexSeason[]> Array of all seasons
|
|
1117
|
-
* @throws {NetworkError} If API request fails
|
|
1118
|
-
* @since 3.X.0
|
|
1119
|
-
*
|
|
1120
|
-
* @example
|
|
1121
|
-
* ```typescript
|
|
1122
|
-
* const seasons = await sdk.fetchAllDexSeasons();
|
|
1123
|
-
* console.log(`Found ${seasons.length} seasons`);
|
|
1124
|
-
* seasons.forEach(s => {
|
|
1125
|
-
* console.log(`${s.name}: ${s.start} to ${s.end}`);
|
|
1126
|
-
* });
|
|
1127
|
-
* ```
|
|
1128
|
-
*/
|
|
1129
|
-
fetchAllDexSeasons(): Promise<DexSeason[]>;
|
|
1130
|
-
/**
|
|
1131
|
-
* Find the currently active DEX leaderboard season
|
|
1132
|
-
*
|
|
1133
|
-
* Determines which season is active based on current time falling
|
|
1134
|
-
* between season start and end dates. Returns null if no season
|
|
1135
|
-
* is currently active.
|
|
1136
|
-
*
|
|
1137
|
-
* @category DEX Leaderboard
|
|
1138
|
-
* @returns Promise<DexSeason | null> Current season or null
|
|
1139
|
-
* @throws {NetworkError} If API request fails
|
|
1140
|
-
* @since 3.X.0
|
|
1141
|
-
*
|
|
1142
|
-
* @example
|
|
1143
|
-
* ```typescript
|
|
1144
|
-
* const current = await sdk.fetchCurrentDexSeason();
|
|
1145
|
-
* if (current) {
|
|
1146
|
-
* console.log(`Active: ${current.name} (ID: ${current.id})`);
|
|
1147
|
-
* } else {
|
|
1148
|
-
* console.log('No active season');
|
|
1149
|
-
* }
|
|
1150
|
-
* ```
|
|
1151
|
-
*/
|
|
1152
|
-
fetchCurrentDexSeason(): Promise<DexSeason | null>;
|
|
1153
|
-
/**
|
|
1154
|
-
* Fetch DEX leaderboard for a specific season
|
|
1155
|
-
*
|
|
1156
|
-
* Returns complete leaderboard rankings with XP metrics and achievement titles.
|
|
1157
|
-
* Non-paginated response includes all entries (typically 100 participants).
|
|
1158
|
-
*
|
|
1159
|
-
* **XP Metrics:**
|
|
1160
|
-
* - `totalXp`: Combined liquidity + trading XP
|
|
1161
|
-
* - `liquidityXp`: Points from providing liquidity
|
|
1162
|
-
* - `tradingXp`: Points from trading volume
|
|
1163
|
-
*
|
|
1164
|
-
* **Achievement Titles:**
|
|
1165
|
-
* - Liquidity titles: Pool Explorer, Flow Enabler, Yield Artisan, etc.
|
|
1166
|
-
* - Trading titles: Novice Trader, Rookie Trader, Elite Trader, etc.
|
|
1167
|
-
* - Order indicates tier (1 = entry level, higher = more advanced)
|
|
1168
|
-
*
|
|
1169
|
-
* @category DEX Leaderboard
|
|
1170
|
-
* @param seasonId Season identifier number (must be positive integer)
|
|
1171
|
-
* @returns Promise<LeaderboardResult> Complete leaderboard with rankings and metrics
|
|
1172
|
-
* @throws {RequiredFieldError} If seasonId is invalid
|
|
1173
|
-
* @throws {NetworkError} If API request fails
|
|
1174
|
-
* @since 3.X.0
|
|
1175
|
-
*
|
|
1176
|
-
* @example
|
|
1177
|
-
* ```typescript
|
|
1178
|
-
* // Fetch specific season leaderboard
|
|
1179
|
-
* const leaderboard = await sdk.fetchDexLeaderboardBySeasonId(4);
|
|
1180
|
-
*
|
|
1181
|
-
* // Display top trader
|
|
1182
|
-
* const topTrader = leaderboard.entries[0];
|
|
1183
|
-
* console.log(`Rank 1: ${topTrader.wallet}`);
|
|
1184
|
-
* console.log(`Total XP: ${topTrader.totalXp}`);
|
|
1185
|
-
* console.log(`Distribution: ${topTrader.distributionPercent}%`);
|
|
1186
|
-
*
|
|
1187
|
-
* // Find users with specific titles
|
|
1188
|
-
* const whales = leaderboard.entries.filter(entry =>
|
|
1189
|
-
* entry.masteryTitles.some(t => t.name === 'Protocol Whale')
|
|
1190
|
-
* );
|
|
1191
|
-
* ```
|
|
1192
|
-
*/
|
|
1193
|
-
fetchDexLeaderboardBySeasonId(seasonId: number): Promise<LeaderboardResult>;
|
|
1194
|
-
/**
|
|
1195
|
-
* Fetch leaderboard for the currently active season
|
|
1196
|
-
*
|
|
1197
|
-
* Convenience method that automatically determines the current season
|
|
1198
|
-
* and fetches its leaderboard. Returns null if no season is active.
|
|
1199
|
-
*
|
|
1200
|
-
* Equivalent to:
|
|
1201
|
-
* ```typescript
|
|
1202
|
-
* const season = await sdk.fetchCurrentDexSeason();
|
|
1203
|
-
* return season ? sdk.fetchDexLeaderboardBySeasonId(season.id) : null;
|
|
1204
|
-
* ```
|
|
1205
|
-
*
|
|
1206
|
-
* @category DEX Leaderboard
|
|
1207
|
-
* @returns Promise<LeaderboardResult | null> Current leaderboard or null
|
|
1208
|
-
* @throws {NetworkError} If API request fails
|
|
1209
|
-
* @since 3.X.0
|
|
1210
|
-
*
|
|
1211
|
-
* @example
|
|
1212
|
-
* ```typescript
|
|
1213
|
-
* // Get current leaderboard in one call
|
|
1214
|
-
* const leaderboard = await sdk.fetchCurrentDexLeaderboard();
|
|
1215
|
-
*
|
|
1216
|
-
* if (leaderboard) {
|
|
1217
|
-
* console.log(`Season ${leaderboard.seasonId} leaders:`);
|
|
1218
|
-
* leaderboard.entries.slice(0, 10).forEach(entry => {
|
|
1219
|
-
* console.log(`${entry.rank}. ${entry.wallet}: ${entry.totalXp} XP`);
|
|
1220
|
-
* });
|
|
1221
|
-
* } else {
|
|
1222
|
-
* console.log('No active season');
|
|
1223
|
-
* }
|
|
1224
|
-
* ```
|
|
1225
|
-
*/
|
|
1226
|
-
fetchCurrentDexLeaderboard(): Promise<LeaderboardResult | null>;
|
|
1227
|
-
/**
|
|
1228
|
-
* Fetch DEX aggregated volume summary with trend metrics
|
|
1229
|
-
*
|
|
1230
|
-
* Returns platform-wide trading volume statistics across all DEX pools with
|
|
1231
|
-
* 1-day, 7-day, and 30-day comparisons and percentage changes.
|
|
1232
|
-
*
|
|
1233
|
-
* **Use Cases:**
|
|
1234
|
-
* - Monitor overall DEX trading activity
|
|
1235
|
-
* - Identify volume trends and patterns
|
|
1236
|
-
* - Compare performance across time periods
|
|
1237
|
-
* - Detect market changes (increases/decreases)
|
|
1238
|
-
*
|
|
1239
|
-
* @category DEX Analytics
|
|
1240
|
-
* @returns Promise<DexAggregatedVolumeSummary> Volume metrics with deltas
|
|
1241
|
-
* @throws {NetworkError} If API request fails
|
|
1242
|
-
* @since 4.0.0
|
|
1243
|
-
*
|
|
1244
|
-
* @example
|
|
1245
|
-
* ```typescript
|
|
1246
|
-
* const summary = await sdk.fetchDexAggregatedVolumeSummary();
|
|
1247
|
-
* console.log(`Today's volume: $${summary.volume1d.toFixed(2)}`);
|
|
1248
|
-
* console.log(`7-day change: ${(summary.volume7dDelta * 100).toFixed(2)}%`);
|
|
1249
|
-
*
|
|
1250
|
-
* // Analyze trend direction
|
|
1251
|
-
* if (summary.volume1dDelta > 0) {
|
|
1252
|
-
* console.log('✅ Volume increasing');
|
|
1253
|
-
* } else {
|
|
1254
|
-
* console.log('📉 Volume decreasing');
|
|
1255
|
-
* }
|
|
1256
|
-
* ```
|
|
1257
|
-
*/
|
|
1258
|
-
fetchDexAggregatedVolumeSummary(): Promise<DexAggregatedVolumeSummary>;
|
|
1259
1163
|
/**
|
|
1260
1164
|
* Fetch the current launchpad token launch fee
|
|
1261
1165
|
*
|
|
@@ -1292,7 +1196,7 @@ export declare class LaunchpadSDK {
|
|
|
1292
1196
|
* - Token metadata (symbol, decimals, name)
|
|
1293
1197
|
*
|
|
1294
1198
|
* @param tokenClasses Array of token class keys to query
|
|
1295
|
-
* @returns Promise<
|
|
1199
|
+
* @returns Promise<GalaChainTokenClass[]> Array of token classes with supply information
|
|
1296
1200
|
* @throws {ValidationError} if tokenClasses array is empty
|
|
1297
1201
|
* @throws {Error} if network request fails
|
|
1298
1202
|
*
|
|
@@ -1319,7 +1223,7 @@ export declare class LaunchpadSDK {
|
|
|
1319
1223
|
* @category Token Data
|
|
1320
1224
|
* @since 3.32.0
|
|
1321
1225
|
*/
|
|
1322
|
-
fetchTokenClassesWithSupply(tokenClasses:
|
|
1226
|
+
fetchTokenClassesWithSupply(tokenClasses: GalaChainTokenClassKey[]): Promise<GalaChainTokenClass[]>;
|
|
1323
1227
|
/**
|
|
1324
1228
|
* Fetch pool details for a token - returns complete bonding curve pool state
|
|
1325
1229
|
*
|
|
@@ -1452,33 +1356,28 @@ export declare class LaunchpadSDK {
|
|
|
1452
1356
|
* market engagement. Data is aggregated by time period with buy/sell breakdowns.
|
|
1453
1357
|
*
|
|
1454
1358
|
* @category Trading Data
|
|
1455
|
-
* @param options - Volume data options
|
|
1456
|
-
* @param options.tokenName - Token name to fetch volume data for
|
|
1457
|
-
* @param options.
|
|
1458
|
-
* @param options.
|
|
1459
|
-
* @param options.
|
|
1460
|
-
* @returns
|
|
1461
|
-
* @throws {ValidationError} If tokenName is
|
|
1359
|
+
* @param options - Volume data options
|
|
1360
|
+
* @param options.tokenName - Token name to fetch volume data for
|
|
1361
|
+
* @param options.from - Start of the range, a Unix timestamp in seconds (at least 173000000)
|
|
1362
|
+
* @param options.to - End of the range, a Unix timestamp in seconds (at least 173000000)
|
|
1363
|
+
* @param options.resolution - The chart resolution the backend aggregates by (at least 1)
|
|
1364
|
+
* @returns `{ dataPoints }`: `{ timestamp, value, ... }` points, as the backend's chart returns them
|
|
1365
|
+
* @throws {ValidationError} If tokenName is invalid, or `from`, `to` or `resolution` is missing
|
|
1366
|
+
* (`MISSING_GRAPH_OPTIONS`) or out of range: all three are required although the type marks
|
|
1367
|
+
* them optional
|
|
1462
1368
|
* @throws {NetworkError} If API request fails
|
|
1463
1369
|
* @since 4.0.4-beta.0
|
|
1464
1370
|
*
|
|
1465
|
-
* @example
|
|
1371
|
+
* @example Volume over the last 30 days
|
|
1466
1372
|
* ```typescript
|
|
1467
|
-
* const
|
|
1468
|
-
*
|
|
1469
|
-
*
|
|
1470
|
-
*
|
|
1471
|
-
*
|
|
1472
|
-
*
|
|
1473
|
-
*
|
|
1474
|
-
* @example Fetch volume for date range
|
|
1475
|
-
* ```typescript
|
|
1476
|
-
* const volumeData = await sdk.fetchVolumeData({
|
|
1477
|
-
* tokenName: 'mytoken',
|
|
1478
|
-
* startDate: new Date('2024-01-01'),
|
|
1479
|
-
* endDate: new Date('2024-01-31')
|
|
1373
|
+
* const now = Math.floor(Date.now() / 1000);
|
|
1374
|
+
* const { dataPoints } = await sdk.fetchVolumeData({
|
|
1375
|
+
* tokenName: 'anime',
|
|
1376
|
+
* from: now - 30 * 24 * 60 * 60,
|
|
1377
|
+
* to: now,
|
|
1378
|
+
* resolution: 5,
|
|
1480
1379
|
* });
|
|
1481
|
-
* console.log(
|
|
1380
|
+
* dataPoints.forEach((point) => console.log(`${point.timestamp}: ${point.value}`));
|
|
1482
1381
|
* ```
|
|
1483
1382
|
*/
|
|
1484
1383
|
fetchVolumeData(options: FetchVolumeDataOptions): Promise<GraphDataResult>;
|
|
@@ -1575,14 +1474,32 @@ export declare class LaunchpadSDK {
|
|
|
1575
1474
|
* ```
|
|
1576
1475
|
*/
|
|
1577
1476
|
fetchGalaBalance(address?: string): Promise<TokenBalanceResult | null>;
|
|
1477
|
+
/**
|
|
1478
|
+
* gala-core-sdk's `./bridge` from the `bridge` loader of the config, loaded once (a failed load
|
|
1479
|
+
* is cleared and tried again at the next call).
|
|
1480
|
+
*
|
|
1481
|
+
* @throws ConfigurationError (`field: 'bridge'`) when no loader was configured, or it failed (the
|
|
1482
|
+
* module's optional peers are not installed) or did not give the module
|
|
1483
|
+
*/
|
|
1484
|
+
private loadCoreBridge;
|
|
1485
|
+
/**
|
|
1486
|
+
* gala-core-sdk's `./bridge` for a bridge or wrap call (see `loadCoreBridge`). The call was made
|
|
1487
|
+
* with the SDK's wallet of NOW: if the wallet changes while the module loads, the call is refused
|
|
1488
|
+
* rather than run as the next wallet's identity.
|
|
1489
|
+
*
|
|
1490
|
+
* @throws ConfigurationError if `./bridge` (or its optional peers) cannot be loaded, or the wallet
|
|
1491
|
+
* changed meanwhile
|
|
1492
|
+
*/
|
|
1493
|
+
private coreBridge;
|
|
1578
1494
|
/**
|
|
1579
1495
|
* Lazy-initialize BridgeService when first needed.
|
|
1580
1496
|
*
|
|
1581
1497
|
* The BridgeService requires external chain configuration (Ethereum/Solana private keys)
|
|
1582
1498
|
* which may not be available in all SDK usage scenarios. This method provides on-demand
|
|
1583
|
-
* initialization to avoid requiring bridge configuration for non-bridge operations.
|
|
1499
|
+
* initialization to avoid requiring bridge configuration for non-bridge operations. It is built
|
|
1500
|
+
* for the wallet configured at its first use and dropped when the wallet changes.
|
|
1584
1501
|
*
|
|
1585
|
-
* @param
|
|
1502
|
+
* @param bridge gala-core-sdk's `./bridge`, from {@link LaunchpadSDK.coreBridge}
|
|
1586
1503
|
* @returns Configured BridgeService instance
|
|
1587
1504
|
* @throws Error if no wallet is configured for GalaChain operations
|
|
1588
1505
|
*
|
|
@@ -1596,6 +1513,7 @@ export declare class LaunchpadSDK {
|
|
|
1596
1513
|
* and caches it permanently (tokens never change). This allows dynamic
|
|
1597
1514
|
* contract address lookups without hardcoded values.
|
|
1598
1515
|
*
|
|
1516
|
+
* @param bridge gala-core-sdk's `./bridge`, from {@link LaunchpadSDK.coreBridge}
|
|
1599
1517
|
* @returns Configured BridgeableTokenService instance
|
|
1600
1518
|
*
|
|
1601
1519
|
* @internal This is a private helper method for bridgeable token operations
|
|
@@ -1608,6 +1526,7 @@ export declare class LaunchpadSDK {
|
|
|
1608
1526
|
* The service fetches wrappable tokens from DEX API (wrappable=true)
|
|
1609
1527
|
* and caches them permanently for generic queries.
|
|
1610
1528
|
*
|
|
1529
|
+
* @param bridge gala-core-sdk's `./bridge`, from {@link LaunchpadSDK.coreBridge}
|
|
1611
1530
|
* @returns Configured WrappableTokenService instance
|
|
1612
1531
|
*
|
|
1613
1532
|
* @internal This is a private helper method for wrappable token operations
|
|
@@ -1619,6 +1538,7 @@ export declare class LaunchpadSDK {
|
|
|
1619
1538
|
* Lazily initializes the GalaConnectClient on first use.
|
|
1620
1539
|
* Used for bridge and wrap/unwrap operations via the DEX API platform.
|
|
1621
1540
|
*
|
|
1541
|
+
* @param bridge gala-core-sdk's `./bridge`, from {@link LaunchpadSDK.coreBridge}
|
|
1622
1542
|
* @returns Configured GalaConnectClient instance
|
|
1623
1543
|
* @throws Error if wallet is not configured
|
|
1624
1544
|
*
|
|
@@ -1632,8 +1552,9 @@ export declare class LaunchpadSDK {
|
|
|
1632
1552
|
* The service handles cross-channel wrap/unwrap operations
|
|
1633
1553
|
* (e.g., MUSIC → GMUSIC, GMUSIC → MUSIC).
|
|
1634
1554
|
*
|
|
1555
|
+
* @param bridge gala-core-sdk's `./bridge`, from {@link LaunchpadSDK.coreBridge}
|
|
1635
1556
|
* @returns Configured WrapService instance
|
|
1636
|
-
* @throws Error if wallet is
|
|
1557
|
+
* @throws Error if no wallet address is configured (the GalaConnect client needs one)
|
|
1637
1558
|
*
|
|
1638
1559
|
* @internal This is a private helper method for wrap/unwrap operations
|
|
1639
1560
|
*/
|
|
@@ -1739,6 +1660,10 @@ export declare class LaunchpadSDK {
|
|
|
1739
1660
|
* @since 9.0.0
|
|
1740
1661
|
*/
|
|
1741
1662
|
private getPlatformStatsService;
|
|
1663
|
+
/** Lazily created HealthService (public `GET /health`). @internal */
|
|
1664
|
+
private getHealthService;
|
|
1665
|
+
/** Lazily created EventsQueryService (stored events, Admin API key or Overseer). @internal */
|
|
1666
|
+
private getEventsQueryService;
|
|
1742
1667
|
/**
|
|
1743
1668
|
* Get or create the NotificationService instance.
|
|
1744
1669
|
*
|
|
@@ -1830,7 +1755,6 @@ export declare class LaunchpadSDK {
|
|
|
1830
1755
|
* @internal
|
|
1831
1756
|
*/
|
|
1832
1757
|
private getContentReactionService;
|
|
1833
|
-
private toLegacyPinnedMessage;
|
|
1834
1758
|
private buildMessageFetchOptions;
|
|
1835
1759
|
private resolveReferralAddress;
|
|
1836
1760
|
/**
|
|
@@ -1887,12 +1811,27 @@ export declare class LaunchpadSDK {
|
|
|
1887
1811
|
*/
|
|
1888
1812
|
private getStreamWebSocketService;
|
|
1889
1813
|
/**
|
|
1890
|
-
*
|
|
1814
|
+
* The token the stream socket authenticates with, asked for at every authentication (including the
|
|
1815
|
+
* one after a reconnect), so a refreshed token is the one used: an app `session` is its own authority
|
|
1816
|
+
* (`session.accessToken()`); otherwise the SDK's own session, refreshed or renewed when it is near
|
|
1817
|
+
* expiry (`ensureValidToken()`).
|
|
1818
|
+
*/
|
|
1819
|
+
private streamSocketToken;
|
|
1820
|
+
/**
|
|
1821
|
+
* The realtime socket: one registry of subscribers for every event the backend emits (token rooms,
|
|
1822
|
+
* comment rooms, the global feed, the overseers' firehose, a connection's own user and overseer
|
|
1823
|
+
* rooms). Every `subscribe*` method on it is synchronous, returns that subscriber's own unsubscribe,
|
|
1824
|
+
* serves any number of subscribers per event, and joins a room on its first subscriber and leaves it on
|
|
1825
|
+
* its last. It also has `connect`, `authenticate`, `deauthenticate`, `onConnectionStateChange`,
|
|
1826
|
+
* `onReconnect` and the chat / reaction / typing senders.
|
|
1891
1827
|
*
|
|
1892
|
-
*
|
|
1893
|
-
*
|
|
1828
|
+
* Created on first use.
|
|
1829
|
+
*
|
|
1830
|
+
* @throws ConfigurationError if `streamWebSocketUrl` is not configured
|
|
1831
|
+
* @since 9.0.0
|
|
1832
|
+
* @category WebSocket
|
|
1894
1833
|
*/
|
|
1895
|
-
|
|
1834
|
+
get realtime(): StreamWebSocketService;
|
|
1896
1835
|
/**
|
|
1897
1836
|
* Fetch a single ERC-20 token balance on Ethereum.
|
|
1898
1837
|
*
|
|
@@ -2061,7 +2000,7 @@ export declare class LaunchpadSDK {
|
|
|
2061
2000
|
* @example Check bridge transaction status
|
|
2062
2001
|
* ```typescript
|
|
2063
2002
|
* const bridgeResult = await sdk.bridgeOut({
|
|
2064
|
-
* tokenId: '
|
|
2003
|
+
* tokenId: 'GALA|Unit|none|none',
|
|
2065
2004
|
* amount: '100',
|
|
2066
2005
|
* destinationChain: 'Ethereum',
|
|
2067
2006
|
* recipientAddress: '0x1234...',
|
|
@@ -2470,30 +2409,32 @@ export declare class LaunchpadSDK {
|
|
|
2470
2409
|
* NOT an external bridge (Ethereum/Solana).
|
|
2471
2410
|
*
|
|
2472
2411
|
* @param options - Wrap options including tokenId and amount
|
|
2473
|
-
* @returns Promise resolving to
|
|
2474
|
-
* @throws
|
|
2475
|
-
*
|
|
2412
|
+
* @returns Promise resolving to the completed wrap
|
|
2413
|
+
* @throws GalaSDKError (`@gala-chain/gala-core-sdk`): `TOKEN_NOT_WRAPPABLE`,
|
|
2414
|
+
* `INVALID_WRAP_DIRECTION` (already on the asset channel), `INVALID_BRIDGE_OPTION` (no wallet),
|
|
2415
|
+
* `BRIDGE_REQUEST_REJECTED` (GalaChain refused it: nothing locked), `BRIDGE_OUT_OUTCOME_UNKNOWN`
|
|
2416
|
+
* (accepted, then failed: never wrap again)
|
|
2476
2417
|
*
|
|
2477
2418
|
* @since 4.0.18
|
|
2478
2419
|
* @category Wrap/Unwrap
|
|
2479
2420
|
*
|
|
2480
2421
|
* @example Wrap MUSIC to GMUSIC
|
|
2481
2422
|
* ```typescript
|
|
2423
|
+
* // token ids are class keys (a bare symbol such as 'MUSIC' is refused)
|
|
2482
2424
|
* const result = await sdk.wrapToken({
|
|
2483
|
-
* tokenId: 'MUSIC',
|
|
2425
|
+
* tokenId: '$MUSIC|Unit|none|none',
|
|
2484
2426
|
* amount: '100'
|
|
2485
2427
|
* });
|
|
2486
2428
|
* console.log(`Wrapped ${result.amount} ${result.fromToken} → ${result.toToken}`);
|
|
2487
2429
|
* console.log(`Transaction: ${result.transactionId}`);
|
|
2488
2430
|
* ```
|
|
2489
2431
|
*
|
|
2490
|
-
* @example With recipient
|
|
2432
|
+
* @example With a recipient
|
|
2491
2433
|
* ```typescript
|
|
2492
2434
|
* const result = await sdk.wrapToken({
|
|
2493
2435
|
* tokenId: '$MUSIC|Unit|none|none',
|
|
2494
2436
|
* amount: '50',
|
|
2495
|
-
* recipient: 'eth|
|
|
2496
|
-
* memo: 'Wrap for DEX trading'
|
|
2437
|
+
* recipient: 'eth|1234...',
|
|
2497
2438
|
* });
|
|
2498
2439
|
* ```
|
|
2499
2440
|
*/
|
|
@@ -2509,9 +2450,9 @@ export declare class LaunchpadSDK {
|
|
|
2509
2450
|
* NOT an external bridge (Ethereum/Solana).
|
|
2510
2451
|
*
|
|
2511
2452
|
* @param options - Unwrap options including tokenId and amount
|
|
2512
|
-
* @returns Promise resolving to
|
|
2513
|
-
* @throws
|
|
2514
|
-
*
|
|
2453
|
+
* @returns Promise resolving to the completed unwrap
|
|
2454
|
+
* @throws GalaSDKError (`@gala-chain/gala-core-sdk`): as {@link wrapToken}
|
|
2455
|
+
* (`INVALID_WRAP_DIRECTION` for a token not on the asset channel)
|
|
2515
2456
|
*
|
|
2516
2457
|
* @since 4.0.18
|
|
2517
2458
|
* @category Wrap/Unwrap
|
|
@@ -2519,7 +2460,7 @@ export declare class LaunchpadSDK {
|
|
|
2519
2460
|
* @example Unwrap GMUSIC to MUSIC
|
|
2520
2461
|
* ```typescript
|
|
2521
2462
|
* const result = await sdk.unwrapToken({
|
|
2522
|
-
* tokenId: 'GMUSIC',
|
|
2463
|
+
* tokenId: '$GMUSIC|Unit|none|none',
|
|
2523
2464
|
* amount: '50'
|
|
2524
2465
|
* });
|
|
2525
2466
|
* console.log(`Unwrapped ${result.amount} ${result.fromToken} → ${result.toToken}`);
|
|
@@ -2532,17 +2473,17 @@ export declare class LaunchpadSDK {
|
|
|
2532
2473
|
* Calculates expected fees for wrapping a token to the asset channel.
|
|
2533
2474
|
* Wrap operations use `cross_channel_authorization` fee type.
|
|
2534
2475
|
*
|
|
2535
|
-
* @param tokenId - Token
|
|
2476
|
+
* @param tokenId - Token class key (pipe-delimited string or TokenClassKey; a bare symbol is refused)
|
|
2536
2477
|
* @param amount - Amount to wrap (decimal string)
|
|
2537
2478
|
* @returns Promise resolving to fee estimate
|
|
2538
|
-
* @throws
|
|
2479
|
+
* @throws GalaSDKError `TOKEN_NOT_WRAPPABLE`, `INVALID_WRAP_DIRECTION`, `INVALID_BRIDGE_AMOUNT`
|
|
2539
2480
|
*
|
|
2540
2481
|
* @since 4.0.18
|
|
2541
2482
|
* @category Wrap/Unwrap
|
|
2542
2483
|
*
|
|
2543
2484
|
* @example Estimate wrap fee
|
|
2544
2485
|
* ```typescript
|
|
2545
|
-
* const estimate = await sdk.estimateWrapFee('MUSIC', '100');
|
|
2486
|
+
* const estimate = await sdk.estimateWrapFee('$MUSIC|Unit|none|none', '100');
|
|
2546
2487
|
* console.log(`Fee: ${estimate.fee} ${estimate.feeToken}`);
|
|
2547
2488
|
* console.log(`Auth type: ${estimate.authorizationType}`);
|
|
2548
2489
|
* ```
|
|
@@ -2554,44 +2495,22 @@ export declare class LaunchpadSDK {
|
|
|
2554
2495
|
* Calculates expected fees for unwrapping a token back to its native channel.
|
|
2555
2496
|
* Unwrap operations use `automatic` fee authorization.
|
|
2556
2497
|
*
|
|
2557
|
-
* @param tokenId - Token
|
|
2498
|
+
* @param tokenId - Token class key (pipe-delimited string or TokenClassKey; a bare symbol is refused)
|
|
2558
2499
|
* @param amount - Amount to unwrap (decimal string)
|
|
2559
2500
|
* @returns Promise resolving to fee estimate
|
|
2560
|
-
* @throws
|
|
2501
|
+
* @throws GalaSDKError `TOKEN_NOT_WRAPPABLE`, `INVALID_WRAP_DIRECTION`, `INVALID_BRIDGE_AMOUNT`
|
|
2561
2502
|
*
|
|
2562
2503
|
* @since 4.0.18
|
|
2563
2504
|
* @category Wrap/Unwrap
|
|
2564
2505
|
*
|
|
2565
2506
|
* @example Estimate unwrap fee
|
|
2566
2507
|
* ```typescript
|
|
2567
|
-
* const estimate = await sdk.estimateUnwrapFee('GMUSIC', '50');
|
|
2508
|
+
* const estimate = await sdk.estimateUnwrapFee('$GMUSIC|Unit|none|none', '50');
|
|
2568
2509
|
* console.log(`Fee: ${estimate.fee} ${estimate.feeToken}`);
|
|
2569
2510
|
* console.log(`Auth type: ${estimate.authorizationType}`);
|
|
2570
2511
|
* ```
|
|
2571
2512
|
*/
|
|
2572
2513
|
estimateUnwrapFee(tokenId: TokenId, amount: string): Promise<WrapUnwrapFeeEstimate>;
|
|
2573
|
-
/**
|
|
2574
|
-
* Get status of a wrap/unwrap transaction
|
|
2575
|
-
*
|
|
2576
|
-
* Polls the bridge status endpoint to check the current state
|
|
2577
|
-
* of a cross-channel wrap or unwrap operation.
|
|
2578
|
-
*
|
|
2579
|
-
* @param transactionId - Transaction ID from wrap/unwrap result
|
|
2580
|
-
* @returns Transaction status
|
|
2581
|
-
*
|
|
2582
|
-
* @since 4.0.18
|
|
2583
|
-
* @category Wrap/Unwrap
|
|
2584
|
-
*
|
|
2585
|
-
* @example Check wrap status
|
|
2586
|
-
* ```typescript
|
|
2587
|
-
* const status = sdk.getWrapStatus(result.transactionId);
|
|
2588
|
-
* console.log(`Status: ${status.status}`);
|
|
2589
|
-
* if (status.status === 'completed') {
|
|
2590
|
-
* console.log(`Completed at: ${new Date(status.completedAt)}`);
|
|
2591
|
-
* }
|
|
2592
|
-
* ```
|
|
2593
|
-
*/
|
|
2594
|
-
getWrapStatus(transactionId: string): WrapUnwrapStatusResult;
|
|
2595
2514
|
/**
|
|
2596
2515
|
* Login with wallet signature to get JWT token.
|
|
2597
2516
|
*
|
|
@@ -2630,6 +2549,35 @@ export declare class LaunchpadSDK {
|
|
|
2630
2549
|
* ```
|
|
2631
2550
|
*/
|
|
2632
2551
|
login(): Promise<LoginResponse>;
|
|
2552
|
+
/**
|
|
2553
|
+
* Log in with a signature the caller made: a browser wallet signs the login message
|
|
2554
|
+
* (`Sign in to Launchpad t:<ms>`, {@link JWT_CONSTANTS}) itself, so an SDK built with only a
|
|
2555
|
+
* `signer` has nothing to sign it with. `publicKey` registers a `client|` alias's key.
|
|
2556
|
+
*
|
|
2557
|
+
* With an app `session` the login asks for a cookie session (the refresh token becomes an httpOnly
|
|
2558
|
+
* cookie and is absent from the answer) and nothing is stored in the SDK: hand the answer to the
|
|
2559
|
+
* session. Without one the tokens are stored as {@link login} stores them. A failure is an
|
|
2560
|
+
* `AuthError` carrying the backend's `statusCode`.
|
|
2561
|
+
*
|
|
2562
|
+
* @since 9.0.0
|
|
2563
|
+
* @category Authentication
|
|
2564
|
+
*
|
|
2565
|
+
* @example
|
|
2566
|
+
* ```typescript
|
|
2567
|
+
* const message = `Sign in to Launchpad t:${Date.now()}`;
|
|
2568
|
+
* const signature = await provider.signMessage(message);
|
|
2569
|
+
* const { accessToken, refreshExpiresIn } = await sdk.loginWithSignature({ address, message, signature });
|
|
2570
|
+
* ```
|
|
2571
|
+
*/
|
|
2572
|
+
loginWithSignature(request: LoginRequest): Promise<LoginResponse>;
|
|
2573
|
+
/**
|
|
2574
|
+
* Log in as `address` without a signature: the backend's development bypass, accepted by
|
|
2575
|
+
* non-production deployments only. Session handling as in {@link loginWithSignature}.
|
|
2576
|
+
*
|
|
2577
|
+
* @since 9.0.0
|
|
2578
|
+
* @category Authentication
|
|
2579
|
+
*/
|
|
2580
|
+
loginWithDevBypass(address: string): Promise<LoginResponse>;
|
|
2633
2581
|
/**
|
|
2634
2582
|
* Refresh the current JWT token.
|
|
2635
2583
|
*
|
|
@@ -2677,9 +2625,14 @@ export declare class LaunchpadSDK {
|
|
|
2677
2625
|
* await sdk.logout({ allDevices: true });
|
|
2678
2626
|
* console.log('Logged out from all devices');
|
|
2679
2627
|
* ```
|
|
2628
|
+
*
|
|
2629
|
+
* With an app `session` the logout always reaches the server (`POST /auth/logout`, the cookie
|
|
2630
|
+
* naming the session to revoke), carries `options.accessToken` as its bearer when given, and
|
|
2631
|
+
* throws an `AuthError` (with the backend's `statusCode`) when it fails.
|
|
2680
2632
|
*/
|
|
2681
2633
|
logout(options?: {
|
|
2682
2634
|
allDevices?: boolean;
|
|
2635
|
+
accessToken?: string | null;
|
|
2683
2636
|
}): Promise<void>;
|
|
2684
2637
|
/**
|
|
2685
2638
|
* Check if user is authenticated with valid JWT.
|
|
@@ -2990,7 +2943,7 @@ export declare class LaunchpadSDK {
|
|
|
2990
2943
|
* ```typescript
|
|
2991
2944
|
* const { targets } = await sdk.getSimulcastTargets('mytoken');
|
|
2992
2945
|
* targets.forEach(t => {
|
|
2993
|
-
* console.log(`${t.
|
|
2946
|
+
* console.log(`${t.passthrough ?? t.url}: ${t.status}`);
|
|
2994
2947
|
* });
|
|
2995
2948
|
* ```
|
|
2996
2949
|
*/
|
|
@@ -3010,11 +2963,11 @@ export declare class LaunchpadSDK {
|
|
|
3010
2963
|
*
|
|
3011
2964
|
* @example Add YouTube simulcast
|
|
3012
2965
|
* ```typescript
|
|
3013
|
-
* const target = await sdk.addSimulcastTarget({
|
|
2966
|
+
* const { target } = await sdk.addSimulcastTarget({
|
|
3014
2967
|
* tokenName: 'mytoken',
|
|
3015
|
-
* platform: '
|
|
2968
|
+
* platform: 'youtube',
|
|
3016
2969
|
* streamKey: 'xxxx-xxxx-xxxx-xxxx',
|
|
3017
|
-
*
|
|
2970
|
+
* url: 'rtmp://a.rtmp.youtube.com/live2',
|
|
3018
2971
|
* });
|
|
3019
2972
|
* console.log(`Added target: ${target.id}`);
|
|
3020
2973
|
* ```
|
|
@@ -3214,6 +3167,25 @@ export declare class LaunchpadSDK {
|
|
|
3214
3167
|
*
|
|
3215
3168
|
* Deprecated: Chat status is now included in token details (GET /v1/tokens/:tokenName)
|
|
3216
3169
|
*/
|
|
3170
|
+
/**
|
|
3171
|
+
* The chat status of a token (`GET /live/:tokenName/chat`, public): whether chat is on, why it is
|
|
3172
|
+
* off (`reason`: `'global'` or `'token'`) and the slow-mode interval (`slowModeSeconds`, 0 = off).
|
|
3173
|
+
*
|
|
3174
|
+
* @param tokenName - Token name
|
|
3175
|
+
* @returns The token's chat status
|
|
3176
|
+
* @throws ValidationError if the token name is invalid
|
|
3177
|
+
*
|
|
3178
|
+
* @since 9.0.0
|
|
3179
|
+
* @category Chat
|
|
3180
|
+
*
|
|
3181
|
+
* @example
|
|
3182
|
+
* ```typescript
|
|
3183
|
+
* const status = await sdk.getChatStatus('mytoken');
|
|
3184
|
+
* if (!status.enabled) console.log('Chat is off:', status.reason);
|
|
3185
|
+
* console.log('Slow mode:', status.slowModeSeconds ?? 0, 's');
|
|
3186
|
+
* ```
|
|
3187
|
+
*/
|
|
3188
|
+
getChatStatus(tokenName: string): Promise<ChatStatusResponse>;
|
|
3217
3189
|
/**
|
|
3218
3190
|
* Disable chat for a specific token.
|
|
3219
3191
|
*
|
|
@@ -3229,11 +3201,7 @@ export declare class LaunchpadSDK {
|
|
|
3229
3201
|
* @since 5.4.0 - Added dual-auth support (Admin API key OR JWT owner)
|
|
3230
3202
|
* @category Chat
|
|
3231
3203
|
*/
|
|
3232
|
-
disableChat(tokenName: string): Promise<
|
|
3233
|
-
enabled: boolean;
|
|
3234
|
-
tokenName: string;
|
|
3235
|
-
status?: string;
|
|
3236
|
-
}>;
|
|
3204
|
+
disableChat(tokenName: string): Promise<ChatStatusResponse>;
|
|
3237
3205
|
/**
|
|
3238
3206
|
* Enable chat for a specific token.
|
|
3239
3207
|
*
|
|
@@ -3250,11 +3218,7 @@ export declare class LaunchpadSDK {
|
|
|
3250
3218
|
* @since 5.4.0 - Added dual-auth support (Admin API key OR JWT owner)
|
|
3251
3219
|
* @category Chat
|
|
3252
3220
|
*/
|
|
3253
|
-
enableChat(tokenName: string): Promise<
|
|
3254
|
-
enabled: boolean;
|
|
3255
|
-
tokenName: string;
|
|
3256
|
-
status?: string;
|
|
3257
|
-
}>;
|
|
3221
|
+
enableChat(tokenName: string): Promise<ChatStatusResponse>;
|
|
3258
3222
|
/**
|
|
3259
3223
|
* Get the currently pinned chat message for a token (v6.x.0+)
|
|
3260
3224
|
*
|
|
@@ -3276,7 +3240,7 @@ export declare class LaunchpadSDK {
|
|
|
3276
3240
|
* }
|
|
3277
3241
|
* ```
|
|
3278
3242
|
*/
|
|
3279
|
-
getPinnedChatMessage(tokenName: string): Promise<
|
|
3243
|
+
getPinnedChatMessage(tokenName: string): Promise<GetPinnedMessageResult>;
|
|
3280
3244
|
/**
|
|
3281
3245
|
* Pin a chat message for a token (v6.x.0+)
|
|
3282
3246
|
*
|
|
@@ -3285,7 +3249,8 @@ export declare class LaunchpadSDK {
|
|
|
3285
3249
|
*
|
|
3286
3250
|
* @param tokenName Token name (lowercase)
|
|
3287
3251
|
* @param messageId ID of the message to pin
|
|
3288
|
-
* @returns
|
|
3252
|
+
* @returns The token's pinned message as read back after the pin. `pinnedMessage` is null when
|
|
3253
|
+
* another moderator unpinned it between the two requests.
|
|
3289
3254
|
* @throws {ValidationError} If token name or message ID is invalid
|
|
3290
3255
|
* @throws {Error} If user is not authorized to pin messages
|
|
3291
3256
|
*
|
|
@@ -3295,10 +3260,10 @@ export declare class LaunchpadSDK {
|
|
|
3295
3260
|
* @example Pin a message
|
|
3296
3261
|
* ```typescript
|
|
3297
3262
|
* const result = await sdk.pinChatMessage('mytoken', 'msg123');
|
|
3298
|
-
* console.log('Message pinned:', result.pinnedMessage
|
|
3263
|
+
* console.log('Message pinned:', result.pinnedMessage?.messageId);
|
|
3299
3264
|
* ```
|
|
3300
3265
|
*/
|
|
3301
|
-
pinChatMessage(tokenName: string, messageId: string): Promise<
|
|
3266
|
+
pinChatMessage(tokenName: string, messageId: string): Promise<GetPinnedMessageResult>;
|
|
3302
3267
|
/**
|
|
3303
3268
|
* Unpin the currently pinned chat message for a token (v6.x.0+)
|
|
3304
3269
|
*
|
|
@@ -3318,7 +3283,7 @@ export declare class LaunchpadSDK {
|
|
|
3318
3283
|
* console.log('Message unpinned');
|
|
3319
3284
|
* ```
|
|
3320
3285
|
*/
|
|
3321
|
-
unpinChatMessage(tokenName: string): Promise<
|
|
3286
|
+
unpinChatMessage(tokenName: string): Promise<UnpinMessageResult>;
|
|
3322
3287
|
/**
|
|
3323
3288
|
* Set slow mode interval for a token's chat (v8.x.0+)
|
|
3324
3289
|
*
|
|
@@ -3710,7 +3675,7 @@ export declare class LaunchpadSDK {
|
|
|
3710
3675
|
* // Paginate through keys (cursor-based)
|
|
3711
3676
|
* if (result.pageInfo.hasNextPage) {
|
|
3712
3677
|
* const page2 = await sdk.listApiKeys({
|
|
3713
|
-
* cursor: result.pageInfo.
|
|
3678
|
+
* cursor: result.pageInfo.endCursor ?? undefined,
|
|
3714
3679
|
* pageSize: 10
|
|
3715
3680
|
* });
|
|
3716
3681
|
* }
|
|
@@ -4915,7 +4880,7 @@ export declare class LaunchpadSDK {
|
|
|
4915
4880
|
* const result = await sdk.listTokenBans({ cursor, pageSize: 20 });
|
|
4916
4881
|
* console.log('Bans:', result.items.map(b => b.tokenName));
|
|
4917
4882
|
* hasMore = result.pageInfo.hasNextPage;
|
|
4918
|
-
* cursor = result.pageInfo.
|
|
4883
|
+
* cursor = result.pageInfo.endCursor ?? undefined;
|
|
4919
4884
|
* }
|
|
4920
4885
|
* ```
|
|
4921
4886
|
*/
|
|
@@ -5291,8 +5256,7 @@ export declare class LaunchpadSDK {
|
|
|
5291
5256
|
* const { stats } = await sdk.getPlatformStats();
|
|
5292
5257
|
*
|
|
5293
5258
|
* // Display volume in millions
|
|
5294
|
-
*
|
|
5295
|
-
* console.log(`24h Volume: ${(vol24h / 1_000_000).toFixed(2)}M GALA`);
|
|
5259
|
+
* console.log(`24h Volume: ${(stats.galaVolume24h / 1_000_000).toFixed(2)}M GALA`);
|
|
5296
5260
|
*
|
|
5297
5261
|
* // Display token count
|
|
5298
5262
|
* console.log(`${stats.totalTokens} tokens on platform`);
|
|
@@ -5303,6 +5267,55 @@ export declare class LaunchpadSDK {
|
|
|
5303
5267
|
* ```
|
|
5304
5268
|
*/
|
|
5305
5269
|
getPlatformStats(): Promise<GetPlatformStatsResult>;
|
|
5270
|
+
/**
|
|
5271
|
+
* The launchpad backend's dependency health (`GET /health`). Public: no Authorization header.
|
|
5272
|
+
*
|
|
5273
|
+
* A critical dependency being down answers HTTP 503, which throws a `NetworkError`.
|
|
5274
|
+
*
|
|
5275
|
+
* @returns Overall status and the state of each dependency
|
|
5276
|
+
* @since 9.0.0
|
|
5277
|
+
* @category Health
|
|
5278
|
+
*
|
|
5279
|
+
* @example
|
|
5280
|
+
* ```typescript
|
|
5281
|
+
* const health = await sdk.getHealth();
|
|
5282
|
+
* console.log(health.status, health.database?.status, health.redis?.status);
|
|
5283
|
+
* ```
|
|
5284
|
+
*/
|
|
5285
|
+
getHealth(): Promise<HealthCheckResponse>;
|
|
5286
|
+
/**
|
|
5287
|
+
* Aggregate event statistics (`GET /v1/events/stats`). Admin API key or Overseer JWT.
|
|
5288
|
+
*
|
|
5289
|
+
* @returns Event totals, today's count, unique users and tokens, and the count per event type
|
|
5290
|
+
* @throws ConfigurationError if neither an admin API key nor a JWT is configured
|
|
5291
|
+
* @since 9.0.0
|
|
5292
|
+
* @category Events
|
|
5293
|
+
*
|
|
5294
|
+
* @example
|
|
5295
|
+
* ```typescript
|
|
5296
|
+
* const stats = await sdk.getEventStats();
|
|
5297
|
+
* console.log(stats.totalEvents, stats.eventsByType);
|
|
5298
|
+
* ```
|
|
5299
|
+
*/
|
|
5300
|
+
getEventStats(): Promise<EventStats>;
|
|
5301
|
+
/**
|
|
5302
|
+
* One page of stored events (`GET /v1/events`). Admin API key or Overseer JWT. Paging is offset
|
|
5303
|
+
* style (`page`, `limit` 1..100), not a cursor.
|
|
5304
|
+
*
|
|
5305
|
+
* @param options - Filters (user, token, event types, dates, search), paging and sorting
|
|
5306
|
+
* @returns `{ data, pagination: { page, limit, total, totalPages } }`
|
|
5307
|
+
* @throws ValidationError for an out-of-range limit / page or an unknown sort, preset or source
|
|
5308
|
+
* @throws ConfigurationError if neither an admin API key nor a JWT is configured
|
|
5309
|
+
* @since 9.0.0
|
|
5310
|
+
* @category Events
|
|
5311
|
+
*
|
|
5312
|
+
* @example
|
|
5313
|
+
* ```typescript
|
|
5314
|
+
* const page = await sdk.queryEvents({ tokenName: 'anime', eventTypes: ['token_buy'], page: 1, limit: 50 });
|
|
5315
|
+
* console.log(page.pagination.total, page.data[0]?.eventType);
|
|
5316
|
+
* ```
|
|
5317
|
+
*/
|
|
5318
|
+
queryEvents(options?: QueryEventsOptions): Promise<QueryEventsResult>;
|
|
5306
5319
|
/**
|
|
5307
5320
|
* Register a push notification device token.
|
|
5308
5321
|
*
|
|
@@ -5746,7 +5759,7 @@ export declare class LaunchpadSDK {
|
|
|
5746
5759
|
* @example Get chat messages for a token
|
|
5747
5760
|
* ```typescript
|
|
5748
5761
|
* const { messages, pageInfo } = await sdk.fetchMessages({
|
|
5749
|
-
* type: '
|
|
5762
|
+
* type: 'CHAT_MESSAGE',
|
|
5750
5763
|
* tokenName: 'anime'
|
|
5751
5764
|
* });
|
|
5752
5765
|
* console.log(`Found ${pageInfo.totalCount} chat messages`);
|
|
@@ -5786,11 +5799,11 @@ export declare class LaunchpadSDK {
|
|
|
5786
5799
|
* @example Create a chat message
|
|
5787
5800
|
* ```typescript
|
|
5788
5801
|
* const result = await sdk.createMessage({
|
|
5789
|
-
* type: '
|
|
5802
|
+
* type: 'CHAT_MESSAGE',
|
|
5790
5803
|
* tokenName: 'anime',
|
|
5791
5804
|
* content: 'Hello world!'
|
|
5792
5805
|
* });
|
|
5793
|
-
* console.log('Created message ID:', result.message.
|
|
5806
|
+
* console.log('Created message ID:', result.message.messageId);
|
|
5794
5807
|
* ```
|
|
5795
5808
|
*
|
|
5796
5809
|
* @example Create a comment
|
|
@@ -5802,7 +5815,7 @@ export declare class LaunchpadSDK {
|
|
|
5802
5815
|
* });
|
|
5803
5816
|
* ```
|
|
5804
5817
|
*/
|
|
5805
|
-
createMessage(options: CreateMessageOptions): Promise<CreateMessageResult
|
|
5818
|
+
createMessage<T extends MessageType>(options: CreateMessageOptions<T>): Promise<CreateMessageResult<T>>;
|
|
5806
5819
|
/**
|
|
5807
5820
|
* Update a message's content.
|
|
5808
5821
|
*
|
|
@@ -5820,12 +5833,13 @@ export declare class LaunchpadSDK {
|
|
|
5820
5833
|
* @example Update a message
|
|
5821
5834
|
* ```typescript
|
|
5822
5835
|
* const result = await sdk.updateMessage('msg-1234567890123-abc...', {
|
|
5823
|
-
* content: 'Updated message content'
|
|
5836
|
+
* content: 'Updated message content',
|
|
5837
|
+
* type: 'COMMENT'
|
|
5824
5838
|
* });
|
|
5825
5839
|
* console.log('Updated at:', result.message.updatedAt);
|
|
5826
5840
|
* ```
|
|
5827
5841
|
*/
|
|
5828
|
-
updateMessage(id: string, options: UpdateMessageOptions): Promise<UpdateMessageResult
|
|
5842
|
+
updateMessage<T extends MessageType = MessageType>(id: string, options: UpdateMessageOptions<T>): Promise<UpdateMessageResult<T>>;
|
|
5829
5843
|
/**
|
|
5830
5844
|
* Delete a message.
|
|
5831
5845
|
*
|
|
@@ -5868,7 +5882,7 @@ export declare class LaunchpadSDK {
|
|
|
5868
5882
|
* }
|
|
5869
5883
|
* ```
|
|
5870
5884
|
*/
|
|
5871
|
-
getPinnedMessage(tokenName: string): Promise<
|
|
5885
|
+
getPinnedMessage(tokenName: string): Promise<PinnedMessageResult>;
|
|
5872
5886
|
/**
|
|
5873
5887
|
* Pin a message.
|
|
5874
5888
|
*
|
|
@@ -6067,7 +6081,7 @@ export declare class LaunchpadSDK {
|
|
|
6067
6081
|
*
|
|
6068
6082
|
* @example Disable chat for a token
|
|
6069
6083
|
* ```typescript
|
|
6070
|
-
* await sdk.updateTokenConfig('anime', {
|
|
6084
|
+
* await sdk.updateTokenConfig('anime', { chatEnabled: false });
|
|
6071
6085
|
* ```
|
|
6072
6086
|
*
|
|
6073
6087
|
* @example Enable comments for a token
|
|
@@ -6078,7 +6092,7 @@ export declare class LaunchpadSDK {
|
|
|
6078
6092
|
* @example Update messaging and comments
|
|
6079
6093
|
* ```typescript
|
|
6080
6094
|
* await sdk.updateTokenConfig('anime', {
|
|
6081
|
-
*
|
|
6095
|
+
* chatEnabled: true,
|
|
6082
6096
|
* commentsEnabled: false
|
|
6083
6097
|
* });
|
|
6084
6098
|
* ```
|
|
@@ -6136,8 +6150,8 @@ export declare class LaunchpadSDK {
|
|
|
6136
6150
|
*
|
|
6137
6151
|
* @example Get all trades for a token
|
|
6138
6152
|
* ```typescript
|
|
6139
|
-
* const { trades,
|
|
6140
|
-
* console.log(`Found ${
|
|
6153
|
+
* const { trades, pageInfo } = await sdk.getTrades({ tokenName: 'anime' });
|
|
6154
|
+
* console.log(`Found ${trades.length} trades, more: ${pageInfo.hasNextPage}`);
|
|
6141
6155
|
* trades.forEach(trade => {
|
|
6142
6156
|
* console.log(`${trade.txnType}: ${trade.inputAmount} -> ${trade.outputAmount}`);
|
|
6143
6157
|
* });
|
|
@@ -6145,20 +6159,20 @@ export declare class LaunchpadSDK {
|
|
|
6145
6159
|
*
|
|
6146
6160
|
* @example Get all trades by a user
|
|
6147
6161
|
* ```typescript
|
|
6148
|
-
* const { trades,
|
|
6162
|
+
* const { trades, pageInfo } = await sdk.getTrades({
|
|
6149
6163
|
* userAddress: 'eth|1234567890abcdef...'
|
|
6150
6164
|
* });
|
|
6151
|
-
* console.log(
|
|
6165
|
+
* console.log(`${trades.length} trades across all tokens, more: ${pageInfo.hasNextPage}`);
|
|
6152
6166
|
* ```
|
|
6153
6167
|
*
|
|
6154
6168
|
* @example Get a user's trades on a specific token with pagination
|
|
6155
6169
|
* ```typescript
|
|
6156
|
-
* const
|
|
6170
|
+
* const page = await sdk.getTrades({
|
|
6157
6171
|
* tokenName: 'anime',
|
|
6158
6172
|
* userAddress: 'eth|1234567890abcdef...',
|
|
6159
6173
|
* pageSize: 20
|
|
6160
6174
|
* });
|
|
6161
|
-
* console.log(
|
|
6175
|
+
* console.log(`${page.trades.length} trades, next cursor: ${page.pageInfo.endCursor}`);
|
|
6162
6176
|
* ```
|
|
6163
6177
|
*/
|
|
6164
6178
|
getTrades(options: GetTradesOptions): Promise<TradesQueryResult>;
|
|
@@ -6309,10 +6323,12 @@ export declare class LaunchpadSDK {
|
|
|
6309
6323
|
/**
|
|
6310
6324
|
* Connect to the stream WebSocket server.
|
|
6311
6325
|
*
|
|
6312
|
-
* Establishes a WebSocket connection for real-time stream events.
|
|
6313
|
-
*
|
|
6326
|
+
* Establishes a WebSocket connection for real-time stream events. Idempotent and safe to call
|
|
6327
|
+
* concurrently (one socket). Subscribing opens it by itself, so calling this is only needed to wait for
|
|
6328
|
+
* the connection.
|
|
6314
6329
|
*
|
|
6315
|
-
* @param callbacks - Event callback handlers
|
|
6330
|
+
* @param callbacks - Event callback handlers: each becomes its own subscriber of its event on every token
|
|
6331
|
+
* (they join no room, and replace nothing registered before); `disconnectStreamWebSocket()` removes them
|
|
6316
6332
|
* @returns Promise resolving when connected
|
|
6317
6333
|
* @throws Error if streamWebSocketUrl is not configured
|
|
6318
6334
|
*
|
|
@@ -6338,12 +6354,16 @@ export declare class LaunchpadSDK {
|
|
|
6338
6354
|
/**
|
|
6339
6355
|
* Authenticate the stream WebSocket connection.
|
|
6340
6356
|
*
|
|
6341
|
-
* Required before sending chat messages via WebSocket.
|
|
6342
|
-
*
|
|
6357
|
+
* Required before sending chat messages via WebSocket, and for the user and overseer events.
|
|
6358
|
+
* Opens the connection if it is not open. With an app `session` the token is `session.accessToken()`,
|
|
6359
|
+
* otherwise the SDK's own session token (refreshed when near expiry); pass `token` to use a specific
|
|
6360
|
+
* one, e.g. right after the app refreshed its JWT. After a reconnect the socket re-authenticates
|
|
6361
|
+
* itself with the token current at that moment.
|
|
6343
6362
|
*
|
|
6344
|
-
* @
|
|
6345
|
-
* @
|
|
6346
|
-
*
|
|
6363
|
+
* @param token - JWT to authenticate with (default: the session's current token)
|
|
6364
|
+
* @returns Promise resolving `true` once the server confirms; `false` when the server rejects the
|
|
6365
|
+
* token, does not answer within 10 seconds, the connection drops, there is no token, or a newer
|
|
6366
|
+
* `authenticateStreamWebSocket` / `deauthenticateStreamWebSocket` call replaced this one
|
|
6347
6367
|
*
|
|
6348
6368
|
* @since 5.1.0
|
|
6349
6369
|
* @category WebSocket
|
|
@@ -6355,15 +6375,30 @@ export declare class LaunchpadSDK {
|
|
|
6355
6375
|
* // Now can send chat messages via WebSocket
|
|
6356
6376
|
* ```
|
|
6357
6377
|
*/
|
|
6358
|
-
authenticateStreamWebSocket(): Promise<
|
|
6378
|
+
authenticateStreamWebSocket(token?: string): Promise<boolean>;
|
|
6379
|
+
/**
|
|
6380
|
+
* Forget the stream socket's authenticated identity (call it when the wallet disconnects).
|
|
6381
|
+
*
|
|
6382
|
+
* Cancels a pending authentication and stops re-authenticating on reconnect. The server has no message
|
|
6383
|
+
* that drops a connection's identity, so an authenticated socket is closed and opened again: your
|
|
6384
|
+
* subscriptions stay registered and are joined again on the new connection.
|
|
6385
|
+
*
|
|
6386
|
+
* @since 9.0.0
|
|
6387
|
+
* @category WebSocket
|
|
6388
|
+
*/
|
|
6389
|
+
deauthenticateStreamWebSocket(): void;
|
|
6359
6390
|
/**
|
|
6360
6391
|
* Subscribe to real-time events for a stream.
|
|
6361
6392
|
*
|
|
6362
|
-
* Joins the stream room
|
|
6393
|
+
* Joins the stream room and registers each callback in `callbacks` as a subscriber of that token.
|
|
6394
|
+
* Calling it again for a token ADDS callbacks (it replaces nothing). The room is joined once however
|
|
6395
|
+
* many callers share it; use the `sdk.realtime.subscribe*` methods for subscriptions that are released
|
|
6396
|
+
* one by one.
|
|
6363
6397
|
*
|
|
6364
6398
|
* @param tokenName - Token name (lowercase)
|
|
6365
|
-
* @
|
|
6366
|
-
* @
|
|
6399
|
+
* @param callbacks - Event callbacks for this token
|
|
6400
|
+
* @returns Promise resolving when the server confirms the room
|
|
6401
|
+
* @throws Error if the connection fails or the server does not confirm within 10 seconds
|
|
6367
6402
|
*
|
|
6368
6403
|
* @since 5.1.0
|
|
6369
6404
|
* @category WebSocket
|
|
@@ -6380,13 +6415,12 @@ export declare class LaunchpadSDK {
|
|
|
6380
6415
|
*/
|
|
6381
6416
|
subscribeToStream(tokenName: string, callbacks?: StreamEventCallbacks): Promise<StreamSubscribedEvent>;
|
|
6382
6417
|
/**
|
|
6383
|
-
*
|
|
6418
|
+
* Remove what `subscribeToStream` registered for a token.
|
|
6384
6419
|
*
|
|
6385
|
-
*
|
|
6420
|
+
* The token's room is left when no subscriber of any kind remains for it; other subscribers (from
|
|
6421
|
+
* `sdk.realtime.subscribe*`) are untouched.
|
|
6386
6422
|
*
|
|
6387
6423
|
* @param tokenName - Token name (lowercase)
|
|
6388
|
-
* @returns Promise resolving when unsubscribed
|
|
6389
|
-
* @throws Error if not connected
|
|
6390
6424
|
*
|
|
6391
6425
|
* @since 5.1.0
|
|
6392
6426
|
* @category WebSocket
|
|
@@ -6502,7 +6536,8 @@ export declare class LaunchpadSDK {
|
|
|
6502
6536
|
/**
|
|
6503
6537
|
* Disconnect from the stream WebSocket server.
|
|
6504
6538
|
*
|
|
6505
|
-
* Closes the WebSocket connection and
|
|
6539
|
+
* Closes the WebSocket connection and releases everything it holds: every subscriber, listener and
|
|
6540
|
+
* timer. Unsubscribe functions handed out earlier stay harmless; subscribing again opens a new socket.
|
|
6506
6541
|
*
|
|
6507
6542
|
* @since 5.1.0
|
|
6508
6543
|
* @category WebSocket
|
|
@@ -6533,7 +6568,7 @@ export declare class LaunchpadSDK {
|
|
|
6533
6568
|
* });
|
|
6534
6569
|
* ```
|
|
6535
6570
|
*/
|
|
6536
|
-
onStreamStatusChanged(callback:
|
|
6571
|
+
onStreamStatusChanged(callback: RealtimeListener<'STREAM_STATUS'>): Unsubscribe;
|
|
6537
6572
|
/**
|
|
6538
6573
|
* Subscribe to user ban events
|
|
6539
6574
|
*
|
|
@@ -6543,7 +6578,7 @@ export declare class LaunchpadSDK {
|
|
|
6543
6578
|
* @since 5.12.0
|
|
6544
6579
|
* @category WebSocket
|
|
6545
6580
|
*/
|
|
6546
|
-
onUserBanned(callback:
|
|
6581
|
+
onUserBanned(callback: RealtimeListener<'USER_BANNED'>): Unsubscribe;
|
|
6547
6582
|
/**
|
|
6548
6583
|
* Subscribe to user unban events
|
|
6549
6584
|
*
|
|
@@ -6553,7 +6588,7 @@ export declare class LaunchpadSDK {
|
|
|
6553
6588
|
* @since 5.12.0
|
|
6554
6589
|
* @category WebSocket
|
|
6555
6590
|
*/
|
|
6556
|
-
onUserUnbanned(callback:
|
|
6591
|
+
onUserUnbanned(callback: RealtimeListener<'USER_UNBANNED'>): Unsubscribe;
|
|
6557
6592
|
/**
|
|
6558
6593
|
* Subscribe to ban enforcement events (kick, mute, ban)
|
|
6559
6594
|
*
|
|
@@ -6563,7 +6598,7 @@ export declare class LaunchpadSDK {
|
|
|
6563
6598
|
* @since 5.12.0
|
|
6564
6599
|
* @category WebSocket
|
|
6565
6600
|
*/
|
|
6566
|
-
onBanEnforcement(callback:
|
|
6601
|
+
onBanEnforcement(callback: RealtimeListener<'BAN_ENFORCEMENT'>): Unsubscribe;
|
|
6567
6602
|
/**
|
|
6568
6603
|
* Watch all user ban/unban/enforcement events, normalized into a single stream.
|
|
6569
6604
|
*
|
|
@@ -6585,10 +6620,13 @@ export declare class LaunchpadSDK {
|
|
|
6585
6620
|
*/
|
|
6586
6621
|
watchBanEnforcement(callback: (event: {
|
|
6587
6622
|
actionType: 'BANNED' | 'UNBANNED' | 'ENFORCEMENT';
|
|
6588
|
-
|
|
6589
|
-
|
|
6623
|
+
/** Absent on the copy the backend sends to the banned user themselves (only overseers see it). */
|
|
6624
|
+
userAddress: string | null;
|
|
6625
|
+
/** `null`: a global ban. */
|
|
6626
|
+
tokenName: string | null;
|
|
6590
6627
|
reason: string | null;
|
|
6591
|
-
|
|
6628
|
+
/** ISO 8601 expiry of a temporary ban. */
|
|
6629
|
+
expiresAt?: string;
|
|
6592
6630
|
}) => void, filters?: {
|
|
6593
6631
|
userAddress?: string;
|
|
6594
6632
|
actionType?: 'BANNED' | 'UNBANNED' | 'ENFORCEMENT';
|
|
@@ -6598,15 +6636,10 @@ export declare class LaunchpadSDK {
|
|
|
6598
6636
|
/**
|
|
6599
6637
|
* Shared implementation for watching a per-token stream room event.
|
|
6600
6638
|
*
|
|
6601
|
-
* The
|
|
6602
|
-
*
|
|
6603
|
-
*
|
|
6604
|
-
* the
|
|
6605
|
-
* (eventKey, tokenName) so concurrent watchers never clobber each other, calls the real
|
|
6606
|
-
* subscribeXxx() only once per key, and only actually leaves the token's stream room
|
|
6607
|
-
* (unsubscribeFromStream) once every event type's listeners for that token have cleared -
|
|
6608
|
-
* otherwise a short-lived MCP tool call's cleanup could tear down a room another concurrent
|
|
6609
|
-
* watcher on the same token still needs.
|
|
6639
|
+
* The StreamWebSocketService registry serves any number of subscribers per event and token, joins a
|
|
6640
|
+
* token's room on its first subscriber and leaves it on its last, so a watcher is one subscribe call
|
|
6641
|
+
* (the socket opens by itself) and its cleanup is that subscriber's own unsubscribe: another watcher of
|
|
6642
|
+
* the same event and token, or of another event of the same token, is untouched.
|
|
6610
6643
|
*
|
|
6611
6644
|
* Requires `filters.tokenName`: these are all per-token room events, so there is no way to
|
|
6612
6645
|
* "watch every token" the way a genuinely global event (e.g. onLaunchpadTokenCreation) can.
|
|
@@ -6789,33 +6822,6 @@ export declare class LaunchpadSDK {
|
|
|
6789
6822
|
tokenName?: string;
|
|
6790
6823
|
banStatus?: 'BANNED' | 'UNBANNED';
|
|
6791
6824
|
}): () => void;
|
|
6792
|
-
/**
|
|
6793
|
-
* Watch for new DEX pool creation by polling sdk.dex.pools.getPools() and diffing against
|
|
6794
|
-
* the previously-seen pool set.
|
|
6795
|
-
*
|
|
6796
|
-
* There is no push event for this anywhere in the platform (no STREAM_EVENTS entry, no
|
|
6797
|
-
* StreamWebSocketService/StreamingEventService method) - this is the only way to detect new
|
|
6798
|
-
* pools. The first poll only establishes a baseline (every existing pool would otherwise be
|
|
6799
|
-
* reported as "new"); callback only fires for pools that appear on a LATER poll.
|
|
6800
|
-
*
|
|
6801
|
-
* @param callback - Called for each newly-detected pool
|
|
6802
|
-
* @param filters - intervalMs (poll frequency, default 30000), minTVL, tokens (client-side)
|
|
6803
|
-
* @returns Cleanup function that stops polling
|
|
6804
|
-
*
|
|
6805
|
-
* @since 7.1.0
|
|
6806
|
-
* @category WebSocket
|
|
6807
|
-
*/
|
|
6808
|
-
onDexPoolCreation(callback: (pool: {
|
|
6809
|
-
poolRef: string;
|
|
6810
|
-
token0: string;
|
|
6811
|
-
token1: string;
|
|
6812
|
-
fee: number;
|
|
6813
|
-
tvlUsd: number | undefined;
|
|
6814
|
-
}) => void, filters?: {
|
|
6815
|
-
intervalMs?: number;
|
|
6816
|
-
minTVL?: number;
|
|
6817
|
-
tokens?: string[];
|
|
6818
|
-
}): () => void;
|
|
6819
6825
|
/**
|
|
6820
6826
|
* Subscribe to content flagged events (overseer)
|
|
6821
6827
|
*
|
|
@@ -6825,7 +6831,7 @@ export declare class LaunchpadSDK {
|
|
|
6825
6831
|
* @since 5.12.0
|
|
6826
6832
|
* @category WebSocket
|
|
6827
6833
|
*/
|
|
6828
|
-
onContentFlagged(callback:
|
|
6834
|
+
onContentFlagged(callback: RealtimeListener<'CONTENT_FLAGGED'>): Unsubscribe;
|
|
6829
6835
|
/**
|
|
6830
6836
|
* Subscribe to flag resolved events
|
|
6831
6837
|
*
|
|
@@ -6835,7 +6841,7 @@ export declare class LaunchpadSDK {
|
|
|
6835
6841
|
* @since 5.12.0
|
|
6836
6842
|
* @category WebSocket
|
|
6837
6843
|
*/
|
|
6838
|
-
onFlagResolved(callback:
|
|
6844
|
+
onFlagResolved(callback: RealtimeListener<'FLAG_RESOLVED'>): Unsubscribe;
|
|
6839
6845
|
/**
|
|
6840
6846
|
* Subscribe to new stream chat messages
|
|
6841
6847
|
*
|
|
@@ -6845,7 +6851,7 @@ export declare class LaunchpadSDK {
|
|
|
6845
6851
|
* @since 5.12.0
|
|
6846
6852
|
* @category WebSocket
|
|
6847
6853
|
*/
|
|
6848
|
-
onStreamChatMessage(callback:
|
|
6854
|
+
onStreamChatMessage(callback: RealtimeListener<'STREAM_CHAT_MESSAGE'>): Unsubscribe;
|
|
6849
6855
|
/**
|
|
6850
6856
|
* Subscribe to stream chat message updates
|
|
6851
6857
|
*
|
|
@@ -6855,7 +6861,7 @@ export declare class LaunchpadSDK {
|
|
|
6855
6861
|
* @since 5.12.0
|
|
6856
6862
|
* @category WebSocket
|
|
6857
6863
|
*/
|
|
6858
|
-
onStreamChatUpdated(callback:
|
|
6864
|
+
onStreamChatUpdated(callback: RealtimeListener<'STREAM_CHAT_UPDATED'>): Unsubscribe;
|
|
6859
6865
|
/**
|
|
6860
6866
|
* Subscribe to stream chat message deletions
|
|
6861
6867
|
*
|
|
@@ -6865,7 +6871,7 @@ export declare class LaunchpadSDK {
|
|
|
6865
6871
|
* @since 5.12.0
|
|
6866
6872
|
* @category WebSocket
|
|
6867
6873
|
*/
|
|
6868
|
-
onStreamChatDeleted(callback:
|
|
6874
|
+
onStreamChatDeleted(callback: RealtimeListener<'STREAM_CHAT_DELETED'>): Unsubscribe;
|
|
6869
6875
|
/**
|
|
6870
6876
|
* Subscribe to stream chat message pins
|
|
6871
6877
|
*
|
|
@@ -6875,7 +6881,7 @@ export declare class LaunchpadSDK {
|
|
|
6875
6881
|
* @since 5.12.0
|
|
6876
6882
|
* @category WebSocket
|
|
6877
6883
|
*/
|
|
6878
|
-
onStreamChatPinned(callback:
|
|
6884
|
+
onStreamChatPinned(callback: RealtimeListener<'STREAM_CHAT_PINNED'>): Unsubscribe;
|
|
6879
6885
|
/**
|
|
6880
6886
|
* Subscribe to stream chat message unpins
|
|
6881
6887
|
*
|
|
@@ -6885,7 +6891,7 @@ export declare class LaunchpadSDK {
|
|
|
6885
6891
|
* @since 5.12.0
|
|
6886
6892
|
* @category WebSocket
|
|
6887
6893
|
*/
|
|
6888
|
-
onStreamChatUnpinned(callback:
|
|
6894
|
+
onStreamChatUnpinned(callback: RealtimeListener<'STREAM_CHAT_UNPINNED'>): Unsubscribe;
|
|
6889
6895
|
/**
|
|
6890
6896
|
* Subscribe to chat status changes (enable/disable)
|
|
6891
6897
|
*
|
|
@@ -6895,7 +6901,7 @@ export declare class LaunchpadSDK {
|
|
|
6895
6901
|
* @since 5.12.0
|
|
6896
6902
|
* @category WebSocket
|
|
6897
6903
|
*/
|
|
6898
|
-
onChatStatusChanged(callback:
|
|
6904
|
+
onChatStatusChanged(callback: RealtimeListener<'CHAT_STATUS_CHANGED'>): Unsubscribe;
|
|
6899
6905
|
/**
|
|
6900
6906
|
* Subscribe to viewer count changes
|
|
6901
6907
|
*
|
|
@@ -6905,7 +6911,7 @@ export declare class LaunchpadSDK {
|
|
|
6905
6911
|
* @since 5.12.0
|
|
6906
6912
|
* @category WebSocket
|
|
6907
6913
|
*/
|
|
6908
|
-
onViewerCountChanged(callback:
|
|
6914
|
+
onViewerCountChanged(callback: RealtimeListener<'VIEWER_COUNT'>): Unsubscribe;
|
|
6909
6915
|
/**
|
|
6910
6916
|
* Subscribe to recording status changes
|
|
6911
6917
|
*
|
|
@@ -6915,7 +6921,7 @@ export declare class LaunchpadSDK {
|
|
|
6915
6921
|
* @since 5.12.0
|
|
6916
6922
|
* @category WebSocket
|
|
6917
6923
|
*/
|
|
6918
|
-
onRecordingStatusChanged(callback:
|
|
6924
|
+
onRecordingStatusChanged(callback: RealtimeListener<'RECORDING_STATUS'>): Unsubscribe;
|
|
6919
6925
|
/**
|
|
6920
6926
|
* Subscribe to simulcast target status changes
|
|
6921
6927
|
*
|
|
@@ -6925,7 +6931,7 @@ export declare class LaunchpadSDK {
|
|
|
6925
6931
|
* @since 5.12.0
|
|
6926
6932
|
* @category WebSocket
|
|
6927
6933
|
*/
|
|
6928
|
-
onSimulcastStatusChanged(callback:
|
|
6934
|
+
onSimulcastStatusChanged(callback: RealtimeListener<'SIMULCAST_STATUS'>): Unsubscribe;
|
|
6929
6935
|
/**
|
|
6930
6936
|
* Subscribe to download ready events
|
|
6931
6937
|
*
|
|
@@ -6935,7 +6941,7 @@ export declare class LaunchpadSDK {
|
|
|
6935
6941
|
* @since 5.12.0
|
|
6936
6942
|
* @category WebSocket
|
|
6937
6943
|
*/
|
|
6938
|
-
onDownloadReady(callback:
|
|
6944
|
+
onDownloadReady(callback: RealtimeListener<'DOWNLOAD_READY'>): Unsubscribe;
|
|
6939
6945
|
/**
|
|
6940
6946
|
* Subscribe to recordings count updates
|
|
6941
6947
|
*
|
|
@@ -6945,7 +6951,7 @@ export declare class LaunchpadSDK {
|
|
|
6945
6951
|
* @since 9.0.0
|
|
6946
6952
|
* @category WebSocket
|
|
6947
6953
|
*/
|
|
6948
|
-
onRecordingsCountUpdated(callback:
|
|
6954
|
+
onRecordingsCountUpdated(callback: RealtimeListener<'RECORDINGS_COUNT_UPDATED'>): Unsubscribe;
|
|
6949
6955
|
/**
|
|
6950
6956
|
* Subscribe to user typing indicators
|
|
6951
6957
|
*
|
|
@@ -6955,7 +6961,7 @@ export declare class LaunchpadSDK {
|
|
|
6955
6961
|
* @since 5.12.0
|
|
6956
6962
|
* @category WebSocket
|
|
6957
6963
|
*/
|
|
6958
|
-
onUserTyping(callback:
|
|
6964
|
+
onUserTyping(callback: RealtimeListener<'USER_TYPING'>): Unsubscribe;
|
|
6959
6965
|
/**
|
|
6960
6966
|
* Subscribe to stream reactions (emoji)
|
|
6961
6967
|
*
|
|
@@ -6965,7 +6971,7 @@ export declare class LaunchpadSDK {
|
|
|
6965
6971
|
* @since 5.12.0
|
|
6966
6972
|
* @category WebSocket
|
|
6967
6973
|
*/
|
|
6968
|
-
onStreamReaction(callback:
|
|
6974
|
+
onStreamReaction(callback: RealtimeListener<'STREAM_REACTION'>): Unsubscribe;
|
|
6969
6975
|
/**
|
|
6970
6976
|
* Subscribe to content reaction additions
|
|
6971
6977
|
*
|
|
@@ -6975,7 +6981,7 @@ export declare class LaunchpadSDK {
|
|
|
6975
6981
|
* @since 5.12.0
|
|
6976
6982
|
* @category WebSocket
|
|
6977
6983
|
*/
|
|
6978
|
-
onContentReactionAdded(callback:
|
|
6984
|
+
onContentReactionAdded(callback: RealtimeListener<'CONTENT_REACTION_ADDED'>): Unsubscribe;
|
|
6979
6985
|
/**
|
|
6980
6986
|
* Subscribe to content reaction removals
|
|
6981
6987
|
*
|
|
@@ -6985,7 +6991,7 @@ export declare class LaunchpadSDK {
|
|
|
6985
6991
|
* @since 5.12.0
|
|
6986
6992
|
* @category WebSocket
|
|
6987
6993
|
*/
|
|
6988
|
-
onContentReactionRemoved(callback:
|
|
6994
|
+
onContentReactionRemoved(callback: RealtimeListener<'CONTENT_REACTION_REMOVED'>): Unsubscribe;
|
|
6989
6995
|
/**
|
|
6990
6996
|
* Subscribe to stream countdown updates
|
|
6991
6997
|
*
|
|
@@ -6995,7 +7001,7 @@ export declare class LaunchpadSDK {
|
|
|
6995
7001
|
* @since 5.12.0
|
|
6996
7002
|
* @category WebSocket
|
|
6997
7003
|
*/
|
|
6998
|
-
onStreamCountdownUpdated(callback:
|
|
7004
|
+
onStreamCountdownUpdated(callback: RealtimeListener<'STREAM_COUNTDOWN_UPDATED'>): Unsubscribe;
|
|
6999
7005
|
/**
|
|
7000
7006
|
* Subscribe to stream language updates
|
|
7001
7007
|
*
|
|
@@ -7005,7 +7011,7 @@ export declare class LaunchpadSDK {
|
|
|
7005
7011
|
* @since 5.12.0
|
|
7006
7012
|
* @category WebSocket
|
|
7007
7013
|
*/
|
|
7008
|
-
onStreamLanguageUpdated(callback:
|
|
7014
|
+
onStreamLanguageUpdated(callback: RealtimeListener<'STREAM_LANGUAGE_UPDATED'>): Unsubscribe;
|
|
7009
7015
|
/**
|
|
7010
7016
|
* Subscribe to stream control status changes
|
|
7011
7017
|
*
|
|
@@ -7015,7 +7021,7 @@ export declare class LaunchpadSDK {
|
|
|
7015
7021
|
* @since 5.12.0
|
|
7016
7022
|
* @category WebSocket
|
|
7017
7023
|
*/
|
|
7018
|
-
onStreamControlStatusChanged(callback:
|
|
7024
|
+
onStreamControlStatusChanged(callback: RealtimeListener<'STREAM_CONTROL_STATUS_CHANGED'>): Unsubscribe;
|
|
7019
7025
|
/**
|
|
7020
7026
|
* Subscribe to WebSocket connection events
|
|
7021
7027
|
*
|
|
@@ -7025,7 +7031,7 @@ export declare class LaunchpadSDK {
|
|
|
7025
7031
|
* @since 5.12.0
|
|
7026
7032
|
* @category WebSocket
|
|
7027
7033
|
*/
|
|
7028
|
-
onConnection(callback:
|
|
7034
|
+
onConnection(callback: RealtimeListener<'connection'>): Unsubscribe;
|
|
7029
7035
|
/**
|
|
7030
7036
|
* Subscribe to WebSocket authentication events
|
|
7031
7037
|
*
|
|
@@ -7035,7 +7041,7 @@ export declare class LaunchpadSDK {
|
|
|
7035
7041
|
* @since 5.12.0
|
|
7036
7042
|
* @category WebSocket
|
|
7037
7043
|
*/
|
|
7038
|
-
onAuthenticated(callback:
|
|
7044
|
+
onAuthenticated(callback: RealtimeListener<'authenticated'>): Unsubscribe;
|
|
7039
7045
|
/**
|
|
7040
7046
|
* Subscribe to token stream room subscription events
|
|
7041
7047
|
*
|
|
@@ -7045,7 +7051,7 @@ export declare class LaunchpadSDK {
|
|
|
7045
7051
|
* @since 5.12.0
|
|
7046
7052
|
* @category WebSocket
|
|
7047
7053
|
*/
|
|
7048
|
-
onTokenSubscribed(callback:
|
|
7054
|
+
onTokenSubscribed(callback: RealtimeListener<'token_subscribed'>): Unsubscribe;
|
|
7049
7055
|
/**
|
|
7050
7056
|
* Subscribe to token stream room unsubscription events
|
|
7051
7057
|
*
|
|
@@ -7055,7 +7061,7 @@ export declare class LaunchpadSDK {
|
|
|
7055
7061
|
* @since 5.12.0
|
|
7056
7062
|
* @category WebSocket
|
|
7057
7063
|
*/
|
|
7058
|
-
onTokenUnsubscribed(callback:
|
|
7064
|
+
onTokenUnsubscribed(callback: RealtimeListener<'token_unsubscribed'>): Unsubscribe;
|
|
7059
7065
|
/**
|
|
7060
7066
|
* Subscribe to comment room subscription events
|
|
7061
7067
|
*
|
|
@@ -7065,7 +7071,7 @@ export declare class LaunchpadSDK {
|
|
|
7065
7071
|
* @since 5.12.0
|
|
7066
7072
|
* @category WebSocket
|
|
7067
7073
|
*/
|
|
7068
|
-
onRoomSubscribed(callback:
|
|
7074
|
+
onRoomSubscribed(callback: RealtimeListener<'room_subscribed'>): Unsubscribe;
|
|
7069
7075
|
/**
|
|
7070
7076
|
* Subscribe to comment room unsubscription events
|
|
7071
7077
|
*
|
|
@@ -7075,7 +7081,7 @@ export declare class LaunchpadSDK {
|
|
|
7075
7081
|
* @since 5.12.0
|
|
7076
7082
|
* @category WebSocket
|
|
7077
7083
|
*/
|
|
7078
|
-
onRoomLeft(callback:
|
|
7084
|
+
onRoomLeft(callback: RealtimeListener<'room_left'>): Unsubscribe;
|
|
7079
7085
|
/**
|
|
7080
7086
|
* Subscribe to engagement stats update events
|
|
7081
7087
|
*
|
|
@@ -7097,7 +7103,7 @@ export declare class LaunchpadSDK {
|
|
|
7097
7103
|
* });
|
|
7098
7104
|
* ```
|
|
7099
7105
|
*/
|
|
7100
|
-
onEngagementStatsUpdated(callback:
|
|
7106
|
+
onEngagementStatsUpdated(callback: RealtimeListener<'ENGAGEMENT_STATS_UPDATED'>): Unsubscribe;
|
|
7101
7107
|
/**
|
|
7102
7108
|
* Estimate bridge fees for a cross-chain transfer.
|
|
7103
7109
|
*
|
|
@@ -7114,12 +7120,12 @@ export declare class LaunchpadSDK {
|
|
|
7114
7120
|
*
|
|
7115
7121
|
* @example Estimate fee for bridging GALA to Ethereum
|
|
7116
7122
|
* ```typescript
|
|
7123
|
+
* // the fee does not depend on the amount bridged
|
|
7117
7124
|
* const fee = await sdk.estimateBridgeFee({
|
|
7118
7125
|
* tokenId: 'GALA|Unit|none|none',
|
|
7119
7126
|
* destinationChain: 'Ethereum',
|
|
7120
|
-
* amount: '100',
|
|
7121
7127
|
* });
|
|
7122
|
-
* console.log(`Fee: ${fee.
|
|
7128
|
+
* console.log(`Fee: ${fee.estimatedFeeInGala} GALA`);
|
|
7123
7129
|
* ```
|
|
7124
7130
|
*/
|
|
7125
7131
|
estimateBridgeFee(params: EstimateBridgeFeeParams): Promise<BridgeFeeEstimate>;
|
|
@@ -7182,8 +7188,7 @@ export declare class LaunchpadSDK {
|
|
|
7182
7188
|
*
|
|
7183
7189
|
* Checks the current status of a cross-chain bridge transaction.
|
|
7184
7190
|
*
|
|
7185
|
-
* @param transactionHash - Transaction hash to check
|
|
7186
|
-
* @param chainHint - Optional chain hint for faster lookup
|
|
7191
|
+
* @param transactionHash - Transaction hash to check (one GalaConnect status read, any chain)
|
|
7187
7192
|
* @returns Promise resolving to bridge status
|
|
7188
7193
|
*
|
|
7189
7194
|
* @since 4.0.16
|
|
@@ -7191,14 +7196,11 @@ export declare class LaunchpadSDK {
|
|
|
7191
7196
|
*
|
|
7192
7197
|
* @example Check bridge status
|
|
7193
7198
|
* ```typescript
|
|
7194
|
-
* const status = await sdk.getBridgeStatus(
|
|
7195
|
-
* '0x1234...abcd',
|
|
7196
|
-
* 'Ethereum'
|
|
7197
|
-
* );
|
|
7199
|
+
* const status = await sdk.getBridgeStatus('0x1234...abcd');
|
|
7198
7200
|
* console.log(`Status: ${status.status}`);
|
|
7199
7201
|
* ```
|
|
7200
7202
|
*/
|
|
7201
|
-
getBridgeStatus(transactionHash: string
|
|
7203
|
+
getBridgeStatus(transactionHash: string): Promise<BridgeStatus>;
|
|
7202
7204
|
/**
|
|
7203
7205
|
* Get list of tokens supported for bridging.
|
|
7204
7206
|
*
|
|
@@ -7357,7 +7359,7 @@ export declare class LaunchpadSDK {
|
|
|
7357
7359
|
* type: 'exact'
|
|
7358
7360
|
* });
|
|
7359
7361
|
* console.log('GALA needed:', result.amount);
|
|
7360
|
-
* console.log('
|
|
7362
|
+
* console.log('Fees:', result.transactionFee, result.gasFee);
|
|
7361
7363
|
* ```
|
|
7362
7364
|
*
|
|
7363
7365
|
* @example Performance-optimized with local calculation
|
|
@@ -7697,7 +7699,7 @@ export declare class LaunchpadSDK {
|
|
|
7697
7699
|
* **Use simple `tokenName`** (e.g., `"anime"`), NOT full TokenClassKey format.
|
|
7698
7700
|
*
|
|
7699
7701
|
* This method is for **bonding curve tokens only** (pre-graduation). For DEX trading
|
|
7700
|
-
* of graduated tokens, use `
|
|
7702
|
+
* of graduated tokens, use `@gala-chain/gswap-sdk` (`new GSwap({ signer }).swaps.swap()`) with full TokenClassKey format.
|
|
7701
7703
|
*
|
|
7702
7704
|
* ```typescript
|
|
7703
7705
|
* // ✅ CORRECT - Simple token name
|
|
@@ -7818,7 +7820,7 @@ export declare class LaunchpadSDK {
|
|
|
7818
7820
|
* **Use simple `tokenName`** (e.g., `"anime"`), NOT full TokenClassKey format.
|
|
7819
7821
|
*
|
|
7820
7822
|
* This method is for **bonding curve tokens only** (pre-graduation). For DEX trading
|
|
7821
|
-
* of graduated tokens, use `
|
|
7823
|
+
* of graduated tokens, use `@gala-chain/gswap-sdk` (`new GSwap({ signer }).swaps.swap()`) with full TokenClassKey format.
|
|
7822
7824
|
*
|
|
7823
7825
|
* ```typescript
|
|
7824
7826
|
* // ✅ CORRECT - Simple token name
|
|
@@ -7978,49 +7980,33 @@ export declare class LaunchpadSDK {
|
|
|
7978
7980
|
*/
|
|
7979
7981
|
launchToken(data: LaunchTokenData): Promise<TokenLaunchResult>;
|
|
7980
7982
|
/**
|
|
7981
|
-
* Upload a token image
|
|
7982
|
-
*
|
|
7983
|
-
* Uploads an image file from the local filesystem for a specific token. The image is stored on the
|
|
7984
|
-
* launchpad server and can be displayed in the UI and API responses. Supports common image formats
|
|
7985
|
-
* (PNG, JPG, GIF) and automatically handles image validation and optimization.
|
|
7986
|
-
*
|
|
7987
|
-
* **Important:** This method is only available in Node.js environments (not in browsers).
|
|
7988
|
-
* Use for backend applications, build scripts, or CLI tools that manage token metadata.
|
|
7983
|
+
* Upload a token image (`POST /v1/tokens/:tokenName/image`)
|
|
7989
7984
|
*
|
|
7990
|
-
*
|
|
7991
|
-
*
|
|
7985
|
+
* Takes the image as a browser `File` or a Node.js `Buffer` and answers the URL it is served from.
|
|
7986
|
+
* The route needs only the logged-in session's bearer: it works on an SDK configured with a signer
|
|
7987
|
+
* and a wallet address (and a `session`, or after `login()`), with no `wallet`. The token must be
|
|
7988
|
+
* the caller's to manage; the backend answers 403 otherwise.
|
|
7992
7989
|
*
|
|
7993
7990
|
* @category Main SDK
|
|
7994
|
-
* @param options -
|
|
7995
|
-
* @param options.tokenName - Token name to upload image for (
|
|
7996
|
-
* @param options.
|
|
7997
|
-
* @param options.privateKey - Optional private key override for this operation (format: 0x + 64 hex characters)
|
|
7991
|
+
* @param options - `{ tokenName, options: { file } }`
|
|
7992
|
+
* @param options.tokenName - Token name to upload the image for (letters and digits, the path name the pool lookup resolves)
|
|
7993
|
+
* @param options.options.file - The image: a `File` (browser) or `Buffer` (Node.js), PNG or JPEG
|
|
7994
|
+
* @param options.privateKey - Optional private key override for this operation (format: 0x + 64 hex characters); signs in as that wallet
|
|
7998
7995
|
* @returns Promise<string> URL where the image is hosted and can be accessed
|
|
7999
|
-
* @throws {ValidationError} If tokenName is invalid
|
|
8000
|
-
* @throws {
|
|
8001
|
-
* @throws {NetworkError} If upload request fails
|
|
7996
|
+
* @throws {ValidationError} If tokenName is invalid or the file is not an image
|
|
7997
|
+
* @throws {ConfigurationError} If there is no session or logged-in token
|
|
7998
|
+
* @throws {NetworkError} If upload request fails (the backend's answer is kept: its size limit, 403, 404)
|
|
8002
7999
|
* @since 4.0.4-beta.0
|
|
8000
|
+
* @since 9.0.0 - needs no `wallet` (it threw "Wallet is required" on a signer-plus-address SDK)
|
|
8003
8001
|
*
|
|
8004
|
-
* @example Upload image
|
|
8002
|
+
* @example Upload an image
|
|
8005
8003
|
* ```typescript
|
|
8006
|
-
* import path from 'path';
|
|
8007
|
-
*
|
|
8008
8004
|
* const imageUrl = await sdk.uploadTokenImage({
|
|
8009
8005
|
* tokenName: 'mytoken',
|
|
8010
|
-
*
|
|
8006
|
+
* options: { file: imageBuffer }
|
|
8011
8007
|
* });
|
|
8012
|
-
*
|
|
8013
8008
|
* console.log(`Image uploaded: ${imageUrl}`);
|
|
8014
8009
|
* ```
|
|
8015
|
-
*
|
|
8016
|
-
* @example Upload with private key override
|
|
8017
|
-
* ```typescript
|
|
8018
|
-
* const imageUrl = await sdk.uploadTokenImage({
|
|
8019
|
-
* tokenName: 'mytoken',
|
|
8020
|
-
* imagePath: '/absolute/path/to/image.png',
|
|
8021
|
-
* privateKey: process.env.ALTERNATIVE_PRIVATE_KEY
|
|
8022
|
-
* });
|
|
8023
|
-
* ```
|
|
8024
8010
|
*/
|
|
8025
8011
|
uploadTokenImage(options: UploadImageByTokenNameOptions): Promise<string>;
|
|
8026
8012
|
/**
|
|
@@ -8165,9 +8151,9 @@ export declare class LaunchpadSDK {
|
|
|
8165
8151
|
/**
|
|
8166
8152
|
* Fetch user profile information by wallet address
|
|
8167
8153
|
*
|
|
8168
|
-
*
|
|
8169
|
-
*
|
|
8170
|
-
*
|
|
8154
|
+
* `GET /v1/users/:address` (public, no authentication): name, profile image, bio, aggregated stats
|
|
8155
|
+
* and the four badge ladders. An address with no profile row still answers a profile (`fullName`,
|
|
8156
|
+
* `profileImage` and `bio` are null).
|
|
8171
8157
|
*
|
|
8172
8158
|
* **Supports both address formats:**
|
|
8173
8159
|
* - Standard Ethereum format: `0x...` (64 hex characters after 0x prefix)
|
|
@@ -8175,29 +8161,25 @@ export declare class LaunchpadSDK {
|
|
|
8175
8161
|
*
|
|
8176
8162
|
* @category Main SDK
|
|
8177
8163
|
* @param address - Optional wallet address in 0x... or eth|... format. Defaults to current SDK wallet address.
|
|
8178
|
-
* @returns
|
|
8164
|
+
* @returns The public profile (the `data` of the backend's envelope)
|
|
8179
8165
|
* @throws {ValidationError} If wallet is not configured and no address is provided
|
|
8180
|
-
* @throws {NetworkError} If launchpad API request fails
|
|
8166
|
+
* @throws {NetworkError} If launchpad API request fails, or answers a body that is not a profile
|
|
8181
8167
|
* @since 4.0.4-beta.0
|
|
8168
|
+
* @since 9.0.0 - typed `PublicUserProfile` (it returned the whole `{ data }` envelope as `unknown`)
|
|
8182
8169
|
*
|
|
8183
8170
|
* @example Fetch current user's profile
|
|
8184
8171
|
* ```typescript
|
|
8185
8172
|
* const profile = await sdk.fetchProfile();
|
|
8186
|
-
*
|
|
8187
|
-
* console.log(`User: ${profile.fullName}`);
|
|
8188
|
-
* console.log(`Image: ${profile.profileImage}`);
|
|
8189
|
-
* } else {
|
|
8190
|
-
* console.log('No profile created yet');
|
|
8191
|
-
* }
|
|
8173
|
+
* console.log(`User: ${profile.fullName}, tokens created: ${profile.stats.tokensCreated}`);
|
|
8192
8174
|
* ```
|
|
8193
8175
|
*
|
|
8194
8176
|
* @example Fetch profile for specific address
|
|
8195
8177
|
* ```typescript
|
|
8196
8178
|
* const profile = await sdk.fetchProfile('eth|742d35Cc6634C0532925a3b8D0Ea2c76f94C31C0');
|
|
8197
|
-
* console.log(`Profile owner: ${profile
|
|
8179
|
+
* console.log(`Profile owner: ${profile.fullName}`);
|
|
8198
8180
|
* ```
|
|
8199
8181
|
*/
|
|
8200
|
-
fetchProfile(address?: string): Promise<
|
|
8182
|
+
fetchProfile(address?: string): Promise<PublicUserProfile>;
|
|
8201
8183
|
/**
|
|
8202
8184
|
* Fetch the current user's referral URL
|
|
8203
8185
|
*
|
|
@@ -8359,17 +8341,17 @@ export declare class LaunchpadSDK {
|
|
|
8359
8341
|
* Only the wallet owner can update their own profile. Changes take effect immediately after
|
|
8360
8342
|
* successful submission to the launchpad server.
|
|
8361
8343
|
*
|
|
8362
|
-
* **Requires
|
|
8363
|
-
*
|
|
8344
|
+
* **Requires a JWT** (the backend updates the user of the token). Only the fields given are sent:
|
|
8345
|
+
* an omitted field is left as it is, `profileImage: ''` clears the image.
|
|
8364
8346
|
*
|
|
8365
8347
|
* @category Main SDK
|
|
8366
|
-
* @param data - Profile update data
|
|
8367
|
-
* @param data.address -
|
|
8368
|
-
* @param data.fullName - User's full name (optional,
|
|
8369
|
-
* @param data.profileImage - Profile image URL (optional,
|
|
8348
|
+
* @param data - Profile update data (at least one of fullName and profileImage)
|
|
8349
|
+
* @param data.address - Optional (0x... or eth|... format); validated, not sent
|
|
8350
|
+
* @param data.fullName - User's full name (optional, 2 to 20 letters, a second word allowed)
|
|
8351
|
+
* @param data.profileImage - Profile image URL (optional, `''` clears it, null leaves it)
|
|
8370
8352
|
* @param data.privateKey - Optional private key override for this operation (format: 0x + 64 hex characters)
|
|
8371
8353
|
* @returns Promise<void> No return data - throws on failure
|
|
8372
|
-
* @throws {ValidationError} If address
|
|
8354
|
+
* @throws {ValidationError} If the address or name is invalid or nothing is given
|
|
8373
8355
|
* @throws {NetworkError} If launchpad API request fails
|
|
8374
8356
|
* @since 4.0.4-beta.0
|
|
8375
8357
|
*
|
|
@@ -8402,55 +8384,30 @@ export declare class LaunchpadSDK {
|
|
|
8402
8384
|
*/
|
|
8403
8385
|
updateProfile(data: UpdateProfileData): Promise<void>;
|
|
8404
8386
|
/**
|
|
8405
|
-
* Upload a profile image for
|
|
8406
|
-
*
|
|
8407
|
-
* Uploads an image file from the local filesystem as a user's profile picture. The image is stored on the
|
|
8408
|
-
* launchpad server and displayed in user profiles and UI throughout the platform. Supports common image formats
|
|
8409
|
-
* (PNG, JPG, GIF) and automatically handles image validation and optimization.
|
|
8410
|
-
*
|
|
8411
|
-
* **Important:** This method is only available in Node.js environments (not in browsers).
|
|
8412
|
-
* Use for backend applications, build scripts, or CLI tools that manage user profiles.
|
|
8387
|
+
* Upload a profile image for the logged-in user (`POST /v1/users/me/image`)
|
|
8413
8388
|
*
|
|
8414
|
-
*
|
|
8415
|
-
*
|
|
8389
|
+
* Takes the image as a browser `File` or a Node.js `Buffer` and answers the URL it is served from.
|
|
8390
|
+
* The backend uploads for the user of the session JWT, so the route needs no address and no `wallet`:
|
|
8391
|
+
* it works on an SDK configured with a signer and a wallet address (and a `session`, or after
|
|
8392
|
+
* `login()`). An `address` that is given is validated and only names the multipart file.
|
|
8416
8393
|
*
|
|
8417
8394
|
* @category Main SDK
|
|
8418
8395
|
* @param options - Profile image upload options
|
|
8419
|
-
* @param options.
|
|
8420
|
-
* @param options.address - Optional
|
|
8421
|
-
* @param options.privateKey - Optional private key override for this operation (format: 0x + 64 hex characters)
|
|
8396
|
+
* @param options.file - The image: a `File` (browser) or `Buffer` (Node.js), PNG or JPEG
|
|
8397
|
+
* @param options.address - Optional address (0x... or eth|... or client|...); validated, not sent
|
|
8398
|
+
* @param options.privateKey - Optional private key override for this operation (format: 0x + 64 hex characters); signs in as that wallet
|
|
8422
8399
|
* @returns Promise<string> URL where the profile image is hosted and can be accessed
|
|
8423
|
-
* @throws {ValidationError} If
|
|
8424
|
-
* @throws {
|
|
8425
|
-
* @throws {NetworkError} If upload request fails
|
|
8400
|
+
* @throws {ValidationError} If the address is not a valid address
|
|
8401
|
+
* @throws {ConfigurationError} If there is no session or logged-in token
|
|
8402
|
+
* @throws {NetworkError} If upload request fails (the backend's answer is kept: its size limit, 400 for a bad format)
|
|
8426
8403
|
* @since 4.0.4-beta.0
|
|
8404
|
+
* @since 9.0.0 - needs no `wallet` and no address (it threw "Wallet is required" on a signer-plus-address SDK)
|
|
8427
8405
|
*
|
|
8428
|
-
* @example Upload profile image
|
|
8406
|
+
* @example Upload a profile image
|
|
8429
8407
|
* ```typescript
|
|
8430
|
-
*
|
|
8431
|
-
*
|
|
8432
|
-
* const imageUrl = await sdk.uploadProfileImage({
|
|
8433
|
-
* imagePath: path.join(process.cwd(), 'profile-picture.png')
|
|
8434
|
-
* });
|
|
8435
|
-
*
|
|
8408
|
+
* const imageUrl = await sdk.uploadProfileImage({ file: imageBuffer });
|
|
8436
8409
|
* console.log(`Profile image uploaded: ${imageUrl}`);
|
|
8437
8410
|
* ```
|
|
8438
|
-
*
|
|
8439
|
-
* @example Upload image for specific address
|
|
8440
|
-
* ```typescript
|
|
8441
|
-
* const imageUrl = await sdk.uploadProfileImage({
|
|
8442
|
-
* imagePath: '/absolute/path/to/profile.png',
|
|
8443
|
-
* address: 'eth|742d35Cc6634C0532925a3b8D0Ea2c76f94C31C0'
|
|
8444
|
-
* });
|
|
8445
|
-
* ```
|
|
8446
|
-
*
|
|
8447
|
-
* @example Upload with private key override
|
|
8448
|
-
* ```typescript
|
|
8449
|
-
* const imageUrl = await sdk.uploadProfileImage({
|
|
8450
|
-
* imagePath: '/absolute/path/to/profile.png',
|
|
8451
|
-
* privateKey: process.env.ALTERNATIVE_PRIVATE_KEY
|
|
8452
|
-
* });
|
|
8453
|
-
* ```
|
|
8454
8411
|
*/
|
|
8455
8412
|
uploadProfileImage(options: UploadProfileImageOptions): Promise<string>;
|
|
8456
8413
|
/**
|
|
@@ -8559,78 +8516,41 @@ export declare class LaunchpadSDK {
|
|
|
8559
8516
|
*/
|
|
8560
8517
|
getManagedTokens(options?: GetManagedTokensOptions): Promise<ManagedTokensResult>;
|
|
8561
8518
|
/**
|
|
8562
|
-
*
|
|
8519
|
+
* A user's GALA balance and its USD value, as the launchpad backend reads them from the chain
|
|
8520
|
+
* (`GET /v1/users/:address/gala-balance`). Public; the backend never caches it. For a chain read
|
|
8521
|
+
* through the gateway instead, use {@link LaunchpadSDK.fetchGalaBalance}.
|
|
8563
8522
|
*
|
|
8564
|
-
*
|
|
8565
|
-
*
|
|
8566
|
-
*
|
|
8567
|
-
*
|
|
8568
|
-
* @
|
|
8569
|
-
* @
|
|
8570
|
-
* @throws ConfigurationError if dexBackendBaseUrl not configured
|
|
8571
|
-
* @throws NetworkError if API request fails
|
|
8572
|
-
* @throws ValidationError if parameters are invalid
|
|
8573
|
-
*
|
|
8574
|
-
* @category Price History
|
|
8575
|
-
* @since 3.13.0
|
|
8523
|
+
* @param address - The user's address (`eth|...`, `0x...` or `client|...`)
|
|
8524
|
+
* @returns `{ name: 'GALA', quantity, price, holdingPrice }`
|
|
8525
|
+
* @throws ValidationError if no address is given
|
|
8526
|
+
* @throws NetworkError if the backend cannot read the balance or the GALA price
|
|
8527
|
+
* @since 9.0.0
|
|
8528
|
+
* @category User Management
|
|
8576
8529
|
*
|
|
8577
8530
|
* @example
|
|
8578
8531
|
* ```typescript
|
|
8579
|
-
*
|
|
8580
|
-
*
|
|
8581
|
-
* tokenClassKey: {
|
|
8582
|
-
* collection: 'GUSDC',
|
|
8583
|
-
* category: 'Unit',
|
|
8584
|
-
* type: 'none',
|
|
8585
|
-
* additionalKey: 'none'
|
|
8586
|
-
* },
|
|
8587
|
-
* from: new Date('2024-01-01'),
|
|
8588
|
-
* to: new Date('2024-01-31'),
|
|
8589
|
-
* pageSize: 20
|
|
8590
|
-
* });
|
|
8591
|
-
*
|
|
8592
|
-
* console.log(`Found ${history.snapshots.length} price snapshots`);
|
|
8593
|
-
* console.log(`Total: ${history.total}, Page ${history.page} of ${history.totalPages}`);
|
|
8532
|
+
* const gala = await sdk.getUserGalaBalance('eth|1234567890abcdef1234567890abcdef12345678');
|
|
8533
|
+
* console.log(`${gala.quantity} GALA = $${gala.holdingPrice}`);
|
|
8594
8534
|
* ```
|
|
8595
8535
|
*/
|
|
8596
|
-
|
|
8536
|
+
getUserGalaBalance(address: string): Promise<UserGalaBalance>;
|
|
8597
8537
|
/**
|
|
8598
|
-
*
|
|
8599
|
-
*
|
|
8600
|
-
*
|
|
8601
|
-
* snapshots across all pages and returning them in a single result. This method internally
|
|
8602
|
-
* loops through pages using the maximum page size (100 items) for efficiency.
|
|
8603
|
-
*
|
|
8604
|
-
* Only available for DEX tokens with price snapshot data on the DEX Backend API.
|
|
8538
|
+
* The authenticated user's referral code (`GET /v1/connect/users/referrals/code`, JWT session;
|
|
8539
|
+
* the backend asks Gala Connect for the wallet of the token). Not {@link LaunchpadSDK.fetchReferralUrl},
|
|
8540
|
+
* which is the DEX API's link for the SDK wallet.
|
|
8605
8541
|
*
|
|
8606
|
-
* @
|
|
8607
|
-
* @
|
|
8608
|
-
*
|
|
8609
|
-
* @
|
|
8610
|
-
* @throws ValidationError if parameters are invalid
|
|
8611
|
-
*
|
|
8612
|
-
* @category Price History
|
|
8613
|
-
* @since 3.14.0
|
|
8542
|
+
* @returns `{ code, username? }`
|
|
8543
|
+
* @throws ConfigurationError if no JWT session is configured
|
|
8544
|
+
* @since 9.0.0
|
|
8545
|
+
* @category User Management
|
|
8614
8546
|
*
|
|
8615
8547
|
* @example
|
|
8616
8548
|
* ```typescript
|
|
8617
|
-
*
|
|
8618
|
-
*
|
|
8619
|
-
* tokenId: {
|
|
8620
|
-
* collection: 'GUSDC',
|
|
8621
|
-
* category: 'Unit',
|
|
8622
|
-
* type: 'none',
|
|
8623
|
-
* additionalKey: 'none'
|
|
8624
|
-
* },
|
|
8625
|
-
* from: new Date('2024-01-01'),
|
|
8626
|
-
* to: new Date('2024-12-31')
|
|
8627
|
-
* });
|
|
8628
|
-
*
|
|
8629
|
-
* console.log(`Found ${allHistory.snapshots.length} price snapshots`);
|
|
8630
|
-
* console.log(`Total: ${allHistory.total}`);
|
|
8549
|
+
* const { code } = await sdk.fetchReferralCode();
|
|
8550
|
+
* console.log(`https://pump.gala.com/?ref=${code}`);
|
|
8631
8551
|
* ```
|
|
8632
8552
|
*/
|
|
8633
|
-
|
|
8553
|
+
fetchReferralCode(): Promise<ReferralCode>;
|
|
8634
8554
|
/**
|
|
8635
8555
|
* Transfer GALA tokens between wallets
|
|
8636
8556
|
*
|
|
@@ -8712,7 +8632,7 @@ export declare class LaunchpadSDK {
|
|
|
8712
8632
|
*
|
|
8713
8633
|
* @throws {TransferError} When token name cannot be resolved
|
|
8714
8634
|
*/
|
|
8715
|
-
resolveTokenClassKey(tokenName: string): Promise<
|
|
8635
|
+
resolveTokenClassKey(tokenName: string): Promise<GalaChainTokenClassKey>;
|
|
8716
8636
|
/**
|
|
8717
8637
|
* Convert token name to TokenClassKey (explicit alias for resolveTokenClassKey)
|
|
8718
8638
|
*
|
|
@@ -8746,7 +8666,7 @@ export declare class LaunchpadSDK {
|
|
|
8746
8666
|
*
|
|
8747
8667
|
* @throws {TransferError} When token name cannot be resolved
|
|
8748
8668
|
*/
|
|
8749
|
-
convertTokenNameToTokenClassKey(tokenName: string): Promise<
|
|
8669
|
+
convertTokenNameToTokenClassKey(tokenName: string): Promise<GalaChainTokenClassKey>;
|
|
8750
8670
|
/**
|
|
8751
8671
|
* Lock tokens on GalaChain (batch operation)
|
|
8752
8672
|
*
|