Skip to content

Commit 12c2bcf

Browse files
authored
feat(account-api): add missing {align,discover}Accounts (#368)
Those methods were already implemented in the `multichain-account-service`. We now add them at API level so we can rely on the API type `MultichainAccountWallet` to execute those operations. > [!NOTE] > The name are also different now, to emphasis more on the actual operations being run on on the "blockchain accounts" themselves: `<operation>Accounts`
1 parent 7201a90 commit 12c2bcf

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

packages/account-api/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
- **BREAKING:** Add `MultichainAccountWallet.{align,discover}Accounts` methods ([#368](https://github.com/MetaMask/accounts/pull/368))
1213
- Add wallet `status` ([#367](https://github.com/MetaMask/accounts/pull/367))
1314

1415
### Changed

packages/account-api/src/api/multichain/wallet.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,18 @@ export type MultichainAccountWallet<
112112
* @returns The multichain accounts.
113113
*/
114114
getMultichainAccountGroups(): MultichainAccountGroup<Account>[];
115+
116+
/**
117+
* Discover and create accounts.
118+
*
119+
* @returns The discovered accounts.
120+
*/
121+
discoverAccounts(): Promise<Account[]>;
122+
123+
/**
124+
* Align all accounts accross existing multichain account groups.
125+
*/
126+
alignAccounts(): Promise<void>;
115127
};
116128

117129
/**

0 commit comments

Comments
 (0)