@metamask/keyring-api 7.0.0 → 8.0.1
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 +22 -2
- package/dist/JsonRpcRequest.d.ts +6 -6
- package/dist/JsonRpcRequest.js +1 -1
- package/dist/JsonRpcRequest.js.map +1 -1
- package/dist/KeyringClient.js +1 -1
- package/dist/KeyringClient.js.map +1 -1
- package/dist/api/account.d.ts +9 -35
- package/dist/api/account.js +3 -29
- package/dist/api/account.js.map +1 -1
- package/dist/api/balance.d.ts +4 -4
- package/dist/api/balance.js +1 -1
- package/dist/api/balance.js.map +1 -1
- package/dist/api/caip.d.ts +3 -3
- package/dist/api/caip.js +1 -1
- package/dist/api/caip.js.map +1 -1
- package/dist/api/export.d.ts +2 -2
- package/dist/api/export.js +1 -1
- package/dist/api/export.js.map +1 -1
- package/dist/api/keyring.d.ts +1 -6
- package/dist/api/keyring.js.map +1 -1
- package/dist/api/request.d.ts +8 -8
- package/dist/api/request.js +1 -1
- package/dist/api/request.js.map +1 -1
- package/dist/api/response.d.ts +2 -2
- package/dist/api/response.js +1 -1
- package/dist/api/response.js.map +1 -1
- package/dist/btc/types.d.ts +8 -8
- package/dist/btc/types.js +1 -1
- package/dist/btc/types.js.map +1 -1
- package/dist/eth/erc4337/types.d.ts +33 -33
- package/dist/eth/erc4337/types.js.map +1 -1
- package/dist/eth/types.d.ts +16 -16
- package/dist/eth/types.js +1 -1
- package/dist/eth/types.js.map +1 -1
- package/dist/internal/api.d.ts +137 -137
- package/dist/internal/api.js +1 -1
- package/dist/internal/api.js.map +1 -1
- package/dist/internal/events.d.ts +39 -39
- package/dist/internal/events.js +1 -1
- package/dist/internal/events.js.map +1 -1
- package/dist/internal/types.d.ts +3 -3
- package/dist/internal/types.js +1 -1
- package/dist/internal/types.js.map +1 -1
- package/dist/rpc-handler.js +1 -4
- package/dist/rpc-handler.js.map +1 -1
- package/dist/superstruct.d.ts +2 -3
- package/dist/superstruct.js +1 -1
- package/dist/superstruct.js.map +1 -1
- package/dist/utils/types.d.ts +4 -4
- package/dist/utils/types.js +1 -1
- package/dist/utils/types.js.map +1 -1
- package/package.json +5 -5
package/dist/internal/api.d.ts
CHANGED
@@ -1,39 +1,39 @@
|
|
1
|
-
import type { Infer } from 'superstruct';
|
2
|
-
export declare const ListAccountsRequestStruct: import("superstruct").Struct<{
|
1
|
+
import type { Infer } from '@metamask/superstruct';
|
2
|
+
export declare const ListAccountsRequestStruct: import("@metamask/superstruct").Struct<{
|
3
3
|
jsonrpc: "2.0";
|
4
4
|
id: string | number | null;
|
5
5
|
method: "keyring_listAccounts";
|
6
6
|
}, {
|
7
|
-
method: import("superstruct").Struct<"keyring_listAccounts", "keyring_listAccounts">;
|
8
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
9
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
7
|
+
method: import("@metamask/superstruct").Struct<"keyring_listAccounts", "keyring_listAccounts">;
|
8
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
9
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
10
10
|
}>;
|
11
11
|
export declare type ListAccountsRequest = Infer<typeof ListAccountsRequestStruct>;
|
12
|
-
export declare const ListAccountsResponseStruct: import("superstruct").Struct<{
|
12
|
+
export declare const ListAccountsResponseStruct: import("@metamask/superstruct").Struct<{
|
13
13
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh";
|
14
14
|
id: string;
|
15
|
-
address: string
|
15
|
+
address: string;
|
16
16
|
options: Record<string, import("@metamask/utils").Json>;
|
17
17
|
methods: string[];
|
18
|
-
}[], import("superstruct").Struct<{
|
18
|
+
}[], import("@metamask/superstruct").Struct<{
|
19
19
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh";
|
20
20
|
id: string;
|
21
|
-
address: string
|
21
|
+
address: string;
|
22
22
|
options: Record<string, import("@metamask/utils").Json>;
|
23
23
|
methods: string[];
|
24
24
|
}, {
|
25
|
-
id: import("superstruct").Struct<string, null>;
|
26
|
-
type: import("superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh", {
|
25
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
26
|
+
type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh", {
|
27
27
|
"eip155:eoa": "eip155:eoa";
|
28
28
|
"eip155:erc4337": "eip155:erc4337";
|
29
29
|
"bip122:p2wpkh": "bip122:p2wpkh";
|
30
30
|
}>;
|
31
|
-
address: import("superstruct").Struct<string
|
32
|
-
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
33
|
-
methods: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>;
|
31
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
32
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
33
|
+
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
34
34
|
}>>;
|
35
35
|
export declare type ListAccountsResponse = Infer<typeof ListAccountsResponseStruct>;
|
36
|
-
export declare const GetAccountRequestStruct: import("superstruct").Struct<{
|
36
|
+
export declare const GetAccountRequestStruct: import("@metamask/superstruct").Struct<{
|
37
37
|
jsonrpc: "2.0";
|
38
38
|
id: string | number | null;
|
39
39
|
method: "keyring_getAccount";
|
@@ -41,35 +41,35 @@ export declare const GetAccountRequestStruct: import("superstruct").Struct<{
|
|
41
41
|
id: string;
|
42
42
|
};
|
43
43
|
}, {
|
44
|
-
method: import("superstruct").Struct<"keyring_getAccount", "keyring_getAccount">;
|
45
|
-
params: import("superstruct").Struct<{
|
44
|
+
method: import("@metamask/superstruct").Struct<"keyring_getAccount", "keyring_getAccount">;
|
45
|
+
params: import("@metamask/superstruct").Struct<{
|
46
46
|
id: string;
|
47
47
|
}, {
|
48
|
-
id: import("superstruct").Struct<string, null>;
|
48
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
49
49
|
}>;
|
50
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
51
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
50
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
51
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
52
52
|
}>;
|
53
53
|
export declare type GetAccountRequest = Infer<typeof GetAccountRequestStruct>;
|
54
|
-
export declare const GetAccountResponseStruct: import("superstruct").Struct<{
|
54
|
+
export declare const GetAccountResponseStruct: import("@metamask/superstruct").Struct<{
|
55
55
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh";
|
56
56
|
id: string;
|
57
|
-
address: string
|
57
|
+
address: string;
|
58
58
|
options: Record<string, import("@metamask/utils").Json>;
|
59
59
|
methods: string[];
|
60
60
|
}, {
|
61
|
-
id: import("superstruct").Struct<string, null>;
|
62
|
-
type: import("superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh", {
|
61
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
62
|
+
type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh", {
|
63
63
|
"eip155:eoa": "eip155:eoa";
|
64
64
|
"eip155:erc4337": "eip155:erc4337";
|
65
65
|
"bip122:p2wpkh": "bip122:p2wpkh";
|
66
66
|
}>;
|
67
|
-
address: import("superstruct").Struct<string
|
68
|
-
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
69
|
-
methods: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>;
|
67
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
68
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
69
|
+
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
70
70
|
}>;
|
71
71
|
export declare type GetAccountResponse = Infer<typeof GetAccountResponseStruct>;
|
72
|
-
export declare const CreateAccountRequestStruct: import("superstruct").Struct<{
|
72
|
+
export declare const CreateAccountRequestStruct: import("@metamask/superstruct").Struct<{
|
73
73
|
jsonrpc: "2.0";
|
74
74
|
id: string | number | null;
|
75
75
|
method: "keyring_createAccount";
|
@@ -77,35 +77,35 @@ export declare const CreateAccountRequestStruct: import("superstruct").Struct<{
|
|
77
77
|
options: Record<string, import("@metamask/utils").Json>;
|
78
78
|
};
|
79
79
|
}, {
|
80
|
-
method: import("superstruct").Struct<"keyring_createAccount", "keyring_createAccount">;
|
81
|
-
params: import("superstruct").Struct<{
|
80
|
+
method: import("@metamask/superstruct").Struct<"keyring_createAccount", "keyring_createAccount">;
|
81
|
+
params: import("@metamask/superstruct").Struct<{
|
82
82
|
options: Record<string, import("@metamask/utils").Json>;
|
83
83
|
}, {
|
84
|
-
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
84
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
85
85
|
}>;
|
86
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
87
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
86
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
87
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
88
88
|
}>;
|
89
89
|
export declare type CreateAccountRequest = Infer<typeof CreateAccountRequestStruct>;
|
90
|
-
export declare const CreateAccountResponseStruct: import("superstruct").Struct<{
|
90
|
+
export declare const CreateAccountResponseStruct: import("@metamask/superstruct").Struct<{
|
91
91
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh";
|
92
92
|
id: string;
|
93
|
-
address: string
|
93
|
+
address: string;
|
94
94
|
options: Record<string, import("@metamask/utils").Json>;
|
95
95
|
methods: string[];
|
96
96
|
}, {
|
97
|
-
id: import("superstruct").Struct<string, null>;
|
98
|
-
type: import("superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh", {
|
97
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
98
|
+
type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh", {
|
99
99
|
"eip155:eoa": "eip155:eoa";
|
100
100
|
"eip155:erc4337": "eip155:erc4337";
|
101
101
|
"bip122:p2wpkh": "bip122:p2wpkh";
|
102
102
|
}>;
|
103
|
-
address: import("superstruct").Struct<string
|
104
|
-
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
105
|
-
methods: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>;
|
103
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
104
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
105
|
+
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
106
106
|
}>;
|
107
107
|
export declare type CreateAccountResponse = Infer<typeof CreateAccountResponseStruct>;
|
108
|
-
export declare const GetAccountBalancesRequestStruct: import("superstruct").Struct<{
|
108
|
+
export declare const GetAccountBalancesRequestStruct: import("@metamask/superstruct").Struct<{
|
109
109
|
jsonrpc: "2.0";
|
110
110
|
id: string | number | null;
|
111
111
|
method: "keyring_getAccountBalances";
|
@@ -114,24 +114,24 @@ export declare const GetAccountBalancesRequestStruct: import("superstruct").Stru
|
|
114
114
|
assets: string[];
|
115
115
|
};
|
116
116
|
}, {
|
117
|
-
method: import("superstruct").Struct<"keyring_getAccountBalances", "keyring_getAccountBalances">;
|
118
|
-
params: import("superstruct").Struct<{
|
117
|
+
method: import("@metamask/superstruct").Struct<"keyring_getAccountBalances", "keyring_getAccountBalances">;
|
118
|
+
params: import("@metamask/superstruct").Struct<{
|
119
119
|
id: string;
|
120
120
|
assets: string[];
|
121
121
|
}, {
|
122
|
-
id: import("superstruct").Struct<string, null>;
|
123
|
-
assets: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>;
|
122
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
123
|
+
assets: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
124
124
|
}>;
|
125
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
126
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
125
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
126
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
127
127
|
}>;
|
128
128
|
export declare type GetAccountBalancesRequest = Infer<typeof GetAccountBalancesRequestStruct>;
|
129
|
-
export declare const GetAccountBalancesResponseStruct: import("superstruct").Struct<Record<string, {
|
129
|
+
export declare const GetAccountBalancesResponseStruct: import("@metamask/superstruct").Struct<Record<string, {
|
130
130
|
amount: string;
|
131
131
|
unit: string;
|
132
132
|
}>, null>;
|
133
133
|
export declare type GetAccountBalancesResponse = Infer<typeof GetAccountBalancesResponseStruct>;
|
134
|
-
export declare const FilterAccountChainsStruct: import("superstruct").Struct<{
|
134
|
+
export declare const FilterAccountChainsStruct: import("@metamask/superstruct").Struct<{
|
135
135
|
jsonrpc: "2.0";
|
136
136
|
id: string | number | null;
|
137
137
|
method: "keyring_filterAccountChains";
|
@@ -140,21 +140,21 @@ export declare const FilterAccountChainsStruct: import("superstruct").Struct<{
|
|
140
140
|
chains: string[];
|
141
141
|
};
|
142
142
|
}, {
|
143
|
-
method: import("superstruct").Struct<"keyring_filterAccountChains", "keyring_filterAccountChains">;
|
144
|
-
params: import("superstruct").Struct<{
|
143
|
+
method: import("@metamask/superstruct").Struct<"keyring_filterAccountChains", "keyring_filterAccountChains">;
|
144
|
+
params: import("@metamask/superstruct").Struct<{
|
145
145
|
id: string;
|
146
146
|
chains: string[];
|
147
147
|
}, {
|
148
|
-
id: import("superstruct").Struct<string, null>;
|
149
|
-
chains: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>;
|
148
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
149
|
+
chains: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
150
150
|
}>;
|
151
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
152
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
151
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
152
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
153
153
|
}>;
|
154
154
|
export declare type FilterAccountChainsRequest = Infer<typeof FilterAccountChainsStruct>;
|
155
|
-
export declare const FilterAccountChainsResponseStruct: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>;
|
155
|
+
export declare const FilterAccountChainsResponseStruct: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
156
156
|
export declare type FilterAccountChainsResponse = Infer<typeof FilterAccountChainsResponseStruct>;
|
157
|
-
export declare const UpdateAccountRequestStruct: import("superstruct").Struct<{
|
157
|
+
export declare const UpdateAccountRequestStruct: import("@metamask/superstruct").Struct<{
|
158
158
|
jsonrpc: "2.0";
|
159
159
|
id: string | number | null;
|
160
160
|
method: "keyring_updateAccount";
|
@@ -162,47 +162,47 @@ export declare const UpdateAccountRequestStruct: import("superstruct").Struct<{
|
|
162
162
|
account: {
|
163
163
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh";
|
164
164
|
id: string;
|
165
|
-
address: string
|
165
|
+
address: string;
|
166
166
|
options: Record<string, import("@metamask/utils").Json>;
|
167
167
|
methods: string[];
|
168
168
|
};
|
169
169
|
};
|
170
170
|
}, {
|
171
|
-
method: import("superstruct").Struct<"keyring_updateAccount", "keyring_updateAccount">;
|
172
|
-
params: import("superstruct").Struct<{
|
171
|
+
method: import("@metamask/superstruct").Struct<"keyring_updateAccount", "keyring_updateAccount">;
|
172
|
+
params: import("@metamask/superstruct").Struct<{
|
173
173
|
account: {
|
174
174
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh";
|
175
175
|
id: string;
|
176
|
-
address: string
|
176
|
+
address: string;
|
177
177
|
options: Record<string, import("@metamask/utils").Json>;
|
178
178
|
methods: string[];
|
179
179
|
};
|
180
180
|
}, {
|
181
|
-
account: import("superstruct").Struct<{
|
181
|
+
account: import("@metamask/superstruct").Struct<{
|
182
182
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh";
|
183
183
|
id: string;
|
184
|
-
address: string
|
184
|
+
address: string;
|
185
185
|
options: Record<string, import("@metamask/utils").Json>;
|
186
186
|
methods: string[];
|
187
187
|
}, {
|
188
|
-
id: import("superstruct").Struct<string, null>;
|
189
|
-
type: import("superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh", {
|
188
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
189
|
+
type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh", {
|
190
190
|
"eip155:eoa": "eip155:eoa";
|
191
191
|
"eip155:erc4337": "eip155:erc4337";
|
192
192
|
"bip122:p2wpkh": "bip122:p2wpkh";
|
193
193
|
}>;
|
194
|
-
address: import("superstruct").Struct<string
|
195
|
-
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
196
|
-
methods: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>;
|
194
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
195
|
+
options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
196
|
+
methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
197
197
|
}>;
|
198
198
|
}>;
|
199
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
200
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
199
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
200
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
201
201
|
}>;
|
202
202
|
export declare type UpdateAccountRequest = Infer<typeof UpdateAccountRequestStruct>;
|
203
|
-
export declare const UpdateAccountResponseStruct: import("superstruct").Struct<null, null>;
|
203
|
+
export declare const UpdateAccountResponseStruct: import("@metamask/superstruct").Struct<null, null>;
|
204
204
|
export declare type UpdateAccountResponse = Infer<typeof UpdateAccountResponseStruct>;
|
205
|
-
export declare const DeleteAccountRequestStruct: import("superstruct").Struct<{
|
205
|
+
export declare const DeleteAccountRequestStruct: import("@metamask/superstruct").Struct<{
|
206
206
|
jsonrpc: "2.0";
|
207
207
|
id: string | number | null;
|
208
208
|
method: "keyring_deleteAccount";
|
@@ -210,19 +210,19 @@ export declare const DeleteAccountRequestStruct: import("superstruct").Struct<{
|
|
210
210
|
id: string;
|
211
211
|
};
|
212
212
|
}, {
|
213
|
-
method: import("superstruct").Struct<"keyring_deleteAccount", "keyring_deleteAccount">;
|
214
|
-
params: import("superstruct").Struct<{
|
213
|
+
method: import("@metamask/superstruct").Struct<"keyring_deleteAccount", "keyring_deleteAccount">;
|
214
|
+
params: import("@metamask/superstruct").Struct<{
|
215
215
|
id: string;
|
216
216
|
}, {
|
217
|
-
id: import("superstruct").Struct<string, null>;
|
217
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
218
218
|
}>;
|
219
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
220
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
219
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
220
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
221
221
|
}>;
|
222
222
|
export declare type DeleteAccountRequest = Infer<typeof DeleteAccountRequestStruct>;
|
223
|
-
export declare const DeleteAccountResponseStruct: import("superstruct").Struct<null, null>;
|
223
|
+
export declare const DeleteAccountResponseStruct: import("@metamask/superstruct").Struct<null, null>;
|
224
224
|
export declare type DeleteAccountResponse = Infer<typeof DeleteAccountResponseStruct>;
|
225
|
-
export declare const ExportAccountRequestStruct: import("superstruct").Struct<{
|
225
|
+
export declare const ExportAccountRequestStruct: import("@metamask/superstruct").Struct<{
|
226
226
|
jsonrpc: "2.0";
|
227
227
|
id: string | number | null;
|
228
228
|
method: "keyring_exportAccount";
|
@@ -230,29 +230,29 @@ export declare const ExportAccountRequestStruct: import("superstruct").Struct<{
|
|
230
230
|
id: string;
|
231
231
|
};
|
232
232
|
}, {
|
233
|
-
method: import("superstruct").Struct<"keyring_exportAccount", "keyring_exportAccount">;
|
234
|
-
params: import("superstruct").Struct<{
|
233
|
+
method: import("@metamask/superstruct").Struct<"keyring_exportAccount", "keyring_exportAccount">;
|
234
|
+
params: import("@metamask/superstruct").Struct<{
|
235
235
|
id: string;
|
236
236
|
}, {
|
237
|
-
id: import("superstruct").Struct<string, null>;
|
237
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
238
238
|
}>;
|
239
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
240
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
239
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
240
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
241
241
|
}>;
|
242
242
|
export declare type ExportAccountRequest = Infer<typeof ExportAccountRequestStruct>;
|
243
|
-
export declare const ExportAccountResponseStruct: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
243
|
+
export declare const ExportAccountResponseStruct: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
244
244
|
export declare type ExportAccountResponse = Infer<typeof ExportAccountResponseStruct>;
|
245
|
-
export declare const ListRequestsRequestStruct: import("superstruct").Struct<{
|
245
|
+
export declare const ListRequestsRequestStruct: import("@metamask/superstruct").Struct<{
|
246
246
|
jsonrpc: "2.0";
|
247
247
|
id: string | number | null;
|
248
248
|
method: "keyring_listRequests";
|
249
249
|
}, {
|
250
|
-
method: import("superstruct").Struct<"keyring_listRequests", "keyring_listRequests">;
|
251
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
252
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
250
|
+
method: import("@metamask/superstruct").Struct<"keyring_listRequests", "keyring_listRequests">;
|
251
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
252
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
253
253
|
}>;
|
254
254
|
export declare type ListRequestsRequest = Infer<typeof ListRequestsRequestStruct>;
|
255
|
-
export declare const ListRequestsResponseStruct: import("superstruct").Struct<{
|
255
|
+
export declare const ListRequestsResponseStruct: import("@metamask/superstruct").Struct<{
|
256
256
|
id: string;
|
257
257
|
scope: string;
|
258
258
|
account: string;
|
@@ -260,7 +260,7 @@ export declare const ListRequestsResponseStruct: import("superstruct").Struct<{
|
|
260
260
|
method: string;
|
261
261
|
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
262
262
|
};
|
263
|
-
}[], import("superstruct").Struct<{
|
263
|
+
}[], import("@metamask/superstruct").Struct<{
|
264
264
|
id: string;
|
265
265
|
scope: string;
|
266
266
|
account: string;
|
@@ -269,19 +269,19 @@ export declare const ListRequestsResponseStruct: import("superstruct").Struct<{
|
|
269
269
|
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
270
270
|
};
|
271
271
|
}, {
|
272
|
-
id: import("superstruct").Struct<string, null>;
|
273
|
-
scope: import("superstruct").Struct<string, null>;
|
274
|
-
account: import("superstruct").Struct<string, null>;
|
275
|
-
request: import("superstruct").Struct<{
|
272
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
273
|
+
scope: import("@metamask/superstruct").Struct<string, null>;
|
274
|
+
account: import("@metamask/superstruct").Struct<string, null>;
|
275
|
+
request: import("@metamask/superstruct").Struct<{
|
276
276
|
method: string;
|
277
277
|
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
278
278
|
}, {
|
279
|
-
method: import("superstruct").Struct<string, null>;
|
280
|
-
params: import("superstruct").Struct<import("../superstruct").ExactOptionalTag | import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>, null>;
|
279
|
+
method: import("@metamask/superstruct").Struct<string, null>;
|
280
|
+
params: import("@metamask/superstruct").Struct<import("../superstruct").ExactOptionalTag | import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>, null>;
|
281
281
|
}>;
|
282
282
|
}>>;
|
283
283
|
export declare type ListRequestsResponse = Infer<typeof ListRequestsResponseStruct>;
|
284
|
-
export declare const GetRequestRequestStruct: import("superstruct").Struct<{
|
284
|
+
export declare const GetRequestRequestStruct: import("@metamask/superstruct").Struct<{
|
285
285
|
jsonrpc: "2.0";
|
286
286
|
id: string | number | null;
|
287
287
|
method: "keyring_getRequest";
|
@@ -289,17 +289,17 @@ export declare const GetRequestRequestStruct: import("superstruct").Struct<{
|
|
289
289
|
id: string;
|
290
290
|
};
|
291
291
|
}, {
|
292
|
-
method: import("superstruct").Struct<"keyring_getRequest", "keyring_getRequest">;
|
293
|
-
params: import("superstruct").Struct<{
|
292
|
+
method: import("@metamask/superstruct").Struct<"keyring_getRequest", "keyring_getRequest">;
|
293
|
+
params: import("@metamask/superstruct").Struct<{
|
294
294
|
id: string;
|
295
295
|
}, {
|
296
|
-
id: import("superstruct").Struct<string, null>;
|
296
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
297
297
|
}>;
|
298
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
299
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
298
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
299
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
300
300
|
}>;
|
301
301
|
export declare type GetRequestRequest = Infer<typeof GetRequestRequestStruct>;
|
302
|
-
export declare const GetRequestResponseStruct: import("superstruct").Struct<{
|
302
|
+
export declare const GetRequestResponseStruct: import("@metamask/superstruct").Struct<{
|
303
303
|
id: string;
|
304
304
|
scope: string;
|
305
305
|
account: string;
|
@@ -308,19 +308,19 @@ export declare const GetRequestResponseStruct: import("superstruct").Struct<{
|
|
308
308
|
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
309
309
|
};
|
310
310
|
}, {
|
311
|
-
id: import("superstruct").Struct<string, null>;
|
312
|
-
scope: import("superstruct").Struct<string, null>;
|
313
|
-
account: import("superstruct").Struct<string, null>;
|
314
|
-
request: import("superstruct").Struct<{
|
311
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
312
|
+
scope: import("@metamask/superstruct").Struct<string, null>;
|
313
|
+
account: import("@metamask/superstruct").Struct<string, null>;
|
314
|
+
request: import("@metamask/superstruct").Struct<{
|
315
315
|
method: string;
|
316
316
|
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
317
317
|
}, {
|
318
|
-
method: import("superstruct").Struct<string, null>;
|
319
|
-
params: import("superstruct").Struct<import("../superstruct").ExactOptionalTag | import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>, null>;
|
318
|
+
method: import("@metamask/superstruct").Struct<string, null>;
|
319
|
+
params: import("@metamask/superstruct").Struct<import("../superstruct").ExactOptionalTag | import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>, null>;
|
320
320
|
}>;
|
321
321
|
}>;
|
322
322
|
export declare type GetRequestResponse = Infer<typeof GetRequestResponseStruct>;
|
323
|
-
export declare const SubmitRequestRequestStruct: import("superstruct").Struct<{
|
323
|
+
export declare const SubmitRequestRequestStruct: import("@metamask/superstruct").Struct<{
|
324
324
|
jsonrpc: "2.0";
|
325
325
|
id: string | number | null;
|
326
326
|
method: "keyring_submitRequest";
|
@@ -334,8 +334,8 @@ export declare const SubmitRequestRequestStruct: import("superstruct").Struct<{
|
|
334
334
|
};
|
335
335
|
};
|
336
336
|
}, {
|
337
|
-
method: import("superstruct").Struct<"keyring_submitRequest", "keyring_submitRequest">;
|
338
|
-
params: import("superstruct").Struct<{
|
337
|
+
method: import("@metamask/superstruct").Struct<"keyring_submitRequest", "keyring_submitRequest">;
|
338
|
+
params: import("@metamask/superstruct").Struct<{
|
339
339
|
id: string;
|
340
340
|
scope: string;
|
341
341
|
account: string;
|
@@ -344,22 +344,22 @@ export declare const SubmitRequestRequestStruct: import("superstruct").Struct<{
|
|
344
344
|
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
345
345
|
};
|
346
346
|
}, {
|
347
|
-
id: import("superstruct").Struct<string, null>;
|
348
|
-
scope: import("superstruct").Struct<string, null>;
|
349
|
-
account: import("superstruct").Struct<string, null>;
|
350
|
-
request: import("superstruct").Struct<{
|
347
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
348
|
+
scope: import("@metamask/superstruct").Struct<string, null>;
|
349
|
+
account: import("@metamask/superstruct").Struct<string, null>;
|
350
|
+
request: import("@metamask/superstruct").Struct<{
|
351
351
|
method: string;
|
352
352
|
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
353
353
|
}, {
|
354
|
-
method: import("superstruct").Struct<string, null>;
|
355
|
-
params: import("superstruct").Struct<import("../superstruct").ExactOptionalTag | import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>, null>;
|
354
|
+
method: import("@metamask/superstruct").Struct<string, null>;
|
355
|
+
params: import("@metamask/superstruct").Struct<import("../superstruct").ExactOptionalTag | import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>, null>;
|
356
356
|
}>;
|
357
357
|
}>;
|
358
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
359
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
358
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
359
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
360
360
|
}>;
|
361
361
|
export declare type SubmitRequestRequest = Infer<typeof SubmitRequestRequestStruct>;
|
362
|
-
export declare const SubmitRequestResponseStruct: import("superstruct").Struct<{
|
362
|
+
export declare const SubmitRequestResponseStruct: import("@metamask/superstruct").Struct<{
|
363
363
|
pending: true;
|
364
364
|
redirect?: {
|
365
365
|
message?: string;
|
@@ -370,7 +370,7 @@ export declare const SubmitRequestResponseStruct: import("superstruct").Struct<{
|
|
370
370
|
result: import("@metamask/utils").Json;
|
371
371
|
}, null>;
|
372
372
|
export declare type SubmitRequestResponse = Infer<typeof SubmitRequestResponseStruct>;
|
373
|
-
export declare const ApproveRequestRequestStruct: import("superstruct").Struct<{
|
373
|
+
export declare const ApproveRequestRequestStruct: import("@metamask/superstruct").Struct<{
|
374
374
|
jsonrpc: "2.0";
|
375
375
|
id: string | number | null;
|
376
376
|
method: "keyring_approveRequest";
|
@@ -379,21 +379,21 @@ export declare const ApproveRequestRequestStruct: import("superstruct").Struct<{
|
|
379
379
|
data: Record<string, import("@metamask/utils").Json>;
|
380
380
|
};
|
381
381
|
}, {
|
382
|
-
method: import("superstruct").Struct<"keyring_approveRequest", "keyring_approveRequest">;
|
383
|
-
params: import("superstruct").Struct<{
|
382
|
+
method: import("@metamask/superstruct").Struct<"keyring_approveRequest", "keyring_approveRequest">;
|
383
|
+
params: import("@metamask/superstruct").Struct<{
|
384
384
|
id: string;
|
385
385
|
data: Record<string, import("@metamask/utils").Json>;
|
386
386
|
}, {
|
387
|
-
id: import("superstruct").Struct<string, null>;
|
388
|
-
data: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
387
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
388
|
+
data: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
389
389
|
}>;
|
390
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
391
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
390
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
391
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
392
392
|
}>;
|
393
393
|
export declare type ApproveRequestRequest = Infer<typeof ApproveRequestRequestStruct>;
|
394
|
-
export declare const ApproveRequestResponseStruct: import("superstruct").Struct<null, null>;
|
394
|
+
export declare const ApproveRequestResponseStruct: import("@metamask/superstruct").Struct<null, null>;
|
395
395
|
export declare type ApproveRequestResponse = Infer<typeof ApproveRequestResponseStruct>;
|
396
|
-
export declare const RejectRequestRequestStruct: import("superstruct").Struct<{
|
396
|
+
export declare const RejectRequestRequestStruct: import("@metamask/superstruct").Struct<{
|
397
397
|
jsonrpc: "2.0";
|
398
398
|
id: string | number | null;
|
399
399
|
method: "keyring_rejectRequest";
|
@@ -401,15 +401,15 @@ export declare const RejectRequestRequestStruct: import("superstruct").Struct<{
|
|
401
401
|
id: string;
|
402
402
|
};
|
403
403
|
}, {
|
404
|
-
method: import("superstruct").Struct<"keyring_rejectRequest", "keyring_rejectRequest">;
|
405
|
-
params: import("superstruct").Struct<{
|
404
|
+
method: import("@metamask/superstruct").Struct<"keyring_rejectRequest", "keyring_rejectRequest">;
|
405
|
+
params: import("@metamask/superstruct").Struct<{
|
406
406
|
id: string;
|
407
407
|
}, {
|
408
|
-
id: import("superstruct").Struct<string, null>;
|
408
|
+
id: import("@metamask/superstruct").Struct<string, null>;
|
409
409
|
}>;
|
410
|
-
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
411
|
-
id: import("superstruct").Struct<string | number | null, null>;
|
410
|
+
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
411
|
+
id: import("@metamask/superstruct").Struct<string | number | null, null>;
|
412
412
|
}>;
|
413
413
|
export declare type RejectRequestRequest = Infer<typeof RejectRequestRequestStruct>;
|
414
|
-
export declare const RejectRequestResponseStruct: import("superstruct").Struct<null, null>;
|
414
|
+
export declare const RejectRequestResponseStruct: import("@metamask/superstruct").Struct<null, null>;
|
415
415
|
export declare type RejectRequestResponse = Infer<typeof RejectRequestResponseStruct>;
|
package/dist/internal/api.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.RejectRequestResponseStruct = exports.RejectRequestRequestStruct = exports.ApproveRequestResponseStruct = exports.ApproveRequestRequestStruct = exports.SubmitRequestResponseStruct = exports.SubmitRequestRequestStruct = exports.GetRequestResponseStruct = exports.GetRequestRequestStruct = exports.ListRequestsResponseStruct = exports.ListRequestsRequestStruct = exports.ExportAccountResponseStruct = exports.ExportAccountRequestStruct = exports.DeleteAccountResponseStruct = exports.DeleteAccountRequestStruct = exports.UpdateAccountResponseStruct = exports.UpdateAccountRequestStruct = exports.FilterAccountChainsResponseStruct = exports.FilterAccountChainsStruct = exports.GetAccountBalancesResponseStruct = exports.GetAccountBalancesRequestStruct = exports.CreateAccountResponseStruct = exports.CreateAccountRequestStruct = exports.GetAccountResponseStruct = exports.GetAccountRequestStruct = exports.ListAccountsResponseStruct = exports.ListAccountsRequestStruct = void 0;
|
4
|
+
const superstruct_1 = require("@metamask/superstruct");
|
4
5
|
const utils_1 = require("@metamask/utils");
|
5
|
-
const superstruct_1 = require("superstruct");
|
6
6
|
const api_1 = require("../api");
|
7
7
|
const superstruct_2 = require("../superstruct");
|
8
8
|
const utils_2 = require("../utils");
|
package/dist/internal/api.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/internal/api.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAE7C,6CAA4E;AAE5E,gCAOgB;AAChB,gDAAwC;AACxC,oCAAsC;AACtC,+BAAyC;AAEzC,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,IAAA,qBAAO,EAAC,KAAK,CAAC;IACvB,EAAE,EAAE,IAAA,mBAAK,EAAC,CAAC,IAAA,oBAAM,GAAE,EAAE,IAAA,oBAAM,GAAE,EAAE,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAC,CAAC;CAC/C,CAAC;AAEF,+EAA+E;AAC/E,gBAAgB;AAEH,QAAA,yBAAyB,GAAG,IAAA,oBAAM,EAAC;IAC9C,GAAG,YAAY;IACf,MAAM,EAAE,IAAA,qBAA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AAC,CAAC;AAIU,QAAA,2BAA2B,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAC","sourcesContent":["import { JsonStruct } from '@metamask/utils';\nimport type { Infer } from 'superstruct';\nimport { array, literal, number, record, string, union } from 'superstruct';\n\nimport {\n BalanceStruct,\n CaipAssetTypeStruct,\n KeyringAccountDataStruct,\n KeyringAccountStruct,\n KeyringRequestStruct,\n KeyringResponseStruct,\n} from '../api';\nimport { object } from '../superstruct';\nimport { UuidStruct } from '../utils';\nimport { KeyringRpcMethod } from './rpc';\n\nconst CommonHeader = {\n jsonrpc: literal('2.0'),\n id: union([string(), number(), literal(null)]),\n};\n\n// ----------------------------------------------------------------------------\n// List accounts\n\nexport const ListAccountsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccounts'),\n});\n\nexport type ListAccountsRequest = Infer<typeof ListAccountsRequestStruct>;\n\nexport const ListAccountsResponseStruct = array(KeyringAccountStruct);\n\nexport type ListAccountsResponse = Infer<typeof ListAccountsResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get account\n\nexport const GetAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_getAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type GetAccountRequest = Infer<typeof GetAccountRequestStruct>;\n\nexport const GetAccountResponseStruct = KeyringAccountStruct;\n\nexport type GetAccountResponse = Infer<typeof GetAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Create account\n\nexport const CreateAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_createAccount'),\n params: object({\n options: record(string(), JsonStruct),\n }),\n});\n\nexport type CreateAccountRequest = Infer<typeof CreateAccountRequestStruct>;\n\nexport const CreateAccountResponseStruct = KeyringAccountStruct;\n\nexport type CreateAccountResponse = Infer<typeof CreateAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get account balances\n\nexport const GetAccountBalancesRequestStruct = object({\n ...CommonHeader,\n method: literal(`${KeyringRpcMethod.GetAccountBalances}`),\n params: object({\n id: UuidStruct,\n assets: array(CaipAssetTypeStruct),\n }),\n});\n\nexport type GetAccountBalancesRequest = Infer<\n typeof GetAccountBalancesRequestStruct\n>;\n\nexport const GetAccountBalancesResponseStruct = record(\n CaipAssetTypeStruct,\n BalanceStruct,\n);\n\nexport type GetAccountBalancesResponse = Infer<\n typeof GetAccountBalancesResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Filter account chains\n\nexport const FilterAccountChainsStruct = object({\n ...CommonHeader,\n method: literal('keyring_filterAccountChains'),\n params: object({\n id: UuidStruct,\n chains: array(string()),\n }),\n});\n\nexport type FilterAccountChainsRequest = Infer<\n typeof FilterAccountChainsStruct\n>;\n\nexport const FilterAccountChainsResponseStruct = array(string());\n\nexport type FilterAccountChainsResponse = Infer<\n typeof FilterAccountChainsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Update account\n\nexport const UpdateAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_updateAccount'),\n params: object({\n account: KeyringAccountStruct,\n }),\n});\n\nexport type UpdateAccountRequest = Infer<typeof UpdateAccountRequestStruct>;\n\nexport const UpdateAccountResponseStruct = literal(null);\n\nexport type UpdateAccountResponse = Infer<typeof UpdateAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Delete account\n\nexport const DeleteAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_deleteAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type DeleteAccountRequest = Infer<typeof DeleteAccountRequestStruct>;\n\nexport const DeleteAccountResponseStruct = literal(null);\n\nexport type DeleteAccountResponse = Infer<typeof DeleteAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Export account\n\nexport const ExportAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_exportAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type ExportAccountRequest = Infer<typeof ExportAccountRequestStruct>;\n\nexport const ExportAccountResponseStruct = KeyringAccountDataStruct;\n\nexport type ExportAccountResponse = Infer<typeof ExportAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// List requests\n\nexport const ListRequestsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listRequests'),\n});\n\nexport type ListRequestsRequest = Infer<typeof ListRequestsRequestStruct>;\n\nexport const ListRequestsResponseStruct = array(KeyringRequestStruct);\n\nexport type ListRequestsResponse = Infer<typeof ListRequestsResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get request\n\nexport const GetRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_getRequest'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type GetRequestRequest = Infer<typeof GetRequestRequestStruct>;\n\nexport const GetRequestResponseStruct = KeyringRequestStruct;\n\nexport type GetRequestResponse = Infer<typeof GetRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Submit request\n\nexport const SubmitRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_submitRequest'),\n params: KeyringRequestStruct,\n});\n\nexport type SubmitRequestRequest = Infer<typeof SubmitRequestRequestStruct>;\n\nexport const SubmitRequestResponseStruct = KeyringResponseStruct;\n\nexport type SubmitRequestResponse = Infer<typeof SubmitRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Approve request\n\nexport const ApproveRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_approveRequest'),\n params: object({\n id: UuidStruct,\n data: record(string(), JsonStruct),\n }),\n});\n\nexport type ApproveRequestRequest = Infer<typeof ApproveRequestRequestStruct>;\n\nexport const ApproveRequestResponseStruct = literal(null);\n\nexport type ApproveRequestResponse = Infer<typeof ApproveRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Reject request\n\nexport const RejectRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_rejectRequest'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type RejectRequestRequest = Infer<typeof RejectRequestRequestStruct>;\n\nexport const RejectRequestResponseStruct = literal(null);\n\nexport type RejectRequestResponse = Infer<typeof RejectRequestResponseStruct>;\n"]}
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/internal/api.ts"],"names":[],"mappings":";;;AACA,uDAO+B;AAC/B,2CAA6C;AAE7C,gCAOgB;AAChB,gDAAwC;AACxC,oCAAsC;AACtC,+BAAyC;AAEzC,MAAM,YAAY,GAAG;IACnB,OAAO,EAAE,IAAA,qBAAO,EAAC,KAAK,CAAC;IACvB,EAAE,EAAE,IAAA,mBAAK,EAAC,CAAC,IAAA,oBAAM,GAAE,EAAE,IAAA,oBAAM,GAAE,EAAE,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAC,CAAC;CAC/C,CAAC;AAEF,+EAA+E;AAC/E,gBAAgB;AAEH,QAAA,yBAAyB,GAAG,IAAA,oBAAM,EAAC;IAC9C,GAAG,YAAY;IACf,MAAM,EAAE,IAAA,qBAAO,EAAC,sBAAsB,CAAC;CACxC,CAAC,CAAC;AAIU,QAAA,0BAA0B,GAAG,IAAA,mBAAK,EAAC,0BAAoB,CAAC,CAAC;AAItE,+EAA+E;AAC/E,cAAc;AAED,QAAA,uBAAuB,GAAG,IAAA,oBAAM,EAAC;IAC5C,GAAG,YAAY;IACf,MAAM,EAAE,IAAA,qBAAO,EAAC,oBAAoB,CAAC;IACrC,MAAM,EAAE,IAAA,oBAAM,EAAC;QACb,EAAE,EAAE,kBAAU;KACf,CAAC;CACH,CAAC,CAAC;AAIU,QAAA,wBAAwB,GAAG,0BAAoB,CAAC;AAI7D,+EAA+E;AAC/E,iBAAiB;AAEJ,QAAA,0BAA0B,GAAG,IAAA,oBAAM,EAAC;IAC/C,GAAG,YAAY;IACf,MAAM,EAAE,IAAA,qBAAO,EAAC,uBAAuB,CAAC;IACxC,MAAM,EAAE,IAAA,oBAAM,EAAC;QACb,OAAO,EAAE,IAAA,oBAAM,EAAC,IAAA,oBAAM,GAAE,EAAE,kBAAU,CAAC;KACtC,CAAC;CACH,CAAC,CAAC;AAIU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A,2BAA2B,GAAG,IAAA,oBAAM,EAAC;IAChD,GAAG,YAAY;IACf,MAAM,EAAE,IAAA,qBAAO,EAAC,wBAAwB,CAAC;IACzC,MAAM,EAAE,IAAA,oBAAM,EAAC;QACb,EAAE,EAAE,kBAAU;QACd,IAAI,EAAE,IAAA,oBAAM,EAAC,IAAA,oBAAM,GAAE,EAAE,kBAAU,CAAC;KACnC,CAAC;CACH,CAAC,CAAC;AAIU,QAAA,4BAA4B,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAC;AAI1D,+EAA+E;AAC/E,iBAAiB;AAEJ,QAAA,0BAA0B,GAAG,IAAA,oBAAM,EAAC;IAC/C,GAAG,YAAY;IACf,MAAM,EAAE,IAAA,qBAAO,EAAC,uBAAuB,CAAC;IACxC,MAAM,EAAE,IAAA,oBAAM,EAAC;QACb,EAAE,EAAE,kBAAU;KACf,CAAC;CACH,CAAC,CAAC;AAIU,QAAA,2BAA2B,GAAG,IAAA,qBAAO,EAAC,IAAI,CAAC,CAAC","sourcesContent":["import type { Infer } from '@metamask/superstruct';\nimport {\n array,\n literal,\n number,\n record,\n string,\n union,\n} from '@metamask/superstruct';\nimport { JsonStruct } from '@metamask/utils';\n\nimport {\n BalanceStruct,\n CaipAssetTypeStruct,\n KeyringAccountDataStruct,\n KeyringAccountStruct,\n KeyringRequestStruct,\n KeyringResponseStruct,\n} from '../api';\nimport { object } from '../superstruct';\nimport { UuidStruct } from '../utils';\nimport { KeyringRpcMethod } from './rpc';\n\nconst CommonHeader = {\n jsonrpc: literal('2.0'),\n id: union([string(), number(), literal(null)]),\n};\n\n// ----------------------------------------------------------------------------\n// List accounts\n\nexport const ListAccountsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listAccounts'),\n});\n\nexport type ListAccountsRequest = Infer<typeof ListAccountsRequestStruct>;\n\nexport const ListAccountsResponseStruct = array(KeyringAccountStruct);\n\nexport type ListAccountsResponse = Infer<typeof ListAccountsResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get account\n\nexport const GetAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_getAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type GetAccountRequest = Infer<typeof GetAccountRequestStruct>;\n\nexport const GetAccountResponseStruct = KeyringAccountStruct;\n\nexport type GetAccountResponse = Infer<typeof GetAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Create account\n\nexport const CreateAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_createAccount'),\n params: object({\n options: record(string(), JsonStruct),\n }),\n});\n\nexport type CreateAccountRequest = Infer<typeof CreateAccountRequestStruct>;\n\nexport const CreateAccountResponseStruct = KeyringAccountStruct;\n\nexport type CreateAccountResponse = Infer<typeof CreateAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get account balances\n\nexport const GetAccountBalancesRequestStruct = object({\n ...CommonHeader,\n method: literal(`${KeyringRpcMethod.GetAccountBalances}`),\n params: object({\n id: UuidStruct,\n assets: array(CaipAssetTypeStruct),\n }),\n});\n\nexport type GetAccountBalancesRequest = Infer<\n typeof GetAccountBalancesRequestStruct\n>;\n\nexport const GetAccountBalancesResponseStruct = record(\n CaipAssetTypeStruct,\n BalanceStruct,\n);\n\nexport type GetAccountBalancesResponse = Infer<\n typeof GetAccountBalancesResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Filter account chains\n\nexport const FilterAccountChainsStruct = object({\n ...CommonHeader,\n method: literal('keyring_filterAccountChains'),\n params: object({\n id: UuidStruct,\n chains: array(string()),\n }),\n});\n\nexport type FilterAccountChainsRequest = Infer<\n typeof FilterAccountChainsStruct\n>;\n\nexport const FilterAccountChainsResponseStruct = array(string());\n\nexport type FilterAccountChainsResponse = Infer<\n typeof FilterAccountChainsResponseStruct\n>;\n\n// ----------------------------------------------------------------------------\n// Update account\n\nexport const UpdateAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_updateAccount'),\n params: object({\n account: KeyringAccountStruct,\n }),\n});\n\nexport type UpdateAccountRequest = Infer<typeof UpdateAccountRequestStruct>;\n\nexport const UpdateAccountResponseStruct = literal(null);\n\nexport type UpdateAccountResponse = Infer<typeof UpdateAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Delete account\n\nexport const DeleteAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_deleteAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type DeleteAccountRequest = Infer<typeof DeleteAccountRequestStruct>;\n\nexport const DeleteAccountResponseStruct = literal(null);\n\nexport type DeleteAccountResponse = Infer<typeof DeleteAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Export account\n\nexport const ExportAccountRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_exportAccount'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type ExportAccountRequest = Infer<typeof ExportAccountRequestStruct>;\n\nexport const ExportAccountResponseStruct = KeyringAccountDataStruct;\n\nexport type ExportAccountResponse = Infer<typeof ExportAccountResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// List requests\n\nexport const ListRequestsRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_listRequests'),\n});\n\nexport type ListRequestsRequest = Infer<typeof ListRequestsRequestStruct>;\n\nexport const ListRequestsResponseStruct = array(KeyringRequestStruct);\n\nexport type ListRequestsResponse = Infer<typeof ListRequestsResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Get request\n\nexport const GetRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_getRequest'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type GetRequestRequest = Infer<typeof GetRequestRequestStruct>;\n\nexport const GetRequestResponseStruct = KeyringRequestStruct;\n\nexport type GetRequestResponse = Infer<typeof GetRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Submit request\n\nexport const SubmitRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_submitRequest'),\n params: KeyringRequestStruct,\n});\n\nexport type SubmitRequestRequest = Infer<typeof SubmitRequestRequestStruct>;\n\nexport const SubmitRequestResponseStruct = KeyringResponseStruct;\n\nexport type SubmitRequestResponse = Infer<typeof SubmitRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Approve request\n\nexport const ApproveRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_approveRequest'),\n params: object({\n id: UuidStruct,\n data: record(string(), JsonStruct),\n }),\n});\n\nexport type ApproveRequestRequest = Infer<typeof ApproveRequestRequestStruct>;\n\nexport const ApproveRequestResponseStruct = literal(null);\n\nexport type ApproveRequestResponse = Infer<typeof ApproveRequestResponseStruct>;\n\n// ----------------------------------------------------------------------------\n// Reject request\n\nexport const RejectRequestRequestStruct = object({\n ...CommonHeader,\n method: literal('keyring_rejectRequest'),\n params: object({\n id: UuidStruct,\n }),\n});\n\nexport type RejectRequestRequest = Infer<typeof RejectRequestRequestStruct>;\n\nexport const RejectRequestResponseStruct = literal(null);\n\nexport type RejectRequestResponse = Infer<typeof RejectRequestResponseStruct>;\n"]}
|