@metamask-previews/keyring-api 21.3.0-e40d1ad → 21.3.0-feb98c5

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 (66) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/api/account-options.cjs +44 -7
  3. package/dist/api/account-options.cjs.map +1 -1
  4. package/dist/api/account-options.d.cts +41 -3
  5. package/dist/api/account-options.d.cts.map +1 -1
  6. package/dist/api/account-options.d.mts +41 -3
  7. package/dist/api/account-options.d.mts.map +1 -1
  8. package/dist/api/account-options.mjs +43 -6
  9. package/dist/api/account-options.mjs.map +1 -1
  10. package/dist/api/account.d.cts +4 -0
  11. package/dist/api/account.d.cts.map +1 -1
  12. package/dist/api/account.d.mts +4 -0
  13. package/dist/api/account.d.mts.map +1 -1
  14. package/dist/api/v2/create-account/custom.cjs +14 -0
  15. package/dist/api/v2/create-account/custom.cjs.map +1 -0
  16. package/dist/api/v2/create-account/custom.d.cts +25 -0
  17. package/dist/api/v2/create-account/custom.d.cts.map +1 -0
  18. package/dist/api/v2/create-account/custom.d.mts +25 -0
  19. package/dist/api/v2/create-account/custom.d.mts.map +1 -0
  20. package/dist/api/v2/create-account/custom.mjs +11 -0
  21. package/dist/api/v2/create-account/custom.mjs.map +1 -0
  22. package/dist/api/v2/create-account/index.cjs +11 -0
  23. package/dist/api/v2/create-account/index.cjs.map +1 -1
  24. package/dist/api/v2/create-account/index.d.cts +11 -1
  25. package/dist/api/v2/create-account/index.d.cts.map +1 -1
  26. package/dist/api/v2/create-account/index.d.mts +11 -1
  27. package/dist/api/v2/create-account/index.d.mts.map +1 -1
  28. package/dist/api/v2/create-account/index.mjs +11 -0
  29. package/dist/api/v2/create-account/index.mjs.map +1 -1
  30. package/dist/api/v2/keyring-capabilities.cjs +10 -0
  31. package/dist/api/v2/keyring-capabilities.cjs.map +1 -1
  32. package/dist/api/v2/keyring-capabilities.d.cts +15 -0
  33. package/dist/api/v2/keyring-capabilities.d.cts.map +1 -1
  34. package/dist/api/v2/keyring-capabilities.d.mts +15 -0
  35. package/dist/api/v2/keyring-capabilities.d.mts.map +1 -1
  36. package/dist/api/v2/keyring-capabilities.mjs +11 -1
  37. package/dist/api/v2/keyring-capabilities.mjs.map +1 -1
  38. package/dist/btc/types.d.cts +16 -0
  39. package/dist/btc/types.d.cts.map +1 -1
  40. package/dist/btc/types.d.mts +16 -0
  41. package/dist/btc/types.d.mts.map +1 -1
  42. package/dist/eth/types.d.cts +8 -0
  43. package/dist/eth/types.d.cts.map +1 -1
  44. package/dist/eth/types.d.mts +8 -0
  45. package/dist/eth/types.d.mts.map +1 -1
  46. package/dist/events.d.cts +16 -0
  47. package/dist/events.d.cts.map +1 -1
  48. package/dist/events.d.mts +16 -0
  49. package/dist/events.d.mts.map +1 -1
  50. package/dist/rpc.cjs +15 -11
  51. package/dist/rpc.cjs.map +1 -1
  52. package/dist/rpc.d.cts +34 -12
  53. package/dist/rpc.d.cts.map +1 -1
  54. package/dist/rpc.d.mts +34 -12
  55. package/dist/rpc.d.mts.map +1 -1
  56. package/dist/rpc.mjs +15 -11
  57. package/dist/rpc.mjs.map +1 -1
  58. package/dist/sol/types.d.cts +4 -0
  59. package/dist/sol/types.d.cts.map +1 -1
  60. package/dist/sol/types.d.mts +4 -0
  61. package/dist/sol/types.d.mts.map +1 -1
  62. package/dist/trx/types.d.cts +4 -0
  63. package/dist/trx/types.d.cts.map +1 -1
  64. package/dist/trx/types.d.mts +4 -0
  65. package/dist/trx/types.d.mts.map +1 -1
  66. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../../src/api/v2/create-account/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2DAAyD;AAGzD,uCAIiB;AACjB,mDAAqE;AAErE,8CAAwB;AACxB,oDAA8B;AAE9B;;GAEG;AACH,IAAY,mBA4BX;AA5BD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,4DAAqC,CAAA;IAErC;;;;;;OAMG;IACH,8DAAuC,CAAA;IAEvC;;;;;;OAMG;IACH,uDAAgC,CAAA;IAEhC;;OAEG;IACH,8DAAuC,CAAA;AACzC,CAAC,EA5BW,mBAAmB,mCAAnB,mBAAmB,QA4B9B;AAED;;GAEG;AACU,QAAA,0BAA0B,GAAG,IAAA,8BAAc,EAAC,CAAC,KAAU,EAAE,EAAE;IACtE,MAAM,mBAAmB,GAAG,KAAK,EAAE,IAA2B,CAAC;IAC/D,QAAQ,mBAAmB,EAAE,CAAC;QAC5B,KAAK,mBAAmB,CAAC,eAAe;YACtC,OAAO,iDAAyC,CAAC;QACnD,KAAK,mBAAmB,CAAC,gBAAgB;YACvC,OAAO,kDAA0C,CAAC;QACpD,KAAK,mBAAmB,CAAC,aAAa;YACpC,OAAO,+CAAuC,CAAC;QACjD,KAAK,mBAAmB,CAAC,gBAAgB;YACvC,OAAO,kDAAoC,CAAC;QAC9C;YACE,wGAAwG;YACxG,OAAO,iDAAyC,CAAC;IACrD,CAAC;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { selectiveUnion } from '@metamask/keyring-utils';\nimport { type Infer } from '@metamask/superstruct';\n\nimport {\n CreateAccountBip44DiscoverOptionsStruct,\n CreateAccountBip44DeriveIndexOptionsStruct,\n CreateAccountBip44DerivePathOptionsStruct,\n} from './bip44';\nimport { CreateAccountPrivateKeyOptionsStruct } from './private-key';\n\nexport * from './bip44';\nexport * from './private-key';\n\n/**\n * Enum representing the different ways an account can be created.\n */\nexport enum AccountCreationType {\n /**\n * Represents an account created using a BIP-44 derivation path.\n */\n Bip44DerivePath = 'bip44:derive-path',\n\n /**\n * Represents accounts created using a BIP-44 account index.\n *\n * More than one account can be created, for example, the keyring can create\n * multiple account types (e.g., P2PKH, P2TR, P2WPKH) for the same account\n * index.\n */\n Bip44DeriveIndex = 'bip44:derive-index',\n\n /**\n * Represents accounts created through BIP-44 account discovery.\n *\n * More than one account can be created, for example, the keyring can create\n * multiple account types (e.g., P2PKH, P2TR, P2WPKH) for the same account\n * index.\n */\n Bip44Discover = 'bip44:discover',\n\n /**\n * Represents an account imported from a private key.\n */\n PrivateKeyImport = 'private-key:import',\n}\n\n/**\n * Struct for {@link CreateAccountOptions}.\n */\nexport const CreateAccountOptionsStruct = selectiveUnion((value: any) => {\n const accountCreationType = value?.type as AccountCreationType;\n switch (accountCreationType) {\n case AccountCreationType.Bip44DerivePath:\n return CreateAccountBip44DerivePathOptionsStruct;\n case AccountCreationType.Bip44DeriveIndex:\n return CreateAccountBip44DeriveIndexOptionsStruct;\n case AccountCreationType.Bip44Discover:\n return CreateAccountBip44DiscoverOptionsStruct;\n case AccountCreationType.PrivateKeyImport:\n return CreateAccountPrivateKeyOptionsStruct;\n default:\n // Return first struct as fallback - validation will fail with proper error indicating the type mismatch\n return CreateAccountBip44DerivePathOptionsStruct;\n }\n});\n\n/**\n * Represents the available options for creating a new account.\n */\nexport type CreateAccountOptions = Infer<typeof CreateAccountOptionsStruct>;\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../../src/api/v2/create-account/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2DAAyD;AAGzD,uCAIiB;AACjB,yCAA4D;AAC5D,mDAAqE;AAErE,8CAAwB;AACxB,+CAAyB;AACzB,oDAA8B;AAE9B;;GAEG;AACH,IAAY,mBAoCX;AApCD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,4DAAqC,CAAA;IAErC;;;;;;OAMG;IACH,8DAAuC,CAAA;IAEvC;;;;;;OAMG;IACH,uDAAgC,CAAA;IAEhC;;OAEG;IACH,8DAAuC,CAAA;IAEvC;;;;;OAKG;IACH,wCAAiB,CAAA;AACnB,CAAC,EApCW,mBAAmB,mCAAnB,mBAAmB,QAoC9B;AAED;;GAEG;AACU,QAAA,0BAA0B,GAAG,IAAA,8BAAc,EAAC,CAAC,KAAU,EAAE,EAAE;IACtE,MAAM,mBAAmB,GAAG,KAAK,EAAE,IAA2B,CAAC;IAC/D,QAAQ,mBAAmB,EAAE,CAAC;QAC5B,KAAK,mBAAmB,CAAC,eAAe;YACtC,OAAO,iDAAyC,CAAC;QACnD,KAAK,mBAAmB,CAAC,gBAAgB;YACvC,OAAO,kDAA0C,CAAC;QACpD,KAAK,mBAAmB,CAAC,aAAa;YACpC,OAAO,+CAAuC,CAAC;QACjD,KAAK,mBAAmB,CAAC,gBAAgB;YACvC,OAAO,kDAAoC,CAAC;QAC9C,KAAK,mBAAmB,CAAC,MAAM;YAC7B,OAAO,yCAAgC,CAAC;QAC1C;YACE,wGAAwG;YACxG,OAAO,iDAAyC,CAAC;IACrD,CAAC;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { selectiveUnion } from '@metamask/keyring-utils';\nimport { type Infer } from '@metamask/superstruct';\n\nimport {\n CreateAccountBip44DiscoverOptionsStruct,\n CreateAccountBip44DeriveIndexOptionsStruct,\n CreateAccountBip44DerivePathOptionsStruct,\n} from './bip44';\nimport { CreateAccountCustomOptionsStruct } from './custom';\nimport { CreateAccountPrivateKeyOptionsStruct } from './private-key';\n\nexport * from './bip44';\nexport * from './custom';\nexport * from './private-key';\n\n/**\n * Enum representing the different ways an account can be created.\n */\nexport enum AccountCreationType {\n /**\n * Represents an account created using a BIP-44 derivation path.\n */\n Bip44DerivePath = 'bip44:derive-path',\n\n /**\n * Represents accounts created using a BIP-44 account index.\n *\n * More than one account can be created, for example, the keyring can create\n * multiple account types (e.g., P2PKH, P2TR, P2WPKH) for the same account\n * index.\n */\n Bip44DeriveIndex = 'bip44:derive-index',\n\n /**\n * Represents accounts created through BIP-44 account discovery.\n *\n * More than one account can be created, for example, the keyring can create\n * multiple account types (e.g., P2PKH, P2TR, P2WPKH) for the same account\n * index.\n */\n Bip44Discover = 'bip44:discover',\n\n /**\n * Represents an account imported from a private key.\n */\n PrivateKeyImport = 'private-key:import',\n\n /**\n * Represents an account created using a custom, keyring-specific method.\n *\n * This is used by keyrings that have non-standard account creation flows\n * and declare `custom.createAccounts: true` in their capabilities.\n */\n Custom = 'custom',\n}\n\n/**\n * Struct for {@link CreateAccountOptions}.\n */\nexport const CreateAccountOptionsStruct = selectiveUnion((value: any) => {\n const accountCreationType = value?.type as AccountCreationType;\n switch (accountCreationType) {\n case AccountCreationType.Bip44DerivePath:\n return CreateAccountBip44DerivePathOptionsStruct;\n case AccountCreationType.Bip44DeriveIndex:\n return CreateAccountBip44DeriveIndexOptionsStruct;\n case AccountCreationType.Bip44Discover:\n return CreateAccountBip44DiscoverOptionsStruct;\n case AccountCreationType.PrivateKeyImport:\n return CreateAccountPrivateKeyOptionsStruct;\n case AccountCreationType.Custom:\n return CreateAccountCustomOptionsStruct;\n default:\n // Return first struct as fallback - validation will fail with proper error indicating the type mismatch\n return CreateAccountBip44DerivePathOptionsStruct;\n }\n});\n\n/**\n * Represents the available options for creating a new account.\n */\nexport type CreateAccountOptions = Infer<typeof CreateAccountOptionsStruct>;\n"]}
@@ -1,5 +1,6 @@
1
1
  import { type Infer } from "@metamask/superstruct";
2
2
  export * from "./bip44.cjs";
3
+ export * from "./custom.cjs";
3
4
  export * from "./private-key.cjs";
4
5
  /**
5
6
  * Enum representing the different ways an account can be created.
@@ -28,7 +29,14 @@ export declare enum AccountCreationType {
28
29
  /**
29
30
  * Represents an account imported from a private key.
30
31
  */
31
- PrivateKeyImport = "private-key:import"
32
+ PrivateKeyImport = "private-key:import",
33
+ /**
34
+ * Represents an account created using a custom, keyring-specific method.
35
+ *
36
+ * This is used by keyrings that have non-standard account creation flows
37
+ * and declare `custom.createAccounts: true` in their capabilities.
38
+ */
39
+ Custom = "custom"
32
40
  }
33
41
  /**
34
42
  * Struct for {@link CreateAccountOptions}.
@@ -45,6 +53,8 @@ export declare const CreateAccountOptionsStruct: import("@metamask/superstruct")
45
53
  type: "bip44:discover";
46
54
  groupIndex: number;
47
55
  entropySource: string;
56
+ } | {
57
+ type: "custom";
48
58
  } | {
49
59
  type: "private-key:import";
50
60
  encoding: "hexadecimal" | "base58";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../../src/api/v2/create-account/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAE,8BAA8B;AASnD,4BAAwB;AACxB,kCAA8B;AAE9B;;GAEG;AACH,oBAAY,mBAAmB;IAC7B;;OAEG;IACH,eAAe,sBAAsB;IAErC;;;;;;OAMG;IACH,gBAAgB,uBAAuB;IAEvC;;;;;;OAMG;IACH,aAAa,mBAAmB;IAEhC;;OAEG;IACH,gBAAgB,uBAAuB;CACxC;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;QAerC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../../src/api/v2/create-account/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAE,8BAA8B;AAUnD,4BAAwB;AACxB,6BAAyB;AACzB,kCAA8B;AAE9B;;GAEG;AACH,oBAAY,mBAAmB;IAC7B;;OAEG;IACH,eAAe,sBAAsB;IAErC;;;;;;OAMG;IACH,gBAAgB,uBAAuB;IAEvC;;;;;;OAMG;IACH,aAAa,mBAAmB;IAEhC;;OAEG;IACH,gBAAgB,uBAAuB;IAEvC;;;;;OAKG;IACH,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;QAiBrC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { type Infer } from "@metamask/superstruct";
2
2
  export * from "./bip44.mjs";
3
+ export * from "./custom.mjs";
3
4
  export * from "./private-key.mjs";
4
5
  /**
5
6
  * Enum representing the different ways an account can be created.
@@ -28,7 +29,14 @@ export declare enum AccountCreationType {
28
29
  /**
29
30
  * Represents an account imported from a private key.
30
31
  */
31
- PrivateKeyImport = "private-key:import"
32
+ PrivateKeyImport = "private-key:import",
33
+ /**
34
+ * Represents an account created using a custom, keyring-specific method.
35
+ *
36
+ * This is used by keyrings that have non-standard account creation flows
37
+ * and declare `custom.createAccounts: true` in their capabilities.
38
+ */
39
+ Custom = "custom"
32
40
  }
33
41
  /**
34
42
  * Struct for {@link CreateAccountOptions}.
@@ -45,6 +53,8 @@ export declare const CreateAccountOptionsStruct: import("@metamask/superstruct")
45
53
  type: "bip44:discover";
46
54
  groupIndex: number;
47
55
  entropySource: string;
56
+ } | {
57
+ type: "custom";
48
58
  } | {
49
59
  type: "private-key:import";
50
60
  encoding: "hexadecimal" | "base58";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/api/v2/create-account/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAE,8BAA8B;AASnD,4BAAwB;AACxB,kCAA8B;AAE9B;;GAEG;AACH,oBAAY,mBAAmB;IAC7B;;OAEG;IACH,eAAe,sBAAsB;IAErC;;;;;;OAMG;IACH,gBAAgB,uBAAuB;IAEvC;;;;;;OAMG;IACH,aAAa,mBAAmB;IAEhC;;OAEG;IACH,gBAAgB,uBAAuB;CACxC;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;QAerC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/api/v2/create-account/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,KAAK,EAAE,8BAA8B;AAUnD,4BAAwB;AACxB,6BAAyB;AACzB,kCAA8B;AAE9B;;GAEG;AACH,oBAAY,mBAAmB;IAC7B;;OAEG;IACH,eAAe,sBAAsB;IAErC;;;;;;OAMG;IACH,gBAAgB,uBAAuB;IAEvC;;;;;;OAMG;IACH,aAAa,mBAAmB;IAEhC;;OAEG;IACH,gBAAgB,uBAAuB;IAEvC;;;;;OAKG;IACH,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;QAiBrC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -1,7 +1,9 @@
1
1
  import { selectiveUnion } from "@metamask/keyring-utils";
2
2
  import { CreateAccountBip44DiscoverOptionsStruct, CreateAccountBip44DeriveIndexOptionsStruct, CreateAccountBip44DerivePathOptionsStruct } from "./bip44.mjs";
3
+ import { CreateAccountCustomOptionsStruct } from "./custom.mjs";
3
4
  import { CreateAccountPrivateKeyOptionsStruct } from "./private-key.mjs";
4
5
  export * from "./bip44.mjs";
6
+ export * from "./custom.mjs";
5
7
  export * from "./private-key.mjs";
6
8
  /**
7
9
  * Enum representing the different ways an account can be created.
@@ -32,6 +34,13 @@ export var AccountCreationType;
32
34
  * Represents an account imported from a private key.
33
35
  */
34
36
  AccountCreationType["PrivateKeyImport"] = "private-key:import";
37
+ /**
38
+ * Represents an account created using a custom, keyring-specific method.
39
+ *
40
+ * This is used by keyrings that have non-standard account creation flows
41
+ * and declare `custom.createAccounts: true` in their capabilities.
42
+ */
43
+ AccountCreationType["Custom"] = "custom";
35
44
  })(AccountCreationType || (AccountCreationType = {}));
