ESSI (Enterprise Self-Sovereign Identity) is a Go-based implementation of a decentralized identity agent that supports verifiable credentials, proof presentations, and DID (Decentralized Identifier) operations using AnonCreds and DIDComm protocols.
- Verifiable Credentials: Issue, hold, and verify AnonCreds-based credentials
- Proof Presentations: Create and verify zero-knowledge proofs
- DID Operations: Create and resolve peer DIDs and DID key methods
- Out-of-Band (OOB) Invitations: Generate and process connection invitations
- DIDComm Messaging: Secure peer-to-peer communication
- Blockchain Integration: Kanon network integration for credential definitions and schemas
- Storage: Aries Askar for secure credential and key storage
ESSI Agent is built with a modular architecture:
- Core Agent: Central agent framework with dependency injection
- Storage Module: Aries Askar for secure storage
- DIDs Module: Support for peer DIDs and DID key methods
- DIDComm Module: Message handling and transport
- AnonCreds Module: Anonymous credentials and presentations
- Kanon Module: Blockchain registry for schemas and credential definitions
- Go 1.19 or later
- CGO enabled (
CGO_ENABLED=1) - Native dependencies handled by Makefile (prepare-askar integrated)
- Clone the repository:
git clone https://github.com/Ajna-inc/essi
cd essi- Setup development environment (tools + dependencies):
make dev-setup- Build the project:
make kanon-testCreate an invitation that other agents can use to connect:
# Basic invitation
make run-create-oob
# Custom configuration
make run-create-oob ARGS='-host 0.0.0.0 -port 3001 -label "My Agent"'
# Multi-use invitation
make run-create-oobParameters:
-host: Inbound host (default: 127.0.0.1)-port: Inbound port (default: 3001)-label: Agent label (default: "Essi-Go")-db: Database path (default: "./create-oob-askar.db")
Test various agent capabilities:
# Full flow (connection + credential + proof)
make run ARGS='-action e2eFullFlow'Parameters:
-action: Action to perform (e2eIssue, e2eFullFlow, testConnections, testDIDs, testSchema, testCredDef)-host: Agent host (default: 127.0.0.1)-port: Agent port (default: 9002)-cache: Use fixed IDs for caching tests
The agent can be configured through code or environment:
config := &AgentConfig{
Label: "My Agent",
Host: "127.0.0.1",
Port: 9002,
DBPath: "./my-agent.db",
StoreID: "my-agent-store",
StoreKey: "secure-key-123",
KanonConfig: kanonpkg.KanonModuleConfigOptions{
Networks: []kanonpkg.NetworkConfig{{
Network: "testnet",
RpcUrl: "http://127.0.0.1:8545/",
PrivateKey: "0x...",
ChainId: 31337,
ContractAddress: "0x...",
}},
},
}
agent, err := SetupAgent(config, metrics)- AskarModule: Secure storage for keys and credentials
- KanonModule: Blockchain integration for public registries
- DidsModule: DID creation and resolution
- AnonCredsModule: Anonymous credentials functionality
- DidCommModule: Secure messaging between agents
- CredentialsModule: Credential issuance and verification protocols
- ProofsModule: Proof presentation protocols
- DID Exchange 1.1
- Connections 1.0
- Issue Credential 2.0
- Present Proof 2.0
- Out-of-Band 1.1
- Trust Ping 1.0
- AnonCreds: Anonymous credentials with zero-knowledge proofs
// Process an out-of-band invitation
connOps := NewConnectionOperations(agent, metrics)
connection, err := connOps.ProcessOOBInvitation(invitationURL)
// Wait for connection to complete
err = connOps.WaitForConnectionComplete(connection.ID, 30*time.Second)// Create credential service
credService := NewCredentialService(agent, anonApi, metrics)
// Issue credential to connection
attributes := map[string]string{
"name": "Alice Smith",
"age": "30",
"title": "Developer",
}
err := credService.OfferCredentialToConnection(
connectionID,
credentialDefinitionID,
attributes,
)// Create proof operations
proofOps := NewProofOperations(agent, anonApi, metrics)
// Execute proof flow
err := proofOps.ExecuteProofFlow(connectionID)ESSI Agent uses Aries Askar for secure storage:
- Keys: Private keys are stored encrypted
- Credentials: Credentials are stored with metadata
- DIDs: DID documents and associated keys
- Records: Connection records and protocol state
Database files are SQLite by default but Askar supports PostgreSQL for production.
For local development, ESSI works with:
- Local Blockchain: Hardhat/Anvil at http://127.0.0.1:8545
- Contract Address: 0x5FbDB2315678afecb367f032d93F642f64180aa3 (local)
- Chain ID: 31337 (Hardhat default)
For production, configure appropriate network endpoints and contract addresses.
# Build all commands
make build
# Run tests
make test
# Run with debug logging
RUST_LOG=debug make run ARGS='-action e2eIssue'- Go modules: Standard Go dependency management
- Native libraries: Aries Askar, AnonCreds-RS via CGO bindings
- Build tools: CGO-compatible C compiler
- CGO_ENABLED=1 required: ESSI requires CGO for native dependencies
- Port conflicts: Ensure ports 9002, 3001 are available
- Database locks: Stop existing agents before running new instances
- Network connectivity: Verify blockchain RPC endpoint is accessible
Enable detailed logging:
RUST_LOG=debug make run ARGS='-action e2eIssue'- Follow Go conventions and existing code patterns
- Add tests for new functionality
- Update documentation for API changes
- Ensure CGO compatibility
Apache License 2.0. See the LICENSE file for details.