Skip to content

Commit e0cadd4

Browse files
author
Neo
committed
feat: subscription tiers, plugin marketplace, professional services, web interface, SDK, grants, and Solidity template packs
Complete monetization and developer ecosystem build: - Subscription system: Free / Pro ($4.99) / Enterprise ($19.99) with Stripe integration, usage tracking, feature gating, and 3-day free trials - Plugin marketplace: developer plugin store with 90/10 revenue split, submission review pipeline, purchase flow, and download tracking - Professional services: Glasswing security audit ($299+) and smart contract conversion ($499+) as paid service tiers - Web interface: landing, chat, pricing, audit, marketplace, and conversion service pages — all dark theme, responsive, production-ready - Gateway routes: 25 new endpoints wired into server.py for all new subsystems - A2A commerce: agent-to-agent service registry, job submission, and discovery - Social integration: Twitter and Discord automated announcement system - JavaScript SDK: @opnmatrx/sdk npm package with TypeScript, SSE streaming, and WebSocket support - Swift blocks: 7 copy-paste-ready SwiftUI files for MTRX iOS subscription UI - Solidity template packs: 15 production contracts across DeFi, Creator, and Business packs for Gumroad ($49 each, $119 bundle) - Grant applications: Base Ecosystem Fund, Ethereum Foundation ESP, Optimism RPGF, Gitcoin Grants with submission checklist - Extensions registry: JSON-based platform extension system with schema validation - Multi-chain support: chains.py with Base, Ethereum, Polygon, Arbitrum, and Optimism configurations - Documentation: MONETIZATION.md, PLUGIN_DEVELOPMENT.md, updated API reference with all new endpoints, updated README with subscription tiers and web interface sections, updated ROADMAP with completed milestones and revenue breakdown - Tests: full test suite for subscription store, usage tracker, and feature gate All revenue routes to NeoSafe multisig 0x46fF491D7054A6F500026B3E81f358190f8d8Ec5.
1 parent 2c1b075 commit e0cadd4

83 files changed

Lines changed: 18061 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,17 @@
1919

2020
# ── Notifications ──
2121
# TELEGRAM_BOT_TOKEN=
22+
23+
# ── Stripe (subscription payments) ──
24+
# STRIPE_SECRET_KEY=
25+
# STRIPE_WEBHOOK_SECRET=
26+
# STRIPE_PRO_PRICE_ID=
27+
# STRIPE_ENTERPRISE_PRICE_ID=
28+
29+
# ── Social media ──
30+
# TWITTER_API_KEY=
31+
# TWITTER_API_SECRET=
32+
# TWITTER_ACCESS_TOKEN=
33+
# TWITTER_ACCESS_SECRET=
34+
# DISCORD_WEBHOOK_URL=
35+
# DISCORD_ANNOUNCEMENTS_WEBHOOK=

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,71 @@ See `docs/RUNBOOK.md` for the full on-call playbook and
292292

293293
---
294294

