@ape-church/skill 1.0.1 → 1.0.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.
- package/SKILL.md +0 -4
- package/agent_nodes.md +1 -1
- package/assets/SKILL.md +0 -4
- package/bin/cli.js +3 -17
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -162,10 +162,6 @@ Run `apechurch status --json` to fetch:
|
|
|
162
162
|
- `https://www.ape.church/games/dino-dough?id=<gameId>`
|
|
163
163
|
- `https://www.ape.church/games/bubblegum-heist?id=<gameId>`
|
|
164
164
|
|
|
165
|
-
## Required Env (Optional)
|
|
166
|
-
- `APECHAIN_RPC_URL` for HTTP RPC (recommended).
|
|
167
|
-
- `APECHAIN_WSS_URL` for WebSocket event streaming (preferred for fast events).
|
|
168
|
-
|
|
169
165
|
## Hosted Docs (Reference)
|
|
170
166
|
- `https://ape.church/skill.md`
|
|
171
167
|
- `https://ape.church/heartbeat.md`
|
package/agent_nodes.md
CHANGED
|
@@ -97,7 +97,7 @@ WHAT'S LEFT BEFORE GO-LIVE
|
|
|
97
97
|
HIGH PRIORITY
|
|
98
98
|
- Refactor game definitions into a registry so adding games is data-only. (DONE - registry.js)
|
|
99
99
|
- Registry updates are shipped inside package (Option A). New games require package update.
|
|
100
|
-
-
|
|
100
|
+
- ✅ ApeChain RPC uses viem defaults (no env vars needed).
|
|
101
101
|
- Ensure package install + register flow works end-to-end with API.
|
|
102
102
|
|
|
103
103
|
MEDIUM PRIORITY (POST-LAUNCH)
|
package/assets/SKILL.md
CHANGED
|
@@ -162,10 +162,6 @@ Run `apechurch status --json` to fetch:
|
|
|
162
162
|
- `https://www.ape.church/games/dino-dough?id=<gameId>`
|
|
163
163
|
- `https://www.ape.church/games/bubblegum-heist?id=<gameId>`
|
|
164
164
|
|
|
165
|
-
## Required Env (Optional)
|
|
166
|
-
- `APECHAIN_RPC_URL` for HTTP RPC (recommended).
|
|
167
|
-
- `APECHAIN_WSS_URL` for WebSocket event streaming (preferred for fast events).
|
|
168
|
-
|
|
169
165
|
## Hosted Docs (Reference)
|
|
170
166
|
- `https://ape.church/skill.md`
|
|
171
167
|
- `https://ape.church/heartbeat.md`
|
package/bin/cli.js
CHANGED
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
formatEther,
|
|
12
12
|
http,
|
|
13
13
|
parseEther,
|
|
14
|
-
webSocket,
|
|
15
14
|
} from 'viem';
|
|
16
15
|
import { privateKeyToAccount, generatePrivateKey } from 'viem/accounts';
|
|
17
16
|
import { apechain } from 'viem/chains';
|
|
@@ -103,23 +102,10 @@ function getWallet() {
|
|
|
103
102
|
return privateKeyToAccount(data.privateKey);
|
|
104
103
|
}
|
|
105
104
|
|
|
106
|
-
function getRpcUrl() {
|
|
107
|
-
if (process.env.APECHAIN_RPC_URL) return process.env.APECHAIN_RPC_URL;
|
|
108
|
-
if (apechain?.rpcUrls?.default?.http?.[0]) return apechain.rpcUrls.default.http[0];
|
|
109
|
-
if (apechain?.rpcUrls?.public?.http?.[0]) return apechain.rpcUrls.public.http[0];
|
|
110
|
-
return null;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
105
|
function getTransport() {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
const rpcUrl = getRpcUrl();
|
|
118
|
-
if (!rpcUrl) {
|
|
119
|
-
console.error(JSON.stringify({ error: 'Missing APECHAIN_RPC_URL for HTTP transport.' }));
|
|
120
|
-
process.exit(1);
|
|
121
|
-
}
|
|
122
|
-
return http(rpcUrl);
|
|
106
|
+
// Use viem's built-in ApeChain RPC (https://rpc.apechain.com/http)
|
|
107
|
+
// HTTP transport works for everything including event polling
|
|
108
|
+
return http();
|
|
123
109
|
}
|
|
124
110
|
|
|
125
111
|
function createClients(account) {
|