blocklock-js
Version:
A library for encrypting and decrypting data for the future
13 lines (12 loc) • 1.26 kB
TypeScript
import { BytesLike, EthersError, EventFragment, Interface, ParamType, Result, TransactionReceipt } from "ethers";
import { Ciphertext } from "./crypto/ibe-bn254";
import { TypesLib } from "./generated/BlocklockSender";
export declare function extractLogs<T extends Interface, E extends EventFragment>(iface: T, receipt: TransactionReceipt, contractAddress: string, event: E): Array<Result>;
export declare function extractSingleLog<T extends Interface, E extends EventFragment>(iface: T, receipt: TransactionReceipt, contractAddress: string, event: E): Result;
export declare function extractErrorMessage(err: EthersError, iface: Interface): string;
export declare function isEthersError(error: unknown): error is EthersError;
export declare const encodeParams: (dataTypes: readonly ParamType[] | readonly string[], data: readonly any[]) => string;
export declare const decodeParams: (dataTypes: readonly ParamType[] | readonly string[], data: BytesLike) => Result;
export declare function parseSolidityCiphertextString(ciphertext: string): Ciphertext;
export declare function parseSolidityCiphertext(ciphertext: TypesLib.CiphertextStructOutput): Ciphertext;
export declare function encodeCiphertextToSolidity(ciphertext: Ciphertext): TypesLib.CiphertextStruct;