@elizaos/plugin-elizamaker 2.0.3-beta.2

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +89 -0
  3. package/package.json +67 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shaw Walters and elizaOS Contributors
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,89 @@
1
+ # @elizaos/plugin-elizamaker
2
+
3
+ Adds an ERC-8041 NFT drop system to an Eliza agent: public and whitelist minting plus Twitter/X-verified Merkle proofs, exposed as HTTP API routes on the agent server.
4
+
5
+ ## What this plugin does
6
+
7
+ When enabled, the plugin exposes HTTP API routes directly on the agent's server. These routes let users:
8
+
9
+ - Check drop phase status (is public/whitelist mint open, current supply, shiny price)
10
+ - Mint a free ERC-8041 agent NFT (agent wallet pays gas)
11
+ - Mint a "shiny" variant (0.1 ETH + gas)
12
+ - Mint with a whitelist Merkle proof for whitelisted wallets
13
+ - Verify Twitter/X ownership to join the whitelist (via a public tweet containing their wallet address + `#ElizaAgent`)
14
+ - Query current Merkle root and generate proofs for any address
15
+
16
+ The package also exports Eliza NFT holder-check helpers (`verifyElizaHolder` / `verifyAndWhitelistHolder` in `nft-verify.ts`), but no HTTP route currently invokes them.
17
+
18
+ ## Actions / capabilities added
19
+
20
+ | Route | What it does |
21
+ |---|---|
22
+ | `GET /api/drop/status` | Drop flags, supply, shiny price, whether agent wallet has minted |
23
+ | `POST /api/drop/mint` | Free public mint; `{ name, endpoint, shiny? }` |
24
+ | `POST /api/drop/mint-whitelist` | Whitelist mint; proof auto-generated from agent wallet if omitted |
25
+ | `GET /api/whitelist/status` | Verification state and Merkle info for the agent EVM wallet |
26
+ | `POST /api/whitelist/twitter/message` | Returns the tweet text the user must post |
27
+ | `POST /api/whitelist/twitter/verify` | Confirms the tweet and marks the wallet whitelisted; `{ tweetUrl }` |
28
+ | `GET /api/whitelist/merkle/root` | Current root and address count |
29
+ | `GET /api/whitelist/merkle/proof` | Proof for `?address=<evm>` |
30
+
31
+ ## Requirements
32
+
33
+ - An EVM wallet configured for the agent (`EVM_PRIVATE_KEY`)
34
+ - A deployed ERC-8041 collection contract
35
+ - A JSON-RPC endpoint for the network the contract lives on
36
+ - The eliza config file (`~/.eliza/eliza.json` by default) must include:
37
+
38
+ ```json
39
+ {
40
+ "registry": {
41
+ "registryAddress": "0x...",
42
+ "collectionAddress": "0x...",
43
+ "mainnetRpc": "https://your-rpc-url"
44
+ },
45
+ "features": {
46
+ "dropEnabled": true
47
+ }
48
+ }
49
+ ```
50
+
51
+ If `EVM_PRIVATE_KEY`, `registryAddress`, or `mainnetRpc` are missing, the plugin loads silently but all drop/mint routes return 503. The whitelist and Merkle routes still work without a contract connection.
52
+
53
+ ## Enabling the plugin
54
+
55
+ Add to your agent's plugin list:
56
+
57
+ ```ts
58
+ import { elizaMakerPlugin } from "@elizaos/plugin-elizamaker";
59
+
60
+ const agent = new AgentRuntime({
61
+ plugins: [elizaMakerPlugin],
62
+ // ...
63
+ });
64
+ ```
65
+
66
+ Or reference it by package name in your agent character config if the runtime supports string-based plugin loading.
67
+
68
+ ## Whitelist flow
69
+
70
+ 1. Call `POST /api/whitelist/twitter/message` — get the verification message.
71
+ 2. Post it on X (Twitter) exactly as returned.
72
+ 3. Call `POST /api/whitelist/twitter/verify` with `{ "tweetUrl": "https://x.com/..." }`.
73
+ 4. On success the wallet is added to `whitelist.json` in the agent state dir.
74
+ 5. Call `GET /api/whitelist/merkle/proof` to get the `bytes32[]` proof, then submit with `POST /api/drop/mint-whitelist`.
75
+
76
+ Note: `nft-verify.ts` exports `verifyElizaHolder` / `verifyAndWhitelistHolder` for NFT-based whitelisting, but these are not wired to any route. The `nftVerified` field returned by `GET /api/whitelist/status` is currently an alias of the Twitter verification state.
77
+
78
+ ## Environment variables
79
+
80
+ | Variable | Default | Notes |
81
+ |---|---|---|
82
+ | `EVM_PRIVATE_KEY` | — | Required for mint transactions; set as agent runtime setting |
83
+ | `ELIZA_NFT_RPC_URL` | `https://mainnet.base.org` | Override RPC for Eliza NFT holder check |
84
+
85
+ ## Building
86
+
87
+ ```bash
88
+ bun run --cwd plugins/plugin-elizamaker build
89
+ ```
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@elizaos/plugin-elizamaker",
3
+ "version": "2.0.3-beta.2",
4
+ "type": "module",
5
+ "description": "ElizaMaker: ERC-8041 NFT drop/mint/whitelist routes, Twitter-verified Merkle proofs, and OG code tracking.",
6
+ "main": "./dist/index.js",
7
+ "exports": {
8
+ "./package.json": "./package.json",
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "eliza-source": {
12
+ "types": "./src/index.ts",
13
+ "import": "./src/index.ts",
14
+ "default": "./src/index.ts"
15
+ },
16
+ "import": "./dist/index.js",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "./plugin": {
20
+ "types": "./dist/plugin.d.ts",
21
+ "import": "./dist/plugin.js",
22
+ "default": "./dist/plugin.js"
23
+ },
24
+ "./*.css": "./dist/*.css",
25
+ "./*": {
26
+ "types": "./dist/*.d.ts",
27
+ "eliza-source": {
28
+ "types": "./src/*.ts",
29
+ "import": "./src/*.ts",
30
+ "default": "./src/*.ts"
31
+ },
32
+ "import": "./dist/*.js",
33
+ "default": "./dist/*.js"
34
+ }
35
+ },
36
+ "dependencies": {
37
+ "@elizaos/agent": "2.0.3-beta.2",
38
+ "@elizaos/core": "2.0.3-beta.2",
39
+ "ethers": "^6.15.0"
40
+ },
41
+ "agentConfig": {
42
+ "pluginType": "elizaos:plugin:1.0.0",
43
+ "pluginParameters": {}
44
+ },
45
+ "elizaos": {
46
+ "app": {
47
+ "heroImage": "assets/hero.png"
48
+ }
49
+ },
50
+ "publishConfig": {
51
+ "access": "public"
52
+ },
53
+ "types": "./dist/index.d.ts",
54
+ "scripts": {
55
+ "build": "bun run build:js && bun run build:types",
56
+ "clean": "rm -rf dist",
57
+ "build:js": "tsup --config ../tsup.plugin-packages.shared.ts",
58
+ "build:types": "tsc --noCheck -p tsconfig.build.json"
59
+ },
60
+ "files": [
61
+ "dist"
62
+ ],
63
+ "devDependencies": {
64
+ "tsup": "^8.5.1"
65
+ },
66
+ "gitHead": "82fe0f44215954c2417328203f5bd6510985c1fc"
67
+ }