@manifest-network/manifest-mcp-core 0.2.3 → 0.3.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 ADDED
@@ -0,0 +1,66 @@
1
+ # @manifest-network/manifest-mcp-core
2
+
3
+ Shared library for Manifest MCP servers. Contains Cosmos SDK logic, on-chain tool functions, server utilities, and the LCD/REST adapter. This package is **not** an MCP server itself -- it provides building blocks that the chain, lease, and fred packages compose into servers.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @manifest-network/manifest-mcp-core
9
+ ```
10
+
11
+ ## What's inside
12
+
13
+ - **CosmosClientManager** (`client.ts`) -- Keyed-instance client lifecycle with rate limiting and lazy init (RPC + LCD)
14
+ - **LCD adapter** (`lcd-adapter.ts`) -- Converts LCD/REST responses to the RPC query client shape, making the codebase transport-agnostic
15
+ - **Module registry** (`modules.ts`) -- Static maps of Cosmos SDK modules with metadata and handler functions
16
+ - **Query/transaction routing** (`cosmos.ts`) -- Routes `(module, subcommand, args)` to per-module handlers
17
+ - **On-chain tool functions** (`tools/`) -- `getBalance`, `fundCredits`, `stopApp` (used by the lease package)
18
+ - **Server utilities** (`server-utils.ts`) -- `withErrorHandling`, `jsonResponse`, `bigIntReplacer`, `sanitizeForLogging`
19
+ - **Wallet providers** (`wallet/`) -- `MnemonicWalletProvider` (BIP-39), `signArbitraryWithAmino` (ADR-036)
20
+ - **Logger** (`logger.ts`) -- Leveled logger (stderr output, configurable via `LOG_LEVEL` env var)
21
+ - **Retry** (`retry.ts`) -- Exponential backoff with transient/permanent error classification
22
+ - **Validation** (`validation.ts`) -- Input validation helpers (`requireString`, `requireUuid`, `parseArgs`, etc.)
23
+
24
+ ## Supported modules
25
+
26
+ | Module | Query | Transaction |
27
+ |--------|:-----:|:-----------:|
28
+ | bank | yes | yes |
29
+ | staking | yes | yes |
30
+ | distribution | yes | yes |
31
+ | gov | yes | yes |
32
+ | billing | yes | yes |
33
+ | sku | yes | yes |
34
+ | group | yes | yes |
35
+ | auth | yes | -- |
36
+ | manifest | -- | yes |
37
+
38
+ ## Usage
39
+
40
+ ```typescript
41
+ import {
42
+ CosmosClientManager,
43
+ cosmosQuery,
44
+ cosmosTx,
45
+ createValidatedConfig,
46
+ } from '@manifest-network/manifest-mcp-core';
47
+
48
+ const config = createValidatedConfig({
49
+ chainId: 'manifest-1',
50
+ rpcUrl: 'https://your-rpc-endpoint/',
51
+ gasPrice: '0.01umfx',
52
+ addressPrefix: 'manifest',
53
+ });
54
+ ```
55
+
56
+ ## Build
57
+
58
+ ```bash
59
+ npm run build # tsdown (platform: neutral)
60
+ npm run lint # tsc --noEmit
61
+ npm run test # vitest
62
+ ```
63
+
64
+ ## License
65
+
66
+ MIT
package/dist/version.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region src/version.d.ts
2
- declare const VERSION = "0.2.3";
2
+ declare const VERSION = "0.3.1";
3
3
  //#endregion
4
4
  export { VERSION };
5
5
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region src/version.ts
2
- const VERSION = "0.2.3";
2
+ const VERSION = "0.3.1";
3
3
  //#endregion
4
4
  export { VERSION };
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["export const VERSION = '0.2.3';\n"],"mappings":";AAAA,MAAa,UAAU"}
1
+ {"version":3,"file":"version.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["export const VERSION = '0.3.1';\n"],"mappings":";AAAA,MAAa,UAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manifest-network/manifest-mcp-core",
3
- "version": "0.2.3",
3
+ "version": "0.3.1",
4
4
  "description": "Shared library for Cosmos SDK blockchain logic, tool functions, and server utilities (Manifest Network)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",