/** * Get the signature payload for a given payload * * @param {object} options * @param {PayloadSpec} options.spec * @param {Payload} options.payload * @param {string} [options.version] * @param {import('iso-signatures/types').SignatureType} options.signatureType */ export function getSignaturePayload(options: { spec: PayloadSpec; payload: Payload; version?: string | undefined; signatureType: import("iso-signatures/types").SignatureType; }): SignaturePayload; /** * Decode a signature payload * * @param {Uint8Array} bytes */ export function decodeSignaturePayload(bytes: Uint8Array): { alg: import("iso-signatures/types").SignatureType; enc: import("./types.js").VarsigEncoding; payload: Payload; }; /** * Check if a payload is an invocation payload * * @param {Payload} payload * @returns {payload is InvocationPayload} */ export function isInvocationPayload(payload: Payload): payload is InvocationPayload; /** * Check if a payload is a delegation payload * * @param {Payload} payload * @returns {payload is DelegationPayload} */ export function isDelegationPayload(payload: Payload): payload is DelegationPayload; /** * * @param {EnvelopeSignOptions} options */ export function sign(options: EnvelopeSignOptions): Promise<{ signature: Uint8Array; signaturePayload: SignaturePayload; }>; /** * Encode a UCAN envelope * * @see https://github.com/ucan-wg/spec#envelope * @param {EnvelopeEncodeOptions} options * */ export function encode(options: EnvelopeEncodeOptions): ByteView<(Uint8Array | SignaturePayload)[]>; /** * Decode a UCAN envelope * * @template {PayloadSpec} Spec * @see https://github.com/ucan-wg/spec#envelope * @param {EnvelopeDecodeOptions} options * @returns {DecodedEnvelope} */ export function decode(options: EnvelopeDecodeOptions): DecodedEnvelope; /** * @import { Envelope, PayloadTag, EnvelopeDecodeOptions, EnvelopeEncodeOptions, EnvelopeSignOptions, SignaturePayload, PayloadSpec, DecodedEnvelope, DelegationPayload, InvocationPayload, Payload} from './types.js' * @import { ByteView } from 'multiformats' */ /** Version */ export const VERSION: "1.0.0-rc.1"; import type { PayloadSpec } from './types.js'; import type { Payload } from './types.js'; import type { SignaturePayload } from './types.js'; import type { InvocationPayload } from './types.js'; import type { DelegationPayload } from './types.js'; import type { EnvelopeSignOptions } from './types.js'; import type { EnvelopeEncodeOptions } from './types.js'; import type { ByteView } from 'multiformats'; import type { EnvelopeDecodeOptions } from './types.js'; import type { DecodedEnvelope } from './types.js'; //# sourceMappingURL=envelope.d.ts.map