import { byte } from "./types.js"; declare function nativeEd25519Sign(privateKey: Uint8Array, data: Uint8Array): Promise; export declare function ed25519bigint(n: bigint): bigint; declare function nativeEd25519Verify(publicKey: Uint8Array, signature: Uint8Array | ArrayBuffer, data: Uint8Array | ArrayBuffer): Promise; export type bigpoint = [bigint, bigint]; /** * Curve point 'addition' * Note: this is probably the bottleneck of this Ed25519 implementation */ export declare function addPointsEdwards(a: Readonly, b: Readonly): bigpoint; export declare function scalarMul(point: Readonly, n: bigint): bigpoint; /** * Curve point 'multiplication' */ export declare function encodeInt(y: bigint): Uint8Array; export declare function bigpointToUint8Array(point: bigpoint): Uint8Array; export declare function pointFromBytes(s: Uint8Array): bigpoint; export declare function scalarFromBytes(h: Uint8Array): bigint; export declare function scalarToBytes(s: bigint): Uint8Array; type Uint8ArrayLike = ArrayBuffer | Uint8Array | string | byte[]; export declare function scalarMultBase(scalar: bigint): bigpoint; export declare function getExtendEd25519PrivateKeyComponentsAsBytes_sync(privateKey: Uint8Array): [scalar: Uint8Array, extension: Uint8Array]; export declare function getExtendEd25519PrivateKeyComponents_sync(privateKey: Uint8Array): [scalar: bigint, extension: Uint8Array]; export declare function getExtendedEd25519PrivateKey_sync(privateKey: Uint8Array): Uint8Array; export declare function getExtendedEd25519PrivateKey(privateKey: Uint8Array): Promise; export declare function deriveEd25519PublicKey_sync(privateKey: Uint8Array): Uint8Array; declare function deriveEd25519PublicKey_async(privateKey: Uint8Array): Promise; export declare const deriveEd25519PublicKey: typeof deriveEd25519PublicKey_async; export declare function extendedToPublic(extended: Uint8Array | byte[]): Uint8Array; export interface SignEd25519Result { 0: Uint8Array; 1: Uint8Array; /** to be `ArrayLike` */ length: 2; [Symbol.iterator]: () => Generator; pubKey: Uint8Array; signature: Uint8Array; } /** sign a message with a (32 bytes) private key */ export declare function signEd25519_sync(message: Uint8ArrayLike, privateKey: Uint8ArrayLike): SignEd25519Result; /** sign a message with a (32 bytes) private key */ export declare function signEd25519(message: Uint8ArrayLike, privateKey: Uint8ArrayLike): Promise; /** sign a message with a (64 bytes) private key */ export declare function signExtendedEd25519_sync(_message: Uint8ArrayLike, _extendedKey: Uint8ArrayLike): SignEd25519Result; /** sign a message with a (64 bytes) private key */ declare function nativeExtendedSignEd25519(_message: Uint8ArrayLike, _extendedKey: Uint8ArrayLike): Promise; /** sign a message with a (64 bytes) private key */ export declare const signExtendedEd25519: typeof nativeExtendedSignEd25519; /** sign a message with a (32 bytes) private key */ export declare function getEd25519Signature_sync(message: Uint8ArrayLike, privateKey: Uint8ArrayLike): Uint8Array; /** sign a message with a (32 bytes) private key */ export declare const getEd25519Signature: typeof nativeEd25519Sign; export declare function verifyEd25519Signature_sync(_signature: Uint8ArrayLike, _message: Uint8ArrayLike, _publicKey: Uint8ArrayLike): boolean; export declare const verifyEd25519Signature: typeof nativeEd25519Verify; export {};