@nevermined-io/openclaw-plugin 1.0.11 → 1.0.13
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/dist/auth.d.ts +13 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +30 -1
- package/dist/auth.js.map +1 -1
- package/dist/index.d.ts +42 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +91 -91
- package/dist/index.js.map +1 -1
- package/dist/tools.d.ts +16 -9
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +228 -215
- package/dist/tools.js.map +1 -1
- package/docs/commands.md +164 -0
- package/docs/getting-started.md +71 -0
- package/docs/links.md +38 -0
- package/docs/setup.md +64 -0
- package/openclaw.plugin.json +27 -68
- package/package.json +7 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Getting Started"
|
|
3
|
+
description: "Install and configure the Nevermined OpenClaw plugin in minutes"
|
|
4
|
+
icon: "rocket"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Getting Started
|
|
8
|
+
|
|
9
|
+
The Nevermined OpenClaw plugin exposes AI agent payment operations as gateway tools callable from any OpenClaw channel — Telegram, Discord, WhatsApp, and more.
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
- An [OpenClaw](https://openclaw.ai) gateway instance
|
|
14
|
+
- Node.js >= 18.0.0
|
|
15
|
+
- A [Nevermined account](https://nevermined.app) (free to create)
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
Install the plugin from your OpenClaw gateway:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
openclaw plugin install @nevermined-io/openclaw-plugin
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Authentication
|
|
26
|
+
|
|
27
|
+
### Option A: Browser login (recommended)
|
|
28
|
+
|
|
29
|
+
Use the `/nvm-login` command from any connected chat channel:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
/nvm-login
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This opens a browser window where you authenticate with Nevermined. The API key is captured automatically and stored in your gateway config.
|
|
36
|
+
|
|
37
|
+
To target the live environment:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
/nvm-login live
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Option B: Manual configuration
|
|
44
|
+
|
|
45
|
+
Add your API key directly to `openclaw.json`:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"plugins": {
|
|
50
|
+
"nevermined": {
|
|
51
|
+
"nvmApiKey": "sandbox:eyJhbG...",
|
|
52
|
+
"environment": "sandbox"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
You can obtain an API key from the [Nevermined App](https://nevermined.app) under Settings > API Keys. See the [Get Your API Key](/docs/getting-started/get-your-api-key) guide for details.
|
|
59
|
+
|
|
60
|
+
## Quick Test
|
|
61
|
+
|
|
62
|
+
After authenticating, verify the plugin is working:
|
|
63
|
+
|
|
64
|
+
1. **Check your balance** — from any chat channel, the agent can call `nevermined.checkBalance` to verify connectivity.
|
|
65
|
+
|
|
66
|
+
2. **List plans** — call `nevermined.listPlans` to see available payment plans.
|
|
67
|
+
|
|
68
|
+
## Next Steps
|
|
69
|
+
|
|
70
|
+
- [Setup](/docs/api-reference/openclaw-plugin/setup) — full configuration reference
|
|
71
|
+
- [Commands](/docs/api-reference/openclaw-plugin/commands) — all available tools and slash commands
|
package/docs/links.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Resources"
|
|
3
|
+
description: "Links to Nevermined documentation, SDKs, and community resources"
|
|
4
|
+
icon: "book"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Resources
|
|
8
|
+
|
|
9
|
+
## Nevermined Documentation
|
|
10
|
+
|
|
11
|
+
| Resource | Description |
|
|
12
|
+
|----------|-------------|
|
|
13
|
+
| [Nevermined Docs](https://docs.nevermined.app) | Full platform documentation |
|
|
14
|
+
| [Get Your API Key](https://docs.nevermined.app/docs/getting-started/get-your-api-key) | How to create a Nevermined account and obtain an API key |
|
|
15
|
+
| [Payment Plans](https://docs.nevermined.app/docs/api-reference/typescript/payment-plans-and-agents) | Creating and managing payment plans |
|
|
16
|
+
| [Querying Agents](https://docs.nevermined.app/docs/api-reference/typescript/querying-an-agent) | How to query agents using x402 access tokens |
|
|
17
|
+
| [x402 Protocol](https://docs.nevermined.app/docs/api-reference/typescript/x402-protocol) | The HTTP payment protocol specification |
|
|
18
|
+
|
|
19
|
+
## SDKs
|
|
20
|
+
|
|
21
|
+
| SDK | Language | Package |
|
|
22
|
+
|-----|----------|---------|
|
|
23
|
+
| [Payments SDK](https://github.com/nevermined-io/payments) | TypeScript | `@nevermined-io/payments` |
|
|
24
|
+
| [Payments SDK (Python)](https://github.com/nevermined-io/payments-py) | Python | `payments-py` |
|
|
25
|
+
| [Nevermined CLI](https://www.npmjs.com/package/@nevermined-io/cli) | TypeScript | `@nevermined-io/cli` |
|
|
26
|
+
|
|
27
|
+
## OpenClaw
|
|
28
|
+
|
|
29
|
+
| Resource | Description |
|
|
30
|
+
|----------|-------------|
|
|
31
|
+
| [OpenClaw Docs](https://docs.openclaw.ai) | OpenClaw gateway documentation |
|
|
32
|
+
| [Plugin Development](https://docs.openclaw.ai/tools/plugin) | How to build OpenClaw plugins |
|
|
33
|
+
|
|
34
|
+
## Support
|
|
35
|
+
|
|
36
|
+
- [GitHub Issues](https://github.com/nevermined-io/payments/issues) — report bugs or request features
|
|
37
|
+
- [Nevermined Discord](https://discord.gg/nevermined) — community support
|
|
38
|
+
- [Nevermined App](https://nevermined.app) — manage your account, plans, and agents
|
package/docs/setup.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Setup"
|
|
3
|
+
description: "Full configuration reference for the Nevermined OpenClaw plugin"
|
|
4
|
+
icon: "gear"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Setup
|
|
8
|
+
|
|
9
|
+
## Configuration
|
|
10
|
+
|
|
11
|
+
The plugin reads its configuration from the `plugins.nevermined` section of your `openclaw.json`:
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"plugins": {
|
|
16
|
+
"nevermined": {
|
|
17
|
+
"nvmApiKey": "sandbox:eyJhbG...",
|
|
18
|
+
"environment": "sandbox",
|
|
19
|
+
"planId": "did:nv:abc123...",
|
|
20
|
+
"agentId": "did:nv:def456...",
|
|
21
|
+
"creditsPerRequest": 1
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Configuration Fields
|
|
28
|
+
|
|
29
|
+
| Field | Required | Default | Description |
|
|
30
|
+
|-------|----------|---------|-------------|
|
|
31
|
+
| `nvmApiKey` | No | — | Your Nevermined API key. Can be set via `/nvm-login` instead. |
|
|
32
|
+
| `environment` | No | `sandbox` | Target environment: `sandbox` for testing, `live` for production. |
|
|
33
|
+
| `planId` | No | — | Default payment plan ID. When set, subscriber tools use this plan automatically. |
|
|
34
|
+
| `agentId` | No | — | Default agent ID. Required for plans with multiple agents. |
|
|
35
|
+
| `creditsPerRequest` | No | `1` | Number of credits consumed per request. |
|
|
36
|
+
|
|
37
|
+
### Environment Details
|
|
38
|
+
|
|
39
|
+
| Environment | Description | Use Case |
|
|
40
|
+
|-------------|-------------|----------|
|
|
41
|
+
| `sandbox` | Test environment on Arbitrum Sepolia | Development, testing, integration |
|
|
42
|
+
| `live` | Production environment on Arbitrum One | Live deployments with real payments |
|
|
43
|
+
|
|
44
|
+
## Authentication Flow
|
|
45
|
+
|
|
46
|
+
The plugin supports a browser-based login flow identical to the [Nevermined CLI](/docs/api-reference/cli/getting-started):
|
|
47
|
+
|
|
48
|
+
1. User sends `/nvm-login` in any chat channel (or calls `nevermined.login`)
|
|
49
|
+
2. The plugin starts a local HTTP server on a random port
|
|
50
|
+
3. A browser window opens to the Nevermined login page
|
|
51
|
+
4. After authentication, Nevermined redirects back with the API key
|
|
52
|
+
5. The key is stored in the gateway config via `api.setConfig()`
|
|
53
|
+
|
|
54
|
+
The login times out after 5 minutes if no authentication is received.
|
|
55
|
+
|
|
56
|
+
### Logging Out
|
|
57
|
+
|
|
58
|
+
Send `/nvm-logout` or call `nevermined.logout` to remove the stored API key. All payment tools will require re-authentication after logout.
|
|
59
|
+
|
|
60
|
+
## Default Values
|
|
61
|
+
|
|
62
|
+
When `planId` and `agentId` are set in the config, all subscriber tools (`checkBalance`, `getAccessToken`, `orderPlan`, `queryAgent`) use them as defaults. You can always override them per-call by passing the parameter explicitly.
|
|
63
|
+
|
|
64
|
+
This is useful for gateways that serve a single plan — configure it once and all tools work without extra parameters.
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,75 +1,34 @@
|
|
|
1
1
|
{
|
|
2
|
+
"id": "nevermined",
|
|
2
3
|
"name": "@nevermined-io/openclaw-plugin",
|
|
3
|
-
"version": "0.1.0",
|
|
4
4
|
"description": "Nevermined plugin for OpenClaw — AI agent payments and access control",
|
|
5
5
|
"configSchema": {
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"nvmApiKey": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Your Nevermined API key (optional — use /nvm-login to authenticate via browser)"
|
|
12
|
+
},
|
|
13
|
+
"environment": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"enum": ["sandbox", "live"],
|
|
16
|
+
"default": "sandbox",
|
|
17
|
+
"description": "Nevermined environment to connect to"
|
|
18
|
+
},
|
|
19
|
+
"planId": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Default payment plan ID (required for subscriber tools)"
|
|
22
|
+
},
|
|
23
|
+
"agentId": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Default agent ID (required for multi-agent plans)"
|
|
26
|
+
},
|
|
27
|
+
"creditsPerRequest": {
|
|
28
|
+
"type": "number",
|
|
29
|
+
"default": 1,
|
|
30
|
+
"description": "Number of credits consumed per request"
|
|
31
|
+
}
|
|
31
32
|
}
|
|
32
|
-
},
|
|
33
|
-
"uiHints": {
|
|
34
|
-
"nvmApiKey": {
|
|
35
|
-
"sensitive": true,
|
|
36
|
-
"label": "Nevermined API Key",
|
|
37
|
-
"placeholder": "sandbox:eyJhbG... (or use /nvm-login)"
|
|
38
|
-
},
|
|
39
|
-
"environment": {
|
|
40
|
-
"label": "Environment"
|
|
41
|
-
},
|
|
42
|
-
"planId": {
|
|
43
|
-
"label": "Plan ID",
|
|
44
|
-
"placeholder": "did:nv:..."
|
|
45
|
-
},
|
|
46
|
-
"agentId": {
|
|
47
|
-
"label": "Agent ID",
|
|
48
|
-
"placeholder": "did:nv:..."
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"commands": [
|
|
52
|
-
{
|
|
53
|
-
"name": "nvm-login",
|
|
54
|
-
"description": "Authenticate with Nevermined via browser login"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"name": "nvm-logout",
|
|
58
|
-
"description": "Log out from Nevermined"
|
|
59
|
-
}
|
|
60
|
-
],
|
|
61
|
-
"skills": ["skills/nevermined/SKILL.md"],
|
|
62
|
-
"gateway": {
|
|
63
|
-
"methods": [
|
|
64
|
-
"nevermined.login",
|
|
65
|
-
"nevermined.logout",
|
|
66
|
-
"nevermined.checkBalance",
|
|
67
|
-
"nevermined.getAccessToken",
|
|
68
|
-
"nevermined.orderPlan",
|
|
69
|
-
"nevermined.queryAgent",
|
|
70
|
-
"nevermined.registerAgent",
|
|
71
|
-
"nevermined.createPlan",
|
|
72
|
-
"nevermined.listPlans"
|
|
73
|
-
]
|
|
74
33
|
}
|
|
75
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nevermined-io/openclaw-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "OpenClaw plugin for Nevermined — exposes subscriber and builder tools as gateway methods",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"dist/",
|
|
16
16
|
"openclaw.plugin.json",
|
|
17
17
|
"skills/",
|
|
18
|
+
"docs/",
|
|
18
19
|
"README.md"
|
|
19
20
|
],
|
|
20
21
|
"scripts": {
|
|
@@ -45,6 +46,11 @@
|
|
|
45
46
|
"url": "https://github.com/nevermined-io/payments.git",
|
|
46
47
|
"directory": "openclaw"
|
|
47
48
|
},
|
|
49
|
+
"openclaw": {
|
|
50
|
+
"extensions": [
|
|
51
|
+
"./dist/index.js"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
48
54
|
"keywords": [
|
|
49
55
|
"nevermined",
|
|
50
56
|
"openclaw",
|