@gala-chain/launchpad-sdk 3.0.0 → 3.0.2
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 +9 -18
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/src/api/LaunchpadAPI.d.ts +4 -4
- package/dist/src/index.d.ts +1 -1
- package/dist/src/services/GalaChainService.d.ts +1 -1
- package/dist/src/services/LaunchpadService.d.ts +1 -1
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
# Gala Launchpad SDK v3.0.
|
|
1
|
+
# Gala Launchpad SDK v3.0.2
|
|
2
2
|
|
|
3
3
|
A comprehensive TypeScript SDK for the Gala Launchpad Backend API, providing type-safe authentication, trading, and real-time features for DeFi applications.
|
|
4
4
|
|
|
5
|
-
> **✨ New in v3.0.0**: Production-ready release with service-based architecture, AgentConfig utilities, and clean result types - zero breaking changes!
|
|
6
|
-
|
|
7
5
|
[](https://badge.fury.io/js/@gala-chain%2Flaunchpad-sdk)
|
|
8
6
|
[](https://opensource.org/licenses/MIT)
|
|
9
7
|
[](http://www.typescriptlang.org/)
|
|
@@ -45,15 +43,9 @@ console.log(`Last updated: ${balance.lastUpdated.toISOString()}`); // Date objec
|
|
|
45
43
|
**Direct result access with no wrapper overhead:**
|
|
46
44
|
|
|
47
45
|
```typescript
|
|
48
|
-
//
|
|
49
|
-
const result = await sdk.fetchPools({ type: 'recent' });
|
|
50
|
-
if (result.success) {
|
|
51
|
-
console.log(result.data.pools); // Nested access
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// After: Clean direct results
|
|
46
|
+
// Get pools with direct property access
|
|
55
47
|
const pools = await sdk.fetchPools({ type: 'recent' });
|
|
56
|
-
console.log(pools.pools); // Direct access
|
|
48
|
+
console.log(pools.pools); // Direct access to pool array
|
|
57
49
|
console.log(pools.total); // Immediate pagination info
|
|
58
50
|
console.log(pools.hasNext); // Computed convenience properties
|
|
59
51
|
```
|
|
@@ -76,13 +68,13 @@ console.log(pools.hasNext); // Computed convenience properties
|
|
|
76
68
|
## 📦 Installation
|
|
77
69
|
|
|
78
70
|
```bash
|
|
79
|
-
npm install @gala-chain/launchpad-sdk@^3.0.
|
|
71
|
+
npm install @gala-chain/launchpad-sdk@^3.0.2
|
|
80
72
|
```
|
|
81
73
|
|
|
82
74
|
Or with yarn:
|
|
83
75
|
|
|
84
76
|
```bash
|
|
85
|
-
yarn add @gala-chain/launchpad-sdk@^3.0.
|
|
77
|
+
yarn add @gala-chain/launchpad-sdk@^3.0.2
|
|
86
78
|
```
|
|
87
79
|
|
|
88
80
|
## 🏁 Quick Start
|
|
@@ -115,7 +107,7 @@ console.log(`Native token quantity: ${details.nativeTokenQuantity}`);
|
|
|
115
107
|
// Price Calculations - Direct amount access
|
|
116
108
|
const buyAmount = await sdk.calculateBuyAmount({
|
|
117
109
|
tokenName: 'dragnrkti',
|
|
118
|
-
amount: '
|
|
110
|
+
amount: '1', // 1 GALA
|
|
119
111
|
type: 'native'
|
|
120
112
|
});
|
|
121
113
|
console.log(`Buy amount: ${buyAmount.amount}`);
|
|
@@ -124,7 +116,7 @@ console.log(`Transaction fee: ${buyAmount.transactionFee}`);
|
|
|
124
116
|
// Trading Operations - Required expectedAmount and slippageToleranceFactor
|
|
125
117
|
const buyResult = await sdk.buy({
|
|
126
118
|
tokenName: 'dragnrkti',
|
|
127
|
-
amount: '
|
|
119
|
+
amount: '1',
|
|
128
120
|
type: 'native',
|
|
129
121
|
expectedAmount: buyAmount.amount, // Required: from calculation
|
|
130
122
|
slippageToleranceFactor: 0.05 // Required: decimal format (5% slippage)
|
|
@@ -272,7 +264,7 @@ const sdk = createLaunchpadSDK({
|
|
|
272
264
|
// Transfer GALA tokens - direct result access
|
|
273
265
|
const galaTransfer = await sdk.transferGala({
|
|
274
266
|
recipientAddress: 'eth|1234567890abcdef1234567890abcdef12345678', // or 0x format
|
|
275
|
-
amount: '
|
|
267
|
+
amount: '1', // 1 GALA
|
|
276
268
|
uniqueKey: 'galaconnect-operation-my-transfer-123' // Optional for idempotency
|
|
277
269
|
});
|
|
278
270
|
|
|
@@ -467,7 +459,7 @@ npm run lint
|
|
|
467
459
|
- [API Documentation](../../API.md) - Detailed API documentation
|
|
468
460
|
- [Examples](./examples/) - Code examples and demos
|
|
469
461
|
|
|
470
|
-
## 🏗️ Architecture
|
|
462
|
+
## 🏗️ Architecture
|
|
471
463
|
|
|
472
464
|
The SDK uses a **service-based architecture** with backend-aligned services:
|
|
473
465
|
|
|
@@ -522,7 +514,6 @@ import {
|
|
|
522
514
|
✅ **Type Safety**: Full TypeScript support across all services
|
|
523
515
|
✅ **Testability**: Services can be tested independently
|
|
524
516
|
✅ **Maintainability**: Easy to locate and update backend-specific logic
|
|
525
|
-
✅ **Zero Breaking Changes**: Public API remains unchanged (v3.0.0 is fully backward compatible)
|
|
526
517
|
|
|
527
518
|
### 🤖 AI Agent Integration
|
|
528
519
|
|