diff --git a/src/index.ts b/src/index.ts index e4493e0..f13e880 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,6 +11,7 @@ export interface Keypair { export interface Wireguard { generateKeypair(): Keypair; + generatePublicKey(privateKey: number[]): string; } export const wireguard: Wireguard = { @@ -23,4 +24,8 @@ export const wireguard: Wireguard = { privateKey: atob(privateKey), }; }, + + generatePublicKey: function (privateKey) { + return atob(generatePublicKey(privateKey)); + }, };