@gala-chain/launchpad-sdk 8.1.0 → 9.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/CHANGELOG.md +362 -0
  2. package/EXAMPLES.md +95 -681
  3. package/MIGRATING-TO-9.0.md +301 -0
  4. package/README.md +46 -17
  5. package/dist/LaunchpadSDK.d.ts +138 -413
  6. package/dist/LaunchpadSDK.d.ts.map +1 -1
  7. package/dist/api/LaunchpadAPI.d.ts +5 -37
  8. package/dist/api/LaunchpadAPI.d.ts.map +1 -1
  9. package/dist/auth/SignatureAuth.d.ts +2 -2
  10. package/dist/auth/SignatureAuth.d.ts.map +1 -1
  11. package/dist/auth/types.d.ts +1 -1
  12. package/dist/auth/types.d.ts.map +1 -1
  13. package/dist/config/environments.d.ts +7 -2
  14. package/dist/config/environments.d.ts.map +1 -1
  15. package/dist/constants/decimals.d.ts +0 -23
  16. package/dist/constants/decimals.d.ts.map +1 -1
  17. package/dist/constants/endpoints.d.ts +0 -7
  18. package/dist/constants/endpoints.d.ts.map +1 -1
  19. package/dist/constants/version.generated.d.ts +1 -1
  20. package/dist/constants/version.generated.d.ts.map +1 -1
  21. package/dist/helpers/sdk.d.ts.map +1 -1
  22. package/dist/index.browser.d.ts +8 -22
  23. package/dist/index.browser.d.ts.map +1 -1
  24. package/dist/index.browser.esm.js +1 -1
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.esm.js +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/index.node.d.ts +4 -5
  29. package/dist/index.node.d.ts.map +1 -1
  30. package/dist/launchpad/bundle-submission.d.ts +1 -9
  31. package/dist/launchpad/bundle-submission.d.ts.map +1 -1
  32. package/dist/launchpad/transport.d.ts +2 -1
  33. package/dist/launchpad/transport.d.ts.map +1 -1
  34. package/dist/native.cjs +1 -1
  35. package/dist/native.d.ts +3 -4
  36. package/dist/native.d.ts.map +1 -1
  37. package/dist/native.esm.js +1 -1
  38. package/dist/schemas/user.d.ts +0 -15
  39. package/dist/schemas/user.d.ts.map +1 -1
  40. package/dist/services/AbstractCacheService.d.ts +2 -2
  41. package/dist/services/GalaChainBalanceService.d.ts +17 -89
  42. package/dist/services/GalaChainBalanceService.d.ts.map +1 -1
  43. package/dist/services/GalaChainLockService.d.ts +19 -20
  44. package/dist/services/GalaChainLockService.d.ts.map +1 -1
  45. package/dist/services/GalaChainService.d.ts +28 -15
  46. package/dist/services/GalaChainService.d.ts.map +1 -1
  47. package/dist/services/GalaChainTokenService.d.ts +25 -53
  48. package/dist/services/GalaChainTokenService.d.ts.map +1 -1
  49. package/dist/services/GalaChainTransferService.d.ts +42 -41
  50. package/dist/services/GalaChainTransferService.d.ts.map +1 -1
  51. package/dist/services/LaunchpadPriceService.d.ts +66 -0
  52. package/dist/services/LaunchpadPriceService.d.ts.map +1 -0
  53. package/dist/services/NftCollectionService.d.ts +22 -6
  54. package/dist/services/NftCollectionService.d.ts.map +1 -1
  55. package/dist/services/TokenResolverService.d.ts +5 -5
  56. package/dist/services/TokenResolverService.d.ts.map +1 -1
  57. package/dist/services/gateway-transport.d.ts +32 -0
  58. package/dist/services/gateway-transport.d.ts.map +1 -0
  59. package/dist/services/gateway-writes.d.ts +83 -0
  60. package/dist/services/gateway-writes.d.ts.map +1 -0
  61. package/dist/signing/index.d.ts +2 -3
  62. package/dist/signing/index.d.ts.map +1 -1
  63. package/dist/signing/signers.d.ts +7 -8
  64. package/dist/signing/signers.d.ts.map +1 -1
  65. package/dist/signing/types.d.ts +7 -10
  66. package/dist/signing/types.d.ts.map +1 -1
  67. package/dist/types/burn.dto.d.ts +4 -2
  68. package/dist/types/burn.dto.d.ts.map +1 -1
  69. package/dist/types/common.d.ts +2 -23
  70. package/dist/types/common.d.ts.map +1 -1
  71. package/dist/types/dto.d.ts +0 -5
  72. package/dist/types/dto.d.ts.map +1 -1
  73. package/dist/types/launchpad.dto.d.ts +0 -257
  74. package/dist/types/launchpad.dto.d.ts.map +1 -1
  75. package/dist/types/lock.dto.d.ts +12 -7
  76. package/dist/types/lock.dto.d.ts.map +1 -1
  77. package/dist/types/options.dto.d.ts +8 -34
  78. package/dist/types/options.dto.d.ts.map +1 -1
  79. package/dist/types/user.dto.d.ts +7 -62
  80. package/dist/types/user.dto.d.ts.map +1 -1
  81. package/dist/utils/address-formatter.d.ts +10 -2
  82. package/dist/utils/address-formatter.d.ts.map +1 -1
  83. package/dist/utils/agent-config.d.ts +9 -4
  84. package/dist/utils/agent-config.d.ts.map +1 -1
  85. package/dist/utils/auto-pagination.d.ts +6 -239
  86. package/dist/utils/auto-pagination.d.ts.map +1 -1
  87. package/dist/utils/bignumber-helpers.d.ts +3 -2
  88. package/dist/utils/bignumber-helpers.d.ts.map +1 -1
  89. package/dist/utils/delimiter-parser.d.ts +0 -13
  90. package/dist/utils/delimiter-parser.d.ts.map +1 -1
  91. package/dist/utils/error-patterns.d.ts +0 -47
  92. package/dist/utils/error-patterns.d.ts.map +1 -1
  93. package/dist/utils/error-wrapper.d.ts +5 -5
  94. package/dist/utils/errors.d.ts +0 -308
  95. package/dist/utils/errors.d.ts.map +1 -1
  96. package/dist/utils/http.d.ts +15 -3
  97. package/dist/utils/http.d.ts.map +1 -1
  98. package/dist/utils/token-format-converter.d.ts +1 -1
  99. package/dist/utils/token-parser.d.ts +6 -127
  100. package/dist/utils/token-parser.d.ts.map +1 -1
  101. package/dist/utils/token-stringification.d.ts +7 -7
  102. package/dist/utils/token-stringification.d.ts.map +1 -1
  103. package/dist/utils/tokenNameNormalizer.d.ts +2 -2
  104. package/dist/utils/tokenNormalizer.d.ts +5 -29
  105. package/dist/utils/tokenNormalizer.d.ts.map +1 -1
  106. package/dist/utils/unique-key-generator.d.ts +7 -134
  107. package/dist/utils/unique-key-generator.d.ts.map +1 -1
  108. package/dist/utils/validation-helpers.d.ts +3 -5
  109. package/dist/utils/validation-helpers.d.ts.map +1 -1
  110. package/package.json +47 -87
  111. package/dist/api/dto/BurnTokensDto.d.ts +0 -77
  112. package/dist/api/dto/BurnTokensDto.d.ts.map +0 -1
  113. package/dist/api/dto/LockTokenDto.d.ts +0 -85
  114. package/dist/api/dto/LockTokenDto.d.ts.map +0 -1
  115. package/dist/api/dto/TransferTokenDto.d.ts +0 -64
  116. package/dist/api/dto/TransferTokenDto.d.ts.map +0 -1
  117. package/dist/api/dto/UnlockTokenDto.d.ts +0 -74
  118. package/dist/api/dto/UnlockTokenDto.d.ts.map +0 -1
  119. package/dist/bridge/BridgeService.d.ts +0 -484
  120. package/dist/bridge/BridgeService.d.ts.map +0 -1
  121. package/dist/bridge/GalaConnectClient.d.ts +0 -170
  122. package/dist/bridge/GalaConnectClient.d.ts.map +0 -1
  123. package/dist/bridge/constants/index.d.ts +0 -7
  124. package/dist/bridge/constants/index.d.ts.map +0 -1
  125. package/dist/bridge/constants/tokens.d.ts +0 -212
  126. package/dist/bridge/constants/tokens.d.ts.map +0 -1
  127. package/dist/bridge/index.d.ts +0 -24
  128. package/dist/bridge/index.d.ts.map +0 -1
  129. package/dist/bridge/public-types.d.ts +0 -2
  130. package/dist/bridge/public-types.d.ts.map +0 -1
  131. package/dist/bridge/strategies/BridgeStrategy.d.ts +0 -204
  132. package/dist/bridge/strategies/BridgeStrategy.d.ts.map +0 -1
  133. package/dist/bridge/strategies/EthereumBridgeStrategy.d.ts +0 -178
  134. package/dist/bridge/strategies/EthereumBridgeStrategy.d.ts.map +0 -1
  135. package/dist/bridge/strategies/SolanaBridgeStrategy.d.ts +0 -236
  136. package/dist/bridge/strategies/SolanaBridgeStrategy.d.ts.map +0 -1
  137. package/dist/bridge/types/bridge.dto.d.ts +0 -772
  138. package/dist/bridge/types/bridge.dto.d.ts.map +0 -1
  139. package/dist/bridge/types/bridgeable-token.dto.d.ts +0 -209
  140. package/dist/bridge/types/bridgeable-token.dto.d.ts.map +0 -1
  141. package/dist/bridge/types/eip712.d.ts +0 -66
  142. package/dist/bridge/types/eip712.d.ts.map +0 -1
  143. package/dist/bridge/types/index.d.ts +0 -8
  144. package/dist/bridge/types/index.d.ts.map +0 -1
  145. package/dist/bridge/utils/RateLimiter.d.ts +0 -34
  146. package/dist/bridge/utils/RateLimiter.d.ts.map +0 -1
  147. package/dist/bridge/utils/address-formatter.d.ts +0 -25
  148. package/dist/bridge/utils/address-formatter.d.ts.map +0 -1
  149. package/dist/bridge/utils/addressValidation.d.ts +0 -200
  150. package/dist/bridge/utils/addressValidation.d.ts.map +0 -1
  151. package/dist/bridge/utils/balanceHelpers.d.ts +0 -215
  152. package/dist/bridge/utils/balanceHelpers.d.ts.map +0 -1
  153. package/dist/bridge/utils/bridgeErrors.d.ts +0 -98
  154. package/dist/bridge/utils/bridgeErrors.d.ts.map +0 -1
  155. package/dist/bridge/utils/bridgeOutHelpers.d.ts +0 -68
  156. package/dist/bridge/utils/bridgeOutHelpers.d.ts.map +0 -1
  157. package/dist/bridge/utils/bridgePayload.d.ts +0 -98
  158. package/dist/bridge/utils/bridgePayload.d.ts.map +0 -1
  159. package/dist/bridge/utils/bridgeStatusParser.d.ts +0 -76
  160. package/dist/bridge/utils/bridgeStatusParser.d.ts.map +0 -1
  161. package/dist/bridge/utils/eip712Helpers.d.ts +0 -66
  162. package/dist/bridge/utils/eip712Helpers.d.ts.map +0 -1
  163. package/dist/bridge/utils/index.d.ts +0 -19
  164. package/dist/bridge/utils/index.d.ts.map +0 -1
  165. package/dist/bridge/utils/retry.d.ts +0 -112
  166. package/dist/bridge/utils/retry.d.ts.map +0 -1
  167. package/dist/bridge/utils/strategyDelegation.d.ts +0 -126
  168. package/dist/bridge/utils/strategyDelegation.d.ts.map +0 -1
  169. package/dist/bridge/utils/tokenIdUtils.d.ts +0 -86
  170. package/dist/bridge/utils/tokenIdUtils.d.ts.map +0 -1
  171. package/dist/bridge/utils/tokenMath.d.ts +0 -39
  172. package/dist/bridge/utils/tokenMath.d.ts.map +0 -1
  173. package/dist/bridge/utils/tokenMetadataResolver.d.ts +0 -97
  174. package/dist/bridge/utils/tokenMetadataResolver.d.ts.map +0 -1
  175. package/dist/helpers/wallet.d.ts +0 -151
  176. package/dist/helpers/wallet.d.ts.map +0 -1
  177. package/dist/react/WalletContext.d.ts +0 -60
  178. package/dist/react/WalletContext.d.ts.map +0 -1
  179. package/dist/react/index.d.ts +0 -65
  180. package/dist/react/index.d.ts.map +0 -1
  181. package/dist/react/types.d.ts +0 -76
  182. package/dist/react/types.d.ts.map +0 -1
  183. package/dist/react/useWallet.d.ts +0 -123
  184. package/dist/react/useWallet.d.ts.map +0 -1
  185. package/dist/react/useWalletConnection.d.ts +0 -89
  186. package/dist/react/useWalletConnection.d.ts.map +0 -1
  187. package/dist/react/useWalletDetection.d.ts +0 -81
  188. package/dist/react/useWalletDetection.d.ts.map +0 -1
  189. package/dist/react.cjs +0 -1
  190. package/dist/react.esm.js +0 -1
  191. package/dist/services/AbstractTokenFetchService.d.ts +0 -150
  192. package/dist/services/AbstractTokenFetchService.d.ts.map +0 -1
  193. package/dist/services/BatchedCacheService.d.ts +0 -133
  194. package/dist/services/BatchedCacheService.d.ts.map +0 -1
  195. package/dist/services/BridgeableTokenCache.d.ts +0 -120
  196. package/dist/services/BridgeableTokenCache.d.ts.map +0 -1
  197. package/dist/services/BridgeableTokenService.d.ts +0 -218
  198. package/dist/services/BridgeableTokenService.d.ts.map +0 -1
  199. package/dist/services/DexService.d.ts +0 -440
  200. package/dist/services/DexService.d.ts.map +0 -1
  201. package/dist/services/NetworkKeyedCacheService.d.ts +0 -185
  202. package/dist/services/NetworkKeyedCacheService.d.ts.map +0 -1
  203. package/dist/services/PriceHistoryService.d.ts +0 -209
  204. package/dist/services/PriceHistoryService.d.ts.map +0 -1
  205. package/dist/services/WrapService.d.ts +0 -171
  206. package/dist/services/WrapService.d.ts.map +0 -1
  207. package/dist/services/WrappableTokenCache.d.ts +0 -100
  208. package/dist/services/WrappableTokenCache.d.ts.map +0 -1
  209. package/dist/services/WrappableTokenService.d.ts +0 -130
  210. package/dist/services/WrappableTokenService.d.ts.map +0 -1
  211. package/dist/setup.d.ts +0 -8
  212. package/dist/setup.d.ts.map +0 -1
  213. package/dist/tokens/transfers.d.ts +0 -95
  214. package/dist/tokens/transfers.d.ts.map +0 -1
  215. package/dist/types/galachain-api.types.d.ts +0 -297
  216. package/dist/types/galachain-api.types.d.ts.map +0 -1
  217. package/dist/types/priceHistory.dto.d.ts +0 -134
  218. package/dist/types/priceHistory.dto.d.ts.map +0 -1
  219. package/dist/types/token.types.d.ts +0 -359
  220. package/dist/types/token.types.d.ts.map +0 -1
  221. package/dist/types/wrappable-token.dto.d.ts +0 -305
  222. package/dist/types/wrappable-token.dto.d.ts.map +0 -1
  223. package/dist/utils/crypto-compat.d.ts +0 -40
  224. package/dist/utils/crypto-compat.d.ts.map +0 -1
  225. package/dist/utils/load-env.d.ts +0 -31
  226. package/dist/utils/load-env.d.ts.map +0 -1
  227. package/dist/utils/token-instance-key.d.ts +0 -57
  228. package/dist/utils/token-instance-key.d.ts.map +0 -1
  229. package/dist/utils/wallet.d.ts +0 -166
  230. package/dist/utils/wallet.d.ts.map +0 -1
  231. package/dist/wallet/ExternalWalletProvider.d.ts +0 -90
  232. package/dist/wallet/ExternalWalletProvider.d.ts.map +0 -1
  233. package/dist/wallet/GalaWalletProvider.d.ts +0 -122
  234. package/dist/wallet/GalaWalletProvider.d.ts.map +0 -1
  235. package/dist/wallet/PrivateKeyProvider.d.ts +0 -90
  236. package/dist/wallet/PrivateKeyProvider.d.ts.map +0 -1
  237. package/dist/wallet/detection.d.ts +0 -107
  238. package/dist/wallet/detection.d.ts.map +0 -1
  239. package/dist/wallet/event-handlers.d.ts +0 -50
  240. package/dist/wallet/event-handlers.d.ts.map +0 -1
  241. package/dist/wallet/index.d.ts +0 -51
  242. package/dist/wallet/index.d.ts.map +0 -1
  243. package/dist/wallet/signing-operation.d.ts +0 -19
  244. package/dist/wallet/signing-operation.d.ts.map +0 -1
  245. package/dist/wallet/typed-data-helpers.d.ts +0 -68
  246. package/dist/wallet/typed-data-helpers.d.ts.map +0 -1
  247. package/dist/wallet/types.d.ts +0 -267
  248. package/dist/wallet/types.d.ts.map +0 -1
  249. package/dist/wallet/utils.d.ts +0 -117
  250. package/dist/wallet/utils.d.ts.map +0 -1
  251. package/dist/wallet.cjs +0 -1
  252. package/dist/wallet.esm.js +0 -1