295+
## Subscription Tiers
296+
297+
| Feature | Free | Pro ($4.99/mo) | Enterprise ($19.99/mo) |
298+
|---------|------|----------------|----------------------|
299+
| Contract conversions | 5/month | 100/month | Unlimited |
300+
| NFT mints | 3/month | 50/month | Unlimited |
301+
| DeFi loan volume | $5,000/month | $500,000/month | Unlimited |
302+
| API calls | 20/min | 120/min | 600/min |
303+
| Dashboard export ||||
304+
| Team accounts ||||
305+
| Priority support ||||
306+
307+
All tiers include a 3-day free trial. See `/pricing` for full details.
308+
309+
---
310+
311+
## Web Interface
312+
313+
The gateway serves a built-in web interface:
314+
315+
- `http://localhost:18790` — Landing page
316+
- `http://localhost:18790/chat` — Web chat with Trinity
317+
- `http://localhost:18790/pricing` — Pricing and plans
318+
- `http://localhost:18790/audit` — Glasswing security audit service
319+
- `http://localhost:18790/marketplace` — Plugin marketplace
320+
321+
---
322+
323+
## Professional Services
324+
325+
- **Glasswing Security Audit** ($299+) — Automated smart contract security scanning at `/audit`
326+
- **Contract Conversion** ($499+) — Professional plain-English to Solidity at `/services/conversion`
327+
328+
---
329+
330+
## Plugin Development
331+
332+
Build and sell plugins for 0pnMatrx. Developers keep 90% of revenue.
333+
334+
```bash
335+
# See the example plugin
336+
cat runtime/plugins/example_plugin.py
337+
338+
# Full guide
339+
cat docs/PLUGIN_DEVELOPMENT.md
340+
```
341+
342+
Submit plugins at `/marketplace` or via `POST /marketplace/plugins/submit`.
343+
344+
---
345+
346+
## JavaScript SDK
347+
348+
```bash
349+
npm install @opnmatrx/sdk
350+
```
351+
352+
```typescript
353+
import { OpenMatrixClient } from '@opnmatrx/sdk';
354+
const client = new OpenMatrixClient('http://localhost:18790');
355+
const response = await client.chat('What can you do?');
356+
```
357+
358+
---
359+
295360
## Contributing
296361

297362
See `CONTRIBUTING.md` for the Möbius loop contribution model.

ROADMAP.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,31 @@
99
- ~~Glasswing security audit layer~~ ✓ — 12-point vulnerability scanning on all contracts
1010
- ~~Managed agent orchestration~~ ✓ — event-driven coordination, session lifecycle, hooks
1111
- ~~Contract Conversion pipeline~~ ✓ — pseudocode/Solidity/Vyper → optimised Solidity → audit → compile → on-chain deploy → EAS attestation
12+
- ~~Subscription tiers~~ ✓ — Free / Pro ($4.99) / Enterprise ($19.99) with Stripe integration, usage tracking, and feature gating
13+
- ~~Plugin marketplace~~ ✓ — developer plugin store with 90/10 revenue split, submissions, purchases, and download tracking
14+
- ~~Web interface~~ ✓ — landing, chat, pricing, audit, marketplace, and conversion service pages
15+
- ~~Professional services~~ ✓ — Glasswing audit ($299+) and contract conversion ($499+) as paid tiers
16+
- ~~A2A commerce~~ ✓ — agent-to-agent service registry and discovery protocol
17+
- ~~JavaScript SDK~~ ✓ — `@opnmatrx/sdk` npm package with TypeScript support
18+
- ~~Social media integration~~ ✓ — Twitter and Discord automated announcements
1219
- Unified Rexhepi Framework — full deployment
1320
- Consumer Layer — public-facing protocol
1421
- Local LLM support expansion
1522
- Distributed agent coordination — remote agent support, cross-node HiveMind
1623

24+
## Revenue
25+
26+
All revenue flows through the NeoSafe multisig at `0x46fF491D7054A6F500026B3E81f358190f8d8Ec5`.
27+
28+
- **Subscriptions** — Free / Pro ($4.99/mo) / Enterprise ($19.99/mo) via Stripe
29+
- **On-chain platform fees** — transparent, visible on-chain, disclosed before first transaction
30+
- **Plugin marketplace** — 10% platform commission (developers keep 90%)
31+
- **Professional services** — Glasswing audit ($299+), contract conversion ($499+)
32+
- **Solidity template packs** — DeFi, Creator, Business packs via Gumroad ($49 each, $119 bundle)
33+
- **Grants** — Base Ecosystem Fund, Ethereum Foundation ESP, Optimism RPGF, Gitcoin Grants
34+
35+
See `docs/MONETIZATION.md` for the full breakdown.
36+
1737
## Blockchain Activation
1838

1939
The full execution layer is wired and tested in offline mode — every one

