Core interfaces and types for EigenLayer AgentKit
npm install @layr-labs/agentkitCore interfaces and types for the EigenLayer AgentKit framework. This package provides the foundation for building verifiable AI agents with zkTLS proofs.
``bash`
npm install @layr-labs/agentkitor
yarn add @layr-labs/agentkitor
pnpm add @layr-labs/agentkit
- Type definitions for zkTLS proofs and verifiable operations
- Interface definitions for verifiable inference adapters
- Interface definitions for verifiable logging adapters
- Common error types and utilities
`typescript
import {
IVerifiableInferenceAdapter,
VerifiableInferenceResult,
Proof,
GenerateTextOptions
} from '@layr-labs/agentkit';
class MyInferenceAdapter implements IVerifiableInferenceAdapter {
async generateText(
prompt: string,
options?: GenerateTextOptions
): Promise
// Implementation here
}
async verifyProof(proof: Proof): Promise
// Implementation here
}
}
`
`typescript
import {
IVerifiableLoggingAdapter,
VerifiableLogEntry,
Proof,
LoggingOptions
} from '@layr-labs/agentkit';
class MyLoggingAdapter implements IVerifiableLoggingAdapter {
async log(
data: unknown,
options?: LoggingOptions
): Promise
// Implementation here
}
async verifyProof(proof: Proof): Promise
// Implementation here
}
async getLogEntry(id: string): Promise
// Implementation here
}
async queryLogs(options: Record
// Implementation here
}
}
`
#### Proof
Represents a cryptographic proof that can be verified.
`typescript`
interface Proof {
type: string;
data: unknown;
timestamp: number;
metadata?: Record
}
#### VerifiableInferenceResult
Result of a verifiable inference operation.
`typescript`
interface VerifiableInferenceResult
content: T;
proof: Proof;
}
#### IVerifiableInferenceAdapter
Interface for adapters that provide verifiable inference capabilities.
#### IVerifiableLoggingAdapter
Interface for adapters that provide verifiable logging capabilities.
#### ProofVerificationError
Thrown when proof verification fails.
#### ProofGenerationError`
Thrown when proof generation fails.
Please read the contributing guidelines in the root of the monorepo for details on our code of conduct and the process for submitting pull requests.
MIT License - see the LICENSE file for details.