feat: add transaction signature verification

This commit is contained in:
Tyera Eulberg
2020-03-03 13:39:00 -07:00
committed by Michael Vines
parent fd00571b0a
commit d9a271742f
3 changed files with 104 additions and 3 deletions

View File

@ -8,13 +8,17 @@ declare module "tweetnacl" {
(): KeyPair,
fromSecretKey(secretKey: Buffer): KeyPair,
fromSeed(seed: Uint8Array): KeyPair,
};
declare type DetachedFunc = {
(text: Buffer, secretKey: Buffer): Buffer,
verify(message: Buffer, signature: Buffer|null, publicKey: Buffer): bool,
};
declare module.exports: {
sign: {
keyPair: KeypairFunc;
detached(text: Buffer, secretKey: Buffer): Buffer;
detached: DetachedFunc;
};
};
}