SDKs
Official SDKs
The official SDKs wrap common create, query, verify, and trace workflows for business systems, audit platforms, and automation tasks.
python.py
import asyncio
from gnomon_sdk import GnomonClient
async def main():
async with GnomonClient(
"http://gnomonsystem.com/api",
api_key="your-api-key",
origin_fingerprint="<origin from /healthz>",
) as client:
latest = await client.latest_event_anchor()
event_hash = bytes.fromhex("aa" * 32)
created = await client.create_event_anchor(
event_hash,
prev_anchor_id=latest.anchor_id if latest else None,
client_event_id="evt-001",
)
verified = await client.verify_event_anchor(
created.anchor.anchor_id,
event_hash,
verify_depth=3,
)
pip install gnomon-sdktypescript.ts
import { GnomonClient, fromHex } from '@gnomon/sdk';
const client = new GnomonClient({
endpoint: 'http://gnomonsystem.com/api',
apiKey: 'your-api-key',
originFingerprint: '<origin from /healthz>',
});
const latest = await client.latestEventAnchor();
const hash = new Uint8Array(32).fill(0xaa);
const created = await client.createEventAnchor(hash, {
prevAnchorId: latest ? fromHex(latest.anchorId) : null,
clientEventId: 'evt-001',
});
npm install @gnomon/sdkmain.rs
use gnomon_sdk::GnomonClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = GnomonClient::builder()
.endpoint("http://gnomonsystem.com/api")
.api_key("your-api-key")
.origin_fingerprint([0x01u8; 32])
.build()?;
let hash = [0xAAu8; 32];
let created = client.create_event_anchor(hash).await?;
Ok(())
}
cargo add gnomon-sdkPublic API
Core APIs
Most integrations only need the main paths below. The Playground exposes the broader interface set for testing and operations.
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /healthz | Check node health and read the source identifier needed for integration |
| POST | /v1/event-anchors | Create a Polaris event anchor |
| GET | /v1/event-anchors/latest | Get the latest anchor for one source before continuous writes |
| POST | /v1/event-anchors:verify | Verify anchor integrity and depth |
| GET | /v1/event-anchors/{anchor_id}/trace | Trace the chain |
| POST | /v1/event-anchors/batch | Create event anchors in batch |
| POST | /v1/event-anchors:batchVerify | Verify event anchors in batch |