@nuwa-ai/identity-kit
Version:
SDK for NIP-1 Agent Single DID Multi-Key Model and NIP-3 CADOP (Custodian-Assisted DID Onboarding Protocol)
26 lines (24 loc) • 658 B
text/typescript
/**
* As per NIP-1 Signature Structure Specification
*/
interface SignedData {
operation: string;
params: Record<string, any>;
nonce: string;
timestamp: number;
/**
* A unique identifier for the service, typically its canonical URL.
* As per NIP-2, this is required for HTTP authentication to prevent cross-service replay attacks.
*/
audience?: string;
}
interface NIP1Signature {
signer_did: string;
key_id: string;
value: Uint8Array;
}
interface NIP1SignedObject {
signed_data: SignedData;
signature: NIP1Signature;
}
export type { NIP1SignedObject as N, SignedData as S, NIP1Signature as a };