PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@metamask/eth-sig-util/dist
Просмотр файла: personal-sign.d.ts
/// <reference types="node" />
import { ToBufferInputTypes } from '@ethereumjs/util';
/**
* Create an Ethereum-specific signature for a message.
*
* This function is equivalent to the `eth_sign` Ethereum JSON-RPC method as specified in EIP-1417,
* as well as the MetaMask's `personal_sign` method.
*
* @param options - The personal sign options.
* @param options.privateKey - The key to sign with.
* @param options.data - The hex data to sign.
* @returns The '0x'-prefixed hex encoded signature.
*/
export declare function personalSign({ privateKey, data, }: {
privateKey: Buffer;
data: ToBufferInputTypes;
}): string;
/**
* Recover the address of the account used to create the given Ethereum signature. The message
* must have been signed using the `personalSign` function, or an equivalent function.
*
* @param options - The signature recovery options.
* @param options.data - The hex data that was signed.
* @param options.signature - The '0x'-prefixed hex encoded message signature.
* @returns The '0x'-prefixed hex encoded address of the message signer.
*/
export declare function recoverPersonalSignature({ data, signature, }: {
data: ToBufferInputTypes;
signature: string;
}): string;
/**
* Recover the public key of the account used to create the given Ethereum signature. The message
* must have been signed using the `personalSign` function, or an equivalent function.
*
* @param options - The public key recovery options.
* @param options.data - The hex data that was signed.
* @param options.signature - The '0x'-prefixed hex encoded message signature.
* @returns The '0x'-prefixed hex encoded public key of the message signer.
*/
export declare function extractPublicKey({ data, signature, }: {
data: ToBufferInputTypes;
signature: string;
}): string;
Выполнить команду
Для локальной разработки. Не используйте в интернете!