@celo/wallet-local
Version:
Local wallet implementation
29 lines (28 loc) • 854 B
TypeScript
/// <reference types="node" />
import { RLPEncodedTx, Signer } from '@celo/connect';
import { EIP712TypedData } from '@celo/utils/lib/sign-typed-data-utils';
/**
* Signs the EVM transaction using the provided private key
*/
export declare class LocalSigner implements Signer {
private privateKey;
constructor(privateKey: string);
getNativeKey(): string;
signTransaction(addToV: number, encodedTx: RLPEncodedTx): Promise<{
v: number;
r: Buffer;
s: Buffer;
}>;
signPersonalMessage(data: string): Promise<{
v: number;
r: Buffer;
s: Buffer;
}>;
signTypedData(typedData: EIP712TypedData): Promise<{
v: number;
r: Buffer;
s: Buffer;
}>;
decrypt(ciphertext: Buffer): Promise<Buffer>;
computeSharedSecret(publicKey: string): Promise<Buffer>;
}