@metamask-previews/keyring-api 23.3.0-e51c895 → 23.5.0-1fa477f

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 (176) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/dist/api/account-options.cjs +3 -3
  3. package/dist/api/account-options.cjs.map +1 -1
  4. package/dist/api/account-options.d.cts.map +1 -1
  5. package/dist/api/account-options.d.mts.map +1 -1
  6. package/dist/api/account-options.mjs +2 -2
  7. package/dist/api/account-options.mjs.map +1 -1
  8. package/dist/api/account.cjs +1 -1
  9. package/dist/api/account.cjs.map +1 -1
  10. package/dist/api/account.mjs +2 -2
  11. package/dist/api/account.mjs.map +1 -1
  12. package/dist/api/asset.cjs +3 -3
  13. package/dist/api/asset.cjs.map +1 -1
  14. package/dist/api/asset.d.cts.map +1 -1
  15. package/dist/api/asset.d.mts.map +1 -1
  16. package/dist/api/asset.mjs +2 -2
  17. package/dist/api/asset.mjs.map +1 -1
  18. package/dist/api/balance.cjs +1 -1
  19. package/dist/api/balance.cjs.map +1 -1
  20. package/dist/api/balance.mjs +2 -2
  21. package/dist/api/balance.mjs.map +1 -1
  22. package/dist/api/options.cjs +3 -2
  23. package/dist/api/options.cjs.map +1 -1
  24. package/dist/api/options.d.cts +1 -1
  25. package/dist/api/options.d.cts.map +1 -1
  26. package/dist/api/options.d.mts +1 -1
  27. package/dist/api/options.d.mts.map +1 -1
  28. package/dist/api/options.mjs +2 -1
  29. package/dist/api/options.mjs.map +1 -1
  30. package/dist/api/pagination.cjs +2 -3
  31. package/dist/api/pagination.cjs.map +1 -1
  32. package/dist/api/pagination.d.cts +1 -1
  33. package/dist/api/pagination.d.cts.map +1 -1
  34. package/dist/api/pagination.d.mts +1 -1
  35. package/dist/api/pagination.d.mts.map +1 -1
  36. package/dist/api/pagination.mjs +1 -2
  37. package/dist/api/pagination.mjs.map +1 -1
  38. package/dist/api/request.cjs +3 -3
  39. package/dist/api/request.cjs.map +1 -1
  40. package/dist/api/request.d.cts +1 -1
  41. package/dist/api/request.d.cts.map +1 -1
  42. package/dist/api/request.d.mts +1 -1
  43. package/dist/api/request.d.mts.map +1 -1
  44. package/dist/api/request.mjs +2 -2
  45. package/dist/api/request.mjs.map +1 -1
  46. package/dist/api/response.cjs +5 -6
  47. package/dist/api/response.cjs.map +1 -1
  48. package/dist/api/response.d.cts.map +1 -1
  49. package/dist/api/response.d.mts.map +1 -1
  50. package/dist/api/response.mjs +1 -2
  51. package/dist/api/response.mjs.map +1 -1
  52. package/dist/api/transaction.cjs +10 -10
  53. package/dist/api/transaction.cjs.map +1 -1
  54. package/dist/api/transaction.d.cts +11 -11
  55. package/dist/api/transaction.d.cts.map +1 -1
  56. package/dist/api/transaction.d.mts +11 -11
  57. package/dist/api/transaction.d.mts.map +1 -1
  58. package/dist/api/transaction.mjs +2 -2
  59. package/dist/api/transaction.mjs.map +1 -1
  60. package/dist/btc/types.cjs +5 -6
  61. package/dist/btc/types.cjs.map +1 -1
  62. package/dist/btc/types.d.cts.map +1 -1
  63. package/dist/btc/types.d.mts.map +1 -1
  64. package/dist/btc/types.mjs +1 -2
  65. package/dist/btc/types.mjs.map +1 -1
  66. package/dist/eth/erc4337/types.cjs +9 -8
  67. package/dist/eth/erc4337/types.cjs.map +1 -1
  68. package/dist/eth/erc4337/types.d.cts +4 -4
  69. package/dist/eth/erc4337/types.d.cts.map +1 -1
  70. package/dist/eth/erc4337/types.d.mts +4 -4
  71. package/dist/eth/erc4337/types.d.mts.map +1 -1
  72. package/dist/eth/erc4337/types.mjs +2 -1
  73. package/dist/eth/erc4337/types.mjs.map +1 -1
  74. package/dist/eth/rpc/params.cjs +4 -5
  75. package/dist/eth/rpc/params.cjs.map +1 -1
  76. package/dist/eth/rpc/params.d.cts.map +1 -1
  77. package/dist/eth/rpc/params.d.mts.map +1 -1
  78. package/dist/eth/rpc/params.mjs +1 -2
  79. package/dist/eth/rpc/params.mjs.map +1 -1
  80. package/dist/eth/types.cjs +4 -5
  81. package/dist/eth/types.cjs.map +1 -1
  82. package/dist/eth/types.d.cts +1 -1
  83. package/dist/eth/types.d.cts.map +1 -1
  84. package/dist/eth/types.d.mts +1 -1
  85. package/dist/eth/types.d.mts.map +1 -1
  86. package/dist/eth/types.mjs +2 -3
  87. package/dist/eth/types.mjs.map +1 -1
  88. package/dist/events.cjs +20 -20
  89. package/dist/events.cjs.map +1 -1
  90. package/dist/events.d.cts +4 -4
  91. package/dist/events.d.cts.map +1 -1
  92. package/dist/events.d.mts +4 -4
  93. package/dist/events.d.mts.map +1 -1
  94. package/dist/events.mjs +2 -2
  95. package/dist/events.mjs.map +1 -1
  96. package/dist/rpc.cjs +36 -36
  97. package/dist/rpc.cjs.map +1 -1
  98. package/dist/rpc.d.cts +81 -45
  99. package/dist/rpc.d.cts.map +1 -1
  100. package/dist/rpc.d.mts +81 -45
  101. package/dist/rpc.d.mts.map +1 -1
  102. package/dist/rpc.mjs +2 -2
  103. package/dist/rpc.mjs.map +1 -1
  104. package/dist/sol/types.cjs +1 -2
  105. package/dist/sol/types.cjs.map +1 -1
  106. package/dist/sol/types.d.cts.map +1 -1
  107. package/dist/sol/types.d.mts.map +1 -1
  108. package/dist/sol/types.mjs +1 -2
  109. package/dist/sol/types.mjs.map +1 -1
  110. package/dist/trx/types.cjs +1 -2
  111. package/dist/trx/types.cjs.map +1 -1
  112. package/dist/trx/types.d.cts.map +1 -1
  113. package/dist/trx/types.d.mts.map +1 -1
  114. package/dist/trx/types.mjs +1 -2
  115. package/dist/trx/types.mjs.map +1 -1
  116. package/dist/v2/api/create-account/index.d.cts +1 -1
  117. package/dist/v2/api/create-account/index.d.mts +1 -1
  118. package/dist/v2/api/create-account/private-key.d.cts +3 -2
  119. package/dist/v2/api/create-account/private-key.d.cts.map +1 -1
  120. package/dist/v2/api/create-account/private-key.d.mts +3 -2
  121. package/dist/v2/api/create-account/private-key.d.mts.map +1 -1
  122. package/dist/v2/api/export-account/index.d.cts +6 -4
  123. package/dist/v2/api/export-account/index.d.cts.map +1 -1
  124. package/dist/v2/api/export-account/index.d.mts +6 -4
  125. package/dist/v2/api/export-account/index.d.mts.map +1 -1
  126. package/dist/v2/api/export-account/private-key.d.cts +6 -4
  127. package/dist/v2/api/export-account/private-key.d.cts.map +1 -1
  128. package/dist/v2/api/export-account/private-key.d.mts +6 -4
  129. package/dist/v2/api/export-account/private-key.d.mts.map +1 -1
  130. package/dist/v2/api/index.cjs +1 -0
  131. package/dist/v2/api/index.cjs.map +1 -1
  132. package/dist/v2/api/index.d.cts +1 -0
  133. package/dist/v2/api/index.d.cts.map +1 -1
  134. package/dist/v2/api/index.d.mts +1 -0
  135. package/dist/v2/api/index.d.mts.map +1 -1
  136. package/dist/v2/api/index.mjs +1 -0
  137. package/dist/v2/api/index.mjs.map +1 -1
  138. package/dist/v2/api/keyring-capabilities.cjs +37 -0
  139. package/dist/v2/api/keyring-capabilities.cjs.map +1 -1
  140. package/dist/v2/api/keyring-capabilities.d.cts +69 -10
  141. package/dist/v2/api/keyring-capabilities.d.cts.map +1 -1
  142. package/dist/v2/api/keyring-capabilities.d.mts +69 -10
  143. package/dist/v2/api/keyring-capabilities.d.mts.map +1 -1
  144. package/dist/v2/api/keyring-capabilities.mjs +37 -0
  145. package/dist/v2/api/keyring-capabilities.mjs.map +1 -1
  146. package/dist/v2/api/keyring-rpc.cjs +10 -10
  147. package/dist/v2/api/keyring-rpc.cjs.map +1 -1
  148. package/dist/v2/api/keyring-rpc.d.cts +12 -10
  149. package/dist/v2/api/keyring-rpc.d.cts.map +1 -1
  150. package/dist/v2/api/keyring-rpc.d.mts +12 -10
  151. package/dist/v2/api/keyring-rpc.d.mts.map +1 -1
  152. package/dist/v2/api/keyring-rpc.mjs +2 -2
  153. package/dist/v2/api/keyring-rpc.mjs.map +1 -1
  154. package/dist/v2/api/keyring-snap-rpc.cjs +92 -0
  155. package/dist/v2/api/keyring-snap-rpc.cjs.map +1 -0
  156. package/dist/v2/api/keyring-snap-rpc.d.cts +545 -0
  157. package/dist/v2/api/keyring-snap-rpc.d.cts.map +1 -0
  158. package/dist/v2/api/keyring-snap-rpc.d.mts +545 -0
  159. package/dist/v2/api/keyring-snap-rpc.d.mts.map +1 -0
  160. package/dist/v2/api/keyring-snap-rpc.mjs +88 -0
  161. package/dist/v2/api/keyring-snap-rpc.mjs.map +1 -0
  162. package/dist/v2/api/private-key.cjs +5 -0
  163. package/dist/v2/api/private-key.cjs.map +1 -1
  164. package/dist/v2/api/private-key.d.cts +13 -6
  165. package/dist/v2/api/private-key.d.cts.map +1 -1
  166. package/dist/v2/api/private-key.d.mts +13 -6
  167. package/dist/v2/api/private-key.d.mts.map +1 -1
  168. package/dist/v2/api/private-key.mjs +5 -0
  169. package/dist/v2/api/private-key.mjs.map +1 -1
  170. package/dist/xlm/types.cjs +1 -2
  171. package/dist/xlm/types.cjs.map +1 -1
  172. package/dist/xlm/types.d.cts.map +1 -1
  173. package/dist/xlm/types.d.mts.map +1 -1
  174. package/dist/xlm/types.mjs +1 -2
  175. package/dist/xlm/types.mjs.map +1 -1
  176. package/package.json +2 -2
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TrxEoaAccountStruct = exports.TrxMethod = exports.TrxAddressStruct = void 0;
4
- const keyring_utils_1 = require("@metamask/keyring-utils");
5
4
  const superstruct_1 = require("@metamask/superstruct");
6
5
  const utils_1 = require("@metamask/utils");
7
6
  const api_1 = require("../api/index.cjs");
@@ -22,7 +21,7 @@ var TrxMethod;
22
21
  // @deprecated Not supported anymore.
23
22
  TrxMethod["VerifyMessageV2"] = "verifyMessageV2";
24
23
  })(TrxMethod || (exports.TrxMethod = TrxMethod = {}));
25
- exports.TrxEoaAccountStruct = (0, keyring_utils_1.object)({
24
+ exports.TrxEoaAccountStruct = (0, superstruct_1.object)({
26
25
  ...api_1.KeyringAccountStruct.schema,
27
26
  /**
28
27
  * Account address.
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../../src/trx/types.ts"],"names":[],"mappings":";;;AAAA,2DAAiD;AAEjD,uDAAwE;AACxE,2CAAgD;AAEhD,0CAIgB;AAEhB;;;GAGG;AACU,QAAA,gBAAgB,GAAG,IAAA,qBAAa,EAC3C,YAAY,EACZ,+BAA+B,CAChC,CAAC;AAEF;;GAEG;AACH,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,gDAAmC,CAAA;IAEnC,yCAAyC;IACzC,4CAA+B,CAAA;IAC/B,qCAAqC;IACrC,gDAAmC,CAAA;AACrC,CAAC,EARW,SAAS,yBAAT,SAAS,QAQpB;AAEY,QAAA,mBAAmB,GAAG,IAAA,sBAAM,EAAC;IACxC,GAAG,0BAAoB,CAAC,MAAM;IAC9B;;OAEG;IACH,OAAO,EAAE,wBAAgB;IACzB;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,GAAG,oBAAc,CAAC,GAAG,EAAE,CAAC;IACtC;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,uBAAiB,CAAC,CAAC;IAC1C;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EAAC,IAAA,mBAAK,EAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;CAChD,CAAC,CAAC","sourcesContent":["import { object } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { array, enums, literal, nonempty } from '@metamask/superstruct';\nimport { definePattern } from '@metamask/utils';\n\nimport {\n CaipChainIdStruct,\n KeyringAccountStruct,\n TrxAccountType,\n} from '../api';\n\n/**\n * TRON addresses are Base58-encoded strings that are exactly 34 characters long\n * and start with the letter 'T'.\n */\nexport const TrxAddressStruct = definePattern(\n 'TrxAddress',\n /^T[1-9A-HJ-NP-Za-km-z]{33}$/iu,\n);\n\n/**\n * Supported TRON methods.\n */\nexport enum TrxMethod {\n SignMessage = 'signMessage',\n SignTransaction = 'signTransaction',\n\n // @deprecated Use `SignMessage` instead.\n SignMessageV2 = 'signMessageV2',\n // @deprecated Not supported anymore.\n VerifyMessageV2 = 'verifyMessageV2',\n}\n\nexport const TrxEoaAccountStruct = object({\n ...KeyringAccountStruct.schema,\n /**\n * Account address.\n */\n address: TrxAddressStruct,\n /**\n * Account type.\n */\n type: literal(`${TrxAccountType.Eoa}`),\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n /**\n * Account supported methods.\n */\n methods: array(enums(Object.values(TrxMethod))),\n});\n\nexport type TrxEoaAccount = Infer<typeof TrxEoaAccountStruct>;\n"]}
1
+ {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../../src/trx/types.ts"],"names":[],"mappings":";;;AACA,uDAAgF;AAChF,2CAAgD;AAEhD,0CAIgB;AAEhB;;;GAGG;AACU,QAAA,gBAAgB,GAAG,IAAA,qBAAa,EAC3C,YAAY,EACZ,+BAA+B,CAChC,CAAC;AAEF;;GAEG;AACH,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,gDAAmC,CAAA;IAEnC,yCAAyC;IACzC,4CAA+B,CAAA;IAC/B,qCAAqC;IACrC,gDAAmC,CAAA;AACrC,CAAC,EARW,SAAS,yBAAT,SAAS,QAQpB;AAEY,QAAA,mBAAmB,GAAG,IAAA,oBAAM,EAAC;IACxC,GAAG,0BAAoB,CAAC,MAAM;IAC9B;;OAEG;IACH,OAAO,EAAE,wBAAgB;IACzB;;OAEG;IACH,IAAI,EAAE,IAAA,qBAAO,EAAC,GAAG,oBAAc,CAAC,GAAG,EAAE,CAAC;IACtC;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,uBAAiB,CAAC,CAAC;IAC1C;;OAEG;IACH,OAAO,EAAE,IAAA,mBAAK,EAAC,IAAA,mBAAK,EAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;CAChD,CAAC,CAAC","sourcesContent":["import type { Infer } from '@metamask/superstruct';\nimport { array, enums, literal, nonempty, object } from '@metamask/superstruct';\nimport { definePattern } from '@metamask/utils';\n\nimport {\n CaipChainIdStruct,\n KeyringAccountStruct,\n TrxAccountType,\n} from '../api';\n\n/**\n * TRON addresses are Base58-encoded strings that are exactly 34 characters long\n * and start with the letter 'T'.\n */\nexport const TrxAddressStruct = definePattern(\n 'TrxAddress',\n /^T[1-9A-HJ-NP-Za-km-z]{33}$/iu,\n);\n\n/**\n * Supported TRON methods.\n */\nexport enum TrxMethod {\n SignMessage = 'signMessage',\n SignTransaction = 'signTransaction',\n\n // @deprecated Use `SignMessage` instead.\n SignMessageV2 = 'signMessageV2',\n // @deprecated Not supported anymore.\n VerifyMessageV2 = 'verifyMessageV2',\n}\n\nexport const TrxEoaAccountStruct = object({\n ...KeyringAccountStruct.schema,\n /**\n * Account address.\n */\n address: TrxAddressStruct,\n /**\n * Account type.\n */\n type: literal(`${TrxAccountType.Eoa}`),\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n /**\n * Account supported methods.\n */\n methods: array(enums(Object.values(TrxMethod))),\n});\n\nexport type TrxEoaAccount = Infer<typeof TrxEoaAccountStruct>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/trx/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAUnD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IACnB,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IAGnC,aAAa,kBAAkB;IAE/B,eAAe,oBAAoB;CACpC;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;IAE9B;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/trx/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAUnD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IACnB,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IAGnC,aAAa,kBAAkB;IAE/B,eAAe,oBAAoB;CACpC;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;IAE9B;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/trx/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAUnD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IACnB,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IAGnC,aAAa,kBAAkB;IAE/B,eAAe,oBAAoB;CACpC;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;IAE9B;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/trx/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAUnD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IACnB,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IAGnC,aAAa,kBAAkB;IAE/B,eAAe,oBAAoB;CACpC;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;IAE9B;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -1,5 +1,4 @@
1
- import { object } from "@metamask/keyring-utils";
2
- import { array, enums, literal, nonempty } from "@metamask/superstruct";
1
+ import { array, enums, literal, nonempty, object } from "@metamask/superstruct";
3
2
  import { definePattern } from "@metamask/utils";
4
3
  import { CaipChainIdStruct, KeyringAccountStruct, TrxAccountType } from "../api/index.mjs";
5
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../../src/trx/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,gCAAgC;AAEjD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,8BAA8B;AACxE,OAAO,EAAE,aAAa,EAAE,wBAAwB;AAEhD,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACf,yBAAe;AAEhB;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAC3C,YAAY,EACZ,+BAA+B,CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAN,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,gDAAmC,CAAA;IAEnC,yCAAyC;IACzC,4CAA+B,CAAA;IAC/B,qCAAqC;IACrC,gDAAmC,CAAA;AACrC,CAAC,EARW,SAAS,KAAT,SAAS,QAQpB;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;IACxC,GAAG,oBAAoB,CAAC,MAAM;IAC9B;;OAEG;IACH,OAAO,EAAE,gBAAgB;IACzB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,CAAC;IACtC;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC1C;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;CAChD,CAAC,CAAC","sourcesContent":["import { object } from '@metamask/keyring-utils';\nimport type { Infer } from '@metamask/superstruct';\nimport { array, enums, literal, nonempty } from '@metamask/superstruct';\nimport { definePattern } from '@metamask/utils';\n\nimport {\n CaipChainIdStruct,\n KeyringAccountStruct,\n TrxAccountType,\n} from '../api';\n\n/**\n * TRON addresses are Base58-encoded strings that are exactly 34 characters long\n * and start with the letter 'T'.\n */\nexport const TrxAddressStruct = definePattern(\n 'TrxAddress',\n /^T[1-9A-HJ-NP-Za-km-z]{33}$/iu,\n);\n\n/**\n * Supported TRON methods.\n */\nexport enum TrxMethod {\n SignMessage = 'signMessage',\n SignTransaction = 'signTransaction',\n\n // @deprecated Use `SignMessage` instead.\n SignMessageV2 = 'signMessageV2',\n // @deprecated Not supported anymore.\n VerifyMessageV2 = 'verifyMessageV2',\n}\n\nexport const TrxEoaAccountStruct = object({\n ...KeyringAccountStruct.schema,\n /**\n * Account address.\n */\n address: TrxAddressStruct,\n /**\n * Account type.\n */\n type: literal(`${TrxAccountType.Eoa}`),\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n /**\n * Account supported methods.\n */\n methods: array(enums(Object.values(TrxMethod))),\n});\n\nexport type TrxEoaAccount = Infer<typeof TrxEoaAccountStruct>;\n"]}
1
+ {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../../src/trx/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,8BAA8B;AAChF,OAAO,EAAE,aAAa,EAAE,wBAAwB;AAEhD,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACf,yBAAe;AAEhB;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAC3C,YAAY,EACZ,+BAA+B,CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAN,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,gDAAmC,CAAA;IAEnC,yCAAyC;IACzC,4CAA+B,CAAA;IAC/B,qCAAqC;IACrC,gDAAmC,CAAA;AACrC,CAAC,EARW,SAAS,KAAT,SAAS,QAQpB;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;IACxC,GAAG,oBAAoB,CAAC,MAAM;IAC9B;;OAEG;IACH,OAAO,EAAE,gBAAgB;IACzB;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,CAAC;IACtC;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC1C;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;CAChD,CAAC,CAAC","sourcesContent":["import type { Infer } from '@metamask/superstruct';\nimport { array, enums, literal, nonempty, object } from '@metamask/superstruct';\nimport { definePattern } from '@metamask/utils';\n\nimport {\n CaipChainIdStruct,\n KeyringAccountStruct,\n TrxAccountType,\n} from '../api';\n\n/**\n * TRON addresses are Base58-encoded strings that are exactly 34 characters long\n * and start with the letter 'T'.\n */\nexport const TrxAddressStruct = definePattern(\n 'TrxAddress',\n /^T[1-9A-HJ-NP-Za-km-z]{33}$/iu,\n);\n\n/**\n * Supported TRON methods.\n */\nexport enum TrxMethod {\n SignMessage = 'signMessage',\n SignTransaction = 'signTransaction',\n\n // @deprecated Use `SignMessage` instead.\n SignMessageV2 = 'signMessageV2',\n // @deprecated Not supported anymore.\n VerifyMessageV2 = 'verifyMessageV2',\n}\n\nexport const TrxEoaAccountStruct = object({\n ...KeyringAccountStruct.schema,\n /**\n * Account address.\n */\n address: TrxAddressStruct,\n /**\n * Account type.\n */\n type: literal(`${TrxAccountType.Eoa}`),\n /**\n * Account supported scopes (CAIP-2 chain IDs).\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n /**\n * Account supported methods.\n */\n methods: array(enums(Object.values(TrxMethod))),\n});\n\nexport type TrxEoaAccount = Infer<typeof TrxEoaAccountStruct>;\n"]}
@@ -72,7 +72,7 @@ export declare const CreateAccountOptionsStruct: import("@metamask/superstruct")
72
72
  type: "custom";
73
73
  } | {
74
74
  type: "private-key:import";
75
- encoding: "hexadecimal" | "base58";
75
+ encoding: "hexadecimal" | "base58" | "base32";
76
76
  privateKey: string;
77
77
  accountType?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
78
78
  }, null>;
@@ -72,7 +72,7 @@ export declare const CreateAccountOptionsStruct: import("@metamask/superstruct")
72
72
  type: "custom";
73
73
  } | {
74
74
  type: "private-key:import";
75
- encoding: "hexadecimal" | "base58";
75
+ encoding: "hexadecimal" | "base58" | "base32";
76
76
  privateKey: string;
77
77
  accountType?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
78
78
  }, null>;
@@ -4,7 +4,7 @@ import type { Infer } from "@metamask/superstruct";
4
4
  */
5
5
  export declare const CreateAccountPrivateKeyOptionsStruct: import("@metamask/superstruct").Struct<{
6
6
  type: "private-key:import";
7
- encoding: "hexadecimal" | "base58";
7
+ encoding: "hexadecimal" | "base58" | "base32";
8
8
  privateKey: string;
9
9
  accountType?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
10
10
  }, {
@@ -19,9 +19,10 @@ export declare const CreateAccountPrivateKeyOptionsStruct: import("@metamask/sup
19
19
  /**
20
20
  * The encoding of the private key.
21
21
  */
22
- encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58", {
22
+ encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58" | "base32", {
23
23
  hexadecimal: "hexadecimal";
24
24
  base58: "base58";
25
+ base32: "base32";
25
26
  }>;
26
27
  /**
27
28
  * The account type of the imported account.
@@ -1 +1 @@
1
- {"version":3,"file":"private-key.d.cts","sourceRoot":"","sources":["../../../../src/v2/api/create-account/private-key.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAKnD;;GAEG;AACH,eAAO,MAAM,oCAAoC;;;;;;IAC/C;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;IAEH;;OAEG;;;;;;;;;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAChD,OAAO,oCAAoC,CAC5C,CAAC"}
1
+ {"version":3,"file":"private-key.d.cts","sourceRoot":"","sources":["../../../../src/v2/api/create-account/private-key.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAKnD;;GAEG;AACH,eAAO,MAAM,oCAAoC;;;;;;IAC/C;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;IAEH;;OAEG;;;;;;;;;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAChD,OAAO,oCAAoC,CAC5C,CAAC"}
@@ -4,7 +4,7 @@ import type { Infer } from "@metamask/superstruct";
4
4
  */
5
5
  export declare const CreateAccountPrivateKeyOptionsStruct: import("@metamask/superstruct").Struct<{
6
6
  type: "private-key:import";
7
- encoding: "hexadecimal" | "base58";
7
+ encoding: "hexadecimal" | "base58" | "base32";
8
8
  privateKey: string;
9
9
  accountType?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
10
10
  }, {
@@ -19,9 +19,10 @@ export declare const CreateAccountPrivateKeyOptionsStruct: import("@metamask/sup
19
19
  /**
20
20
  * The encoding of the private key.
21
21
  */
22
- encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58", {
22
+ encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58" | "base32", {
23
23
  hexadecimal: "hexadecimal";
24
24
  base58: "base58";
25
+ base32: "base32";
25
26
  }>;
26
27
  /**
27
28
  * The account type of the imported account.
@@ -1 +1 @@
1
- {"version":3,"file":"private-key.d.mts","sourceRoot":"","sources":["../../../../src/v2/api/create-account/private-key.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAKnD;;GAEG;AACH,eAAO,MAAM,oCAAoC;;;;;;IAC/C;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;IAEH;;OAEG;;;;;;;;;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAChD,OAAO,oCAAoC,CAC5C,CAAC"}
1
+ {"version":3,"file":"private-key.d.mts","sourceRoot":"","sources":["../../../../src/v2/api/create-account/private-key.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAKnD;;GAEG;AACH,eAAO,MAAM,oCAAoC;;;;;;IAC/C;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;IAEH;;OAEG;;;;;;;;;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAChD,OAAO,oCAAoC,CAC5C,CAAC"}
@@ -14,12 +14,13 @@ export declare enum AccountExportType {
14
14
  */
15
15
  export declare const ExportAccountOptionsStruct: import("@metamask/superstruct").Struct<{
16
16
  type: "private-key";
17
- encoding: "hexadecimal" | "base58";
17
+ encoding: "hexadecimal" | "base58" | "base32";
18
18
  }, {
19
19
  type: import("@metamask/superstruct").Struct<"private-key", "private-key">;
20
- encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58", {
20
+ encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58" | "base32", {
21
21
  hexadecimal: "hexadecimal";
22
22
  base58: "base58";
23
+ base32: "base32";
23
24
  }>;
24
25
  }>;
25
26
  /**
@@ -31,14 +32,15 @@ export type ExportAccountOptions = Infer<typeof ExportAccountOptionsStruct>;
31
32
  */
32
33
  export declare const ExportedAccountStruct: import("@metamask/superstruct").Struct<{
33
34
  type: "private-key";
34
- encoding: "hexadecimal" | "base58";
35
+ encoding: "hexadecimal" | "base58" | "base32";
35
36
  privateKey: string;
36
37
  }, {
37
38
  type: import("@metamask/superstruct").Struct<"private-key", "private-key">;
38
39
  privateKey: import("@metamask/superstruct").Struct<string, null>;
39
- encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58", {
40
+ encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58" | "base32", {
40
41
  hexadecimal: "hexadecimal";
41
42
  base58: "base58";
43
+ base32: "base32";
42
44
  }>;
43
45
  }>;
44
46
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../../src/v2/api/export-account/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAOnD,kCAA8B;AAE9B;;GAEG;AACH,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,UAAU,gBAAgB;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;EAAuC,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;EAAkC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../../src/v2/api/export-account/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAOnD,kCAA8B;AAE9B;;GAEG;AACH,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,UAAU,gBAAgB;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;EAAuC,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAAkC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -14,12 +14,13 @@ export declare enum AccountExportType {
14
14
  */
15
15
  export declare const ExportAccountOptionsStruct: import("@metamask/superstruct").Struct<{
16
16
  type: "private-key";
17
- encoding: "hexadecimal" | "base58";
17
+ encoding: "hexadecimal" | "base58" | "base32";
18
18
  }, {
19
19
  type: import("@metamask/superstruct").Struct<"private-key", "private-key">;
20
- encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58", {
20
+ encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58" | "base32", {
21
21
  hexadecimal: "hexadecimal";
22
22
  base58: "base58";
23
+ base32: "base32";
23
24
  }>;
24
25
  }>;
25
26
  /**
@@ -31,14 +32,15 @@ export type ExportAccountOptions = Infer<typeof ExportAccountOptionsStruct>;
31
32
  */
32
33
  export declare const ExportedAccountStruct: import("@metamask/superstruct").Struct<{
33
34
  type: "private-key";
34
- encoding: "hexadecimal" | "base58";
35
+ encoding: "hexadecimal" | "base58" | "base32";
35
36
  privateKey: string;
36
37
  }, {
37
38
  type: import("@metamask/superstruct").Struct<"private-key", "private-key">;
38
39
  privateKey: import("@metamask/superstruct").Struct<string, null>;
39
- encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58", {
40
+ encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58" | "base32", {
40
41
  hexadecimal: "hexadecimal";
41
42
  base58: "base58";
43
+ base32: "base32";
42
44
  }>;
43
45
  }>;
44
46
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/v2/api/export-account/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAOnD,kCAA8B;AAE9B;;GAEG;AACH,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,UAAU,gBAAgB;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;EAAuC,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;EAAkC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/v2/api/export-account/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAOnD,kCAA8B;AAE9B;;GAEG;AACH,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,UAAU,gBAAgB;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;EAAuC,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAAkC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -4,7 +4,7 @@ import type { Infer } from "@metamask/superstruct";
4
4
  */
5
5
  export declare const PrivateKeyExportedAccountStruct: import("@metamask/superstruct").Struct<{
6
6
  type: "private-key";
7
- encoding: "hexadecimal" | "base58";
7
+ encoding: "hexadecimal" | "base58" | "base32";
8
8
  privateKey: string;
9
9
  }, {
10
10
  /**
@@ -18,9 +18,10 @@ export declare const PrivateKeyExportedAccountStruct: import("@metamask/superstr
18
18
  /**
19
19
  * The encoding of the exported private key.
20
20
  */
21
- encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58", {
21
+ encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58" | "base32", {
22
22
  hexadecimal: "hexadecimal";
23
23
  base58: "base58";
24
+ base32: "base32";
24
25
  }>;
25
26
  }>;
26
27
  /**
@@ -32,7 +33,7 @@ export type PrivateKeyExportedAccount = Infer<typeof PrivateKeyExportedAccountSt
32
33
  */
33
34
  export declare const ExportAccountPrivateKeyOptionsStruct: import("@metamask/superstruct").Struct<{
34
35
  type: "private-key";
35
- encoding: "hexadecimal" | "base58";
36
+ encoding: "hexadecimal" | "base58" | "base32";
36
37
  }, {
37
38
  /**
38
39
  * The type of the account export.
@@ -41,9 +42,10 @@ export declare const ExportAccountPrivateKeyOptionsStruct: import("@metamask/sup
41
42
  /**
42
43
  * The encoding of the exported private key.
43
44
  */
44
- encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58", {
45
+ encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58" | "base32", {
45
46
  hexadecimal: "hexadecimal";
46
47
  base58: "base58";
48
+ base32: "base32";
47
49
  }>;
48
50
  }>;
49
51
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"private-key.d.cts","sourceRoot":"","sources":["../../../../src/v2/api/export-account/private-key.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;IAC1C;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAC3C,OAAO,+BAA+B,CACvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oCAAoC;;;;IAC/C;;OAEG;;IAEH;;OAEG;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAChD,OAAO,oCAAoC,CAC5C,CAAC"}
1
+ {"version":3,"file":"private-key.d.cts","sourceRoot":"","sources":["../../../../src/v2/api/export-account/private-key.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;IAC1C;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAC3C,OAAO,+BAA+B,CACvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oCAAoC;;;;IAC/C;;OAEG;;IAEH;;OAEG;;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAChD,OAAO,oCAAoC,CAC5C,CAAC"}
@@ -4,7 +4,7 @@ import type { Infer } from "@metamask/superstruct";
4
4
  */
5
5
  export declare const PrivateKeyExportedAccountStruct: import("@metamask/superstruct").Struct<{
6
6
  type: "private-key";
7
- encoding: "hexadecimal" | "base58";
7
+ encoding: "hexadecimal" | "base58" | "base32";
8
8
  privateKey: string;
9
9
  }, {
10
10
  /**
@@ -18,9 +18,10 @@ export declare const PrivateKeyExportedAccountStruct: import("@metamask/superstr
18
18
  /**
19
19
  * The encoding of the exported private key.
20
20
  */
21
- encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58", {
21
+ encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58" | "base32", {
22
22
  hexadecimal: "hexadecimal";
23
23
  base58: "base58";
24
+ base32: "base32";
24
25
  }>;
25
26
  }>;
26
27
  /**
@@ -32,7 +33,7 @@ export type PrivateKeyExportedAccount = Infer<typeof PrivateKeyExportedAccountSt
32
33
  */
33
34
  export declare const ExportAccountPrivateKeyOptionsStruct: import("@metamask/superstruct").Struct<{
34
35
  type: "private-key";
35
- encoding: "hexadecimal" | "base58";
36
+ encoding: "hexadecimal" | "base58" | "base32";
36
37
  }, {
37
38
  /**
38
39
  * The type of the account export.
@@ -41,9 +42,10 @@ export declare const ExportAccountPrivateKeyOptionsStruct: import("@metamask/sup
41
42
  /**
42
43
  * The encoding of the exported private key.
43
44
  */
44
- encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58", {
45
+ encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58" | "base32", {
45
46
  hexadecimal: "hexadecimal";
46
47
  base58: "base58";
48
+ base32: "base32";
47
49
  }>;
48
50
  }>;
49
51
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"private-key.d.mts","sourceRoot":"","sources":["../../../../src/v2/api/export-account/private-key.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;IAC1C;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAC3C,OAAO,+BAA+B,CACvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oCAAoC;;;;IAC/C;;OAEG;;IAEH;;OAEG;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAChD,OAAO,oCAAoC,CAC5C,CAAC"}
1
+ {"version":3,"file":"private-key.d.mts","sourceRoot":"","sources":["../../../../src/v2/api/export-account/private-key.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;IAC1C;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAC3C,OAAO,+BAA+B,CACvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oCAAoC;;;;IAC/C;;OAEG;;IAEH;;OAEG;;;;;;EAEH,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAChD,OAAO,oCAAoC,CAC5C,CAAC"}
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./keyring-capabilities.cjs"), exports);
18
18
  __exportStar(require("./keyring-type.cjs"), exports);
19
19
  __exportStar(require("./keyring-rpc.cjs"), exports);
20
+ __exportStar(require("./keyring-snap-rpc.cjs"), exports);
20
21
  __exportStar(require("./create-account/index.cjs"), exports);
21
22
  __exportStar(require("./export-account/index.cjs"), exports);
22
23
  __exportStar(require("./private-key.cjs"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/v2/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,6DAAuC;AACvC,qDAA+B;AAC/B,oDAA8B;AAC9B,6DAAiC;AACjC,6DAAiC;AACjC,oDAA8B","sourcesContent":["export type * from './keyring';\nexport * from './keyring-capabilities';\nexport * from './keyring-type';\nexport * from './keyring-rpc';\nexport * from './create-account';\nexport * from './export-account';\nexport * from './private-key';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/v2/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,6DAAuC;AACvC,qDAA+B;AAC/B,oDAA8B;AAC9B,yDAAmC;AACnC,6DAAiC;AACjC,6DAAiC;AACjC,oDAA8B","sourcesContent":["export type * from './keyring';\nexport * from './keyring-capabilities';\nexport * from './keyring-type';\nexport * from './keyring-rpc';\nexport * from './keyring-snap-rpc';\nexport * from './create-account';\nexport * from './export-account';\nexport * from './private-key';\n"]}
@@ -2,6 +2,7 @@ export type * from "./keyring.cjs";
2
2
  export * from "./keyring-capabilities.cjs";
3
3
  export * from "./keyring-type.cjs";
4
4
  export * from "./keyring-rpc.cjs";
5
+ export * from "./keyring-snap-rpc.cjs";
5
6
  export * from "./create-account/index.cjs";
6
7
  export * from "./export-account/index.cjs";
7
8
  export * from "./private-key.cjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/v2/api/index.ts"],"names":[],"mappings":"AAAA,mCAA+B;AAC/B,2CAAuC;AACvC,mCAA+B;AAC/B,kCAA8B;AAC9B,2CAAiC;AACjC,2CAAiC;AACjC,kCAA8B"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/v2/api/index.ts"],"names":[],"mappings":"AAAA,mCAA+B;AAC/B,2CAAuC;AACvC,mCAA+B;AAC/B,kCAA8B;AAC9B,uCAAmC;AACnC,2CAAiC;AACjC,2CAAiC;AACjC,kCAA8B"}
@@ -2,6 +2,7 @@ export type * from "./keyring.mjs";
2
2
  export * from "./keyring-capabilities.mjs";
3
3
  export * from "./keyring-type.mjs";
4
4
  export * from "./keyring-rpc.mjs";
5
+ export * from "./keyring-snap-rpc.mjs";
5
6
  export * from "./create-account/index.mjs";
6
7
  export * from "./export-account/index.mjs";
7
8
  export * from "./private-key.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/v2/api/index.ts"],"names":[],"mappings":"AAAA,mCAA+B;AAC/B,2CAAuC;AACvC,mCAA+B;AAC/B,kCAA8B;AAC9B,2CAAiC;AACjC,2CAAiC;AACjC,kCAA8B"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/v2/api/index.ts"],"names":[],"mappings":"AAAA,mCAA+B;AAC/B,2CAAuC;AACvC,mCAA+B;AAC/B,kCAA8B;AAC9B,uCAAmC;AACnC,2CAAiC;AACjC,2CAAiC;AACjC,kCAA8B"}
@@ -1,6 +1,7 @@
1
1
  export * from "./keyring-capabilities.mjs";
2
2
  export * from "./keyring-type.mjs";
3
3
  export * from "./keyring-rpc.mjs";
4
+ export * from "./keyring-snap-rpc.mjs";
4
5
  export * from "./create-account/index.mjs";
5
6
  export * from "./export-account/index.mjs";
6
7
  export * from "./private-key.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/v2/api/index.ts"],"names":[],"mappings":"AACA,2CAAuC;AACvC,mCAA+B;AAC/B,kCAA8B;AAC9B,2CAAiC;AACjC,2CAAiC;AACjC,kCAA8B","sourcesContent":["export type * from './keyring';\nexport * from './keyring-capabilities';\nexport * from './keyring-type';\nexport * from './keyring-rpc';\nexport * from './create-account';\nexport * from './export-account';\nexport * from './private-key';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/v2/api/index.ts"],"names":[],"mappings":"AACA,2CAAuC;AACvC,mCAA+B;AAC/B,kCAA8B;AAC9B,uCAAmC;AACnC,2CAAiC;AACjC,2CAAiC;AACjC,kCAA8B","sourcesContent":["export type * from './keyring';\nexport * from './keyring-capabilities';\nexport * from './keyring-type';\nexport * from './keyring-rpc';\nexport * from './keyring-snap-rpc';\nexport * from './create-account';\nexport * from './export-account';\nexport * from './private-key';\n"]}
@@ -56,5 +56,42 @@ exports.KeyringCapabilitiesStruct = (0, superstruct_1.object)({
56
56
  custom: (0, superstruct_1.exactOptional)((0, superstruct_1.partial)((0, superstruct_1.object)({
57
57
  createAccounts: (0, superstruct_1.boolean)(),
58
58
  }))),
59
+ /**
60
+ * Snap-specific capabilities supported by this keyring.
61
+ *
62
+ * Each flag maps to a Snap keyring RPC method that the Snap implements.
63
+ */
64
+ snap: (0, superstruct_1.exactOptional)((0, superstruct_1.object)({
65
+ /**
66
+ * Asset-related capabilities.
67
+ */
68
+ assets: (0, superstruct_1.exactOptional)((0, superstruct_1.object)({
69
+ /**
70
+ * Whether the keyring supports getting account assets
71
+ * (`keyring_getAccountAssets`).
72
+ */
73
+ metadata: (0, superstruct_1.exactOptional)((0, superstruct_1.boolean)()),
74
+ /**
75
+ * Whether the keyring supports getting account balances
76
+ * (`keyring_getAccountBalances`).
77
+ */
78
+ balances: (0, superstruct_1.exactOptional)((0, superstruct_1.boolean)()),
79
+ })),
80
+ /**
81
+ * Whether the keyring supports getting account transactions
82
+ * (`keyring_getAccountTransactions`).
83
+ */
84
+ transactions: (0, superstruct_1.exactOptional)((0, superstruct_1.boolean)()),
85
+ /**
86
+ * Whether the keyring supports receiving selected accounts notifications
87
+ * (`keyring_setSelectedAccounts`).
88
+ */
89
+ selectedAccounts: (0, superstruct_1.exactOptional)((0, superstruct_1.boolean)()),
90
+ /**
91
+ * Whether the keyring supports resolving the account address to use for
92
+ * routing a signing request (`keyring_resolveAccountAddress`).
93
+ */
94
+ resolveAccountAddress: (0, superstruct_1.exactOptional)((0, superstruct_1.boolean)()),
95
+ })),
59
96
  });
60
97
  //# sourceMappingURL=keyring-capabilities.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyring-capabilities.cjs","sourceRoot":"","sources":["../../../src/v2/api/keyring-capabilities.ts"],"names":[],"mappings":";;;AAAA,uDAO+B;AAG/B,6CAAmD;AACnD,mDAGuB;AAEvB;;GAEG;AACU,QAAA,yBAAyB,GAAG,IAAA,oBAAM,EAAC;IAC9C;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,wBAAiB,CAAC,CAAC;IAC1C;;OAEG;IACH,KAAK,EAAE,IAAA,2BAAa,EAClB,IAAA,oBAAM,EAAC;QACL;;WAEG;QACH,UAAU,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;QACpC;;WAEG;QACH,WAAW,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;QACrC;;WAEG;QACH,gBAAgB,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;QAC1C;;WAEG;QACH,QAAQ,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;KACnC,CAAC,CACH;IACD;;OAEG;IACH,UAAU,EAAE,IAAA,2BAAa,EACvB,IAAA,oBAAM,EAAC;QACL;;WAEG;QACH,aAAa,EAAE,IAAA,2BAAa,EAAC,IAAA,mBAAK,EAAC,0CAA4B,CAAC,CAAC;QACjE;;WAEG;QACH,aAAa,EAAE,IAAA,2BAAa,EAAC,IAAA,mBAAK,EAAC,0CAA4B,CAAC,CAAC;KAClE,CAAC,CACH;IACD;;;;;;OAMG;IACH,MAAM,EAAE,IAAA,2BAAa,EACnB,IAAA,qBAAO,EACL,IAAA,oBAAM,EAAC;QACL,cAAc,EAAE,IAAA,qBAAO,GAAE;KAC1B,CAAC,CACH,CACF;CACF,CAAC,CAAC","sourcesContent":["import {\n array,\n boolean,\n exactOptional,\n nonempty,\n object,\n partial,\n} from '@metamask/superstruct';\nimport type { Infer } from '@metamask/superstruct';\n\nimport { CaipChainIdStruct } from '../../api/caip';\nimport {\n ExportPrivateKeyFormatStruct,\n ImportPrivateKeyFormatStruct,\n} from './private-key';\n\n/**\n * Struct for {@link KeyringCapabilities}.\n */\nexport const KeyringCapabilitiesStruct = object({\n /**\n * List of CAIP-2 chain IDs that this keyring supports.\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n /**\n * BIP-44 capabilities supported by this keyring.\n */\n bip44: exactOptional(\n object({\n /**\n * Whether the keyring supports deriving accounts from a specific BIP-44 path.\n */\n derivePath: exactOptional(boolean()),\n /**\n * Whether the keyring supports deriving accounts from a BIP-44 account index.\n */\n deriveIndex: exactOptional(boolean()),\n /**\n * Whether the keyring supports deriving accounts from a range of BIP-44 account indices.\n */\n deriveIndexRange: exactOptional(boolean()),\n /**\n * Whether the keyring supports BIP-44 account discovery.\n */\n discover: exactOptional(boolean()),\n }),\n ),\n /**\n * Private key capabilities supported by this keyring.\n */\n privateKey: exactOptional(\n object({\n /**\n * List of supported formats for importing private keys.\n */\n importFormats: exactOptional(array(ImportPrivateKeyFormatStruct)),\n /**\n * List of supported formats for exporting private keys.\n */\n exportFormats: exactOptional(array(ExportPrivateKeyFormatStruct)),\n }),\n ),\n /**\n * Indicates which Keyring methods accept non-standard options.\n *\n * When a method is set to `true`, it signals that the keyring implementation\n * accepts custom options for that method, different from the standard API.\n * This is a workaround for keyrings with very specific requirements.\n */\n custom: exactOptional(\n partial(\n object({\n createAccounts: boolean(),\n }),\n ),\n ),\n});\n\n/**\n * Type representing the capabilities supported by a keyring.\n *\n * @example\n * ```ts\n * const capabilities: KeyringCapabilities = {\n * scopes: ['bip122:_'],\n * bip44: {\n * derivePath: true,\n * deriveIndex: true,\n * deriveIndexRange: true,\n * discover: true,\n * },\n * privateKey: {\n * importFormats: [\n * { encoding: 'base58', type: 'bip122:p2sh' },\n * { encoding: 'base58', type: 'bip122:p2tr' },\n * { encoding: 'base58', type: 'bip122:p2pkh' },\n * { encoding: 'base58', type: 'bip122:p2wpkh' },\n * ],\n * exportFormats: [\n * { encoding: 'base58' },\n * { encoding: 'base58' },\n * ],\n * },\n * };\n * ```\n */\nexport type KeyringCapabilities = Infer<typeof KeyringCapabilitiesStruct>;\n"]}
1
+ {"version":3,"file":"keyring-capabilities.cjs","sourceRoot":"","sources":["../../../src/v2/api/keyring-capabilities.ts"],"names":[],"mappings":";;;AAAA,uDAO+B;AAG/B,6CAAmD;AACnD,mDAGuB;AAEvB;;GAEG;AACU,QAAA,yBAAyB,GAAG,IAAA,oBAAM,EAAC;IAC9C;;OAEG;IACH,MAAM,EAAE,IAAA,sBAAQ,EAAC,IAAA,mBAAK,EAAC,wBAAiB,CAAC,CAAC;IAC1C;;OAEG;IACH,KAAK,EAAE,IAAA,2BAAa,EAClB,IAAA,oBAAM,EAAC;QACL;;WAEG;QACH,UAAU,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;QACpC;;WAEG;QACH,WAAW,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;QACrC;;WAEG;QACH,gBAAgB,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;QAC1C;;WAEG;QACH,QAAQ,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;KACnC,CAAC,CACH;IACD;;OAEG;IACH,UAAU,EAAE,IAAA,2BAAa,EACvB,IAAA,oBAAM,EAAC;QACL;;WAEG;QACH,aAAa,EAAE,IAAA,2BAAa,EAAC,IAAA,mBAAK,EAAC,0CAA4B,CAAC,CAAC;QACjE;;WAEG;QACH,aAAa,EAAE,IAAA,2BAAa,EAAC,IAAA,mBAAK,EAAC,0CAA4B,CAAC,CAAC;KAClE,CAAC,CACH;IACD;;;;;;OAMG;IACH,MAAM,EAAE,IAAA,2BAAa,EACnB,IAAA,qBAAO,EACL,IAAA,oBAAM,EAAC;QACL,cAAc,EAAE,IAAA,qBAAO,GAAE;KAC1B,CAAC,CACH,CACF;IACD;;;;OAIG;IACH,IAAI,EAAE,IAAA,2BAAa,EACjB,IAAA,oBAAM,EAAC;QACL;;WAEG;QACH,MAAM,EAAE,IAAA,2BAAa,EACnB,IAAA,oBAAM,EAAC;YACL;;;eAGG;YACH,QAAQ,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;YAClC;;;eAGG;YACH,QAAQ,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;SACnC,CAAC,CACH;QACD;;;WAGG;QACH,YAAY,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;QACtC;;;WAGG;QACH,gBAAgB,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;QAC1C;;;WAGG;QACH,qBAAqB,EAAE,IAAA,2BAAa,EAAC,IAAA,qBAAO,GAAE,CAAC;KAChD,CAAC,CACH;CACF,CAAC,CAAC","sourcesContent":["import {\n array,\n boolean,\n exactOptional,\n nonempty,\n object,\n partial,\n} from '@metamask/superstruct';\nimport type { Infer } from '@metamask/superstruct';\n\nimport { CaipChainIdStruct } from '../../api/caip';\nimport {\n ExportPrivateKeyFormatStruct,\n ImportPrivateKeyFormatStruct,\n} from './private-key';\n\n/**\n * Struct for {@link KeyringCapabilities}.\n */\nexport const KeyringCapabilitiesStruct = object({\n /**\n * List of CAIP-2 chain IDs that this keyring supports.\n */\n scopes: nonempty(array(CaipChainIdStruct)),\n /**\n * BIP-44 capabilities supported by this keyring.\n */\n bip44: exactOptional(\n object({\n /**\n * Whether the keyring supports deriving accounts from a specific BIP-44 path.\n */\n derivePath: exactOptional(boolean()),\n /**\n * Whether the keyring supports deriving accounts from a BIP-44 account index.\n */\n deriveIndex: exactOptional(boolean()),\n /**\n * Whether the keyring supports deriving accounts from a range of BIP-44 account indices.\n */\n deriveIndexRange: exactOptional(boolean()),\n /**\n * Whether the keyring supports BIP-44 account discovery.\n */\n discover: exactOptional(boolean()),\n }),\n ),\n /**\n * Private key capabilities supported by this keyring.\n */\n privateKey: exactOptional(\n object({\n /**\n * List of supported formats for importing private keys.\n */\n importFormats: exactOptional(array(ImportPrivateKeyFormatStruct)),\n /**\n * List of supported formats for exporting private keys.\n */\n exportFormats: exactOptional(array(ExportPrivateKeyFormatStruct)),\n }),\n ),\n /**\n * Indicates which Keyring methods accept non-standard options.\n *\n * When a method is set to `true`, it signals that the keyring implementation\n * accepts custom options for that method, different from the standard API.\n * This is a workaround for keyrings with very specific requirements.\n */\n custom: exactOptional(\n partial(\n object({\n createAccounts: boolean(),\n }),\n ),\n ),\n /**\n * Snap-specific capabilities supported by this keyring.\n *\n * Each flag maps to a Snap keyring RPC method that the Snap implements.\n */\n snap: exactOptional(\n object({\n /**\n * Asset-related capabilities.\n */\n assets: exactOptional(\n object({\n /**\n * Whether the keyring supports getting account assets\n * (`keyring_getAccountAssets`).\n */\n metadata: exactOptional(boolean()),\n /**\n * Whether the keyring supports getting account balances\n * (`keyring_getAccountBalances`).\n */\n balances: exactOptional(boolean()),\n }),\n ),\n /**\n * Whether the keyring supports getting account transactions\n * (`keyring_getAccountTransactions`).\n */\n transactions: exactOptional(boolean()),\n /**\n * Whether the keyring supports receiving selected accounts notifications\n * (`keyring_setSelectedAccounts`).\n */\n selectedAccounts: exactOptional(boolean()),\n /**\n * Whether the keyring supports resolving the account address to use for\n * routing a signing request (`keyring_resolveAccountAddress`).\n */\n resolveAccountAddress: exactOptional(boolean()),\n }),\n ),\n});\n\n/**\n * Type representing the capabilities supported by a keyring.\n *\n * @example\n * ```ts\n * const capabilities: KeyringCapabilities = {\n * scopes: ['bip122:_'],\n * bip44: {\n * derivePath: true,\n * deriveIndex: true,\n * deriveIndexRange: true,\n * discover: true,\n * },\n * privateKey: {\n * importFormats: [\n * { encoding: 'base58', type: 'bip122:p2sh' },\n * { encoding: 'base58', type: 'bip122:p2tr' },\n * { encoding: 'base58', type: 'bip122:p2pkh' },\n * { encoding: 'base58', type: 'bip122:p2wpkh' },\n * ],\n * exportFormats: [\n * { encoding: 'base58' },\n * { encoding: 'base58' },\n * ],\n * },\n * };\n * ```\n */\nexport type KeyringCapabilities = Infer<typeof KeyringCapabilitiesStruct>;\n"]}
@@ -15,13 +15,22 @@ export declare const KeyringCapabilitiesStruct: import("@metamask/superstruct").
15
15
  };
16
16
  privateKey?: {
17
17
  importFormats?: {
18
- encoding: "hexadecimal" | "base58";
18
+ encoding: "hexadecimal" | "base58" | "base32";
19
19
  type?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
20
20
  }[];
21
21
  exportFormats?: {
22
- encoding: "hexadecimal" | "base58";
22
+ encoding: "hexadecimal" | "base58" | "base32";
23
23
  }[];
24
24
  };
25
+ snap?: {
26
+ assets?: {
27
+ metadata?: boolean;
28
+ balances?: boolean;
29
+ };
30
+ transactions?: boolean;
31
+ selectedAccounts?: boolean;
32
+ resolveAccountAddress?: boolean;
33
+ };
25
34
  }, {
26
35
  /**
27
36
  * List of CAIP-2 chain IDs that this keyring supports.
@@ -58,26 +67,27 @@ export declare const KeyringCapabilitiesStruct: import("@metamask/superstruct").
58
67
  */
59
68
  privateKey: import("@metamask/superstruct").ExactOptionalStruct<{
60
69
  importFormats?: {
61
- encoding: "hexadecimal" | "base58";
70
+ encoding: "hexadecimal" | "base58" | "base32";
62
71
  type?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
63
72
  }[];
64
73
  exportFormats?: {
65
- encoding: "hexadecimal" | "base58";
74
+ encoding: "hexadecimal" | "base58" | "base32";
66
75
  }[];
67
76
  }, {
68
77
  /**
69
78
  * List of supported formats for importing private keys.
70
79
  */
71
80
  importFormats: import("@metamask/superstruct").ExactOptionalStruct<{
72
- encoding: "hexadecimal" | "base58";
81
+ encoding: "hexadecimal" | "base58" | "base32";
73
82
  type?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
74
83
  }[], import("@metamask/superstruct").Struct<{
75
- encoding: "hexadecimal" | "base58";
84
+ encoding: "hexadecimal" | "base58" | "base32";
76
85
  type?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account";
77
86
  }, {
78
- encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58", {
87
+ encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58" | "base32", {
79
88
  hexadecimal: "hexadecimal";
80
89
  base58: "base58";
90
+ base32: "base32";
81
91
  }>;
82
92
  type: import("@metamask/superstruct").ExactOptionalStruct<"eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account", {
83
93
  "eip155:eoa": "eip155:eoa";
@@ -96,13 +106,14 @@ export declare const KeyringCapabilitiesStruct: import("@metamask/superstruct").
96
106
  * List of supported formats for exporting private keys.
97
107
  */
98
108
  exportFormats: import("@metamask/superstruct").ExactOptionalStruct<{
99
- encoding: "hexadecimal" | "base58";
109
+ encoding: "hexadecimal" | "base58" | "base32";
100
110
  }[], import("@metamask/superstruct").Struct<{
101
- encoding: "hexadecimal" | "base58";
111
+ encoding: "hexadecimal" | "base58" | "base32";
102
112
  }, {
103
- encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58", {
113
+ encoding: import("@metamask/superstruct").Struct<"hexadecimal" | "base58" | "base32", {
104
114
  hexadecimal: "hexadecimal";
105
115
  base58: "base58";
116
+ base32: "base32";
106
117
  }>;
107
118
  }>>;
108
119
  }>;
@@ -118,6 +129,54 @@ export declare const KeyringCapabilitiesStruct: import("@metamask/superstruct").
118
129
  }, import("@metamask/superstruct").PartialObjectSchema<{
119
130
  createAccounts: import("@metamask/superstruct").Struct<boolean, null>;
120
131
  }>>;
132
+ /**
133
+ * Snap-specific capabilities supported by this keyring.
134
+ *
135
+ * Each flag maps to a Snap keyring RPC method that the Snap implements.
136
+ */
137
+ snap: import("@metamask/superstruct").ExactOptionalStruct<{
138
+ assets?: {
139
+ metadata?: boolean;
140
+ balances?: boolean;
141
+ };
142
+ transactions?: boolean;
143
+ selectedAccounts?: boolean;
144
+ resolveAccountAddress?: boolean;
145
+ }, {
146
+ /**
147
+ * Asset-related capabilities.
148
+ */
149
+ assets: import("@metamask/superstruct").ExactOptionalStruct<{
150
+ metadata?: boolean;
151
+ balances?: boolean;
152
+ }, {
153
+ /**
154
+ * Whether the keyring supports getting account assets
155
+ * (`keyring_getAccountAssets`).
156
+ */
157
+ metadata: import("@metamask/superstruct").ExactOptionalStruct<boolean, null>;
158
+ /**
159
+ * Whether the keyring supports getting account balances
160
+ * (`keyring_getAccountBalances`).
161
+ */
162
+ balances: import("@metamask/superstruct").ExactOptionalStruct<boolean, null>;
163
+ }>;
164
+ /**
165
+ * Whether the keyring supports getting account transactions
166
+ * (`keyring_getAccountTransactions`).
167
+ */
168
+ transactions: import("@metamask/superstruct").ExactOptionalStruct<boolean, null>;
169
+ /**
170
+ * Whether the keyring supports receiving selected accounts notifications
171
+ * (`keyring_setSelectedAccounts`).
172
+ */
173
+ selectedAccounts: import("@metamask/superstruct").ExactOptionalStruct<boolean, null>;
174
+ /**
175
+ * Whether the keyring supports resolving the account address to use for
176
+ * routing a signing request (`keyring_resolveAccountAddress`).
177
+ */
178
+ resolveAccountAddress: import("@metamask/superstruct").ExactOptionalStruct<boolean, null>;
179
+ }>;
121
180
  }>;
122
181
  /**
123
182
  * Type representing the capabilities supported by a keyring.
@@ -1 +1 @@
1
- {"version":3,"file":"keyring-capabilities.d.cts","sourceRoot":"","sources":["../../../src/v2/api/keyring-capabilities.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAQnD;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;IACpC;;OAEG;;IAEH;;OAEG;;;;;;;QAGC;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;IAIP;;OAEG;;;;;;;;;;QAGC;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;QAEH;;WAEG;;;;;;;;;;;;IAIP;;;;;;OAMG;;;;;;EAQH,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
1
+ {"version":3,"file":"keyring-capabilities.d.cts","sourceRoot":"","sources":["../../../src/v2/api/keyring-capabilities.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAQnD;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACpC;;OAEG;;IAEH;;OAEG;;;;;;;QAGC;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;IAIP;;OAEG;;;;;;;;;;QAGC;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;QAEH;;WAEG;;;;;;;;;;;;;IAIP;;;;;;OAMG;;;;;;IAQH;;;;OAIG;;;;;;;;;;QAGC;;WAEG;;;;;YAGC;;;eAGG;;YAEH;;;eAGG;;;QAIP;;;WAGG;;QAEH;;;WAGG;;QAEH;;;WAGG;;;EAIP,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}