@@ -1,14 +1,11 @@
1
+ import type { GalaChainTokenClass, GalaChainTokenDetails, GalaChainTokenClassKey, HttpRequestor } from '@gala-chain/gala-core-sdk';
2
+ 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
3
  import { Wallet } from 'ethers';
2
- import { GSwap } from '@gala-chain/gswap-sdk';
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
4
  import type { Environment } from './config/environments';
6
5
  import { EventsBatcherService } from './services/EventsBatcherService';
7
6
  import type { StreamEventCallbacks } from './services/StreamWebSocketService';
8
7
  import { LaunchpadWrites } from './launchpad/writes';
9
- import type { HttpRequestor } from './launchpad/bundle-submission';
10
8
  import type { LaunchpadSigner } from './signing';
11
- import { TokenWrites } from './tokens/transfers';
12
9
  import type { GetAIModerationOptions, GetAIModerationResult, GetAIModerationSettingsResult, GetAIModerationStatusResult, TriggerAIModerationOptions, TriggerAIModerationResult, UpdateAIModerationSettingsOptions, UpdateAIModerationSettingsResult } from './types/ai-moderation.dto';
13
10
  import type { ApiKeyData, ApiKeyListResponse, CreateApiKeyOptions, CreateApiKeyResponse, ListApiKeysOptions, UpdateApiKeyOptions } from './types/api-key.dto';
