@four-meme/four-meme-ai 1.0.1 → 1.0.3
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/bin/fourmeme.cjs
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
3
|
* fourmeme CLI - dispatches to four-meme-integration scripts.
|
|
4
4
|
* Usage: fourmeme <command> [args...]
|
|
5
5
|
* Run "fourmeme --help" for commands.
|
|
6
|
+
* Loads .env from current working directory (where you run fourmeme) if present.
|
|
6
7
|
*/
|
|
7
8
|
const { spawnSync } = require('child_process');
|
|
8
9
|
const path = require('path');
|
|
9
10
|
|
|
11
|
+
// Load .env from cwd (e.g. your project dir) so PRIVATE_KEY, BSC_RPC_URL etc. work when running from a project
|
|
12
|
+
require('dotenv').config({ path: path.join(process.cwd(), '.env') });
|
|
13
|
+
|
|
10
14
|
const root = path.join(__dirname, '..');
|
|
11
15
|
const scriptsDir = path.join(root, 'skills', 'four-meme-integration', 'scripts');
|
|
12
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@four-meme/four-meme-ai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Four.meme AI skills for creating and trading meme tokens (BSC only)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -42,6 +42,9 @@
|
|
|
42
42
|
"skill",
|
|
43
43
|
"openclaw"
|
|
44
44
|
],
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"dotenv": "^16.0.0"
|
|
47
|
+
},
|
|
45
48
|
"devDependencies": {
|
|
46
49
|
"@types/node": "^20.0.0",
|
|
47
50
|
"tsx": "^4.20.0",
|
|
@@ -12,7 +12,7 @@ description: |
|
|
|
12
12
|
- Querying TaxToken fee/tax config on-chain (BSC only)
|
|
13
13
|
- **Discover → detail → quote → execute**: use token-rankings / token-list / events to find tokens → token-get / token-info for details → quote-buy / quote-sell to estimate → buy / sell to execute (see "Agent workflow: buy/sell from rankings or events" below).
|
|
14
14
|
|
|
15
|
-
BSC only (Arbitrum/Base not supported).
|
|
15
|
+
BSC only (Arbitrum/Base not supported). **Before use, the fourmeme CLI must be installed** (e.g. `npm install -g @four-meme/four-meme-ai@latest`). Create/chain need PRIVATE_KEY. TokenManager V1 not supported.
|
|
16
16
|
**OpenClaw**: PRIVATE_KEY and BSC_RPC_URL are declared in metadata and injected by OpenClaw only when this skill is **enabled** (only this skill can access them). **Two steps required**: (1) Configure private key in the skill’s `apiKey` or `skills.entries["four-meme-ai"].env`; (2) **Enable this skill** in the agent/session so OpenClaw injects the env. See "PRIVATE_KEY and BSC_RPC_URL" below.
|
|
17
17
|
allowed-tools:
|
|
18
18
|
- Bash(fourmeme *)
|
|
@@ -95,6 +95,16 @@ See the **CLI (fourmeme)** table and sections below for commands and arguments.
|
|
|
95
95
|
|
|
96
96
|
BSC only; all commands output JSON. Run `fourmeme --help` for usage.
|
|
97
97
|
|
|
98
|
+
## Installation (required before use)
|
|
99
|
+
|
|
100
|
+
**You must install the fourmeme CLI before using this skill.** Recommended (global):
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npm install -g @four-meme/four-meme-ai@latest
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
After installation, run commands with `fourmeme <command> [args]`. If you use a local install instead, use `npx fourmeme <command> [args]` from the project root.
|
|
107
|
+
|
|
98
108
|
This skill provides: token creation (API + chain), buy/sell quotes and execution, token info/list/rankings, event listening, Tax token fee queries, send, and EIP-8004 identity NFT register and balance. Contract addresses and version notes: [references/contract-addresses.md](references/contract-addresses.md). **TokenManager V1 is not supported in this skill.**
|
|
99
109
|
|
|
100
110
|
## Create token flow
|
|
@@ -153,7 +163,7 @@ When the user asks to “buy/sell based on rankings or activity”, the Agent sh
|
|
|
153
163
|
|
|
154
164
|
## CLI (fourmeme)
|
|
155
165
|
|
|
156
|
-
Run `
|
|
166
|
+
Run `fourmeme --help` for usage. After **global install** (`npm install -g @four-meme/four-meme-ai@latest`), use **`fourmeme <command> [args]`**. With a local install only, use **`npx fourmeme <command> [args]`** from the project root.
|
|
157
167
|
|
|
158
168
|
### PRIVATE_KEY and BSC_RPC_URL
|
|
159
169
|
|
|
@@ -167,7 +177,7 @@ This skill declares `requires.env: ["PRIVATE_KEY"]` and `primaryEnv: "PRIVATE_KE
|
|
|
167
177
|
**When not using OpenClaw (standalone)**
|
|
168
178
|
Set **PRIVATE_KEY** (or **FOURMEME_PRIVATE_KEY**) and optionally **BSC_RPC_URL** via the process environment so they are available when running `npx fourmeme` or `node bin/fourmeme.cjs`:
|
|
169
179
|
|
|
170
|
-
- **.env file**:
|
|
180
|
+
- **.env file**: Put a `.env` file in **the directory where you run the `fourmeme` command** (i.e. your project / working directory). Example: if you run `fourmeme quote-buy ...` from `/path/to/my-project`, place `.env` at `/path/to/my-project/.env`. The CLI automatically loads `.env` from that current working directory. Use lines like `PRIVATE_KEY=...` and `BSC_RPC_URL=...`. Do not commit `.env`; add it to `.gitignore`.
|
|
171
181
|
- **Shell export**: `export PRIVATE_KEY=your_hex_key` and `export BSC_RPC_URL=https://bsc-dataseed.binance.org` (or another BSC RPC), then run `npx fourmeme <command> ...`.
|
|
172
182
|
|
|
173
183
|
| Need | Command | When |
|
|
@@ -438,3 +448,4 @@ See [references/tax-token-query.md](references/tax-token-query.md).
|
|
|
438
448
|
| [execute-trade.md](references/execute-trade.md) | Execute buy/sell CLI and contract usage |
|
|
439
449
|
| [event-listening.md](references/event-listening.md) | TokenManager2 event listening (V2) |
|
|
440
450
|
| [tax-token-query.md](references/tax-token-query.md) | TaxToken on-chain fee/tax query (tax-info) |
|
|
451
|
+
| **Official four.meme API and contracts (online)**: [Protocol Integration](https://four-meme.gitbook.io/four.meme/brand/protocol-integration) | API documents, ABIs: TokenManager, TokenManager2, Helper3, TaxToken, etc. |
|