@metamask/keyring-api 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -1
- package/dist/JsonRpcRequest.d.ts +15 -0
- package/dist/JsonRpcRequest.js +18 -0
- package/dist/JsonRpcRequest.js.map +1 -0
- package/dist/{keyring-client.d.ts → KeyringClient.d.ts} +7 -6
- package/dist/{keyring-client.js → KeyringClient.js} +25 -20
- package/dist/KeyringClient.js.map +1 -0
- package/dist/{keyring-snap-controller-client.d.ts → KeyringSnapControllerClient.d.ts} +7 -1
- package/dist/{keyring-snap-controller-client.js → KeyringSnapControllerClient.js} +13 -7
- package/dist/KeyringSnapControllerClient.js.map +1 -0
- package/dist/{keyring-snap-rpc-client.d.ts → KeyringSnapRpcClient.d.ts} +4 -3
- package/dist/{keyring-snap-rpc-client.js → KeyringSnapRpcClient.js} +5 -7
- package/dist/KeyringSnapRpcClient.js.map +1 -0
- package/dist/{keyring-api.d.ts → api.d.ts} +72 -52
- package/dist/api.js +110 -0
- package/dist/api.js.map +1 -0
- package/dist/events.d.ts +10 -0
- package/dist/events.js +17 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/{keyring-internal-api.d.ts → internal/api.d.ts} +129 -260
- package/dist/internal/api.js +126 -0
- package/dist/internal/api.js.map +1 -0
- package/dist/internal/events.d.ts +162 -0
- package/dist/internal/events.js +58 -0
- package/dist/internal/events.js.map +1 -0
- package/dist/internal/index.d.ts +2 -0
- package/dist/internal/index.js +19 -0
- package/dist/internal/index.js.map +1 -0
- package/dist/internal/types.d.ts +67 -0
- package/dist/internal/types.js +19 -0
- package/dist/internal/types.js.map +1 -0
- package/dist/{keyring-rpc-dispatcher.d.ts → rpc-handler.d.ts} +17 -2
- package/dist/rpc-handler.js +141 -0
- package/dist/rpc-handler.js.map +1 -0
- package/dist/snap-utils.d.ts +11 -0
- package/dist/snap-utils.js +21 -0
- package/dist/snap-utils.js.map +1 -0
- package/dist/utils.d.ts +3 -3
- package/dist/utils.js.map +1 -1
- package/package.json +19 -10
- package/dist/keyring-api.js +0 -81
- package/dist/keyring-api.js.map +0 -1
- package/dist/keyring-client.js.map +0 -1
- package/dist/keyring-internal-api.js +0 -154
- package/dist/keyring-internal-api.js.map +0 -1
- package/dist/keyring-rpc-dispatcher.js +0 -107
- package/dist/keyring-rpc-dispatcher.js.map +0 -1
- package/dist/keyring-snap-controller-client.js.map +0 -1
- package/dist/keyring-snap-rpc-client.js.map +0 -1
@@ -1,158 +1,140 @@
|
|
1
|
-
import { Infer } from 'superstruct';
|
1
|
+
import { type Infer } from 'superstruct';
|
2
2
|
export declare const ListAccountsRequestStruct: import("superstruct").Struct<{
|
3
|
-
id: string;
|
4
3
|
jsonrpc: "2.0";
|
4
|
+
id: string;
|
5
5
|
method: "keyring_listAccounts";
|
6
6
|
}, {
|
7
|
-
id: import("superstruct").Struct<string, null>;
|
8
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
9
7
|
method: import("superstruct").Struct<"keyring_listAccounts", "keyring_listAccounts">;
|
8
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
9
|
+
id: import("superstruct").Struct<string, null>;
|
10
10
|
}>;
|
11
11
|
export declare type ListAccountsRequest = Infer<typeof ListAccountsRequestStruct>;
|
12
12
|
export declare const ListAccountsResponseStruct: import("superstruct").Struct<{
|
13
13
|
id: string;
|
14
|
-
name: string;
|
15
14
|
address: string;
|
16
|
-
options: Record<string, import("@metamask/utils").Json
|
17
|
-
|
18
|
-
type: "eip155:eoa" | "eip155:
|
15
|
+
options: Record<string, import("@metamask/utils").Json>;
|
16
|
+
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
17
|
+
type: "eip155:eoa" | "eip155:eip4337";
|
19
18
|
}[], import("superstruct").Struct<{
|
20
19
|
id: string;
|
21
|
-
name: string;
|
22
20
|
address: string;
|
23
|
-
options: Record<string, import("@metamask/utils").Json
|
24
|
-
|
25
|
-
type: "eip155:eoa" | "eip155:
|
21
|
+
options: Record<string, import("@metamask/utils").Json>;
|
22
|
+
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
23
|
+
type: "eip155:eoa" | "eip155:eip4337";
|
26
24
|
}, {
|
27
25
|
id: import("superstruct").Struct<string, null>;
|
28
|
-
name: import("superstruct").Struct<string, null>;
|
29
26
|
address: import("superstruct").Struct<string, null>;
|
30
|
-
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json
|
31
|
-
|
27
|
+
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
28
|
+
methods: import("superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[], import("superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4", {
|
32
29
|
personal_sign: "personal_sign";
|
33
|
-
eth_sendTransaction: "eth_sendTransaction";
|
34
30
|
eth_sign: "eth_sign";
|
35
31
|
eth_signTransaction: "eth_signTransaction";
|
36
32
|
eth_signTypedData: "eth_signTypedData";
|
37
33
|
eth_signTypedData_v1: "eth_signTypedData_v1";
|
38
|
-
eth_signTypedData_v2: "eth_signTypedData_v2";
|
39
34
|
eth_signTypedData_v3: "eth_signTypedData_v3";
|
40
35
|
eth_signTypedData_v4: "eth_signTypedData_v4";
|
41
36
|
}>>;
|
42
|
-
type: import("superstruct").Struct<"eip155:eoa" | "eip155:
|
37
|
+
type: import("superstruct").Struct<"eip155:eoa" | "eip155:eip4337", {
|
43
38
|
"eip155:eoa": "eip155:eoa";
|
44
|
-
"eip155:
|
39
|
+
"eip155:eip4337": "eip155:eip4337";
|
45
40
|
}>;
|
46
41
|
}>>;
|
47
42
|
export declare type ListAccountsResponse = Infer<typeof ListAccountsResponseStruct>;
|
48
43
|
export declare const GetAccountRequestStruct: import("superstruct").Struct<{
|
49
|
-
id: string;
|
50
44
|
jsonrpc: "2.0";
|
45
|
+
id: string;
|
51
46
|
method: "keyring_getAccount";
|
52
47
|
params: {
|
53
48
|
id: string;
|
54
49
|
};
|
55
50
|
}, {
|
56
|
-
id: import("superstruct").Struct<string, null>;
|
57
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
58
51
|
method: import("superstruct").Struct<"keyring_getAccount", "keyring_getAccount">;
|
59
52
|
params: import("superstruct").Struct<{
|
60
53
|
id: string;
|
61
54
|
}, {
|
62
55
|
id: import("superstruct").Struct<string, null>;
|
63
56
|
}>;
|
57
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
58
|
+
id: import("superstruct").Struct<string, null>;
|
64
59
|
}>;
|
65
60
|
export declare type GetAccountRequest = Infer<typeof GetAccountRequestStruct>;
|
66
61
|
export declare const GetAccountResponseStruct: import("superstruct").Struct<{
|
67
62
|
id: string;
|
68
|
-
name: string;
|
69
63
|
address: string;
|
70
|
-
options: Record<string, import("@metamask/utils").Json
|
71
|
-
|
72
|
-
type: "eip155:eoa" | "eip155:
|
64
|
+
options: Record<string, import("@metamask/utils").Json>;
|
65
|
+
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
66
|
+
type: "eip155:eoa" | "eip155:eip4337";
|
73
67
|
}, {
|
74
68
|
id: import("superstruct").Struct<string, null>;
|
75
|
-
name: import("superstruct").Struct<string, null>;
|
76
69
|
address: import("superstruct").Struct<string, null>;
|
77
|
-
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json
|
78
|
-
|
70
|
+
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
71
|
+
methods: import("superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[], import("superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4", {
|
79
72
|
personal_sign: "personal_sign";
|
80
|
-
eth_sendTransaction: "eth_sendTransaction";
|
81
73
|
eth_sign: "eth_sign";
|
82
74
|
eth_signTransaction: "eth_signTransaction";
|
83
75
|
eth_signTypedData: "eth_signTypedData";
|
84
76
|
eth_signTypedData_v1: "eth_signTypedData_v1";
|
85
|
-
eth_signTypedData_v2: "eth_signTypedData_v2";
|
86
77
|
eth_signTypedData_v3: "eth_signTypedData_v3";
|
87
78
|
eth_signTypedData_v4: "eth_signTypedData_v4";
|
88
79
|
}>>;
|
89
|
-
type: import("superstruct").Struct<"eip155:eoa" | "eip155:
|
80
|
+
type: import("superstruct").Struct<"eip155:eoa" | "eip155:eip4337", {
|
90
81
|
"eip155:eoa": "eip155:eoa";
|
91
|
-
"eip155:
|
82
|
+
"eip155:eip4337": "eip155:eip4337";
|
92
83
|
}>;
|
93
84
|
}>;
|
94
85
|
export declare type GetAccountResponse = Infer<typeof GetAccountResponseStruct>;
|
95
86
|
export declare const CreateAccountRequestStruct: import("superstruct").Struct<{
|
96
|
-
id: string;
|
97
87
|
jsonrpc: "2.0";
|
88
|
+
id: string;
|
98
89
|
method: "keyring_createAccount";
|
99
90
|
params: {
|
100
|
-
|
101
|
-
options: Record<string, import("@metamask/utils").Json> | null;
|
91
|
+
options: Record<string, import("@metamask/utils").Json>;
|
102
92
|
};
|
103
93
|
}, {
|
104
|
-
id: import("superstruct").Struct<string, null>;
|
105
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
106
94
|
method: import("superstruct").Struct<"keyring_createAccount", "keyring_createAccount">;
|
107
95
|
params: import("superstruct").Struct<{
|
108
|
-
|
109
|
-
options: Record<string, import("@metamask/utils").Json> | null;
|
96
|
+
options: Record<string, import("@metamask/utils").Json>;
|
110
97
|
}, {
|
111
|
-
|
112
|
-
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json> | null, null>;
|
98
|
+
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
113
99
|
}>;
|
100
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
101
|
+
id: import("superstruct").Struct<string, null>;
|
114
102
|
}>;
|
115
103
|
export declare type CreateAccountRequest = Infer<typeof CreateAccountRequestStruct>;
|
116
104
|
export declare const CreateAccountResponseStruct: import("superstruct").Struct<{
|
117
105
|
id: string;
|
118
|
-
name: string;
|
119
106
|
address: string;
|
120
|
-
options: Record<string, import("@metamask/utils").Json
|
121
|
-
|
122
|
-
type: "eip155:eoa" | "eip155:
|
107
|
+
options: Record<string, import("@metamask/utils").Json>;
|
108
|
+
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
109
|
+
type: "eip155:eoa" | "eip155:eip4337";
|
123
110
|
}, {
|
124
111
|
id: import("superstruct").Struct<string, null>;
|
125
|
-
name: import("superstruct").Struct<string, null>;
|
126
112
|
address: import("superstruct").Struct<string, null>;
|
127
|
-
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json
|
128
|
-
|
113
|
+
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
114
|
+
methods: import("superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[], import("superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4", {
|
129
115
|
personal_sign: "personal_sign";
|
130
|
-
eth_sendTransaction: "eth_sendTransaction";
|
131
116
|
eth_sign: "eth_sign";
|
132
117
|
eth_signTransaction: "eth_signTransaction";
|
133
118
|
eth_signTypedData: "eth_signTypedData";
|
134
119
|
eth_signTypedData_v1: "eth_signTypedData_v1";
|
135
|
-
eth_signTypedData_v2: "eth_signTypedData_v2";
|
136
120
|
eth_signTypedData_v3: "eth_signTypedData_v3";
|
137
121
|
eth_signTypedData_v4: "eth_signTypedData_v4";
|
138
122
|
}>>;
|
139
|
-
type: import("superstruct").Struct<"eip155:eoa" | "eip155:
|
123
|
+
type: import("superstruct").Struct<"eip155:eoa" | "eip155:eip4337", {
|
140
124
|
"eip155:eoa": "eip155:eoa";
|
141
|
-
"eip155:
|
125
|
+
"eip155:eip4337": "eip155:eip4337";
|
142
126
|
}>;
|
143
127
|
}>;
|
144
128
|
export declare type CreateAccountResponse = Infer<typeof CreateAccountResponseStruct>;
|
145
129
|
export declare const FilterAccountChainsStruct: import("superstruct").Struct<{
|
146
|
-
id: string;
|
147
130
|
jsonrpc: "2.0";
|
131
|
+
id: string;
|
148
132
|
method: "keyring_filterAccountChains";
|
149
133
|
params: {
|
150
134
|
id: string;
|
151
135
|
chains: string[];
|
152
136
|
};
|
153
137
|
}, {
|
154
|
-
id: import("superstruct").Struct<string, null>;
|
155
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
156
138
|
method: import("superstruct").Struct<"keyring_filterAccountChains", "keyring_filterAccountChains">;
|
157
139
|
params: import("superstruct").Struct<{
|
158
140
|
id: string;
|
@@ -161,416 +143,303 @@ export declare const FilterAccountChainsStruct: import("superstruct").Struct<{
|
|
161
143
|
id: import("superstruct").Struct<string, null>;
|
162
144
|
chains: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>;
|
163
145
|
}>;
|
146
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
147
|
+
id: import("superstruct").Struct<string, null>;
|
164
148
|
}>;
|
165
149
|
export declare type FilterAccountChainsRequest = Infer<typeof FilterAccountChainsStruct>;
|
166
150
|
export declare const FilterAccountChainsResponseStruct: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>;
|
167
151
|
export declare type FilterAccountChainsResponse = Infer<typeof FilterAccountChainsResponseStruct>;
|
168
152
|
export declare const UpdateAccountRequestStruct: import("superstruct").Struct<{
|
169
|
-
id: string;
|
170
153
|
jsonrpc: "2.0";
|
154
|
+
id: string;
|
171
155
|
method: "keyring_updateAccount";
|
172
156
|
params: {
|
173
157
|
account: {
|
174
158
|
id: string;
|
175
|
-
name: string;
|
176
159
|
address: string;
|
177
|
-
options: Record<string, import("@metamask/utils").Json
|
178
|
-
|
179
|
-
type: "eip155:eoa" | "eip155:
|
160
|
+
options: Record<string, import("@metamask/utils").Json>;
|
161
|
+
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
162
|
+
type: "eip155:eoa" | "eip155:eip4337";
|
180
163
|
};
|
181
164
|
};
|
182
165
|
}, {
|
183
|
-
id: import("superstruct").Struct<string, null>;
|
184
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
185
166
|
method: import("superstruct").Struct<"keyring_updateAccount", "keyring_updateAccount">;
|
186
167
|
params: import("superstruct").Struct<{
|
187
168
|
account: {
|
188
169
|
id: string;
|
189
|
-
name: string;
|
190
170
|
address: string;
|
191
|
-
options: Record<string, import("@metamask/utils").Json
|
192
|
-
|
193
|
-
type: "eip155:eoa" | "eip155:
|
171
|
+
options: Record<string, import("@metamask/utils").Json>;
|
172
|
+
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
173
|
+
type: "eip155:eoa" | "eip155:eip4337";
|
194
174
|
};
|
195
175
|
}, {
|
196
176
|
account: import("superstruct").Struct<{
|
197
177
|
id: string;
|
198
|
-
name: string;
|
199
178
|
address: string;
|
200
|
-
options: Record<string, import("@metamask/utils").Json
|
201
|
-
|
202
|
-
type: "eip155:eoa" | "eip155:
|
179
|
+
options: Record<string, import("@metamask/utils").Json>;
|
180
|
+
methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
181
|
+
type: "eip155:eoa" | "eip155:eip4337";
|
203
182
|
}, {
|
204
183
|
id: import("superstruct").Struct<string, null>;
|
205
|
-
name: import("superstruct").Struct<string, null>;
|
206
184
|
address: import("superstruct").Struct<string, null>;
|
207
|
-
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json
|
208
|
-
|
185
|
+
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
186
|
+
methods: import("superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[], import("superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4", {
|
209
187
|
personal_sign: "personal_sign";
|
210
|
-
eth_sendTransaction: "eth_sendTransaction";
|
211
188
|
eth_sign: "eth_sign";
|
212
189
|
eth_signTransaction: "eth_signTransaction";
|
213
190
|
eth_signTypedData: "eth_signTypedData";
|
214
191
|
eth_signTypedData_v1: "eth_signTypedData_v1";
|
215
|
-
eth_signTypedData_v2: "eth_signTypedData_v2";
|
216
192
|
eth_signTypedData_v3: "eth_signTypedData_v3";
|
217
193
|
eth_signTypedData_v4: "eth_signTypedData_v4";
|
218
194
|
}>>;
|
219
|
-
type: import("superstruct").Struct<"eip155:eoa" | "eip155:
|
195
|
+
type: import("superstruct").Struct<"eip155:eoa" | "eip155:eip4337", {
|
220
196
|
"eip155:eoa": "eip155:eoa";
|
221
|
-
"eip155:
|
197
|
+
"eip155:eip4337": "eip155:eip4337";
|
222
198
|
}>;
|
223
199
|
}>;
|
224
200
|
}>;
|
201
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
202
|
+
id: import("superstruct").Struct<string, null>;
|
225
203
|
}>;
|
226
204
|
export declare type UpdateAccountRequest = Infer<typeof UpdateAccountRequestStruct>;
|
227
205
|
export declare const UpdateAccountResponseStruct: import("superstruct").Struct<null, null>;
|
228
206
|
export declare type UpdateAccountResponse = Infer<typeof UpdateAccountResponseStruct>;
|
229
207
|
export declare const DeleteAccountRequestStruct: import("superstruct").Struct<{
|
230
|
-
id: string;
|
231
208
|
jsonrpc: "2.0";
|
209
|
+
id: string;
|
232
210
|
method: "keyring_deleteAccount";
|
233
211
|
params: {
|
234
212
|
id: string;
|
235
213
|
};
|
236
214
|
}, {
|
237
|
-
id: import("superstruct").Struct<string, null>;
|
238
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
239
215
|
method: import("superstruct").Struct<"keyring_deleteAccount", "keyring_deleteAccount">;
|
240
216
|
params: import("superstruct").Struct<{
|
241
217
|
id: string;
|
242
218
|
}, {
|
243
219
|
id: import("superstruct").Struct<string, null>;
|
244
220
|
}>;
|
221
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
222
|
+
id: import("superstruct").Struct<string, null>;
|
245
223
|
}>;
|
246
224
|
export declare type DeleteAccountRequest = Infer<typeof DeleteAccountRequestStruct>;
|
247
225
|
export declare const DeleteAccountResponseStruct: import("superstruct").Struct<null, null>;
|
248
226
|
export declare type DeleteAccountResponse = Infer<typeof DeleteAccountResponseStruct>;
|
249
|
-
export declare const
|
227
|
+
export declare const ExportAccountRequestStruct: import("superstruct").Struct<{
|
228
|
+
jsonrpc: "2.0";
|
250
229
|
id: string;
|
230
|
+
method: "keyring_exportAccount";
|
231
|
+
params: {
|
232
|
+
id: string;
|
233
|
+
};
|
234
|
+
}, {
|
235
|
+
method: import("superstruct").Struct<"keyring_exportAccount", "keyring_exportAccount">;
|
236
|
+
params: import("superstruct").Struct<{
|
237
|
+
id: string;
|
238
|
+
}, {
|
239
|
+
id: import("superstruct").Struct<string, null>;
|
240
|
+
}>;
|
241
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
242
|
+
id: import("superstruct").Struct<string, null>;
|
243
|
+
}>;
|
244
|
+
export declare type ExportAccountRequest = Infer<typeof ExportAccountRequestStruct>;
|
245
|
+
export declare const ExportAccountResponseStruct: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
246
|
+
export declare type ExportAccountResponse = Infer<typeof ExportAccountResponseStruct>;
|
247
|
+
export declare const ListRequestsRequestStruct: import("superstruct").Struct<{
|
251
248
|
jsonrpc: "2.0";
|
249
|
+
id: string;
|
252
250
|
method: "keyring_listRequests";
|
253
251
|
}, {
|
254
|
-
id: import("superstruct").Struct<string, null>;
|
255
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
256
252
|
method: import("superstruct").Struct<"keyring_listRequests", "keyring_listRequests">;
|
253
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
254
|
+
id: import("superstruct").Struct<string, null>;
|
257
255
|
}>;
|
258
256
|
export declare type ListRequestsRequest = Infer<typeof ListRequestsRequestStruct>;
|
259
257
|
export declare const ListRequestsResponseStruct: import("superstruct").Struct<{
|
260
258
|
account: string;
|
261
259
|
scope: string;
|
262
260
|
request: {
|
263
|
-
id: string;
|
264
261
|
jsonrpc: "2.0";
|
262
|
+
id: string | number | null;
|
265
263
|
method: string;
|
266
264
|
} | {
|
267
|
-
id: string;
|
268
265
|
jsonrpc: "2.0";
|
266
|
+
id: string | number | null;
|
269
267
|
method: string;
|
270
|
-
params:
|
268
|
+
params: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
271
269
|
};
|
272
270
|
}[], import("superstruct").Struct<{
|
273
271
|
account: string;
|
274
272
|
scope: string;
|
275
273
|
request: {
|
276
|
-
id: string;
|
277
274
|
jsonrpc: "2.0";
|
275
|
+
id: string | number | null;
|
278
276
|
method: string;
|
279
277
|
} | {
|
280
|
-
id: string;
|
281
278
|
jsonrpc: "2.0";
|
279
|
+
id: string | number | null;
|
282
280
|
method: string;
|
283
|
-
params:
|
281
|
+
params: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
284
282
|
};
|
285
283
|
}, {
|
286
284
|
account: import("superstruct").Struct<string, null>;
|
287
285
|
scope: import("superstruct").Struct<string, null>;
|
288
286
|
request: import("superstruct").Struct<{
|
289
|
-
id: string;
|
290
287
|
jsonrpc: "2.0";
|
288
|
+
id: string | number | null;
|
291
289
|
method: string;
|
292
290
|
} | {
|
293
|
-
id: string;
|
294
291
|
jsonrpc: "2.0";
|
292
|
+
id: string | number | null;
|
295
293
|
method: string;
|
296
|
-
params:
|
294
|
+
params: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
297
295
|
}, null>;
|
298
296
|
}>>;
|
299
297
|
export declare type ListRequestsResponse = Infer<typeof ListRequestsResponseStruct>;
|
300
298
|
export declare const GetRequestRequestStruct: import("superstruct").Struct<{
|
301
|
-
id: string;
|
302
299
|
jsonrpc: "2.0";
|
300
|
+
id: string;
|
303
301
|
method: "keyring_getRequest";
|
304
302
|
params: {
|
305
303
|
id: string;
|
306
304
|
};
|
307
305
|
}, {
|
308
|
-
id: import("superstruct").Struct<string, null>;
|
309
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
310
306
|
method: import("superstruct").Struct<"keyring_getRequest", "keyring_getRequest">;
|
311
307
|
params: import("superstruct").Struct<{
|
312
308
|
id: string;
|
313
309
|
}, {
|
314
310
|
id: import("superstruct").Struct<string, null>;
|
315
311
|
}>;
|
312
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
313
|
+
id: import("superstruct").Struct<string, null>;
|
316
314
|
}>;
|
317
315
|
export declare type GetRequestRequest = Infer<typeof GetRequestRequestStruct>;
|
318
316
|
export declare const GetRequestResponseStruct: import("superstruct").Struct<{
|
319
317
|
account: string;
|
320
318
|
scope: string;
|
321
319
|
request: {
|
322
|
-
id: string;
|
323
320
|
jsonrpc: "2.0";
|
321
|
+
id: string | number | null;
|
324
322
|
method: string;
|
325
323
|
} | {
|
326
|
-
id: string;
|
327
324
|
jsonrpc: "2.0";
|
325
|
+
id: string | number | null;
|
328
326
|
method: string;
|
329
|
-
params:
|
327
|
+
params: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
330
328
|
};
|
331
329
|
}, {
|
332
330
|
account: import("superstruct").Struct<string, null>;
|
333
331
|
scope: import("superstruct").Struct<string, null>;
|
334
332
|
request: import("superstruct").Struct<{
|
335
|
-
id: string;
|
336
333
|
jsonrpc: "2.0";
|
334
|
+
id: string | number | null;
|
337
335
|
method: string;
|
338
336
|
} | {
|
339
|
-
id: string;
|
340
337
|
jsonrpc: "2.0";
|
338
|
+
id: string | number | null;
|
341
339
|
method: string;
|
342
|
-
params:
|
340
|
+
params: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
343
341
|
}, null>;
|
344
342
|
}>;
|
345
343
|
export declare type GetRequestResponse = Infer<typeof GetRequestResponseStruct>;
|
346
344
|
export declare const SubmitRequestRequestStruct: import("superstruct").Struct<{
|
347
|
-
id: string;
|
348
345
|
jsonrpc: "2.0";
|
346
|
+
id: string;
|
349
347
|
method: "keyring_submitRequest";
|
350
348
|
params: {
|
351
349
|
account: string;
|
352
350
|
scope: string;
|
353
351
|
request: {
|
354
|
-
id: string;
|
355
352
|
jsonrpc: "2.0";
|
353
|
+
id: string | number | null;
|
356
354
|
method: string;
|
357
355
|
} | {
|
358
|
-
id: string;
|
359
356
|
jsonrpc: "2.0";
|
357
|
+
id: string | number | null;
|
360
358
|
method: string;
|
361
|
-
params:
|
359
|
+
params: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
362
360
|
};
|
363
361
|
};
|
364
362
|
}, {
|
365
|
-
id: import("superstruct").Struct<string, null>;
|
366
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
367
363
|
method: import("superstruct").Struct<"keyring_submitRequest", "keyring_submitRequest">;
|
368
364
|
params: import("superstruct").Struct<{
|
369
365
|
account: string;
|
370
366
|
scope: string;
|
371
367
|
request: {
|
372
|
-
id: string;
|
373
368
|
jsonrpc: "2.0";
|
369
|
+
id: string | number | null;
|
374
370
|
method: string;
|
375
371
|
} | {
|
376
|
-
id: string;
|
377
372
|
jsonrpc: "2.0";
|
373
|
+
id: string | number | null;
|
378
374
|
method: string;
|
379
|
-
params:
|
375
|
+
params: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
380
376
|
};
|
381
377
|
}, {
|
382
378
|
account: import("superstruct").Struct<string, null>;
|
383
379
|
scope: import("superstruct").Struct<string, null>;
|
384
380
|
request: import("superstruct").Struct<{
|
385
|
-
id: string;
|
386
381
|
jsonrpc: "2.0";
|
382
|
+
id: string | number | null;
|
387
383
|
method: string;
|
388
384
|
} | {
|
389
|
-
id: string;
|
390
385
|
jsonrpc: "2.0";
|
386
|
+
id: string | number | null;
|
391
387
|
method: string;
|
392
|
-
params:
|
388
|
+
params: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
393
389
|
}, null>;
|
394
390
|
}>;
|
391
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
392
|
+
id: import("superstruct").Struct<string, null>;
|
395
393
|
}>;
|
396
394
|
export declare type SubmitRequestRequest = Infer<typeof SubmitRequestRequestStruct>;
|
395
|
+
export declare const SubmitRequestResponseStruct: import("superstruct").Struct<{
|
396
|
+
pending: true;
|
397
|
+
redirect: string | null;
|
398
|
+
} | {
|
399
|
+
pending: false;
|
400
|
+
result: import("@metamask/utils").Json;
|
401
|
+
}, null>;
|
402
|
+
export declare type SubmitRequestResponse = Infer<typeof SubmitRequestResponseStruct>;
|
397
403
|
export declare const ApproveRequestRequestStruct: import("superstruct").Struct<{
|
398
|
-
id: string;
|
399
404
|
jsonrpc: "2.0";
|
405
|
+
id: string;
|
400
406
|
method: "keyring_approveRequest";
|
401
407
|
params: {
|
402
408
|
id: string;
|
409
|
+
data: Record<string, import("@metamask/utils").Json>;
|
403
410
|
};
|
404
411
|
}, {
|
405
|
-
id: import("superstruct").Struct<string, null>;
|
406
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
407
412
|
method: import("superstruct").Struct<"keyring_approveRequest", "keyring_approveRequest">;
|
408
413
|
params: import("superstruct").Struct<{
|
409
414
|
id: string;
|
415
|
+
data: Record<string, import("@metamask/utils").Json>;
|
410
416
|
}, {
|
411
417
|
id: import("superstruct").Struct<string, null>;
|
418
|
+
data: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
412
419
|
}>;
|
420
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
421
|
+
id: import("superstruct").Struct<string, null>;
|
413
422
|
}>;
|
414
423
|
export declare type ApproveRequestRequest = Infer<typeof ApproveRequestRequestStruct>;
|
415
424
|
export declare const ApproveRequestResponseStruct: import("superstruct").Struct<null, null>;
|
416
425
|
export declare type ApproveRequestResponse = Infer<typeof ApproveRequestResponseStruct>;
|
417
426
|
export declare const RejectRequestRequestStruct: import("superstruct").Struct<{
|
418
|
-
id: string;
|
419
427
|
jsonrpc: "2.0";
|
428
|
+
id: string;
|
420
429
|
method: "keyring_rejectRequest";
|
421
430
|
params: {
|
422
431
|
id: string;
|
423
432
|
};
|
424
433
|
}, {
|
425
|
-
id: import("superstruct").Struct<string, null>;
|
426
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
427
434
|
method: import("superstruct").Struct<"keyring_rejectRequest", "keyring_rejectRequest">;
|
428
435
|
params: import("superstruct").Struct<{
|
429
436
|
id: string;
|
430
437
|
}, {
|
431
438
|
id: import("superstruct").Struct<string, null>;
|
432
439
|
}>;
|
440
|
+
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
441
|
+
id: import("superstruct").Struct<string, null>;
|
433
442
|
}>;
|
434
443
|
export declare type RejectRequestRequest = Infer<typeof RejectRequestRequestStruct>;
|
435
444
|
export declare const RejectRequestResponseStruct: import("superstruct").Struct<null, null>;
|
436
445
|
export declare type RejectRequestResponse = Infer<typeof RejectRequestResponseStruct>;
|
437
|
-
export declare const InternalRequestStruct: import("superstruct").Struct<{
|
438
|
-
id: string;
|
439
|
-
jsonrpc: "2.0";
|
440
|
-
method: "keyring_listAccounts";
|
441
|
-
} | {
|
442
|
-
id: string;
|
443
|
-
jsonrpc: "2.0";
|
444
|
-
method: "keyring_getAccount";
|
445
|
-
params: {
|
446
|
-
id: string;
|
447
|
-
};
|
448
|
-
} | {
|
449
|
-
id: string;
|
450
|
-
jsonrpc: "2.0";
|
451
|
-
method: "keyring_createAccount";
|
452
|
-
params: {
|
453
|
-
name: string;
|
454
|
-
options: Record<string, import("@metamask/utils").Json> | null;
|
455
|
-
};
|
456
|
-
} | {
|
457
|
-
id: string;
|
458
|
-
jsonrpc: "2.0";
|
459
|
-
method: "keyring_filterAccountChains";
|
460
|
-
params: {
|
461
|
-
id: string;
|
462
|
-
chains: string[];
|
463
|
-
};
|
464
|
-
} | {
|
465
|
-
id: string;
|
466
|
-
jsonrpc: "2.0";
|
467
|
-
method: "keyring_updateAccount";
|
468
|
-
params: {
|
469
|
-
account: {
|
470
|
-
id: string;
|
471
|
-
name: string;
|
472
|
-
address: string;
|
473
|
-
options: Record<string, import("@metamask/utils").Json> | null;
|
474
|
-
supportedMethods: ("personal_sign" | "eth_sendTransaction" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v2" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
475
|
-
type: "eip155:eoa" | "eip155:erc4337";
|
476
|
-
};
|
477
|
-
};
|
478
|
-
} | {
|
479
|
-
id: string;
|
480
|
-
jsonrpc: "2.0";
|
481
|
-
method: "keyring_deleteAccount";
|
482
|
-
params: {
|
483
|
-
id: string;
|
484
|
-
};
|
485
|
-
} | {
|
486
|
-
id: string;
|
487
|
-
jsonrpc: "2.0";
|
488
|
-
method: "keyring_listRequests";
|
489
|
-
} | {
|
490
|
-
id: string;
|
491
|
-
jsonrpc: "2.0";
|
492
|
-
method: "keyring_getRequest";
|
493
|
-
params: {
|
494
|
-
id: string;
|
495
|
-
};
|
496
|
-
} | {
|
497
|
-
id: string;
|
498
|
-
jsonrpc: "2.0";
|
499
|
-
method: "keyring_submitRequest";
|
500
|
-
params: {
|
501
|
-
account: string;
|
502
|
-
scope: string;
|
503
|
-
request: {
|
504
|
-
id: string;
|
505
|
-
jsonrpc: "2.0";
|
506
|
-
method: string;
|
507
|
-
} | {
|
508
|
-
id: string;
|
509
|
-
jsonrpc: "2.0";
|
510
|
-
method: string;
|
511
|
-
params: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
|
512
|
-
};
|
513
|
-
};
|
514
|
-
} | {
|
515
|
-
id: string;
|
516
|
-
jsonrpc: "2.0";
|
517
|
-
method: "keyring_approveRequest";
|
518
|
-
params: {
|
519
|
-
id: string;
|
520
|
-
};
|
521
|
-
} | {
|
522
|
-
id: string;
|
523
|
-
jsonrpc: "2.0";
|
524
|
-
method: "keyring_rejectRequest";
|
525
|
-
params: {
|
526
|
-
id: string;
|
527
|
-
};
|
528
|
-
}, null>;
|
529
|
-
export declare type InternalRequest = Infer<typeof InternalRequestStruct>;
|
530
|
-
export declare const InternalResponseStruct: import("superstruct").Struct<string[] | {
|
531
|
-
id: string;
|
532
|
-
name: string;
|
533
|
-
address: string;
|
534
|
-
options: Record<string, import("@metamask/utils").Json> | null;
|
535
|
-
supportedMethods: ("personal_sign" | "eth_sendTransaction" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v2" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
536
|
-
type: "eip155:eoa" | "eip155:erc4337";
|
537
|
-
} | {
|
538
|
-
account: string;
|
539
|
-
scope: string;
|
540
|
-
request: {
|
541
|
-
id: string;
|
542
|
-
jsonrpc: "2.0";
|
543
|
-
method: string;
|
544
|
-
} | {
|
545
|
-
id: string;
|
546
|
-
jsonrpc: "2.0";
|
547
|
-
method: string;
|
548
|
-
params: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
|
549
|
-
};
|
550
|
-
} | {
|
551
|
-
pending: true;
|
552
|
-
} | {
|
553
|
-
pending: false;
|
554
|
-
result: import("@metamask/utils").Json;
|
555
|
-
} | {
|
556
|
-
id: string;
|
557
|
-
name: string;
|
558
|
-
address: string;
|
559
|
-
options: Record<string, import("@metamask/utils").Json> | null;
|
560
|
-
supportedMethods: ("personal_sign" | "eth_sendTransaction" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData" | "eth_signTypedData_v1" | "eth_signTypedData_v2" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[];
|
561
|
-
type: "eip155:eoa" | "eip155:erc4337";
|
562
|
-
}[] | {
|
563
|
-
account: string;
|
564
|
-
scope: string;
|
565
|
-
request: {
|
566
|
-
id: string;
|
567
|
-
jsonrpc: "2.0";
|
568
|
-
method: string;
|
569
|
-
} | {
|
570
|
-
id: string;
|
571
|
-
jsonrpc: "2.0";
|
572
|
-
method: string;
|
573
|
-
params: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
|
574
|
-
};
|
575
|
-
}[] | null, null>;
|
576
|
-
export declare type InternalResponse = Infer<typeof InternalResponseStruct>;
|