libp2p-pubsub
Version:
22 lines • 835 B
TypeScript
import { PubsubBaseProtocol } from '../../src/index.js';
import { RPC, IRPC } from '../../src/message/rpc.js';
import type { Registrar } from 'libp2p-interfaces/registrar';
export declare const createPeerId: () => Promise<import("libp2p-peer-id").Ed25519PeerId>;
export declare class PubsubImplementation extends PubsubBaseProtocol {
_publish(): Promise<void>;
_decodeRpc(bytes: Uint8Array): RPC;
_encodeRpc(rpc: IRPC): Uint8Array;
}
export declare const mockRegistrar: {
handle: () => void;
register: () => void;
unregister: () => void;
};
export declare const createMockRegistrar: (registrarRecord: Map<string, Record<string, any>>) => Registrar;
export declare const ConnectionPair: () => {
stream: any;
newStream: () => Promise<{
stream: any;
}>;
}[];
//# sourceMappingURL=index.d.ts.map