@ipld/dag-ucan
Version:
UCAN codec for IPLD
22 lines • 1.49 kB
TypeScript
export * from "./ucan.js";
export const VERSION: "0.9.1";
export const name: "dag-ucan";
export const code: UCAN.Code;
export function encode<C extends UCAN.Capabilities>(ucan: UCAN.UCAN<C>): UCAN.ByteView<UCAN.UCAN<C>>;
export function decode<C extends UCAN.Capabilities>(bytes: UCAN.ByteView<UCAN.UCAN<C>>): UCAN.View<C>;
export function link<C extends UCAN.Capabilities, A extends number = 18>(ucan: UCAN.View<C>, options?: {
hasher?: UCAN.MultihashHasher<A> | undefined;
} | undefined): Promise<UCAN.IPLDLink<UCAN.UCAN<C>, UCAN.Code, A, 1>>;
export function write<C extends UCAN.Capabilities, A extends number = 18>(ucan: UCAN.UCAN<C>, { hasher }?: {
hasher?: UCAN.MultihashHasher<A> | undefined;
}): Promise<UCAN.Block<C, UCAN.Code, A>>;
export function parse<C extends UCAN.Capabilities>(jwt: string | UCAN.JWT<C>): UCAN.View<C>;
export function format<C extends UCAN.Capabilities>(ucan: UCAN.UCAN<C>): UCAN.JWT<C>;
export function issue<A extends number, C extends UCAN.Capabilities>({ issuer, audience, capabilities, lifetimeInSeconds, expiration, notBefore, facts, proofs, nonce, }: UCAN.UCANOptions<C, A>): Promise<UCAN.View<C>>;
export function verifySignature(ucan: UCAN.View, verifier: UCAN.Verifier): UCAN.Await<boolean>;
export function isExpired(ucan: UCAN.View): boolean;
export function isTooEarly(ucan: UCAN.View): boolean;
export function now(): number;
import * as UCAN from "./ucan.js";
import * as JWT from "./codec/jwt.js";
//# sourceMappingURL=lib.d.ts.map