@etherna/sdk-js
Version:
Etherna SDKs for operations on the network
28 lines • 960 B
TypeScript
import type { Signer } from "../types";
/**
* Creates a singer object that can be used when the private key is known.
*
* @param privateKey The private key
*/
export declare function makePrivateKeySigner(privateKey: string): Signer;
/**
* The default signer function that can be used for integrating with
* other applications (e.g. wallets).
*
* @param data The data to be signed
* @param privateKey The private key used for signing the data
*/
export declare function defaultSign(data: Uint8Array | string, privateKey: Uint8Array): Promise<string>;
/**
* Recovers the ethereum address from a given signature.
*
* Can be used for verifying a piece of data when the public key is
* known.
*
* @param signature The signature
* @param digest The digest of the data
*
* @returns the recovered address
*/
export declare function recoverAddress(signature: Uint8Array, digest: Uint8Array): Uint8Array;
//# sourceMappingURL=signer.d.ts.map