@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.
Files changed (372) hide show
  1. package/CHANGELOG.md +837 -0
  2. package/EXAMPLES.md +95 -681
  3. package/MIGRATING-TO-9.0.md +343 -0
  4. package/README.md +46 -17
  5. package/dist/LaunchpadSDK.d.ts +536 -616
  6. package/dist/LaunchpadSDK.d.ts.map +1 -1
  7. package/dist/api/LaunchpadAPI.d.ts +6 -176
  8. package/dist/api/LaunchpadAPI.d.ts.map +1 -1
  9. package/dist/auth/SessionAuthService.d.ts +32 -2
  10. package/dist/auth/SessionAuthService.d.ts.map +1 -1
  11. package/dist/auth/SignatureAuth.d.ts +2 -2
  12. package/dist/auth/SignatureAuth.d.ts.map +1 -1
  13. package/dist/auth/session.d.ts +59 -0
  14. package/dist/auth/session.d.ts.map +1 -0
  15. package/dist/auth/types.d.ts +7 -2
  16. package/dist/auth/types.d.ts.map +1 -1
  17. package/dist/config/environments.d.ts +7 -2
  18. package/dist/config/environments.d.ts.map +1 -1
  19. package/dist/constants/decimals.d.ts +0 -23
  20. package/dist/constants/decimals.d.ts.map +1 -1
  21. package/dist/constants/endpoints.d.ts +19 -8
  22. package/dist/constants/endpoints.d.ts.map +1 -1
  23. package/dist/constants/enums.d.ts +19 -0
  24. package/dist/constants/enums.d.ts.map +1 -1
  25. package/dist/constants/version.generated.d.ts +1 -1
  26. package/dist/constants/version.generated.d.ts.map +1 -1
  27. package/dist/errors/LaunchpadSDKError.d.ts +18 -0
  28. package/dist/errors/LaunchpadSDKError.d.ts.map +1 -1
  29. package/dist/helpers/sdk.d.ts.map +1 -1
  30. package/dist/index.browser.d.ts +40 -45
  31. package/dist/index.browser.d.ts.map +1 -1
  32. package/dist/index.browser.esm.js +1 -1
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.esm.js +1 -1
  35. package/dist/index.js +1 -1
  36. package/dist/index.node.d.ts +4 -5
  37. package/dist/index.node.d.ts.map +1 -1
  38. package/dist/launchpad/bundle-submission.d.ts +57 -10
  39. package/dist/launchpad/bundle-submission.d.ts.map +1 -1
  40. package/dist/launchpad/create-sale-validation.d.ts +19 -0
  41. package/dist/launchpad/create-sale-validation.d.ts.map +1 -0
  42. package/dist/launchpad/transport.d.ts +33 -2
  43. package/dist/launchpad/transport.d.ts.map +1 -1
  44. package/dist/launchpad/writes.d.ts +37 -11
  45. package/dist/launchpad/writes.d.ts.map +1 -1
  46. package/dist/native.cjs +1 -1
  47. package/dist/native.d.ts +4 -5
  48. package/dist/native.d.ts.map +1 -1
  49. package/dist/native.esm.js +1 -1
  50. package/dist/schemas/launchpad.d.ts +3 -2
  51. package/dist/schemas/launchpad.d.ts.map +1 -1
  52. package/dist/schemas/primitives.d.ts +12 -2
  53. package/dist/schemas/primitives.d.ts.map +1 -1
  54. package/dist/schemas/user.d.ts +3 -18
  55. package/dist/schemas/user.d.ts.map +1 -1
  56. package/dist/schemas/validators.d.ts +3 -3
  57. package/dist/services/AbstractCacheService.d.ts +2 -2
  58. package/dist/services/ApiKeyService.d.ts +1 -1
  59. package/dist/services/BanService.d.ts +1 -1
  60. package/dist/services/ChartService.d.ts.map +1 -1
  61. package/dist/services/ContentReactionService.d.ts +6 -18
  62. package/dist/services/ContentReactionService.d.ts.map +1 -1
  63. package/dist/services/EventsQueryService.d.ts +47 -0
  64. package/dist/services/EventsQueryService.d.ts.map +1 -0
  65. package/dist/services/GalaChainBalanceService.d.ts +17 -89
  66. package/dist/services/GalaChainBalanceService.d.ts.map +1 -1
  67. package/dist/services/GalaChainLockService.d.ts +19 -20
  68. package/dist/services/GalaChainLockService.d.ts.map +1 -1
  69. package/dist/services/GalaChainService.d.ts +28 -15
  70. package/dist/services/GalaChainService.d.ts.map +1 -1
  71. package/dist/services/GalaChainTokenService.d.ts +25 -53
  72. package/dist/services/GalaChainTokenService.d.ts.map +1 -1
  73. package/dist/services/GalaChainTransferService.d.ts +42 -41
  74. package/dist/services/GalaChainTransferService.d.ts.map +1 -1
  75. package/dist/services/HealthService.d.ts +33 -0
  76. package/dist/services/HealthService.d.ts.map +1 -0
  77. package/dist/services/ImageService.d.ts +3 -3
  78. package/dist/services/ImageService.d.ts.map +1 -1
  79. package/dist/services/LaunchpadPriceService.d.ts +66 -0
  80. package/dist/services/LaunchpadPriceService.d.ts.map +1 -0
  81. package/dist/services/LaunchpadService.d.ts +34 -42
  82. package/dist/services/LaunchpadService.d.ts.map +1 -1
  83. package/dist/services/MessagesService.d.ts +12 -44
  84. package/dist/services/MessagesService.d.ts.map +1 -1
  85. package/dist/services/ModeratorService.d.ts +2 -2
  86. package/dist/services/ModeratorService.d.ts.map +1 -1
  87. package/dist/services/NftCollectionService.d.ts +22 -6
  88. package/dist/services/NftCollectionService.d.ts.map +1 -1
  89. package/dist/services/OverseerService.d.ts +3 -3
  90. package/dist/services/OverseerService.d.ts.map +1 -1
  91. package/dist/services/PlatformStatsService.d.ts +1 -2
  92. package/dist/services/PlatformStatsService.d.ts.map +1 -1
  93. package/dist/services/PoolService.d.ts +28 -65
  94. package/dist/services/PoolService.d.ts.map +1 -1
  95. package/dist/services/RestrictedNamesService.d.ts +1 -1
  96. package/dist/services/RestrictedNamesService.d.ts.map +1 -1
  97. package/dist/services/StreamChatService.d.ts +8 -19
  98. package/dist/services/StreamChatService.d.ts.map +1 -1
  99. package/dist/services/StreamTokenServiceBase.d.ts +2 -1
  100. package/dist/services/StreamTokenServiceBase.d.ts.map +1 -1
  101. package/dist/services/StreamWebSocketService.d.ts +423 -451
  102. package/dist/services/StreamWebSocketService.d.ts.map +1 -1
  103. package/dist/services/StreamingService.d.ts +14 -15
  104. package/dist/services/StreamingService.d.ts.map +1 -1
  105. package/dist/services/TokenBanService.d.ts +1 -1
  106. package/dist/services/TokenResolverService.d.ts +5 -5
  107. package/dist/services/TokenResolverService.d.ts.map +1 -1
  108. package/dist/services/TradeService.d.ts +13 -9
  109. package/dist/services/TradeService.d.ts.map +1 -1
  110. package/dist/services/TradingQuotesService.d.ts.map +1 -1
  111. package/dist/services/UserService.d.ts +64 -20
  112. package/dist/services/UserService.d.ts.map +1 -1
  113. package/dist/services/gateway-transport.d.ts +32 -0
  114. package/dist/services/gateway-transport.d.ts.map +1 -0
  115. package/dist/services/gateway-writes.d.ts +83 -0
  116. package/dist/services/gateway-writes.d.ts.map +1 -0
  117. package/dist/services/realtime/event-catalog.d.ts +456 -0
  118. package/dist/services/realtime/event-catalog.d.ts.map +1 -0
  119. package/dist/services/shared/pagination-helpers.d.ts +22 -5
  120. package/dist/services/shared/pagination-helpers.d.ts.map +1 -1
  121. package/dist/services/shared/service-validators.d.ts.map +1 -1
  122. package/dist/signing/index.d.ts +2 -3
  123. package/dist/signing/index.d.ts.map +1 -1
  124. package/dist/signing/signers.d.ts +64 -9
  125. package/dist/signing/signers.d.ts.map +1 -1
  126. package/dist/signing/types.d.ts +7 -10
  127. package/dist/signing/types.d.ts.map +1 -1
  128. package/dist/types/api-key.dto.d.ts +1 -1
  129. package/dist/types/ban.dto.d.ts +21 -16
  130. package/dist/types/ban.dto.d.ts.map +1 -1
  131. package/dist/types/burn.dto.d.ts +4 -2
  132. package/dist/types/burn.dto.d.ts.map +1 -1
  133. package/dist/types/chat-messages.dto.d.ts +10 -72
  134. package/dist/types/chat-messages.dto.d.ts.map +1 -1
  135. package/dist/types/comments.dto.d.ts +8 -78
  136. package/dist/types/comments.dto.d.ts.map +1 -1
  137. package/dist/types/common.d.ts +42 -85
  138. package/dist/types/common.d.ts.map +1 -1
  139. package/dist/types/constraints.d.ts +47 -23
  140. package/dist/types/constraints.d.ts.map +1 -1
  141. package/dist/types/content-flag.dto.d.ts +5 -1
  142. package/dist/types/content-flag.dto.d.ts.map +1 -1
  143. package/dist/types/content-reactions.dto.d.ts +0 -4
  144. package/dist/types/content-reactions.dto.d.ts.map +1 -1
  145. package/dist/types/dto.d.ts +0 -5
  146. package/dist/types/dto.d.ts.map +1 -1
  147. package/dist/types/engagement-stats.dto.d.ts +16 -27
  148. package/dist/types/engagement-stats.dto.d.ts.map +1 -1
  149. package/dist/types/events.dto.d.ts +89 -0
  150. package/dist/types/events.dto.d.ts.map +1 -1
  151. package/dist/types/global-feed.dto.d.ts +23 -164
  152. package/dist/types/global-feed.dto.d.ts.map +1 -1
  153. package/dist/types/health.dto.d.ts +32 -0
  154. package/dist/types/health.dto.d.ts.map +1 -0
  155. package/dist/types/launchpad.dto.d.ts +77 -323
  156. package/dist/types/launchpad.dto.d.ts.map +1 -1
  157. package/dist/types/lock.dto.d.ts +12 -7
  158. package/dist/types/lock.dto.d.ts.map +1 -1
  159. package/dist/types/messages.dto.d.ts +168 -118
  160. package/dist/types/messages.dto.d.ts.map +1 -1
  161. package/dist/types/moderator.dto.d.ts +1 -1
  162. package/dist/types/options.dto.d.ts +8 -36
  163. package/dist/types/options.dto.d.ts.map +1 -1
  164. package/dist/types/overseer.dto.d.ts +2 -1
  165. package/dist/types/overseer.dto.d.ts.map +1 -1
  166. package/dist/types/platform-stats.dto.d.ts +3 -3
  167. package/dist/types/realtime-events.dto.d.ts +340 -0
  168. package/dist/types/realtime-events.dto.d.ts.map +1 -0
  169. package/dist/types/restricted-names.dto.d.ts +2 -2
  170. package/dist/types/restricted-names.dto.d.ts.map +1 -1
  171. package/dist/types/stream-chat.dto.d.ts +15 -14
  172. package/dist/types/stream-chat.dto.d.ts.map +1 -1
  173. package/dist/types/streaming.dto.d.ts +73 -104
  174. package/dist/types/streaming.dto.d.ts.map +1 -1
  175. package/dist/types/token-ban.dto.d.ts.map +1 -1
  176. package/dist/types/token-config.dto.d.ts +34 -19
  177. package/dist/types/token-config.dto.d.ts.map +1 -1
  178. package/dist/types/trades-query.dto.d.ts +8 -24
  179. package/dist/types/trades-query.dto.d.ts.map +1 -1
  180. package/dist/types/user.dto.d.ts +133 -112
  181. package/dist/types/user.dto.d.ts.map +1 -1
  182. package/dist/types/websocket-events.dto.d.ts +5 -5
  183. package/dist/types/websocket-events.dto.d.ts.map +1 -1
  184. package/dist/utils/address-formatter.d.ts +25 -2
  185. package/dist/utils/address-formatter.d.ts.map +1 -1
  186. package/dist/utils/agent-config.d.ts +9 -4
  187. package/dist/utils/agent-config.d.ts.map +1 -1
  188. package/dist/utils/auto-pagination.d.ts +7 -240
  189. package/dist/utils/auto-pagination.d.ts.map +1 -1
  190. package/dist/utils/bignumber-helpers.d.ts +3 -2
  191. package/dist/utils/bignumber-helpers.d.ts.map +1 -1
  192. package/dist/utils/delimiter-parser.d.ts +0 -13
  193. package/dist/utils/delimiter-parser.d.ts.map +1 -1
  194. package/dist/utils/error-factories.d.ts +4 -3
  195. package/dist/utils/error-factories.d.ts.map +1 -1
  196. package/dist/utils/error-patterns.d.ts +0 -47
  197. package/dist/utils/error-patterns.d.ts.map +1 -1
  198. package/dist/utils/error-wrapper.d.ts +5 -5
  199. package/dist/utils/errors.d.ts +53 -318
  200. package/dist/utils/errors.d.ts.map +1 -1
  201. package/dist/utils/http.d.ts +36 -3
  202. package/dist/utils/http.d.ts.map +1 -1
  203. package/dist/utils/message-validators.d.ts.map +1 -1
  204. package/dist/utils/pagination-helpers.d.ts +17 -0
  205. package/dist/utils/pagination-helpers.d.ts.map +1 -1
  206. package/dist/utils/pagination-validation.d.ts +2 -2
  207. package/dist/utils/response-handlers.d.ts.map +1 -1
  208. package/dist/utils/service-validators.d.ts +6 -6
  209. package/dist/utils/service-validators.d.ts.map +1 -1
  210. package/dist/utils/token-format-converter.d.ts +1 -1
  211. package/dist/utils/token-parser.d.ts +6 -127
  212. package/dist/utils/token-parser.d.ts.map +1 -1
  213. package/dist/utils/token-stringification.d.ts +7 -7
  214. package/dist/utils/token-stringification.d.ts.map +1 -1
  215. package/dist/utils/tokenNameNormalizer.d.ts +2 -2
  216. package/dist/utils/tokenNormalizer.d.ts +5 -29
  217. package/dist/utils/tokenNormalizer.d.ts.map +1 -1
  218. package/dist/utils/unique-key-generator.d.ts +7 -134
  219. package/dist/utils/unique-key-generator.d.ts.map +1 -1
  220. package/dist/utils/validation-helpers.d.ts +21 -64
  221. package/dist/utils/validation-helpers.d.ts.map +1 -1
  222. package/dist/utils/validation.d.ts +4 -1
  223. package/dist/utils/validation.d.ts.map +1 -1
  224. package/package.json +47 -87
  225. package/dist/api/dto/BurnTokensDto.d.ts +0 -77
  226. package/dist/api/dto/BurnTokensDto.d.ts.map +0 -1
  227. package/dist/api/dto/LockTokenDto.d.ts +0 -85
  228. package/dist/api/dto/LockTokenDto.d.ts.map +0 -1
  229. package/dist/api/dto/TransferTokenDto.d.ts +0 -64
  230. package/dist/api/dto/TransferTokenDto.d.ts.map +0 -1
  231. package/dist/api/dto/UnlockTokenDto.d.ts +0 -74
  232. package/dist/api/dto/UnlockTokenDto.d.ts.map +0 -1
  233. package/dist/bridge/BridgeService.d.ts +0 -484
  234. package/dist/bridge/BridgeService.d.ts.map +0 -1
  235. package/dist/bridge/GalaConnectClient.d.ts +0 -170
  236. package/dist/bridge/GalaConnectClient.d.ts.map +0 -1
  237. package/dist/bridge/constants/index.d.ts +0 -7
  238. package/dist/bridge/constants/index.d.ts.map +0 -1
  239. package/dist/bridge/constants/tokens.d.ts +0 -212
  240. package/dist/bridge/constants/tokens.d.ts.map +0 -1
  241. package/dist/bridge/index.d.ts +0 -24
  242. package/dist/bridge/index.d.ts.map +0 -1
  243. package/dist/bridge/public-types.d.ts +0 -2
  244. package/dist/bridge/public-types.d.ts.map +0 -1
  245. package/dist/bridge/strategies/BridgeStrategy.d.ts +0 -204
  246. package/dist/bridge/strategies/BridgeStrategy.d.ts.map +0 -1
  247. package/dist/bridge/strategies/EthereumBridgeStrategy.d.ts +0 -178
  248. package/dist/bridge/strategies/EthereumBridgeStrategy.d.ts.map +0 -1
  249. package/dist/bridge/strategies/SolanaBridgeStrategy.d.ts +0 -236
  250. package/dist/bridge/strategies/SolanaBridgeStrategy.d.ts.map +0 -1
  251. package/dist/bridge/types/bridge.dto.d.ts +0 -772
  252. package/dist/bridge/types/bridge.dto.d.ts.map +0 -1
  253. package/dist/bridge/types/bridgeable-token.dto.d.ts +0 -209
  254. package/dist/bridge/types/bridgeable-token.dto.d.ts.map +0 -1
  255. package/dist/bridge/types/eip712.d.ts +0 -66
  256. package/dist/bridge/types/eip712.d.ts.map +0 -1
  257. package/dist/bridge/types/index.d.ts +0 -8
  258. package/dist/bridge/types/index.d.ts.map +0 -1
  259. package/dist/bridge/utils/RateLimiter.d.ts +0 -34
  260. package/dist/bridge/utils/RateLimiter.d.ts.map +0 -1
  261. package/dist/bridge/utils/address-formatter.d.ts +0 -25
  262. package/dist/bridge/utils/address-formatter.d.ts.map +0 -1
  263. package/dist/bridge/utils/addressValidation.d.ts +0 -200
  264. package/dist/bridge/utils/addressValidation.d.ts.map +0 -1
  265. package/dist/bridge/utils/balanceHelpers.d.ts +0 -215
  266. package/dist/bridge/utils/balanceHelpers.d.ts.map +0 -1
  267. package/dist/bridge/utils/bridgeErrors.d.ts +0 -98
  268. package/dist/bridge/utils/bridgeErrors.d.ts.map +0 -1
  269. package/dist/bridge/utils/bridgeOutHelpers.d.ts +0 -68
  270. package/dist/bridge/utils/bridgeOutHelpers.d.ts.map +0 -1
  271. package/dist/bridge/utils/bridgePayload.d.ts +0 -98
  272. package/dist/bridge/utils/bridgePayload.d.ts.map +0 -1
  273. package/dist/bridge/utils/bridgeStatusParser.d.ts +0 -76
  274. package/dist/bridge/utils/bridgeStatusParser.d.ts.map +0 -1
  275. package/dist/bridge/utils/eip712Helpers.d.ts +0 -66
  276. package/dist/bridge/utils/eip712Helpers.d.ts.map +0 -1
  277. package/dist/bridge/utils/index.d.ts +0 -19
  278. package/dist/bridge/utils/index.d.ts.map +0 -1
  279. package/dist/bridge/utils/retry.d.ts +0 -112
  280. package/dist/bridge/utils/retry.d.ts.map +0 -1
  281. package/dist/bridge/utils/strategyDelegation.d.ts +0 -126
  282. package/dist/bridge/utils/strategyDelegation.d.ts.map +0 -1
  283. package/dist/bridge/utils/tokenIdUtils.d.ts +0 -86
  284. package/dist/bridge/utils/tokenIdUtils.d.ts.map +0 -1
  285. package/dist/bridge/utils/tokenMath.d.ts +0 -39
  286. package/dist/bridge/utils/tokenMath.d.ts.map +0 -1
  287. package/dist/bridge/utils/tokenMetadataResolver.d.ts +0 -97
  288. package/dist/bridge/utils/tokenMetadataResolver.d.ts.map +0 -1
  289. package/dist/helpers/wallet.d.ts +0 -151
  290. package/dist/helpers/wallet.d.ts.map +0 -1
  291. package/dist/react/WalletContext.d.ts +0 -60
  292. package/dist/react/WalletContext.d.ts.map +0 -1
  293. package/dist/react/index.d.ts +0 -65
  294. package/dist/react/index.d.ts.map +0 -1
  295. package/dist/react/types.d.ts +0 -76
  296. package/dist/react/types.d.ts.map +0 -1
  297. package/dist/react/useWallet.d.ts +0 -123
  298. package/dist/react/useWallet.d.ts.map +0 -1
  299. package/dist/react/useWalletConnection.d.ts +0 -89
  300. package/dist/react/useWalletConnection.d.ts.map +0 -1
  301. package/dist/react/useWalletDetection.d.ts +0 -81
  302. package/dist/react/useWalletDetection.d.ts.map +0 -1
  303. package/dist/react.cjs +0 -1
  304. package/dist/react.esm.js +0 -1
  305. package/dist/services/AbstractTokenFetchService.d.ts +0 -150
  306. package/dist/services/AbstractTokenFetchService.d.ts.map +0 -1
  307. package/dist/services/BatchedCacheService.d.ts +0 -133
  308. package/dist/services/BatchedCacheService.d.ts.map +0 -1
  309. package/dist/services/BridgeableTokenCache.d.ts +0 -120
  310. package/dist/services/BridgeableTokenCache.d.ts.map +0 -1
  311. package/dist/services/BridgeableTokenService.d.ts +0 -218
  312. package/dist/services/BridgeableTokenService.d.ts.map +0 -1
  313. package/dist/services/DexService.d.ts +0 -440
  314. package/dist/services/DexService.d.ts.map +0 -1
  315. package/dist/services/NetworkKeyedCacheService.d.ts +0 -185
  316. package/dist/services/NetworkKeyedCacheService.d.ts.map +0 -1
  317. package/dist/services/PriceHistoryService.d.ts +0 -209
  318. package/dist/services/PriceHistoryService.d.ts.map +0 -1
  319. package/dist/services/StreamingEventService.d.ts +0 -441
  320. package/dist/services/StreamingEventService.d.ts.map +0 -1
  321. package/dist/services/WrapService.d.ts +0 -171
  322. package/dist/services/WrapService.d.ts.map +0 -1
  323. package/dist/services/WrappableTokenCache.d.ts +0 -100
  324. package/dist/services/WrappableTokenCache.d.ts.map +0 -1
  325. package/dist/services/WrappableTokenService.d.ts +0 -130
  326. package/dist/services/WrappableTokenService.d.ts.map +0 -1
  327. package/dist/setup.d.ts +0 -8
  328. package/dist/setup.d.ts.map +0 -1
  329. package/dist/tokens/transfers.d.ts +0 -95
  330. package/dist/tokens/transfers.d.ts.map +0 -1
  331. package/dist/types/comment.dto.d.ts +0 -176
  332. package/dist/types/comment.dto.d.ts.map +0 -1
  333. package/dist/types/galachain-api.types.d.ts +0 -297
  334. package/dist/types/galachain-api.types.d.ts.map +0 -1
  335. package/dist/types/priceHistory.dto.d.ts +0 -134
  336. package/dist/types/priceHistory.dto.d.ts.map +0 -1
  337. package/dist/types/streaming-events.dto.d.ts +0 -605
  338. package/dist/types/streaming-events.dto.d.ts.map +0 -1
  339. package/dist/types/token.types.d.ts +0 -359
  340. package/dist/types/token.types.d.ts.map +0 -1
  341. package/dist/types/wrappable-token.dto.d.ts +0 -305
  342. package/dist/types/wrappable-token.dto.d.ts.map +0 -1
  343. package/dist/utils/crypto-compat.d.ts +0 -40
  344. package/dist/utils/crypto-compat.d.ts.map +0 -1
  345. package/dist/utils/load-env.d.ts +0 -31
  346. package/dist/utils/load-env.d.ts.map +0 -1
  347. package/dist/utils/token-instance-key.d.ts +0 -57
  348. package/dist/utils/token-instance-key.d.ts.map +0 -1
  349. package/dist/utils/wallet.d.ts +0 -166
  350. package/dist/utils/wallet.d.ts.map +0 -1
  351. package/dist/wallet/ExternalWalletProvider.d.ts +0 -90
  352. package/dist/wallet/ExternalWalletProvider.d.ts.map +0 -1
  353. package/dist/wallet/GalaWalletProvider.d.ts +0 -122
  354. package/dist/wallet/GalaWalletProvider.d.ts.map +0 -1
  355. package/dist/wallet/PrivateKeyProvider.d.ts +0 -90
  356. package/dist/wallet/PrivateKeyProvider.d.ts.map +0 -1
  357. package/dist/wallet/detection.d.ts +0 -107
  358. package/dist/wallet/detection.d.ts.map +0 -1
  359. package/dist/wallet/event-handlers.d.ts +0 -50
  360. package/dist/wallet/event-handlers.d.ts.map +0 -1
  361. package/dist/wallet/index.d.ts +0 -51
  362. package/dist/wallet/index.d.ts.map +0 -1
  363. package/dist/wallet/signing-operation.d.ts +0 -19
  364. package/dist/wallet/signing-operation.d.ts.map +0 -1
  365. package/dist/wallet/typed-data-helpers.d.ts +0 -68
  366. package/dist/wallet/typed-data-helpers.d.ts.map +0 -1
  367. package/dist/wallet/types.d.ts +0 -267
  368. package/dist/wallet/types.d.ts.map +0 -1
  369. package/dist/wallet/utils.d.ts +0 -117
  370. package/dist/wallet/utils.d.ts.map +0 -1
  371. package/dist/wallet.cjs +0 -1
  372. package/dist/wallet.esm.js +0 -1
