UNPKG

libp2p-pubsub

Version:
17 lines 679 B
import { PeerId } from 'libp2p-peer-id'; import type { Message } from 'libp2p-interfaces/pubsub'; export declare const SignPrefix: Uint8Array; /** * Signs the provided message with the given `peerId` */ export declare function signMessage(peerId: PeerId, message: Message): Promise<Message>; /** * Verifies the signature of the given message */ export declare function verifySignature(message: Message): Promise<boolean>; /** * Returns the PublicKey associated with the given message. * If no, valid PublicKey can be retrieved an error will be returned. */ export declare function messagePublicKey(message: Message): Promise<Uint8Array>; //# sourceMappingURL=sign.d.ts.map