55
66import type { MultichainAccountGroup } from './group' ;
77import type { Bip44Account } from '../bip44' ;
8- import type { AccountWallet } from '../wallet' ;
8+ import { AccountWallet , AccountWalletStatus } from '../wallet' ;
99import { AccountWalletType } from '../wallet' ;
1010
1111/**
@@ -28,6 +28,34 @@ export type ParsedMultichainAccountWalletId = {
2828 subId : string ;
2929} ;
3030
31+ /**
32+ * Wallet status.
33+ *
34+ * Those status are used to report in which "state" the wallet is currently
35+ * in. All of those operations cannot run concurrently, thus, the wallet
36+ * cannot have multiple status at once.
37+ */
38+ export const MultichainAccountWalletStatus = {
39+ ...AccountWalletStatus ,
40+
41+ /**
42+ * Discovery is in progress for this wallet. New account groups will be
43+ * automatically added based on the account provider discovery result.
44+ */
45+ DiscoveryInProgress : 'discovery-in-progress' ,
46+ /**
47+ * Alignment is in progress for this wallet. Account groups will be
48+ * automatically updated based on the active account providers.
49+ */
50+ AlignmentInProgress : 'alignment-in-progress' ,
51+ /**
52+ * An on-going operation (creating/deleting) is in progress for this
53+ * wallet. Account groups will either be created or deleted during
54+ * this operation.
55+ */
56+ OperationInProgress : 'operation-in-progress' ,
57+ } as const ;
58+
3159/**
3260 * A multichain account wallet that holds multiple multichain accounts (one multichain account per
3361 * group index).
@@ -50,6 +78,11 @@ export type MultichainAccountWallet<
5078 */
5179 get entropySource ( ) : EntropySourceId ;
5280
81+ /**
82+ * Multichain account wallet status.
83+ */
84+ get status ( ) : ( typeof MultichainAccountWalletStatus ) [ keyof typeof MultichainAccountWalletStatus ] ;
85+
5386 /**
5487 * Gets multichain account for a given index.
5588 *
0 commit comments