36
45
  /**
37
46
  * Struct for {@link CreateAccountOptions}.
@@ -47,6 +56,8 @@ export const CreateAccountOptionsStruct = selectiveUnion((value) => {
47
56
  return CreateAccountBip44DiscoverOptionsStruct;
48
57
  case AccountCreationType.PrivateKeyImport:
49
58
  return CreateAccountPrivateKeyOptionsStruct;
59
+ case AccountCreationType.Custom:
60
+ return CreateAccountCustomOptionsStruct;
50
61
  default:
51
62
  // Return first struct as fallback - validation will fail with proper error indicating the type mismatch
52
63
  return CreateAccountBip44DerivePathOptionsStruct;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/api/v2/create-account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gCAAgC;AAGzD,OAAO,EACL,uCAAuC,EACvC,0CAA0C,EAC1C,yCAAyC,EAC1C,oBAAgB;AACjB,OAAO,EAAE,oCAAoC,EAAE,0BAAsB;AAErE,4BAAwB;AACxB,kCAA8B;AAE9B;;GAEG;AACH,MAAM,CAAN,IAAY,mBA4BX;AA5BD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,4DAAqC,CAAA;IAErC;;;;;;OAMG;IACH,8DAAuC,CAAA;IAEvC;;;;;;OAMG;IACH,uDAAgC,CAAA;IAEhC;;OAEG;IACH,8DAAuC,CAAA;AACzC,CAAC,EA5BW,mBAAmB,KAAnB,mBAAmB,QA4B9B;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,cAAc,CAAC,CAAC,KAAU,EAAE,EAAE;IACtE,MAAM,mBAAmB,GAAG,KAAK,EAAE,IAA2B,CAAC;IAC/D,QAAQ,mBAAmB,EAAE,CAAC;QAC5B,KAAK,mBAAmB,CAAC,eAAe;YACtC,OAAO,yCAAyC,CAAC;QACnD,KAAK,mBAAmB,CAAC,gBAAgB;YACvC,OAAO,0CAA0C,CAAC;QACpD,KAAK,mBAAmB,CAAC,aAAa;YACpC,OAAO,uCAAuC,CAAC;QACjD,KAAK,mBAAmB,CAAC,gBAAgB;YACvC,OAAO,oCAAoC,CAAC;QAC9C;YACE,wGAAwG;YACxG,OAAO,yCAAyC,CAAC;IACrD,CAAC;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { selectiveUnion } from '@metamask/keyring-utils';\nimport { type Infer } from '@metamask/superstruct';\n\nimport {\n CreateAccountBip44DiscoverOptionsStruct,\n CreateAccountBip44DeriveIndexOptionsStruct,\n CreateAccountBip44DerivePathOptionsStruct,\n} from './bip44';\nimport { CreateAccountPrivateKeyOptionsStruct } from './private-key';\n\nexport * from './bip44';\nexport * from './private-key';\n\n/**\n * Enum representing the different ways an account can be created.\n */\nexport enum AccountCreationType {\n /**\n * Represents an account created using a BIP-44 derivation path.\n */\n Bip44DerivePath = 'bip44:derive-path',\n\n /**\n * Represents accounts created using a BIP-44 account index.\n *\n * More than one account can be created, for example, the keyring can create\n * multiple account types (e.g., P2PKH, P2TR, P2WPKH) for the same account\n * index.\n */\n Bip44DeriveIndex = 'bip44:derive-index',\n\n /**\n * Represents accounts created through BIP-44 account discovery.\n *\n * More than one account can be created, for example, the keyring can create\n * multiple account types (e.g., P2PKH, P2TR, P2WPKH) for the same account\n * index.\n */\n Bip44Discover = 'bip44:discover',\n\n /**\n * Represents an account imported from a private key.\n */\n PrivateKeyImport = 'private-key:import',\n}\n\n/**\n * Struct for {@link CreateAccountOptions}.\n */\nexport const CreateAccountOptionsStruct = selectiveUnion((value: any) => {\n const accountCreationType = value?.type as AccountCreationType;\n switch (accountCreationType) {\n case AccountCreationType.Bip44DerivePath:\n return CreateAccountBip44DerivePathOptionsStruct;\n case AccountCreationType.Bip44DeriveIndex:\n return CreateAccountBip44DeriveIndexOptionsStruct;\n case AccountCreationType.Bip44Discover:\n return CreateAccountBip44DiscoverOptionsStruct;\n case AccountCreationType.PrivateKeyImport:\n return CreateAccountPrivateKeyOptionsStruct;\n default:\n // Return first struct as fallback - validation will fail with proper error indicating the type mismatch\n return CreateAccountBip44DerivePathOptionsStruct;\n }\n});\n\n/**\n * Represents the available options for creating a new account.\n */\nexport type CreateAccountOptions = Infer<typeof CreateAccountOptionsStruct>;\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/api/v2/create-account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gCAAgC;AAGzD,OAAO,EACL,uCAAuC,EACvC,0CAA0C,EAC1C,yCAAyC,EAC1C,oBAAgB;AACjB,OAAO,EAAE,gCAAgC,EAAE,qBAAiB;AAC5D,OAAO,EAAE,oCAAoC,EAAE,0BAAsB;AAErE,4BAAwB;AACxB,6BAAyB;AACzB,kCAA8B;AAE9B;;GAEG;AACH,MAAM,CAAN,IAAY,mBAoCX;AApCD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,4DAAqC,CAAA;IAErC;;;;;;OAMG;IACH,8DAAuC,CAAA;IAEvC;;;;;;OAMG;IACH,uDAAgC,CAAA;IAEhC;;OAEG;IACH,8DAAuC,CAAA;IAEvC;;;;;OAKG;IACH,wCAAiB,CAAA;AACnB,CAAC,EApCW,mBAAmB,KAAnB,mBAAmB,QAoC9B;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,cAAc,CAAC,CAAC,KAAU,EAAE,EAAE;IACtE,MAAM,mBAAmB,GAAG,KAAK,EAAE,IAA2B,CAAC;IAC/D,QAAQ,mBAAmB,EAAE,CAAC;QAC5B,KAAK,mBAAmB,CAAC,eAAe;YACtC,OAAO,yCAAyC,CAAC;QACnD,KAAK,mBAAmB,CAAC,gBAAgB;YACvC,OAAO,0CAA0C,CAAC;QACpD,KAAK,mBAAmB,CAAC,aAAa;YACpC,OAAO,uCAAuC,CAAC;QACjD,KAAK,mBAAmB,CAAC,gBAAgB;YACvC,OAAO,oCAAoC,CAAC;QAC9C,KAAK,mBAAmB,CAAC,MAAM;YAC7B,OAAO,gCAAgC,CAAC;QAC1C;YACE,wGAAwG;YACxG,OAAO,yCAAyC,CAAC;IACrD,CAAC;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { selectiveUnion } from '@metamask/keyring-utils';\nimport { type Infer } from '@metamask/superstruct';\n\nimport {\n CreateAccountBip44DiscoverOptionsStruct,\n CreateAccountBip44DeriveIndexOptionsStruct,\n CreateAccountBip44DerivePathOptionsStruct,\n} from './bip44';\nimport { CreateAccountCustomOptionsStruct } from './custom';\nimport { CreateAccountPrivateKeyOptionsStruct } from './private-key';\n\nexport * from './bip44';\nexport * from './custom';\nexport * from './private-key';\n\n/**\n * Enum representing the different ways an account can be created.\n */\nexport enum AccountCreationType {\n /**\n * Represents an account created using a BIP-44 derivation path.\n */\n Bip44DerivePath = 'bip44:derive-path',\n\n /**\n * Represents accounts created using a BIP-44 account index.\n *\n * More than one account can be created, for example, the keyring can create\n * multiple account types (e.g., P2PKH, P2TR, P2WPKH) for the same account\n * index.\n */\n Bip44DeriveIndex = 'bip44:derive-index',\n\n /**\n * Represents accounts created through BIP-44 account discovery.\n *\n * More than one account can be created, for example, the keyring can create\n * multiple account types (e.g., P2PKH, P2TR, P2WPKH) for the same account\n * index.\n */\n Bip44Discover = 'bip44:discover',\n\n /**\n * Represents an account imported from a private key.\n */\n PrivateKeyImport = 'private-key:import',\n\n /**\n * Represents an account created using a custom, keyring-specific method.\n *\n * This is used by keyrings that have non-standard account creation flows\n * and declare `custom.createAccounts: true` in their capabilities.\n */\n Custom = 'custom',\n}\n\n/**\n * Struct for {@link CreateAccountOptions}.\n */\nexport const CreateAccountOptionsStruct = selectiveUnion((value: any) => {\n const accountCreationType = value?.type as AccountCreationType;\n switch (accountCreationType) {\n case AccountCreationType.Bip44DerivePath:\n return CreateAccountBip44DerivePathOptionsStruct;\n case AccountCreationType.Bip44DeriveIndex:\n return CreateAccountBip44DeriveIndexOptionsStruct;\n case AccountCreationType.Bip44Discover:\n return CreateAccountBip44DiscoverOptionsStruct;\n case AccountCreationType.PrivateKeyImport:\n return CreateAccountPrivateKeyOptionsStruct;\n case AccountCreationType.Custom:\n return CreateAccountCustomOptionsStruct;\n default:\n // Return first struct as fallback - validation will fail with proper error indicating the type mismatch\n return CreateAccountBip44DerivePathOptionsStruct;\n }\n});\n\n/**\n * Represents the available options for creating a new account.\n */\nexport type CreateAccountOptions = Infer<typeof CreateAccountOptionsStruct>;\n"]}
@@ -42,5 +42,15 @@ exports.KeyringCapabilitiesStruct = (0, superstruct_1.object)({
42
42
  */
43
43
  exportFormats: (0, superstruct_1.exactOptional)((0, superstruct_1.array)(private_key_1.ExportPrivateKeyFormatStruct)),
44
44
  })),
45
+ /**
46
+ * Indicates which KeyringV2 methods accept non-standard options.
47
+ *
48
+ * When a method is set to `true`, it signals that the keyring implementation
49
+ * accepts custom options for that method, different from the standard API.
50
+ * This is a workaround for keyrings with very specific requirements.
51
+ */
52
+ custom: (0, superstruct_1.exactOptional)((0, superstruct_1.partial)((0, superstruct_1.object)({
53
+ createAccounts: (0, superstruct_1.boolean)(),
54
+ }))),
45
55
  });
