@jonathanbulkeley/plugin-mycelia-signal 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mycelia Signal
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,193 @@
1
+ # @elizaos/plugin-mycelia-signal
2
+
3
+ Mycelia Signal sovereign price oracle plugin for ElizaOS.
4
+
5
+ Provides cryptographically signed price attestations for BTC, ETH, SOL, XAU, and EUR pairs. Every response is a canonical signed payload — pair, price, sources, aggregation method, timestamp, and nonce — independently verifiable against a known public key. No vendor trust required.
6
+
7
+ **Payment options:**
8
+ - **L402** — pay per query in Bitcoin sats via Lightning Network
9
+ - **x402** — pay per query in USDC on Base
10
+
11
+ No API keys. No subscriptions. No accounts.
12
+
13
+ ---
14
+
15
+ ## Supported Pairs
16
+
17
+ | Pair | Description | Cost (L402) | Cost (x402) |
18
+ |------|-------------|-------------|-------------|
19
+ | BTC/USD | Bitcoin / US Dollar spot | 10 sats | $0.001 |
20
+ | BTC/USD VWAP | Bitcoin / US Dollar 5-min VWAP | 20 sats | $0.002 |
21
+ | ETH/USD | Ethereum / US Dollar spot | 10 sats | $0.001 |
22
+ | EUR/USD | Euro / US Dollar spot | 10 sats | $0.001 |
23
+ | XAU/USD | Gold / US Dollar spot | 10 sats | $0.001 |
24
+ | SOL/USD | Solana / US Dollar spot | 10 sats | $0.001 |
25
+ | BTC/EUR | Bitcoin / Euro spot | 10 sats | $0.001 |
26
+ | BTC/EUR VWAP | Bitcoin / Euro 5-min VWAP | 20 sats | $0.002 |
27
+ | ETH/EUR | Ethereum / Euro spot | 10 sats | $0.001 |
28
+ | SOL/EUR | Solana / Euro spot | 10 sats | $0.001 |
29
+ | XAU/EUR | Gold / Euro spot | 10 sats | $0.001 |
30
+
31
+ ---
32
+
33
+ ## Installation
34
+
35
+ ```bash
36
+ npm install @elizaos/plugin-mycelia-signal
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Usage
42
+
43
+ ### Basic (no payment — free endpoints only)
44
+
45
+ ```typescript
46
+ import { myceliaSignalPlugin } from "@elizaos/plugin-mycelia-signal";
47
+
48
+ // In your agent character config:
49
+ {
50
+ plugins: [myceliaSignalPlugin]
51
+ }
52
+ ```
53
+
54
+ ### With x402 (USDC on Base)
55
+
56
+ ```typescript
57
+ import { createMyceliaSignalPlugin } from "@elizaos/plugin-mycelia-signal";
58
+
59
+ const plugin = createMyceliaSignalPlugin({
60
+ x402PaymentHandler: async (paymentDetails) => {
61
+ // Use Coinbase AgentKit, Viem, or any EVM wallet to pay USDC on Base
62
+ // Returns the X-Payment header value
63
+ const payment = await yourWallet.payX402(paymentDetails);
64
+ return payment.header;
65
+ }
66
+ });
67
+ ```
68
+
69
+ ### With L402 (Lightning)
70
+
71
+ ```typescript
72
+ import { createMyceliaSignalPlugin } from "@elizaos/plugin-mycelia-signal";
73
+
74
+ const plugin = createMyceliaSignalPlugin({
75
+ preferL402: true,
76
+ lightningMacaroon: "your-macaroon",
77
+ lightningPreimageFetcher: async (invoice) => {
78
+ // Use your Lightning wallet SDK to pay the invoice
79
+ // Returns the payment preimage
80
+ const result = await yourLightningWallet.payInvoice(invoice);
81
+ return result.preimage;
82
+ }
83
+ });
84
+ ```
85
+
86
+ ### With Coinbase AgentKit (recommended for AI agents)
87
+
88
+ ```typescript
89
+ import { createMyceliaSignalPlugin } from "@elizaos/plugin-mycelia-signal";
90
+ import { CdpWalletProvider } from "@coinbase/agentkit";
91
+
92
+ // AgentKit wallet on Base — pays x402 natively
93
+ const walletProvider = await CdpWalletProvider.configureWithWallet({ /* ... */ });
94
+
95
+ const plugin = createMyceliaSignalPlugin({
96
+ x402PaymentHandler: async (paymentDetails) => {
97
+ // AgentKit handles x402 payment automatically
98
+ return await walletProvider.payX402(paymentDetails);
99
+ }
100
+ });
101
+ ```
102
+
103
+ ---
104
+
105
+ ## Agent Actions
106
+
107
+ Once installed, your ElizaOS agent will respond to natural language queries about prices:
108
+
109
+ - *"What's the Bitcoin price?"* → fetches BTC/USD signed attestation
110
+ - *"Get me the ETH USD price"* → fetches ETH/USD signed attestation
111
+ - *"What's gold trading at?"* → fetches XAU/USD signed attestation
112
+ - *"SOL price in euros"* → fetches SOL/EUR signed attestation
113
+ - *"BTC VWAP"* → fetches BTC/USD 5-minute VWAP attestation
114
+
115
+ Each response includes:
116
+ - Current price
117
+ - UTC timestamp
118
+ - Sources used (exchange names)
119
+ - Aggregation method (median or VWAP)
120
+ - Cryptographic signature for independent verification
121
+ - Public key reference
122
+
123
+ ---
124
+
125
+ ## Response Format
126
+
127
+ The plugin returns structured content alongside the natural language response:
128
+
129
+ ```json
130
+ {
131
+ "pair": "BTCUSD",
132
+ "price": "67125.10",
133
+ "currency": "USD",
134
+ "timestamp": "2026-03-05T14:07:07Z",
135
+ "sources": ["binance", "bitstamp", "coinbase", "gemini", "kraken"],
136
+ "method": "median",
137
+ "signature": "<base64>",
138
+ "pubkey": "<hex>",
139
+ "canonical": "v1|BTCUSD|67125.10|USD|2|2026-03-05T14:07:07Z|890123|binance,bitstamp,coinbase,gemini,kraken|median"
140
+ }
141
+ ```
142
+
143
+ The `canonical` field is the exact string that was signed. To verify independently:
144
+
145
+ ```python
146
+ import base64, hashlib
147
+ from coincurve import PublicKey
148
+
149
+ canonical = "v1|BTCUSD|67125.10|..."
150
+ signature_b64 = "<signature from response>"
151
+ pubkey_hex = "<pubkey from response>"
152
+
153
+ msg_hash = hashlib.sha256(canonical.encode()).digest()
154
+ pub = PublicKey(bytes.fromhex(pubkey_hex))
155
+ sig = base64.b64decode(signature_b64)
156
+ valid = pub.verify(sig, msg_hash, hasher=None)
157
+ ```
158
+
159
+ Full verification guide: https://myceliasignal.com/docs/verification
160
+
161
+ ---
162
+
163
+ ## Payment Protocols
164
+
165
+ ### x402 (USDC on Base) — recommended for AI agents
166
+
167
+ The x402 protocol is purpose-built for machine-to-machine payments. The agent pays USDC on Base Mainnet and receives the signed attestation in the same HTTP exchange. Compatible with Coinbase AgentKit Agentic Wallets.
168
+
169
+ - Asset: USDC on Base (`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`)
170
+ - Docs: https://myceliasignal.com/docs/x402
171
+
172
+ ### L402 (Lightning Network) — for Bitcoin-native agents
173
+
174
+ The L402 protocol uses HTTP 402 with a Lightning invoice and macaroon. Pay the invoice, extract the preimage, resend the request.
175
+
176
+ - Cost: 10–20 sats per query
177
+ - Docs: https://myceliasignal.com/docs/l402
178
+
179
+ ---
180
+
181
+ ## Links
182
+
183
+ - **Documentation:** https://myceliasignal.com/docs
184
+ - **API Reference:** https://myceliasignal.com/openapi.json
185
+ - **Public Keys:** https://myceliasignal.com/docs/keys
186
+ - **GitHub:** https://github.com/jonathanbulkeley/mycelia-signal-sovereign-oracle
187
+ - **Support:** info@myceliasignal.com
188
+
189
+ ---
190
+
191
+ ## License
192
+
193
+ MIT
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Mycelia Signal Plugin for ElizaOS
3
+ *
4
+ * Cryptographically signed price attestations for BTC, ETH, SOL, XAU, EUR pairs.
5
+ * Pay per query via Lightning (L402) or USDC on Base (x402).
6
+ * Every response is independently verifiable. No vendor trust required.
7
+ *
8
+ * Docs: https://myceliasignal.com/docs
9
+ */
10
+ import type { Plugin } from "@elizaos/core";
11
+ interface OracleResponse {
12
+ domain: string;
13
+ canonical: string;
14
+ signature: string;
15
+ pubkey: string;
16
+ }
17
+ interface ParsedAttestation {
18
+ version: string;
19
+ pair: string;
20
+ price: string;
21
+ currency: string;
22
+ decimals: string;
23
+ timestamp: string;
24
+ nonce: string;
25
+ sources: string[];
26
+ method: string;
27
+ }
28
+ export interface PluginConfig {
29
+ lightningPreimageFetcher?: (invoice: string) => Promise<string>;
30
+ lightningMacaroon?: string;
31
+ x402PaymentHandler?: (paymentDetails: unknown) => Promise<string>;
32
+ preferL402?: boolean;
33
+ }
34
+ export declare function createMyceliaSignalPlugin(config?: PluginConfig): Plugin;
35
+ export declare const myceliaSignalPlugin: Plugin;
36
+ export default myceliaSignalPlugin;
37
+ export type { OracleResponse, ParsedAttestation };
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,MAAM,EASP,MAAM,eAAe,CAAC;AAkBvB,UAAU,cAAc;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,wBAAwB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAChE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAClE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAkND,wBAAgB,yBAAyB,CAAC,MAAM,GAAE,YAAiB,GAAG,MAAM,CAQ3E;AAED,eAAO,MAAM,mBAAmB,QAA8B,CAAC;AAC/D,eAAe,mBAAmB,CAAC;AACnC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,215 @@
1
+ "use strict";
2
+ /**
3
+ * Mycelia Signal Plugin for ElizaOS
4
+ *
5
+ * Cryptographically signed price attestations for BTC, ETH, SOL, XAU, EUR pairs.
6
+ * Pay per query via Lightning (L402) or USDC on Base (x402).
7
+ * Every response is independently verifiable. No vendor trust required.
8
+ *
9
+ * Docs: https://myceliasignal.com/docs
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.myceliaSignalPlugin = void 0;
13
+ exports.createMyceliaSignalPlugin = createMyceliaSignalPlugin;
14
+ const BASE_URL = "https://api.myceliasignal.com";
15
+ const PAIRS = {
16
+ BTCUSD: { endpoint: "/oracle/btcusd", description: "Bitcoin / US Dollar spot price" },
17
+ BTCUSD_VWAP: { endpoint: "/oracle/btcusd/vwap", description: "Bitcoin / US Dollar 5-min VWAP" },
18
+ ETHUSD: { endpoint: "/oracle/ethusd", description: "Ethereum / US Dollar spot price" },
19
+ EURUSD: { endpoint: "/oracle/eurusd", description: "Euro / US Dollar spot price" },
20
+ XAUUSD: { endpoint: "/oracle/xauusd", description: "Gold / US Dollar spot price" },
21
+ SOLUSD: { endpoint: "/oracle/solusd", description: "Solana / US Dollar spot price" },
22
+ BTCEUR: { endpoint: "/oracle/btceur", description: "Bitcoin / Euro spot price" },
23
+ BTCEUR_VWAP: { endpoint: "/oracle/btceur/vwap", description: "Bitcoin / Euro 5-min VWAP" },
24
+ ETHEUR: { endpoint: "/oracle/etheur", description: "Ethereum / Euro spot price" },
25
+ SOLEUR: { endpoint: "/oracle/soleur", description: "Solana / Euro spot price" },
26
+ XAUEUR: { endpoint: "/oracle/xaueur", description: "Gold / Euro spot price" },
27
+ };
28
+ function parseCanonical(canonical) {
29
+ const parts = canonical.split("|");
30
+ return {
31
+ version: parts[0],
32
+ pair: parts[1],
33
+ price: parts[2],
34
+ currency: parts[3],
35
+ decimals: parts[4],
36
+ timestamp: parts[5],
37
+ nonce: parts[6],
38
+ sources: parts[7]?.split(",") ?? [],
39
+ method: parts[8],
40
+ };
41
+ }
42
+ function isOracleResponse(data) {
43
+ return (typeof data === "object" &&
44
+ data !== null &&
45
+ "domain" in data &&
46
+ "canonical" in data &&
47
+ "signature" in data &&
48
+ "pubkey" in data);
49
+ }
50
+ async function fetchAttestation(endpoint, config = {}) {
51
+ const url = `${BASE_URL}${endpoint}`;
52
+ try {
53
+ const response = await fetch(url, { signal: AbortSignal.timeout(20000) });
54
+ if (response.ok) {
55
+ const raw = await response.json();
56
+ if (!isOracleResponse(raw))
57
+ return null;
58
+ return { attestation: raw, parsed: parseCanonical(raw.canonical) };
59
+ }
60
+ if (response.status === 402) {
61
+ const wwwAuth = response.headers.get("WWW-Authenticate");
62
+ const xPaymentResponse = response.headers.get("X-Payment-Response");
63
+ if (wwwAuth && config.lightningMacaroon && config.lightningPreimageFetcher) {
64
+ const invoiceMatch = wwwAuth.match(/invoice="([^"]+)"/);
65
+ const macaroonMatch = wwwAuth.match(/macaroon="([^"]+)"/);
66
+ if (invoiceMatch && macaroonMatch) {
67
+ const preimage = await config.lightningPreimageFetcher(invoiceMatch[1]);
68
+ const paid = await fetch(url, {
69
+ headers: { "Authorization": `L402 ${macaroonMatch[1]}:${preimage}` },
70
+ signal: AbortSignal.timeout(20000),
71
+ });
72
+ if (paid.ok) {
73
+ const raw = await paid.json();
74
+ if (!isOracleResponse(raw))
75
+ return null;
76
+ return { attestation: raw, parsed: parseCanonical(raw.canonical) };
77
+ }
78
+ }
79
+ }
80
+ if (xPaymentResponse && config.x402PaymentHandler) {
81
+ const details = JSON.parse(xPaymentResponse);
82
+ const header = await config.x402PaymentHandler(details);
83
+ const paid = await fetch(url, {
84
+ headers: { "X-Payment": header },
85
+ signal: AbortSignal.timeout(20000),
86
+ });
87
+ if (paid.ok) {
88
+ const raw = await paid.json();
89
+ if (!isOracleResponse(raw))
90
+ return null;
91
+ return { attestation: raw, parsed: parseCanonical(raw.canonical) };
92
+ }
93
+ }
94
+ }
95
+ return null;
96
+ }
97
+ catch (err) {
98
+ console.error(`[mycelia-signal] error fetching ${endpoint}:`, err);
99
+ return null;
100
+ }
101
+ }
102
+ function formatMessage(parsed, raw) {
103
+ const price = parseFloat(parsed.price).toLocaleString("en-US", {
104
+ minimumFractionDigits: 2,
105
+ maximumFractionDigits: 2,
106
+ });
107
+ const symbol = parsed.currency === "USD" ? "$" : parsed.currency === "EUR" ? "€" : "";
108
+ return [
109
+ `**${parsed.pair}** ${parsed.method.toUpperCase()}: ${symbol}${price} ${parsed.currency}`,
110
+ `Timestamp: ${new Date(parsed.timestamp).toUTCString()}`,
111
+ `Sources (${parsed.sources.length}): ${parsed.sources.join(", ")}`,
112
+ `Signature: ${raw.signature.substring(0, 16)}...`,
113
+ `Verify: https://myceliasignal.com/docs/verification`,
114
+ ].join("\n");
115
+ }
116
+ const PAIR_KEYWORDS = {
117
+ BTCUSD: ["btc", "bitcoin", "btcusd", "bitcoin price", "btc price"],
118
+ BTCUSD_VWAP: ["btc vwap", "bitcoin vwap", "vwap bitcoin"],
119
+ ETHUSD: ["eth", "ethereum", "ethusd", "eth price", "ethereum price"],
120
+ EURUSD: ["eurusd", "eur/usd", "euro dollar", "euro usd"],
121
+ XAUUSD: ["gold", "xau", "xauusd", "gold price"],
122
+ SOLUSD: ["sol", "solana", "solusd", "sol price", "solana price"],
123
+ BTCEUR: ["btceur", "btc eur", "bitcoin euro"],
124
+ BTCEUR_VWAP: ["btceur vwap", "bitcoin euro vwap"],
125
+ ETHEUR: ["etheur", "eth eur", "ethereum euro"],
126
+ SOLEUR: ["soleur", "sol eur", "solana euro"],
127
+ XAUEUR: ["xaueur", "xau eur", "gold euro"],
128
+ };
129
+ function createPriceAction(pair, config) {
130
+ const pairInfo = PAIRS[pair];
131
+ const keywords = PAIR_KEYWORDS[pair] ?? [pair.toLowerCase()];
132
+ const examples = [[
133
+ { name: "user", content: { text: `What is the ${pair} price?` } },
134
+ { name: "agent", content: { text: `Fetching ${pairInfo.description} from Mycelia Signal...` } },
135
+ ]];
136
+ return {
137
+ name: `GET_PRICE_${pair}`,
138
+ description: `Get the current ${pairInfo.description} from Mycelia Signal — cryptographically signed and independently verifiable`,
139
+ similes: keywords.map(k => `get ${k} price`),
140
+ examples,
141
+ validate: async (_runtime, message) => {
142
+ const text = (message.content?.text ?? "").toLowerCase();
143
+ return keywords.some(k => text.includes(k));
144
+ },
145
+ handler: async (_runtime, _message, _state, _options, callback) => {
146
+ const result = await fetchAttestation(pairInfo.endpoint, config);
147
+ if (!result) {
148
+ if (callback) {
149
+ await callback({
150
+ text: `Unable to fetch ${pair} price. Payment may be required — configure L402 or x402 handler. See https://myceliasignal.com/docs/quickstart`,
151
+ });
152
+ }
153
+ return;
154
+ }
155
+ if (callback) {
156
+ await callback({
157
+ text: formatMessage(result.parsed, result.attestation),
158
+ content: {
159
+ pair: result.parsed.pair,
160
+ price: result.parsed.price,
161
+ currency: result.parsed.currency,
162
+ timestamp: result.parsed.timestamp,
163
+ sources: result.parsed.sources,
164
+ method: result.parsed.method,
165
+ signature: result.attestation.signature,
166
+ pubkey: result.attestation.pubkey,
167
+ canonical: result.attestation.canonical,
168
+ },
169
+ });
170
+ }
171
+ },
172
+ };
173
+ }
174
+ function createPriceProvider(config) {
175
+ return {
176
+ name: "mycelia-signal-price-provider",
177
+ get: async (_runtime, message, _state) => {
178
+ const text = (message.content?.text ?? "").toLowerCase();
179
+ let targetPair = null;
180
+ for (const [pair, keywords] of Object.entries(PAIR_KEYWORDS)) {
181
+ if (keywords.some(k => text.includes(k))) {
182
+ targetPair = pair;
183
+ break;
184
+ }
185
+ }
186
+ if (!targetPair || !PAIRS[targetPair])
187
+ return { text: "" };
188
+ const result = await fetchAttestation(PAIRS[targetPair].endpoint, config);
189
+ if (!result)
190
+ return { text: "" };
191
+ return {
192
+ text: `Current ${result.parsed.pair}: ${result.parsed.price} ${result.parsed.currency} (${result.parsed.method}, ${result.parsed.sources.length} sources, signed, ${result.parsed.timestamp})`,
193
+ data: {
194
+ pair: result.parsed.pair,
195
+ price: result.parsed.price,
196
+ currency: result.parsed.currency,
197
+ timestamp: result.parsed.timestamp,
198
+ sources: result.parsed.sources,
199
+ canonical: result.attestation.canonical,
200
+ },
201
+ };
202
+ },
203
+ };
204
+ }
205
+ function createMyceliaSignalPlugin(config = {}) {
206
+ return {
207
+ name: "@elizaos/plugin-mycelia-signal",
208
+ description: "Mycelia Signal sovereign price oracle — cryptographically signed price attestations for BTC, ETH, SOL, XAU, EUR pairs via Lightning (L402) or USDC on Base (x402). Every response is independently verifiable. No vendor trust required.",
209
+ actions: Object.keys(PAIRS).map(pair => createPriceAction(pair, config)),
210
+ providers: [createPriceProvider(config)],
211
+ };
212
+ }
213
+ exports.myceliaSignalPlugin = createMyceliaSignalPlugin();
214
+ exports.default = exports.myceliaSignalPlugin;
215
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":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B,EAAE,CAAC;AAC/D,kBAAe,2BAAmB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@jonathanbulkeley/plugin-mycelia-signal",
3
+ "version": "1.0.0",
4
+ "description": "Mycelia Signal sovereign price oracle plugin for ElizaOS — cryptographically signed price attestations for BTC, ETH, SOL, XAU, EUR pairs via Lightning (L402) or USDC on Base (x402)",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "dev": "tsc --watch",
10
+ "test": "jest"
11
+ },
12
+ "keywords": [
13
+ "elizaos",
14
+ "eliza",
15
+ "plugin",
16
+ "oracle",
17
+ "price-feed",
18
+ "bitcoin",
19
+ "crypto",
20
+ "lightning",
21
+ "l402",
22
+ "x402",
23
+ "defi",
24
+ "attestation",
25
+ "ai-agents"
26
+ ],
27
+ "author": "Mycelia Signal <info@myceliasignal.com>",
28
+ "license": "MIT",
29
+ "homepage": "https://myceliasignal.com",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/jonathanbulkeley/elizaos-plugin-mycelia-signal"
33
+ },
34
+ "peerDependencies": {
35
+ "@elizaos/core": "*"
36
+ },
37
+ "devDependencies": {
38
+ "@elizaos/core": "^1.0.0",
39
+ "@types/node": "^20.0.0",
40
+ "typescript": "^5.0.0"
41
+ },
42
+ "files": [
43
+ "dist",
44
+ "README.md",
45
+ "LICENSE"
46
+ ]
47
+ }