@metamask/keyring-api 11.1.0 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/dist/api/account.cjs +7 -4
  3. package/dist/api/account.cjs.map +1 -1
  4. package/dist/api/account.d.cts +6 -1
  5. package/dist/api/account.d.cts.map +1 -1
  6. package/dist/api/account.d.mts +6 -1
  7. package/dist/api/account.d.mts.map +1 -1
  8. package/dist/api/account.mjs +7 -4
  9. package/dist/api/account.mjs.map +1 -1
  10. package/dist/api/asset.cjs +5 -6
  11. package/dist/api/asset.cjs.map +1 -1
  12. package/dist/api/asset.d.cts +2 -2
  13. package/dist/api/asset.d.cts.map +1 -1
  14. package/dist/api/asset.d.mts +2 -2
  15. package/dist/api/asset.d.mts.map +1 -1
  16. package/dist/api/asset.mjs +1 -2
  17. package/dist/api/asset.mjs.map +1 -1
  18. package/dist/api/balance.cjs +3 -4
  19. package/dist/api/balance.cjs.map +1 -1
  20. package/dist/api/balance.d.cts.map +1 -1
  21. package/dist/api/balance.d.mts.map +1 -1
  22. package/dist/api/balance.mjs +1 -2
  23. package/dist/api/balance.mjs.map +1 -1
  24. package/dist/api/caip.cjs +3 -3
  25. package/dist/api/caip.cjs.map +1 -1
  26. package/dist/api/caip.d.cts.map +1 -1
  27. package/dist/api/caip.d.mts.map +1 -1
  28. package/dist/api/caip.mjs +1 -1
  29. package/dist/api/caip.mjs.map +1 -1
  30. package/dist/api/index.cjs +1 -0
  31. package/dist/api/index.cjs.map +1 -1
  32. package/dist/api/index.d.cts +1 -0
  33. package/dist/api/index.d.cts.map +1 -1
  34. package/dist/api/index.d.mts +1 -0
  35. package/dist/api/index.d.mts.map +1 -1
  36. package/dist/api/index.mjs +1 -0
  37. package/dist/api/index.mjs.map +1 -1
  38. package/dist/api/keyring.cjs +2 -0
  39. package/dist/api/keyring.cjs.map +1 -1
  40. package/dist/api/keyring.d.cts +1 -1
  41. package/dist/api/keyring.d.cts.map +1 -1
  42. package/dist/api/keyring.d.mts +1 -1
  43. package/dist/api/keyring.d.mts.map +1 -1
  44. package/dist/api/keyring.mjs +2 -0
  45. package/dist/api/keyring.mjs.map +1 -1
  46. package/dist/{utils → api}/pagination.cjs +3 -3
  47. package/dist/api/pagination.cjs.map +1 -0
  48. package/dist/{utils → api}/pagination.d.cts +1 -1
  49. package/dist/api/pagination.d.cts.map +1 -0
  50. package/dist/{utils → api}/pagination.d.mts +1 -1
  51. package/dist/api/pagination.d.mts.map +1 -0
  52. package/dist/{utils → api}/pagination.mjs +1 -1
  53. package/dist/api/pagination.mjs.map +1 -0
  54. package/dist/api/request.cjs +6 -7
  55. package/dist/api/request.cjs.map +1 -1
  56. package/dist/api/request.d.cts +5 -5
  57. package/dist/api/request.d.cts.map +1 -1
  58. package/dist/api/request.d.mts +5 -5
  59. package/dist/api/request.d.mts.map +1 -1
  60. package/dist/api/request.mjs +1 -2
  61. package/dist/api/request.mjs.map +1 -1
  62. package/dist/api/response.cjs +6 -6
  63. package/dist/api/response.cjs.map +1 -1
  64. package/dist/api/response.d.cts +1 -1
  65. package/dist/api/response.d.cts.map +1 -1
  66. package/dist/api/response.d.mts +1 -1
  67. package/dist/api/response.d.mts.map +1 -1
  68. package/dist/api/response.mjs +1 -1
  69. package/dist/api/response.mjs.map +1 -1
  70. package/dist/api/transaction.cjs +7 -8
  71. package/dist/api/transaction.cjs.map +1 -1
  72. package/dist/api/transaction.d.cts +65 -65
  73. package/dist/api/transaction.d.cts.map +1 -1
  74. package/dist/api/transaction.d.mts +65 -65
  75. package/dist/api/transaction.d.mts.map +1 -1
  76. package/dist/api/transaction.mjs +1 -2
  77. package/dist/api/transaction.mjs.map +1 -1
  78. package/dist/btc/constants.cjs +17 -0
  79. package/dist/btc/constants.cjs.map +1 -0
  80. package/dist/btc/constants.d.cts +12 -0
  81. package/dist/btc/constants.d.cts.map +1 -0
  82. package/dist/btc/constants.d.mts +12 -0
  83. package/dist/btc/constants.d.mts.map +1 -0
  84. package/dist/btc/constants.mjs +14 -0
  85. package/dist/btc/constants.mjs.map +1 -0
  86. package/dist/btc/index.cjs +1 -0
  87. package/dist/btc/index.cjs.map +1 -1
  88. package/dist/btc/index.d.cts +1 -0
  89. package/dist/btc/index.d.cts.map +1 -1
  90. package/dist/btc/index.d.mts +1 -0
  91. package/dist/btc/index.d.mts.map +1 -1
  92. package/dist/btc/index.mjs +1 -0
  93. package/dist/btc/index.mjs.map +1 -1
  94. package/dist/btc/types.cjs +2 -2
  95. package/dist/btc/types.cjs.map +1 -1
  96. package/dist/btc/types.d.cts +3 -1
  97. package/dist/btc/types.d.cts.map +1 -1
  98. package/dist/btc/types.d.mts +3 -1
  99. package/dist/btc/types.d.mts.map +1 -1
  100. package/dist/btc/types.mjs +2 -2
  101. package/dist/btc/types.mjs.map +1 -1
  102. package/dist/eth/constants.cjs +13 -0
  103. package/dist/eth/constants.cjs.map +1 -0
  104. package/dist/eth/constants.d.cts +8 -0
  105. package/dist/eth/constants.d.cts.map +1 -0
  106. package/dist/eth/constants.d.mts +8 -0
  107. package/dist/eth/constants.d.mts.map +1 -0
  108. package/dist/eth/constants.mjs +10 -0
  109. package/dist/eth/constants.mjs.map +1 -0
  110. package/dist/eth/erc4337/types.cjs +10 -11
  111. package/dist/eth/erc4337/types.cjs.map +1 -1
  112. package/dist/eth/erc4337/types.d.cts +5 -5
  113. package/dist/eth/erc4337/types.d.cts.map +1 -1
  114. package/dist/eth/erc4337/types.d.mts +5 -5
  115. package/dist/eth/erc4337/types.d.mts.map +1 -1
  116. package/dist/eth/erc4337/types.mjs +1 -2
  117. package/dist/eth/erc4337/types.mjs.map +1 -1
  118. package/dist/eth/index.cjs +1 -0
  119. package/dist/eth/index.cjs.map +1 -1
  120. package/dist/eth/index.d.cts +1 -0
  121. package/dist/eth/index.d.cts.map +1 -1
  122. package/dist/eth/index.d.mts +1 -0
  123. package/dist/eth/index.d.mts.map +1 -1
  124. package/dist/eth/index.mjs +1 -0
  125. package/dist/eth/index.mjs.map +1 -1
  126. package/dist/eth/types.cjs +11 -6
  127. package/dist/eth/types.cjs.map +1 -1
  128. package/dist/eth/types.d.cts +10 -2
  129. package/dist/eth/types.d.cts.map +1 -1
  130. package/dist/eth/types.d.mts +10 -2
  131. package/dist/eth/types.d.mts.map +1 -1
  132. package/dist/eth/types.mjs +7 -2
  133. package/dist/eth/types.mjs.map +1 -1
  134. package/dist/eth/utils.cjs.map +1 -1
  135. package/dist/eth/utils.d.cts.map +1 -1
  136. package/dist/eth/utils.d.mts.map +1 -1
  137. package/dist/eth/utils.mjs.map +1 -1
  138. package/dist/events.cjs +67 -1
  139. package/dist/events.cjs.map +1 -1
  140. package/dist/events.d.cts +169 -0
  141. package/dist/events.d.cts.map +1 -1
  142. package/dist/events.d.mts +169 -0
  143. package/dist/events.d.mts.map +1 -1
  144. package/dist/events.mjs +66 -0
  145. package/dist/events.mjs.map +1 -1
  146. package/dist/index.cjs +2 -8
  147. package/dist/index.cjs.map +1 -1
  148. package/dist/index.d.cts +3 -9
  149. package/dist/index.d.cts.map +1 -1
  150. package/dist/index.d.mts +3 -9
  151. package/dist/index.d.mts.map +1 -1
  152. package/dist/index.mjs +2 -8
  153. package/dist/index.mjs.map +1 -1
  154. package/dist/{internal/api.cjs → rpc.cjs} +71 -42
  155. package/dist/rpc.cjs.map +1 -0
  156. package/dist/{internal/api.d.cts → rpc.d.cts} +141 -104
  157. package/dist/rpc.d.cts.map +1 -0
  158. package/dist/{internal/api.d.mts → rpc.d.mts} +141 -104
  159. package/dist/rpc.d.mts.map +1 -0
  160. package/dist/{internal/api.mjs → rpc.mjs} +33 -5
  161. package/dist/rpc.mjs.map +1 -0
  162. package/dist/sol/constants.cjs +15 -0
  163. package/dist/sol/constants.cjs.map +1 -0
  164. package/dist/sol/constants.d.cts +10 -0
  165. package/dist/sol/constants.d.cts.map +1 -0
  166. package/dist/sol/constants.d.mts +10 -0
  167. package/dist/sol/constants.d.mts.map +1 -0
  168. package/dist/sol/constants.mjs +12 -0
  169. package/dist/sol/constants.mjs.map +1 -0
  170. package/dist/sol/index.cjs +1 -0
  171. package/dist/sol/index.cjs.map +1 -1
  172. package/dist/sol/index.d.cts +1 -0
  173. package/dist/sol/index.d.cts.map +1 -1
  174. package/dist/sol/index.d.mts +1 -0
  175. package/dist/sol/index.d.mts.map +1 -1
  176. package/dist/sol/index.mjs +1 -0
  177. package/dist/sol/index.mjs.map +1 -1
  178. package/dist/sol/types.cjs +3 -3
  179. package/dist/sol/types.cjs.map +1 -1
  180. package/dist/sol/types.d.cts +3 -1
  181. package/dist/sol/types.d.cts.map +1 -1
  182. package/dist/sol/types.d.mts +3 -1
  183. package/dist/sol/types.d.mts.map +1 -1
  184. package/dist/sol/types.mjs +1 -1
  185. package/dist/sol/types.mjs.map +1 -1
  186. package/package.json +11 -14
  187. package/dist/JsonRpcRequest.cjs +0 -13
  188. package/dist/JsonRpcRequest.cjs.map +0 -1
  189. package/dist/JsonRpcRequest.d.cts +0 -17
  190. package/dist/JsonRpcRequest.d.cts.map +0 -1
  191. package/dist/JsonRpcRequest.d.mts +0 -17
  192. package/dist/JsonRpcRequest.d.mts.map +0 -1
  193. package/dist/JsonRpcRequest.mjs +0 -10
  194. package/dist/JsonRpcRequest.mjs.map +0 -1
  195. package/dist/KeyringClient.cjs +0 -130
  196. package/dist/KeyringClient.cjs.map +0 -1
  197. package/dist/KeyringClient.d.cts +0 -31
  198. package/dist/KeyringClient.d.cts.map +0 -1
  199. package/dist/KeyringClient.d.mts +0 -31
  200. package/dist/KeyringClient.d.mts.map +0 -1
  201. package/dist/KeyringClient.mjs +0 -126
  202. package/dist/KeyringClient.mjs.map +0 -1
  203. package/dist/KeyringSnapRpcClient.cjs +0 -68
  204. package/dist/KeyringSnapRpcClient.cjs.map +0 -1
  205. package/dist/KeyringSnapRpcClient.d.cts +0 -40
  206. package/dist/KeyringSnapRpcClient.d.cts.map +0 -1
  207. package/dist/KeyringSnapRpcClient.d.mts +0 -40
  208. package/dist/KeyringSnapRpcClient.d.mts.map +0 -1
  209. package/dist/KeyringSnapRpcClient.mjs +0 -63
  210. package/dist/KeyringSnapRpcClient.mjs.map +0 -1
  211. package/dist/internal/api.cjs.map +0 -1
  212. package/dist/internal/api.d.cts.map +0 -1
  213. package/dist/internal/api.d.mts.map +0 -1
  214. package/dist/internal/api.mjs.map +0 -1
  215. package/dist/internal/eth/EthKeyring.cjs +0 -3
  216. package/dist/internal/eth/EthKeyring.cjs.map +0 -1
  217. package/dist/internal/eth/EthKeyring.d.cts +0 -34
  218. package/dist/internal/eth/EthKeyring.d.cts.map +0 -1
  219. package/dist/internal/eth/EthKeyring.d.mts +0 -34
  220. package/dist/internal/eth/EthKeyring.d.mts.map +0 -1
  221. package/dist/internal/eth/EthKeyring.mjs +0 -2
  222. package/dist/internal/eth/EthKeyring.mjs.map +0 -1
  223. package/dist/internal/eth/index.cjs +0 -3
  224. package/dist/internal/eth/index.cjs.map +0 -1
  225. package/dist/internal/eth/index.d.cts +0 -2
  226. package/dist/internal/eth/index.d.cts.map +0 -1
  227. package/dist/internal/eth/index.d.mts +0 -2
  228. package/dist/internal/eth/index.d.mts.map +0 -1
  229. package/dist/internal/eth/index.mjs +0 -2
  230. package/dist/internal/eth/index.mjs.map +0 -1
  231. package/dist/internal/events.cjs +0 -72
  232. package/dist/internal/events.cjs.map +0 -1
  233. package/dist/internal/events.d.cts +0 -162
  234. package/dist/internal/events.d.cts.map +0 -1
  235. package/dist/internal/events.d.mts +0 -162
  236. package/dist/internal/events.d.mts.map +0 -1
  237. package/dist/internal/events.mjs +0 -69
  238. package/dist/internal/events.mjs.map +0 -1
  239. package/dist/internal/index.cjs +0 -21
  240. package/dist/internal/index.cjs.map +0 -1
  241. package/dist/internal/index.d.cts +0 -6
  242. package/dist/internal/index.d.cts.map +0 -1
  243. package/dist/internal/index.d.mts +0 -6
  244. package/dist/internal/index.d.mts.map +0 -1
  245. package/dist/internal/index.mjs +0 -5
  246. package/dist/internal/index.mjs.map +0 -1
  247. package/dist/internal/rpc.cjs +0 -34
  248. package/dist/internal/rpc.cjs.map +0 -1
  249. package/dist/internal/rpc.d.cts +0 -27
  250. package/dist/internal/rpc.d.cts.map +0 -1
  251. package/dist/internal/rpc.d.mts +0 -27
  252. package/dist/internal/rpc.d.mts.map +0 -1
  253. package/dist/internal/rpc.mjs +0 -30
  254. package/dist/internal/rpc.mjs.map +0 -1
  255. package/dist/internal/types.cjs +0 -52
  256. package/dist/internal/types.cjs.map +0 -1
  257. package/dist/internal/types.d.cts +0 -392
  258. package/dist/internal/types.d.cts.map +0 -1
  259. package/dist/internal/types.d.mts +0 -392
  260. package/dist/internal/types.d.mts.map +0 -1
  261. package/dist/internal/types.mjs +0 -49
  262. package/dist/internal/types.mjs.map +0 -1
  263. package/dist/rpc-handler.cjs +0 -143
  264. package/dist/rpc-handler.cjs.map +0 -1
  265. package/dist/rpc-handler.d.cts +0 -30
  266. package/dist/rpc-handler.d.cts.map +0 -1
  267. package/dist/rpc-handler.d.mts +0 -30
  268. package/dist/rpc-handler.d.mts.map +0 -1
  269. package/dist/rpc-handler.mjs +0 -138
  270. package/dist/rpc-handler.mjs.map +0 -1
  271. package/dist/snap-utils.cjs +0 -20
  272. package/dist/snap-utils.cjs.map +0 -1
  273. package/dist/snap-utils.d.cts +0 -12
  274. package/dist/snap-utils.d.cts.map +0 -1
  275. package/dist/snap-utils.d.mts +0 -12
  276. package/dist/snap-utils.d.mts.map +0 -1
  277. package/dist/snap-utils.mjs +0 -17
  278. package/dist/snap-utils.mjs.map +0 -1
  279. package/dist/superstruct.cjs +0 -109
  280. package/dist/superstruct.cjs.map +0 -1
  281. package/dist/superstruct.d.cts +0 -102
  282. package/dist/superstruct.d.cts.map +0 -1
  283. package/dist/superstruct.d.mts +0 -102
  284. package/dist/superstruct.d.mts.map +0 -1
  285. package/dist/superstruct.mjs +0 -102
  286. package/dist/superstruct.mjs.map +0 -1
  287. package/dist/utils/index.cjs +0 -20
  288. package/dist/utils/index.cjs.map +0 -1
  289. package/dist/utils/index.d.cts +0 -4
  290. package/dist/utils/index.d.cts.map +0 -1
  291. package/dist/utils/index.d.mts +0 -4
  292. package/dist/utils/index.d.mts.map +0 -1
  293. package/dist/utils/index.mjs +0 -4
  294. package/dist/utils/index.mjs.map +0 -1
  295. package/dist/utils/pagination.cjs.map +0 -1
  296. package/dist/utils/pagination.d.cts.map +0 -1
  297. package/dist/utils/pagination.d.mts.map +0 -1
  298. package/dist/utils/pagination.mjs.map +0 -1
  299. package/dist/utils/types.cjs +0 -29
  300. package/dist/utils/types.cjs.map +0 -1
  301. package/dist/utils/types.d.cts +0 -42
  302. package/dist/utils/types.d.cts.map +0 -1
  303. package/dist/utils/types.d.mts +0 -42
  304. package/dist/utils/types.d.mts.map +0 -1
  305. package/dist/utils/types.mjs +0 -26
  306. package/dist/utils/types.mjs.map +0 -1
  307. package/dist/utils/typing.cjs +0 -20
  308. package/dist/utils/typing.cjs.map +0 -1
  309. package/dist/utils/typing.d.cts +0 -33
  310. package/dist/utils/typing.d.cts.map +0 -1
  311. package/dist/utils/typing.d.mts +0 -33
  312. package/dist/utils/typing.d.mts.map +0 -1
  313. package/dist/utils/typing.mjs +0 -17
  314. package/dist/utils/typing.mjs.map +0 -1