46
56
  //# sourceMappingURL=keyring-capabilities.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyring-capabilities.cjs","sourceRoot":"","sources":["../../../src/api/v2/keyring-capabilities.ts"],"names":[],"mappings":";;;AAAA,uDAO+B;AAE/B,mDAGuB;AACvB,sCAA4C;AAE5C;;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,qBAAO,GAAE;QACrB;;WAEG;QACH,WAAW,EAAE,IAAA,qBAAO,GAAE;QACtB;;WAEG;QACH,QAAQ,EAAE,IAAA,qBAAO,GAAE;KACpB,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;CACF,CAAC,CAAC","sourcesContent":["import {\n array,\n boolean,\n exactOptional,\n nonempty,\n object,\n type Infer,\n} from '@metamask/superstruct';\n\nimport {\n ExportPrivateKeyFormatStruct,\n ImportPrivateKeyFormatStruct,\n} from './private-key';\nimport { CaipChainIdStruct } from '../caip';\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: boolean(),\n /**\n * Whether the keyring supports deriving accounts from a BIP-44 account index.\n */\n deriveIndex: boolean(),\n /**\n * Whether the keyring supports BIP-44 account discovery.\n */\n discover: 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\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 * 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/api/v2/keyring-capabilities.ts"],"names":[],"mappings":";;;AAAA,uDAQ+B;AAE/B,mDAGuB;AACvB,sCAA4C;AAE5C;;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,qBAAO,GAAE;QACrB;;WAEG;QACH,WAAW,EAAE,IAAA,qBAAO,GAAE;QACtB;;WAEG;QACH,QAAQ,EAAE,IAAA,qBAAO,GAAE;KACpB,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 type Infer,\n} from '@metamask/superstruct';\n\nimport {\n ExportPrivateKeyFormatStruct,\n ImportPrivateKeyFormatStruct,\n} from './private-key';\nimport { CaipChainIdStruct } from '../caip';\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: boolean(),\n /**\n * Whether the keyring supports deriving accounts from a BIP-44 account index.\n */\n deriveIndex: boolean(),\n /**\n * Whether the keyring supports BIP-44 account discovery.\n */\n discover: 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 KeyringV2 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 * 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"]}