@@ -1,171 +0,0 @@
1
- /**
2
- * WrapService - Cross-channel token wrapping/unwrapping
3
- *
4
- * Handles internal GalaChain channel bridges:
5
- * - Wrap: MUSIC (music channel) → GMUSIC (asset channel)
6
- * - Unwrap: GMUSIC (asset channel) → MUSIC (music channel)
7
- *
8
- * This is different from external bridges (Ethereum/Solana) - wrap/unwrap
9
- * operates entirely within GalaChain across different channels.
10
- *
11
- * @category Services
12
- * @since 4.0.18
13
- */
14
- import type { Wallet } from 'ethers';
15
- import type { GalaConnectClient } from '../bridge/GalaConnectClient.js';
16
- import type { GalaChainSigner } from '../signing/signers.js';
17
- import type { TokenId } from '../types/common.js';
18
- import type { UnwrapTokenOptions, WrapTokenOptions, WrapUnwrapFeeEstimate, WrapUnwrapResult, WrapUnwrapStatusResult } from '../types/wrappable-token.dto.js';
19
- import type { Logger } from '../utils/Logger.js';
20
- import { LoggerBase } from './BaseService.js';
21
- import type { WrappableTokenService } from './WrappableTokenService.js';
22
- /**
23
- * Configuration for WrapService
24
- */
25
- export interface WrapServiceConfig {
26
- /** GalaConnect client for DEX API platform (same as bridge operations) */
27
- galaConnectClient: GalaConnectClient;
28
- /** WrappableTokenService for token metadata */
29
- wrappableTokenService: WrappableTokenService;
30
- /** Optional native GalaChain signer. */
31
- signer?: GalaChainSigner;
32
- /** Wallet used to create a native signer when signer is omitted. */
33
- wallet?: Wallet;
34
- /** Wallet address (for sender) */
35
- walletAddress?: string;
36
- /** Logger instance */
37
- logger?: Logger;
38
- }
39
- /**
40
- * WrapService - Cross-channel token wrapping/unwrapping
41
- *
42
- * Provides methods to wrap tokens from their native channel to the asset channel
43
- * (e.g., MUSIC → GMUSIC) and unwrap them back (GMUSIC → MUSIC).
44
- *
45
- * @example
46
- * ```typescript
47
- * // Wrap MUSIC to GMUSIC for DEX trading
48
- * const wrapResult = await wrapService.wrapToken({
49
- * tokenId: 'MUSIC',
50
- * amount: '100',
51
- * });
52
- *
53
- * // Unwrap GMUSIC back to MUSIC
54
- * const unwrapResult = await wrapService.unwrapToken({
55
- * tokenId: 'GMUSIC',
56
- * amount: '50',
57
- * });
58
- * ```
59
- */
60
- export declare class WrapService extends LoggerBase {
61
- private readonly galaConnectClient;
62
- private readonly wrappableTokenService;
63
- private readonly nativeSigner;
64
- private readonly walletAddress;
65
- constructor(config: WrapServiceConfig);
66
- /**
67
- * Wrap a token to its asset-channel counterpart
68
- *
69
- * Transfers a token from its native channel to the asset channel.
70
- * Example: MUSIC (music channel) → GMUSIC (asset channel)
71
- *
72
- * @param options - Wrap options including tokenId and amount
73
- * @returns Promise<WrapUnwrapResult> - Transaction result
74
- *
75
- * @example
76
- * ```typescript
77
- * const result = await wrapService.wrapToken({
78
- * tokenId: 'MUSIC',
79
- * amount: '100',
80
- * });
81
- * console.log(`Wrapped ${result.amount} ${result.fromToken} → ${result.toToken}`);
82
- * ```
83
- *
84
- * @throws {ValidationError} If token is not wrappable or already on asset channel
85
- */
86
- wrapToken(options: WrapTokenOptions): Promise<WrapUnwrapResult>;
87
- /**
88
- * Unwrap a token back to its native channel
89
- *
90
- * Transfers a token from the asset channel back to its native channel.
91
- * Example: GMUSIC (asset channel) → MUSIC (music channel)
92
- *
93
- * @param options - Unwrap options including tokenId and amount
94
- * @returns Promise<WrapUnwrapResult> - Transaction result
95
- *
96
- * @example
97
- * ```typescript
98
- * const result = await wrapService.unwrapToken({
99
- * tokenId: 'GMUSIC',
100
- * amount: '50',
101
- * });
102
- * console.log(`Unwrapped ${result.amount} ${result.fromToken} → ${result.toToken}`);
103
- * ```
104
- *
105
- * @throws {ValidationError} If token is not unwrappable or not on asset channel
106
- */
107
- unwrapToken(options: UnwrapTokenOptions): Promise<WrapUnwrapResult>;
108
- /**
109
- * Estimate fees for a wrap operation
110
- *
111
- * @param tokenId - Token to wrap
112
- * @param amount - Amount to wrap
113
- * @returns Promise<WrapUnwrapFeeEstimate> - Fee estimate
114
- * @throws ValidationError if tokenId or amount is required but not provided
115
- */
116
- estimateWrapFee(tokenId: TokenId, _amount: string): Promise<WrapUnwrapFeeEstimate>;
117
- /**
118
- * Estimate fees for an unwrap operation
119
- *
120
- * @param tokenId - Token to unwrap
121
- * @param amount - Amount to unwrap
122
- * @returns Promise<WrapUnwrapFeeEstimate> - Fee estimate
123
- * @throws ValidationError if tokenId or amount is required but not provided
124
- */
125
- estimateUnwrapFee(tokenId: TokenId, _amount: string): Promise<WrapUnwrapFeeEstimate>;
126
- /**
127
- * Get status of a wrap/unwrap transaction
128
- *
129
- * Cross-channel wrapping completes immediately (synchronous on-chain).
130
- * This method returns the completed status for the given transaction ID.
131
- *
132
- * @param transactionId - Transaction ID to check
133
- * @returns WrapUnwrapStatusResult - Current status (always completed for wrap/unwrap)
134
- * @throws ValidationError if transactionId is required but not provided
135
- */
136
- getWrapStatus(transactionId: string): WrapUnwrapStatusResult;
137
- private executeWrapOrUnwrap;
138
- private estimateChannelFee;
139
- /**
140
- * Execute a cross-channel bridge (wrap or unwrap)
141
- *
142
- * Uses the shared native GalaChain signer for the bridge request.
143
- *
144
- * @see docs/api-calls/swapBridgeOut.txt for working payload example
145
- */
146
- private executeChannelBridge;
147
- /**
148
- * Execute wrap bridge request with comprehensive error handling
149
- *
150
- * Uses direct try-catch (not withErrorHandling wrapper) because this method
151
- * returns structured error responses (WrapUnwrapResult with success: false)
152
- * rather than throwing. This is appropriate for a private helper method that
153
- * normalizes errors into the return type.
154
- */
155
- private executeWrapBridgeRequest;
156
- /**
157
- * Determine channel routing for wrap/unwrap operation
158
- *
159
- * The destinationChannelId determines where tokens go:
160
- * - Wrap: native channel → asset channel (destinationChannelId = ASSET = 1)
161
- * - Unwrap: asset channel → native channel (destinationChannelId = MUSIC = 3)
162
- */
163
- private determineChannelRouting;
164
- private getCounterpartOrThrow;
165
- private getWrappableTokenOrThrow;
166
- /**
167
- * Format tokenId for error messages using centralized stringification
168
- */
169
- private formatTokenId;
170
- }
171
- //# sourceMappingURL=WrapService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrapService.d.ts","sourceRoot":"","sources":["../../src/services/WrapService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGrC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EACV,kBAAkB,EAElB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAcxE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,0EAA0E;IAC1E,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,+CAA+C;IAC/C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,wCAAwC;IACxC,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA4CD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,WAAY,SAAQ,UAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;IACtD,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAwB;IAC9D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA8B;IAC3D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqB;gBAEvC,MAAM,EAAE,iBAAiB;IAarC;;;;;;;;;;;;;;;;;;;OAmBG;IACG,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIrE;;;;;;;;;;;;;;;;;;;OAmBG;IACG,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIzE;;;;;;;OAOG;IACG,eAAe,CACnB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,qBAAqB,CAAC;IAIjC;;;;;;;OAOG;IACG,iBAAiB,CACrB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,qBAAqB,CAAC;IAIjC;;;;;;;;;OASG;IACH,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,sBAAsB;YAsB9C,mBAAmB;YA+BnB,kBAAkB;IAoChC;;;;;;OAMG;YACW,oBAAoB;IA0ElC;;;;;;;OAOG;YACW,wBAAwB;IAqItC;;;;;;OAMG;IACH,OAAO,CAAC,uBAAuB;YAwBjB,qBAAqB;YAYrB,wBAAwB;IAYtC;;OAEG;IACH,OAAO,CAAC,aAAa;CAMtB"}
@@ -1,100 +0,0 @@
1
- /**
2
- * Wrappable Token Cache Service
3
- *
4
- * Permanent in-memory cache for wrappable tokens fetched from DEX API.
5
- * Wrappable tokens are GalaChain-internal token pairs that can be
6
- * wrapped/unwrapped into each other (e.g., MUSIC <-> GMUSIC).
7
- *
8
- * ## Cache Architecture
9
- * - **Primary Index**: Map<tokenId, token> - O(1) by stringifiedTokenClassKey
10
- * - **Persistence**: Entire SDK lifetime (never expires)
11
- * - **Memory**: ~500-800 bytes per token (plus ~50 bytes per index entry)
12
- *
13
- * ## Caching Strategy
14
- * - Metadata always cached by fetchWrappableTokens/fetchAllWrappableTokens
15
- * - Balance methods preheat cache while returning user-specific data
16
- * - No network separation (wrapping is GalaChain-internal)
17
- *
18
- * @category Services
19
- * @since 4.0.18
20
- */
21
- import type { WrappableToken, WrappableTokenCacheStats } from '../types/wrappable-token.dto.js';
22
- import { BatchedCacheService } from './BatchedCacheService.js';
23
- /**
24
- * Wrappable Token Cache
25
- *
26
- * High-performance permanent cache for wrappable token data.
27
- * Tokens are indexed by their stringifiedTokenClassKey for O(1) lookups.
28
- *
29
- * @example Basic usage
30
- * ```typescript
31
- * const cache = new WrappableTokenCache();
32
- *
33
- * // Cache all tokens
34
- * cache.setAll(wrappableTokens);
35
- *
36
- * // Check if cached
37
- * if (cache.has()) {
38
- * const tokens = cache.getAll();
39
- * }
40
- *
41
- * // Get specific token by tokenId
42
- * const music = cache.getByTokenId('$MUSIC|Unit|none|none');
43
- * ```
44
- */
45
- export declare class WrappableTokenCache extends BatchedCacheService<WrappableToken, WrappableTokenCacheStats> {
46
- constructor(debugMode?: boolean);
47
- /**
48
- * Extract the cache key from a wrappable token
49
- *
50
- * @param token - Wrappable token
51
- * @returns The stringifiedTokenClassKey as the key
52
- */
53
- protected extractKey(token: WrappableToken): string;
54
- /**
55
- * Check if cache is populated
56
- *
57
- * @returns True if cache has tokens
58
- */
59
- has(): boolean;
60
- /**
61
- * Get all cached tokens
62
- *
63
- * @returns Array of wrappable tokens (empty if not cached)
64
- */
65
- getAll(): WrappableToken[];
66
- /**
67
- * Get a specific token by stringifiedTokenClassKey (tokenId)
68
- *
69
- * @param tokenId - Stringified TokenClassKey (e.g., "$MUSIC|Unit|none|none")
70
- * @returns Wrappable token or undefined if not found
71
- */
72
- getByTokenId(tokenId: string): WrappableToken | undefined;
73
- /**
74
- * Get cache statistics
75
- *
76
- * @returns Cache statistics including token count and timestamp
77
- */
78
- getStats(): WrappableTokenCacheStats;
79
- /**
80
- * Get number of cached tokens
81
- *
82
- * @returns Number of cached tokens
83
- */
84
- size(): number;
85
- /**
86
- * Check if a token is wrappable (exists in cache)
87
- *
88
- * @param tokenId - Stringified TokenClassKey
89
- * @returns True if token is cached
90
- */
91
- isTokenWrappable(tokenId: string): boolean;
92
- /**
93
- * Get wrap counterpart for a token
94
- *
95
- * @param tokenId - Stringified TokenClassKey
96
- * @returns Counterpart token or undefined if not found
97
- */
98
- getWrapCounterpart(tokenId: string): WrappableToken | undefined;
99
- }
100
- //# sourceMappingURL=WrappableTokenCache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrappableTokenCache.d.ts","sourceRoot":"","sources":["../../src/services/WrappableTokenCache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,mBAAoB,SAAQ,mBAAmB,CAAC,cAAc,EAAE,wBAAwB,CAAC;gBACxF,SAAS,GAAE,OAAe;IAItC;;;;;OAKG;IACH,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM;IAInD;;;;OAIG;IACM,GAAG,IAAI,OAAO;IAIvB;;;;OAIG;IACH,MAAM,IAAI,cAAc,EAAE;IAI1B;;;;;OAKG;IACI,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAIhE;;;;OAIG;IACa,QAAQ,IAAI,wBAAwB;IAQpD;;;;OAIG;IACM,IAAI,IAAI,MAAM;IAIvB;;;;;OAKG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAI1C;;;;;OAKG;IACH,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;CAMhE"}
@@ -1,130 +0,0 @@
1
- /**
2
- * Wrappable Token Service
3
- *
4
- * Service for fetching and caching wrappable tokens from the DEX API.
5
- * Provides methods to query which tokens can be wrapped/unwrapped
6
- * and retrieves their counterpart tokens dynamically.
7
- *
8
- * ## Key Features
9
- * - Dynamic token discovery (fetches from DEX API)
10
- * - Permanent caching for token metadata
11
- * - Separate balance methods for user-specific queries
12
- *
13
- * ## Caching Strategy
14
- * - Token metadata is always cached (fetchWrappableTokens, fetchAllWrappableTokens)
15
- * - Balance methods never cache (fetchWrappableTokenBalances, fetchAllWrappableTokenBalances)
16
- * - Cache persists for entire SDK lifetime
17
- *
18
- * @category Services
19
- * @since 4.0.18
20
- */
21
- import type { TokenId } from '../types/common.js';
22
- import type { FetchWrappableTokensOptions, FetchWrappableTokensResult, IsTokenWrappableResult, WrappableToken, WrappableTokenApiResponse, WrappableTokenCacheStats } from '../types/wrappable-token.dto.js';
23
- import type { HttpClient } from '../utils/http.js';
24
- import { AbstractTokenFetchService } from './AbstractTokenFetchService.js';
25
- /**
26
- * WrappableTokenService
27
- *
28
- * Fetches and caches wrappable token information from the DEX API.
29
- * Provides efficient lookups for wrap/unwrap operations.
30
- *
31
- * @example Basic usage
32
- * ```typescript
33
- * const service = new WrappableTokenService(dexApiHttp, true);
34
- *
35
- * // Fetch all wrappable tokens (cached)
36
- * const result = await service.fetchAllWrappableTokens();
37
- * console.log(`Found ${result.tokenCount} tokens`);
38
- *
39
- * // Fetch with balance data for a specific address (not cached)
40
- * const withBalances = await service.fetchAllWrappableTokenBalances('eth|0x1234...');
41
- * console.log(`Found ${withBalances.tokenCount} tokens with balances`);
42
- *
43
- * // Check if a specific token is wrappable (by tokenId)
44
- * const isWrappable = await service.isTokenWrappable('$MUSIC|Unit|none|none');
45
- * console.log(`MUSIC wrappable: ${isWrappable.isWrappable}`);
46
- *
47
- * // Get wrap counterpart
48
- * const counterpart = await service.getWrapCounterpart('$MUSIC|Unit|none|none');
49
- * console.log(`MUSIC counterpart: ${counterpart?.symbol}`); // GMUSIC
50
- * ```
51
- */
52
- export declare class WrappableTokenService extends AbstractTokenFetchService<WrappableTokenApiResponse, WrappableToken> {
53
- private readonly cache;
54
- constructor(dexApiHttp: HttpClient, debugMode?: boolean);
55
- /**
56
- * Build API request parameters for wrappable tokens
57
- *
58
- * @param _context - Unused context parameter (required by base class)
59
- * @returns Query parameters with wrappable filter
60
- */
61
- protected buildApiParams(context?: Record<string, unknown>): Record<string, string | number | boolean>;
62
- /**
63
- * Transform API response tokens to SDK format
64
- *
65
- * @param apiTokens - Raw API response tokens
66
- * @returns Array of transformed wrappable tokens
67
- */
68
- protected transformApiResponse(apiTokens: WrappableTokenApiResponse[]): WrappableToken[];
69
- /**
70
- * Fetch wrappable tokens with pagination (metadata only, cached)
71
- *
72
- * For user-specific balance data, use fetchWrappableTokenBalances() instead.
73
- *
74
- * @param options - Fetch options including pagination parameters
75
- * @returns Promise resolving to fetch result with tokens array
76
- * @throws NetworkError if API request fails
77
- */
78
- fetchWrappableTokens(options?: FetchWrappableTokensOptions): Promise<FetchWrappableTokensResult>;
79
- /**
80
- * Fetch ALL wrappable tokens (auto-pagination, cached)
81
- *
82
- * Returns cached data if available, otherwise fetches from API.
83
- * For user-specific balance data, use fetchAllWrappableTokenBalances() instead.
84
- *
85
- * @returns Promise resolving to fetch result with all tokens
86
- * @throws NetworkError if API request fails
87
- */
88
- fetchAllWrappableTokens(): Promise<FetchWrappableTokensResult>;
89
- /**
90
- * Get a wrappable token by tokenId
91
- *
92
- * Uses cache for efficient lookup. If cache not populated, fetches first.
93
- *
94
- * @param tokenId - Token identifier (pipe-delimited or TokenClassKey)
95
- * @returns Promise resolving to wrappable token or undefined
96
- */
97
- getWrappableToken(tokenId: TokenId): Promise<WrappableToken | undefined>;
98
- /**
99
- * Get the wrap counterpart for a token
100
- *
101
- * @param tokenId - Token identifier (pipe-delimited or TokenClassKey)
102
- * @returns Promise resolving to counterpart token or undefined
103
- *
104
- * @example
105
- * ```typescript
106
- * // Get GMUSIC from MUSIC
107
- * const counterpart = await service.getWrapCounterpart('$MUSIC|Unit|none|none');
108
- * console.log(counterpart?.symbol); // "GMUSIC"
109
- * ```
110
- */
111
- getWrapCounterpart(tokenId: TokenId): Promise<WrappableToken | undefined>;
112
- /**
113
- * Check if a token is wrappable
114
- *
115
- * @param tokenId - Token identifier (pipe-delimited or TokenClassKey)
116
- * @returns Promise resolving to wrappability result
117
- */
118
- isTokenWrappable(tokenId: TokenId): Promise<IsTokenWrappableResult>;
119
- /**
120
- * Get cache statistics
121
- *
122
- * @returns Cache statistics including token count and timestamp
123
- */
124
- getCacheStats(): WrappableTokenCacheStats;
125
- /**
126
- * Clear cache
127
- */
128
- clearCache(): void;
129
- }
130
- //# sourceMappingURL=WrappableTokenService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WrappableTokenService.d.ts","sourceRoot":"","sources":["../../src/services/WrappableTokenService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,sBAAsB,EACtB,cAAc,EACd,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAI3E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,qBAAsB,SAAQ,yBAAyB,CAClE,yBAAyB,EACzB,cAAc,CACf;IACC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;gBAEhC,UAAU,EAAE,UAAU,EAAE,SAAS,GAAE,OAAe;IAK9D;;;;;OAKG;IACH,SAAS,CAAC,cAAc,CACtB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAK5C;;;;;OAKG;IACH,SAAS,CAAC,oBAAoB,CAAC,SAAS,EAAE,yBAAyB,EAAE,GAAG,cAAc,EAAE;IAwCxF;;;;;;;;OAQG;IACG,oBAAoB,CACxB,OAAO,GAAE,2BAAgC,GACxC,OAAO,CAAC,0BAA0B,CAAC;IAoCtC;;;;;;;;OAQG;IACG,uBAAuB,IAAI,OAAO,CAAC,0BAA0B,CAAC;IAqBpE;;;;;;;OAOG;IACG,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAqB9E;;;;;;;;;;;;OAYG;IACG,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAO/E;;;;;OAKG;IACG,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,sBAAsB,CAAC;IA6BzE;;;;OAIG;IACH,aAAa,IAAI,wBAAwB;IAIzC;;OAEG;IACH,UAAU,IAAI,IAAI;CAGnB"}
package/dist/setup.d.ts DELETED
@@ -1,8 +0,0 @@
1
- /**
2
- * Vitest setup file for test environment configuration
3
- *
4
- * This file is placed in src/ to satisfy TypeScript's rootDir configuration
5
- * while remaining in the test environment setup pipeline via vitest.config.ts
6
- */
7
- export {};
8
- //# sourceMappingURL=setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -1,95 +0,0 @@
1
- import type { GalaChainSigner } from '../signing/signers.js';
2
- import type { HttpRequestor } from '../launchpad/bundle-submission.js';
3
- /** A four-part GalaChain token class key. */
4
- export interface TokenClassKey {
5
- collection: string;
6
- category: string;
7
- type: string;
8
- additionalKey: string;
9
- }
10
- /** Token identifier accepted by token writes. */
11
- export type TokenIdentifier = TokenClassKey | string;
12
- /** Common input for a single token mutation. */
13
- export interface TokenAmountInput {
14
- /**
15
- * The token's explicit class key: an object, or a `|`- / `$`-delimited string. A symbol is
16
- * never accepted: a class key cannot be derived from a symbol. Resolve a launchpad token name
17
- * with `sdk.resolveTokenClassKey(tokenName)` first.
18
- */
19
- tokenClassKey: TokenIdentifier;
20
- quantity: string;
21
- instance?: string;
22
- uniqueKey?: string;
23
- }
24
- /** Input for a token transfer. */
25
- export interface TransferInput extends TokenAmountInput {
26
- to: string;
27
- }
28
- /** Lock-specific token write input. */
29
- export interface LockInput extends TokenAmountInput {
30
- lockAuthority?: string;
31
- expires?: number;
32
- name?: string;
33
- }
34
- /** Result returned by direct gateway token writes. */
35
- export interface ChainResult<T = unknown> {
36
- status: 'PROCESSED';
37
- data: T;
38
- transactionId?: string;
39
- blockNumber?: number;
40
- }
41
- /** Native-signed token-contract write client. */
42
- export declare class TokenWrites {
43
- private readonly gatewayBaseUrl;
44
- private readonly signer;
45
- private readonly walletAddress;
46
- private readonly requestor;
47
- /** Create a token write client with a native signer and injectable HTTP. */
48
- constructor(options: {
49
- gatewayBaseUrl: string;
50
- dexBackendBaseUrl: string;
51
- signer: GalaChainSigner;
52
- walletAddress: string;
53
- httpRequestor?: HttpRequestor;
54
- });
55
- /**
56
- * Transfer a token through the direct token-contract gateway endpoint.
57
- * @example
58
- * ```typescript
59
- * const result = await sdk.tokens.transfer({ to: 'client|recipient', tokenClassKey: 'GALA|Unit|none|none', quantity: '1' });
60
- * console.log(result.transactionId, result.blockNumber);
61
- * ```
62
- */
63
- transfer(input: TransferInput): Promise<ChainResult>;
64
- /**
65
- * Burn tokens through the direct public gateway endpoint.
66
- * @example
67
- * ```typescript
68
- * const result = await sdk.tokens.burn({ tokenClassKey: 'GALA|Unit|none|none', quantity: '1' });
69
- * console.log(result.status);
70
- * ```
71
- */
72
- burn(input: TokenAmountInput): Promise<ChainResult>;
73
- /**
74
- * Lock tokens through the direct public gateway endpoint.
75
- * @example
76
- * ```typescript
77
- * await sdk.tokens.lock({ tokenClassKey: 'GALA|Unit|none|none', quantity: '1' });
78
- * ```
79
- */
80
- lock(input: LockInput): Promise<ChainResult>;
81
- /**
82
- * Unlock tokens through the direct public gateway endpoint.
83
- * @example
84
- * ```typescript
85
- * await sdk.tokens.unlock({ tokenClassKey: 'GALA|Unit|none|none', quantity: '1' });
86
- * ```
87
- */
88
- unlock(input: TokenAmountInput & {
89
- name?: string;
90
- }): Promise<ChainResult>;
91
- private direct;
92
- private post;
93
- private signNative;
94
- }
95
- //# sourceMappingURL=transfers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transfers.d.ts","sourceRoot":"","sources":["../../src/tokens/transfers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,mCAAmC,CAAC;AAGrF,6CAA6C;AAC7C,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,iDAAiD;AACjD,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,MAAM,CAAC;AAErD,gDAAgD;AAChD,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,aAAa,EAAE,eAAe,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,kCAAkC;AAClC,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,uCAAuC;AACvC,MAAM,WAAW,SAAU,SAAQ,gBAAgB;IACjD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,CAAC,CAAC;IACR,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAcD,iDAAiD;AACjD,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;IAE1C,4EAA4E;gBACzD,OAAO,EAAE;QAC1B,cAAc,EAAE,MAAM,CAAC;QACvB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,MAAM,EAAE,eAAe,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,CAAC,EAAE,aAAa,CAAC;KAC/B;IAOD;;;;;;;OAOG;IACI,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,WAAW,CAAC;IAY3D;;;;;;;OAOG;IACI,IAAI,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC;IAQ1D;;;;;;OAMG;IACI,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC;IAenD;;;;;;OAMG;IACI,MAAM,CAAC,KAAK,EAAE,gBAAgB,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC;YAalE,MAAM;IA4BpB,OAAO,CAAC,IAAI;YAUE,UAAU;CASzB"}