@gala-chain/launchpad-sdk 3.11.8 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README.md +69 -0
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.12.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Comprehensive documentation for CommonJS support and module formats
|
|
8
|
+
|
|
9
|
+
**SDK Updates:**
|
|
10
|
+
- Document all three module formats (ESM, CommonJS, UMD)
|
|
11
|
+
- Add module resolution table showing automatic format selection
|
|
12
|
+
- Clarify when to use each format with concrete examples
|
|
13
|
+
- Explain package.json exports configuration
|
|
14
|
+
|
|
15
|
+
**MCP Server Updates:**
|
|
16
|
+
- Document CommonJS module format
|
|
17
|
+
- Explain integration with SDK's multi-format support
|
|
18
|
+
- Clarify automatic format selection by Node.js
|
|
19
|
+
|
|
20
|
+
**Project Configuration (CLAUDE.md):**
|
|
21
|
+
- Enhanced Build System section with detailed format breakdown
|
|
22
|
+
- Added comprehensive "Launchpad SDK Module Formats (v3.12.0+)" section
|
|
23
|
+
- Include size monitoring metrics for all three bundles
|
|
24
|
+
|
|
25
|
+
## 3.12.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- Add CommonJS build support with proper exports configuration
|
|
30
|
+
- Export CommonJS bundle (`index.cjs.js`) via package.json exports field
|
|
31
|
+
- Maintain ESM as primary format with proper import/require resolution
|
|
32
|
+
- Add CommonJS bundle to size-limit checks
|
|
33
|
+
- Keep UMD bundle as "main" fallback for backward compatibility
|
|
34
|
+
|
|
35
|
+
Enables legacy CommonJS projects to import the SDK without requiring build tool transformations.
|
|
36
|
+
|
|
3
37
|
## 3.11.8
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -97,6 +97,75 @@ yarn add ethers@^6.15.0 @gala-chain/api@^2.4.3 @gala-chain/connect@^2.4.3 socket
|
|
|
97
97
|
|
|
98
98
|
**All peer dependencies are required** - this includes `socket.io-client` which is needed for transaction verification via WebSocket.
|
|
99
99
|
|
|
100
|
+
## Module Formats
|
|
101
|
+
|
|
102
|
+
The SDK is distributed in **three module formats** to support both modern and legacy projects:
|
|
103
|
+
|
|
104
|
+
### ESM (ES Modules) - Primary Format
|
|
105
|
+
|
|
106
|
+
**For modern bundlers and Node.js 16+:**
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
|
|
110
|
+
|
|
111
|
+
const sdk = createLaunchpadSDK({
|
|
112
|
+
wallet: 'your-private-key-or-mnemonic'
|
|
113
|
+
});
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**When to use:**
|
|
117
|
+
- ✅ React, Vue, Svelte, Angular applications
|
|
118
|
+
- ✅ Next.js, Nuxt, SvelteKit
|
|
119
|
+
- ✅ Vite, Webpack, esbuild bundlers
|
|
120
|
+
- ✅ Modern Node.js projects with `"type": "module"`
|
|
121
|
+
|
|
122
|
+
### CommonJS - Legacy Support
|
|
123
|
+
|
|
124
|
+
**For CommonJS projects and older Node.js environments:**
|
|
125
|
+
|
|
126
|
+
```javascript
|
|
127
|
+
const { createLaunchpadSDK } = require('@gala-chain/launchpad-sdk');
|
|
128
|
+
|
|
129
|
+
const sdk = createLaunchpadSDK({
|
|
130
|
+
wallet: 'your-private-key-or-mnemonic'
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**When to use:**
|
|
135
|
+
- ✅ Legacy Node.js projects with CommonJS modules
|
|
136
|
+
- ✅ Older tooling that doesn't support ESM
|
|
137
|
+
- ✅ Express.js, Nest.js (CommonJS mode)
|
|
138
|
+
- ✅ Projects without build tools
|
|
139
|
+
|
|
140
|
+
### UMD (Universal Module Definition) - Browser Legacy
|
|
141
|
+
|
|
142
|
+
**For browser globals and legacy environments:**
|
|
143
|
+
|
|
144
|
+
```html
|
|
145
|
+
<script src="node_modules/@gala-chain/launchpad-sdk/dist/index.js"></script>
|
|
146
|
+
<script>
|
|
147
|
+
const sdk = window.GalaLaunchpadSDK.createLaunchpadSDK({
|
|
148
|
+
wallet: 'your-private-key-or-mnemonic'
|
|
149
|
+
});
|
|
150
|
+
</script>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**When to use:**
|
|
154
|
+
- ✅ Direct browser `<script>` tags
|
|
155
|
+
- ✅ Older browser environments
|
|
156
|
+
- ✅ CDN delivery
|
|
157
|
+
|
|
158
|
+
### Module Resolution
|
|
159
|
+
|
|
160
|
+
Node.js automatically selects the correct module format based on your project:
|
|
161
|
+
|
|
162
|
+
| Project Type | Method | Format Used | File |
|
|
163
|
+
|---|---|---|---|
|
|
164
|
+
| ESM Module | `import` | ESM | `dist/index.esm.js` |
|
|
165
|
+
| CommonJS | `require()` | CommonJS | `dist/index.cjs.js` |
|
|
166
|
+
| Legacy Tools | Direct Include | UMD | `dist/index.js` |
|
|
167
|
+
|
|
168
|
+
**No configuration needed** - Node.js and bundlers automatically select the optimal format via the package exports field!
|
|
100
169
|
|
|
101
170
|
## AI Agent Integration
|
|
102
171
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gala-chain/launchpad-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.1",
|
|
4
4
|
"description": "TypeScript SDK for Gala Launchpad Backend API - Production-ready DeFi token launchpad integration with wallet-based authentication, GalaChain trading, and comprehensive user operations. 100% tested (22/22 endpoints working).",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
25
|
"import": "./dist/index.esm.js",
|
|
26
|
-
"require": "./dist/index.js"
|
|
26
|
+
"require": "./dist/index.cjs.js"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
@@ -157,6 +157,10 @@
|
|
|
157
157
|
{
|
|
158
158
|
"path": "./dist/index.esm.js",
|
|
159
159
|
"limit": "50 kB"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"path": "./dist/index.cjs.js",
|
|
163
|
+
"limit": "50 kB"
|
|
160
164
|
}
|
|
161
165
|
]
|
|
162
166
|
}
|