@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
|
@@ -73,11 +73,13 @@ export declare const imageUploadOptionsSchema: z.ZodObject<{
|
|
|
73
73
|
tokenName: z.ZodString;
|
|
74
74
|
}, z.core.$strip>;
|
|
75
75
|
/**
|
|
76
|
-
* Pool fetch type schema
|
|
76
|
+
* Pool fetch type schema: the `type` values `GET /v1/tokens` accepts ({@link POOL_FETCH_TYPES}).
|
|
77
77
|
*/
|
|
78
78
|
export declare const poolFetchTypeSchema: z.ZodEnum<{
|
|
79
79
|
RECENT: "RECENT";
|
|
80
80
|
POPULAR: "POPULAR";
|
|
81
|
+
RECORDINGS: "RECORDINGS";
|
|
82
|
+
SECONDS_STREAMED: "SECONDS_STREAMED";
|
|
81
83
|
}>;
|
|
82
84
|
/**
|
|
83
85
|
* Pool check options schema
|
|
@@ -126,7 +128,6 @@ export type TokenUrls = z.infer<typeof tokenUrlsSchema>;
|
|
|
126
128
|
export type LaunchTokenDataInput = z.input<typeof launchTokenDataSchema>;
|
|
127
129
|
export type LaunchTokenData = z.infer<typeof launchTokenDataSchema>;
|
|
128
130
|
export type ImageUploadOptions = z.infer<typeof imageUploadOptionsSchema>;
|
|
129
|
-
export type PoolFetchType = z.infer<typeof poolFetchTypeSchema>;
|
|
130
131
|
export type CheckPoolOptions = z.infer<typeof checkPoolOptionsSchema>;
|
|
131
132
|
export type AmountType = z.infer<typeof amountTypeSchema>;
|
|
132
133
|
export type AmountMethod = z.infer<typeof amountMethodSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launchpad.d.ts","sourceRoot":"","sources":["../../src/schemas/launchpad.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"launchpad.d.ts","sourceRoot":"","sources":["../../src/schemas/launchpad.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;iBAoBzB,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,mBAAmB,2BAGd,CAAC;AAEnB;;GAEG;AACH,eAAO,MAAM,qBAAqB,2BAGf,CAAC;AAEpB;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B;;;iBAc3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;iBAyBhC,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;iBAMnC,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;EAA2B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;iBAShC,CAAC;AAMJ;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;EAA6B,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;EAAwB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;iBAejC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;iBAMrC,CAAC;AAMH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACzE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -6,10 +6,20 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
/**
|
|
9
|
-
* Token name schema -
|
|
10
|
-
*
|
|
9
|
+
* Token name schema - what the chain and the bundler take as a launched name: ASCII letters and
|
|
10
|
+
* digits, at least one (the same rule `createSale` checks). It carries NO length cap: the routes cap
|
|
11
|
+
* differently (1-20 on DTO routes, 1-255 on path routes), and each method validates the rule of its
|
|
12
|
+
* own route (see `types/constraints`, `TOKEN_NAME_*_CONSTRAINT`).
|
|
11
13
|
*/
|
|
12
14
|
export declare const tokenNameSchema: z.ZodString;
|
|
15
|
+
/**
|
|
16
|
+
* Token name of a DTO route (`@TokenNameField()`): letters and digits, 1-20.
|
|
17
|
+
*/
|
|
18
|
+
export declare const dtoTokenNameSchema: z.ZodString;
|
|
19
|
+
/**
|
|
20
|
+
* Token name of the availability check (`POST /v1/utils/validate-token`): any text of 1-50 characters.
|
|
21
|
+
*/
|
|
22
|
+
export declare const availabilityTokenNameSchema: z.ZodString;
|
|
13
23
|
/**
|
|
14
24
|
* Token symbol schema - uppercase letters, 1-8 characters
|
|
15
25
|
* Used for token ticker symbols
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/schemas/primitives.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/schemas/primitives.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB;;;;;GAKG;AACH,eAAO,MAAM,eAAe,aAGiD,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,kBAAkB,aAAsE,CAAC;AAEtG;;GAEG;AACH,eAAO,MAAM,2BAA2B,aAGc,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,aAIyC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,sBAAsB,aAG4B,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,mBAAmB,aAGsB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,aAG4B,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,cAAc,aAI+C,CAAC;AAM3E;;;GAGG;AACH,eAAO,MAAM,mBAAmB,aAE2D,CAAC;AAE5F;;;GAGG;AACH,eAAO,MAAM,qBAAqB,aAEuC,CAAC;AAE1E;;;GAGG;AACH,eAAO,MAAM,qBAAqB,wDAa9B,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,kBAAkB,aAO5B,CAAC;AAMJ;;;GAGG;AACH,eAAO,MAAM,2BAA2B,aAMrC,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,8BAA8B,aAMxC,CAAC;AAMJ;;;GAGG;AACH,eAAO,MAAM,SAAS,aAG6C,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,4BAM3B,CAAC;AAMJ;;;GAGG;AACH,eAAO,MAAM,gBAAgB,2BAKhB,CAAC;AAEd;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,GAAE,MAAY,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAOnF;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,2BAAyB,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,eAAe,2BAAwB,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,gBAAgB,2BAAwB,CAAC;AAMtD;;GAEG;AACH,eAAO,MAAM,cAAc,aAI0B,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,cAAc,aAE2B,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;EAO9B,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,mBAAmB,aAEmB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,eAAe,aAGe,CAAC;AAM5C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,aAEwD,CAAC;AAEtF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,aAK7B,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,eAAe,aAKzB,CAAC"}
|
package/dist/schemas/user.d.ts
CHANGED
|
@@ -41,9 +41,9 @@ export declare const fetchGalaBalanceOptionsSchema: z.ZodObject<{
|
|
|
41
41
|
* Update profile data schema
|
|
42
42
|
*/
|
|
43
43
|
export declare const updateProfileDataSchema: z.ZodObject<{
|
|
44
|
-
profileImage: z.ZodString
|
|
45
|
-
fullName: z.ZodString
|
|
46
|
-
address: z.ZodPipe<z.ZodString, z.ZodTransform<string, string
|
|
44
|
+
profileImage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
46
|
+
address: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
47
47
|
privateKey: z.ZodOptional<z.ZodString>;
|
|
48
48
|
}, z.core.$strip>;
|
|
49
49
|
/**
|
|
@@ -54,20 +54,6 @@ export declare const uploadProfileImageOptionsSchema: z.ZodObject<{
|
|
|
54
54
|
address: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
55
55
|
privateKey: z.ZodOptional<z.ZodString>;
|
|
56
56
|
}, z.core.$strip>;
|
|
57
|
-
/**
|
|
58
|
-
* Token hold schema representing a lock on tokens
|
|
59
|
-
* Matches the GalaChain FetchBalances response structure for inUseHolds and lockedHolds
|
|
60
|
-
*/
|
|
61
|
-
export declare const tokenHoldSchema: z.ZodObject<{
|
|
62
|
-
created: z.ZodNumber;
|
|
63
|
-
createdBy: z.ZodString;
|
|
64
|
-
expires: z.ZodNumber;
|
|
65
|
-
instanceId: z.ZodString;
|
|
66
|
-
lockAuthority: z.ZodString;
|
|
67
|
-
name: z.ZodString;
|
|
68
|
-
quantity: z.ZodString;
|
|
69
|
-
vestingPeriodStart: z.ZodNumber;
|
|
70
|
-
}, z.core.$strip>;
|
|
71
57
|
/**
|
|
72
58
|
* Fetch token balance options schema
|
|
73
59
|
* Supports flexible token identification via tokenId, tokenClassKey, or tokenName
|
|
@@ -95,5 +81,4 @@ export type FetchGalaBalanceOptions = z.infer<typeof fetchGalaBalanceOptionsSche
|
|
|
95
81
|
export type UpdateProfileData = z.infer<typeof updateProfileDataSchema>;
|
|
96
82
|
export type UploadProfileImageOptions = z.infer<typeof uploadProfileImageOptionsSchema>;
|
|
97
83
|
export type FetchTokenBalanceOptions = z.infer<typeof fetchTokenBalanceOptionsSchema>;
|
|
98
|
-
export type TokenHold = z.infer<typeof tokenHoldSchema>;
|
|
99
84
|
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/schemas/user.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;EAAsC,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;iBAKjC,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;iBAGxC,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;iBAO1C,CAAC;AAMH;;;GAGG;AACH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/schemas/user.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;EAAsC,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;iBAKjC,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;iBAGxC,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;iBAO1C,CAAC;AAMH;;;GAGG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;iBAwB1C,CAAC;AAMF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -221,9 +221,9 @@ export declare const validateFetchGalaBalanceOptions: (value: unknown) => Valida
|
|
|
221
221
|
* Replaces: isUpdateProfileData()
|
|
222
222
|
*/
|
|
223
223
|
export declare const validateUpdateProfileData: (value: unknown) => ValidationResult<{
|
|
224
|
-
profileImage
|
|
225
|
-
fullName
|
|
226
|
-
address
|
|
224
|
+
profileImage?: string | null | undefined;
|
|
225
|
+
fullName?: string | undefined;
|
|
226
|
+
address?: string | undefined;
|
|
227
227
|
privateKey?: string | undefined;
|
|
228
228
|
}>;
|
|
229
229
|
/**
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Abstract Cache Service Base Class
|
|
3
3
|
*
|
|
4
4
|
* Provides generic cache management functionality for all cache implementations.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* The base of TokenMetadataCache: a common interface and lifecycle management (the bridgeable and
|
|
6
|
+
* wrappable token caches moved to `@gala-chain/gala-core-sdk/bridge`, inside its token services).
|
|
7
7
|
*
|
|
8
8
|
* ## Architecture
|
|
9
9
|
* - **Generic K/V types**: Supports any key/value structure
|
|
@@ -109,7 +109,7 @@ export declare class ApiKeyService extends BaseService {
|
|
|
109
109
|
* if (page1.pageInfo.hasNextPage) {
|
|
110
110
|
* const page2 = await apiKeyService.findAll({
|
|
111
111
|
* pageSize: 20,
|
|
112
|
-
* cursor: page1.pageInfo.
|
|
112
|
+
* cursor: page1.pageInfo.endCursor ?? undefined
|
|
113
113
|
* });
|
|
114
114
|
* }
|
|
115
115
|
*
|
|
@@ -144,7 +144,7 @@ export declare class BanService extends StreamTokenServiceBase {
|
|
|
144
144
|
* const page2 = await banService.listBans({
|
|
145
145
|
* tokenName: 'mytoken',
|
|
146
146
|
* pageSize: 20,
|
|
147
|
-
* cursor: page1.pageInfo.
|
|
147
|
+
* cursor: page1.pageInfo.endCursor ?? undefined
|
|
148
148
|
* });
|
|
149
149
|
* }
|
|
150
150
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartService.d.ts","sourceRoot":"","sources":["../../src/services/ChartService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"ChartService.d.ts","sourceRoot":"","sources":["../../src/services/ChartService.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,sCAAsC;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,YAAa,SAAQ,WAAW;gBAC/B,IAAI,EAAE,UAAU,EAAE,SAAS,GAAE,OAAe;IAIxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC;CA+I/D"}
|
|
@@ -25,14 +25,12 @@ import { StreamTokenServiceBase } from './StreamTokenServiceBase';
|
|
|
25
25
|
*
|
|
26
26
|
* // Add a reaction to a chat message
|
|
27
27
|
* const result = await reactionService.addContentReaction({
|
|
28
|
-
* tokenName: 'mytoken',
|
|
29
28
|
* messageId: 'msg-1703443200000-a1b2c3d4e5f6789012345678901234ab',
|
|
30
29
|
* reactionType: 'heart'
|
|
31
30
|
* });
|
|
32
31
|
*
|
|
33
32
|
* // Remove a reaction
|
|
34
33
|
* await reactionService.removeContentReaction({
|
|
35
|
-
* tokenName: 'mytoken',
|
|
36
34
|
* messageId: 'msg-1703443200000-a1b2c3d4e5f6789012345678901234ab',
|
|
37
35
|
* reactionType: 'heart'
|
|
38
36
|
* });
|
|
@@ -40,10 +38,6 @@ import { StreamTokenServiceBase } from './StreamTokenServiceBase';
|
|
|
40
38
|
*/
|
|
41
39
|
export declare class ContentReactionService extends StreamTokenServiceBase {
|
|
42
40
|
constructor(http: HttpClient, adminApiKey?: string, jwtAuth?: JwtAuth, debugMode?: boolean, userApiKey?: string);
|
|
43
|
-
/**
|
|
44
|
-
* Validate token name using content reaction constraints
|
|
45
|
-
*/
|
|
46
|
-
private validateReactionTokenName;
|
|
47
41
|
/**
|
|
48
42
|
* Validate message ID format
|
|
49
43
|
*/
|
|
@@ -59,7 +53,7 @@ export declare class ContentReactionService extends StreamTokenServiceBase {
|
|
|
59
53
|
* Adding the same reaction type again is a no-op (idempotent).
|
|
60
54
|
* Users can have multiple different reaction types on the same message.
|
|
61
55
|
*
|
|
62
|
-
* @param options Options including
|
|
56
|
+
* @param options Options including messageId and reactionType
|
|
63
57
|
* @returns Updated reaction data and whether reaction was newly created
|
|
64
58
|
* @throws ValidationError if parameters are invalid
|
|
65
59
|
* @throws ConfigurationError if authentication is not configured
|
|
@@ -68,7 +62,6 @@ export declare class ContentReactionService extends StreamTokenServiceBase {
|
|
|
68
62
|
* ```typescript
|
|
69
63
|
* // Add a heart reaction
|
|
70
64
|
* const result = await reactionService.addContentReaction({
|
|
71
|
-
* tokenName: 'mytoken',
|
|
72
65
|
* messageId: 'msg-1703443200000-a1b2c3d4e5f6789012345678901234ab',
|
|
73
66
|
* reactionType: 'heart'
|
|
74
67
|
* });
|
|
@@ -83,7 +76,7 @@ export declare class ContentReactionService extends StreamTokenServiceBase {
|
|
|
83
76
|
* Requires JWT or API key authentication.
|
|
84
77
|
* Only the user who created the reaction can remove it (no admin override).
|
|
85
78
|
*
|
|
86
|
-
* @param options Options including
|
|
79
|
+
* @param options Options including messageId and reactionType
|
|
87
80
|
* @returns Success indicator
|
|
88
81
|
* @throws ValidationError if parameters are invalid
|
|
89
82
|
* @throws ConfigurationError if authentication is not configured
|
|
@@ -92,7 +85,6 @@ export declare class ContentReactionService extends StreamTokenServiceBase {
|
|
|
92
85
|
* ```typescript
|
|
93
86
|
* // Remove a heart reaction
|
|
94
87
|
* await reactionService.removeContentReaction({
|
|
95
|
-
* tokenName: 'mytoken',
|
|
96
88
|
* messageId: 'msg-1703443200000-a1b2c3d4e5f6789012345678901234ab',
|
|
97
89
|
* reactionType: 'heart'
|
|
98
90
|
* });
|
|
@@ -104,13 +96,12 @@ export declare class ContentReactionService extends StreamTokenServiceBase {
|
|
|
104
96
|
*
|
|
105
97
|
* Convenience wrapper for addContentReaction specifically for chat messages.
|
|
106
98
|
*
|
|
107
|
-
* @param options Options including
|
|
99
|
+
* @param options Options including messageId and reactionType
|
|
108
100
|
* @returns Updated reaction data
|
|
109
101
|
*
|
|
110
102
|
* @example
|
|
111
103
|
* ```typescript
|
|
112
104
|
* await reactionService.addReactionToChatMessage({
|
|
113
|
-
* tokenName: 'mytoken',
|
|
114
105
|
* messageId: 'msg-1703443200000-a1b2c3d4e5f6789012345678901234ab',
|
|
115
106
|
* reactionType: 'fire'
|
|
116
107
|
* });
|
|
@@ -122,13 +113,12 @@ export declare class ContentReactionService extends StreamTokenServiceBase {
|
|
|
122
113
|
*
|
|
123
114
|
* Convenience wrapper for removeContentReaction specifically for chat messages.
|
|
124
115
|
*
|
|
125
|
-
* @param options Options including
|
|
116
|
+
* @param options Options including messageId and reactionType
|
|
126
117
|
* @returns Success indicator
|
|
127
118
|
*
|
|
128
119
|
* @example
|
|
129
120
|
* ```typescript
|
|
130
121
|
* await reactionService.removeReactionFromChatMessage({
|
|
131
|
-
* tokenName: 'mytoken',
|
|
132
122
|
* messageId: 'msg-1703443200000-a1b2c3d4e5f6789012345678901234ab',
|
|
133
123
|
* reactionType: 'fire'
|
|
134
124
|
* });
|
|
@@ -140,13 +130,12 @@ export declare class ContentReactionService extends StreamTokenServiceBase {
|
|
|
140
130
|
*
|
|
141
131
|
* Convenience wrapper for addContentReaction specifically for comments.
|
|
142
132
|
*
|
|
143
|
-
* @param options Options including
|
|
133
|
+
* @param options Options including messageId and reactionType
|
|
144
134
|
* @returns Updated reaction data
|
|
145
135
|
*
|
|
146
136
|
* @example
|
|
147
137
|
* ```typescript
|
|
148
138
|
* await reactionService.addReactionToComment({
|
|
149
|
-
* tokenName: 'mytoken',
|
|
150
139
|
* messageId: 'msg-1703443200000-a1b2c3d4e5f6789012345678901234ab',
|
|
151
140
|
* reactionType: 'thumbs_up'
|
|
152
141
|
* });
|
|
@@ -158,13 +147,12 @@ export declare class ContentReactionService extends StreamTokenServiceBase {
|
|
|
158
147
|
*
|
|
159
148
|
* Convenience wrapper for removeContentReaction specifically for comments.
|
|
160
149
|
*
|
|
161
|
-
* @param options Options including
|
|
150
|
+
* @param options Options including messageId and reactionType
|
|
162
151
|
* @returns Success indicator
|
|
163
152
|
*
|
|
164
153
|
* @example
|
|
165
154
|
* ```typescript
|
|
166
155
|
* await reactionService.removeReactionFromComment({
|
|
167
|
-
* tokenName: 'mytoken',
|
|
168
156
|
* messageId: 'msg-1703443200000-a1b2c3d4e5f6789012345678901234ab',
|
|
169
157
|
* reactionType: 'thumbs_up'
|
|
170
158
|
* });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentReactionService.d.ts","sourceRoot":"","sources":["../../src/services/ContentReactionService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG/C,OAAO,KAAK,EACV,yBAAyB,EACzB,wBAAwB,EAGS,4BAA4B,EAC7D,2BAA2B,EAAC,MAAM,gCAAgC,CAAC;AAKrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentReactionService.d.ts","sourceRoot":"","sources":["../../src/services/ContentReactionService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG/C,OAAO,KAAK,EACV,yBAAyB,EACzB,wBAAwB,EAGS,4BAA4B,EAC7D,2BAA2B,EAAC,MAAM,gCAAgC,CAAC;AAKrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,sBAAuB,SAAQ,sBAAsB;gBAE9D,IAAI,EAAE,UAAU,EAChB,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,OAAO,EACjB,SAAS,GAAE,OAAe,EAC1B,UAAU,CAAC,EAAE,MAAM;IASrB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAYzB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAc5B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IA6B/F;;;;;;;;;;;;;;;;;;;OAmBG;IACG,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,2BAA2B,CAAC;IA0BxG;;;;;;;;;;;;;;;OAeG;IACG,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAIrG;;;;;;;;;;;;;;;OAeG;IACG,6BAA6B,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAQhH;;;;;;;;;;;;;;;OAeG;IACG,oBAAoB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAIjG;;;;;;;;;;;;;;;OAeG;IACG,yBAAyB,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAG7G"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events Query Service
|
|
3
|
+
*
|
|
4
|
+
* Reads of stored events (`GET /v1/events`) and their aggregate statistics
|
|
5
|
+
* (`GET /v1/events/stats`). Both routes are Admin API key or Overseer (JWT) and answer a BARE body,
|
|
6
|
+
* not the `{ data }` envelope most routes use. Event submission is `EventsBatcherService`.
|
|
7
|
+
*
|
|
8
|
+
* @category Services
|
|
9
|
+
* @since 9.0.0
|
|
10
|
+
*/
|
|
11
|
+
import type { JwtAuth } from '../auth/JwtAuth';
|
|
12
|
+
import { type EventStats, type QueryEventsOptions, type QueryEventsResult } from '../types/events.dto';
|
|
13
|
+
import type { HttpClient } from '../utils/http';
|
|
14
|
+
import { StreamTokenServiceBase } from './StreamTokenServiceBase';
|
|
15
|
+
/**
|
|
16
|
+
* Reads stored events and their statistics (Admin API key or Overseer JWT).
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const events = new EventsQueryService(httpClient, undefined, jwtAuth);
|
|
21
|
+
* const stats = await events.getEventStats();
|
|
22
|
+
* const page = await events.queryEvents({ eventTypes: ['token_buy'], page: 1, limit: 50 });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare class EventsQueryService extends StreamTokenServiceBase {
|
|
26
|
+
constructor(http: HttpClient, adminApiKey?: string, jwtAuth?: JwtAuth, debugMode?: boolean, userApiKey?: string);
|
|
27
|
+
/**
|
|
28
|
+
* Aggregate event statistics for the dashboard cards.
|
|
29
|
+
*
|
|
30
|
+
* @throws ConfigurationError when neither an admin API key nor a JWT is configured
|
|
31
|
+
* @throws NetworkError when the request fails or the body is not the statistics shape
|
|
32
|
+
* @since 9.0.0
|
|
33
|
+
*/
|
|
34
|
+
getEventStats(): Promise<EventStats>;
|
|
35
|
+
/**
|
|
36
|
+
* One page of stored events (offset paging: `page`, `limit`).
|
|
37
|
+
*
|
|
38
|
+
* Only the filters given are sent. `eventTypes` / `categories` go as repeated array parameters.
|
|
39
|
+
*
|
|
40
|
+
* @throws ValidationError for a limit outside 1..100, a page below 1 or an unknown sort / preset / source
|
|
41
|
+
* @throws ConfigurationError when neither an admin API key nor a JWT is configured
|
|
42
|
+
* @throws NetworkError when the request fails or the body is not the events shape
|
|
43
|
+
* @since 9.0.0
|
|
44
|
+
*/
|
|
45
|
+
queryEvents(options?: QueryEventsOptions): Promise<QueryEventsResult>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=EventsQueryService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventsQueryService.d.ts","sourceRoot":"","sources":["../../src/services/EventsQueryService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAKL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AA2FlE;;;;;;;;;GASG;AACH,qBAAa,kBAAmB,SAAQ,sBAAsB;gBAE1D,IAAI,EAAE,UAAU,EAChB,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,OAAO,EACjB,SAAS,GAAE,OAAe,EAC1B,UAAU,CAAC,EAAE,MAAM;IAKrB;;;;;;OAMG;IACG,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC;IAK1C;;;;;;;;;OASG;IACG,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAwBhF"}
|
|
@@ -1,72 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GalaChain Balance Service
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* - Generic token balance queries
|
|
10
|
-
* - Hold filtering (locked, in-use)
|
|
11
|
-
* - Available quantity calculation
|
|
4
|
+
* Token balances from GalaChain. The read itself (the `FetchBalances` request, the answer's checks,
|
|
5
|
+
* the holds in force and their totals) is `@gala-chain/gala-core-sdk`'s `GatewayReads`; this
|
|
6
|
+
* service keeps the launchpad result shape (`TokenBalanceResult`, `null` for "not held") and error
|
|
7
|
+
* contract on top of it, and sends the read through the SDK's gateway `HttpClient` (its
|
|
8
|
+
* interceptors and `Sign` header) exactly as before.
|
|
12
9
|
*
|
|
13
10
|
* @example
|
|
14
11
|
* ```typescript
|
|
15
12
|
* const balanceService = new GalaChainBalanceService(http, debug);
|
|
16
13
|
*
|
|
17
|
-
* // Get GALA balance
|
|
18
14
|
* const galaBalance = await balanceService.fetchGalaBalance({
|
|
19
15
|
* owner: "eth|1234567890abcdef1234567890abcdef12345678",
|
|
20
16
|
* collection: "GALA",
|
|
21
17
|
* category: "Unit",
|
|
22
18
|
* additionalKey: "none",
|
|
23
19
|
* type: "none",
|
|
24
|
-
* instance: "0"
|
|
25
20
|
* });
|
|
26
21
|
*
|
|
27
|
-
* //
|
|
22
|
+
* // Any token, with expired holds kept
|
|
28
23
|
* const tokenBalance = await balanceService.fetchTokenBalance({
|
|
29
24
|
* owner: "eth|...",
|
|
30
25
|
* collection: "ANIME",
|
|
31
26
|
* category: "Unit",
|
|
32
27
|
* additionalKey: "none",
|
|
33
28
|
* type: "none",
|
|
34
|
-
*
|
|
35
|
-
* }, true); // include expired holds
|
|
29
|
+
* }, true);
|
|
36
30
|
* ```
|
|
37
31
|
*
|
|
38
32
|
* @category Services
|
|
39
33
|
* @since 5.15.0
|
|
40
34
|
*/
|
|
41
|
-
import type { TokenBalanceResult
|
|
35
|
+
import type { TokenBalanceResult } from '../types/user.dto';
|
|
42
36
|
import type { HttpClient } from '../utils/http';
|
|
43
37
|
import { BaseService } from './BaseService';
|
|
44
38
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* @param holds Array of token holds
|
|
48
|
-
* @returns Total quantity as decimal string
|
|
49
|
-
*/
|
|
50
|
-
declare function sumHoldQuantities(holds: TokenHold[]): string;
|
|
51
|
-
/**
|
|
52
|
-
* Filter out expired holds based on current timestamp
|
|
53
|
-
*
|
|
54
|
-
* @param holds Array of token holds
|
|
55
|
-
* @param withExpired If true, return all holds including expired
|
|
56
|
-
* @returns Filtered array of holds
|
|
57
|
-
*/
|
|
58
|
-
declare function filterHolds(holds: TokenHold[], withExpired: boolean): TokenHold[];
|
|
59
|
-
/**
|
|
60
|
-
* Calculate available (unlocked, not in-use) quantity
|
|
61
|
-
*
|
|
62
|
-
* @param total Total quantity held
|
|
63
|
-
* @param locked Quantity locked (from lockedHolds)
|
|
64
|
-
* @param inUse Quantity in use (from inUseHolds)
|
|
65
|
-
* @returns Available quantity as decimal string
|
|
66
|
-
*/
|
|
67
|
-
declare function calculateAvailableQuantity(total: string, locked?: string, inUse?: string): string;
|
|
68
|
-
/**
|
|
69
|
-
* Balance query request parameters
|
|
39
|
+
* Balance query request parameters: the owner and the token class. (The chain's `FetchBalances`
|
|
40
|
+
* takes no instance: a body that names one is refused.)
|
|
70
41
|
*/
|
|
71
42
|
export interface BalanceQueryParams {
|
|
72
43
|
owner: string;
|
|
@@ -74,7 +45,6 @@ export interface BalanceQueryParams {
|
|
|
74
45
|
category: string;
|
|
75
46
|
additionalKey: string;
|
|
76
47
|
type: string;
|
|
77
|
-
instance: string;
|
|
78
48
|
}
|
|
79
49
|
/**
|
|
80
50
|
* GalaChain Balance Service
|
|
@@ -89,67 +59,25 @@ export declare class GalaChainBalanceService extends BaseService {
|
|
|
89
59
|
* @param debug - Enable debug logging (default: false)
|
|
90
60
|
*/
|
|
91
61
|
constructor(http: HttpClient, debug?: boolean);
|
|
92
|
-
/**
|
|
93
|
-
* Determines the GalaChain channel for a given token collection.
|
|
94
|
-
* Most tokens are on the asset channel, but some tokens like MUSIC
|
|
95
|
-
* are on their own dedicated channels.
|
|
96
|
-
*
|
|
97
|
-
* @param collection - Token collection name (e.g., "$GMUSIC", "$MUSIC", "ANIME")
|
|
98
|
-
* @returns Channel name: 'asset', 'music', etc.
|
|
99
|
-
*/
|
|
100
|
-
private getChannelForCollection;
|
|
101
62
|
/**
|
|
102
63
|
* Fetches GALA balance for a user from GalaChain
|
|
103
64
|
*
|
|
104
|
-
* Uses the GalaChain FetchBalances endpoint with GALA token parameters.
|
|
105
|
-
*
|
|
106
65
|
* @param requestBody Balance query parameters
|
|
107
66
|
* @returns Promise<TokenBalanceResult | null> Clean balance information or null if not held
|
|
108
|
-
* @throws
|
|
109
|
-
*
|
|
110
|
-
* @example
|
|
111
|
-
* ```typescript
|
|
112
|
-
* const balance = await balanceService.fetchGalaBalance({
|
|
113
|
-
* owner: "eth|1234567890abcdef1234567890abcdef12345678",
|
|
114
|
-
* collection: "GALA",
|
|
115
|
-
* category: "Unit",
|
|
116
|
-
* additionalKey: "none",
|
|
117
|
-
* type: "none",
|
|
118
|
-
* instance: "0"
|
|
119
|
-
* });
|
|
120
|
-
* ```
|
|
67
|
+
* @throws NetworkError if balance fetch fails
|
|
121
68
|
*/
|
|
122
69
|
fetchGalaBalance(requestBody: BalanceQueryParams): Promise<TokenBalanceResult | null>;
|
|
123
70
|
/**
|
|
124
|
-
* Fetches token balance for any token from GalaChain
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* Returns balance information including locked/in-use holds and computed available quantity.
|
|
71
|
+
* Fetches token balance for any token from GalaChain (`FetchBalances`), with the holds in force
|
|
72
|
+
* (locked, in use) and the quantity they leave available. MUSIC (`$MUSIC`) is read on the
|
|
73
|
+
* gateway's music channel, every other token on the asset channel.
|
|
128
74
|
*
|
|
129
75
|
* @param requestBody Balance query parameters
|
|
130
76
|
* @param withExpired If true, include expired holds in results (default: false)
|
|
131
|
-
* @returns Promise<TokenBalanceResult | null>
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* @example
|
|
135
|
-
* ```typescript
|
|
136
|
-
* const balance = await balanceService.fetchTokenBalance({
|
|
137
|
-
* owner: "eth|1234567890abcdef1234567890abcdef12345678",
|
|
138
|
-
* collection: "ANIME",
|
|
139
|
-
* category: "Unit",
|
|
140
|
-
* additionalKey: "none",
|
|
141
|
-
* type: "none",
|
|
142
|
-
* instance: "0"
|
|
143
|
-
* });
|
|
144
|
-
*
|
|
145
|
-
* // Check lock details
|
|
146
|
-
* if (balance?.lockedHolds?.length) {
|
|
147
|
-
* console.log('Locked:', balance.lockedQuantity);
|
|
148
|
-
* console.log('Available:', balance.availableQuantity);
|
|
149
|
-
* }
|
|
150
|
-
* ```
|
|
77
|
+
* @returns Promise<TokenBalanceResult | null> The balance, or null when it is not held (no record,
|
|
78
|
+
* a zero quantity, or a gateway answer that is not a usable balance list)
|
|
79
|
+
* @throws NetworkError if the request fails (HTTP error, network) or the owner is not a GalaChain user
|
|
151
80
|
*/
|
|
152
81
|
fetchTokenBalance(requestBody: BalanceQueryParams, withExpired?: boolean): Promise<TokenBalanceResult | null>;
|
|
153
82
|
}
|
|
154
|
-
export { calculateAvailableQuantity, filterHolds, sumHoldQuantities };
|
|
155
83
|
//# sourceMappingURL=GalaChainBalanceService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GalaChainBalanceService.d.ts","sourceRoot":"","sources":["../../src/services/GalaChainBalanceService.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"GalaChainBalanceService.d.ts","sourceRoot":"","sources":["../../src/services/GalaChainBalanceService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAQH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAgCD;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,WAAW;IACtD;;;;;OAKG;gBACS,IAAI,EAAE,UAAU,EAAE,KAAK,GAAE,OAAe;IAIpD;;;;;;OAMG;IACG,gBAAgB,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;IAI3F;;;;;;;;;;OAUG;IACG,iBAAiB,CACrB,WAAW,EAAE,kBAAkB,EAC/B,WAAW,GAAE,OAAe,GAC3B,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;CAsBtC"}
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* Service responsible for token locking and unlocking operations on GalaChain.
|
|
5
5
|
* Extracted from GalaChainService for single responsibility.
|
|
6
6
|
*
|
|
7
|
+
* The writes themselves are `@gala-chain/gala-core-sdk`'s `GatewayWrites` (DTO, signature, the
|
|
8
|
+
* POST and the reading of GalaChain's answer); this service keeps the launchpad API on top of it:
|
|
9
|
+
* its input checks, launchpad token-name resolution, its result shapes and its error classes.
|
|
10
|
+
*
|
|
7
11
|
* Features:
|
|
8
12
|
* - Batch token locking (staking, escrow, vesting)
|
|
9
13
|
* - Batch token unlocking
|
|
@@ -32,29 +36,14 @@
|
|
|
32
36
|
* @since 5.15.0
|
|
33
37
|
*/
|
|
34
38
|
import '../utils/errors';
|
|
35
|
-
import type { Wallet } from 'ethers';
|
|
36
39
|
import type { LockTokensData, LockTokensResult, UnlockTokensData, UnlockTokensResult } from '../types/lock.dto';
|
|
37
|
-
import
|
|
38
|
-
import { BaseService } from './BaseService';
|
|
39
|
-
import type { TokenResolverService } from './TokenResolverService';
|
|
40
|
+
import { GatewayWriteService } from './gateway-writes';
|
|
40
41
|
/**
|
|
41
42
|
* GalaChain Lock Service
|
|
42
43
|
*
|
|
43
44
|
* Handles all token locking and unlocking operations on GalaChain.
|
|
44
45
|
*/
|
|
45
|
-
export declare class GalaChainLockService extends
|
|
46
|
-
private readonly wallet;
|
|
47
|
-
private readonly tokenResolver;
|
|
48
|
-
private readonly nativeSigner;
|
|
49
|
-
/**
|
|
50
|
-
* Initialize GalaChain Lock Service
|
|
51
|
-
*
|
|
52
|
-
* @param http - HTTP client configured for GalaChain gateway
|
|
53
|
-
* @param wallet - Ethers wallet for signing transactions (optional for read-only operations)
|
|
54
|
-
* @param tokenResolver - Token resolver service for vault address resolution
|
|
55
|
-
* @param debug - Enable debug logging (default: false)
|
|
56
|
-
*/
|
|
57
|
-
constructor(http: HttpClient, wallet: Wallet | undefined, tokenResolver: TokenResolverService, debug?: boolean);
|
|
46
|
+
export declare class GalaChainLockService extends GatewayWriteService {
|
|
58
47
|
/**
|
|
59
48
|
* Lock tokens on GalaChain (batch operation)
|
|
60
49
|
*
|
|
@@ -64,7 +53,7 @@ export declare class GalaChainLockService extends BaseService {
|
|
|
64
53
|
* or other hold scenarios.
|
|
65
54
|
*
|
|
66
55
|
* @param data - Lock parameters containing array of tokens to lock
|
|
67
|
-
* @returns LockTokensResult with transaction ID and locked token details
|
|
56
|
+
* @returns LockTokensResult with transaction ID, block (when the gateway sends it) and locked token details
|
|
68
57
|
*
|
|
69
58
|
* @example
|
|
70
59
|
* ```typescript
|
|
@@ -94,7 +83,7 @@ export declare class GalaChainLockService extends BaseService {
|
|
|
94
83
|
* or was designated as lock authority).
|
|
95
84
|
*
|
|
96
85
|
* @param data - Unlock parameters containing array of tokens to unlock
|
|
97
|
-
* @returns UnlockTokensResult with transaction ID and unlocked token details
|
|
86
|
+
* @returns UnlockTokensResult with transaction ID, block (when the gateway sends it) and unlocked token details
|
|
98
87
|
*
|
|
99
88
|
* @example
|
|
100
89
|
* ```typescript
|
|
@@ -115,6 +104,12 @@ export declare class GalaChainLockService extends BaseService {
|
|
|
115
104
|
* @throws {LockError} When validation fails or unlock operation is rejected
|
|
116
105
|
*/
|
|
117
106
|
unlockTokens(data: UnlockTokensData): Promise<UnlockTokensResult>;
|
|
107
|
+
/**
|
|
108
|
+
* GalaChain's answer to a lock or unlock must carry `Status: 1`. Called with every answer, the
|
|
109
|
+
* ones core accepted and the ones it refused, so a refused answer is reported exactly as this
|
|
110
|
+
* service always reported it.
|
|
111
|
+
*/
|
|
112
|
+
private assertLockAnswer;
|
|
118
113
|
private validateSharedTokenEntry;
|
|
119
114
|
/**
|
|
120
115
|
* Validate lock tokens data (batch operation)
|
|
@@ -124,6 +119,11 @@ export declare class GalaChainLockService extends BaseService {
|
|
|
124
119
|
* Validate unlock tokens data (batch operation)
|
|
125
120
|
*/
|
|
126
121
|
private validateUnlockTokensData;
|
|
122
|
+
/**
|
|
123
|
+
* The transaction id of a lock or unlock: the gateway's `x-transaction-id` (core's receipt),
|
|
124
|
+
* else the first `Data` item's id.
|
|
125
|
+
*/
|
|
126
|
+
private transactionIdOf;
|
|
127
127
|
/**
|
|
128
128
|
* Extract lock result from GalaChain response
|
|
129
129
|
*/
|
|
@@ -142,6 +142,5 @@ export declare class GalaChainLockService extends BaseService {
|
|
|
142
142
|
*/
|
|
143
143
|
private resolveTokenInstance;
|
|
144
144
|
private resolveTokenEntry;
|
|
145
|
-
private createTokenOperationContext;
|
|
146
145
|
}
|
|
147
146
|
//# sourceMappingURL=GalaChainLockService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GalaChainLockService.d.ts","sourceRoot":"","sources":["../../src/services/GalaChainLockService.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"GalaChainLockService.d.ts","sourceRoot":"","sources":["../../src/services/GalaChainLockService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EAGV,cAAc,EACd,gBAAgB,EAIhB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAqB3B,OAAO,EAEL,mBAAmB,EAIpB,MAAM,kBAAkB,CAAC;AAY1B;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,mBAAmB;IAG3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA+EjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAkEvE;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,wBAAwB;IAkChC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA2C9B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAsBhC;;;OAGG;IACH,OAAO,CAAC,eAAe;IAevB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAezB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAe3B;;OAEG;IACH,OAAO,CAAC,eAAe;IAwDvB;;;OAGG;YACW,oBAAoB;YAqBpB,iBAAiB;CAchC"}
|