docs/MONETIZATION.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# 0pnMatrx Monetization Model
2+
3+
How 0pnMatrx generates revenue while keeping the free tier genuinely useful.
4+
5+
## Philosophy
6+
7+
The free tier is real. It will always exist and will always provide genuine access
8+
to all 30 blockchain services with reasonable limits. We believe that making
9+
blockchain accessible to everyone is more important than maximising revenue.
10+
11+
Revenue funds continued development, infrastructure costs, and the team.
12+
13+
## Revenue Streams
14+
15+
### 1. Subscription Tiers
16+
17+
| Tier | Price | Target |
18+
|------|-------|--------|
19+
| Free | $0/month | Everyone — personal use, learning, small projects |
20+
| Pro | $4.99/month | Power users, small businesses, developers |
21+
| Enterprise | $19.99/month | Teams, agencies, enterprises |
22+
23+
The free tier includes all 30 services with monthly limits (5 contract conversions,
24+
3 NFT mints, $5k DeFi volume, etc.). Pro raises limits significantly. Enterprise
25+
removes them entirely and adds team features.
26+
27+
A 3-day free trial is available for both paid tiers.
28+
29+
### 2. On-Chain Platform Fees
30+
31+
Small, transparent fees are applied to certain on-chain transactions (NFT mints,
32+
contract deployments, marketplace sales). These fees:
33+
34+
- Are fully visible on-chain
35+
- Route to the NeoSafe multisig at `0x46fF491D7054A6F500026B3E81f358190f8d8Ec5`
36+
- Fund platform development, infrastructure, and contract audits
37+
- Are disclosed to users before their first transaction of each type
38+
39+
### 3. Professional Services
40+
41+
- **Glasswing Security Audit** — $299 / $599 / $999 per contract
42+
Automated + manual smart contract security auditing
43+
44+
- **Smart Contract Conversion** — $499 one-time / $1,499/month (5) / $3,999/month unlimited
45+
Professional plain-English to Solidity conversion with audit included
46+
47+
### 4. Plugin Marketplace
48+
49+
Third-party developers can sell plugins that extend the platform. Revenue split:
50+
**developers keep 90%, platform takes 10%**. Free plugins are always welcome.
51+
52+
### 5. Solidity Template Packs (Gumroad)
53+
54+
Pre-built, production-ready smart contract templates sold as digital products:
55+
- DeFi Primitives Pack — $49
56+
- Creator Economy Pack — $49
57+
- Business Infrastructure Pack — $49
58+
- All Three Packs — $119
59+
60+
### 6. Grants
61+
62+
The platform applies for ecosystem grants to fund public-good development:
63+
- Base Ecosystem Fund
64+
- Ethereum Foundation ESP
65+
- Optimism RPGF
66+
- Gitcoin Grants
67+
68+
## Ownership & Revenue Routing
69+
70+
All revenue routes through the NeoSafe multisig wallet. The multisig ensures
71+
transparent fund management with on-chain accountability.
72+
73+
**NeoSafe Address:** `0x46fF491D7054A6F500026B3E81f358190f8d8Ec5`
74+
75+
## What Will Never Change
76+
77+
1. The free tier will always exist
78+
2. Core functionality will never be paywalled
79+
3. The platform will always be open source (MIT)
80+
4. Platform fees will always be transparent and on-chain
81+
5. No token, no speculative asset, no ICO

