@metamask-previews/keyring-api 11.1.0-5143ee2 → 11.1.0-dde1dbb
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/dist/JsonRpcRequest.cjs +13 -0
- package/dist/JsonRpcRequest.cjs.map +1 -0
- package/dist/JsonRpcRequest.d.cts +17 -0
- package/dist/JsonRpcRequest.d.cts.map +1 -0
- package/dist/JsonRpcRequest.d.mts +17 -0
- package/dist/JsonRpcRequest.d.mts.map +1 -0
- package/dist/JsonRpcRequest.mjs +10 -0
- package/dist/JsonRpcRequest.mjs.map +1 -0
- package/dist/KeyringClient.cjs +130 -0
- package/dist/KeyringClient.cjs.map +1 -0
- package/dist/KeyringClient.d.cts +31 -0
- package/dist/KeyringClient.d.cts.map +1 -0
- package/dist/KeyringClient.d.mts +31 -0
- package/dist/KeyringClient.d.mts.map +1 -0
- package/dist/KeyringClient.mjs +126 -0
- package/dist/KeyringClient.mjs.map +1 -0
- package/dist/KeyringSnapRpcClient.cjs +68 -0
- package/dist/KeyringSnapRpcClient.cjs.map +1 -0
- package/dist/KeyringSnapRpcClient.d.cts +40 -0
- package/dist/KeyringSnapRpcClient.d.cts.map +1 -0
- package/dist/KeyringSnapRpcClient.d.mts +40 -0
- package/dist/KeyringSnapRpcClient.d.mts.map +1 -0
- package/dist/KeyringSnapRpcClient.mjs +63 -0
- package/dist/KeyringSnapRpcClient.mjs.map +1 -0
- package/dist/api/account.cjs +4 -3
- package/dist/api/account.cjs.map +1 -1
- package/dist/api/account.d.cts +1 -1
- package/dist/api/account.d.cts.map +1 -1
- package/dist/api/account.d.mts +1 -1
- package/dist/api/account.d.mts.map +1 -1
- package/dist/api/account.mjs +2 -1
- package/dist/api/account.mjs.map +1 -1
- package/dist/api/asset.cjs +6 -5
- package/dist/api/asset.cjs.map +1 -1
- package/dist/api/asset.d.cts +2 -2
- package/dist/api/asset.d.cts.map +1 -1
- package/dist/api/asset.d.mts +2 -2
- package/dist/api/asset.d.mts.map +1 -1
- package/dist/api/asset.mjs +2 -1
- package/dist/api/asset.mjs.map +1 -1
- package/dist/api/balance.cjs +4 -3
- package/dist/api/balance.cjs.map +1 -1
- package/dist/api/balance.d.cts.map +1 -1
- package/dist/api/balance.d.mts.map +1 -1
- package/dist/api/balance.mjs +2 -1
- package/dist/api/balance.mjs.map +1 -1
- package/dist/api/caip.cjs +3 -3
- package/dist/api/caip.cjs.map +1 -1
- package/dist/api/caip.d.cts.map +1 -1
- package/dist/api/caip.d.mts.map +1 -1
- package/dist/api/caip.mjs +1 -1
- package/dist/api/caip.mjs.map +1 -1
- package/dist/api/index.cjs +0 -1
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.cts +0 -1
- package/dist/api/index.d.cts.map +1 -1
- package/dist/api/index.d.mts +0 -1
- package/dist/api/index.d.mts.map +1 -1
- package/dist/api/index.mjs +0 -1
- package/dist/api/index.mjs.map +1 -1
- package/dist/api/keyring.cjs +0 -2
- package/dist/api/keyring.cjs.map +1 -1
- package/dist/api/keyring.d.cts +1 -1
- package/dist/api/keyring.d.cts.map +1 -1
- package/dist/api/keyring.d.mts +1 -1
- package/dist/api/keyring.d.mts.map +1 -1
- package/dist/api/keyring.mjs +0 -2
- package/dist/api/keyring.mjs.map +1 -1
- package/dist/api/request.cjs +7 -6
- package/dist/api/request.cjs.map +1 -1
- package/dist/api/request.d.cts +5 -5
- package/dist/api/request.d.cts.map +1 -1
- package/dist/api/request.d.mts +5 -5
- package/dist/api/request.d.mts.map +1 -1
- package/dist/api/request.mjs +2 -1
- package/dist/api/request.mjs.map +1 -1
- package/dist/api/response.cjs +6 -6
- package/dist/api/response.cjs.map +1 -1
- package/dist/api/response.d.cts +1 -1
- package/dist/api/response.d.cts.map +1 -1
- package/dist/api/response.d.mts +1 -1
- package/dist/api/response.d.mts.map +1 -1
- package/dist/api/response.mjs +1 -1
- package/dist/api/response.mjs.map +1 -1
- package/dist/api/transaction.cjs +8 -7
- package/dist/api/transaction.cjs.map +1 -1
- package/dist/api/transaction.d.cts +65 -65
- package/dist/api/transaction.d.cts.map +1 -1
- package/dist/api/transaction.d.mts +65 -65
- package/dist/api/transaction.d.mts.map +1 -1
- package/dist/api/transaction.mjs +2 -1
- package/dist/api/transaction.mjs.map +1 -1
- package/dist/btc/types.cjs +2 -2
- package/dist/btc/types.cjs.map +1 -1
- package/dist/btc/types.d.cts +1 -1
- package/dist/btc/types.d.cts.map +1 -1
- package/dist/btc/types.d.mts +1 -1
- package/dist/btc/types.d.mts.map +1 -1
- package/dist/btc/types.mjs +2 -2
- package/dist/btc/types.mjs.map +1 -1
- package/dist/eth/erc4337/types.cjs +11 -10
- package/dist/eth/erc4337/types.cjs.map +1 -1
- package/dist/eth/erc4337/types.d.cts +5 -5
- package/dist/eth/erc4337/types.d.cts.map +1 -1
- package/dist/eth/erc4337/types.d.mts +5 -5
- package/dist/eth/erc4337/types.d.mts.map +1 -1
- package/dist/eth/erc4337/types.mjs +2 -1
- package/dist/eth/erc4337/types.mjs.map +1 -1
- package/dist/eth/types.cjs +6 -6
- package/dist/eth/types.cjs.map +1 -1
- package/dist/eth/types.d.cts +2 -2
- package/dist/eth/types.d.cts.map +1 -1
- package/dist/eth/types.d.mts +2 -2
- package/dist/eth/types.d.mts.map +1 -1
- package/dist/eth/types.mjs +1 -1
- package/dist/eth/types.mjs.map +1 -1
- package/dist/eth/utils.cjs.map +1 -1
- package/dist/eth/utils.d.cts.map +1 -1
- package/dist/eth/utils.d.mts.map +1 -1
- package/dist/eth/utils.mjs.map +1 -1
- package/dist/events.cjs +1 -67
- package/dist/events.cjs.map +1 -1
- package/dist/events.d.cts +0 -161
- package/dist/events.d.cts.map +1 -1
- package/dist/events.d.mts +0 -161
- package/dist/events.d.mts.map +1 -1
- package/dist/events.mjs +0 -66
- package/dist/events.mjs.map +1 -1
- package/dist/index.cjs +8 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +9 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{rpc.cjs → internal/api.cjs} +42 -71
- package/dist/internal/api.cjs.map +1 -0
- package/dist/{rpc.d.cts → internal/api.d.cts} +104 -130
- package/dist/internal/api.d.cts.map +1 -0
- package/dist/{rpc.d.mts → internal/api.d.mts} +104 -130
- package/dist/internal/api.d.mts.map +1 -0
- package/dist/{rpc.mjs → internal/api.mjs} +5 -33
- package/dist/internal/api.mjs.map +1 -0
- package/dist/internal/eth/EthKeyring.cjs +3 -0
- package/dist/internal/eth/EthKeyring.cjs.map +1 -0
- package/dist/internal/eth/EthKeyring.d.cts +34 -0
- package/dist/internal/eth/EthKeyring.d.cts.map +1 -0
- package/dist/internal/eth/EthKeyring.d.mts +34 -0
- package/dist/internal/eth/EthKeyring.d.mts.map +1 -0
- package/dist/internal/eth/EthKeyring.mjs +2 -0
- package/dist/internal/eth/EthKeyring.mjs.map +1 -0
- package/dist/internal/eth/index.cjs +3 -0
- package/dist/internal/eth/index.cjs.map +1 -0
- package/dist/internal/eth/index.d.cts +2 -0
- package/dist/internal/eth/index.d.cts.map +1 -0
- package/dist/internal/eth/index.d.mts +2 -0
- package/dist/internal/eth/index.d.mts.map +1 -0
- package/dist/internal/eth/index.mjs +2 -0
- package/dist/internal/eth/index.mjs.map +1 -0
- package/dist/internal/events.cjs +72 -0
- package/dist/internal/events.cjs.map +1 -0
- package/dist/internal/events.d.cts +162 -0
- package/dist/internal/events.d.cts.map +1 -0
- package/dist/internal/events.d.mts +162 -0
- package/dist/internal/events.d.mts.map +1 -0
- package/dist/internal/events.mjs +69 -0
- package/dist/internal/events.mjs.map +1 -0
- package/dist/internal/index.cjs +21 -0
- package/dist/internal/index.cjs.map +1 -0
- package/dist/internal/index.d.cts +6 -0
- package/dist/internal/index.d.cts.map +1 -0
- package/dist/internal/index.d.mts +6 -0
- package/dist/internal/index.d.mts.map +1 -0
- package/dist/internal/index.mjs +5 -0
- package/dist/internal/index.mjs.map +1 -0
- package/dist/internal/rpc.cjs +34 -0
- package/dist/internal/rpc.cjs.map +1 -0
- package/dist/internal/rpc.d.cts +27 -0
- package/dist/internal/rpc.d.cts.map +1 -0
- package/dist/internal/rpc.d.mts +27 -0
- package/dist/internal/rpc.d.mts.map +1 -0
- package/dist/internal/rpc.mjs +30 -0
- package/dist/internal/rpc.mjs.map +1 -0
- package/dist/internal/types.cjs +52 -0
- package/dist/internal/types.cjs.map +1 -0
- package/dist/internal/types.d.cts +392 -0
- package/dist/internal/types.d.cts.map +1 -0
- package/dist/internal/types.d.mts +392 -0
- package/dist/internal/types.d.mts.map +1 -0
- package/dist/internal/types.mjs +49 -0
- package/dist/internal/types.mjs.map +1 -0
- package/dist/rpc-handler.cjs +143 -0
- package/dist/rpc-handler.cjs.map +1 -0
- package/dist/rpc-handler.d.cts +30 -0
- package/dist/rpc-handler.d.cts.map +1 -0
- package/dist/rpc-handler.d.mts +30 -0
- package/dist/rpc-handler.d.mts.map +1 -0
- package/dist/rpc-handler.mjs +138 -0
- package/dist/rpc-handler.mjs.map +1 -0
- package/dist/snap-utils.cjs +20 -0
- package/dist/snap-utils.cjs.map +1 -0
- package/dist/snap-utils.d.cts +12 -0
- package/dist/snap-utils.d.cts.map +1 -0
- package/dist/snap-utils.d.mts +12 -0
- package/dist/snap-utils.d.mts.map +1 -0
- package/dist/snap-utils.mjs +17 -0
- package/dist/snap-utils.mjs.map +1 -0
- package/dist/sol/types.cjs +3 -3
- package/dist/sol/types.cjs.map +1 -1
- package/dist/sol/types.d.cts +1 -1
- package/dist/sol/types.d.cts.map +1 -1
- package/dist/sol/types.d.mts +1 -1
- package/dist/sol/types.d.mts.map +1 -1
- package/dist/sol/types.mjs +1 -1
- package/dist/sol/types.mjs.map +1 -1
- package/dist/superstruct.cjs +109 -0
- package/dist/superstruct.cjs.map +1 -0
- package/dist/superstruct.d.cts +102 -0
- package/dist/superstruct.d.cts.map +1 -0
- package/dist/superstruct.d.mts +102 -0
- package/dist/superstruct.d.mts.map +1 -0
- package/dist/superstruct.mjs +102 -0
- package/dist/superstruct.mjs.map +1 -0
- package/dist/utils/index.cjs +20 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +4 -0
- package/dist/utils/index.d.cts.map +1 -0
- package/dist/utils/index.d.mts +4 -0
- package/dist/utils/index.d.mts.map +1 -0
- package/dist/utils/index.mjs +4 -0
- package/dist/utils/index.mjs.map +1 -0
- package/dist/{api → utils}/pagination.cjs +3 -3
- package/dist/utils/pagination.cjs.map +1 -0
- package/dist/{api → utils}/pagination.d.cts +1 -1
- package/dist/utils/pagination.d.cts.map +1 -0
- package/dist/{api → utils}/pagination.d.mts +1 -1
- package/dist/utils/pagination.d.mts.map +1 -0
- package/dist/{api → utils}/pagination.mjs +1 -1
- package/dist/utils/pagination.mjs.map +1 -0
- package/dist/utils/types.cjs +29 -0
- package/dist/utils/types.cjs.map +1 -0
- package/dist/utils/types.d.cts +42 -0
- package/dist/utils/types.d.cts.map +1 -0
- package/dist/utils/types.d.mts +42 -0
- package/dist/utils/types.d.mts.map +1 -0
- package/dist/utils/types.mjs +26 -0
- package/dist/utils/types.mjs.map +1 -0
- package/dist/utils/typing.cjs +20 -0
- package/dist/utils/typing.cjs.map +1 -0
- package/dist/utils/typing.d.cts +33 -0
- package/dist/utils/typing.d.cts.map +1 -0
- package/dist/utils/typing.d.mts +33 -0
- package/dist/utils/typing.d.mts.map +1 -0
- package/dist/utils/typing.mjs +17 -0
- package/dist/utils/typing.mjs.map +1 -0
- package/package.json +12 -9
- package/dist/api/pagination.cjs.map +0 -1
- package/dist/api/pagination.d.cts.map +0 -1
- package/dist/api/pagination.d.mts.map +0 -1
- package/dist/api/pagination.mjs.map +0 -1
- package/dist/rpc.cjs.map +0 -1
- package/dist/rpc.d.cts.map +0 -1
- package/dist/rpc.d.mts.map +0 -1
- package/dist/rpc.mjs.map +0 -1
|
@@ -1,34 +1,8 @@
|
|
|
1
1
|
import type { Infer } from "@metamask/superstruct";
|
|
2
|
-
/**
|
|
3
|
-
* Keyring RPC methods used by the API.
|
|
4
|
-
*/
|
|
5
|
-
export declare enum KeyringRpcMethod {
|
|
6
|
-
ListAccounts = "keyring_listAccounts",
|
|
7
|
-
GetAccount = "keyring_getAccount",
|
|
8
|
-
CreateAccount = "keyring_createAccount",
|
|
9
|
-
ListAccountTransactions = "keyring_listAccountTransactions",
|
|
10
|
-
GetAccountBalances = "keyring_getAccountBalances",
|
|
11
|
-
FilterAccountChains = "keyring_filterAccountChains",
|
|
12
|
-
UpdateAccount = "keyring_updateAccount",
|
|
13
|
-
DeleteAccount = "keyring_deleteAccount",
|
|
14
|
-
ExportAccount = "keyring_exportAccount",
|
|
15
|
-
ListRequests = "keyring_listRequests",
|
|
16
|
-
GetRequest = "keyring_getRequest",
|
|
17
|
-
SubmitRequest = "keyring_submitRequest",
|
|
18
|
-
ApproveRequest = "keyring_approveRequest",
|
|
19
|
-
RejectRequest = "keyring_rejectRequest"
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Check if a method is a keyring RPC method.
|
|
23
|
-
*
|
|
24
|
-
* @param method - Method to check.
|
|
25
|
-
* @returns Whether the method is a keyring RPC method.
|
|
26
|
-
*/
|
|
27
|
-
export declare function isKeyringRpcMethod(method: string): boolean;
|
|
28
2
|
export declare const ListAccountsRequestStruct: import("@metamask/superstruct").Struct<{
|
|
29
|
-
method: "keyring_listAccounts";
|
|
30
|
-
id: string | number | null;
|
|
31
3
|
jsonrpc: "2.0";
|
|
4
|
+
id: string | number | null;
|
|
5
|
+
method: "keyring_listAccounts";
|
|
32
6
|
}, {
|
|
33
7
|
method: import("@metamask/superstruct").Struct<"keyring_listAccounts", "keyring_listAccounts">;
|
|
34
8
|
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
|
@@ -38,14 +12,14 @@ export type ListAccountsRequest = Infer<typeof ListAccountsRequestStruct>;
|
|
|
38
12
|
export declare const ListAccountsResponseStruct: import("@metamask/superstruct").Struct<{
|
|
39
13
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
40
14
|
id: string;
|
|
41
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
42
15
|
address: string;
|
|
16
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
43
17
|
methods: string[];
|
|
44
18
|
}[], import("@metamask/superstruct").Struct<{
|
|
45
19
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
46
20
|
id: string;
|
|
47
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
48
21
|
address: string;
|
|
22
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
49
23
|
methods: string[];
|
|
50
24
|
}, {
|
|
51
25
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -61,9 +35,9 @@ export declare const ListAccountsResponseStruct: import("@metamask/superstruct")
|
|
|
61
35
|
}>>;
|
|
62
36
|
export type ListAccountsResponse = Infer<typeof ListAccountsResponseStruct>;
|
|
63
37
|
export declare const GetAccountRequestStruct: import("@metamask/superstruct").Struct<{
|
|
64
|
-
method: "keyring_getAccount";
|
|
65
|
-
id: string | number | null;
|
|
66
38
|
jsonrpc: "2.0";
|
|
39
|
+
id: string | number | null;
|
|
40
|
+
method: "keyring_getAccount";
|
|
67
41
|
params: {
|
|
68
42
|
id: string;
|
|
69
43
|
};
|
|
@@ -81,8 +55,8 @@ export type GetAccountRequest = Infer<typeof GetAccountRequestStruct>;
|
|
|
81
55
|
export declare const GetAccountResponseStruct: import("@metamask/superstruct").Struct<{
|
|
82
56
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
83
57
|
id: string;
|
|
84
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
85
58
|
address: string;
|
|
59
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
86
60
|
methods: string[];
|
|
87
61
|
}, {
|
|
88
62
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -98,9 +72,9 @@ export declare const GetAccountResponseStruct: import("@metamask/superstruct").S
|
|
|
98
72
|
}>;
|
|
99
73
|
export type GetAccountResponse = Infer<typeof GetAccountResponseStruct>;
|
|
100
74
|
export declare const CreateAccountRequestStruct: import("@metamask/superstruct").Struct<{
|
|
101
|
-
method: "keyring_createAccount";
|
|
102
|
-
id: string | number | null;
|
|
103
75
|
jsonrpc: "2.0";
|
|
76
|
+
id: string | number | null;
|
|
77
|
+
method: "keyring_createAccount";
|
|
104
78
|
params: {
|
|
105
79
|
options: Record<string, import("@metamask/utils").Json>;
|
|
106
80
|
};
|
|
@@ -118,8 +92,8 @@ export type CreateAccountRequest = Infer<typeof CreateAccountRequestStruct>;
|
|
|
118
92
|
export declare const CreateAccountResponseStruct: import("@metamask/superstruct").Struct<{
|
|
119
93
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
120
94
|
id: string;
|
|
121
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
122
95
|
address: string;
|
|
96
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
123
97
|
methods: string[];
|
|
124
98
|
}, {
|
|
125
99
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -135,9 +109,9 @@ export declare const CreateAccountResponseStruct: import("@metamask/superstruct"
|
|
|
135
109
|
}>;
|
|
136
110
|
export type CreateAccountResponse = Infer<typeof CreateAccountResponseStruct>;
|
|
137
111
|
export declare const ListAccountTransactionsRequestStruct: import("@metamask/superstruct").Struct<{
|
|
138
|
-
method: "keyring_listAccountTransactions";
|
|
139
|
-
id: string | number | null;
|
|
140
112
|
jsonrpc: "2.0";
|
|
113
|
+
id: string | number | null;
|
|
114
|
+
method: "keyring_listAccountTransactions";
|
|
141
115
|
params: {
|
|
142
116
|
id: string;
|
|
143
117
|
pagination: {
|
|
@@ -160,7 +134,7 @@ export declare const ListAccountTransactionsRequestStruct: import("@metamask/sup
|
|
|
160
134
|
next?: string | null;
|
|
161
135
|
}, {
|
|
162
136
|
limit: import("@metamask/superstruct").Struct<number, null>;
|
|
163
|
-
next: import("@metamask/superstruct").Struct<string | import("
|
|
137
|
+
next: import("@metamask/superstruct").Struct<string | import("../superstruct.mjs").ExactOptionalTag | null, null>;
|
|
164
138
|
}>;
|
|
165
139
|
}>;
|
|
166
140
|
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
|
@@ -168,35 +142,32 @@ export declare const ListAccountTransactionsRequestStruct: import("@metamask/sup
|
|
|
168
142
|
}>;
|
|
169
143
|
export type ListAccountTransactionsRequest = Infer<typeof ListAccountTransactionsRequestStruct>;
|
|
170
144
|
export declare const ListAccountTransactionsResponseStruct: import("@metamask/superstruct").Struct<{
|
|
145
|
+
next: string | null;
|
|
171
146
|
data: {
|
|
172
147
|
type: "send" | "receive";
|
|
173
148
|
id: string;
|
|
149
|
+
account: string;
|
|
150
|
+
status: "submitted" | "unconfirmed" | "confirmed" | "failed";
|
|
151
|
+
timestamp: number | null;
|
|
152
|
+
chain: `${string}:${string}`;
|
|
174
153
|
from: {
|
|
175
154
|
address: string;
|
|
176
155
|
asset: {
|
|
177
|
-
unit: string;
|
|
178
156
|
type: `${string}:${string}/${string}:${string}`;
|
|
179
157
|
fungible: true;
|
|
158
|
+
unit: string;
|
|
180
159
|
amount: string;
|
|
181
160
|
} | {
|
|
182
161
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
183
162
|
fungible: false;
|
|
184
163
|
} | null;
|
|
185
164
|
}[];
|
|
186
|
-
events: {
|
|
187
|
-
status: "submitted" | "unconfirmed" | "confirmed" | "failed";
|
|
188
|
-
timestamp: number | null;
|
|
189
|
-
}[];
|
|
190
|
-
chain: `${string}:${string}`;
|
|
191
|
-
account: string;
|
|
192
|
-
status: "submitted" | "unconfirmed" | "confirmed" | "failed";
|
|
193
|
-
timestamp: number | null;
|
|
194
165
|
to: {
|
|
195
166
|
address: string;
|
|
196
167
|
asset: {
|
|
197
|
-
unit: string;
|
|
198
168
|
type: `${string}:${string}/${string}:${string}`;
|
|
199
169
|
fungible: true;
|
|
170
|
+
unit: string;
|
|
200
171
|
amount: string;
|
|
201
172
|
} | {
|
|
202
173
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
@@ -206,47 +177,46 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
206
177
|
fees: {
|
|
207
178
|
type: "base" | "priority";
|
|
208
179
|
asset: {
|
|
209
|
-
unit: string;
|
|
210
180
|
type: `${string}:${string}/${string}:${string}`;
|
|
211
181
|
fungible: true;
|
|
182
|
+
unit: string;
|
|
212
183
|
amount: string;
|
|
213
184
|
} | {
|
|
214
185
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
215
186
|
fungible: false;
|
|
216
187
|
};
|
|
217
188
|
}[];
|
|
189
|
+
events: {
|
|
190
|
+
status: "submitted" | "unconfirmed" | "confirmed" | "failed";
|
|
191
|
+
timestamp: number | null;
|
|
192
|
+
}[];
|
|
218
193
|
}[];
|
|
219
|
-
next: string | null;
|
|
220
194
|
}, {
|
|
221
195
|
data: import("@metamask/superstruct").Struct<{
|
|
222
196
|
type: "send" | "receive";
|
|
223
197
|
id: string;
|
|
198
|
+
account: string;
|
|
199
|
+
status: "submitted" | "unconfirmed" | "confirmed" | "failed";
|
|
200
|
+
timestamp: number | null;
|
|
201
|
+
chain: `${string}:${string}`;
|
|
224
202
|
from: {
|
|
225
203
|
address: string;
|
|
226
204
|
asset: {
|
|
227
|
-
unit: string;
|
|
228
205
|
type: `${string}:${string}/${string}:${string}`;
|
|
229
206
|
fungible: true;
|
|
207
|
+
unit: string;
|
|
230
208
|
amount: string;
|
|
231
209
|
} | {
|
|
232
210
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
233
211
|
fungible: false;
|
|
234
212
|
} | null;
|
|
235
213
|
}[];
|
|
236
|
-
events: {
|
|
237
|
-
status: "submitted" | "unconfirmed" | "confirmed" | "failed";
|
|
238
|
-
timestamp: number | null;
|
|
239
|
-
}[];
|
|
240
|
-
chain: `${string}:${string}`;
|
|
241
|
-
account: string;
|
|
242
|
-
status: "submitted" | "unconfirmed" | "confirmed" | "failed";
|
|
243
|
-
timestamp: number | null;
|
|
244
214
|
to: {
|
|
245
215
|
address: string;
|
|
246
216
|
asset: {
|
|
247
|
-
unit: string;
|
|
248
217
|
type: `${string}:${string}/${string}:${string}`;
|
|
249
218
|
fungible: true;
|
|
219
|
+
unit: string;
|
|
250
220
|
amount: string;
|
|
251
221
|
} | {
|
|
252
222
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
@@ -256,44 +226,44 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
256
226
|
fees: {
|
|
257
227
|
type: "base" | "priority";
|
|
258
228
|
asset: {
|
|
259
|
-
unit: string;
|
|
260
229
|
type: `${string}:${string}/${string}:${string}`;
|
|
261
230
|
fungible: true;
|
|
231
|
+
unit: string;
|
|
262
232
|
amount: string;
|
|
263
233
|
} | {
|
|
264
234
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
265
235
|
fungible: false;
|
|
266
236
|
};
|
|
267
237
|
}[];
|
|
238
|
+
events: {
|
|
239
|
+
status: "submitted" | "unconfirmed" | "confirmed" | "failed";
|
|
240
|
+
timestamp: number | null;
|
|
241
|
+
}[];
|
|
268
242
|
}[], import("@metamask/superstruct").Struct<{
|
|
269
243
|
type: "send" | "receive";
|
|
270
244
|
id: string;
|
|
245
|
+
account: string;
|
|
246
|
+
status: "submitted" | "unconfirmed" | "confirmed" | "failed";
|
|
247
|
+
timestamp: number | null;
|
|
248
|
+
chain: `${string}:${string}`;
|
|
271
249
|
from: {
|
|
272
250
|
address: string;
|
|
273
251
|
asset: {
|
|
274
|
-
unit: string;
|
|
275
252
|
type: `${string}:${string}/${string}:${string}`;
|
|
276
253
|
fungible: true;
|
|
254
|
+
unit: string;
|
|
277
255
|
amount: string;
|
|
278
256
|
} | {
|
|
279
257
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
280
258
|
fungible: false;
|
|
281
259
|
} | null;
|
|
282
260
|
}[];
|
|
283
|
-
events: {
|
|
284
|
-
status: "submitted" | "unconfirmed" | "confirmed" | "failed";
|
|
285
|
-
timestamp: number | null;
|
|
286
|
-
}[];
|
|
287
|
-
chain: `${string}:${string}`;
|
|
288
|
-
account: string;
|
|
289
|
-
status: "submitted" | "unconfirmed" | "confirmed" | "failed";
|
|
290
|
-
timestamp: number | null;
|
|
291
261
|
to: {
|
|
292
262
|
address: string;
|
|
293
263
|
asset: {
|
|
294
|
-
unit: string;
|
|
295
264
|
type: `${string}:${string}/${string}:${string}`;
|
|
296
265
|
fungible: true;
|
|
266
|
+
unit: string;
|
|
297
267
|
amount: string;
|
|
298
268
|
} | {
|
|
299
269
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
@@ -303,15 +273,19 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
303
273
|
fees: {
|
|
304
274
|
type: "base" | "priority";
|
|
305
275
|
asset: {
|
|
306
|
-
unit: string;
|
|
307
276
|
type: `${string}:${string}/${string}:${string}`;
|
|
308
277
|
fungible: true;
|
|
278
|
+
unit: string;
|
|
309
279
|
amount: string;
|
|
310
280
|
} | {
|
|
311
281
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
312
282
|
fungible: false;
|
|
313
283
|
};
|
|
314
284
|
}[];
|
|
285
|
+
events: {
|
|
286
|
+
status: "submitted" | "unconfirmed" | "confirmed" | "failed";
|
|
287
|
+
timestamp: number | null;
|
|
288
|
+
}[];
|
|
315
289
|
}, {
|
|
316
290
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
317
291
|
chain: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
|
|
@@ -330,9 +304,9 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
330
304
|
from: import("@metamask/superstruct").Struct<{
|
|
331
305
|
address: string;
|
|
332
306
|
asset: {
|
|
333
|
-
unit: string;
|
|
334
307
|
type: `${string}:${string}/${string}:${string}`;
|
|
335
308
|
fungible: true;
|
|
309
|
+
unit: string;
|
|
336
310
|
amount: string;
|
|
337
311
|
} | {
|
|
338
312
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
@@ -341,9 +315,9 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
341
315
|
}[], import("@metamask/superstruct").Struct<{
|
|
342
316
|
address: string;
|
|
343
317
|
asset: {
|
|
344
|
-
unit: string;
|
|
345
318
|
type: `${string}:${string}/${string}:${string}`;
|
|
346
319
|
fungible: true;
|
|
320
|
+
unit: string;
|
|
347
321
|
amount: string;
|
|
348
322
|
} | {
|
|
349
323
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
@@ -352,9 +326,9 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
352
326
|
}, {
|
|
353
327
|
address: import("@metamask/superstruct").Struct<string, null>;
|
|
354
328
|
asset: import("@metamask/superstruct").Struct<{
|
|
355
|
-
unit: string;
|
|
356
329
|
type: `${string}:${string}/${string}:${string}`;
|
|
357
330
|
fungible: true;
|
|
331
|
+
unit: string;
|
|
358
332
|
amount: string;
|
|
359
333
|
} | {
|
|
360
334
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
@@ -364,9 +338,9 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
364
338
|
to: import("@metamask/superstruct").Struct<{
|
|
365
339
|
address: string;
|
|
366
340
|
asset: {
|
|
367
|
-
unit: string;
|
|
368
341
|
type: `${string}:${string}/${string}:${string}`;
|
|
369
342
|
fungible: true;
|
|
343
|
+
unit: string;
|
|
370
344
|
amount: string;
|
|
371
345
|
} | {
|
|
372
346
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
@@ -375,9 +349,9 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
375
349
|
}[], import("@metamask/superstruct").Struct<{
|
|
376
350
|
address: string;
|
|
377
351
|
asset: {
|
|
378
|
-
unit: string;
|
|
379
352
|
type: `${string}:${string}/${string}:${string}`;
|
|
380
353
|
fungible: true;
|
|
354
|
+
unit: string;
|
|
381
355
|
amount: string;
|
|
382
356
|
} | {
|
|
383
357
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
@@ -386,9 +360,9 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
386
360
|
}, {
|
|
387
361
|
address: import("@metamask/superstruct").Struct<string, null>;
|
|
388
362
|
asset: import("@metamask/superstruct").Struct<{
|
|
389
|
-
unit: string;
|
|
390
363
|
type: `${string}:${string}/${string}:${string}`;
|
|
391
364
|
fungible: true;
|
|
365
|
+
unit: string;
|
|
392
366
|
amount: string;
|
|
393
367
|
} | {
|
|
394
368
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
@@ -398,9 +372,9 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
398
372
|
fees: import("@metamask/superstruct").Struct<{
|
|
399
373
|
type: "base" | "priority";
|
|
400
374
|
asset: {
|
|
401
|
-
unit: string;
|
|
402
375
|
type: `${string}:${string}/${string}:${string}`;
|
|
403
376
|
fungible: true;
|
|
377
|
+
unit: string;
|
|
404
378
|
amount: string;
|
|
405
379
|
} | {
|
|
406
380
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
@@ -409,9 +383,9 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
409
383
|
}[], import("@metamask/superstruct").Struct<{
|
|
410
384
|
type: "base" | "priority";
|
|
411
385
|
asset: {
|
|
412
|
-
unit: string;
|
|
413
386
|
type: `${string}:${string}/${string}:${string}`;
|
|
414
387
|
fungible: true;
|
|
388
|
+
unit: string;
|
|
415
389
|
amount: string;
|
|
416
390
|
} | {
|
|
417
391
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
@@ -423,9 +397,9 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
423
397
|
priority: "priority";
|
|
424
398
|
}>;
|
|
425
399
|
asset: import("@metamask/superstruct").Struct<{
|
|
426
|
-
unit: string;
|
|
427
400
|
type: `${string}:${string}/${string}:${string}`;
|
|
428
401
|
fungible: true;
|
|
402
|
+
unit: string;
|
|
429
403
|
amount: string;
|
|
430
404
|
} | {
|
|
431
405
|
id: `${string}:${string}/${string}:${string}/${string}`;
|
|
@@ -452,9 +426,9 @@ export declare const ListAccountTransactionsResponseStruct: import("@metamask/su
|
|
|
452
426
|
}>;
|
|
453
427
|
export type ListAccountTransactionsResponse = Infer<typeof ListAccountTransactionsResponseStruct>;
|
|
454
428
|
export declare const GetAccountBalancesRequestStruct: import("@metamask/superstruct").Struct<{
|
|
455
|
-
method: "keyring_getAccountBalances";
|
|
456
|
-
id: string | number | null;
|
|
457
429
|
jsonrpc: "2.0";
|
|
430
|
+
id: string | number | null;
|
|
431
|
+
method: "keyring_getAccountBalances";
|
|
458
432
|
params: {
|
|
459
433
|
id: string;
|
|
460
434
|
assets: string[];
|
|
@@ -478,9 +452,9 @@ export declare const GetAccountBalancesResponseStruct: import("@metamask/superst
|
|
|
478
452
|
}>, null>;
|
|
479
453
|
export type GetAccountBalancesResponse = Infer<typeof GetAccountBalancesResponseStruct>;
|
|
480
454
|
export declare const FilterAccountChainsStruct: import("@metamask/superstruct").Struct<{
|
|
481
|
-
method: "keyring_filterAccountChains";
|
|
482
|
-
id: string | number | null;
|
|
483
455
|
jsonrpc: "2.0";
|
|
456
|
+
id: string | number | null;
|
|
457
|
+
method: "keyring_filterAccountChains";
|
|
484
458
|
params: {
|
|
485
459
|
id: string;
|
|
486
460
|
chains: string[];
|
|
@@ -501,15 +475,15 @@ export type FilterAccountChainsRequest = Infer<typeof FilterAccountChainsStruct>
|
|
|
501
475
|
export declare const FilterAccountChainsResponseStruct: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
|
502
476
|
export type FilterAccountChainsResponse = Infer<typeof FilterAccountChainsResponseStruct>;
|
|
503
477
|
export declare const UpdateAccountRequestStruct: import("@metamask/superstruct").Struct<{
|
|
504
|
-
method: "keyring_updateAccount";
|
|
505
|
-
id: string | number | null;
|
|
506
478
|
jsonrpc: "2.0";
|
|
479
|
+
id: string | number | null;
|
|
480
|
+
method: "keyring_updateAccount";
|
|
507
481
|
params: {
|
|
508
482
|
account: {
|
|
509
483
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
510
484
|
id: string;
|
|
511
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
512
485
|
address: string;
|
|
486
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
513
487
|
methods: string[];
|
|
514
488
|
};
|
|
515
489
|
};
|
|
@@ -519,16 +493,16 @@ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct")
|
|
|
519
493
|
account: {
|
|
520
494
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
521
495
|
id: string;
|
|
522
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
523
496
|
address: string;
|
|
497
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
524
498
|
methods: string[];
|
|
525
499
|
};
|
|
526
500
|
}, {
|
|
527
501
|
account: import("@metamask/superstruct").Struct<{
|
|
528
502
|
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
|
|
529
503
|
id: string;
|
|
530
|
-
options: Record<string, import("@metamask/utils").Json>;
|
|
531
504
|
address: string;
|
|
505
|
+
options: Record<string, import("@metamask/utils").Json>;
|
|
532
506
|
methods: string[];
|
|
533
507
|
}, {
|
|
534
508
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
@@ -550,9 +524,9 @@ export type UpdateAccountRequest = Infer<typeof UpdateAccountRequestStruct>;
|
|
|
550
524
|
export declare const UpdateAccountResponseStruct: import("@metamask/superstruct").Struct<null, null>;
|
|
551
525
|
export type UpdateAccountResponse = Infer<typeof UpdateAccountResponseStruct>;
|
|
552
526
|
export declare const DeleteAccountRequestStruct: import("@metamask/superstruct").Struct<{
|
|
553
|
-
method: "keyring_deleteAccount";
|
|
554
|
-
id: string | number | null;
|
|
555
527
|
jsonrpc: "2.0";
|
|
528
|
+
id: string | number | null;
|
|
529
|
+
method: "keyring_deleteAccount";
|
|
556
530
|
params: {
|
|
557
531
|
id: string;
|
|
558
532
|
};
|
|
@@ -570,9 +544,9 @@ export type DeleteAccountRequest = Infer<typeof DeleteAccountRequestStruct>;
|
|
|
570
544
|
export declare const DeleteAccountResponseStruct: import("@metamask/superstruct").Struct<null, null>;
|
|
571
545
|
export type DeleteAccountResponse = Infer<typeof DeleteAccountResponseStruct>;
|
|
572
546
|
export declare const ExportAccountRequestStruct: import("@metamask/superstruct").Struct<{
|
|
573
|
-
method: "keyring_exportAccount";
|
|
574
|
-
id: string | number | null;
|
|
575
547
|
jsonrpc: "2.0";
|
|
548
|
+
id: string | number | null;
|
|
549
|
+
method: "keyring_exportAccount";
|
|
576
550
|
params: {
|
|
577
551
|
id: string;
|
|
578
552
|
};
|
|
@@ -590,9 +564,9 @@ export type ExportAccountRequest = Infer<typeof ExportAccountRequestStruct>;
|
|
|
590
564
|
export declare const ExportAccountResponseStruct: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
591
565
|
export type ExportAccountResponse = Infer<typeof ExportAccountResponseStruct>;
|
|
592
566
|
export declare const ListRequestsRequestStruct: import("@metamask/superstruct").Struct<{
|
|
593
|
-
method: "keyring_listRequests";
|
|
594
|
-
id: string | number | null;
|
|
595
567
|
jsonrpc: "2.0";
|
|
568
|
+
id: string | number | null;
|
|
569
|
+
method: "keyring_listRequests";
|
|
596
570
|
}, {
|
|
597
571
|
method: import("@metamask/superstruct").Struct<"keyring_listRequests", "keyring_listRequests">;
|
|
598
572
|
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
|
@@ -601,37 +575,37 @@ export declare const ListRequestsRequestStruct: import("@metamask/superstruct").
|
|
|
601
575
|
export type ListRequestsRequest = Infer<typeof ListRequestsRequestStruct>;
|
|
602
576
|
export declare const ListRequestsResponseStruct: import("@metamask/superstruct").Struct<{
|
|
603
577
|
id: string;
|
|
578
|
+
scope: string;
|
|
579
|
+
account: string;
|
|
604
580
|
request: {
|
|
605
581
|
method: string;
|
|
606
|
-
params?:
|
|
582
|
+
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
|
607
583
|
};
|
|
608
|
-
scope: string;
|
|
609
|
-
account: string;
|
|
610
584
|
}[], import("@metamask/superstruct").Struct<{
|
|
611
585
|
id: string;
|
|
586
|
+
scope: string;
|
|
587
|
+
account: string;
|
|
612
588
|
request: {
|
|
613
589
|
method: string;
|
|
614
|
-
params?:
|
|
590
|
+
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
|
615
591
|
};
|
|
616
|
-
scope: string;
|
|
617
|
-
account: string;
|
|
618
592
|
}, {
|
|
619
593
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
620
594
|
scope: import("@metamask/superstruct").Struct<string, null>;
|
|
621
595
|
account: import("@metamask/superstruct").Struct<string, null>;
|
|
622
596
|
request: import("@metamask/superstruct").Struct<{
|
|
623
597
|
method: string;
|
|
624
|
-
params?:
|
|
598
|
+
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
|
625
599
|
}, {
|
|
626
600
|
method: import("@metamask/superstruct").Struct<string, null>;
|
|
627
|
-
params: import("@metamask/superstruct").Struct<import("
|
|
601
|
+
params: import("@metamask/superstruct").Struct<import("../superstruct.mjs").ExactOptionalTag | import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>, null>;
|
|
628
602
|
}>;
|
|
629
603
|
}>>;
|
|
630
604
|
export type ListRequestsResponse = Infer<typeof ListRequestsResponseStruct>;
|
|
631
605
|
export declare const GetRequestRequestStruct: import("@metamask/superstruct").Struct<{
|
|
632
|
-
method: "keyring_getRequest";
|
|
633
|
-
id: string | number | null;
|
|
634
606
|
jsonrpc: "2.0";
|
|
607
|
+
id: string | number | null;
|
|
608
|
+
method: "keyring_getRequest";
|
|
635
609
|
params: {
|
|
636
610
|
id: string;
|
|
637
611
|
};
|
|
@@ -648,58 +622,58 @@ export declare const GetRequestRequestStruct: import("@metamask/superstruct").St
|
|
|
648
622
|
export type GetRequestRequest = Infer<typeof GetRequestRequestStruct>;
|
|
649
623
|
export declare const GetRequestResponseStruct: import("@metamask/superstruct").Struct<{
|
|
650
624
|
id: string;
|
|
625
|
+
scope: string;
|
|
626
|
+
account: string;
|
|
651
627
|
request: {
|
|
652
628
|
method: string;
|
|
653
|
-
params?:
|
|
629
|
+
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
|
654
630
|
};
|
|
655
|
-
scope: string;
|
|
656
|
-
account: string;
|
|
657
631
|
}, {
|
|
658
632
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
659
633
|
scope: import("@metamask/superstruct").Struct<string, null>;
|
|
660
634
|
account: import("@metamask/superstruct").Struct<string, null>;
|
|
661
635
|
request: import("@metamask/superstruct").Struct<{
|
|
662
636
|
method: string;
|
|
663
|
-
params?:
|
|
637
|
+
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
|
664
638
|
}, {
|
|
665
639
|
method: import("@metamask/superstruct").Struct<string, null>;
|
|
666
|
-
params: import("@metamask/superstruct").Struct<import("
|
|
640
|
+
params: import("@metamask/superstruct").Struct<import("../superstruct.mjs").ExactOptionalTag | import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>, null>;
|
|
667
641
|
}>;
|
|
668
642
|
}>;
|
|
669
643
|
export type GetRequestResponse = Infer<typeof GetRequestResponseStruct>;
|
|
670
644
|
export declare const SubmitRequestRequestStruct: import("@metamask/superstruct").Struct<{
|
|
671
|
-
method: "keyring_submitRequest";
|
|
672
|
-
id: string | number | null;
|
|
673
645
|
jsonrpc: "2.0";
|
|
646
|
+
id: string | number | null;
|
|
647
|
+
method: "keyring_submitRequest";
|
|
674
648
|
params: {
|
|
675
649
|
id: string;
|
|
650
|
+
scope: string;
|
|
651
|
+
account: string;
|
|
676
652
|
request: {
|
|
677
653
|
method: string;
|
|
678
|
-
params?:
|
|
654
|
+
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
|
679
655
|
};
|
|
680
|
-
scope: string;
|
|
681
|
-
account: string;
|
|
682
656
|
};
|
|
683
657
|
}, {
|
|
684
658
|
method: import("@metamask/superstruct").Struct<"keyring_submitRequest", "keyring_submitRequest">;
|
|
685
659
|
params: import("@metamask/superstruct").Struct<{
|
|
686
660
|
id: string;
|
|
661
|
+
scope: string;
|
|
662
|
+
account: string;
|
|
687
663
|
request: {
|
|
688
664
|
method: string;
|
|
689
|
-
params?:
|
|
665
|
+
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
|
690
666
|
};
|
|
691
|
-
scope: string;
|
|
692
|
-
account: string;
|
|
693
667
|
}, {
|
|
694
668
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
695
669
|
scope: import("@metamask/superstruct").Struct<string, null>;
|
|
696
670
|
account: import("@metamask/superstruct").Struct<string, null>;
|
|
697
671
|
request: import("@metamask/superstruct").Struct<{
|
|
698
672
|
method: string;
|
|
699
|
-
params?:
|
|
673
|
+
params?: import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>;
|
|
700
674
|
}, {
|
|
701
675
|
method: import("@metamask/superstruct").Struct<string, null>;
|
|
702
|
-
params: import("@metamask/superstruct").Struct<import("
|
|
676
|
+
params: import("@metamask/superstruct").Struct<import("../superstruct.mjs").ExactOptionalTag | import("@metamask/utils").Json[] | Record<string, import("@metamask/utils").Json>, null>;
|
|
703
677
|
}>;
|
|
704
678
|
}>;
|
|
705
679
|
jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
|
|
@@ -713,23 +687,23 @@ export declare const SubmitRequestResponseStruct: import("@metamask/superstruct"
|
|
|
713
687
|
url?: string;
|
|
714
688
|
};
|
|
715
689
|
} | {
|
|
716
|
-
result: import("@metamask/utils").Json;
|
|
717
690
|
pending: false;
|
|
691
|
+
result: import("@metamask/utils").Json;
|
|
718
692
|
}, null>;
|
|
719
693
|
export type SubmitRequestResponse = Infer<typeof SubmitRequestResponseStruct>;
|
|
720
694
|
export declare const ApproveRequestRequestStruct: import("@metamask/superstruct").Struct<{
|
|
721
|
-
method: "keyring_approveRequest";
|
|
722
|
-
id: string | number | null;
|
|
723
695
|
jsonrpc: "2.0";
|
|
696
|
+
id: string | number | null;
|
|
697
|
+
method: "keyring_approveRequest";
|
|
724
698
|
params: {
|
|
725
|
-
data: Record<string, import("@metamask/utils").Json>;
|
|
726
699
|
id: string;
|
|
700
|
+
data: Record<string, import("@metamask/utils").Json>;
|
|
727
701
|
};
|
|
728
702
|
}, {
|
|
729
703
|
method: import("@metamask/superstruct").Struct<"keyring_approveRequest", "keyring_approveRequest">;
|
|
730
704
|
params: import("@metamask/superstruct").Struct<{
|
|
731
|
-
data: Record<string, import("@metamask/utils").Json>;
|
|
732
705
|
id: string;
|
|
706
|
+
data: Record<string, import("@metamask/utils").Json>;
|
|
733
707
|
}, {
|
|
734
708
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
735
709
|
data: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
|
|
@@ -741,9 +715,9 @@ export type ApproveRequestRequest = Infer<typeof ApproveRequestRequestStruct>;
|
|
|
741
715
|
export declare const ApproveRequestResponseStruct: import("@metamask/superstruct").Struct<null, null>;
|
|
742
716
|
export type ApproveRequestResponse = Infer<typeof ApproveRequestResponseStruct>;
|
|
743
717
|
export declare const RejectRequestRequestStruct: import("@metamask/superstruct").Struct<{
|
|
744
|
-
method: "keyring_rejectRequest";
|
|
745
|
-
id: string | number | null;
|
|
746
718
|
jsonrpc: "2.0";
|
|
719
|
+
id: string | number | null;
|
|
720
|
+
method: "keyring_rejectRequest";
|
|
747
721
|
params: {
|
|
748
722
|
id: string;
|
|
749
723
|
};
|
|
@@ -760,4 +734,4 @@ export declare const RejectRequestRequestStruct: import("@metamask/superstruct")
|
|
|
760
734
|
export type RejectRequestRequest = Infer<typeof RejectRequestRequestStruct>;
|
|
761
735
|
export declare const RejectRequestResponseStruct: import("@metamask/superstruct").Struct<null, null>;
|
|
762
736
|
export type RejectRequestResponse = Infer<typeof RejectRequestResponseStruct>;
|
|
763
|
-
//# sourceMappingURL=
|
|
737
|
+
//# sourceMappingURL=api.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.mts","sourceRoot":"","sources":["../../src/internal/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAgCnD,eAAO,MAAM,yBAAyB;;;;;;;;EAGpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE1E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;GAA8B,CAAC;AAEtE,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAK5E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;EAMlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEtE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;EAAuB,CAAC;AAE7D,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAKxE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;EAMrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE5E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;EAAuB,CA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