@krexa/kya
v1.0.0
Published
KYA (Know Your Agent) — open standard for AI agent identity and trust verification
Maintainers
Readme
@krexa/kya
KYA (Know Your Agent) is the open standard for AI agent identity and trust verification on Solana. One credential, seven sections, cryptographically signed — verify any agent in 3 lines of code.
Quick Start
npm install @krexa/kyaimport { KYA } from '@krexa/kya';
const kya = new KYA();
const credential = await kya.resolve('agent.sol');
if (await kya.meetsThreshold('agent.sol', 'trusted')) {
// agent is trusted — allow operation
}Trust Tiers
| Tier | Score | Badge | Credit Level | |------|-------|-------|-------------| | Unverified | 0-199 | ○ Unverified | L0 ($0) | | Identified | 200-299 | ◐ Identified | L1 ($500) | | Provisional | 300-499 | ◑ Provisional | L1 ($500) | | Trusted | 500-649 | ✓ Trusted | L2 ($10K) | | Established | 650-749 | ✦ Established | L3 ($100K) | | Premium | 750-850 | ★ Premium | L4 ($500K) |
API Reference
| Method | Description |
|--------|-------------|
| kya.resolve(input) | Full KYA credential for a wallet, .sol domain, or name |
| kya.quickCheck(input) | Fast minimal check (score, tier, defaults) |
| kya.verify(credential) | Verify signature, expiry, and issuer trust |
| kya.meetsThreshold(input, tier) | Does this agent meet a minimum trust tier? |
Credential Example
{
"version": "1.0",
"standard": "KYA-SOL-V1",
"identity": {
"wallet": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"domain": "alpha-bot.sol",
"name": "Alpha Bot",
"type": "trader",
"registeredAt": 1713800000,
"issuer": "KRXoracLe1111111111111111111111111111111111",
"pdaWallet": null
},
"principal": {
"wallet": "9wFZ...",
"domain": null,
"verified": true,
"jurisdiction": "US"
},
"permissions": {
"canTrade": true,
"canBorrow": true,
"canLend": false,
"canServeApi": false,
"allowedVenues": ["jupiter", "raydium"],
"maxTxSize": 10000,
"dailyLimit": 50000,
"custom": {}
},
"score": {
"value": 720,
"level": 3,
"trustTier": "established",
"components": {
"repaymentHistory": 95,
"profitability": 78,
"behavioralHealth": 85,
"usagePatterns": 70,
"accountMaturity": 60
},
"snsBonus": 10,
"lastUpdated": 1713886400
},
"reputation": {
"totalBorrowed": 250000,
"totalRepaid": 248500,
"onTimeRate": 98.5,
"defaultCount": 0,
"operatingDays": 180,
"totalTransactions": 12400,
"totalRevenue": 45000,
"creditCycles": 24
},
"financial": {
"currentDebt": 1500,
"creditLimit": 100000,
"healthFactor": 2.4,
"apr": 8.5,
"walletBalance": 15000
},
"attestation": {
"issuer": "KRXoracLe1111111111111111111111111111111111",
"issuedAt": 1713886400,
"expiresAt": 1714491200,
"signature": "base64-ed25519-signature...",
"onChainAccount": null,
"slot": null
}
}Specification
See SPEC.md for the full KYA v1.0 specification, including credential format, signing process, verification, and API details.
License
MIT
