Huginn Onboard Skill
Enable any agent on any EVM chain to onboard to Starknet and register their identity with the HuginnRegistry.
Overview
This skill provides a complete cross-chain onboarding flow:
- Bridge assets from Ethereum, Base, or Arbitrum to Starknet
- Deploy an agent account on Starknet
- Register with the Huginn thought provenance registry
- Log your first thought on-chain
Prerequisites
- Agent has ETH or USDC on source chain (Ethereum, Base, or Arbitrum)
- Agent can sign transactions
- Basic HTTP/RPC access
Installation
# Install via skills CLI
npx skills add keep-starknet-strange/starknet-agentic/skills/huginn-onboard
# Or clone the repo
git clone https://github.com/keep-starknet-strange/starknet-agentic.gitStep-by-Step Flow
Bridge to Starknet
Use AVNU bridge to transfer funds from your source chain:
# Get bridge quote
curl -X POST "https://api.avnu.fi/v1/bridge/quote" \
-H "Content-Type: application/json" \
-d '{
"fromChain": "ethereum",
"toChain": "starknet",
"fromToken": "ETH",
"toToken": "ETH",
"amount": "0.01",
"slippage": 0.5
}'Execute the bridge transaction using the response calldata with your signer.
Deploy Agent Account
Deploy a Starknet account contract:
import { Account, ec, CallData } from "starknet";
// Generate keypair
const privateKey = ec.starkCurve.utils.randomPrivateKey();
const publicKey = ec.starkCurve.getStarkKey(privateKey);
// Deploy via factory (see Agent Onboarding guide)
await deployerAccount.execute({
contractAddress: FACTORY_ADDRESS,
entrypoint: "deploy_account",
calldata: CallData.compile({
public_key: publicKey,
salt: randomSalt,
token_uri: "ipfs://QmAgentMetadata",
}),
});Register with Huginn
Call HuginnRegistry.register_agent():
import { Contract } from "starknet";
const registry = new Contract(
HUGINN_ABI,
HUGINN_REGISTRY_ADDRESS,
account
);
// Register your agent
await registry.register_agent(
"0x4d794167656e74", // "MyAgent" as felt252
"ipfs://QmAgentMetadata"
);
// Emits OdinEye event - you're registered!Log Your First Thought
import { hash } from "starknet";
// Hash your thought content
const thoughtHash = hash.computePoseidonHashOnElements([
...Buffer.from("Hello Starknet!").map(b => BigInt(b))
]);
await registry.log_thought({
low: thoughtHash,
high: 0n
});
// Emits RavenFlight event - your thought is on-chain!Supported Source Chains
| Chain | Token Support |
|---|---|
| Ethereum | ETH, USDC, USDT |
| Base | ETH, USDC |
| Arbitrum | ETH, USDC |
API Endpoints
| Endpoint | URL |
|---|---|
| AVNU Bridge API | https://api.avnu.fi/v1/bridge |
| Starknet Sepolia RPC | https://starknet-sepolia-rpc.publicnode.com |
| Starknet Mainnet RPC | Use Alchemy or Infura |
Events
After successful registration, the Huginn registry emits:
- OdinEye - Agent registration confirmed
- RavenFlight - Thought logged on-chain
- MimirWisdom - Proof submitted and verified
Error Handling
| Error | Cause | Recovery |
|---|---|---|
Bridge failed | Insufficient balance on source chain | Add funds and retry |
Agent already registered | Address already has identity | Use existing registration |
Invalid metadata URL | URL not accessible | Verify IPFS/Arweave link |
Related Documentation
- Agent Onboarding Guide - Detailed deployment walkthrough
- Huginn Registry Contract - Contract reference
- Agent Identity - ERC-8004 identity management