Ruby SDK
Official Ruby SDK for the Aho Verifiable Credentials API.
Installation
gem install aho-sdk
Quick Start
Issue a Credential
issue_credential.rb
# Issue a credential to an employee
client = AhoSdk.issuer(api_key: ENV["AHO_API_KEY"])
credential = client.credentials.create(
body: {
schema_id: "EmployeeCredential",
subject_identifier: "did:key:z6Mk...",
claims: {
employee_id: "12345",
department: "Engineering"
}
}
)
Create a Verification Request
create_verification_request.rb
# Create a verification request for age check
client = AhoSdk.verifier(api_key: ENV["AHO_API_KEY"])
request = client.requests.create(
body: {
name: "Age Check",
purpose: "Verify customer is over 21"
}
)
Check Verification Response
get_verification_response.rb
# Check if the user verified successfully
client = AhoSdk.verifier(api_key: ENV["AHO_API_KEY"])
response = client.responses.get(
request_uuid: "req_abc123",
uuid: "resp_xyz789"
)
Available Clients
The SDK provides clients for each API domain:
| Client | Purpose | API Key Type |
|---|---|---|
AhoSdk::Issuer |
Issue and manage verifiable credentials | Issuer API Key |
AhoSdk::Verifier |
Create presentation requests and verify credentials | Verifier API Key |
AhoSdk::Holder |
Manage holder credentials and presentations | Holder API Key |
AhoSdk::Account |
Manage account settings, domains, and API keys | Holder/Verifier/Issuer API Key |
AhoSdk::Schemas |
Manage render templates for credential schemas | Issuer API Key |
AhoSdk::Public |
Public endpoints (schema catalog, no authentication) | None |
API Reference
See the full API documentation with request/response examples for all endpoints.
View API Reference