@@ -4,6 +4,9 @@ import { type Infer } from "@metamask/superstruct";
4
4
  */
5
5
  export declare const KeyringCapabilitiesStruct: import("@metamask/superstruct").Struct<{
6
6
  scopes: `${string}:${string}`[];
7
+ custom?: {
8
+ createAccounts?: boolean | undefined;
9
+ };
7
10
  bip44?: {
8
11
  derivePath: boolean;
9
12
  deriveIndex: boolean;
@@ -96,6 +99,18 @@ export declare const KeyringCapabilitiesStruct: import("@metamask/superstruct").
96
99
  }>;
97
100
  }>>;
98
101
  }>;
102
+ /**
103
+ * Indicates which KeyringV2 methods accept non-standard options.
104
+ *
105
+ * When a method is set to `true`, it signals that the keyring implementation
106
+ * accepts custom options for that method, different from the standard API.
107
+ * This is a workaround for keyrings with very specific requirements.
108
+ */
109
+ custom: import("@metamask/superstruct").ExactOptionalStruct<{
110
+ createAccounts?: boolean | undefined;
111
+ }, import("@metamask/superstruct").PartialObjectSchema<{
112
+ createAccounts: import("@metamask/superstruct").Struct<boolean, null>;
113
+ }>>;
99
114
  }>;
