@metamask/keyring-api
Advanced tools
Comparing version 7.0.0 to 8.0.0
@@ -10,2 +10,8 @@ # Changelog | ||
## [8.0.0] | ||
### Changed | ||
- **BREAKING:** Revert "feat: allow multiple address per account (#315)" ([#342](https://github.com/MetaMask/keyring-api/pull/342)). | ||
## [7.0.0] | ||
@@ -16,3 +22,3 @@ | ||
- Add `getAccountBalances` to `KeyringClient` ([#340](https://github.com/MetaMask/keyring-api/pull/340)). | ||
- Allow multiple address per account ([#315](https://github.com/MetaMask/keyring-api/pull/315)). | ||
- **BREAKING:** Allow multiple address per account ([#315](https://github.com/MetaMask/keyring-api/pull/315)). | ||
@@ -360,3 +366,4 @@ ### Changed | ||
[Unreleased]: https://github.com/MetaMask/keyring-api/compare/v7.0.0...HEAD | ||
[Unreleased]: https://github.com/MetaMask/keyring-api/compare/v8.0.0...HEAD | ||
[8.0.0]: https://github.com/MetaMask/keyring-api/compare/v7.0.0...v8.0.0 | ||
[7.0.0]: https://github.com/MetaMask/keyring-api/compare/v6.4.0...v7.0.0 | ||
@@ -363,0 +370,0 @@ [6.4.0]: https://github.com/MetaMask/keyring-api/compare/v6.3.1...v6.4.0 |
@@ -29,3 +29,3 @@ import type { Infer } from 'superstruct'; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -47,31 +47,5 @@ methods: string[]; | ||
/** | ||
* Account addresses. It can be a single address or a map of addresses per | ||
* chain. | ||
* | ||
* If the address is a string, it's assumed to be under the 'eip155' | ||
* namespace. Otherwise, it must be a map of addresses per chain, where the | ||
* key is the chain ID (CAIP-2) and the value is an array of addresses. | ||
* | ||
* @example | ||
* ```ts | ||
* address: { | ||
* // Different addresses per chain. | ||
* 'eip155:1': ['0x1234...'], | ||
* 'eip155:137': ['0x5678...'], | ||
* } | ||
* ``` | ||
* @example | ||
* ```ts | ||
* address: { | ||
* // The address is the same across all 'eip155' chains. | ||
* 'eip155': ['0x1234...'], | ||
* } | ||
* ``` | ||
* @example | ||
* ```ts | ||
* // Assumed to be under the 'eip155' namespace. | ||
* address: '0x1234...', | ||
* ``` | ||
* Account main address. | ||
*/ | ||
address: import("superstruct").Struct<string | Record<string, string[]>, null>; | ||
address: import("superstruct").Struct<string, null>; | ||
/** | ||
@@ -78,0 +52,0 @@ * Account options. |
@@ -44,31 +44,5 @@ "use strict"; | ||
/** | ||
* Account addresses. It can be a single address or a map of addresses per | ||
* chain. | ||
* | ||
* If the address is a string, it's assumed to be under the 'eip155' | ||
* namespace. Otherwise, it must be a map of addresses per chain, where the | ||
* key is the chain ID (CAIP-2) and the value is an array of addresses. | ||
* | ||
* @example | ||
* ```ts | ||
* address: { | ||
* // Different addresses per chain. | ||
* 'eip155:1': ['0x1234...'], | ||
* 'eip155:137': ['0x5678...'], | ||
* } | ||
* ``` | ||
* @example | ||
* ```ts | ||
* address: { | ||
* // The address is the same across all 'eip155' chains. | ||
* 'eip155': ['0x1234...'], | ||
* } | ||
* ``` | ||
* @example | ||
* ```ts | ||
* // Assumed to be under the 'eip155' namespace. | ||
* address: '0x1234...', | ||
* ``` | ||
* Account main address. | ||
*/ | ||
address: (0, superstruct_1.union)([(0, superstruct_1.string)(), (0, superstruct_1.record)((0, superstruct_1.string)(), (0, superstruct_1.array)((0, superstruct_1.string)()))]), | ||
address: (0, superstruct_1.string)(), | ||
/** | ||
@@ -75,0 +49,0 @@ * Account options. |
@@ -75,7 +75,2 @@ import type { Json } from '@metamask/utils'; | ||
* | ||
* See {@link KeyringAccount}. | ||
* | ||
* @deprecated Use the keys of the `address` map of the account object to | ||
* indicate the supported chains. This method will be removed in a future | ||
* version of the Keyring API. | ||
* @param id - ID of the account to be checked. | ||
@@ -86,3 +81,3 @@ * @param chains - List of chains (CAIP-2) to be checked. | ||
*/ | ||
filterAccountChains?(id: string, chains: string[]): Promise<string[]>; | ||
filterAccountChains(id: string, chains: string[]): Promise<string[]>; | ||
/** | ||
@@ -89,0 +84,0 @@ * Update an account. |
@@ -15,3 +15,3 @@ import type { Infer } from 'superstruct'; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -22,3 +22,3 @@ methods: string[]; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -33,3 +33,3 @@ methods: string[]; | ||
}>; | ||
address: import("superstruct").Struct<string | Record<string, string[]>, null>; | ||
address: import("superstruct").Struct<string, null>; | ||
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>; | ||
@@ -60,3 +60,3 @@ methods: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -71,3 +71,3 @@ methods: string[]; | ||
}>; | ||
address: import("superstruct").Struct<string | Record<string, string[]>, null>; | ||
address: import("superstruct").Struct<string, null>; | ||
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>; | ||
@@ -98,3 +98,3 @@ methods: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -109,3 +109,3 @@ methods: string[]; | ||
}>; | ||
address: import("superstruct").Struct<string | Record<string, string[]>, null>; | ||
address: import("superstruct").Struct<string, null>; | ||
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>; | ||
@@ -172,3 +172,3 @@ methods: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -184,3 +184,3 @@ methods: string[]; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -193,3 +193,3 @@ methods: string[]; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -204,3 +204,3 @@ methods: string[]; | ||
}>; | ||
address: import("superstruct").Struct<string | Record<string, string[]>, null>; | ||
address: import("superstruct").Struct<string, null>; | ||
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>; | ||
@@ -207,0 +207,0 @@ methods: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>; |
@@ -7,3 +7,3 @@ export declare const AccountCreatedEventStruct: import("superstruct").Struct<{ | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -21,3 +21,3 @@ methods: string[]; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -35,3 +35,3 @@ methods: string[]; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -46,3 +46,3 @@ methods: string[]; | ||
}>; | ||
address: import("superstruct").Struct<string | Record<string, string[]>, null>; | ||
address: import("superstruct").Struct<string, null>; | ||
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>; | ||
@@ -72,3 +72,3 @@ methods: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -84,3 +84,3 @@ methods: string[]; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -96,3 +96,3 @@ methods: string[]; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -107,3 +107,3 @@ methods: string[]; | ||
}>; | ||
address: import("superstruct").Struct<string | Record<string, string[]>, null>; | ||
address: import("superstruct").Struct<string, null>; | ||
options: import("superstruct").Struct<Record<string, import("@metamask/utils").Json>, null>; | ||
@@ -110,0 +110,0 @@ methods: import("superstruct").Struct<string[], import("superstruct").Struct<string, null>>; |
@@ -251,3 +251,3 @@ import type { Infer, Struct } from 'superstruct'; | ||
id: string; | ||
address: string | Record<string, string[]>; | ||
address: string; | ||
options: Record<string, import("@metamask/utils").Json>; | ||
@@ -306,3 +306,3 @@ methods: string[]; | ||
}>; | ||
address: Struct<string | Record<string, string[]>, null>; | ||
address: Struct<string, null>; | ||
options: Struct<Record<string, import("@metamask/utils").Json>, null>; | ||
@@ -309,0 +309,0 @@ methods: Struct<string[], Struct<string, null>>; |
@@ -50,5 +50,2 @@ "use strict"; | ||
case rpc_1.KeyringRpcMethod.FilterAccountChains: { | ||
if (keyring.filterAccountChains === undefined) { | ||
throw new MethodNotSupportedError(request.method); | ||
} | ||
(0, superstruct_1.assert)(request, api_1.FilterAccountChainsStruct); | ||
@@ -55,0 +52,0 @@ return keyring.filterAccountChains(request.params.id, request.params.chains); |
{ | ||
"name": "@metamask/keyring-api", | ||
"version": "7.0.0", | ||
"version": "8.0.0", | ||
"description": "MetaMask Keyring API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
244775
3141