Skip to content

echowang1/AgentVault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentVault

Go Tests TS Tests E2E Tests

MPC wallet service and TypeScript SDK for AI agents.

Highlights

  • 2-of-2 MPC (GG18) key generation and signing.
  • HTTP API with API key auth.
  • Policy engine (limits, whitelist, tx count, time window).
  • SQLite persistence with AES-256-GCM encrypted shard storage.
  • TypeScript SDK (MPCClient, MPCWallet) and examples.

Quick Start

1) Run server (Docker)

docker build -t agent-vault:latest -f docker/Dockerfile .
docker run -d \
  --name agent-vault \
  -p 8080:8080 \
  -e MPC_API_KEYS=test-api-key \
  -e SHARD_ENCRYPTION_KEY=$(openssl rand -base64 32) \
  -v $(pwd)/data:/app/data \
  agent-vault:latest

2) Build SDK

cd sdk
npm install
npm run build

3) Use SDK

import { MPCWallet, MemoryWalletStorage } from './dist/index.js';

const wallet = new MPCWallet({
  client: {
    baseURL: 'http://localhost:8080',
    apiKey: 'test-api-key',
    timeout: 120000,
  },
  storage: new MemoryWalletStorage(),
});

const address = await wallet.create(1);
const signature = await wallet.signMessage('Hello AgentVault');

console.log(address, signature);

API Endpoints

  • GET /health
  • POST /api/v1/wallet/create
  • POST /api/v1/wallet/sign
  • GET /api/v1/wallet/:address
  • PUT /api/v1/wallet/:address/policy
  • GET /api/v1/wallet/:address/policy
  • GET /api/v1/wallet/:address/usage

Documentation

  • docs/api.md
  • docs/sdk.md
  • docs/deployment.md
  • docs/architecture.md
  • docs/security.md
  • docs/troubleshooting.md
  • docs/openapi.json
  • docs/roadmap.md - Development roadmap and planned improvements

Examples

  • examples/basic/README.md
  • examples/with-eliza/README.md
  • examples/with-goat/README.md

License

MIT. See LICENSE.

About

Open source MPC wallet SDK for AI Agents

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors