🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@prismer/aip-sdk

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prismer/aip-sdk

Agent Identity Protocol (AIP) — standalone DID-based identity for AI Agents

latest
Source
npmnpm
Version
1.9.0
Version published
Weekly downloads
26
-85.87%
Maintainers
1
Weekly downloads
 
Created
Source

@prismer/aip-sdk

Agent Identity Protocol (AIP) — standalone DID-based identity for AI Agents.

No dependency on Prismer platform. Any Agent framework can use this.

Install

npm install @prismer/aip-sdk @noble/curves

Quick Start

import { AIPIdentity } from '@prismer/aip-sdk';

// Generate new identity
const agent = await AIPIdentity.create();
console.log(agent.did); // did:key:z6Mk...

// Or derive from API key (deterministic, no storage needed)
const agent = await AIPIdentity.fromApiKey(process.env.API_KEY);

// Sign a message
const sig = await agent.sign(new TextEncoder().encode('hello'));

// Anyone can verify with just the DID
const valid = await AIPIdentity.verify(data, sig, agent.did); // true

Modules

ModuleDescription
identityEd25519 keypair → did:key, DID Document generation
didDID:KEY encoding/decoding (Multicodec + Base58btc)
delegationVerifiable Delegation (Human→Agent) + Ephemeral Delegation (Agent→SubAgent)
credentialsVerifiable Credentials (issue, present, verify)
resolverDID resolution (did:key local, did:web planned)

CLI

npx @prismer/aip-sdk identity create
npx @prismer/aip-sdk identity from-key <apiKey>
npx @prismer/aip-sdk resolve <did>
npx @prismer/aip-sdk sign <file>
npx @prismer/aip-sdk verify <file> --sig <b64> --did <did>
npx @prismer/aip-sdk delegate --to <did> --scope read,write --days 90
npx @prismer/aip-sdk credential issue --to <did> --type TaskCompletion --claims '{"score":95}'
npx @prismer/aip-sdk inspect <artifact.json>

Delegation

import { AIPIdentity, buildDelegation, verifyDelegation } from '@prismer/aip-sdk';

const human = await AIPIdentity.create();
const agent = await AIPIdentity.create();

// Human delegates to Agent (90 days)
const delegation = await buildDelegation({
  issuer: human,
  subjectDid: agent.did,
  scope: ['messaging:send', 'task:execute'],
  validDays: 90,
});

console.log(await verifyDelegation(delegation)); // true

Credentials

import { buildCredential, buildPresentation, verifyPresentation } from '@prismer/aip-sdk';

// Platform issues a TaskCompletion VC
const vc = await buildCredential({
  issuer: platform,
  holderDid: agent.did,
  type: 'TaskCompletionCredential',
  claims: { 'aip:score': 0.95 },
});

// Agent presents VC to new platform (challenge-response)
const vp = await buildPresentation({
  holder: agent,
  credentials: [vc],
  challenge: 'nonce-from-verifier',
});

console.log(await verifyPresentation(vp, 'nonce-from-verifier')); // true

Multi-Language Support

AIP identity is interoperable across all Prismer SDKs:

LanguagePackageAIP Module
TypeScript@prismer/aip-sdkThis package
Pythonprismerfrom prismer.aip import AIPIdentity
Goprismer-sdk-goprismer.NewAIPIdentity()
Rustprismer-sdkprismer::AIPIdentity::create()

A signature created in TypeScript can be verified in Python (and vice versa).

Protocol Spec

See AIP Whitepaper and AIP Protocol Spec.

License

MIT

Keywords

aip

FAQs

Package last updated on 22 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts