/** * UCAN Delegation creation and serialization * * Implements delegation spec format (cmd/sub/pol) instead of capability-style (att/can/with). * @see https://github.com/ucan-wg/delegation */ import type { ISigner } from 'iso-signatures/types'; import { CreateDelegationOptions, DelegationPayload, SignedDelegation, UcanCommand } from './types.ts'; /** * Normalize a command path to always have a leading slash and no trailing slash. */ export declare function normalizeCommand(cmd: string): UcanCommand; /** * Serialize a delegation payload to DAG-CBOR and sign it using iso-ucan. * * @returns SignedDelegation with bytes, CID, and metadata */ export declare function serializeDelegation(payload: DelegationPayload, signer: ISigner, proofs?: SignedDelegation[]): Promise; /** * Create and serialize a storage delegation in one step. */ export declare function createStoreDelegation(opts: CreateDelegationOptions & { signer: ISigner; }): Promise; /** * Encode a SignedDelegation to base64 for use in HTTP headers. */ export declare function delegationToBase64(delegation: SignedDelegation): string; /** * Get the service DID from a URL (did:web format). */ export declare function getServiceDID(url: string | URL): `did:web:${string}`; //# sourceMappingURL=delegation.d.ts.map