-
Notifications
You must be signed in to change notification settings - Fork 86
/
wallet-types.ts
91 lines (74 loc) · 1.85 KB
/
wallet-types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
export type GasApiResponse = {
request_id: string;
state: string;
success: boolean;
};
export type AccessListEntry = { address: string; storageKeys: Array<string> };
/**
* An ordered collection of [[AccessList]] entries.
*/
export type AccessList = Array<AccessListEntry>;
export interface GaslessTransactionRequest {
/**
* The transaction type.
*/
type?: number;
/**
* The target of the transaction.
*/
to?: string;
/**
* The sender of the transaction.
*/
from?: string;
/**
* The nonce of the transaction, used to prevent replay attacks.
*/
nonce?: number;
/**
* The maximum amount of gas to allow this transaction to consime.
*/
gasLimit?: bigint;
/**
* The gas price to use for legacy transactions or transactions on
* legacy networks.
*
* Most of the time the ``max*FeePerGas`` is preferred.
*/
gasPrice?: bigint;
/**
* The [[link-eip-1559]] maximum priority fee to pay per gas.
*/
maxPriorityFeePerGas?: bigint;
/**
* The [[link-eip-1559]] maximum total fee to pay per gas. The actual
* value used is protocol enforced to be the block's base fee.
*/
maxFeePerGas?: bigint;
/**
* The transaction data.
*/
data?: string;
/**
* The transaction value (in wei).
*/
value?: bigint;
/**
* The chain ID for the network this transaction is valid on.
*/
chainId?: bigint;
/**
* The [[link-eip-2930]] access list. Storage slots included in the access
* list are //warmed// by pre-loading them, so their initial cost to
* fetch is guaranteed, but then each additional access is cheaper.
*/
accessList?: AccessList;
/**
* A custom object, which can be passed along for network-specific
* values.
*/
customData?: any;
}
export enum WalletEventOnReceived {
WalletInfoFetched = 'Wallet/wallet-info-fetched',
}