@gala-chain/launchpad-sdk 4.0.5 → 4.0.7-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Gala Launchpad SDK
2
2
 
3
- **Version: 4.0.4-beta.0 (Beta)**
3
+ **Version: 4.0.5 (Latest Stable) | 4.0.4-beta.1 (Beta)**
4
4
 
5
5
  A comprehensive TypeScript SDK for the Gala Launchpad Backend API, providing type-safe authentication, trading, and real-time features for DeFi applications.
6
6
 
@@ -2138,8 +2138,21 @@ executeSwap(fromToken, toToken, amount, estimatedOutput, feeTier, slippageTolera
2138
2138
 
2139
2139
  // GSwap User Operations
2140
2140
  getSwapUserAssets(walletAddress): Promise<UserAsset[]>
2141
- // Returns: [{ tokenId, symbol, balance, decimals }, ...]
2142
- // Get user token balances across all DEX pools
2141
+ // Returns: [{ tokenId, symbol, name, description, image, balance, decimals, verified, compositeKey }, ...]
2142
+ // Get user token balances with rich metadata (v4.1.0+)
2143
+
2144
+ getAllSwapUserAssets(walletAddress): Promise<UserAsset[]>
2145
+ // Returns: All user tokens with rich metadata (auto-paginated)
2146
+ // Optimized: Stops fetching when zero-balance tokens encountered
2147
+
2148
+ // Token Discovery (no wallet required)
2149
+ fetchAvailableDexTokens({ search?, limit?, page? }): Promise<AvailableDexTokensResult>
2150
+ // Returns: { tokens: DexToken[], count, page, limit, hasMore }
2151
+ // Paginated token discovery with rich metadata
2152
+
2153
+ fetchAllAvailableDexTokens({ search? }): Promise<DexToken[]>
2154
+ // Returns: All available DEX tokens (auto-paginated)
2155
+ // Use for comprehensive token catalogs and listings
2143
2156
 
2144
2157
  getSwapPoolInfo(tokenA, tokenB): Promise<PoolInfo>
2145
2158
  // Returns: { tokenA, tokenB, liquidity, feeTiers, swapCount }
@@ -2196,12 +2209,25 @@ const swapResult = await gswapService.executeSwap({
2196
2209
  console.log(`Swap completed! TX: ${swapResult.transactionId}`);
2197
2210
  console.log(`Received: ${swapResult.outputAmount} GUSDC`);
2198
2211
 
2199
- // Query user assets on DEX
2212
+ // Query user assets on DEX (returns rich metadata)
2200
2213
  const assets = await gswapService.getUserAssets('eth|0x...');
2201
2214
  assets.forEach(asset => {
2202
- console.log(`${asset.symbol}: ${asset.balance}`);
2215
+ console.log(`${asset.symbol} (${asset.name}): ${asset.balance}`);
2216
+ console.log(` Image: ${asset.image}`);
2217
+ console.log(` Verified: ${asset.verified}`);
2203
2218
  });
2204
2219
 
2220
+ // Discover all available DEX tokens (no wallet required)
2221
+ const availableTokens = await sdk.fetchAvailableDexTokens({ limit: 20, page: 1 });
2222
+ console.log(`Found ${availableTokens.count} tokens on DEX`);
2223
+ availableTokens.tokens.forEach(token => {
2224
+ console.log(`${token.symbol}: ${token.name} - ${token.description}`);
2225
+ });
2226
+
2227
+ // Get ALL available tokens (auto-paginated)
2228
+ const allTokens = await sdk.fetchAllAvailableDexTokens();
2229
+ console.log(`Total: ${allTokens.length} tokens available on DEX`);
2230
+
2205
2231
  // Get pool information for token pair
2206
2232
  const poolInfo = await gswapService.getPoolInfo('GALA', 'GUSDC');
2207
2233
  console.log(`Liquidity: ${poolInfo.liquidity}`);