@continuumdao/continuum-node-sdk 1.0.0 → 1.1.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 +57 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Continuum Node SDK
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for the Continuum node **management API**. It exposes typed functions for node administration, MPC groups, KeyGen, chain/token/address registries, and multi-sign (MPC) workflows. Results use a consistent `SdkResult<T>` shape (`{ ok, data }` or `{ ok, reason }`).
|
|
4
|
+
|
|
5
|
+
Management requests can be signed with **Ed25519** (local node keys, default for Node/MCP) or **EIP-191** (browser wallet via a `signMessage` callback). The SDK builds canonical signing payloads and POST bodies; callers supply config and, for wallet flows, a signing adapter.
|
|
6
|
+
|
|
7
|
+
An optional **MCP** layer registers the same core functions as Model Context Protocol tools for agent use (Ed25519 only).
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @continuumdao/continuum-node-sdk
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires Node.js 18+.
|
|
16
|
+
|
|
17
|
+
## Quick example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import {
|
|
21
|
+
parseNodeSdkConfig,
|
|
22
|
+
nodeId,
|
|
23
|
+
createGroupRequest,
|
|
24
|
+
DEFAULT_MANAGEMENT_SIGNING,
|
|
25
|
+
} from '@continuumdao/continuum-node-sdk';
|
|
26
|
+
|
|
27
|
+
const config = parseNodeSdkConfig({
|
|
28
|
+
node: {
|
|
29
|
+
baseUrl: 'https://your-node.example.com',
|
|
30
|
+
managementPort: 8080,
|
|
31
|
+
mpcConfigPath: '/path/on/server',
|
|
32
|
+
},
|
|
33
|
+
signer: { defaultKey: 'default', defaultKeyPath: null },
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const id = await nodeId(config);
|
|
37
|
+
if (!id.ok) throw new Error(id.reason);
|
|
38
|
+
|
|
39
|
+
const result = await createGroupRequest(
|
|
40
|
+
config,
|
|
41
|
+
{ nodeIds: ['...', '...'] },
|
|
42
|
+
DEFAULT_MANAGEMENT_SIGNING,
|
|
43
|
+
);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Documentation
|
|
47
|
+
|
|
48
|
+
- **[API reference](./docs/api-reference.md)** — exported functions, inputs, and outputs
|
|
49
|
+
- **[EIP-191 + wagmi/viem](./docs/eip191-wagmi-viem.md)** — wallet signing in web apps
|
|
50
|
+
|
|
51
|
+
## Development
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm run build
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Build output is emitted to `dist/`.
|
package/package.json
CHANGED