100
115
  /**
101
116
  * Type representing the capabilities supported by a keyring.
@@ -1 +1 @@
1
- {"version":3,"file":"keyring-capabilities.d.cts","sourceRoot":"","sources":["../../../src/api/v2/keyring-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,KAAK,EACX,8BAA8B;AAQ/B;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;IACpC;;OAEG;;IAEH;;OAEG;;;;;;QAGC;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;IAIP;;OAEG;;;;;;;;;;QAGC;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;QAEH;;WAEG;;;;;;;;;;;;EAIP,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
1
+ {"version":3,"file":"keyring-capabilities.d.cts","sourceRoot":"","sources":["../../../src/api/v2/keyring-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,KAAK,EACX,8BAA8B;AAQ/B;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;IACpC;;OAEG;;IAEH;;OAEG;;;;;;QAGC;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;IAIP;;OAEG;;;;;;;;;;QAGC;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;QAEH;;WAEG;;;;;;;;;;;;IAIP;;;;;;OAMG;;;;;;EAQH,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -4,6 +4,9 @@ import { type Infer } from "@metamask/superstruct";
4
4
  */
5
5
  export declare const KeyringCapabilitiesStruct: import("@metamask/superstruct").Struct<{
6
6
  scopes: `${string}:${string}`[];
7
+ custom?: {
8
+ createAccounts?: boolean | undefined;
9
+ };
7
10
  bip44?: {
8
11
  derivePath: boolean;
9
12
  deriveIndex: boolean;
@@ -96,6 +99,18 @@ export declare const KeyringCapabilitiesStruct: import("@metamask/superstruct").
96
99
  }>;
97
100
  }>>;
