2019-05-15 01:48:48 +03:00
|
|
|
import { Block, TransactionReceipt, TransactionResponse } from "@ethersproject/abstract-provider";
|
|
|
|
import { BigNumber } from "@ethersproject/bignumber";
|
2021-03-30 22:22:45 +03:00
|
|
|
import { AccessList } from "@ethersproject/transactions";
|
2019-05-15 01:48:48 +03:00
|
|
|
export declare type FormatFunc = (value: any) => any;
|
|
|
|
export declare type FormatFuncs = {
|
|
|
|
[key: string]: FormatFunc;
|
|
|
|
};
|
|
|
|
export declare type Formats = {
|
|
|
|
transaction: FormatFuncs;
|
|
|
|
transactionRequest: FormatFuncs;
|
|
|
|
receipt: FormatFuncs;
|
|
|
|
receiptLog: FormatFuncs;
|
|
|
|
block: FormatFuncs;
|
|
|
|
blockWithTransactions: FormatFuncs;
|
|
|
|
filter: FormatFuncs;
|
|
|
|
filterLog: FormatFuncs;
|
|
|
|
};
|
|
|
|
export declare class Formatter {
|
|
|
|
readonly formats: Formats;
|
|
|
|
constructor();
|
|
|
|
getDefaultFormats(): Formats;
|
2021-03-30 22:22:45 +03:00
|
|
|
accessList(accessList: Array<any>): AccessList;
|
2019-05-15 01:48:48 +03:00
|
|
|
number(number: any): number;
|
2021-06-24 09:13:06 +03:00
|
|
|
type(number: any): number;
|
2019-05-15 01:48:48 +03:00
|
|
|
bigNumber(value: any): BigNumber;
|
|
|
|
boolean(value: any): boolean;
|
|
|
|
hex(value: any, strict?: boolean): string;
|
|
|
|
data(value: any, strict?: boolean): string;
|
|
|
|
address(value: any): string;
|
|
|
|
callAddress(value: any): string;
|
|
|
|
contractAddress(value: any): string;
|
|
|
|
blockTag(blockTag: any): string;
|
|
|
|
hash(value: any, strict?: boolean): string;
|
|
|
|
difficulty(value: any): number;
|
|
|
|
uint256(value: any): string;
|
|
|
|
_block(value: any, format: any): Block;
|
|
|
|
block(value: any): Block;
|
|
|
|
blockWithTransactions(value: any): Block;
|
|
|
|
transactionRequest(value: any): any;
|
|
|
|
transactionResponse(transaction: any): TransactionResponse;
|
|
|
|
transaction(value: any): any;
|
|
|
|
receiptLog(value: any): any;
|
|
|
|
receipt(value: any): TransactionReceipt;
|
|
|
|
topics(value: any): any;
|
|
|
|
filter(value: any): any;
|
|
|
|
filterLog(value: any): any;
|
|
|
|
static check(format: {
|
|
|
|
[name: string]: FormatFunc;
|
|
|
|
}, object: any): any;
|
|
|
|
static allowNull(format: FormatFunc, nullValue?: any): FormatFunc;
|
|
|
|
static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc;
|
|
|
|
static arrayOf(format: FormatFunc): FormatFunc;
|
|
|
|
}
|
2020-10-08 03:10:50 +03:00
|
|
|
export interface CommunityResourcable {
|
|
|
|
isCommunityResource(): boolean;
|
|
|
|
}
|
|
|
|
export declare function isCommunityResourcable(value: any): value is CommunityResourcable;
|
|
|
|
export declare function isCommunityResource(value: any): boolean;
|
2020-07-14 09:33:30 +03:00
|
|
|
export declare function showThrottleMessage(): void;
|
2021-01-19 13:22:54 +03:00
|
|
|
//# sourceMappingURL=formatter.d.ts.map
|