@minia2a/elizaos-plugin-minia2a 0.2.0 → 0.2.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
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# @minia2a/elizaos-plugin-minia2a
|
|
2
2
|
|
|
3
|
-
**The marketplace plugin for ElizaOS agents** — discover, try, and pay for
|
|
3
|
+
**The marketplace plugin for ElizaOS agents** — discover, try, and pay for 1,680+ x402 APIs across crypto, web, AI, and data. USDC on Base.
|
|
4
4
|
|
|
5
|
-
> Unlike single-vendor x402 plugins that bundle a fixed set of endpoints, this plugin connects your agent to the **entire minia2a.uk marketplace** —
|
|
5
|
+
> Unlike single-vendor x402 plugins that bundle a fixed set of endpoints, this plugin connects your agent to the **entire minia2a.uk marketplace** — 1,680+ services from dozens of providers, with live discovery, free trials, and transparent pricing.
|
|
6
6
|
|
|
7
7
|
## Why This Plugin
|
|
8
8
|
|
|
9
9
|
| Feature | Fixed-Endpoint Plugins | This Plugin |
|
|
10
10
|
|---------|----------------------|-------------|
|
|
11
|
-
| Services | 8–75 endpoints | **
|
|
11
|
+
| Services | 8–75 endpoints | **1,680+ across categories** |
|
|
12
12
|
| Discovery | Pre-bundled at build time | **Live marketplace search** |
|
|
13
|
-
| Free trials | Sometimes | **
|
|
13
|
+
| Free trials | Sometimes | **5 free trial calls per wallet** |
|
|
14
14
|
| New services | Wait for plugin update | **Available instantly** |
|
|
15
15
|
| Provider diversity | Single vendor | **Dozens of providers** |
|
|
16
16
|
| Payment | USDC on chain | **USDC on Base (~3¢ gas)** |
|
|
@@ -42,7 +42,7 @@ Add to your agent's `character.json`:
|
|
|
42
42
|
|
|
43
43
|
| Action | What it does | Example prompt |
|
|
44
44
|
|--------|-------------|----------------|
|
|
45
|
-
| `SEARCH_APIS` | Search
|
|
45
|
+
| `SEARCH_APIS` | Search 1,680+ APIs by keyword or category | "Find APIs that can scrape websites" |
|
|
46
46
|
| `CALL_API` | Call any endpoint with auto-trial | "Get the current gas price on Base" |
|
|
47
47
|
| `LIST_POPULAR_APIS` | Browse trending services | "What are the most used APIs?" |
|
|
48
48
|
|
|
@@ -57,7 +57,7 @@ The `MINIA2A_MARKETPLACE` provider injects live marketplace context into every a
|
|
|
57
57
|
3. Agent retries with `Authorization: x402 <signed-tx>` → receives result
|
|
58
58
|
4. Receipt returned in `X-Receipt` header for audit trail
|
|
59
59
|
|
|
60
|
-
**Without a payment key:** the agent uses free trials —
|
|
60
|
+
**Without a payment key:** the agent uses free trials — 5 free trial calls per wallet.
|
|
61
61
|
|
|
62
62
|
## Categories
|
|
63
63
|
|
|
@@ -70,7 +70,7 @@ The `MINIA2A_MARKETPLACE` provider injects live marketplace context into every a
|
|
|
70
70
|
|
|
71
71
|
## Pricing
|
|
72
72
|
|
|
73
|
-
- **Free trial:**
|
|
73
|
+
- **Free trial:** 5 free trial calls per wallet (`?trial=1`)
|
|
74
74
|
- **Paid calls:** Priced per endpoint (typically $0.001–$0.10)
|
|
75
75
|
- **Platform fee:** 5% (transparent, no hidden costs)
|
|
76
76
|
- **Credits:** 1 USDC = 200 credits, no subscription, no minimum
|
package/dist/actions/callApi.js
CHANGED
|
@@ -15,7 +15,7 @@ exports.callApiAction = {
|
|
|
15
15
|
"X402_CALL",
|
|
16
16
|
"MINIA2A_CALL",
|
|
17
17
|
],
|
|
18
|
-
description: "Call an x402 API endpoint on minia2a.uk. Uses free trials automatically (
|
|
18
|
+
description: "Call an x402 API endpoint on minia2a.uk. Uses free trials automatically (5 per wallet). For paid calls, handles the HTTP 402 → pay USDC → retry flow.",
|
|
19
19
|
validate: async (_runtime, message, _state) => {
|
|
20
20
|
const text = message.content?.text?.toLowerCase() || "";
|
|
21
21
|
const triggers = [
|
|
@@ -105,7 +105,7 @@ exports.callApiAction = {
|
|
|
105
105
|
"";
|
|
106
106
|
if (!config.paymentPrivateKey) {
|
|
107
107
|
return {
|
|
108
|
-
text: `💳 **Payment Required**\n\nEndpoint: ${endpoint}\nPrice: ${paymentHeader}\n\nThis endpoint requires payment. Configure your wallet private key in MINIA2A_CONFIG.paymentPrivateKey to auto-pay, or use free trials (
|
|
108
|
+
text: `💳 **Payment Required**\n\nEndpoint: ${endpoint}\nPrice: ${paymentHeader}\n\nThis endpoint requires payment. Configure your wallet private key in MINIA2A_CONFIG.paymentPrivateKey to auto-pay, or use free trials (5 calls per wallet).`,
|
|
109
109
|
success: false,
|
|
110
110
|
paymentRequired: true,
|
|
111
111
|
paymentDetails: paymentHeader,
|
|
@@ -116,7 +116,7 @@ exports.callApiAction = {
|
|
|
116
116
|
const budgetCheck = (0, spending_1.canAfford)(runtime.agentId, 1); // approximate 1¢ minimum check
|
|
117
117
|
if (!budgetCheck.allowed) {
|
|
118
118
|
return {
|
|
119
|
-
text: `🛑 ${budgetCheck.reason}\n\nUse free trials (
|
|
119
|
+
text: `🛑 ${budgetCheck.reason}\n\nUse free trials (5 per wallet) or increase maxSpendPerSession in config.`,
|
|
120
120
|
success: false,
|
|
121
121
|
budgetExceeded: true,
|
|
122
122
|
};
|
|
@@ -131,7 +131,7 @@ exports.callApiAction = {
|
|
|
131
131
|
// For now, return payment instructions
|
|
132
132
|
// TODO: Implement full x402 payment flow (sign USDC tx → retry with X-PAYMENT header)
|
|
133
133
|
return {
|
|
134
|
-
text: `💳 **Payment Required**\n\nEndpoint: ${endpoint}\nPayment details: ${paymentHeader}\n\n💡 Tip: Use free trials first — each
|
|
134
|
+
text: `💳 **Payment Required**\n\nEndpoint: ${endpoint}\nPayment details: ${paymentHeader}\n\n💡 Tip: Use free trials first — each wallet has 5 free trial calls. Set \`autoTrial: true\` in config.`,
|
|
135
135
|
success: false,
|
|
136
136
|
paymentRequired: true,
|
|
137
137
|
paymentDetails: paymentHeader,
|
|
@@ -70,7 +70,7 @@ exports.listPopularAction = {
|
|
|
70
70
|
`🔥 **Most Popular APIs:**`,
|
|
71
71
|
...topEndpoints.map(([id, data], i) => `${i + 1}. **${id}** — ${data.used?.toLocaleString() || 0} trials, ${data.users || 0} users`),
|
|
72
72
|
"",
|
|
73
|
-
`💡 Each
|
|
73
|
+
`💡 Each wallet gets **5 free trial calls**. Use SEARCH_APIS to find specific services, CALL_API to try one.`,
|
|
74
74
|
`🌐 ${baseUrl}`,
|
|
75
75
|
];
|
|
76
76
|
return {
|
|
@@ -71,7 +71,7 @@ exports.searchApisAction = {
|
|
|
71
71
|
"",
|
|
72
72
|
...topResults.map((s, i) => `${i + 1}. **${s.name}** (${s.id}) — ${s.price || 0}¢/call → ${s.description?.slice(0, 80) || "No description"}`),
|
|
73
73
|
"",
|
|
74
|
-
`💡 Each
|
|
74
|
+
`💡 Each wallet gets **5 free trial calls**. Use CALL_API to try one.`,
|
|
75
75
|
`📋 Full catalog: ${baseUrl}`,
|
|
76
76
|
];
|
|
77
77
|
return {
|
|
@@ -96,7 +96,7 @@ exports.searchApisAction = {
|
|
|
96
96
|
{
|
|
97
97
|
user: "{{user2}}",
|
|
98
98
|
content: {
|
|
99
|
-
text: "📡 **minia2a.uk Search** — found 3 services for web scraping. Top: x402-web-scrape (5¢/call), x402-web-retrieve (3¢/call). Each
|
|
99
|
+
text: "📡 **minia2a.uk Search** — found 3 services for web scraping. Top: x402-web-scrape (5¢/call), x402-web-retrieve (3¢/call). Each wallet gets 5 free trials.",
|
|
100
100
|
action: "SEARCH_APIS",
|
|
101
101
|
},
|
|
102
102
|
},
|
|
@@ -109,7 +109,7 @@ exports.searchApisAction = {
|
|
|
109
109
|
{
|
|
110
110
|
user: "{{user2}}",
|
|
111
111
|
content: {
|
|
112
|
-
text: "📡 Found crypto APIs: x402-price-oracle (3¢/call), x402-crypto-price (2¢/call). Try any with
|
|
112
|
+
text: "📡 Found crypto APIs: x402-price-oracle (3¢/call), x402-crypto-price (2¢/call). Try any with 5 free trial calls.",
|
|
113
113
|
action: "SEARCH_APIS",
|
|
114
114
|
},
|
|
115
115
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { initSpendingTracker, getSpending, getSpendSummary, canAfford, recordSpe
|
|
|
10
10
|
* minia2a.uk plugin for ElizaOS
|
|
11
11
|
*
|
|
12
12
|
* Gives your ElizaOS agent the ability to:
|
|
13
|
-
* - Search
|
|
13
|
+
* - Search 1,680+ x402 pay-per-call APIs (SEARCH_APIS)
|
|
14
14
|
* - Call any endpoint with auto-trial support (CALL_API)
|
|
15
15
|
* - Browse trending/popular services (LIST_POPULAR_APIS)
|
|
16
16
|
* - Track and control API spending per session (VIEW_SPENDING)
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ Object.defineProperty(exports, "resetSpending", { enumerable: true, get: functio
|
|
|
27
27
|
* minia2a.uk plugin for ElizaOS
|
|
28
28
|
*
|
|
29
29
|
* Gives your ElizaOS agent the ability to:
|
|
30
|
-
* - Search
|
|
30
|
+
* - Search 1,680+ x402 pay-per-call APIs (SEARCH_APIS)
|
|
31
31
|
* - Call any endpoint with auto-trial support (CALL_API)
|
|
32
32
|
* - Browse trending/popular services (LIST_POPULAR_APIS)
|
|
33
33
|
* - Track and control API spending per session (VIEW_SPENDING)
|
|
@@ -58,7 +58,7 @@ Object.defineProperty(exports, "resetSpending", { enumerable: true, get: functio
|
|
|
58
58
|
exports.minia2aPlugin = {
|
|
59
59
|
name: "@minia2a/elizaos-plugin-minia2a",
|
|
60
60
|
npmName: "@minia2a/elizaos-plugin-minia2a",
|
|
61
|
-
description: "Discover and call
|
|
61
|
+
description: "Discover and call 1,680+ x402 pay-per-call APIs from minia2a.uk. Search, free trials, budget controls, and USDC payments on Base.",
|
|
62
62
|
config: {
|
|
63
63
|
baseUrl: "https://minia2a.uk",
|
|
64
64
|
autoTrial: true,
|
|
@@ -30,7 +30,7 @@ exports.marketplaceStatsProvider = {
|
|
|
30
30
|
const text = [
|
|
31
31
|
`minia2a.uk marketplace: ${serviceCount} services, ${totalRequests} total requests, ${totalTrials} trials used, ${uniqueUsers} developers, ${walletCount} wallets.`,
|
|
32
32
|
`Top APIs: ${top10}.`,
|
|
33
|
-
`Every
|
|
33
|
+
`Every wallet gets 5 free trial calls. Agents can discover services via SEARCH_APIS and call them via CALL_API with auto-trial support.`,
|
|
34
34
|
].join(" ");
|
|
35
35
|
return {
|
|
36
36
|
text,
|
|
@@ -47,7 +47,7 @@ exports.marketplaceStatsProvider = {
|
|
|
47
47
|
catch {
|
|
48
48
|
// Graceful degradation — provider failing shouldn't break the agent
|
|
49
49
|
return {
|
|
50
|
-
text: "minia2a.uk marketplace is available with
|
|
50
|
+
text: "minia2a.uk marketplace is available with 1,680+ pay-per-call x402 APIs. Use SEARCH_APIS to discover services.",
|
|
51
51
|
values: {
|
|
52
52
|
minia2aServices: 299,
|
|
53
53
|
minia2aTrials: 0,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minia2a/elizaos-plugin-minia2a",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "ElizaOS plugin for the minia2a.uk marketplace —
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "ElizaOS plugin for the minia2a.uk marketplace — 1,680+ x402 pay-per-call APIs across crypto, web, AI, and data. 5 free trial calls per wallet. USDC on Base.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|