14
11
  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,11 +14,11 @@ import type { FlushResult } from './types/cache-management.dto';
17
14
  import type { CreateChatMessageOptions, CreateChatMessageResult, GetChatMessagesOptions, GetChatMessagesResult, UpdateChatMessageOptions, UpdateChatMessageResult } from './types/chat-messages.dto';
18
15
  import type { GetClientFlagsResult } from './types/client-config.dto';
19
16
  import type { CommentsResult, CreateCommentOptions, CreateCommentResult, DeleteCommentResult, GetCommentsOptions, UpdateCommentOptions, UpdateCommentResult } from './types/comments.dto';
20
- import type { AddressFormat, ApiResponse, SDKConfig, TokenClassKey, TokenId } from './types/common';
17
+ import type { AddressFormat, ApiResponse, SDKConfig, TokenId } from './types/common';
21
18
  import type { ActionFlagOptions, ActionFlagResult, CreateFlagOptions, CreateFlagResult, DismissFlagOptions, DismissFlagResult, FlagListResult, ListFlagsOptions, ListGlobalFlagsOptions } from './types/content-flag.dto';
22
19
  import type { AddContentReactionOptions, AddContentReactionResult, RemoveContentReactionOptions, RemoveContentReactionResult } from './types/content-reactions.dto';
23
20
  import type { FetchTokenStatsResult } from './types/engagement-stats.dto';
24
- import type { AmountCalculationResult, DexAggregatedVolumeSummary, DexSeason, FetchPoolsOptions, GalaChainTokenDetails, GraduationCalculationResult, GraphDataResult, LaunchTokenData, LeaderboardResult, PoolData, PoolsResult, SaleDetailsResult, TokenClassWithSupply, TokenDistributionResult, TokenHolder, TokenSpotPrice, TradeQuoteParams, UserHolderContext, ValidateTokenResponse } from './types/launchpad.dto';
21
+ import type { AmountCalculationResult, FetchPoolsOptions, GraduationCalculationResult, GraphDataResult, LaunchTokenData, PoolData, PoolsResult, SaleDetailsResult, TokenDistributionResult, TokenHolder, TokenSpotPrice, TradeQuoteParams, UserHolderContext, ValidateTokenResponse } from './types/launchpad.dto';
25
22
  import type { LockTokensData, LockTokensResult, UnlockTokensData, UnlockTokensResult } from './types/lock.dto';
26
23
  import type { CreateMessageOptions, CreateMessageResult, DeleteMessageResult, FetchMessagesOptions, FetchMessagesResult, GetPinnedMessageResult, MessageStats, PinMessageResult, UpdateMessageOptions, UpdateMessageResult, UpdateTokenConfigOptions } from './types/messages.dto';