98
101
  }>;
102
+ /**
103
+ * Indicates which KeyringV2 methods accept non-standard options.
104
+ *
105
+ * When a method is set to `true`, it signals that the keyring implementation
106
+ * accepts custom options for that method, different from the standard API.
107
+ * This is a workaround for keyrings with very specific requirements.
108
+ */
109
+ custom: import("@metamask/superstruct").ExactOptionalStruct<{
110
+ createAccounts?: boolean | undefined;
111
+ }, import("@metamask/superstruct").PartialObjectSchema<{
112
+ createAccounts: import("@metamask/superstruct").Struct<boolean, null>;
113
+ }>>;
99
114
  }>;
100
115
  /**
101
116
  * Type representing the capabilities supported by a keyring.
@@ -1 +1 @@
1
- {"version":3,"file":"keyring-capabilities.d.mts","sourceRoot":"","sources":["../../../src/api/v2/keyring-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,KAAK,EACX,8BAA8B;AAQ/B;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;IACpC;;OAEG;;IAEH;;OAEG;;;;;;QAGC;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;IAIP;;OAEG;;;;;;;;;;QAGC;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;QAEH;;WAEG;;;;;;;;;;;;EAIP,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
1
+ {"version":3,"file":"keyring-capabilities.d.mts","sourceRoot":"","sources":["../../../src/api/v2/keyring-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,KAAK,EACX,8BAA8B;AAQ/B;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;IACpC;;OAEG;;IAEH;;OAEG;;;;;;QAGC;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;IAIP;;OAEG;;;;;;;;;;QAGC;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;QAEH;;WAEG;;;;;;;;;;;;IAIP;;;;;;OAMG;;;;;;EAQH,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { array, boolean, exactOptional, nonempty, object } from "@metamask/superstruct";
1
+ import { array, boolean, exactOptional, nonempty, object, partial } from "@metamask/superstruct";
2
2
  import { ExportPrivateKeyFormatStruct, ImportPrivateKeyFormatStruct } from "./private-key.mjs";
3
3
  import { CaipChainIdStruct } from "../caip.mjs";
4
4
  /**
@@ -39,5 +39,15 @@ export const KeyringCapabilitiesStruct = object({
39
39
  */
40
40
  exportFormats: exactOptional(array(ExportPrivateKeyFormatStruct)),
41
41
  })),
42
+ /**
43
+ * Indicates which KeyringV2 methods accept non-standard options.
44
+ *
45
+ * When a method is set to `true`, it signals that the keyring implementation
46
+ * accepts custom options for that method, different from the standard API.
47
+ * This is a workaround for keyrings with very specific requirements.
48
+ */
49
+ custom: exactOptional(partial(object({
50
+ createAccounts: boolean(),
51
+ }))),
42
52
  });
43
53
  //# sourceMappingURL=keyring-capabilities.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyring-capabilities.mjs","sourceRoot":"","sources":["../../../src/api/v2/keyring-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,aAAa,EACb,QAAQ,EACR,MAAM,EAEP,8BAA8B;AAE/B,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC7B,0BAAsB;AACvB,OAAO,EAAE,iBAAiB,EAAE,oBAAgB;AAE5C;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC;IAC9C;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC1C;;OAEG;IACH,KAAK,EAAE,aAAa,CAClB,MAAM,CAAC;QACL;;WAEG;QACH,UAAU,EAAE,OAAO,EAAE;QACrB;;WAEG;QACH,WAAW,EAAE,OAAO,EAAE;QACtB;;WAEG;QACH,QAAQ,EAAE,OAAO,EAAE;KACpB,CAAC,CACH;IACD;;OAEG;IACH,UAAU,EAAE,aAAa,CACvB,MAAM,CAAC;QACL;;WAEG;QACH,aAAa,EAAE,aAAa,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACjE;;WAEG;QACH,aAAa,EAAE,aAAa,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;KAClE,CAAC,CACH;CACF,CAAC,CAAC","sourcesContent":["import {\n array,\n boolean,\n exactOptional,\n nonempty,\n object,\n type Infer,\n} from '@metamask/superstruct';\n\nimport {\n ExportPrivateKeyFormatStruct,\n ImportPrivateKeyFormatStruct,\n} from './private-key';\nimport { CaipChainIdStruct } from '../caip';\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: boolean(),\n /**\n * Whether the keyring supports deriving accounts from a BIP-44 account index.\n */\n deriveIndex: boolean(),\n /**\n * Whether the keyring supports BIP-44 account discovery.\n */\n discover: 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\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 * 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.mjs","sourceRoot":"","sources":["../../../src/api/v2/keyring-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,OAAO,EACP,aAAa,EACb,QAAQ,EACR,MAAM,EACN,OAAO,EAER,8BAA8B;AAE/B,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC7B,0BAAsB;AACvB,OAAO,EAAE,iBAAiB,EAAE,oBAAgB;AAE5C;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC;IAC9C;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC1C;;OAEG;IACH,KAAK,EAAE,aAAa,CAClB,MAAM,CAAC;QACL;;WAEG;QACH,UAAU,EAAE,OAAO,EAAE;QACrB;;WAEG;QACH,WAAW,EAAE,OAAO,EAAE;QACtB;;WAEG;QACH,QAAQ,EAAE,OAAO,EAAE;KACpB,CAAC,CACH;IACD;;OAEG;IACH,UAAU,EAAE,aAAa,CACvB,MAAM,CAAC;QACL;;WAEG;QACH,aAAa,EAAE,aAAa,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACjE;;WAEG;QACH,aAAa,EAAE,aAAa,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;KAClE,CAAC,CACH;IACD;;;;;;OAMG;IACH,MAAM,EAAE,aAAa,CACnB,OAAO,CACL,MAAM,CAAC;QACL,cAAc,EAAE,OAAO,EAAE;KAC1B,CAAC,CACH,CACF;CACF,CAAC,CAAC","sourcesContent":["import {\n array,\n boolean,\n exactOptional,\n nonempty,\n object,\n partial,\n type Infer,\n} from '@metamask/superstruct';\n\nimport {\n ExportPrivateKeyFormatStruct,\n ImportPrivateKeyFormatStruct,\n} from './private-key';\nimport { CaipChainIdStruct } from '../caip';\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: boolean(),\n /**\n * Whether the keyring supports deriving accounts from a BIP-44 account index.\n */\n deriveIndex: boolean(),\n /**\n * Whether the keyring supports BIP-44 account discovery.\n */\n discover: 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 KeyringV2 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 * 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"]}
