import type { DelegationValidateOptions, Policy, DelegationOptions, DID, DIDURL, StandardSchemaV1, DecodedEnvelope, DelegationFromOptions } from './types.js'; import type { CID } from 'multiformats'; /** * UCAN Delegation */ export declare class Delegation { iss: DIDURL; aud: DID; sub: DID | null; cmd: string; pol: Policy; nbf: number | undefined; nonce: Uint8Array; meta: Record | undefined; exp: number | null; envelope: DecodedEnvelope<'dlg'>; bytes: Uint8Array; cid: CID; constructor(envelope: DecodedEnvelope<'dlg'>, bytes: Uint8Array, cid: CID); /** * Create a delegation from bytes and validate it * * Does not validate "not before" time, call {@link Delegation.validate} to validate it */ static from(options: DelegationFromOptions): Promise; /** * Create a delegation from a base64 encoded string */ static fromString(token: string): Promise; static create(options: DelegationOptions): Promise; /** * Validate a delegation * * Checks the structure, "not before" time, signature, and revocation status */ validate(options: DelegationValidateOptions): Promise; toString(): string; toJSON(): { token: string; cid: string; envelope: { payload: { iss: any; aud: any; sub: any; cmd: string; pol: Policy; exp: number | null; nbf: number | undefined; nonce: string; meta: Record | undefined; }; signature: string; alg: import("iso-signatures/types").SignatureType; enc: import("./types.js").VarsigEncoding; spec: "dlg"; version: string; }; }; } //# sourceMappingURL=delegation.d.ts.map