evm-blockchain-tools
Version:
This is a collection of resuseable tools to support development for EVM-powered blockchains
16 lines (15 loc) • 1.25 kB
TypeScript
import { ethers } from "ethers";
import { GenerateKeyPairResponse, IWeb3Gateway, RecoverPrivateKeyData } from "../common/interfaces";
export declare function encodeFunctionSignature(fnCall: any, params: string[]): string;
export declare function getOptimizedGasPrice(gateway: IWeb3Gateway, addupGas?: string, minGas?: string): Promise<string>;
export declare function getOptimizedGasPriceV2(provider: ethers.providers.Provider, addupGas?: string, minGas?: string, option?: {
useOverridingGas: boolean;
}): Promise<string>;
export declare function generateKeyPair(): Promise<GenerateKeyPairResponse>;
export declare function aeadEnc(msgUtf8: string, nonce24: Uint8Array, key32: Uint8Array): Uint8Array<ArrayBufferLike>;
export declare function aeadDec(ct: Uint8Array, nonce24: Uint8Array, key32: Uint8Array): Uint8Array<ArrayBufferLike>;
export declare function norm24(n: Uint8Array | Buffer): Uint8Array<ArrayBuffer>;
export declare function argonKey(pass: string, salt16: Uint8Array): Uint8Array;
export declare function norm32KeyHex(hex: string): Uint8Array;
export declare function splitPrivateKeyToParts(privateKey: string, nonce: Buffer): string[];
export declare function recoverPrivateKey(data: RecoverPrivateKeyData): Promise<string>;