1 |
|
2 | import { Block, BlockTag, BlockWithTransactions, EventType, Filter, FilterByBlockHash, Listener, Log, Provider, TransactionReceipt, TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider";
|
3 | import { BigNumber, BigNumberish } from "@ethersproject/bignumber";
|
4 | import { Network, Networkish } from "@ethersproject/networks";
|
5 | import { Deferrable } from "@ethersproject/properties";
|
6 | import { Transaction } from "@ethersproject/transactions";
|
7 | import { Formatter } from "./formatter";
|
8 | export declare class Event {
|
9 | readonly listener: Listener;
|
10 | readonly once: boolean;
|
11 | readonly tag: string;
|
12 | _lastBlockNumber: number;
|
13 | _inflight: boolean;
|
14 | constructor(tag: string, listener: Listener, once: boolean);
|
15 | get event(): EventType;
|
16 | get type(): string;
|
17 | get hash(): string;
|
18 | get filter(): Filter;
|
19 | pollable(): boolean;
|
20 | }
|
21 | export interface EnsResolver {
|
22 | readonly name: string;
|
23 | readonly address: string;
|
24 | getAddress(coinType?: 60): Promise<null | string>;
|
25 | getContentHash(): Promise<null | string>;
|
26 | getText(key: string): Promise<null | string>;
|
27 | }
|
28 | export interface EnsProvider {
|
29 | resolveName(name: string): Promise<null | string>;
|
30 | lookupAddress(address: string): Promise<null | string>;
|
31 | getResolver(name: string): Promise<null | EnsResolver>;
|
32 | }
|
33 | export interface Avatar {
|
34 | url: string;
|
35 | linkage: Array<{
|
36 | type: string;
|
37 | content: string;
|
38 | }>;
|
39 | }
|
40 | export declare class Resolver implements EnsResolver {
|
41 | readonly provider: BaseProvider;
|
42 | readonly name: string;
|
43 | readonly address: string;
|
44 | readonly _resolvedAddress: null | string;
|
45 | _supportsEip2544: null | Promise<boolean>;
|
46 | constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string);
|
47 | supportsWildcard(): Promise<boolean>;
|
48 | _fetch(selector: string, parameters?: string): Promise<null | string>;
|
49 | _fetchBytes(selector: string, parameters?: string): Promise<null | string>;
|
50 | _getAddress(coinType: number, hexBytes: string): string;
|
51 | getAddress(coinType?: number): Promise<string>;
|
52 | getAvatar(): Promise<null | Avatar>;
|
53 | getContentHash(): Promise<string>;
|
54 | getText(key: string): Promise<string>;
|
55 | }
|
56 | export declare class BaseProvider extends Provider implements EnsProvider {
|
57 | _networkPromise: Promise<Network>;
|
58 | _network: Network;
|
59 | _events: Array<Event>;
|
60 | formatter: Formatter;
|
61 | _emitted: {
|
62 | [eventName: string]: number | "pending";
|
63 | };
|
64 | _pollingInterval: number;
|
65 | _poller: NodeJS.Timer;
|
66 | _bootstrapPoll: NodeJS.Timer;
|
67 | _lastBlockNumber: number;
|
68 | _maxFilterBlockRange: number;
|
69 | _fastBlockNumber: number;
|
70 | _fastBlockNumberPromise: Promise<number>;
|
71 | _fastQueryDate: number;
|
72 | _maxInternalBlockNumber: number;
|
73 | _internalBlockNumber: Promise<{
|
74 | blockNumber: number;
|
75 | reqTime: number;
|
76 | respTime: number;
|
77 | }>;
|
78 | readonly anyNetwork: boolean;
|
79 | disableCcipRead: boolean;
|
80 | |
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 | constructor(network: Networkish | Promise<Network>);
|
90 | _ready(): Promise<Network>;
|
91 | get ready(): Promise<Network>;
|
92 | static getFormatter(): Formatter;
|
93 | static getNetwork(network: Networkish): Network;
|
94 | ccipReadFetch(tx: Transaction, calldata: string, urls: Array<string>): Promise<null | string>;
|
95 | _getInternalBlockNumber(maxAge: number): Promise<number>;
|
96 | poll(): Promise<void>;
|
97 | resetEventsBlock(blockNumber: number): void;
|
98 | get network(): Network;
|
99 | detectNetwork(): Promise<Network>;
|
100 | getNetwork(): Promise<Network>;
|
101 | get blockNumber(): number;
|
102 | get polling(): boolean;
|
103 | set polling(value: boolean);
|
104 | get pollingInterval(): number;
|
105 | set pollingInterval(value: number);
|
106 | _getFastBlockNumber(): Promise<number>;
|
107 | _setFastBlockNumber(blockNumber: number): void;
|
108 | waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
|
109 | _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
|
110 | data: string;
|
111 | from: string;
|
112 | nonce: number;
|
113 | to: string;
|
114 | value: BigNumber;
|
115 | startBlock: number;
|
116 | }): Promise<TransactionReceipt>;
|
117 | getBlockNumber(): Promise<number>;
|
118 | getGasPrice(): Promise<BigNumber>;
|
119 | getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
|
120 | getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
|
121 | getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
122 | getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
123 | _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse;
|
124 | sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
|
125 | _getTransactionRequest(transaction: Deferrable<TransactionRequest>): Promise<Transaction>;
|
126 | _getFilter(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Filter | FilterByBlockHash>;
|
127 | _call(transaction: TransactionRequest, blockTag: BlockTag, attempt: number): Promise<string>;
|
128 | call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
129 | estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
130 | _getAddress(addressOrName: string | Promise<string>): Promise<string>;
|
131 | _getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>, includeTransactions?: boolean): Promise<Block | BlockWithTransactions>;
|
132 | getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
|
133 | getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
|
134 | getTransaction(transactionHash: string | Promise<string>): Promise<TransactionResponse>;
|
135 | getTransactionReceipt(transactionHash: string | Promise<string>): Promise<TransactionReceipt>;
|
136 | getLogs(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Array<Log>>;
|
137 | getEtherPrice(): Promise<number>;
|
138 | _getBlockTag(blockTag: BlockTag | Promise<BlockTag>): Promise<BlockTag>;
|
139 | getResolver(name: string): Promise<null | Resolver>;
|
140 | _getResolver(name: string, operation?: string): Promise<string>;
|
141 | resolveName(name: string | Promise<string>): Promise<null | string>;
|
142 | lookupAddress(address: string | Promise<string>): Promise<null | string>;
|
143 | getAvatar(nameOrAddress: string): Promise<null | string>;
|
144 | perform(method: string, params: any): Promise<any>;
|
145 | _startEvent(event: Event): void;
|
146 | _stopEvent(event: Event): void;
|
147 | _addEventListener(eventName: EventType, listener: Listener, once: boolean): this;
|
148 | on(eventName: EventType, listener: Listener): this;
|
149 | once(eventName: EventType, listener: Listener): this;
|
150 | emit(eventName: EventType, ...args: Array<any>): boolean;
|
151 | listenerCount(eventName?: EventType): number;
|
152 | listeners(eventName?: EventType): Array<Listener>;
|
153 | off(eventName: EventType, listener?: Listener): this;
|
154 | removeAllListeners(eventName?: EventType): this;
|
155 | }
|
156 | //# sourceMappingURL=base-provider.d.ts.map |
\ | No newline at end of file |