@@ -28,6 +28,8 @@ export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Stru
28
28
  groupIndex: number;
29
29
  } | {
30
30
  type: "private-key";
31
+ } | {
32
+ type: "custom";
31
33
  };
32
34
  exportable?: boolean;
33
35
  };
@@ -70,6 +72,8 @@ export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Stru
70
72
  groupIndex: number;
71
73
  } | {
72
74
  type: "private-key";
75
+ } | {
76
+ type: "custom";
73
77
  };
74
78
  exportable?: boolean;
75
79
  }, null>;
@@ -85,6 +89,8 @@ export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struc
85
89
  groupIndex: number;
86
90
  } | {
87
91
  type: "private-key";
92
+ } | {
93
+ type: "custom";
88
94
  };
89
95
  exportable?: boolean;
90
96
  };
@@ -127,6 +133,8 @@ export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struc
127
133
  groupIndex: number;
128
134
  } | {
129
135
  type: "private-key";
136
+ } | {
137
+ type: "custom";
130
138
  };
131
139
  exportable?: boolean;
132
140
  }, null>;
@@ -142,6 +150,8 @@ export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Str
142
150
  groupIndex: number;
143
151
  } | {
144
152
  type: "private-key";
153
+ } | {
154
+ type: "custom";
145
155
  };
146
156
  exportable?: boolean;
147
157
  };
@@ -184,6 +194,8 @@ export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Str
184
194
  groupIndex: number;
185
195
  } | {
186
196
  type: "private-key";
197
+ } | {
198
+ type: "custom";
187
199
  };
188
200
  exportable?: boolean;
189
201
  }, null>;
@@ -199,6 +211,8 @@ export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struc
199
211
  groupIndex: number;
200
212
  } | {
201
213
  type: "private-key";
214
+ } | {
215
+ type: "custom";
202
216
  };
203
217
  exportable?: boolean;
204
218
  };
@@ -241,6 +255,8 @@ export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struc
241
255
  groupIndex: number;
242
256
  } | {
243
257
  type: "private-key";
258
+ } | {
259
+ type: "custom";
244
260
  };
245
261
  exportable?: boolean;
246
262
  }, null>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/btc/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAkCnD,eAAO,MAAM,qBAAqB,sDAMjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,sDAMhC,CAAC;AAEF,eAAO,MAAM,sBAAsB,sDAMlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,sDAMhC,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IACnB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,gBAAgB,qBAAqB;IACrC,WAAW,gBAAgB;CAC5B;AAgBD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;IAGhC;;OAEG;;IAGH;;OAEG;;IArBH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;;;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CAC5B;AAgBD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;IAGhC;;OAEG;;IAGH;;OAEG;;IArBH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBH,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;IAG/B;;OAEG;;IAGH;;OAEG;;IAnCH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BH,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;IAGjC;;OAEG;;IAGH;;OAEG;;IAjDH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;EA4CH,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;IAG/B;;OAEG;;IAGH;;OAEG;;IA/DH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;EA0DH,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACpE,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -28,6 +28,8 @@ export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Stru
28
28
  groupIndex: number;
29
29
  } | {
30
30
  type: "private-key";
31
+ } | {
32
+ type: "custom";
31
33
  };
32
34
  exportable?: boolean;
33
35
  };
@@ -70,6 +72,8 @@ export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Stru
70
72
  groupIndex: number;
71
73
  } | {
72
74
  type: "private-key";
75
+ } | {
76
+ type: "custom";
73
77
  };
74
78
  exportable?: boolean;
75
79
  }, null>;
@@ -85,6 +89,8 @@ export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struc
85
89
  groupIndex: number;
86
90
  } | {
87
91
  type: "private-key";
92
+ } | {
93
+ type: "custom";
88
94
  };
89
95
  exportable?: boolean;
90
96
  };
@@ -127,6 +133,8 @@ export declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struc
127
133
  groupIndex: number;
128
134
  } | {
129
135
  type: "private-key";
136
+ } | {
137
+ type: "custom";
130
138
  };
131
139
  exportable?: boolean;
132
140
  }, null>;
@@ -142,6 +150,8 @@ export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Str
142
150
  groupIndex: number;
143
151
  } | {
144
152
  type: "private-key";
153
+ } | {
154
+ type: "custom";
145
155
  };
146
156
  exportable?: boolean;
147
157
  };
@@ -184,6 +194,8 @@ export declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Str
184
194
  groupIndex: number;
185
195
  } | {
186
196
  type: "private-key";
197
+ } | {
198
+ type: "custom";
187
199
  };
188
200
  exportable?: boolean;
189
201
  }, null>;
@@ -199,6 +211,8 @@ export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struc
199
211
  groupIndex: number;
200
212
  } | {
201
213
  type: "private-key";
214
+ } | {
215
+ type: "custom";
202
216
  };
203
217
  exportable?: boolean;
204
218
  };
@@ -241,6 +255,8 @@ export declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struc
241
255
  groupIndex: number;
