@gala-chain/launchpad-mcp-server 1.7.6 → 1.7.8
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
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.7.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add token-distribution topic to explainSdkUsage tool
|
|
8
|
+
- New topic: 'token-distribution' - Analyze token holder distribution and concentration
|
|
9
|
+
- Includes complete code examples for analyzing holder distribution
|
|
10
|
+
- Added Gini coefficient calculation example for wealth distribution analysis
|
|
11
|
+
- Added whale detection and concentration risk analysis patterns
|
|
12
|
+
- Shows how to identify top holders and calculate ownership percentages
|
|
13
|
+
- Updated tool description and enum to include new topic
|
|
14
|
+
|
|
15
|
+
## 1.7.7
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Update documentation across all files to reference correct SDK and MCP versions (3.11.7 and 1.7.7)
|
|
20
|
+
- Add comprehensive Token Distribution Patterns section to CLAUDE.md
|
|
21
|
+
- Update explainSdkUsage tool to show v3.11.7
|
|
22
|
+
|
|
23
|
+
## 1.7.6
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Update SDK dependency to v3.11.6 with TypeScript declaration file fixes
|
|
28
|
+
- Fixed TypeScript declaration file output structure by restoring correct tsconfig.json configuration
|
|
29
|
+
|
|
3
30
|
## 1.7.5
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explainSdkUsage.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/explainSdkUsage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"explainSdkUsage.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/explainSdkUsage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AA2wBlD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,OA+DjC,CAAC"}
|
|
@@ -624,6 +624,91 @@ async function localCalculationsExample() {
|
|
|
624
624
|
- \`gala_launchpad_calculate_buy_amount_external\`
|
|
625
625
|
- \`gala_launchpad_calculate_sell_amount_local\`
|
|
626
626
|
- \`gala_launchpad_calculate_sell_amount_external\`
|
|
627
|
+
`,
|
|
628
|
+
'token-distribution': `
|
|
629
|
+
## Token Holder Distribution with SDK
|
|
630
|
+
|
|
631
|
+
\`\`\`typescript
|
|
632
|
+
import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
|
|
633
|
+
|
|
634
|
+
async function analyzeTokenDistribution() {
|
|
635
|
+
const sdk = createLaunchpadSDK({
|
|
636
|
+
wallet: 'your-private-key-or-mnemonic'
|
|
637
|
+
});
|
|
638
|
+
|
|
639
|
+
// Fetch complete token distribution (all holders, non-paginated)
|
|
640
|
+
const distribution = await sdk.fetchTokenDistribution('anime');
|
|
641
|
+
|
|
642
|
+
console.log(\`Total holders: \${distribution.totalHolders}\`);
|
|
643
|
+
console.log(\`Total supply: \${distribution.totalSupply}\`);
|
|
644
|
+
console.log(\`Last updated: \${distribution.lastUpdated.toISOString()}\`);
|
|
645
|
+
|
|
646
|
+
// Analyze top holders
|
|
647
|
+
distribution.holders
|
|
648
|
+
.sort((a, b) => parseFloat(b.balance) - parseFloat(a.balance))
|
|
649
|
+
.slice(0, 5)
|
|
650
|
+
.forEach((holder, index) => {
|
|
651
|
+
console.log(\`#\${index + 1}: \${holder.address}\`);
|
|
652
|
+
console.log(\` Balance: \${holder.balance}\`);
|
|
653
|
+
console.log(\` Ownership: \${holder.percentage.toFixed(2)}%\`);
|
|
654
|
+
});
|
|
655
|
+
|
|
656
|
+
// Check concentration risk (e.g., top 5 holders own >80%)
|
|
657
|
+
const top5Ownership = distribution.holders
|
|
658
|
+
.sort((a, b) => parseFloat(b.balance) - parseFloat(a.balance))
|
|
659
|
+
.slice(0, 5)
|
|
660
|
+
.reduce((sum, holder) => sum + holder.percentage, 0);
|
|
661
|
+
|
|
662
|
+
console.log(\`Top 5 holders control: \${top5Ownership.toFixed(2)}%\`);
|
|
663
|
+
|
|
664
|
+
// Find specific holder
|
|
665
|
+
const myAddress = sdk.getAddress();
|
|
666
|
+
const myHolding = distribution.holders.find(h => h.address === myAddress);
|
|
667
|
+
|
|
668
|
+
if (myHolding) {
|
|
669
|
+
console.log(\`Your ownership: \${myHolding.percentage.toFixed(4)}%\`);
|
|
670
|
+
console.log(\`Your balance: \${myHolding.balance}\`);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
// Calculate concentration metrics
|
|
674
|
+
const giniCoefficient = calculateGini(distribution.holders);
|
|
675
|
+
console.log(\`Gini coefficient: \${giniCoefficient.toFixed(4)}\`);
|
|
676
|
+
|
|
677
|
+
// Count whales (holders with >5%)
|
|
678
|
+
const whales = distribution.holders.filter(h => h.percentage > 5);
|
|
679
|
+
console.log(\`Whales (>5%): \${whales.length}\`);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
// Helper: Calculate Gini coefficient for wealth distribution
|
|
683
|
+
function calculateGini(holders: Array<{balance: string}>) {
|
|
684
|
+
const balances = holders.map(h => parseFloat(h.balance)).sort((a, b) => a - b);
|
|
685
|
+
const n = balances.length;
|
|
686
|
+
const sum = balances.reduce((a, b) => a + b, 0);
|
|
687
|
+
|
|
688
|
+
let numerator = 0;
|
|
689
|
+
for (let i = 0; i < n; i++) {
|
|
690
|
+
numerator += (2 * (i + 1) - n - 1) * balances[i];
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
return numerator / (n * sum);
|
|
694
|
+
}
|
|
695
|
+
\`\`\`
|
|
696
|
+
|
|
697
|
+
**Key Characteristics:**
|
|
698
|
+
- **Non-Paginated**: Returns ALL token holders in single response (no pagination)
|
|
699
|
+
- **Complete Distribution**: Full holder list with addresses, balances, and ownership percentages
|
|
700
|
+
- **BigNumber Precision**: Uses BigNumber.js for accurate percentage calculations
|
|
701
|
+
- **Total Supply**: Computed from holder balances (sum of all holdings)
|
|
702
|
+
- **Service Account Included**: Vault/service accounts appear in holder list
|
|
703
|
+
|
|
704
|
+
**Use Cases:**
|
|
705
|
+
- Analyze token concentration risk
|
|
706
|
+
- Identify whale holders
|
|
707
|
+
- Track ownership changes over time
|
|
708
|
+
- Generate holder reports
|
|
709
|
+
- Calculate distribution metrics (Gini coefficient, etc.)
|
|
710
|
+
|
|
711
|
+
**MCP Tool Equivalent:** \`gala_launchpad_fetch_token_distribution\`
|
|
627
712
|
`,
|
|
628
713
|
'mcp-to-sdk-mapping': `
|
|
629
714
|
## MCP Tool to SDK Method Mapping
|
|
@@ -702,6 +787,7 @@ Available topics:
|
|
|
702
787
|
- 'pool-graduation' - Graduate a bonding curve pool
|
|
703
788
|
- 'fetch-pools' - Query pool data and details
|
|
704
789
|
- 'balances' - Check GALA and token balances
|
|
790
|
+
- 'token-distribution' - Analyze token holder distribution and concentration
|
|
705
791
|
- 'token-creation' - Launch new tokens
|
|
706
792
|
- 'multi-wallet' - Use multiple wallets (privateKey override pattern)
|
|
707
793
|
- 'transfers' - Transfer GALA and tokens between wallets
|
|
@@ -722,6 +808,7 @@ Returns runnable TypeScript code examples with explanations.`,
|
|
|
722
808
|
'pool-graduation',
|
|
723
809
|
'fetch-pools',
|
|
724
810
|
'balances',
|
|
811
|
+
'token-distribution',
|
|
725
812
|
'token-creation',
|
|
726
813
|
'multi-wallet',
|
|
727
814
|
'transfers',
|
|
@@ -743,7 +830,7 @@ Returns runnable TypeScript code examples with explanations.`,
|
|
|
743
830
|
return (0, response_formatter_js_1.formatSuccess)({
|
|
744
831
|
topic: args.topic,
|
|
745
832
|
explanation: example,
|
|
746
|
-
sdkVersion: '3.
|
|
833
|
+
sdkVersion: '3.11.7',
|
|
747
834
|
packageName: '@gala-chain/launchpad-sdk',
|
|
748
835
|
documentation: 'https://www.npmjs.com/package/@gala-chain/launchpad-sdk',
|
|
749
836
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explainSdkUsage.js","sourceRoot":"","sources":["../../../src/tools/utils/explainSdkUsage.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,mEAAiE;AACjE,6EAAkE;AAElE;;GAEG;AACH,MAAM,YAAY,GAAG;IACnB,oBAAoB;IACpB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCf;IAEC,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsChB;IAEC,iBAAiB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCpB;IAEC,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyChB;IAEC,UAAU,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Cb;IAEC,gBAAgB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDnB;IAEC,cAAc,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DjB;IAEC,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0Cd;IAEC,gBAAgB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DnB;IAEC,cAAc,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoEjB;IAEC,oBAAoB,EAAE;;;;;;;;;;;;;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AAK,CAAC,kBAAkB,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAClD,CAAC;QAED,OAAO,IAAA,qCAAa,EAAC;YACnB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,OAAO;YACpB,UAAU,EAAE,QAAQ;YACpB,WAAW,EAAE,2BAA2B;YACxC,aAAa,EAAE,yDAAyD;SACzE,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gala-chain/launchpad-mcp-server",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.8",
|
|
4
4
|
"description": "MCP server for Gala Launchpad SDK with 50 tools + 14 slash commands - Production-grade AI agent integration with comprehensive validation, optimized performance, and 80%+ test coverage",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@gala-chain/api": "^2.4.3",
|
|
64
64
|
"@gala-chain/connect": "^2.4.3",
|
|
65
|
-
"@gala-chain/launchpad-sdk": "^3.11.
|
|
65
|
+
"@gala-chain/launchpad-sdk": "^3.11.7",
|
|
66
66
|
"@modelcontextprotocol/sdk": "^0.5.0",
|
|
67
67
|
"axios": "^1.12.2",
|
|
68
68
|
"bignumber.js": "^9.1.2",
|