genlayer-erc7710-connector
Connect GenLayer Intelligent Contract decisions to ERC-7710-style delegated authority. Use when an agent needs to design the interface, message schema, relayer/bridge path, EVM revocation controller, constraint updates, proof/finality assumptions, and failure handling that turn a GenLayer agent-performance review into ERC-7710 revocation or policy changes.
git clone --depth 1 https://github.com/internet-court/internet-court-skill /tmp/genlayer-erc7710-connector && cp -r /tmp/genlayer-erc7710-connector/integrations/genlayer-erc7710-connector ~/.claude/skills/genlayer-erc7710-connectorSKILL.md
# GenLayer ERC-7710 Connector
Use this skill after the mandate, ERC-7710 policy, and GenLayer Intelligent Contract review flow exist. This skill does not teach GenLayer contract deployment. For GenLayer build, deploy, test, and CLI operations, use the official GenLayer skills at `https://skills.genlayer.com/` or the GenLayer documentation.
This skill specifies the connector:
```text
GenLayer Intelligent Contract decision
-> decision proof / receipt / finalized result
-> relayer or bridge
-> EVM RevocationController
-> ERC-7710 Delegation Manager rejects or constrains future redemptions
```
## Design Rule
Never say "GenLayer cancels ERC-7710" without defining the effect path. GenLayer produces a decision. An EVM-side controller, account module, caveat enforcer, or delegation manager integration must consume that decision.
## Workflow
1. Identify the permission:
- `mandateId`, `permissionHash`, delegator, delegate, delegation manager, target EVM chain, and current policy.
2. Identify the GenLayer decision source:
- supervisor contract address, method that stores/returns the decision, review window, decision enum, score, issued timestamp, and finalized transaction id.
3. Choose the connector mode:
- Manual demo relay, trusted relayer, GenLayer Studio bridge relay, optimistic relay with challenge window, light-client/bridge verification, or direct EVM call if supported by the target GenLayer/EVM integration.
4. Define the message:
- Include enough data for the EVM controller to revoke or constrain exactly one mandate/permission.
5. Define the EVM effect:
- Revoke, constrain, pause, require human approval, or mark pending appeal.
6. Define safety:
- Finality assumptions, replay protection, nonce, deadline, idempotency, emergency owner revoke, and absolute permission expiry.
7. Define tests:
- Continue does nothing, revoke blocks future redemption, constrain tightens policy, stale decisions fail, duplicate messages are idempotent, forged decisions fail.
## Connector Modes
Use the simplest mode that honestly matches the demo.
### Manual Demo Relay
Best for hackathon/prototype demos. The UI or operator reads the GenLayer decision and calls the EVM revocation controller.
State the trust assumption: the operator is trusted to relay the decision correctly.
### Trusted Relayer
Best for a realistic MVP. A service watches GenLayer review transactions, waits for finality, then submits a signed EVM transaction.
Require allowlisted relayer keys and onchain event logs. Keep the delegator emergency revoke path.
### GenLayer Studio Bridge Boilerplate
Use this for Base Sepolia demos that should exercise a real cross-chain control loop without claiming mainnet-grade verification.
Flow:
```text
1. Base reporter contract packages a spend or action snapshot.
2. Base BridgeSender.sol sends it to GenLayer through the bridge boilerplate.
3. BridgeReceiver.py dispatches process_bridge_message() on the supervisor IC.
4. Supervisor IC reviews the window and calls BridgeSender.py.
5. Base BridgeReceiver.sol dispatches processBridgeMessage() on an EVM decision receiver.
6. Decision receiver verifies bridge receiver, source chain id, and source IC.
7. Decision receiver calls RevocationController.applyGenLayerDecisionStruct().
```
Default Base Sepolia values from the bridge boilerplate:
- Base Sepolia chain id: `84532`.
- Base Sepolia LayerZero endpoint id: `40245`.
- GenLayer source chain id emitted by `BridgeSender.py`: `61998`.
Required EVM contracts:
- a reporter such as `WalletSpendReporter` that sends snapshots to GenLayer;
- a decision receiver such as `GenLayerDecisionReceiver` that is allowlisted as a relayer on `RevocationController`;
- a redemption path that checks `RevocationController.isRevoked`, `isPaused`, and `getConstraints` before spending.
Trust assumption: the bridge service and configured bridge contracts are trusted for the demo unless a verified proof path is added. Keep owner emergency revoke and absolute expiry.
### Optimistic Relay
Best when anyone can submit a decision, but the decision can be challenged during a delay.
Use for higher-stakes demos where incorrect revocation is costly and latency is acceptable.
### Verified Bridge
Best for production claims. The EVM controller verifies a GenLayer-origin proof or a trusted bridge message.
Do not choose this mode unless the proof/bridge implementation is actually available.
## Message Schema
Use this as the default connector payload:
```ts
type GenLayerDelegationDecision = {
mandateId: string;
permissionHash: `0x${string}`;
genlayerChainId: string;
genlayerSupervisor: string;
genlayerTxId: string;
reviewWindowId: string;
decision: "continue" | "warn" | "constrain" | "revoke" | "escalate";
score: number;
violationsHash: `0x${string}`;
evidenceBundleHash: `0x${string}`;
constraintsHash: `0x${string}`;
issuedAt: number;
expiresAt: number;
nonce: bigint;
};
```
For EVM submission, hash and sign or verify the exact payload:
```ts
type RelayEnvelope = {
payload: GenLayerDelegationDecision;
payloadHash: `0x${string}`;
relayer: `0x${string}`;
signature?: `0x${string}`;
proof?: string;
};
```
## EVM Revocation Controller
The EVM controller should expose a small surface:
```solidity
interface IAgentRevocationController {
event DelegationRevoked(bytes32 indexed mandateId, bytes32 indexed permissionHash, bytes32 decisionHash);
event DelegationConstrained(bytes32 indexed mandateId, bytes32 indexed permissionHash, bytes32 decisionHash);
function isRevoked(bytes32 permissionHash) external view returns (bool);
function getConstraints(bytes32 permissionHash) external view returns (bytes32 constraintsHash);
function applyGenLayerDecision(bytes calldata decision, bytes calldata proofOrSignature) external;
function emergencyRevoke(bytes32 permissionHash) external;
}
```
The ERC-7710 redemption path must check this controller before executEntry point for Internet Court — the trust layer for agent-to-agent commerce. Use whenever an agent needs to transact with another agent or a paid service, or a user mentions agent payments, paid APIs (HTTP 402/x402), wallet custody or trust concerns, spending mandates, delegated permissions (ERC-7710/7715), escrow, agent identity or reputation (ERC-8004), negotiation between agents (A2A), agent jobs (ERC-8183), machine payments (MPP, AP2), supervision of agent behavior, revocation, verification, or dispute resolution (GenLayer) — even if they never say "Internet Court". Routes to the vendored protocol skills and connector skills in this package.
Internet Court adapter for GenLayer Intelligent Contract supervision. Use to specify agent-performance rubrics, evidence schemas, decision outputs, and ERC-7710 connector expectations, while delegating actual GenLayer contract writing, linting, testing, deployment, and CLI interaction to the official GenLayer skills at https://skills.genlayer.com/.
Design and implement demos combining x402 HTTP payments with ERC-7710 smart contract delegations and ERC-7715 wallet permission requests for subscriptions, bounded agent budgets, recurring spend, pay-per-use APIs, and agentic commerce.
0G Compute Network guide for decentralized AI inference, fine-tuning, and GPU services. Covers chatbots, image generation, speech-to-text, SDK integration (0g-serving-broker), processResponse API, broker.inference methods, CLI commands (0g-compute-cli), and account management. Use this skill for any 0G compute, 0G AI, or decentralized GPU question.
Use this skill when the user asks to list, create, inspect, update, disable, re-enable, or revoke AltLLM Portal API keys for external agents or applications. Do NOT use for wallet login, billing history, or payment links.
Use this skill when the user asks to log in or out with a wallet session, fetch a wallet sign-in challenge, verify an externally signed challenge, or troubleshoot AltLLM Portal wallet login for the local altllm CLI. Do NOT use for API key management, billing history, or payment links.
Use this skill when the user asks to inspect AltLLM Portal balance, redeem a promo code, review billing transactions, or view usage analytics by period, model, or API key using the local altllm CLI. Do NOT use for API key lifecycle management or payment-link execution.
Use this umbrella skill when the request spans multiple AltLLM Portal CLI domains, or when you need to navigate the local altllm CLI in this repository across auth, API keys, billing history, NOWPayments payment links, and related x402 Portal top-up guidance.