UNPKG

wireguard-tools.js

Version:

Control your wireguard interface from node.js, not a wireguard-tools wrapper!

16 lines (15 loc) 532 B
export interface keyObject { privateKey: string; publicKey: string; } export interface keyObjectWithPreshared extends keyObject { presharedKey: string; } export declare const constants: { WG_KEY_LENGTH: number; B64_WG_KEY_LENGTH: number; }, presharedKey: () => Promise<string>, privateKey: () => Promise<string>, publicKey: (privateKey: string) => Promise<string>, genKey: { (presharedKey: true): Promise<keyObjectWithPreshared>; (presharedKey: false): Promise<keyObject>; (): Promise<keyObject>; };