@exodus/solana-web3.js
Version:
Solana Javascript API
21 lines (20 loc) • 821 B
TypeScript
/**
* A 64 byte secret key, the first 32 bytes of which is the
* private scalar and the last 32 bytes is the public key.
* Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/
*/
declare type Ed25519SecretKey = Uint8Array;
/**
* Ed25519 Keypair
*/
export interface Ed25519Keypair {
publicKey: Uint8Array;
secretKey: Ed25519SecretKey;
}
export declare const generatePrivateKey: () => Uint8Array;
export declare const generateKeypair: () => Ed25519Keypair;
export declare const getPublicKey: (s: Uint8Array) => Uint8Array;
export declare const sign: (message: Uint8Array, secretKey: Ed25519SecretKey) => Uint8Array;
export declare function verify(signature: Uint8Array, message: Uint8Array, publicKey: Uint8Array): boolean;
export declare function isOnCurve(p: Uint8Array): boolean;
export {};