@metamask-previews/keyring-api 11.0.0-b85bfaa → 11.1.0-15cda6b

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.
Files changed (214) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/dist/api/account.cjs.map +1 -0
  3. package/dist/{account.d.cts → api/account.d.cts} +2 -2
  4. package/dist/api/account.d.cts.map +1 -0
  5. package/dist/{account.d.mts → api/account.d.mts} +2 -2
  6. package/dist/api/account.d.mts.map +1 -0
  7. package/dist/api/account.mjs.map +1 -0
  8. package/dist/api/asset.cjs +82 -0
  9. package/dist/api/asset.cjs.map +1 -0
  10. package/dist/api/asset.d.cts +93 -0
  11. package/dist/api/asset.d.cts.map +1 -0
  12. package/dist/api/asset.d.mts +93 -0
  13. package/dist/api/asset.d.mts.map +1 -0
  14. package/dist/api/asset.mjs +79 -0
  15. package/dist/api/asset.mjs.map +1 -0
  16. package/dist/api/balance.cjs.map +1 -0
  17. package/dist/{balance.d.cts → api/balance.d.cts} +1 -1
  18. package/dist/api/balance.d.cts.map +1 -0
  19. package/dist/{balance.d.mts → api/balance.d.mts} +1 -1
  20. package/dist/api/balance.d.mts.map +1 -0
  21. package/dist/api/balance.mjs.map +1 -0
  22. package/dist/api/caip.cjs.map +1 -0
  23. package/dist/api/caip.d.cts.map +1 -0
  24. package/dist/api/caip.d.mts.map +1 -0
  25. package/dist/api/caip.mjs.map +1 -0
  26. package/dist/api/export.cjs.map +1 -0
  27. package/dist/api/export.d.cts.map +1 -0
  28. package/dist/api/export.d.mts.map +1 -0
  29. package/dist/api/export.mjs.map +1 -0
  30. package/dist/api/index.cjs +26 -0
  31. package/dist/api/index.cjs.map +1 -0
  32. package/dist/api/index.d.cts +11 -0
  33. package/dist/api/index.d.cts.map +1 -0
  34. package/dist/api/index.d.mts +11 -0
  35. package/dist/api/index.d.mts.map +1 -0
  36. package/dist/api/index.mjs +10 -0
  37. package/dist/api/index.mjs.map +1 -0
  38. package/dist/api/keyring.cjs.map +1 -0
  39. package/dist/{keyring.d.cts → api/keyring.d.cts} +14 -0
  40. package/dist/api/keyring.d.cts.map +1 -0
  41. package/dist/{keyring.d.mts → api/keyring.d.mts} +14 -0
  42. package/dist/api/keyring.d.mts.map +1 -0
  43. package/dist/api/keyring.mjs.map +1 -0
  44. package/dist/api/pagination.cjs +28 -0
  45. package/dist/api/pagination.cjs.map +1 -0
  46. package/dist/api/pagination.d.cts +59 -0
  47. package/dist/api/pagination.d.cts.map +1 -0
  48. package/dist/api/pagination.d.mts +59 -0
  49. package/dist/api/pagination.d.mts.map +1 -0
  50. package/dist/api/pagination.mjs +25 -0
  51. package/dist/api/pagination.mjs.map +1 -0
  52. package/dist/api/request.cjs.map +1 -0
  53. package/dist/{request.d.cts → api/request.d.cts} +3 -3
  54. package/dist/api/request.d.cts.map +1 -0
  55. package/dist/{request.d.mts → api/request.d.mts} +3 -3
  56. package/dist/api/request.d.mts.map +1 -0
  57. package/dist/api/request.mjs.map +1 -0
  58. package/dist/api/response.cjs.map +1 -0
  59. package/dist/{response.d.cts → api/response.d.cts} +1 -1
  60. package/dist/api/response.d.cts.map +1 -0
  61. package/dist/{response.d.mts → api/response.d.mts} +1 -1
  62. package/dist/api/response.d.mts.map +1 -0
  63. package/dist/api/response.mjs.map +1 -0
  64. package/dist/api/transaction.cjs +294 -0
  65. package/dist/api/transaction.cjs.map +1 -0
  66. package/dist/api/transaction.d.cts +773 -0
  67. package/dist/api/transaction.d.cts.map +1 -0
  68. package/dist/api/transaction.d.mts +773 -0
  69. package/dist/api/transaction.d.mts.map +1 -0
  70. package/dist/api/transaction.mjs +291 -0
  71. package/dist/api/transaction.mjs.map +1 -0
  72. package/dist/btc/index.cjs +18 -0
  73. package/dist/btc/index.cjs.map +1 -0
  74. package/dist/btc/index.d.cts +2 -0
  75. package/dist/btc/index.d.cts.map +1 -0
  76. package/dist/btc/index.d.mts +2 -0
  77. package/dist/btc/index.d.mts.map +1 -0
  78. package/dist/btc/index.mjs +2 -0
  79. package/dist/btc/index.mjs.map +1 -0
  80. package/dist/btc/types.cjs +40 -0
  81. package/dist/btc/types.cjs.map +1 -0
  82. package/dist/btc/types.d.cts +34 -0
  83. package/dist/btc/types.d.cts.map +1 -0
  84. package/dist/btc/types.d.mts +34 -0
  85. package/dist/btc/types.d.mts.map +1 -0
  86. package/dist/btc/types.mjs +37 -0
  87. package/dist/btc/types.mjs.map +1 -0
  88. package/dist/eth/erc4337/index.cjs +18 -0
  89. package/dist/eth/erc4337/index.cjs.map +1 -0
  90. package/dist/eth/erc4337/index.d.cts +2 -0
  91. package/dist/eth/erc4337/index.d.cts.map +1 -0
  92. package/dist/eth/erc4337/index.d.mts +2 -0
  93. package/dist/eth/erc4337/index.d.mts.map +1 -0
  94. package/dist/eth/erc4337/index.mjs +2 -0
  95. package/dist/eth/erc4337/index.mjs.map +1 -0
  96. package/dist/eth/erc4337/types.cjs +61 -0
  97. package/dist/eth/erc4337/types.cjs.map +1 -0
  98. package/dist/eth/erc4337/types.d.cts +98 -0
  99. package/dist/eth/erc4337/types.d.cts.map +1 -0
  100. package/dist/eth/erc4337/types.d.mts +98 -0
  101. package/dist/eth/erc4337/types.d.mts.map +1 -0
  102. package/dist/eth/erc4337/types.mjs +58 -0
  103. package/dist/eth/erc4337/types.mjs.map +1 -0
  104. package/dist/eth/index.cjs +20 -0
  105. package/dist/eth/index.cjs.map +1 -0
  106. package/dist/eth/index.d.cts +4 -0
  107. package/dist/eth/index.d.cts.map +1 -0
  108. package/dist/eth/index.d.mts +4 -0
  109. package/dist/eth/index.d.mts.map +1 -0
  110. package/dist/eth/index.mjs +4 -0
  111. package/dist/eth/index.mjs.map +1 -0
  112. package/dist/eth/types.cjs +73 -0
  113. package/dist/eth/types.cjs.map +1 -0
  114. package/dist/eth/types.d.cts +81 -0
  115. package/dist/eth/types.d.cts.map +1 -0
  116. package/dist/eth/types.d.mts +81 -0
  117. package/dist/eth/types.d.mts.map +1 -0
  118. package/dist/eth/types.mjs +70 -0
  119. package/dist/eth/types.mjs.map +1 -0
  120. package/dist/eth/utils.cjs +14 -0
  121. package/dist/eth/utils.cjs.map +1 -0
  122. package/dist/eth/utils.d.cts +9 -0
  123. package/dist/eth/utils.d.cts.map +1 -0
  124. package/dist/eth/utils.d.mts +9 -0
  125. package/dist/eth/utils.d.mts.map +1 -0
  126. package/dist/eth/utils.mjs +11 -0
  127. package/dist/eth/utils.mjs.map +1 -0
  128. package/dist/events.cjs +83 -0
  129. package/dist/events.cjs.map +1 -0
  130. package/dist/events.d.cts +172 -0
  131. package/dist/events.d.cts.map +1 -0
  132. package/dist/events.d.mts +172 -0
  133. package/dist/events.d.mts.map +1 -0
  134. package/dist/events.mjs +80 -0
  135. package/dist/events.mjs.map +1 -0
  136. package/dist/index.cjs +6 -6
  137. package/dist/index.cjs.map +1 -1
  138. package/dist/index.d.cts +6 -7
  139. package/dist/index.d.cts.map +1 -1
  140. package/dist/index.d.mts +6 -7
  141. package/dist/index.d.mts.map +1 -1
  142. package/dist/index.mjs +6 -6
  143. package/dist/index.mjs.map +1 -1
  144. package/dist/rpc.cjs +179 -0
  145. package/dist/rpc.cjs.map +1 -0
  146. package/dist/rpc.d.cts +763 -0
  147. package/dist/rpc.d.cts.map +1 -0
  148. package/dist/rpc.d.mts +763 -0
  149. package/dist/rpc.d.mts.map +1 -0
  150. package/dist/rpc.mjs +175 -0
  151. package/dist/rpc.mjs.map +1 -0
  152. package/dist/sol/index.cjs +18 -0
  153. package/dist/sol/index.cjs.map +1 -0
  154. package/dist/sol/index.d.cts +2 -0
  155. package/dist/sol/index.d.cts.map +1 -0
  156. package/dist/sol/index.d.mts +2 -0
  157. package/dist/sol/index.d.mts.map +1 -0
  158. package/dist/sol/index.mjs +2 -0
  159. package/dist/sol/index.mjs.map +1 -0
  160. package/dist/sol/types.cjs +36 -0
  161. package/dist/sol/types.cjs.map +1 -0
  162. package/dist/sol/types.d.cts +39 -0
  163. package/dist/sol/types.d.cts.map +1 -0
  164. package/dist/sol/types.d.mts +39 -0
  165. package/dist/sol/types.d.mts.map +1 -0
  166. package/dist/sol/types.mjs +33 -0
  167. package/dist/sol/types.mjs.map +1 -0
  168. package/package.json +3 -5
  169. package/dist/account.cjs.map +0 -1
  170. package/dist/account.d.cts.map +0 -1
  171. package/dist/account.d.mts.map +0 -1
  172. package/dist/account.mjs.map +0 -1
  173. package/dist/balance.cjs.map +0 -1
  174. package/dist/balance.d.cts.map +0 -1
  175. package/dist/balance.d.mts.map +0 -1
  176. package/dist/balance.mjs.map +0 -1
  177. package/dist/caip.cjs.map +0 -1
  178. package/dist/caip.d.cts.map +0 -1
  179. package/dist/caip.d.mts.map +0 -1
  180. package/dist/caip.mjs.map +0 -1
  181. package/dist/export.cjs.map +0 -1
  182. package/dist/export.d.cts.map +0 -1
  183. package/dist/export.d.mts.map +0 -1
  184. package/dist/export.mjs.map +0 -1
  185. package/dist/keyring.cjs.map +0 -1
  186. package/dist/keyring.d.cts.map +0 -1
  187. package/dist/keyring.d.mts.map +0 -1
  188. package/dist/keyring.mjs.map +0 -1
  189. package/dist/request.cjs.map +0 -1
  190. package/dist/request.d.cts.map +0 -1
  191. package/dist/request.d.mts.map +0 -1
  192. package/dist/request.mjs.map +0 -1
  193. package/dist/response.cjs.map +0 -1
  194. package/dist/response.d.cts.map +0 -1
  195. package/dist/response.d.mts.map +0 -1
  196. package/dist/response.mjs.map +0 -1
  197. /package/dist/{account.cjs → api/account.cjs} +0 -0
  198. /package/dist/{account.mjs → api/account.mjs} +0 -0
  199. /package/dist/{balance.cjs → api/balance.cjs} +0 -0
  200. /package/dist/{balance.mjs → api/balance.mjs} +0 -0
  201. /package/dist/{caip.cjs → api/caip.cjs} +0 -0
  202. /package/dist/{caip.d.cts → api/caip.d.cts} +0 -0
  203. /package/dist/{caip.d.mts → api/caip.d.mts} +0 -0
  204. /package/dist/{caip.mjs → api/caip.mjs} +0 -0
  205. /package/dist/{export.cjs → api/export.cjs} +0 -0
  206. /package/dist/{export.d.cts → api/export.d.cts} +0 -0
  207. /package/dist/{export.d.mts → api/export.d.mts} +0 -0
  208. /package/dist/{export.mjs → api/export.mjs} +0 -0
  209. /package/dist/{keyring.cjs → api/keyring.cjs} +0 -0
  210. /package/dist/{keyring.mjs → api/keyring.mjs} +0 -0
  211. /package/dist/{request.cjs → api/request.cjs} +0 -0
  212. /package/dist/{request.mjs → api/request.mjs} +0 -0
  213. /package/dist/{response.cjs → api/response.cjs} +0 -0
  214. /package/dist/{response.mjs → api/response.mjs} +0 -0
