Move type definition to the top

This commit is contained in:
Franck Royer 2022-05-19 16:10:23 +10:00
parent ab3b23f100
commit 661c6227e7
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 5 additions and 5 deletions

View File

@ -17,6 +17,11 @@ const SignatureLength = 65;
export const PrivateKeySize = 32; export const PrivateKeySize = 32;
export type Signature = {
signature: Uint8Array;
publicKey: Uint8Array | undefined;
};
/** /**
* Encode the payload pre-encryption. * Encode the payload pre-encryption.
* *
@ -76,11 +81,6 @@ export async function clearEncode(
return { payload: envelope, sig }; return { payload: envelope, sig };
} }
export type Signature = {
signature: Uint8Array;
publicKey: Uint8Array | undefined;
};
/** /**
* Decode a decrypted payload. * Decode a decrypted payload.
* *