Skip to content

Commit 8c0d65c

Browse files
committed
docs: 📝 document wallet context compatibility
1 parent 817de73 commit 8c0d65c

4 files changed

Lines changed: 32 additions & 3 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ RUN_LIVE_TESTS=1 bun run test:e2e
120120
- `AELFSCAN_MCP_MAX_CHARS` (default: `60000`)
121121
- `AELFSCAN_MCP_INCLUDE_RAW` (default: `false`)
122122

123+
## Wallet Context Compatibility
124+
125+
- This skill is read-only and does not consume signer/private-key context for on-chain writes.
126+
- It is compatible with the shared wallet-context protocol (`~/.portkey/skill-wallet/context.v1.json`) used by write-capable skills.
127+
- `bun run deps:check` validates wallet-context schema version when a local context file exists.
128+
123129
## License
124130

125131
MIT

README.zh-CN.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ RUN_LIVE_TESTS=1 bun run test:e2e
120120
- `AELFSCAN_MCP_MAX_CHARS`(默认 `60000`
121121
- `AELFSCAN_MCP_INCLUDE_RAW`(默认 `false`
122122

123+
## 钱包上下文兼容性
124+
125+
- 本 skill 为只读,不消费 signer/private-key 上下文,也不执行链上写操作。
126+
- 兼容写能力 skill 使用的共享 wallet-context 协议(`~/.portkey/skill-wallet/context.v1.json`)。
127+
- 当本地存在 context 文件时,`bun run deps:check` 会校验 wallet-context schema 版本。
128+
123129
## License
124130

125131
MIT

SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ description: "AelfScan explorer data retrieval and analytics skill for agents."
1616

1717
## Safe usage rules
1818
- Never print private keys, mnemonics, or tokens in channel outputs.
19-
- For write operations, require explicit user confirmation and validate parameters before sending transactions.
20-
- Prefer `simulate` or read-only queries first when available.
19+
- This skill is read-only; do not attempt to execute chain writes via this package.
20+
- If user intent requires writes, route to wallet + domain write skills and keep this skill for analytics.
2121

2222
## Command recipes
2323
- Start MCP server: `bun run mcp`
@@ -28,5 +28,6 @@ description: "AelfScan explorer data retrieval and analytics skill for agents."
2828

2929
## Limits / Non-goals
3030
- This skill focuses on domain operations and adapters; it is not a full wallet custody system.
31+
- It does not consume signer context for transaction signing.
3132
- Do not hardcode environment secrets in source code or docs.
3233
- Avoid bypassing validation for external service calls.

scripts/check-deps-baseline.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env bun
22
import { existsSync, readFileSync } from 'node:fs';
3+
import { homedir } from 'node:os';
34
import { resolve } from 'node:path';
45

56
type Baseline = {
@@ -44,8 +45,23 @@ function main() {
4445
}
4546
}
4647

48+
const contextPath =
49+
process.env.PORTKEY_SKILL_WALLET_CONTEXT_PATH ||
50+
resolve(homedir(), '.portkey', 'skill-wallet', 'context.v1.json');
51+
if (existsSync(contextPath)) {
52+
try {
53+
const contextRaw = readJson<Record<string, unknown>>(contextPath);
54+
if (contextRaw.version !== 1) {
55+
failures.push(`wallet-context version expected 1, got ${String(contextRaw.version)}`);
56+
}
57+
} catch (error) {
58+
const message = error instanceof Error ? error.message : String(error);
59+
failures.push(`wallet-context parse failed: ${message}`);
60+
}
61+
}
62+
4763
if (failures.length > 0) {
48-
console.error('[deps:check] dependency baseline mismatch:');
64+
console.error('[deps:check] check failed:');
4965
for (const failure of failures) {
5066
console.error(`- ${failure}`);
5167
}

0 commit comments

Comments
 (0)