docs/PLUGIN_DEVELOPMENT.md

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# Plugin Development Guide
2+
3+
Build and sell plugins for the 0pnMatrx platform.
4+
5+
## Quick Start
6+
7+
```python
8+
from runtime.plugins.base import OpenMatrixPlugin
9+
10+
class MyPlugin(OpenMatrixPlugin):
11+
@property
12+
def name(self) -> str:
13+
return "my-plugin"
14+
15+
@property
16+
def version(self) -> str:
17+
return "1.0.0"
18+
19+
async def on_load(self, config: dict) -> None:
20+
print("Plugin loaded!")
21+
22+
async def on_unload(self) -> None:
23+
print("Plugin unloaded!")
24+
```
25+
26+
## Plugin Lifecycle
27+
28+
1. **Discovery** — The `PluginLoader` scans `plugins/installed/` for Python packages
29+
2. **Loading** — Each package is imported and scanned for `OpenMatrixPlugin` subclasses
30+
3. **Initialization**`on_load(config)` is called with the platform config
31+
4. **Runtime** — Hooks are called during message processing
32+
5. **Shutdown**`on_unload()` is called on platform shutdown
33+
34+
## Available Hooks
35+
36+
| Hook | When Called | Can Modify? |
37+
|------|-----------|-------------|
38+
| `on_load(config)` | Plugin startup | No |
39+
| `on_unload()` | Plugin shutdown | No |
40+
| `on_message(agent, message)` | Before agent processes a message | Yes — return modified message |
41+
| `on_tool_call(tool_name, args)` | Before a tool executes | Yes — return modified args |
42+
| `get_tools()` | During initialization | Registers new tools |
43+
| `get_commands()` | During initialization | Registers slash commands |
44+
45+
## Registering Custom Tools
46+
47+
```python
48+
def get_tools(self) -> list[dict]:
49+
return [{
50+
"name": "my_custom_tool",
51+
"description": "Does something useful",
52+
"parameters": {
53+
"type": "object",
54+
"properties": {
55+
"input": {"type": "string", "description": "The input data"}
56+
},
57+
"required": ["input"]
58+
},
59+
"handler": self.handle_tool,
60+
}]
61+
62+
async def handle_tool(self, input: str, **kwargs) -> str:
63+
return f"Processed: {input}"
64+
```
65+
66+
## Plugin Marketplace
67+
68+
### Selling Your Plugin
69+
70+
1. Build and test your plugin locally
71+
2. Submit it via `POST /marketplace/plugins/submit` (requires Enterprise tier)
72+
3. Wait for review and approval
73+
4. Your plugin appears on the marketplace
74+
75+
### Revenue Share
76+
77+
**You keep 90%. We take 10%.**
78+
79+
Set your price when submitting. Free plugins are always welcome and don't require
80+
any revenue share.
81+
82+
### Pricing Options
83+
84+
- **One-time** — User pays once, gets the plugin forever
85+
- **Monthly** — Recurring subscription for ongoing access
86+
87+
## Directory Structure
88+
89+
```
90+
plugins/installed/my-plugin/
91+
├── __init__.py # Must contain OpenMatrixPlugin subclass
92+
├── handlers.py # Optional: tool and command handlers
93+
├── config.py # Optional: plugin configuration
94+
└── README.md # Optional: documentation
95+
```
96+
97+
## Tier Requirements
98+
99+
Plugins can specify a minimum tier:
100+
101+
```python
102+
@property
103+
def min_tier(self) -> str:
104+
return "pro" # Only Pro and Enterprise users can install
105+
```
106+
107+
## Example: Portfolio Tracker Plugin
108+
109+
```python
110+
from runtime.plugins.base import OpenMatrixPlugin
111+
112+
class PortfolioTracker(OpenMatrixPlugin):
113+
@property
114+
def name(self) -> str:
115+
return "portfolio-tracker"
116+
117+
@property
118+
def version(self) -> str:
119+
return "1.0.0"
120+
121+
@property
122+
def description(self) -> str:
123+
return "Track your DeFi portfolio across multiple chains"
124+
125+
def get_commands(self) -> list[dict]:
126+
return [{
127+
"name": "/portfolio",
128+
"description": "Show your current portfolio balances",
129+
"handler": self.show_portfolio,
130+
}]
131+
132+
async def show_portfolio(self, **kwargs) -> str:
133+
return "Portfolio: ETH 2.5, USDC 1000, ..."
134+
```
135+
136+
## Testing Your Plugin
137+
138+
```python
139+
import pytest
140+
from my_plugin import MyPlugin
141+
142+
@pytest.mark.asyncio
143+
async def test_plugin_loads():
144+
plugin = MyPlugin()
145+
await plugin.on_load({})
146+
assert plugin.name == "my-plugin"
147+
```
148+
149+
## API Reference
150+
151+
See `docs/api-reference.md` for the full gateway API including marketplace endpoints.

0 commit comments

Comments
 (0)