27
24
  import type { TokenConfigData } from './types/token-config.dto';
@@ -45,12 +42,10 @@ import type { BalanceUpdatedPayload, ChatMessagePayload, ChatStatusPayload, Conn
45
42
  import type { EngagementStatsUpdatedEvent } from './types/websocket-events.dto';
46
43
  import type { CommentCreatedEvent, HolderCountUpdatedEvent, ModeratorAddedEvent, PoolMetadataUpdatedEvent, TokenBannedEvent, TradeExecutedEvent } from './types/websocket-events.dto';
47
44
  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
45
  import { TransactionFailedError, WebSocketError, WebSocketTimeoutError } from './utils/websocket-errors';
50
- import type { WalletProvider } from './wallet/types';
46
+ import { type WalletProvider } from '@gala-chain/gala-core-sdk/providers';
51
47
  export { TransactionFailedError, WebSocketError, WebSocketTimeoutError, };
52
48
  import type { BuyTokenOptions, CalculateBuyAmountForGraduationOptions, CalculateBuyAmountLocalOptions, CalculateBuyAmountOptions, CalculateSellAmountLocalOptions, CalculateSellAmountOptions, FetchTokensCreatedOptions, FetchTokensHeldOptions, FetchTokenSpotPriceParams, FetchTradesOptions, FetchVolumeDataOptions, GraduateTokenOptions, SellTokenOptions, UploadImageByTokenNameOptions } from './types/options.dto';
53
- import type { FetchPriceHistoryOptions, PriceHistoryResult } from './types/priceHistory.dto';
54
49
  import type { GetPinnedMessageResult as LegacyGetPinnedMessageResult, PinMessageResult as LegacyPinMessageResult, UnpinMessageResult as LegacyUnpinMessageResult } from './types/stream-chat.dto';
55
50
  import type { AvailableRolesResponse } from './types/streaming.dto';
56
51
  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';
@@ -131,7 +126,7 @@ export interface LaunchpadSDKConfig extends SDKConfig {
131
126
  *
132
127
  * @example Using private key (Node.js/CLI)
133
128
  * ```typescript
134
- * import { PrivateKeyProvider } from '@gala-chain/launchpad-sdk/wallet';
129
+ * import { PrivateKeyProvider } from '@gala-chain/gala-core-sdk/providers';
135
130
  *
136
131
  * const provider = new PrivateKeyProvider('0x...');
137
132
  * const sdk = new LaunchpadSDK({
@@ -142,7 +137,7 @@ export interface LaunchpadSDKConfig extends SDKConfig {
142
137
  *
143
138
  * @example Using browser wallet (React/Vue)
144
139
  * ```typescript
145
- * import { ExternalWalletProvider, detectWallets } from '@gala-chain/launchpad-sdk/wallet';
140
+ * import { ExternalWalletProvider, detectWallets } from '@gala-chain/gala-core-sdk/providers';
146
141
  *
147
142
  * const { wallets } = await detectWallets();
148
143
  * const provider = new ExternalWalletProvider(wallets[0].provider);
@@ -292,9 +287,15 @@ export declare class LaunchpadSDK {
292
287
  /** Default calculation mode for all amount calculations - 'local' for instant client-side bonding curve calculations */
293
288
  static readonly DEFAULT_CALCULATE_AMOUNT_MODE: 'local' | 'external';
294
289
  private wallet;
295
- private readonly galaChainAddressOverride;
296
- /** Declared identity: explicit `walletAddress`, else (without a wallet) the signer's own address. */
297
- private readonly signerWalletAddress;
290
+ /** Declared `galaChainAddress` (e.g. a `client|` alias): the construction key's, dropped when the wallet changes. */
291
+ private galaChainAddressOverride;
292
+ /**
293
+ * Declared identity: explicit `walletAddress`, else (without a wallet) the signer's own address.
294
+ * Dropped when the wallet changes (it named the construction key, not the new one).
295
+ */
296
+ private signerWalletAddress;
297
+ /** The token-write signer and identity of an SDK with no wallet (`{ signer, walletAddress }`). */
298
+ private tokenWriter;
298
299
  private readonly auth;
299
300
  private readonly jwtAuth;
300
301
  private readonly sessionAuth;
@@ -310,20 +311,24 @@ export declare class LaunchpadSDK {
310
311
  private readonly maxAcceptableReverseBondingCurveFeeSlippageFactor;
311
312
  private readonly calculateAmountMode;
312
313
  private readonly logger;
313
- private readonly dexClient;
314
314
  private readonly tokenResolverService;
315
315
  private readonly launchpadService;
316
- private readonly galaChainService;
317
- private readonly dexService;
318
- private readonly bundleService;
316
+ /** Rebuilt whenever the wallet changes: its token writes sign as the wallet it was built with. */
317
+ private galaChainService;
318
+ private readonly priceService;
319
+ /** Signs bundle trades as the wallet: rebuilt when the wallet changes (see onWalletChanged). */
320
+ private bundleService;
321
+ /** The sell fee ceiling resolver every BundleService of this SDK uses. */
322
+ private readonly sellFeeCeiling;
319
323
  private readonly websocketService;
320
- private readonly priceHistoryService;
321
324
  private readonly cache;
322
- private _bridgeService?;
325
+ /** Counts wallet changes: a bridge call that started under one wallet never runs under the next. */
326
+ private walletGeneration;
327
+ private _bridgeService;
323
328
  private _bridgeableTokenService?;
324
329
  private _wrappableTokenService?;
325
- private _wrapService?;
326
- private _galaConnectClient?;
330
+ private _wrapService;
331
+ private _galaConnectClient;
327
332
  private _streamingService;
328
333
  private _streamChatService;
329
334
  private _streamWebSocketService;
@@ -360,8 +365,6 @@ export declare class LaunchpadSDK {
360
365
  private readonly launchpadAPI;
361
366
  /** v6 launchpad write surface. */
362
367
  readonly launchpad: LaunchpadWrites;
363
- /** v6 native token write surface. */
364
- readonly tokens: TokenWrites;
365
368
  constructor(config: LaunchpadSDKConfig);
366
369
  /**
367
370
  * Creates a temporary SDK instance with a different wallet for privateKey override operations.
@@ -373,18 +376,6 @@ export declare class LaunchpadSDK {
373
376
  * @throws Error if privateKey format is invalid
374
377
  */
375
378
  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
379
  /**
389
380
  * Gets the authenticated user's address in backend format
390
381
  *
@@ -480,6 +471,11 @@ export declare class LaunchpadSDK {
480
471
  * ```
481
472
  */
482
473
  validateWallet(): Wallet;
474
+ /**
475
+ * Token writes (transfer, burn, lock, unlock) need the wallet, or (an SDK configured with
476
+ * `{ signer, walletAddress }`) a declared signer and identity. Same error as `validateWallet`.
477
+ */
478
+ private assertTokenWriter;
483
479
  /**
484
480
  * Sets or updates the wallet for the SDK
485
481
  *
@@ -516,6 +512,27 @@ export declare class LaunchpadSDK {
516
512
  * ```
517
513
  */
518
514
  setWallet(wallet: Wallet): void;
515
+ /**
516
+ * Everything the SDK built around the previous wallet's key or address follows the new one, so no
517
+ * write signs as, and no request is sent from, an identity the SDK no longer has:
518
+ * - an identity declared at construction (`walletAddress`, `galaChainAddress`) named the
519
+ * construction key: it is dropped, and `getAddress()` is the new wallet's;
520
+ * - the token writes (transfer, burn, lock, unlock) and the bundle trades (`buyTokens`,
521
+ * `sellTokens`) are rebuilt for the new wallet now;
522
+ * - the bridge service, the wrap service and the GalaConnect client (built on first use with the
523
+ * wallet's key and address) are dropped, and the next bridge, wrap or GalaConnect call builds
524
+ * them for the new wallet.
525
+ */
526
+ private onWalletChanged;
527
+ /** The bundle trading service, signing as the current wallet (none: trading is refused). */
528
+ private createBundleService;
529
+ /**
530
+ * The token writes (transfer, burn, lock, unlock) sign as the wallet the GalaChain service was
531
+ * built with, so the service is rebuilt whenever the wallet changes: a write never signs as, or
532
+ * is made from, an identity the SDK no longer has. A declared `{ signer, walletAddress }` identity
533
+ * from construction no longer applies once the wallet changes (no wallet then means no writes).
534
+ */
535
+ private rebuildTokenWrites;
519
536
  /**
520
537
  * Sets or updates the wallet provider for authentication
521
538
  *
@@ -526,7 +543,7 @@ export declare class LaunchpadSDK {
526
543
  *
527
544
  * @example
528
545
  * ```typescript
529
- * import { ExternalWalletProvider, detectWallets } from '@gala-chain/launchpad-sdk/wallet';
546
+ * import { ExternalWalletProvider, detectWallets } from '@gala-chain/gala-core-sdk/providers';
530
547
  *
531
548
  * // Detect available wallets
532
549
  * const { wallets } = await detectWallets();
@@ -1021,74 +1038,47 @@ export declare class LaunchpadSDK {
1021
1038
  */
1022
1039
  fetchUserHolderContext(tokenName: string, userAddress: string): Promise<UserHolderContext>;
1023
1040
  /**
1024
- * Fetch USD spot price for any token with smart routing
1041
+ * Fetch a launchpad token's USD spot price.
1025
1042
  *
1026
- * Unified smart router that accepts either tokenName (launchpad tokens) or tokenId (DEX tokens).
1027
- * Automatically detects token type and routes to the correct backend:
1028
- * - **tokenName** → Launchpad token with graduation detection (bonding curve or DEX pricing)
1029
- * - **tokenId** → DEX Backend API `/market/price` (direct pricing)
1043
+ * - A token still on its bonding curve: GALA's USD price divided by the tokens 1 GALA buys
1044
+ * (the launchpad backend's bonding-curve calculation).
1045
+ * - A graduated token: its USD price on the swap backend.
1030
1046
  *
1031
- * @param params Options with either tokenName or tokenId (mutually exclusive)
1032
- * @returns Promise<TokenSpotPrice> Single token's spot price data
1047
+ * Only launchpad tokens (by name) are priced here. Any token by class key, and GALA itself, is
1048
+ * priced by gswap-sdk: `gSwap.market.getPrice('GALA|Unit|none|none')`.
1033
1049
  *
1034
- * @example Launchpad token by name (auto-detects graduation status)
1035
- * ```typescript
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
- * ```
1050
+ * @param params The launchpad token's name
1051
+ * @returns Promise<TokenSpotPrice> The token's symbol and USD price
1040
1052
  *
1041
- * @example DEX token by tokenId
1053
+ * @example
1042
1054
  * ```typescript
1043
- * const price = await sdk.fetchTokenPrice({
1044
- * tokenId: 'Token|Unit|GDOG|eth:0x...'
1045
- * });
1055
+ * const price = await sdk.fetchTokenPrice({ tokenName: 'galadog' });
1046
1056
  * console.log(`${price.symbol}: $${price.price.toFixed(6)}`);
1047
1057
  * ```
1048
1058
  *
1049
- * @throws ValidationError if neither tokenName nor tokenId provided
1050
- * @throws ValidationError if both tokenName and tokenId provided
1051
- * @throws Error if API request fails or token not found
1059
+ * @throws ValidationError if `tokenName` is missing or empty, or a `tokenId` is given
1060
+ * @throws NetworkError if the calculation or a price read fails
1052
1061
  */
1053
1062
  fetchTokenPrice(params: FetchTokenSpotPriceParams): Promise<TokenSpotPrice>;
1054
1063
  /**
1055
- * Fetch current GALA token USD spot price
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.
1059
- *
1060
- * @returns Promise<TokenSpotPrice> GALA spot price data with symbol and USD price
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
1064
+ * Fetch comprehensive token details from GalaChain
1074
1065
  *
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.
1066
+ * Reads the token's GalaChain token class (symbol, decimals, name, image, description, network,
1067
+ * contract address).
1078
1068
  *
1079
1069
  * Supports flexible token identification using either string or object format:
1080
1070
  * - String: `'GUSDC|Unit|none|eth:0x...'` (pipe-delimited)
1081
1071
  * - Object: `{ collection, category, type, additionalKey }`
1082
1072
  *
1083
1073
  * @param tokenId Token identifier in flexible format
1084
- * @returns Promise<TokenDetails> Comprehensive token metadata
1074
+ * @returns Promise<GalaChainTokenDetails> The token class's details (gala-core-sdk's type)
1085
1075
  *
1086
1076
  * @example String format
1087
1077
  * ```typescript
1088
1078
  * const details = await sdk.fetchTokenDetails('GUSDC|Unit|none|none');
1089
1079
  * console.log(details.symbol); // 'GUSDC'
1090
1080
  * console.log(details.decimals); // 6
1091
- * console.log(details.verified); // true
1081
+ * console.log(details.network); // the token's network
1092
1082
  * console.log(details.image); // 'https://...'
1093
1083
  * ```
1094
1084
  *
@@ -1106,156 +1096,6 @@ export declare class LaunchpadSDK {
1106
1096
  * @throws {NetworkError} If API request fails or token not found
1107
1097
  */
1108
1098
  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
1099
  /**
1260
1100
  * Fetch the current launchpad token launch fee
1261
1101
  *
@@ -1292,7 +1132,7 @@ export declare class LaunchpadSDK {
1292
1132
  * - Token metadata (symbol, decimals, name)
1293
1133
  *
1294
1134
  * @param tokenClasses Array of token class keys to query
1295
- * @returns Promise<TokenClassWithSupply[]> Array of token classes with supply information
1135
+ * @returns Promise<GalaChainTokenClass[]> Array of token classes with supply information
1296
1136
  * @throws {ValidationError} if tokenClasses array is empty
1297
1137
  * @throws {Error} if network request fails
1298
1138
  *
@@ -1319,7 +1159,7 @@ export declare class LaunchpadSDK {
1319
1159
  * @category Token Data
1320
1160
  * @since 3.32.0
1321
1161
  */
1322
- fetchTokenClassesWithSupply(tokenClasses: TokenClassKey[]): Promise<TokenClassWithSupply[]>;
1162
+ fetchTokenClassesWithSupply(tokenClasses: GalaChainTokenClassKey[]): Promise<GalaChainTokenClass[]>;
1323
1163
  /**
1324
1164
  * Fetch pool details for a token - returns complete bonding curve pool state
1325
1165
  *
@@ -1452,33 +1292,28 @@ export declare class LaunchpadSDK {
1452
1292
  * market engagement. Data is aggregated by time period with buy/sell breakdowns.
1453
1293
  *
1454
1294
  * @category Trading Data
1455
- * @param options - Volume data options with required tokenName and optional time range
1456
- * @param options.tokenName - Token name to fetch volume data for (required)
1457
- * @param options.startDate - Start date for volume data range (optional)
1458
- * @param options.endDate - End date for volume data range (optional)
1459
- * @param options.interval - Time interval for aggregation (e.g., '1h', '1d', '1w') (optional)
1460
- * @returns Promise with graph data containing timestamps, volume amounts, and trade counts
1461
- * @throws {ValidationError} If tokenName is missing or invalid
1295
+ * @param options - Volume data options
1296
+ * @param options.tokenName - Token name to fetch volume data for
1297
+ * @param options.from - Start of the range, a Unix timestamp in seconds (at least 173000000)
1298
+ * @param options.to - End of the range, a Unix timestamp in seconds (at least 173000000)
1299
+ * @param options.resolution - The chart resolution the backend aggregates by (at least 1)
1300
+ * @returns `{ dataPoints }`: `{ timestamp, value, ... }` points, as the backend's chart returns them
1301
+ * @throws {ValidationError} If tokenName is invalid, or `from`, `to` or `resolution` is missing
1302
+ * (`MISSING_GRAPH_OPTIONS`) or out of range: all three are required although the type marks
1303
+ * them optional
1462
1304
  * @throws {NetworkError} If API request fails
1463
1305
  * @since 4.0.4-beta.0
1464
1306
  *
1465
- * @example Fetch all-time volume
1466
- * ```typescript
1467
- * const volumeData = await sdk.fetchVolumeData({ tokenName: 'anime' });
1468
- * console.log(`Total data points: ${volumeData.length}`);
1469
- * volumeData.forEach(point => {
1470
- * console.log(`${point.timestamp}: $${point.volume} volume`);
1471
- * });
1472
- * ```
1473
- *
1474
- * @example Fetch volume for date range
1307
+ * @example Volume over the last 30 days
1475
1308
  * ```typescript
1476
- * const volumeData = await sdk.fetchVolumeData({
1477
- * tokenName: 'mytoken',
1478
- * startDate: new Date('2024-01-01'),
1479
- * endDate: new Date('2024-01-31')
1309
+ * const now = Math.floor(Date.now() / 1000);
1310
+ * const { dataPoints } = await sdk.fetchVolumeData({
1311
+ * tokenName: 'anime',
1312
+ * from: now - 30 * 24 * 60 * 60,
1313
+ * to: now,
1314
+ * resolution: 5,
1480
1315
  * });
1481
- * console.log(`January volume: ${volumeData.reduce((sum, p) => sum + p.volume, 0)}`);
1316
+ * dataPoints.forEach((point) => console.log(`${point.timestamp}: ${point.value}`));
1482
1317
  * ```
1483
1318
  */
1484
1319
  fetchVolumeData(options: FetchVolumeDataOptions): Promise<GraphDataResult>;
@@ -1575,14 +1410,24 @@ export declare class LaunchpadSDK {
1575
1410
  * ```
1576
1411
  */
1577
1412
  fetchGalaBalance(address?: string): Promise<TokenBalanceResult | null>;
1413
+ /**
1414
+ * gala-core-sdk's `./bridge` for a bridge or wrap call (see `loadCoreBridge`). The call was made
1415
+ * with the SDK's wallet of NOW: if the wallet changes while the module loads, the call is refused
1416
+ * rather than run as the next wallet's identity.
1417
+ *
1418
+ * @throws ConfigurationError if `./bridge` (or its optional peers) cannot be loaded, or the wallet
1419
+ * changed meanwhile
1420
+ */
1421
+ private coreBridge;
1578
1422
  /**
1579
1423
  * Lazy-initialize BridgeService when first needed.
1580
1424
  *
1581
1425
  * The BridgeService requires external chain configuration (Ethereum/Solana private keys)
1582
1426
  * 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.
1427
+ * initialization to avoid requiring bridge configuration for non-bridge operations. It is built
1428
+ * for the wallet configured at its first use and dropped when the wallet changes.
1584
1429
  *
1585
- * @param options Optional configuration for Ethereum and Solana bridges
1430
+ * @param bridge gala-core-sdk's `./bridge`, from {@link LaunchpadSDK.coreBridge}
1586
1431
  * @returns Configured BridgeService instance
1587
1432
  * @throws Error if no wallet is configured for GalaChain operations
1588
1433
  *
@@ -1596,6 +1441,7 @@ export declare class LaunchpadSDK {
1596
1441
  * and caches it permanently (tokens never change). This allows dynamic
1597
1442
  * contract address lookups without hardcoded values.
1598
1443
  *
1444
+ * @param bridge gala-core-sdk's `./bridge`, from {@link LaunchpadSDK.coreBridge}
1599
1445
  * @returns Configured BridgeableTokenService instance
1600
1446
  *
1601
1447
  * @internal This is a private helper method for bridgeable token operations
@@ -1608,6 +1454,7 @@ export declare class LaunchpadSDK {
1608
1454
  * The service fetches wrappable tokens from DEX API (wrappable=true)
1609
1455
  * and caches them permanently for generic queries.
1610
1456
  *
1457
+ * @param bridge gala-core-sdk's `./bridge`, from {@link LaunchpadSDK.coreBridge}
1611
1458
  * @returns Configured WrappableTokenService instance
1612
1459
  *
1613
1460
  * @internal This is a private helper method for wrappable token operations
@@ -1619,6 +1466,7 @@ export declare class LaunchpadSDK {
1619
1466
  * Lazily initializes the GalaConnectClient on first use.
1620
1467
  * Used for bridge and wrap/unwrap operations via the DEX API platform.
1621
1468
  *
1469
+ * @param bridge gala-core-sdk's `./bridge`, from {@link LaunchpadSDK.coreBridge}
1622
1470
  * @returns Configured GalaConnectClient instance
1623
1471
  * @throws Error if wallet is not configured
1624
1472
  *
@@ -1632,8 +1480,9 @@ export declare class LaunchpadSDK {
1632
1480
  * The service handles cross-channel wrap/unwrap operations
1633
1481
  * (e.g., MUSIC → GMUSIC, GMUSIC → MUSIC).
1634
1482
  *
1483
+ * @param bridge gala-core-sdk's `./bridge`, from {@link LaunchpadSDK.coreBridge}
1635
1484
  * @returns Configured WrapService instance
1636
- * @throws Error if wallet is not configured (wrap/unwrap requires signing)
1485
+ * @throws Error if no wallet address is configured (the GalaConnect client needs one)
1637
1486
  *
1638
1487
  * @internal This is a private helper method for wrap/unwrap operations
1639
1488
  */
@@ -2061,7 +1910,7 @@ export declare class LaunchpadSDK {
2061
1910
  * @example Check bridge transaction status
2062
1911
  * ```typescript
2063
1912
  * const bridgeResult = await sdk.bridgeOut({
2064
- * tokenId: 'Token|Unit|GALA|...',
1913
+ * tokenId: 'GALA|Unit|none|none',
2065
1914
  * amount: '100',
2066
1915
  * destinationChain: 'Ethereum',
2067
1916
  * recipientAddress: '0x1234...',
@@ -2470,30 +2319,32 @@ export declare class LaunchpadSDK {
2470
2319
  * NOT an external bridge (Ethereum/Solana).
2471
2320
  *
2472
2321
  * @param options - Wrap options including tokenId and amount
2473
- * @returns Promise resolving to wrap operation result
2474
- * @throws ValidationError if token is not wrappable or already on asset channel
2475
- * @throws ValidationError if wallet is not configured
2322
+ * @returns Promise resolving to the completed wrap
2323
+ * @throws GalaSDKError (`@gala-chain/gala-core-sdk`): `TOKEN_NOT_WRAPPABLE`,
2324
+ * `INVALID_WRAP_DIRECTION` (already on the asset channel), `INVALID_BRIDGE_OPTION` (no wallet),
2325
+ * `BRIDGE_REQUEST_REJECTED` (GalaChain refused it: nothing locked), `BRIDGE_OUT_OUTCOME_UNKNOWN`
2326
+ * (accepted, then failed: never wrap again)
2476
2327
  *
2477
2328
  * @since 4.0.18
2478
2329
  * @category Wrap/Unwrap
2479
2330
  *
2480
2331
  * @example Wrap MUSIC to GMUSIC
2481
2332
  * ```typescript
2333
+ * // token ids are class keys (a bare symbol such as 'MUSIC' is refused)
2482
2334
  * const result = await sdk.wrapToken({
2483
- * tokenId: 'MUSIC',
2335
+ * tokenId: '$MUSIC|Unit|none|none',
2484
2336
  * amount: '100'
2485
2337
  * });
2486
2338
  * console.log(`Wrapped ${result.amount} ${result.fromToken} → ${result.toToken}`);
2487
2339
  * console.log(`Transaction: ${result.transactionId}`);
2488
2340
  * ```
2489
2341
  *
2490
- * @example With recipient and memo
2342
+ * @example With a recipient
2491
2343
  * ```typescript
2492
2344
  * const result = await sdk.wrapToken({
2493
2345
  * tokenId: '$MUSIC|Unit|none|none',
2494
2346
  * amount: '50',
2495
- * recipient: 'eth|0x1234...',
2496
- * memo: 'Wrap for DEX trading'
2347
+ * recipient: 'eth|1234...',
2497
2348
  * });
2498
2349
  * ```
2499
2350
  */
@@ -2509,9 +2360,9 @@ export declare class LaunchpadSDK {
2509
2360
  * NOT an external bridge (Ethereum/Solana).
2510
2361
  *
2511
2362
  * @param options - Unwrap options including tokenId and amount
2512
- * @returns Promise resolving to unwrap operation result
2513
- * @throws ValidationError if token is not unwrappable or not on asset channel
2514
- * @throws ValidationError if wallet is not configured
2363
+ * @returns Promise resolving to the completed unwrap
2364
+ * @throws GalaSDKError (`@gala-chain/gala-core-sdk`): as {@link wrapToken}
2365
+ * (`INVALID_WRAP_DIRECTION` for a token not on the asset channel)
2515
2366
  *
2516
2367
  * @since 4.0.18
2517
2368
  * @category Wrap/Unwrap
@@ -2519,7 +2370,7 @@ export declare class LaunchpadSDK {
2519
2370
  * @example Unwrap GMUSIC to MUSIC
2520
2371
  * ```typescript
2521
2372
  * const result = await sdk.unwrapToken({
2522
- * tokenId: 'GMUSIC',
2373
+ * tokenId: '$GMUSIC|Unit|none|none',
2523
2374
  * amount: '50'
2524
2375
  * });
2525
2376
  * console.log(`Unwrapped ${result.amount} ${result.fromToken} → ${result.toToken}`);
@@ -2532,17 +2383,17 @@ export declare class LaunchpadSDK {
2532
2383
  * Calculates expected fees for wrapping a token to the asset channel.
2533
2384
  * Wrap operations use `cross_channel_authorization` fee type.
2534
2385
  *
2535
- * @param tokenId - Token identifier (symbol, pipe-delimited string, or TokenClassKey)
2386
+ * @param tokenId - Token class key (pipe-delimited string or TokenClassKey; a bare symbol is refused)
2536
2387
  * @param amount - Amount to wrap (decimal string)
2537
2388
  * @returns Promise resolving to fee estimate
2538
- * @throws ValidationError if token is not wrappable
2389
+ * @throws GalaSDKError `TOKEN_NOT_WRAPPABLE`, `INVALID_WRAP_DIRECTION`, `INVALID_BRIDGE_AMOUNT`
2539
2390
  *
2540
2391
  * @since 4.0.18
2541
2392
  * @category Wrap/Unwrap
2542
2393
  *
2543
2394
  * @example Estimate wrap fee
2544
2395
  * ```typescript
2545
- * const estimate = await sdk.estimateWrapFee('MUSIC', '100');
2396
+ * const estimate = await sdk.estimateWrapFee('$MUSIC|Unit|none|none', '100');
2546
2397
  * console.log(`Fee: ${estimate.fee} ${estimate.feeToken}`);
2547
2398
  * console.log(`Auth type: ${estimate.authorizationType}`);
2548
2399
  * ```
@@ -2554,44 +2405,22 @@ export declare class LaunchpadSDK {
2554
2405
  * Calculates expected fees for unwrapping a token back to its native channel.
2555
2406
  * Unwrap operations use `automatic` fee authorization.
2556
2407
  *
2557
- * @param tokenId - Token identifier (symbol, pipe-delimited string, or TokenClassKey)
2408
+ * @param tokenId - Token class key (pipe-delimited string or TokenClassKey; a bare symbol is refused)
2558
2409
  * @param amount - Amount to unwrap (decimal string)
2559
2410
  * @returns Promise resolving to fee estimate
2560
- * @throws ValidationError if token is not unwrappable
2411
+ * @throws GalaSDKError `TOKEN_NOT_WRAPPABLE`, `INVALID_WRAP_DIRECTION`, `INVALID_BRIDGE_AMOUNT`
2561
2412
  *
2562
2413
  * @since 4.0.18
2563
2414
  * @category Wrap/Unwrap
2564
2415
  *
2565
2416
  * @example Estimate unwrap fee
2566
2417
  * ```typescript
2567
- * const estimate = await sdk.estimateUnwrapFee('GMUSIC', '50');
2418
+ * const estimate = await sdk.estimateUnwrapFee('$GMUSIC|Unit|none|none', '50');
2568
2419
  * console.log(`Fee: ${estimate.fee} ${estimate.feeToken}`);
2569
2420
  * console.log(`Auth type: ${estimate.authorizationType}`);
2570
2421
  * ```
2571
2422
  */
2572
2423
  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
2424
  /**
2596
2425
  * Login with wallet signature to get JWT token.
2597
2426
  *
@@ -6789,33 +6618,6 @@ export declare class LaunchpadSDK {
6789
6618
  tokenName?: string;
6790
6619
  banStatus?: 'BANNED' | 'UNBANNED';
6791
6620
  }): () => 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
6621
  /**
6820
6622
  * Subscribe to content flagged events (overseer)
6821
6623
  *
@@ -7114,12 +6916,12 @@ export declare class LaunchpadSDK {
7114
6916
  *
7115
6917
  * @example Estimate fee for bridging GALA to Ethereum
7116
6918
  * ```typescript
6919
+ * // the fee does not depend on the amount bridged
7117
6920
  * const fee = await sdk.estimateBridgeFee({
7118
6921
  * tokenId: 'GALA|Unit|none|none',
7119
6922
  * destinationChain: 'Ethereum',
7120
- * amount: '100',
7121
6923
  * });
7122
- * console.log(`Fee: ${fee.totalFee} GALA`);
6924
+ * console.log(`Fee: ${fee.estimatedFeeInGala} GALA`);
7123
6925
  * ```
7124
6926
  */
7125
6927
  estimateBridgeFee(params: EstimateBridgeFeeParams): Promise<BridgeFeeEstimate>;
@@ -7182,8 +6984,7 @@ export declare class LaunchpadSDK {
7182
6984
  *
7183
6985
  * Checks the current status of a cross-chain bridge transaction.
7184
6986
  *
7185
- * @param transactionHash - Transaction hash to check
7186
- * @param chainHint - Optional chain hint for faster lookup
6987
+ * @param transactionHash - Transaction hash to check (one GalaConnect status read, any chain)
7187
6988
  * @returns Promise resolving to bridge status
7188
6989
  *
7189
6990
  * @since 4.0.16
@@ -7191,14 +6992,11 @@ export declare class LaunchpadSDK {
7191
6992
  *
7192
6993
  * @example Check bridge status
7193
6994
  * ```typescript
7194
- * const status = await sdk.getBridgeStatus(
7195
- * '0x1234...abcd',
7196
- * 'Ethereum'
7197
- * );
6995
+ * const status = await sdk.getBridgeStatus('0x1234...abcd');
7198
6996
  * console.log(`Status: ${status.status}`);
7199
6997
  * ```
7200
6998
  */
7201
- getBridgeStatus(transactionHash: string, chainHint?: 'Ethereum' | 'Solana'): Promise<BridgeStatus>;
6999
+ getBridgeStatus(transactionHash: string): Promise<BridgeStatus>;
7202
7000
  /**
7203
7001
  * Get list of tokens supported for bridging.
7204
7002
  *
@@ -7357,7 +7155,7 @@ export declare class LaunchpadSDK {
7357
7155
  * type: 'exact'
7358
7156
  * });
7359
7157
  * console.log('GALA needed:', result.amount);
7360
- * console.log('Total cost with fees:', result.totalCost);
7158
+ * console.log('Fees:', result.transactionFee, result.gasFee);
7361
7159
  * ```
7362
7160
  *
7363
7161
  * @example Performance-optimized with local calculation
@@ -7697,7 +7495,7 @@ export declare class LaunchpadSDK {
7697
7495
  * **Use simple `tokenName`** (e.g., `"anime"`), NOT full TokenClassKey format.
7698
7496
  *
7699
7497
  * This method is for **bonding curve tokens only** (pre-graduation). For DEX trading
7700
- * of graduated tokens, use `sdk.dex.swaps.swap()` (the {@link GSwap} client exposed via {@link dex}) with full TokenClassKey format.
7498
+ * of graduated tokens, use `@gala-chain/gswap-sdk` (`new GSwap({ signer }).swaps.swap()`) with full TokenClassKey format.
7701
7499
  *
7702
7500
  * ```typescript
7703
7501
  * // ✅ CORRECT - Simple token name
@@ -7818,7 +7616,7 @@ export declare class LaunchpadSDK {
7818
7616
  * **Use simple `tokenName`** (e.g., `"anime"`), NOT full TokenClassKey format.
7819
7617
  *
7820
7618
  * This method is for **bonding curve tokens only** (pre-graduation). For DEX trading
7821
- * of graduated tokens, use `sdk.dex.swaps.swap()` (the {@link GSwap} client exposed via {@link dex}) with full TokenClassKey format.
7619
+ * of graduated tokens, use `@gala-chain/gswap-sdk` (`new GSwap({ signer }).swaps.swap()`) with full TokenClassKey format.
7822
7620
  *
7823
7621
  * ```typescript
7824
7622
  * // ✅ CORRECT - Simple token name
@@ -8558,79 +8356,6 @@ export declare class LaunchpadSDK {
8558
8356
  * ```
8559
8357
  */
8560
8358
  getManagedTokens(options?: GetManagedTokensOptions): Promise<ManagedTokensResult>;
8561
- /**
8562
- * Fetch historical price data for DEX tokens via DEX Backend API
8563
- *
8564
- * Retrieves paginated historical price snapshots for a token with optional
8565
- * date range filtering. This method is Node.js-only and queries the DEX
8566
- * Backend API for price history data.
8567
- *
8568
- * @param options Price history fetch options including token key, dates, and pagination
8569
- * @returns Promise<PriceHistoryResult> Price snapshots with pagination metadata
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
8576
- *
8577
- * @example
8578
- * ```typescript
8579
- * // Fetch price history for a DEX token
8580
- * const history = await sdk.fetchPriceHistory({
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}`);
8594
- * ```
8595
- */
8596
- fetchPriceHistory(options: FetchPriceHistoryOptions): Promise<PriceHistoryResult>;
8597
- /**
8598
- * Fetch all historical price snapshots for a token (automatic pagination)
8599
- *
8600
- * Convenience method that automatically handles pagination by fetching all price history
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.
8605
- *
8606
- * @param options Fetch options (pagination is handled automatically)
8607
- * @returns Promise<PriceHistoryResult> containing all price snapshots in combined result
8608
- *
8609
- * @throws NetworkError if API query fails
8610
- * @throws ValidationError if parameters are invalid
8611
- *
8612
- * @category Price History
8613
- * @since 3.14.0
8614
- *
8615
- * @example
8616
- * ```typescript
8617
- * // Fetch all price history for a DEX token (automatic pagination)
8618
- * const allHistory = await sdk.fetchAllPriceHistory({
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}`);
8631
- * ```
8632
- */
8633
- fetchAllPriceHistory(options: Omit<FetchPriceHistoryOptions, 'page' | 'limit'>): Promise<PriceHistoryResult>;
8634
8359
  /**
8635
8360
  * Transfer GALA tokens between wallets
8636
8361
  *
@@ -8712,7 +8437,7 @@ export declare class LaunchpadSDK {
8712
8437
  *
8713
8438
  * @throws {TransferError} When token name cannot be resolved
8714
8439
  */
8715
- resolveTokenClassKey(tokenName: string): Promise<TokenClassKey>;
8440
+ resolveTokenClassKey(tokenName: string): Promise<GalaChainTokenClassKey>;
8716
8441
  /**
8717
8442
  * Convert token name to TokenClassKey (explicit alias for resolveTokenClassKey)
8718
8443
  *
@@ -8746,7 +8471,7 @@ export declare class LaunchpadSDK {
8746
8471
  *
8747
8472
  * @throws {TransferError} When token name cannot be resolved
8748
8473
  */
8749
- convertTokenNameToTokenClassKey(tokenName: string): Promise<TokenClassKey>;
8474
+ convertTokenNameToTokenClassKey(tokenName: string): Promise<GalaChainTokenClassKey>;
8750
8475
  /**
8751
8476
  * Lock tokens on GalaChain (batch operation)
8752
8477
  *