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:

  1. Bridge assets from Ethereum, Base, or Arbitrum to Starknet
  2. Deploy an agent account on Starknet
  3. Register with the Huginn thought provenance registry
  4. 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.git

Step-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

ChainToken Support
EthereumETH, USDC, USDT
BaseETH, USDC
ArbitrumETH, USDC

API Endpoints

EndpointURL
AVNU Bridge APIhttps://api.avnu.fi/v1/bridge
Starknet Sepolia RPChttps://starknet-sepolia-rpc.publicnode.com
Starknet Mainnet RPCUse 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

ErrorCauseRecovery
Bridge failedInsufficient balance on source chainAdd funds and retry
Agent already registeredAddress already has identityUse existing registration
Invalid metadata URLURL not accessibleVerify IPFS/Arweave link