@kronova-intelligent-systems/kronova-sdk
v0.4.0
Published
AetherNet v2.1 Agent SDK with Post-Quantum E2EE and AP2 Settlement
Maintainers
Readme
Kronova Agent SDK 🤖💼
The official TypeScript toolkit for building autonomous AI agents capable of verifiable economic execution on the AetherNet Protocol.
The kronova-sdk abstracts the complexity of the AP2 (Agent-to-Protocol) standard. It provides the data models, payload constructors, and integration hooks needed to allow your AI agents to securely purchase digital data, negotiate logistics, and interact with tokenized Real World Assets (RWAs).
Core Concepts
This SDK implements the AetherNet separation of concerns:
- AP2 Intents: The budget and constraints established by the human principal.
- AP2 Payments: The cryptographically signed execution request generated by your AI agent.
Note: All signatures generated by this SDK must be verified by the proprietary AetherNet Rust TEE prior to ledger settlement.
Installation
npm install @kronova-intelligent-systems/kronova-sdk
npm install @kronova-intelligent-systems/aethernet-pqc-sdk # Required for Edge SigningQuick Start: Executing an AP2 Payment
- Initialize the Agent Payload
import { AP2Builder } from '@kronova-intelligent-systems/kronova-sdk';
// Construct the payment mandate referencing a human-approved AP2_INTENT
const paymentPayload = AP2Builder.createPayment({
intent_ref: "d9b2d63d-a233-4123-8478-312108534888", // The jurisdiction UUID
cart_ref: `CART-${Date.now()}`,
settlement_domain: "global_synchronizer",
final_amount: 5000.00,
issuer_did: "did:kronova:buyer_01",
taskType: "digital_data_purchase"
});- Generate the Post-Quantum Signature Utilize the AetherNet PQC engine to generate a FIPS-204 compliant signature over the payload.
import { sign_pqc_payload } from '@kronova-intelligent-systems/aethernet-pqc-sdk';
const rawPayloadString = JSON.stringify(paymentPayload);
const signatureB64 = sign_pqc_payload(
Buffer.from(rawPayloadString, 'utf-8'),
agentPrivateKeyBuffer
);- Dispatch to the AetherNet Gateway
const response = await fetch('[https://api.aethernet.kronova.io/v1/ap2/settle](https://api.aethernet.kronova.io/v1/ap2/settle)', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-aethernet-did': paymentPayload.payment_mandate.issuer_did,
'x-aethernet-signature': signatureB64,
'x-aethernet-timestamp': Date.now().toString()
},
body: rawPayloadString
});
const receipt = await response.json();
console.log("Settlement Complete. TxHash:", receipt.tx_hash);Security & Compliance
Payloads constructed with this SDK adhere to the strict hierarchical validation requirements of the AetherNet protocol. Any deviation from the AP2 schema will be rejected by the Express edge routing layer or mathematically invalidated by the TEE.
Documentation
For advanced workflows, including OmniChain Escrow and M2M logistics negotiations, view the full Kronova Developer Docs.
