2019-05-14 18:48:48 -04:00
|
|
|
import { BigNumber, BigNumberish } from "@ethersproject/bignumber";
|
|
|
|
import { BytesLike, SignatureLike } from "@ethersproject/bytes";
|
2021-03-30 15:22:45 -04:00
|
|
|
export declare type AccessList = Array<{
|
|
|
|
address: string;
|
|
|
|
storageKeys: Array<string>;
|
|
|
|
}>;
|
|
|
|
export declare type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
|
2021-06-24 02:13:06 -04:00
|
|
|
export declare enum TransactionTypes {
|
|
|
|
legacy = 0,
|
|
|
|
eip2930 = 1,
|
|
|
|
eip1559 = 2
|
|
|
|
}
|
2019-05-14 18:48:48 -04:00
|
|
|
export declare type UnsignedTransaction = {
|
|
|
|
to?: string;
|
|
|
|
nonce?: number;
|
|
|
|
gasLimit?: BigNumberish;
|
|
|
|
gasPrice?: BigNumberish;
|
|
|
|
data?: BytesLike;
|
|
|
|
value?: BigNumberish;
|
|
|
|
chainId?: number;
|
2021-03-30 15:22:45 -04:00
|
|
|
type?: number | null;
|
|
|
|
accessList?: AccessListish;
|
2021-06-24 02:13:06 -04:00
|
|
|
maxPriorityFeePerGas?: BigNumberish;
|
|
|
|
maxFeePerGas?: BigNumberish;
|
2019-05-14 18:48:48 -04:00
|
|
|
};
|
|
|
|
export interface Transaction {
|
|
|
|
hash?: string;
|
|
|
|
to?: string;
|
|
|
|
from?: string;
|
|
|
|
nonce: number;
|
|
|
|
gasLimit: BigNumber;
|
2021-06-26 01:55:19 -04:00
|
|
|
gasPrice?: BigNumber;
|
2019-05-14 18:48:48 -04:00
|
|
|
data: string;
|
|
|
|
value: BigNumber;
|
|
|
|
chainId: number;
|
|
|
|
r?: string;
|
|
|
|
s?: string;
|
|
|
|
v?: number;
|
2021-03-30 15:22:45 -04:00
|
|
|
type?: number | null;
|
|
|
|
accessList?: AccessList;
|
2021-06-24 02:13:06 -04:00
|
|
|
maxPriorityFeePerGas?: BigNumber;
|
|
|
|
maxFeePerGas?: BigNumber;
|
2019-05-14 18:48:48 -04:00
|
|
|
}
|
|
|
|
export declare function computeAddress(key: BytesLike | string): string;
|
|
|
|
export declare function recoverAddress(digest: BytesLike, signature: SignatureLike): string;
|
2021-03-30 15:22:45 -04:00
|
|
|
export declare function accessListify(value: AccessListish): AccessList;
|
2019-05-14 18:48:48 -04:00
|
|
|
export declare function serialize(transaction: UnsignedTransaction, signature?: SignatureLike): string;
|
|
|
|
export declare function parse(rawTransaction: BytesLike): Transaction;
|
2021-01-19 05:22:54 -05:00
|
|
|
//# sourceMappingURL=index.d.ts.map
|