@metamask-previews/eth-snap-keyring 14.0.0-e017e7a → 15.0.0-4fa71d1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"account.mjs","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACrB,8BAA8B;AAC/B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAc,8BAA8B;AAEjE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,+BAAqB;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AAI7E;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAElC,OAAgB;IAChB,gFAAgF;IAChF,sFAAsF;IACtF,cAAc;IACd,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1B,MAAM,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC;YACvC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;YACzB,MAAM,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;YACtC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;YAC3B,MAAM,CAAC,OAAO,EAAE,sBAAsB,CAAC,CAAC;YACxC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;YACzB,MAAM,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;YACtC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;YACtC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC,OAAO,EAAE,uBAAuB,CAAC,CAAC;YACzC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;YACxB,MAAM,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;YACrC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,2EAA2E;YAC3E,qEAAqE;YACrE,MAAM,IAAI,KAAK,CAAC,0BAA0B,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB;AAC9B,6EAA6E;AAC7E,kBAAqD;IAErD,6FAA6F;IAC7F,0EAA0E;IAC1E,MAAM,OAAO,GAAG,WAAW,CAAC,kBAAkB,CAAC;QAC7C,CAAC,CAAC,kBAAkB,CAAC,kBAAkB,CAAC;QACxC,CAAC,CAAC,kBAAkB,CAAC;IAEvB,yFAAyF;IACzF,OAAO,oBAAoB,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import type { KeyringAccount, KeyringAccountType } from '@metamask/keyring-api';\nimport {\n BtcAccountType,\n BtcP2pkhAccountStruct,\n BtcP2shAccountStruct,\n BtcP2wpkhAccountStruct,\n BtcP2trAccountStruct,\n EthAccountType,\n EthEoaAccountStruct,\n EthErc4337AccountStruct,\n KeyringAccountStruct,\n SolAccountType,\n SolDataAccountStruct,\n} from '@metamask/keyring-api';\nimport { assert, omit, type Infer } from '@metamask/superstruct';\n\nimport { isAccountV1, transformAccountV1 } from './migrations';\n\n/**\n * A `KeyringAccount` with some optional fields which can be used to keep\n * the retro-compatility with older version of keyring accounts/events.\n */\nexport const KeyringAccountV1Struct = omit(KeyringAccountStruct, ['scopes']);\n\nexport type KeyringAccountV1 = Infer<typeof KeyringAccountV1Struct>;\n\n/**\n * Assert that an account-like object matches its actual account type.\n *\n * @param account - The account-like object.\n * @returns The account as normal `KeyringAccount`.\n */\nexport function assertKeyringAccount<\n Account extends { type: KeyringAccountType },\n>(account: Account): KeyringAccount {\n // TODO: We should use a `selectiveUnion` for this and probably use it to define\n // the `KeyringAccount`. This would also required to have a \"generic `KeyringAccount`\"\n // definition.\n switch (account.type) {\n case BtcAccountType.P2pkh: {\n assert(account, BtcP2pkhAccountStruct);\n return account;\n }\n case BtcAccountType.P2sh: {\n assert(account, BtcP2shAccountStruct);\n return account;\n }\n case BtcAccountType.P2wpkh: {\n assert(account, BtcP2wpkhAccountStruct);\n return account;\n }\n case BtcAccountType.P2tr: {\n assert(account, BtcP2trAccountStruct);\n return account;\n }\n case SolAccountType.DataAccount: {\n assert(account, SolDataAccountStruct);\n return account;\n }\n case EthAccountType.Erc4337: {\n assert(account, EthErc4337AccountStruct);\n return account;\n }\n case EthAccountType.Eoa: {\n assert(account, EthEoaAccountStruct);\n return account;\n }\n default: {\n // For now, we cannot much more than this (this should also, never happen)!\n // NOTE: We could use a \"generic `KeyringAccount` type\" here though.\n throw new Error(`Unknown account type: '${account.type}'`);\n }\n }\n}\n\n/**\n * Transform any versionned account to a `KeyringAccount`.\n *\n * @param accountToTransform - The account to transform.\n * @returns A valid transformed `KeyringAccount`.\n */\nexport function transformAccount(\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n accountToTransform: KeyringAccountV1 | KeyringAccount,\n): KeyringAccount {\n // To keep the retro-compatibility with older keyring-api versions, we identify the account's\n // version and transform it to the latest `KeyringAccount` representation.\n const account = isAccountV1(accountToTransform)\n ? transformAccountV1(accountToTransform)\n : accountToTransform;\n\n // We still assert that the converted account is valid according to their account's type.\n return assertKeyringAccount(account);\n}\n"]}
1
+ {"version":3,"file":"account.mjs","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACrB,8BAA8B;AAC/B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAc,8BAA8B;AAEjE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,+BAAqB;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AAI7E;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAElC,OAAgB;IAChB,gFAAgF;IAChF,sFAAsF;IACtF,cAAc;IACd,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1B,MAAM,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC;YACvC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;YACzB,MAAM,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;YACtC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;YAC3B,MAAM,CAAC,OAAO,EAAE,sBAAsB,CAAC,CAAC;YACxC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;YACzB,MAAM,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;YACtC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;YACtC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC,OAAO,EAAE,uBAAuB,CAAC,CAAC;YACzC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;YACxB,MAAM,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;YACrC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;YACtC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,2EAA2E;YAC3E,qEAAqE;YACrE,MAAM,IAAI,KAAK,CAAC,0BAA0B,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB;AAC9B,6EAA6E;AAC7E,kBAAqD;IAErD,6FAA6F;IAC7F,0EAA0E;IAC1E,MAAM,OAAO,GAAG,WAAW,CAAC,kBAAkB,CAAC;QAC7C,CAAC,CAAC,kBAAkB,CAAC,kBAAkB,CAAC;QACxC,CAAC,CAAC,kBAAkB,CAAC;IAEvB,yFAAyF;IACzF,OAAO,oBAAoB,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import type { KeyringAccount, KeyringAccountType } from '@metamask/keyring-api';\nimport {\n BtcAccountType,\n BtcP2pkhAccountStruct,\n BtcP2shAccountStruct,\n BtcP2wpkhAccountStruct,\n BtcP2trAccountStruct,\n EthAccountType,\n EthEoaAccountStruct,\n EthErc4337AccountStruct,\n AnyAccountType,\n KeyringAccountStruct,\n SolAccountType,\n SolDataAccountStruct,\n} from '@metamask/keyring-api';\nimport { assert, omit, type Infer } from '@metamask/superstruct';\n\nimport { isAccountV1, transformAccountV1 } from './migrations';\n\n/**\n * A `KeyringAccount` with some optional fields which can be used to keep\n * the retro-compatility with older version of keyring accounts/events.\n */\nexport const KeyringAccountV1Struct = omit(KeyringAccountStruct, ['scopes']);\n\nexport type KeyringAccountV1 = Infer<typeof KeyringAccountV1Struct>;\n\n/**\n * Assert that an account-like object matches its actual account type.\n *\n * @param account - The account-like object.\n * @returns The account as normal `KeyringAccount`.\n */\nexport function assertKeyringAccount<\n Account extends { type: KeyringAccountType },\n>(account: Account): KeyringAccount {\n // TODO: We should use a `selectiveUnion` for this and probably use it to define\n // the `KeyringAccount`. This would also required to have a \"generic `KeyringAccount`\"\n // definition.\n switch (account.type) {\n case BtcAccountType.P2pkh: {\n assert(account, BtcP2pkhAccountStruct);\n return account;\n }\n case BtcAccountType.P2sh: {\n assert(account, BtcP2shAccountStruct);\n return account;\n }\n case BtcAccountType.P2wpkh: {\n assert(account, BtcP2wpkhAccountStruct);\n return account;\n }\n case BtcAccountType.P2tr: {\n assert(account, BtcP2trAccountStruct);\n return account;\n }\n case SolAccountType.DataAccount: {\n assert(account, SolDataAccountStruct);\n return account;\n }\n case EthAccountType.Erc4337: {\n assert(account, EthErc4337AccountStruct);\n return account;\n }\n case EthAccountType.Eoa: {\n assert(account, EthEoaAccountStruct);\n return account;\n }\n case AnyAccountType.Account: {\n assert(account, KeyringAccountStruct);\n return account;\n }\n default: {\n // For now, we cannot much more than this (this should also, never happen)!\n // NOTE: We could use a \"generic `KeyringAccount` type\" here though.\n throw new Error(`Unknown account type: '${account.type}'`);\n }\n }\n}\n\n/**\n * Transform any versionned account to a `KeyringAccount`.\n *\n * @param accountToTransform - The account to transform.\n * @returns A valid transformed `KeyringAccount`.\n */\nexport function transformAccount(\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\n accountToTransform: KeyringAccountV1 | KeyringAccount,\n): KeyringAccount {\n // To keep the retro-compatibility with older keyring-api versions, we identify the account's\n // version and transform it to the latest `KeyringAccount` representation.\n const account = isAccountV1(accountToTransform)\n ? transformAccountV1(accountToTransform)\n : accountToTransform;\n\n // We still assert that the converted account is valid according to their account's type.\n return assertKeyringAccount(account);\n}\n"]}
package/dist/events.d.cts CHANGED
@@ -2,7 +2,7 @@ import { AccountDeletedEventStruct, RequestApprovedEventStruct, RequestRejectedE
2
2
  export declare const AccountCreatedEventStruct: import("@metamask/superstruct").Struct<{
3
3
  params: {
4
4
  account: {
5
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
5
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
6
6
  id: string;
7
7
  options: Record<string, import("@metamask/utils").Json> & {
8
8
  entropy?: {
@@ -20,7 +20,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
20
20
  methods: string[];
21
21
  } | {
22
22
  id: string;
23
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
23
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
24
24
  address: string;
25
25
  options: Record<string, import("@metamask/utils").Json> & {
26
26
  entropy?: {
@@ -46,7 +46,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
46
46
  }, {
47
47
  params: import("@metamask/superstruct").Struct<{
48
48
  account: {
49
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
49
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
50
50
  id: string;
51
51
  options: Record<string, import("@metamask/utils").Json> & {
52
52
  entropy?: {
@@ -64,7 +64,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
64
64
  methods: string[];
65
65
  } | {
66
66
  id: string;
67
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
67
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
68
68
  address: string;
69
69
  options: Record<string, import("@metamask/utils").Json> & {
70
70
  entropy?: {
@@ -87,7 +87,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
87
87
  displayAccountNameSuggestion?: boolean;
88
88
  }, {
89
89
  account: import("@metamask/superstruct").Struct<{
90
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
90
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
91
91
  id: string;
92
92
  options: Record<string, import("@metamask/utils").Json> & {
93
93
  entropy?: {
@@ -105,7 +105,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
105
105
  methods: string[];
106
106
  } | {
107
107
  id: string;
108
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
108
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
109
109
  address: string;
110
110
  options: Record<string, import("@metamask/utils").Json> & {
111
111
  entropy?: {
@@ -134,7 +134,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
134
134
  export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").Struct<{
135
135
  params: {
136
136
  account: {
137
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
137
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
138
138
  id: string;
139
139
  options: Record<string, import("@metamask/utils").Json> & {
140
140
  entropy?: {
@@ -152,7 +152,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
152
152
  methods: string[];
153
153
  } | {
154
154
  id: string;
155
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
155
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
156
156
  address: string;
157
157
  options: Record<string, import("@metamask/utils").Json> & {
158
158
  entropy?: {
@@ -172,7 +172,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
172
172
  }, {
173
173
  params: import("@metamask/superstruct").Struct<{
174
174
  account: {
175
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
175
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
176
176
  id: string;
177
177
  options: Record<string, import("@metamask/utils").Json> & {
178
178
  entropy?: {
@@ -190,7 +190,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
190
190
  methods: string[];
191
191
  } | {
192
192
  id: string;
193
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
193
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
194
194
  address: string;
195
195
  options: Record<string, import("@metamask/utils").Json> & {
196
196
  entropy?: {
@@ -207,7 +207,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
207
207
  };
208
208
  }, {
209
209
  account: import("@metamask/superstruct").Struct<{
210
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
210
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
211
211
  id: string;
212
212
  options: Record<string, import("@metamask/utils").Json> & {
213
213
  entropy?: {
@@ -225,7 +225,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
225
225
  methods: string[];
226
226
  } | {
227
227
  id: string;
228
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
228
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
229
229
  address: string;
230
230
  options: Record<string, import("@metamask/utils").Json> & {
231
231
  entropy?: {
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.cts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAE3B,8BAA8B;AAM/B,eAAO,MAAM,yBAAyB;;;;;;uBAyB4E,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAlB5T,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;uBAgB4E,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;EAT5T,CAAC;AAIH,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,GAC3B,CAAC"}
1
+ {"version":3,"file":"events.d.cts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAE3B,8BAA8B;AAM/B,eAAO,MAAM,yBAAyB;;;;;;uBAyBmW,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAlBnlB,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;uBAgBmW,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;EATnlB,CAAC;AAIH,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,GAC3B,CAAC"}
package/dist/events.d.mts CHANGED
@@ -2,7 +2,7 @@ import { AccountDeletedEventStruct, RequestApprovedEventStruct, RequestRejectedE
2
2
  export declare const AccountCreatedEventStruct: import("@metamask/superstruct").Struct<{
3
3
  params: {
4
4
  account: {
5
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
5
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
6
6
  id: string;
7
7
  options: Record<string, import("@metamask/utils").Json> & {
8
8
  entropy?: {
@@ -20,7 +20,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
20
20
  methods: string[];
21
21
  } | {
22
22
  id: string;
23
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
23
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
24
24
  address: string;
25
25
  options: Record<string, import("@metamask/utils").Json> & {
26
26
  entropy?: {
@@ -46,7 +46,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
46
46
  }, {
47
47
  params: import("@metamask/superstruct").Struct<{
48
48
  account: {
49
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
49
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
50
50
  id: string;
51
51
  options: Record<string, import("@metamask/utils").Json> & {
52
52
  entropy?: {
@@ -64,7 +64,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
64
64
  methods: string[];
65
65
  } | {
66
66
  id: string;
67
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
67
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
68
68
  address: string;
69
69
  options: Record<string, import("@metamask/utils").Json> & {
70
70
  entropy?: {
@@ -87,7 +87,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
87
87
  displayAccountNameSuggestion?: boolean;
88
88
  }, {
89
89
  account: import("@metamask/superstruct").Struct<{
90
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
90
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
91
91
  id: string;
92
92
  options: Record<string, import("@metamask/utils").Json> & {
93
93
  entropy?: {
@@ -105,7 +105,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
105
105
  methods: string[];
106
106
  } | {
107
107
  id: string;
108
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
108
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
109
109
  address: string;
110
110
  options: Record<string, import("@metamask/utils").Json> & {
111
111
  entropy?: {
@@ -134,7 +134,7 @@ export declare const AccountCreatedEventStruct: import("@metamask/superstruct").
134
134
  export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").Struct<{
135
135
  params: {
136
136
  account: {
137
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
137
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
138
138
  id: string;
139
139
  options: Record<string, import("@metamask/utils").Json> & {
140
140
  entropy?: {
@@ -152,7 +152,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
152
152
  methods: string[];
153
153
  } | {
154
154
  id: string;
155
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
155
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
156
156
  address: string;
157
157
  options: Record<string, import("@metamask/utils").Json> & {
158
158
  entropy?: {
@@ -172,7 +172,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
172
172
  }, {
173
173
  params: import("@metamask/superstruct").Struct<{
174
174
  account: {
175
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
175
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
176
176
  id: string;
177
177
  options: Record<string, import("@metamask/utils").Json> & {
178
178
  entropy?: {
@@ -190,7 +190,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
190
190
  methods: string[];
191
191
  } | {
192
192
  id: string;
193
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
193
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
194
194
  address: string;
195
195
  options: Record<string, import("@metamask/utils").Json> & {
196
196
  entropy?: {
@@ -207,7 +207,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
207
207
  };
208
208
  }, {
209
209
  account: import("@metamask/superstruct").Struct<{
210
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
210
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
211
211
  id: string;
212
212
  options: Record<string, import("@metamask/utils").Json> & {
213
213
  entropy?: {
@@ -225,7 +225,7 @@ export declare const AccountUpdatedEventStruct: import("@metamask/superstruct").
225
225
  methods: string[];
226
226
  } | {
227
227
  id: string;
228
- type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account";
228
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
229
229
  address: string;
230
230
  options: Record<string, import("@metamask/utils").Json> & {
231
231
  entropy?: {
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.mts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAE3B,8BAA8B;AAM/B,eAAO,MAAM,yBAAyB;;;;;;uBAyB4E,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAlB5T,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;uBAgB4E,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;EAT5T,CAAC;AAIH,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,GAC3B,CAAC"}
1
+ {"version":3,"file":"events.d.mts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAE3B,8BAA8B;AAM/B,eAAO,MAAM,yBAAyB;;;;;;uBAyBmW,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAlBnlB,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;uBAgBmW,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAA5M,CAAC;;;;;;;;0BAA0M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;EATnlB,CAAC;AAIH,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,GAC3B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/eth-snap-keyring",
3
- "version": "14.0.0-e017e7a",
3
+ "version": "15.0.0-4fa71d1",
4
4
  "description": "Snaps keyring bridge.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,8 +40,8 @@
40
40
  "@ethereumjs/tx": "^5.4.0",
41
41
  "@metamask/base-controller": "^7.1.1",
42
42
  "@metamask/eth-sig-util": "^8.2.0",
43
- "@metamask/keyring-api": "19.0.0",
44
- "@metamask/keyring-internal-api": "7.0.0",
43
+ "@metamask/keyring-api": "19.1.0",
44
+ "@metamask/keyring-internal-api": "7.1.0",
45
45
  "@metamask/keyring-internal-snap-client": "5.0.0",
46
46
  "@metamask/keyring-utils": "3.1.0",
47
47
  "@metamask/superstruct": "^3.1.0",