@@ -1,34 +0,0 @@
1
- import type { Json, Keyring } from "@metamask/utils";
2
- import type { KeyringExecutionContext } from "../../contexts.mjs";
3
- import type { EthBaseTransaction, EthBaseUserOperation, EthUserOperation, EthUserOperationPatch } from "../../eth/index.mjs";
4
- export type EthKeyring<State extends Json> = Keyring<State> & {
5
- /**
6
- * Convert a base transaction to a base UserOperation.
7
- *
8
- * @param address - Address of the sender.
9
- * @param transactions - Base transactions to include in the UserOperation.
10
- * @param context - Keyring execution context.
11
- * @returns A pseudo-UserOperation that can be used to construct a real.
12
- */
13
- prepareUserOperation?(address: string, transactions: EthBaseTransaction[], context: KeyringExecutionContext): Promise<EthBaseUserOperation>;
14
- /**
15
- * Patches properties of a UserOperation. Currently, only the
16
- * `paymasterAndData` can be patched.
17
- *
18
- * @param address - Address of the sender.
19
- * @param userOp - UserOperation to patch.
20
- * @param context - Keyring execution context.
21
- * @returns A patch to apply to the UserOperation.
22
- */
23
- patchUserOperation?(address: string, userOp: EthUserOperation, context: KeyringExecutionContext): Promise<EthUserOperationPatch>;
24
- /**
25
- * Signs an UserOperation.
26
- *
27
- * @param address - Address of the sender.
28
- * @param userOp - UserOperation to sign.
29
- * @param context - Keyring execution context.
30
- * @returns The signature of the UserOperation.
31
- */
32
- signUserOperation?(address: string, userOp: EthUserOperation, context: KeyringExecutionContext): Promise<string>;
33
- };
34
- //# sourceMappingURL=EthKeyring.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EthKeyring.d.mts","sourceRoot":"","sources":["../../../src/internal/eth/EthKeyring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,wBAAwB;AAErD,OAAO,KAAK,EAAE,uBAAuB,EAAE,2BAAuB;AAC9D,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACtB,4BAAkB;AAEnB,MAAM,MAAM,UAAU,CAAC,KAAK,SAAS,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG;IAC5D;;;;;;;OAOG;IACH,oBAAoB,CAAC,CACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,kBAAkB,EAAE,EAClC,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEjC;;;;;;;;OAQG;IACH,kBAAkB,CAAC,CACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAElC;;;;;;;OAOG;IACH,iBAAiB,CAAC,CAChB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,MAAM,CAAC,CAAC;CACpB,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=EthKeyring.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EthKeyring.mjs","sourceRoot":"","sources":["../../../src/internal/eth/EthKeyring.ts"],"names":[],"mappings":"","sourcesContent":["import type { Json, Keyring } from '@metamask/utils';\n\nimport type { KeyringExecutionContext } from '../../contexts';\nimport type {\n EthBaseTransaction,\n EthBaseUserOperation,\n EthUserOperation,\n EthUserOperationPatch,\n} from '../../eth';\n\nexport type EthKeyring<State extends Json> = Keyring<State> & {\n /**\n * Convert a base transaction to a base UserOperation.\n *\n * @param address - Address of the sender.\n * @param transactions - Base transactions to include in the UserOperation.\n * @param context - Keyring execution context.\n * @returns A pseudo-UserOperation that can be used to construct a real.\n */\n prepareUserOperation?(\n address: string,\n transactions: EthBaseTransaction[],\n context: KeyringExecutionContext,\n ): Promise<EthBaseUserOperation>;\n\n /**\n * Patches properties of a UserOperation. Currently, only the\n * `paymasterAndData` can be patched.\n *\n * @param address - Address of the sender.\n * @param userOp - UserOperation to patch.\n * @param context - Keyring execution context.\n * @returns A patch to apply to the UserOperation.\n */\n patchUserOperation?(\n address: string,\n userOp: EthUserOperation,\n context: KeyringExecutionContext,\n ): Promise<EthUserOperationPatch>;\n\n /**\n * Signs an UserOperation.\n *\n * @param address - Address of the sender.\n * @param userOp - UserOperation to sign.\n * @param context - Keyring execution context.\n * @returns The signature of the UserOperation.\n */\n signUserOperation?(\n address: string,\n userOp: EthUserOperation,\n context: KeyringExecutionContext,\n ): Promise<string>;\n};\n"]}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/internal/eth/index.ts"],"names":[],"mappings":"","sourcesContent":["export type * from './EthKeyring';\n"]}
@@ -1,2 +0,0 @@
1
- export type * from "./EthKeyring.cjs";
2
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/internal/eth/index.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
@@ -1,2 +0,0 @@
1
- export type * from "./EthKeyring.mjs";
2
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/internal/eth/index.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/internal/eth/index.ts"],"names":[],"mappings":"","sourcesContent":["export type * from './EthKeyring';\n"]}
@@ -1,72 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequestRejectedEventStruct = exports.RequestApprovedEventStruct = exports.AccountDeletedEventStruct = exports.AccountUpdatedEventStruct = exports.AccountCreatedEventStruct = void 0;
4
- const superstruct_1 = require("@metamask/superstruct");
5
- const utils_1 = require("@metamask/utils");
6
- const api_1 = require("../api/index.cjs");
7
- const events_1 = require("../events.cjs");
8
- const superstruct_2 = require("../superstruct.cjs");
9
- const utils_2 = require("../utils/index.cjs");
10
- exports.AccountCreatedEventStruct = (0, superstruct_2.object)({
11
- method: (0, superstruct_1.literal)(`${events_1.KeyringEvent.AccountCreated}`),
12
- params: (0, superstruct_2.object)({
13
- /**
14
- * New account object.
15
- */
16
- account: api_1.KeyringAccountStruct,
17
- /**
18
- * Account name suggestion provided to the MetaMask client.
19
- *
20
- * The keyring can suggest a name for the account, but it's up to the
21
- * client to decide whether to use it. The keyring won't be informed if the
22
- * client decides to use a different name.
23
- */
24
- accountNameSuggestion: (0, superstruct_2.exactOptional)((0, superstruct_1.string)()),
25
- /**
26
- * Instructs MetaMask to display the add account confirmation dialog in the UI.
27
- * **Note:** This is not guaranteed to be honored by the MetaMask client.
28
- */
29
- displayConfirmation: (0, superstruct_2.exactOptional)((0, superstruct_1.boolean)()),
30
- }),
31
- });
32
- exports.AccountUpdatedEventStruct = (0, superstruct_2.object)({
33
- method: (0, superstruct_1.literal)(`${events_1.KeyringEvent.AccountUpdated}`),
34
- params: (0, superstruct_2.object)({
35
- /**
36
- * Updated account object.
37
- */
38
- account: api_1.KeyringAccountStruct,
39
- }),
40
- });
41
- exports.AccountDeletedEventStruct = (0, superstruct_2.object)({
42
- method: (0, superstruct_1.literal)(`${events_1.KeyringEvent.AccountDeleted}`),
43
- params: (0, superstruct_2.object)({
44
- /**
45
- * Deleted account ID.
46
- */
47
- id: utils_2.UuidStruct,
48
- }),
49
- });
50
- exports.RequestApprovedEventStruct = (0, superstruct_2.object)({
51
- method: (0, superstruct_1.literal)(`${events_1.KeyringEvent.RequestApproved}`),
52
- params: (0, superstruct_2.object)({
53
- /**
54
- * Request ID.
55
- */
56
- id: utils_2.UuidStruct,
57
- /**
58
- * Request result.
59
- */
60
- result: utils_1.JsonStruct,
61
- }),
62
- });
63
- exports.RequestRejectedEventStruct = (0, superstruct_2.object)({
64
- method: (0, superstruct_1.literal)(`${events_1.KeyringEvent.RequestRejected}`),
65
- params: (0, superstruct_2.object)({
66
- /**
67
- * Request ID.
68
- */
69
- id: utils_2.UuidStruct,
70
- }),
71
- });
72
- //# sourceMappingURL=events.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.cjs","sourceRoot":"","sources":["../../src/internal/events.ts"],"names":[],"mappings":";;;AAAA,uDAAiE;AACjE,2CAA6C;AAE7C,0CAA8C;AAC9C,0CAAyC;AACzC,oDAAuD;AACvD,8CAAsC;AAEzB,QAAA,yBAAyB,GAAG,IAAA,oBAAM,EAAC;IAC9C,MAAM,EAAE,IAAA,qBAAO,EAAC,GAAG,qBAAY,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,EAAE,IAAA,oBAAM,EAAC;QACb;;WAEG;QACH,OAAO,EAAE,0BAAoB;QAE7B;;;;;;WAMG;QACH,qBAAqB,EAAE,IAAA,2BAAa,EAAC,IAAA,oBAAM,GAAE,CAAC;QAE9C;;;WAGG;QACH,mBAAmB,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;KAC9C,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,yBAAyB,GAAG,IAAA,oBAAM,EAAC;IAC9C,MAAM,EAAE,IAAA,qBAAO,EAAC,GAAG,qBAAY,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,EAAE,IAAA,oBAAM,EAAC;QACb;;WAEG;QACH,OAAO,EAAE,0BAAoB;KAC9B,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,yBAAyB,GAAG,IAAA,oBAAM,EAAC;IAC9C,MAAM,EAAE,IAAA,qBAAO,EAAC,GAAG,qBAAY,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,EAAE,IAAA,oBAAM,EAAC;QACb;;WAEG;QACH,EAAE,EAAE,kBAAU;KACf,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,0BAA0B,GAAG,IAAA,oBAAM,EAAC;IAC/C,MAAM,EAAE,IAAA,qBAAO,EAAC,GAAG,qBAAY,CAAC,eAAe,EAAE,CAAC;IAClD,MAAM,EAAE,IAAA,oBAAM,EAAC;QACb;;WAEG;QACH,EAAE,EAAE,kBAAU;QAEd;;WAEG;QACH,MAAM,EAAE,kBAAU;KACnB,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,0BAA0B,GAAG,IAAA,oBAAM,EAAC;IAC/C,MAAM,EAAE,IAAA,qBAAO,EAAC,GAAG,qBAAY,CAAC,eAAe,EAAE,CAAC;IAClD,MAAM,EAAE,IAAA,oBAAM,EAAC;QACb;;WAEG;QACH,EAAE,EAAE,kBAAU;KACf,CAAC;CACH,CAAC,CAAC","sourcesContent":["import { boolean, literal, string } from '@metamask/superstruct';\nimport { JsonStruct } from '@metamask/utils';\n\nimport { KeyringAccountStruct } from '../api';\nimport { KeyringEvent } from '../events';\nimport { exactOptional, object } from '../superstruct';\nimport { UuidStruct } from '../utils';\n\nexport const AccountCreatedEventStruct = object({\n method: literal(`${KeyringEvent.AccountCreated}`),\n params: object({\n /**\n * New account object.\n */\n account: KeyringAccountStruct,\n\n /**\n * Account name suggestion provided to the MetaMask client.\n *\n * The keyring can suggest a name for the account, but it's up to the\n * client to decide whether to use it. The keyring won't be informed if the\n * client decides to use a different name.\n */\n accountNameSuggestion: exactOptional(string()),\n\n /**\n * Instructs MetaMask to display the add account confirmation dialog in the UI.\n * **Note:** This is not guaranteed to be honored by the MetaMask client.\n */\n displayConfirmation: exactOptional(boolean()),\n }),\n});\n\nexport const AccountUpdatedEventStruct = object({\n method: literal(`${KeyringEvent.AccountUpdated}`),\n params: object({\n /**\n * Updated account object.\n */\n account: KeyringAccountStruct,\n }),\n});\n\nexport const AccountDeletedEventStruct = object({\n method: literal(`${KeyringEvent.AccountDeleted}`),\n params: object({\n /**\n * Deleted account ID.\n */\n id: UuidStruct,\n }),\n});\n\nexport const RequestApprovedEventStruct = object({\n method: literal(`${KeyringEvent.RequestApproved}`),\n params: object({\n /**\n * Request ID.\n */\n id: UuidStruct,\n\n /**\n * Request result.\n */\n result: JsonStruct,\n }),\n});\n\nexport const RequestRejectedEventStruct = object({\n method: literal(`${KeyringEvent.RequestRejected}`),\n params: object({\n /**\n * Request ID.\n */\n id: UuidStruct,\n }),\n});\n"]}
@@ -1,162 +0,0 @@
1
- export declare const AccountCreatedEventStruct: import("@metamask/superstruct").Struct<{
2
- method: "notify:accountCreated";
3
- params: {
4
- account: {
5
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
6
- id: string;
7
- address: string;
8
- options: Record<string, import("@metamask/utils").Json>;
9
- methods: string[];
10
- };
11
- accountNameSuggestion?: string;
12
- displayConfirmation?: boolean;
13
- };
14
- }, {
15
- method: import("@metamask/superstruct").Struct<"notify:accountCreated", "notify:accountCreated">;
16
- params: import("@metamask/superstruct").Struct<{
17
- account: {
18
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
19
- id: string;
20
- address: string;
21
- options: Record<string, import("@metamask/utils").Json>;
22
- methods: string[];
23
- };
24
- accountNameSuggestion?: string;
25
- displayConfirmation?: boolean;
26
- }, {
27
- /**
28
- * New account object.
29
- */
30
- account: import("@metamask/superstruct").Struct<{
31
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
32
- id: string;
33
- address: string;
34
- options: Record<string, import("@metamask/utils").Json>;
35
- methods: string[];
36
- }, {
37
- id: import("@metamask/superstruct").Struct<string, null>;
38
- type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
39
- "eip155:eoa": "eip155:eoa";
40
- "eip155:erc4337": "eip155:erc4337";
41
- "bip122:p2wpkh": "bip122:p2wpkh";
42
- "solana:data-account": "solana:data-account";
43
- }>;
44
- address: import("@metamask/superstruct").Struct<string, null>;
45
- options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
46
- methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
47
- }>;
48
- /**
49
- * Account name suggestion provided to the MetaMask client.
50
- *
51
- * The keyring can suggest a name for the account, but it's up to the
52
- * client to decide whether to use it. The keyring won't be informed if the
53
- * client decides to use a different name.
54
- */
55
- accountNameSuggestion: import("@metamask/superstruct").Struct<string | import("../superstruct.cjs").ExactOptionalTag, null>;
56
- /**
57
- * Instructs MetaMask to display the add account confirmation dialog in the UI.
58
- * **Note:** This is not guaranteed to be honored by the MetaMask client.
59
- */
60
- displayConfirmation: import("@metamask/superstruct").Struct<boolean | import("../superstruct.cjs").ExactOptionalTag, null>;
61
- }>;
62
- }>;
63
- export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").Struct<{
64
- method: "notify:accountUpdated";
65
- params: {
66
- account: {
67
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
68
- id: string;
69
- address: string;
70
- options: Record<string, import("@metamask/utils").Json>;
71
- methods: string[];
72
- };
73
- };
74
- }, {
75
- method: import("@metamask/superstruct").Struct<"notify:accountUpdated", "notify:accountUpdated">;
76
- params: import("@metamask/superstruct").Struct<{
77
- account: {
78
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
79
- id: string;
80
- address: string;
81
- options: Record<string, import("@metamask/utils").Json>;
82
- methods: string[];
83
- };
84
- }, {
85
- /**
86
- * Updated account object.
87
- */
88
- account: import("@metamask/superstruct").Struct<{
89
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
90
- id: string;
91
- address: string;
92
- options: Record<string, import("@metamask/utils").Json>;
93
- methods: string[];
94
- }, {
95
- id: import("@metamask/superstruct").Struct<string, null>;
96
- type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
97
- "eip155:eoa": "eip155:eoa";
98
- "eip155:erc4337": "eip155:erc4337";
99
- "bip122:p2wpkh": "bip122:p2wpkh";
100
- "solana:data-account": "solana:data-account";
101
- }>;
102
- address: import("@metamask/superstruct").Struct<string, null>;
103
- options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
104
- methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
105
- }>;
106
- }>;
107
- }>;
108
- export declare const AccountDeletedEventStruct: import("@metamask/superstruct").Struct<{
109
- method: "notify:accountDeleted";
110
- params: {
111
- id: string;
112
- };
113
- }, {
114
- method: import("@metamask/superstruct").Struct<"notify:accountDeleted", "notify:accountDeleted">;
115
- params: import("@metamask/superstruct").Struct<{
116
- id: string;
117
- }, {
118
- /**
119
- * Deleted account ID.
120
- */
121
- id: import("@metamask/superstruct").Struct<string, null>;
122
- }>;
123
- }>;
124
- export declare const RequestApprovedEventStruct: import("@metamask/superstruct").Struct<{
125
- method: "notify:requestApproved";
126
- params: {
127
- id: string;
128
- result: import("@metamask/utils").Json;
129
- };
130
- }, {
131
- method: import("@metamask/superstruct").Struct<"notify:requestApproved", "notify:requestApproved">;
132
- params: import("@metamask/superstruct").Struct<{
133
- id: string;
134
- result: import("@metamask/utils").Json;
135
- }, {
136
- /**
137
- * Request ID.
138
- */
139
- id: import("@metamask/superstruct").Struct<string, null>;
140
- /**
141
- * Request result.
142
- */
143
- result: import("@metamask/superstruct").Struct<import("@metamask/utils").Json, unknown>;
144
- }>;
145
- }>;
146
- export declare const RequestRejectedEventStruct: import("@metamask/superstruct").Struct<{
147
- method: "notify:requestRejected";
148
- params: {
149
- id: string;
150
- };
151
- }, {
152
- method: import("@metamask/superstruct").Struct<"notify:requestRejected", "notify:requestRejected">;
153
- params: import("@metamask/superstruct").Struct<{
154
- id: string;
155
- }, {
156
- /**
157
- * Request ID.
158
- */
159
- id: import("@metamask/superstruct").Struct<string, null>;
160
- }>;
161
- }>;
162
- //# sourceMappingURL=events.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.d.cts","sourceRoot":"","sources":["../../src/internal/events.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;QAGlC;;WAEG;;;;;;;;;;;;;;;;;;;QAGH;;;;;;WAMG;;QAGH;;;WAGG;;;EAGL,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;QAGlC;;WAEG;;;;;;;;;;;;;;;;;;;;EAGL,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;QAGlC;;WAEG;;;EAGL,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;QAGnC;;WAEG;;QAGH;;WAEG;;;EAGL,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;QAGnC;;WAEG;;;EAGL,CAAC"}
@@ -1,162 +0,0 @@
1
- export declare const AccountCreatedEventStruct: import("@metamask/superstruct").Struct<{
2
- method: "notify:accountCreated";
3
- params: {
4
- account: {
5
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
6
- id: string;
7
- address: string;
8
- options: Record<string, import("@metamask/utils").Json>;
9
- methods: string[];
10
- };
11
- accountNameSuggestion?: string;
12
- displayConfirmation?: boolean;
13
- };
14
- }, {
15
- method: import("@metamask/superstruct").Struct<"notify:accountCreated", "notify:accountCreated">;
16
- params: import("@metamask/superstruct").Struct<{
17
- account: {
18
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
19
- id: string;
20
- address: string;
21
- options: Record<string, import("@metamask/utils").Json>;
22
- methods: string[];
23
- };
24
- accountNameSuggestion?: string;
25
- displayConfirmation?: boolean;
26
- }, {
27
- /**
28
- * New account object.
29
- */
30
- account: import("@metamask/superstruct").Struct<{
31
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
32
- id: string;
33
- address: string;
34
- options: Record<string, import("@metamask/utils").Json>;
35
- methods: string[];
36
- }, {
37
- id: import("@metamask/superstruct").Struct<string, null>;
38
- type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
39
- "eip155:eoa": "eip155:eoa";
40
- "eip155:erc4337": "eip155:erc4337";
41
- "bip122:p2wpkh": "bip122:p2wpkh";
42
- "solana:data-account": "solana:data-account";
43
- }>;
44
- address: import("@metamask/superstruct").Struct<string, null>;
45
- options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
46
- methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
47
- }>;
48
- /**
49
- * Account name suggestion provided to the MetaMask client.
50
- *
51
- * The keyring can suggest a name for the account, but it's up to the
52
- * client to decide whether to use it. The keyring won't be informed if the
53
- * client decides to use a different name.
54
- */
55
- accountNameSuggestion: import("@metamask/superstruct").Struct<string | import("../superstruct.mjs").ExactOptionalTag, null>;
56
- /**
57
- * Instructs MetaMask to display the add account confirmation dialog in the UI.
58
- * **Note:** This is not guaranteed to be honored by the MetaMask client.
59
- */
60
- displayConfirmation: import("@metamask/superstruct").Struct<boolean | import("../superstruct.mjs").ExactOptionalTag, null>;
61
- }>;
62
- }>;
63
- export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").Struct<{
64
- method: "notify:accountUpdated";
65
- params: {
66
- account: {
67
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
68
- id: string;
69
- address: string;
70
- options: Record<string, import("@metamask/utils").Json>;
71
- methods: string[];
72
- };
73
- };
74
- }, {
75
- method: import("@metamask/superstruct").Struct<"notify:accountUpdated", "notify:accountUpdated">;
76
- params: import("@metamask/superstruct").Struct<{
77
- account: {
78
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
79
- id: string;
80
- address: string;
81
- options: Record<string, import("@metamask/utils").Json>;
82
- methods: string[];
83
- };
84
- }, {
85
- /**
86
- * Updated account object.
87
- */
88
- account: import("@metamask/superstruct").Struct<{
89
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account";
90
- id: string;
91
- address: string;
92
- options: Record<string, import("@metamask/utils").Json>;
93
- methods: string[];
94
- }, {
95
- id: import("@metamask/superstruct").Struct<string, null>;
96
- type: import("@metamask/superstruct").Struct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2wpkh" | "solana:data-account", {
97
- "eip155:eoa": "eip155:eoa";
98
- "eip155:erc4337": "eip155:erc4337";
99
- "bip122:p2wpkh": "bip122:p2wpkh";
100
- "solana:data-account": "solana:data-account";
101
- }>;
102
- address: import("@metamask/superstruct").Struct<string, null>;
103
- options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>;
104
- methods: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
105
- }>;
106
- }>;
107
- }>;
108
- export declare const AccountDeletedEventStruct: import("@metamask/superstruct").Struct<{
109
- method: "notify:accountDeleted";
110
- params: {
111
- id: string;
112
- };
113
- }, {
114
- method: import("@metamask/superstruct").Struct<"notify:accountDeleted", "notify:accountDeleted">;
115
- params: import("@metamask/superstruct").Struct<{
116
- id: string;
117
- }, {
118
- /**
119
- * Deleted account ID.
120
- */
121
- id: import("@metamask/superstruct").Struct<string, null>;
122
- }>;
123
- }>;
124
- export declare const RequestApprovedEventStruct: import("@metamask/superstruct").Struct<{
125
- method: "notify:requestApproved";
126
- params: {
127
- id: string;
128
- result: import("@metamask/utils").Json;
129
- };
130
- }, {
131
- method: import("@metamask/superstruct").Struct<"notify:requestApproved", "notify:requestApproved">;
132
- params: import("@metamask/superstruct").Struct<{
133
- id: string;
134
- result: import("@metamask/utils").Json;
135
- }, {
136
- /**
137
- * Request ID.
138
- */
139
- id: import("@metamask/superstruct").Struct<string, null>;
140
- /**
141
- * Request result.
142
- */
143
- result: import("@metamask/superstruct").Struct<import("@metamask/utils").Json, unknown>;
144
- }>;
145
- }>;
146
- export declare const RequestRejectedEventStruct: import("@metamask/superstruct").Struct<{
147
- method: "notify:requestRejected";
148
- params: {
149
- id: string;
150
- };
151
- }, {
152
- method: import("@metamask/superstruct").Struct<"notify:requestRejected", "notify:requestRejected">;
153
- params: import("@metamask/superstruct").Struct<{
154
- id: string;
155
- }, {
156
- /**
157
- * Request ID.
158
- */
159
- id: import("@metamask/superstruct").Struct<string, null>;
160
- }>;
161
- }>;
162
- //# sourceMappingURL=events.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.d.mts","sourceRoot":"","sources":["../../src/internal/events.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;QAGlC;;WAEG;;;;;;;;;;;;;;;;;;;QAGH;;;;;;WAMG;;QAGH;;;WAGG;;;EAGL,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;QAGlC;;WAEG;;;;;;;;;;;;;;;;;;;;EAGL,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;QAGlC;;WAEG;;;EAGL,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;QAGnC;;WAEG;;QAGH;;WAEG;;;EAGL,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;QAGnC;;WAEG;;;EAGL,CAAC"}
@@ -1,69 +0,0 @@
1
- import { boolean, literal, string } from "@metamask/superstruct";
2
- import { JsonStruct } from "@metamask/utils";
3
- import { KeyringAccountStruct } from "../api/index.mjs";
4
- import { KeyringEvent } from "../events.mjs";
5
- import { exactOptional, object } from "../superstruct.mjs";
6
- import { UuidStruct } from "../utils/index.mjs";
7
- export const AccountCreatedEventStruct = object({
8
- method: literal(`${KeyringEvent.AccountCreated}`),
9
- params: object({
10
- /**
11
- * New account object.
12
- */
13
- account: KeyringAccountStruct,
14
- /**
15
- * Account name suggestion provided to the MetaMask client.
16
- *
17
- * The keyring can suggest a name for the account, but it's up to the
18
- * client to decide whether to use it. The keyring won't be informed if the
19
- * client decides to use a different name.
20
- */
21
- accountNameSuggestion: exactOptional(string()),
22
- /**
23
- * Instructs MetaMask to display the add account confirmation dialog in the UI.
24
- * **Note:** This is not guaranteed to be honored by the MetaMask client.
25
- */
26
- displayConfirmation: exactOptional(boolean()),
27
- }),
28
- });
29
- export const AccountUpdatedEventStruct = object({
30
- method: literal(`${KeyringEvent.AccountUpdated}`),
31
- params: object({
32
- /**
33
- * Updated account object.
34
- */
35
- account: KeyringAccountStruct,
36
- }),
37
- });
38
- export const AccountDeletedEventStruct = object({
39
- method: literal(`${KeyringEvent.AccountDeleted}`),
40
- params: object({
41
- /**
42
- * Deleted account ID.
43
- */
44
- id: UuidStruct,
45
- }),
46
- });
47
- export const RequestApprovedEventStruct = object({
48
- method: literal(`${KeyringEvent.RequestApproved}`),
49
- params: object({
50
- /**
51
- * Request ID.
52
- */
53
- id: UuidStruct,
54
- /**
55
- * Request result.
56
- */
57
- result: JsonStruct,
58
- }),
59
- });
60
- export const RequestRejectedEventStruct = object({
61
- method: literal(`${KeyringEvent.RequestRejected}`),
62
- params: object({
63
- /**
64
- * Request ID.
65
- */
66
- id: UuidStruct,
67
- }),
68
- });
69
- //# sourceMappingURL=events.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.mjs","sourceRoot":"","sources":["../../src/internal/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,8BAA8B;AACjE,OAAO,EAAE,UAAU,EAAE,wBAAwB;AAE7C,OAAO,EAAE,oBAAoB,EAAE,yBAAe;AAC9C,OAAO,EAAE,YAAY,EAAE,sBAAkB;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,2BAAuB;AACvD,OAAO,EAAE,UAAU,EAAE,2BAAiB;AAEtC,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC;IAC9C,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,OAAO,EAAE,oBAAoB;QAE7B;;;;;;WAMG;QACH,qBAAqB,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC;QAE9C;;;WAGG;QACH,mBAAmB,EAAE,aAAa,CAAC,OAAO,EAAE,CAAC;KAC9C,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC;IAC9C,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,OAAO,EAAE,oBAAoB;KAC9B,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC;IAC9C,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,EAAE,EAAE,UAAU;KACf,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,eAAe,EAAE,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,EAAE,EAAE,UAAU;QAEd;;WAEG;QACH,MAAM,EAAE,UAAU;KACnB,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC;IAC/C,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAAC,eAAe,EAAE,CAAC;IAClD,MAAM,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,EAAE,EAAE,UAAU;KACf,CAAC;CACH,CAAC,CAAC","sourcesContent":["import { boolean, literal, string } from '@metamask/superstruct';\nimport { JsonStruct } from '@metamask/utils';\n\nimport { KeyringAccountStruct } from '../api';\nimport { KeyringEvent } from '../events';\nimport { exactOptional, object } from '../superstruct';\nimport { UuidStruct } from '../utils';\n\nexport const AccountCreatedEventStruct = object({\n method: literal(`${KeyringEvent.AccountCreated}`),\n params: object({\n /**\n * New account object.\n */\n account: KeyringAccountStruct,\n\n /**\n * Account name suggestion provided to the MetaMask client.\n *\n * The keyring can suggest a name for the account, but it's up to the\n * client to decide whether to use it. The keyring won't be informed if the\n * client decides to use a different name.\n */\n accountNameSuggestion: exactOptional(string()),\n\n /**\n * Instructs MetaMask to display the add account confirmation dialog in the UI.\n * **Note:** This is not guaranteed to be honored by the MetaMask client.\n */\n displayConfirmation: exactOptional(boolean()),\n }),\n});\n\nexport const AccountUpdatedEventStruct = object({\n method: literal(`${KeyringEvent.AccountUpdated}`),\n params: object({\n /**\n * Updated account object.\n */\n account: KeyringAccountStruct,\n }),\n});\n\nexport const AccountDeletedEventStruct = object({\n method: literal(`${KeyringEvent.AccountDeleted}`),\n params: object({\n /**\n * Deleted account ID.\n */\n id: UuidStruct,\n }),\n});\n\nexport const RequestApprovedEventStruct = object({\n method: literal(`${KeyringEvent.RequestApproved}`),\n params: object({\n /**\n * Request ID.\n */\n id: UuidStruct,\n\n /**\n * Request result.\n */\n result: JsonStruct,\n }),\n});\n\nexport const RequestRejectedEventStruct = object({\n method: literal(`${KeyringEvent.RequestRejected}`),\n params: object({\n /**\n * Request ID.\n */\n id: UuidStruct,\n }),\n});\n"]}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./api.cjs"), exports);
18
- __exportStar(require("./events.cjs"), exports);
19
- __exportStar(require("./rpc.cjs"), exports);
20
- __exportStar(require("./types.cjs"), exports);
21
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAsB;AAEtB,+CAAyB;AACzB,4CAAsB;AACtB,8CAAwB","sourcesContent":["export * from './api';\nexport type * from './eth';\nexport * from './events';\nexport * from './rpc';\nexport * from './types';\n"]}
@@ -1,6 +0,0 @@
1
- export * from "./api.cjs";
2
- export type * from "./eth/index.cjs";
3
- export * from "./events.cjs";
4
- export * from "./rpc.cjs";
5
- export * from "./types.cjs";
6
- //# sourceMappingURL=index.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":"AAAA,0BAAsB;AACtB,qCAA2B;AAC3B,6BAAyB;AACzB,0BAAsB;AACtB,4BAAwB"}
@@ -1,6 +0,0 @@
1
- export * from "./api.mjs";
2
- export type * from "./eth/index.mjs";
3
- export * from "./events.mjs";
4
- export * from "./rpc.mjs";
5
- export * from "./types.mjs";
6
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":"AAAA,0BAAsB;AACtB,qCAA2B;AAC3B,6BAAyB;AACzB,0BAAsB;AACtB,4BAAwB"}
@@ -1,5 +0,0 @@
1
- export * from "./api.mjs";
2
- export * from "./events.mjs";
3
- export * from "./rpc.mjs";
4
- export * from "./types.mjs";
5
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":"AAAA,0BAAsB;AAEtB,6BAAyB;AACzB,0BAAsB;AACtB,4BAAwB","sourcesContent":["export * from './api';\nexport type * from './eth';\nexport * from './events';\nexport * from './rpc';\nexport * from './types';\n"]}