package/dist/rpc.d.cts ADDED
@@ -0,0 +1,763 @@
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
+ export declare const ListAccountsRequestStruct: import("@metamask/superstruct").Struct<{
29
+ method: "keyring_listAccounts";
30
+ id: string | number | null;
31
+ jsonrpc: "2.0";
32
+ }, {
33
+ method: import("@metamask/superstruct").Struct<"keyring_listAccounts", "keyring_listAccounts">;
34
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
35
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
36
+ }>;
37
+ export type ListAccountsRequest = Infer<typeof ListAccountsRequestStruct>;
38
+ export declare const ListAccountsResponseStruct: import("@metamask/superstruct").Struct<{
39
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
40
+ id: string;
41
+ options: Record<string, import("@metamask/utils").Json>;
42
+ address: string;
43
+ methods: string[];
44
+ }[], import("@metamask/superstruct").Struct<{
45
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
46
+ id: string;
47
+ options: Record<string, import("@metamask/utils").Json>;
48
+ address: string;
49
+ methods: string[];
50
+ }, {
51
+ id: import("@metamask/superstruct").Struct<string, null>;
52
+ type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
53
+ "eip155:eoa": "eip155:eoa";
54
+ "eip155:erc4337": "eip155:erc4337";
55
+ "bip122:p2wpkh": "bip122:p2wpkh";
56
+ "solana:data-account": "solana:data-account";
57
+ }>;
58
+ address: import("@metamask/superstruct").Struct<string, null>;
59
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
60
+ methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
61
+ }>>;
62
+ export type ListAccountsResponse = Infer<typeof ListAccountsResponseStruct>;
63
+ export declare const GetAccountRequestStruct: import("@metamask/superstruct").Struct<{
64
+ method: "keyring_getAccount";
65
+ id: string | number | null;
66
+ jsonrpc: "2.0";
67
+ params: {
68
+ id: string;
69
+ };
70
+ }, {
71
+ method: import("@metamask/superstruct").Struct<"keyring_getAccount", "keyring_getAccount">;
72
+ params: import("@metamask/superstruct").Struct<{
73
+ id: string;
74
+ }, {
75
+ id: import("@metamask/superstruct").Struct<string, null>;
76
+ }>;
77
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
78
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
79
+ }>;
80
+ export type GetAccountRequest = Infer<typeof GetAccountRequestStruct>;
81
+ export declare const GetAccountResponseStruct: import("@metamask/superstruct").Struct<{
82
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
83
+ id: string;
84
+ options: Record<string, import("@metamask/utils").Json>;
85
+ address: string;
86
+ methods: string[];
87
+ }, {
88
+ id: import("@metamask/superstruct").Struct<string, null>;
89
+ type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
90
+ "eip155:eoa": "eip155:eoa";
91
+ "eip155:erc4337": "eip155:erc4337";
92
+ "bip122:p2wpkh": "bip122:p2wpkh";
93
+ "solana:data-account": "solana:data-account";
94
+ }>;
95
+ address: import("@metamask/superstruct").Struct<string, null>;
96
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
97
+ methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
98
+ }>;
99
+ export type GetAccountResponse = Infer<typeof GetAccountResponseStruct>;
100
+ export declare const CreateAccountRequestStruct: import("@metamask/superstruct").Struct<{
101
+ method: "keyring_createAccount";
102
+ id: string | number | null;
103
+ jsonrpc: "2.0";
104
+ params: {
105
+ options: Record<string, import("@metamask/utils").Json>;
106
+ };
107
+ }, {
108
+ method: import("@metamask/superstruct").Struct<"keyring_createAccount", "keyring_createAccount">;
109
+ params: import("@metamask/superstruct").Struct<{
110
+ options: Record<string, import("@metamask/utils").Json>;
111
+ }, {
112
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
113
+ }>;
114
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
115
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
116
+ }>;
117
+ export type CreateAccountRequest = Infer<typeof CreateAccountRequestStruct>;
118
+ export declare const CreateAccountResponseStruct: import("@metamask/superstruct").Struct<{
119
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
120
+ id: string;
121
+ options: Record<string, import("@metamask/utils").Json>;
122
+ address: string;
123
+ methods: string[];
124
+ }, {
125
+ id: import("@metamask/superstruct").Struct<string, null>;
126
+ type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
127
+ "eip155:eoa": "eip155:eoa";
128
+ "eip155:erc4337": "eip155:erc4337";
129
+ "bip122:p2wpkh": "bip122:p2wpkh";
130
+ "solana:data-account": "solana:data-account";
131
+ }>;
132
+ address: import("@metamask/superstruct").Struct<string, null>;
133
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
134
+ methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
135
+ }>;
136
+ export type CreateAccountResponse = Infer<typeof CreateAccountResponseStruct>;
137
+ export declare const ListAccountTransactionsRequestStruct: import("@metamask/superstruct").Struct<{
138
+ method: "keyring_listAccountTransactions";
139
+ id: string | number | null;
140
+ jsonrpc: "2.0";
141
+ params: {
142
+ id: string;
143
+ pagination: {
144
+ limit: number;
145
+ next?: string | null;
146
+ };
147
+ };
148
+ }, {
149
+ method: import("@metamask/superstruct").Struct<"keyring_listAccountTransactions", "keyring_listAccountTransactions">;
150
+ params: import("@metamask/superstruct").Struct<{
151
+ id: string;
152
+ pagination: {
153
+ limit: number;
154
+ next?: string | null;
155
+ };
156
+ }, {
157
+ id: import("@metamask/superstruct").Struct<string, null>;
158
+ pagination: import("@metamask/superstruct").Struct<{
159
+ limit: number;
160
+ next?: string | null;
161
+ }, {
162
+ limit: import("@metamask/superstruct").Struct<number, null>;
163
+ next: import("@metamask/superstruct").Struct<string | import("@metamask/keyring-utils").ExactOptionalTag | null, null>;
164
+ }>;
165
+ }>;
166
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
167
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
168
+ }>;
169
+ export type ListAccountTransactionsRequest = Infer<typeof ListAccountTransactionsRequestStruct>;
170
+ export declare const ListAccountTransactionsResponseStruct: import("@metamask/superstruct").Struct<{
171
+ data: {
172
+ type: "send" | "receive";
173
+ id: string;
174
+ from: {
175
+ address: string;
176
+ asset: {
177
+ unit: string;
178
+ type: `${string}:${string}/${string}:${string}`;
179
+ fungible: true;
180
+ amount: string;
181
+ } | {
182
+ id: `${string}:${string}/${string}:${string}/${string}`;
183
+ fungible: false;
184
+ } | null;
185
+ }[];
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
+ to: {
195
+ address: string;
196
+ asset: {
197
+ unit: string;
198
+ type: `${string}:${string}/${string}:${string}`;
199
+ fungible: true;
200
+ amount: string;
201
+ } | {
202
+ id: `${string}:${string}/${string}:${string}/${string}`;
203
+ fungible: false;
204
+ } | null;
205
+ }[];
206
+ fees: {
207
+ type: "base" | "priority";
208
+ asset: {
209
+ unit: string;
210
+ type: `${string}:${string}/${string}:${string}`;
211
+ fungible: true;
212
+ amount: string;
213
+ } | {
214
+ id: `${string}:${string}/${string}:${string}/${string}`;
215
+ fungible: false;
216
+ };
217
+ }[];
218
+ }[];
219
+ next: string | null;
220
+ }, {
221
+ data: import("@metamask/superstruct").Struct<{
222
+ type: "send" | "receive";
223
+ id: string;
224
+ from: {
225
+ address: string;
226
+ asset: {
227
+ unit: string;
228
+ type: `${string}:${string}/${string}:${string}`;
229
+ fungible: true;
230
+ amount: string;
231
+ } | {
232
+ id: `${string}:${string}/${string}:${string}/${string}`;
233
+ fungible: false;
234
+ } | null;
235
+ }[];
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
+ to: {
245
+ address: string;
246
+ asset: {
247
+ unit: string;
248
+ type: `${string}:${string}/${string}:${string}`;
249
+ fungible: true;
250
+ amount: string;
251
+ } | {
252
+ id: `${string}:${string}/${string}:${string}/${string}`;
253
+ fungible: false;
254
+ } | null;
255
+ }[];
256
+ fees: {
257
+ type: "base" | "priority";
258
+ asset: {
259
+ unit: string;
260
+ type: `${string}:${string}/${string}:${string}`;
261
+ fungible: true;
262
+ amount: string;
263
+ } | {
264
+ id: `${string}:${string}/${string}:${string}/${string}`;
265
+ fungible: false;
266
+ };
267
+ }[];
268
+ }[], import("@metamask/superstruct").Struct<{
269
+ type: "send" | "receive";
270
+ id: string;
271
+ from: {
272
+ address: string;
273
+ asset: {
274
+ unit: string;
275
+ type: `${string}:${string}/${string}:${string}`;
276
+ fungible: true;
277
+ amount: string;
278
+ } | {
279
+ id: `${string}:${string}/${string}:${string}/${string}`;
280
+ fungible: false;
281
+ } | null;
282
+ }[];
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
+ to: {
292
+ address: string;
293
+ asset: {
294
+ unit: string;
295
+ type: `${string}:${string}/${string}:${string}`;
296
+ fungible: true;
297
+ amount: string;
298
+ } | {
299
+ id: `${string}:${string}/${string}:${string}/${string}`;
300
+ fungible: false;
301
+ } | null;
302
+ }[];
303
+ fees: {
304
+ type: "base" | "priority";
305
+ asset: {
306
+ unit: string;
307
+ type: `${string}:${string}/${string}:${string}`;
308
+ fungible: true;
309
+ amount: string;
310
+ } | {
311
+ id: `${string}:${string}/${string}:${string}/${string}`;
312
+ fungible: false;
313
+ };
314
+ }[];
315
+ }, {
316
+ id: import("@metamask/superstruct").Struct<string, null>;
317
+ chain: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
318
+ account: import("@metamask/superstruct").Struct<string, null>;
319
+ status: import("@metamask/superstruct").Struct<"submitted" | "unconfirmed" | "confirmed" | "failed", {
320
+ submitted: "submitted";
321
+ unconfirmed: "unconfirmed";
322
+ confirmed: "confirmed";
323
+ failed: "failed";
324
+ }>;
325
+ timestamp: import("@metamask/superstruct").Struct<number | null, null>;
326
+ type: import("@metamask/superstruct").Struct<"send" | "receive", {
327
+ send: "send";
328
+ receive: "receive";
329
+ }>;
330
+ from: import("@metamask/superstruct").Struct<{
331
+ address: string;
332
+ asset: {
333
+ unit: string;
334
+ type: `${string}:${string}/${string}:${string}`;
335
+ fungible: true;
336
+ amount: string;
337
+ } | {
338
+ id: `${string}:${string}/${string}:${string}/${string}`;
339
+ fungible: false;
340
+ } | null;
341
+ }[], import("@metamask/superstruct").Struct<{
342
+ address: string;
343
+ asset: {
344
+ unit: string;
345
+ type: `${string}:${string}/${string}:${string}`;
346
+ fungible: true;
347
+ amount: string;
348
+ } | {
349
+ id: `${string}:${string}/${string}:${string}/${string}`;
350
+ fungible: false;
351
+ } | null;
352
+ }, {
353
+ address: import("@metamask/superstruct").Struct<string, null>;
354
+ asset: import("@metamask/superstruct").Struct<{
355
+ unit: string;
356
+ type: `${string}:${string}/${string}:${string}`;
357
+ fungible: true;
358
+ amount: string;
359
+ } | {
360
+ id: `${string}:${string}/${string}:${string}/${string}`;
361
+ fungible: false;
362
+ } | null, null>;
363
+ }>>;
364
+ to: import("@metamask/superstruct").Struct<{
365
+ address: string;
366
+ asset: {
367
+ unit: string;
368
+ type: `${string}:${string}/${string}:${string}`;
369
+ fungible: true;
370
+ amount: string;
371
+ } | {
372
+ id: `${string}:${string}/${string}:${string}/${string}`;
373
+ fungible: false;
374
+ } | null;
375
+ }[], import("@metamask/superstruct").Struct<{
376
+ address: string;
377
+ asset: {
378
+ unit: string;
379
+ type: `${string}:${string}/${string}:${string}`;
380
+ fungible: true;
381
+ amount: string;
382
+ } | {
383
+ id: `${string}:${string}/${string}:${string}/${string}`;
384
+ fungible: false;
385
+ } | null;
386
+ }, {
387
+ address: import("@metamask/superstruct").Struct<string, null>;
388
+ asset: import("@metamask/superstruct").Struct<{
389
+ unit: string;
390
+ type: `${string}:${string}/${string}:${string}`;
391
+ fungible: true;
392
+ amount: string;
393
+ } | {
394
+ id: `${string}:${string}/${string}:${string}/${string}`;
395
+ fungible: false;
396
+ } | null, null>;
397
+ }>>;
398
+ fees: import("@metamask/superstruct").Struct<{
399
+ type: "base" | "priority";
400
+ asset: {
401
+ unit: string;
402
+ type: `${string}:${string}/${string}:${string}`;
403
+ fungible: true;
404
+ amount: string;
405
+ } | {
406
+ id: `${string}:${string}/${string}:${string}/${string}`;
407
+ fungible: false;
408
+ };
409
+ }[], import("@metamask/superstruct").Struct<{
410
+ type: "base" | "priority";
411
+ asset: {
412
+ unit: string;
413
+ type: `${string}:${string}/${string}:${string}`;
414
+ fungible: true;
415
+ amount: string;
416
+ } | {
417
+ id: `${string}:${string}/${string}:${string}/${string}`;
418
+ fungible: false;
419
+ };
420
+ }, {
421
+ type: import("@metamask/superstruct").Struct<"base" | "priority", {
422
+ base: "base";
423
+ priority: "priority";
424
+ }>;
425
+ asset: import("@metamask/superstruct").Struct<{
426
+ unit: string;
427
+ type: `${string}:${string}/${string}:${string}`;
428
+ fungible: true;
429
+ amount: string;
430
+ } | {
431
+ id: `${string}:${string}/${string}:${string}/${string}`;
432
+ fungible: false;
433
+ }, null>;
434
+ }>>;
435
+ events: import("@metamask/superstruct").Struct<{
436
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
437
+ timestamp: number | null;
438
+ }[], import("@metamask/superstruct").Struct<{
439
+ status: "submitted" | "unconfirmed" | "confirmed" | "failed";
440
+ timestamp: number | null;
441
+ }, {
442
+ status: import("@metamask/superstruct").Struct<"submitted" | "unconfirmed" | "confirmed" | "failed", {
443
+ submitted: "submitted";
444
+ unconfirmed: "unconfirmed";
445
+ confirmed: "confirmed";
446
+ failed: "failed";
447
+ }>;
448
+ timestamp: import("@metamask/superstruct").Struct<number | null, null>;
449
+ }>>;
450
+ }>>;
451
+ next: import("@metamask/superstruct").Struct<string | null, null>;
452
+ }>;
453
+ export type ListAccountTransactionsResponse = Infer<typeof ListAccountTransactionsResponseStruct>;
454
+ export declare const GetAccountBalancesRequestStruct: import("@metamask/superstruct").Struct<{
455
+ method: "keyring_getAccountBalances";
456
+ id: string | number | null;
457
+ jsonrpc: "2.0";
458
+ params: {
459
+ id: string;
460
+ assets: string[];
461
+ };
462
+ }, {
463
+ method: import("@metamask/superstruct").Struct<"keyring_getAccountBalances", "keyring_getAccountBalances">;
464
+ params: import("@metamask/superstruct").Struct<{
465
+ id: string;
466
+ assets: string[];
467
+ }, {
468
+ id: import("@metamask/superstruct").Struct<string, null>;
469
+ assets: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
470
+ }>;
471
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
472
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
473
+ }>;
474
+ export type GetAccountBalancesRequest = Infer<typeof GetAccountBalancesRequestStruct>;
475
+ export declare const GetAccountBalancesResponseStruct: import("@metamask/superstruct").Struct<Record<string, {
476
+ unit: string;
477
+ amount: string;
478
+ }>, null>;
479
+ export type GetAccountBalancesResponse = Infer<typeof GetAccountBalancesResponseStruct>;
480
+ export declare const FilterAccountChainsStruct: import("@metamask/superstruct").Struct<{
481
+ method: "keyring_filterAccountChains";
482
+ id: string | number | null;
483
+ jsonrpc: "2.0";
484
+ params: {
485
+ id: string;
486
+ chains: string[];
487
+ };
488
+ }, {
489
+ method: import("@metamask/superstruct").Struct<"keyring_filterAccountChains", "keyring_filterAccountChains">;
490
+ params: import("@metamask/superstruct").Struct<{
491
+ id: string;
492
+ chains: string[];
493
+ }, {
494
+ id: import("@metamask/superstruct").Struct<string, null>;
495
+ chains: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
496
+ }>;
497
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
498
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
499
+ }>;
500
+ export type FilterAccountChainsRequest = Infer<typeof FilterAccountChainsStruct>;
501
+ export declare const FilterAccountChainsResponseStruct: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
502
+ export type FilterAccountChainsResponse = Infer<typeof FilterAccountChainsResponseStruct>;
503
+ export declare const UpdateAccountRequestStruct: import("@metamask/superstruct").Struct<{
504
+ method: "keyring_updateAccount";
505
+ id: string | number | null;
506
+ jsonrpc: "2.0";
507
+ params: {
508
+ account: {
509
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
510
+ id: string;
511
+ options: Record<string, import("@metamask/utils").Json>;
512
+ address: string;
513
+ methods: string[];
514
+ };
515
+ };
516
+ }, {
517
+ method: import("@metamask/superstruct").Struct<"keyring_updateAccount", "keyring_updateAccount">;
518
+ params: import("@metamask/superstruct").Struct<{
519
+ account: {
520
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
521
+ id: string;
522
+ options: Record<string, import("@metamask/utils").Json>;
523
+ address: string;
524
+ methods: string[];
525
+ };
526
+ }, {
527
+ account: import("@metamask/superstruct").Struct<{
528
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
529
+ id: string;
530
+ options: Record<string, import("@metamask/utils").Json>;
531
+ address: string;
532
+ methods: string[];
533
+ }, {
534
+ id: import("@metamask/superstruct").Struct<string, null>;
535
+ type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
536
+ "eip155:eoa": "eip155:eoa";
537
+ "eip155:erc4337": "eip155:erc4337";
538
+ "bip122:p2wpkh": "bip122:p2wpkh";
539
+ "solana:data-account": "solana:data-account";
540
+ }>;
541
+ address: import("@metamask/superstruct").Struct<string, null>;
542
+ options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
543
+ methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
544
+ }>;
545
+ }>;
546
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
547
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
548
+ }>;
549
+ export type UpdateAccountRequest = Infer<typeof UpdateAccountRequestStruct>;
550
+ export declare const UpdateAccountResponseStruct: import("@metamask/superstruct").Struct<null, null>;
551
+ export type UpdateAccountResponse = Infer<typeof UpdateAccountResponseStruct>;
552
+ export declare const DeleteAccountRequestStruct: import("@metamask/superstruct").Struct<{
553
+ method: "keyring_deleteAccount";
554
+ id: string | number | null;
555
+ jsonrpc: "2.0";
556
+ params: {
557
+ id: string;
558
+ };
559
+ }, {
560
+ method: import("@metamask/superstruct").Struct<"keyring_deleteAccount", "keyring_deleteAccount">;
561
+ params: import("@metamask/superstruct").Struct<{
562
+ id: string;
563
+ }, {
564
+ id: import("@metamask/superstruct").Struct<string, null>;
565
+ }>;
566
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
567
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
568
+ }>;
569
+ export type DeleteAccountRequest = Infer<typeof DeleteAccountRequestStruct>;
570
+ export declare const DeleteAccountResponseStruct: import("@metamask/superstruct").Struct<null, null>;
571
+ export type DeleteAccountResponse = Infer<typeof DeleteAccountResponseStruct>;
572
+ export declare const ExportAccountRequestStruct: import("@metamask/superstruct").Struct<{
573
+ method: "keyring_exportAccount";
574
+ id: string | number | null;
575
+ jsonrpc: "2.0";
576
+ params: {
577
+ id: string;
578
+ };
579
+ }, {
580
+ method: import("@metamask/superstruct").Struct<"keyring_exportAccount", "keyring_exportAccount">;
581
+ params: import("@metamask/superstruct").Struct<{
582
+ id: string;
583
+ }, {
584
+ id: import("@metamask/superstruct").Struct<string, null>;
585
+ }>;
586
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
587
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
588
+ }>;
589
+ export type ExportAccountRequest = Infer<typeof ExportAccountRequestStruct>;
590
+ export declare const ExportAccountResponseStruct: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
591
+ export type ExportAccountResponse = Infer<typeof ExportAccountResponseStruct>;
592
+ export declare const ListRequestsRequestStruct: import("@metamask/superstruct").Struct<{
593
+ method: "keyring_listRequests";
594
+ id: string | number | null;
595
+ jsonrpc: "2.0";
596
+ }, {
597
+ method: import("@metamask/superstruct").Struct<"keyring_listRequests", "keyring_listRequests">;
598
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
599
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
600
+ }>;
601
+ export type ListRequestsRequest = Infer<typeof ListRequestsRequestStruct>;
602
+ export declare const ListRequestsResponseStruct: import("@metamask/superstruct").Struct<{
603
+ id: string;
604
+ request: {
605
+ method: string;
606
+ params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
607
+ };
608
+ scope: string;
609
+ account: string;
610
+ }[], import("@metamask/superstruct").Struct<{
611
+ id: string;
612
+ request: {
613
+ method: string;
614
+ params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
615
+ };
616
+ scope: string;
617
+ account: string;
618
+ }, {
619
+ id: import("@metamask/superstruct").Struct<string, null>;
620
+ scope: import("@metamask/superstruct").Struct<string, null>;
621
+ account: import("@metamask/superstruct").Struct<string, null>;
622
+ request: import("@metamask/superstruct").Struct<{
623
+ method: string;
624
+ params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
625
+ }, {
626
+ method: import("@metamask/superstruct").Struct<string, null>;
627
+ params: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[], null>;
628
+ }>;
629
+ }>>;
630
+ export type ListRequestsResponse = Infer<typeof ListRequestsResponseStruct>;
631
+ export declare const GetRequestRequestStruct: import("@metamask/superstruct").Struct<{
632
+ method: "keyring_getRequest";
633
+ id: string | number | null;
634
+ jsonrpc: "2.0";
635
+ params: {
636
+ id: string;
637
+ };
638
+ }, {
639
+ method: import("@metamask/superstruct").Struct<"keyring_getRequest", "keyring_getRequest">;
640
+ params: import("@metamask/superstruct").Struct<{
641
+ id: string;
642
+ }, {
643
+ id: import("@metamask/superstruct").Struct<string, null>;
644
+ }>;
645
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
646
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
647
+ }>;
648
+ export type GetRequestRequest = Infer<typeof GetRequestRequestStruct>;
649
+ export declare const GetRequestResponseStruct: import("@metamask/superstruct").Struct<{
650
+ id: string;
651
+ request: {
652
+ method: string;
653
+ params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
654
+ };
655
+ scope: string;
656
+ account: string;
657
+ }, {
658
+ id: import("@metamask/superstruct").Struct<string, null>;
659
+ scope: import("@metamask/superstruct").Struct<string, null>;
660
+ account: import("@metamask/superstruct").Struct<string, null>;
661
+ request: import("@metamask/superstruct").Struct<{
662
+ method: string;
663
+ params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
664
+ }, {
665
+ method: import("@metamask/superstruct").Struct<string, null>;
666
+ params: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[], null>;
667
+ }>;
668
+ }>;
669
+ export type GetRequestResponse = Infer<typeof GetRequestResponseStruct>;
670
+ export declare const SubmitRequestRequestStruct: import("@metamask/superstruct").Struct<{
671
+ method: "keyring_submitRequest";
672
+ id: string | number | null;
673
+ jsonrpc: "2.0";
674
+ params: {
675
+ id: string;
676
+ request: {
677
+ method: string;
678
+ params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
679
+ };
680
+ scope: string;
681
+ account: string;
682
+ };
683
+ }, {
684
+ method: import("@metamask/superstruct").Struct<"keyring_submitRequest", "keyring_submitRequest">;
685
+ params: import("@metamask/superstruct").Struct<{
686
+ id: string;
687
+ request: {
688
+ method: string;
689
+ params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
690
+ };
691
+ scope: string;
692
+ account: string;
693
+ }, {
694
+ id: import("@metamask/superstruct").Struct<string, null>;
695
+ scope: import("@metamask/superstruct").Struct<string, null>;
696
+ account: import("@metamask/superstruct").Struct<string, null>;
697
+ request: import("@metamask/superstruct").Struct<{
698
+ method: string;
699
+ params?: Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[];
700
+ }, {
701
+ method: import("@metamask/superstruct").Struct<string, null>;
702
+ params: import("@metamask/superstruct").Struct<import("@metamask/keyring-utils").ExactOptionalTag | Record<string, import("@metamask/utils").Json> | import("@metamask/utils").Json[], null>;
703
+ }>;
704
+ }>;
705
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
706
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
707
+ }>;
708
+ export type SubmitRequestRequest = Infer<typeof SubmitRequestRequestStruct>;
709
+ export declare const SubmitRequestResponseStruct: import("@metamask/superstruct").Struct<{
710
+ pending: true;
711
+ redirect?: {
712
+ message?: string;
713
+ url?: string;
714
+ };
715
+ } | {
716
+ result: import("@metamask/utils").Json;
717
+ pending: false;
718
+ }, null>;
719
+ export type SubmitRequestResponse = Infer<typeof SubmitRequestResponseStruct>;
720
+ export declare const ApproveRequestRequestStruct: import("@metamask/superstruct").Struct<{
721
+ method: "keyring_approveRequest";
722
+ id: string | number | null;
723
+ jsonrpc: "2.0";
724
+ params: {
725
+ data: Record<string, import("@metamask/utils").Json>;
726
+ id: string;
727
+ };
728
+ }, {
729
+ method: import("@metamask/superstruct").Struct<"keyring_approveRequest", "keyring_approveRequest">;
730
+ params: import("@metamask/superstruct").Struct<{
731
+ data: Record<string, import("@metamask/utils").Json>;
732
+ id: string;
733
+ }, {
734
+ id: import("@metamask/superstruct").Struct<string, null>;
735
+ data: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
736
+ }>;
737
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
738
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
739
+ }>;
740
+ export type ApproveRequestRequest = Infer<typeof ApproveRequestRequestStruct>;
741
+ export declare const ApproveRequestResponseStruct: import("@metamask/superstruct").Struct<null, null>;
742
+ export type ApproveRequestResponse = Infer<typeof ApproveRequestResponseStruct>;
743
+ export declare const RejectRequestRequestStruct: import("@metamask/superstruct").Struct<{
744
+ method: "keyring_rejectRequest";
745
+ id: string | number | null;
746
+ jsonrpc: "2.0";
747
+ params: {
748
+ id: string;
749
+ };
750
+ }, {
751
+ method: import("@metamask/superstruct").Struct<"keyring_rejectRequest", "keyring_rejectRequest">;
752
+ params: import("@metamask/superstruct").Struct<{
753
+ id: string;
754
+ }, {
755
+ id: import("@metamask/superstruct").Struct<string, null>;
756
+ }>;
757
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
758
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
759
+ }>;
760
+ export type RejectRequestRequest = Infer<typeof RejectRequestRequestStruct>;
761
+ export declare const RejectRequestResponseStruct: import("@metamask/superstruct").Struct<null, null>;
762
+ export type RejectRequestResponse = Infer<typeof RejectRequestResponseStruct>;
763
+ //# sourceMappingURL=rpc.d.cts.map