242
256
  } | {
243
257
  type: "private-key";
258
+ } | {
259
+ type: "custom";
244
260
  };
245
261
  exportable?: boolean;
246
262
  }, null>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/btc/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAkCnD,eAAO,MAAM,qBAAqB,sDAMjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,sDAMhC,CAAC;AAEF,eAAO,MAAM,sBAAsB,sDAMlC,CAAC;AAEF,eAAO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AC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -28,6 +28,8 @@ export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct
28
28
  groupIndex: number;
29
29
  } | {
30
30
  type: "private-key";
31
+ } | {
32
+ type: "custom";
31
33
  };
32
34
  exportable?: boolean;
33
35
  };
@@ -67,6 +69,8 @@ export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct
67
69
  groupIndex: number;
68
70
  } | {
69
71
  type: "private-key";
72
+ } | {
73
+ type: "custom";
70
74
  };
71
75
  exportable?: boolean;
72
76
  }, null>;
@@ -83,6 +87,8 @@ export declare const EthErc4337AccountStruct: import("@metamask/superstruct").St
83
87
  groupIndex: number;
84
88
  } | {
85
89
  type: "private-key";
90
+ } | {
91
+ type: "custom";
86
92
  };
87
93
  exportable?: boolean;
88
94
  };
@@ -124,6 +130,8 @@ export declare const EthErc4337AccountStruct: import("@metamask/superstruct").St
124
130
  groupIndex: number;
125
131
  } | {
126
132
  type: "private-key";
133
+ } | {
134
+ type: "custom";
127
135
  };
128
136
  exportable?: boolean;
129
137
  }, null>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD,OAAO,EAAE,QAAQ,EAAE,oBAAU;AAO7B,eAAO,MAAM,cAAc,sDAA+C,CAAC;AAE3E,eAAO,MAAM,gBAAgB,6DAG5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,YAAY,kBAAkB;IAC9B,IAAI,aAAa;IACjB,eAAe,wBAAwB;IACvC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IAExC,oBAAoB,6BAA6B;IACjD,kBAAkB,2BAA2B;IAC7C,iBAAiB,0BAA0B;CAC5C;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;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;;;;;;;;;EAaH,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -28,6 +28,8 @@ export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct
28
28
  groupIndex: number;
29
29
  } | {
30
30
  type: "private-key";
31
+ } | {
32
+ type: "custom";
31
33
  };
32
34
  exportable?: boolean;
33
35
  };
@@ -67,6 +69,8 @@ export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct
67
69
  groupIndex: number;
68
70
  } | {
69
71
  type: "private-key";
72
+ } | {
73
+ type: "custom";
70
74
  };
71
75
  exportable?: boolean;
72
76
  }, null>;
@@ -83,6 +87,8 @@ export declare const EthErc4337AccountStruct: import("@metamask/superstruct").St
83
87
  groupIndex: number;
84
88
  } | {
85
89
  type: "private-key";
90
+ } | {
91
+ type: "custom";
86
92
  };
87
93
  exportable?: boolean;
88
94
  };
@@ -124,6 +130,8 @@ export declare const EthErc4337AccountStruct: import("@metamask/superstruct").St
124
130
  groupIndex: number;
125
131
  } | {
126
132
  type: "private-key";
133
+ } | {
134
+ type: "custom";
127
135
  };
128
136
  exportable?: boolean;
129
137
  }, null>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../../src/eth/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAInD,OAAO,EAAE,QAAQ,EAAE,oBAAU;AAO7B,eAAO,MAAM,cAAc,sDAA+C,CAAC;AAE3E,eAAO,MAAM,gBAAgB,6DAG5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,sDAG5B,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS;IAEnB,YAAY,kBAAkB;IAC9B,IAAI,aAAa;IACjB,eAAe,wBAAwB;IACvC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IACxC,eAAe,yBAAyB;IAExC,oBAAoB,6BAA6B;IACjD,kBAAkB,2BAA2B;IAC7C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G;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;EAaH,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
package/dist/events.d.cts CHANGED
@@ -26,6 +26,8 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
26
26
  groupIndex: number;
27
27
  } | {
28
28
  type: "private-key";
29
+ } | {
30
+ type: "custom";
29
31
  };
30
32
  exportable?: boolean;
31
33
  };
@@ -54,6 +56,8 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
54
56
  groupIndex: number;
55
57
  } | {
56
58
  type: "private-key";
59
+ } | {
60
+ type: "custom";
57
61
  };
58
62
  exportable?: boolean;
59
63
  };
@@ -87,6 +91,8 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
87
91
  groupIndex: number;
88
92
  } | {
89
93
  type: "private-key";
94
+ } | {
95
+ type: "custom";
90
96
  };
91
97
  exportable?: boolean;
92
98
  };
@@ -116,6 +122,8 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
116
122
  groupIndex: number;
117
123
  } | {
118
124
  type: "private-key";
125
+ } | {
126
+ type: "custom";
119
127
  };
120
128
  exportable?: boolean;
121
129
  }, null>;
@@ -162,6 +170,8 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
162
170
  groupIndex: number;
163
171
  } | {
164
172
  type: "private-key";
173
+ } | {
174
+ type: "custom";
165
175
  };
166
176
  exportable?: boolean;
167
177
  };
@@ -184,6 +194,8 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
184
194
  groupIndex: number;
185
195
  } | {
186
196
  type: "private-key";
197
+ } | {
198
+ type: "custom";
187
199
  };
188
200
  exportable?: boolean;
189
201
  };
@@ -206,6 +218,8 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
206
218
  groupIndex: number;
207
219
  } | {
208
220
  type: "private-key";
221
+ } | {
222
+ type: "custom";
209
223
  };
210
224
  exportable?: boolean;
211
225
  };
@@ -235,6 +249,8 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
235
249
  groupIndex: number;
236
250
  } | {
237
251
  type: "private-key";
252
+ } | {
253
+ type: "custom";
238
254
  };
239
255
  exportable?: boolean;
240
256
  }, null>;
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.cts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAenD;;GAEG;AACH,oBAAY,YAAY;IAEtB,cAAc,0BAA0B;IACxC,cAAc,0BAA0B;IACxC,cAAc,0BAA0B;IAGxC,eAAe,2BAA2B;IAC1C,eAAe,2BAA2B;IAG1C,sBAAsB,kCAAkC;IACxD,uBAAuB,mCAAmC;IAC1D,0BAA0B,sCAAsC;CACjE;AAED,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAGlC;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAGH;;;;;;WAMG;;QAGH;;;;WAIG;;QAGH;;;;;;;WAOG;;;EAQL,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC1E,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AAEvE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAGlC;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGL,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC1E,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AAEvE,eA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