@metamask-previews/account-tree-controller 7.6.1-preview-e57e5c3dc → 7.6.1-preview-c449b8da8
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.
- package/CHANGELOG.md +10 -0
- package/dist/AccountTreeController-method-action-types.cjs.map +1 -1
- package/dist/AccountTreeController-method-action-types.d.cts +34 -1
- package/dist/AccountTreeController-method-action-types.d.cts.map +1 -1
- package/dist/AccountTreeController-method-action-types.d.mts +34 -1
- package/dist/AccountTreeController-method-action-types.d.mts.map +1 -1
- package/dist/AccountTreeController-method-action-types.mjs.map +1 -1
- package/dist/AccountTreeController.cjs +42 -0
- package/dist/AccountTreeController.cjs.map +1 -1
- package/dist/AccountTreeController.d.cts +29 -0
- package/dist/AccountTreeController.d.cts.map +1 -1
- package/dist/AccountTreeController.d.mts +29 -0
- package/dist/AccountTreeController.d.mts.map +1 -1
- package/dist/AccountTreeController.mjs +42 -0
- package/dist/AccountTreeController.mjs.map +1 -1
- package/dist/index.cjs +10 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -1
- package/dist/state/export.cjs +214 -0
- package/dist/state/export.cjs.map +1 -0
- package/dist/state/export.d.cts +40 -0
- package/dist/state/export.d.cts.map +1 -0
- package/dist/state/export.d.mts +40 -0
- package/dist/state/export.d.mts.map +1 -0
- package/dist/state/export.mjs +208 -0
- package/dist/state/export.mjs.map +1 -0
- package/dist/state/id-map.cjs +65 -0
- package/dist/state/id-map.cjs.map +1 -0
- package/dist/state/id-map.d.cts +41 -0
- package/dist/state/id-map.d.cts.map +1 -0
- package/dist/state/id-map.d.mts +41 -0
- package/dist/state/id-map.d.mts.map +1 -0
- package/dist/state/id-map.mjs +61 -0
- package/dist/state/id-map.mjs.map +1 -0
- package/dist/state/import.cjs +268 -0
- package/dist/state/import.cjs.map +1 -0
- package/dist/state/import.d.cts +29 -0
- package/dist/state/import.d.cts.map +1 -0
- package/dist/state/import.d.mts +29 -0
- package/dist/state/import.d.mts.map +1 -0
- package/dist/state/import.mjs +264 -0
- package/dist/state/import.mjs.map +1 -0
- package/dist/state/payload.cjs +169 -0
- package/dist/state/payload.cjs.map +1 -0
- package/dist/state/payload.d.cts +288 -0
- package/dist/state/payload.d.cts.map +1 -0
- package/dist/state/payload.d.mts +288 -0
- package/dist/state/payload.d.mts.map +1 -0
- package/dist/state/payload.mjs +162 -0
- package/dist/state/payload.mjs.map +1 -0
- package/dist/state/snapshot.cjs +202 -0
- package/dist/state/snapshot.cjs.map +1 -0
- package/dist/state/snapshot.d.cts +120 -0
- package/dist/state/snapshot.d.cts.map +1 -0
- package/dist/state/snapshot.d.mts +120 -0
- package/dist/state/snapshot.d.mts.map +1 -0
- package/dist/state/snapshot.mjs +198 -0
- package/dist/state/snapshot.mjs.map +1 -0
- package/dist/state/utils.cjs +68 -0
- package/dist/state/utils.cjs.map +1 -0
- package/dist/state/utils.d.cts +49 -0
- package/dist/state/utils.d.cts.map +1 -0
- package/dist/state/utils.d.mts +49 -0
- package/dist/state/utils.d.mts.map +1 -0
- package/dist/state/utils.mjs +61 -0
- package/dist/state/utils.mjs.map +1 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +3 -3
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +3 -3
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import type { KeyringAccount } from "@metamask/keyring-api";
|
|
2
|
+
import type { Infer } from "@metamask/superstruct";
|
|
3
|
+
import type { DeepReadonly, EncodedBytes } from "./utils.cjs";
|
|
4
|
+
/** Stable cross-device wallet identifier. Format: `wallet:<entropySourceId>`. */
|
|
5
|
+
export type AccountWalletPayloadId = `wallet:${string}`;
|
|
6
|
+
/** Stable cross-device group identifier. Format: `wallet:<entropySourceId>/<groupSubId>`. */
|
|
7
|
+
export type AccountGroupPayloadId = `${AccountWalletPayloadId}/${string}`;
|
|
8
|
+
/**
|
|
9
|
+
* Parsed representation of an {@link AccountGroupPayloadId}.
|
|
10
|
+
*/
|
|
11
|
+
export type ParsedPayloadGroupId = {
|
|
12
|
+
/** The wallet portion of the group ID. */
|
|
13
|
+
walletId: AccountWalletPayloadId;
|
|
14
|
+
/** The group-specific sub-ID (e.g. group index for mnemonic wallets, address for private-key wallets). */
|
|
15
|
+
subId: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Parses a payload group ID into its wallet ID and group sub-ID components.
|
|
19
|
+
*
|
|
20
|
+
* @param groupId - The payload group ID to parse.
|
|
21
|
+
* @returns The parsed wallet ID and group sub-ID.
|
|
22
|
+
* @throws If the group ID format is invalid.
|
|
23
|
+
*/
|
|
24
|
+
export declare function parsePayloadGroupId(groupId: AccountGroupPayloadId): ParsedPayloadGroupId;
|
|
25
|
+
/**
|
|
26
|
+
* Wallet type discriminants used in serialized {@link AccountTreePayload} entries.
|
|
27
|
+
*
|
|
28
|
+
* Use these constants instead of raw string literals so callers get autocomplete
|
|
29
|
+
* and a single source of truth for the discriminant values.
|
|
30
|
+
*/
|
|
31
|
+
export declare const AccountWalletPayloadType: {
|
|
32
|
+
readonly Mnemonic: "mnemonic";
|
|
33
|
+
readonly PrivateKey: "private-key";
|
|
34
|
+
};
|
|
35
|
+
export type AccountWalletPayloadType = (typeof AccountWalletPayloadType)[keyof typeof AccountWalletPayloadType];
|
|
36
|
+
/** Wallet-level metadata carried in every payload wallet entry. */
|
|
37
|
+
export type AccountWalletPayloadMetadata = {
|
|
38
|
+
name: string;
|
|
39
|
+
};
|
|
40
|
+
/** Group-level metadata carried in every payload group entry. */
|
|
41
|
+
export type AccountWalletGroupPayloadMetadata = {
|
|
42
|
+
name: string;
|
|
43
|
+
pinned: boolean;
|
|
44
|
+
hidden: boolean;
|
|
45
|
+
};
|
|
46
|
+
/** A single group entry inside an {@link AccountWalletMnemonicPayload}. */
|
|
47
|
+
export type AccountWalletMnemonicGroupEntry = {
|
|
48
|
+
/** Stable group payload ID. Format: `<walletPayloadId>/<groupIndex>`. */
|
|
49
|
+
id: AccountGroupPayloadId;
|
|
50
|
+
/** BIP-44 account index this group was derived at. */
|
|
51
|
+
groupIndex: number;
|
|
52
|
+
metadata: AccountWalletGroupPayloadMetadata;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Encoding formats for exported private key material.
|
|
56
|
+
*/
|
|
57
|
+
export declare const AccountWalletPrivateKeyEncoding: {
|
|
58
|
+
readonly Hexadecimal: "hexadecimal";
|
|
59
|
+
readonly Base58: "base58";
|
|
60
|
+
readonly Base32: "base32";
|
|
61
|
+
};
|
|
62
|
+
export type AccountWalletPrivateKeyEncoding = (typeof AccountWalletPrivateKeyEncoding)[keyof typeof AccountWalletPrivateKeyEncoding];
|
|
63
|
+
/** A single group entry inside an {@link AccountWalletPrivateKeyPayload}. */
|
|
64
|
+
export type AccountWalletPrivateKeyGroupEntry = {
|
|
65
|
+
/** Stable group payload ID. Format: `wallet:private-key/<address>`. */
|
|
66
|
+
id: AccountGroupPayloadId;
|
|
67
|
+
/**
|
|
68
|
+
* Private key material. Shape matches `ExportedAccount` from `@metamask/keyring-api/v2`
|
|
69
|
+
* so the importer knows how to decode the key without additional out-of-band information.
|
|
70
|
+
* Absent in metadata-only exports.
|
|
71
|
+
*/
|
|
72
|
+
value?: {
|
|
73
|
+
privateKey: EncodedBytes;
|
|
74
|
+
encoding: AccountWalletPrivateKeyEncoding;
|
|
75
|
+
/**
|
|
76
|
+
* Account type from `KeyringAccountType` (e.g. `'eip155:eoa'`, `'bip122:p2wpkh'`).
|
|
77
|
+
* Absent for EVM accounts -- import via `SimpleKeyring`.
|
|
78
|
+
* Present for non-EVM accounts -- routing to the BIP-44 Snap handling this type is not yet implemented.
|
|
79
|
+
*/
|
|
80
|
+
type?: KeyringAccount['type'];
|
|
81
|
+
};
|
|
82
|
+
metadata: AccountWalletGroupPayloadMetadata;
|
|
83
|
+
};
|
|
84
|
+
/** Payload entry for an HD (entropy) wallet and its derived account groups. */
|
|
85
|
+
export type AccountWalletMnemonicPayload = {
|
|
86
|
+
id: AccountWalletPayloadId;
|
|
87
|
+
type: typeof AccountWalletPayloadType.Mnemonic;
|
|
88
|
+
/** BIP-39 mnemonic phrase encoded as bytes. Absent in metadata-only exports. */
|
|
89
|
+
value?: EncodedBytes;
|
|
90
|
+
metadata: AccountWalletPayloadMetadata;
|
|
91
|
+
groups: AccountWalletMnemonicGroupEntry[];
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Payload entry for all imported private-key accounts.
|
|
95
|
+
*
|
|
96
|
+
* All local simple-keyring wallets are merged into this single entry;
|
|
97
|
+
* each account is represented as a separate group entry keyed by address.
|
|
98
|
+
*/
|
|
99
|
+
export type AccountWalletPrivateKeyPayload = {
|
|
100
|
+
id: AccountWalletPayloadId;
|
|
101
|
+
type: typeof AccountWalletPayloadType.PrivateKey;
|
|
102
|
+
metadata: AccountWalletPayloadMetadata;
|
|
103
|
+
groups: AccountWalletPrivateKeyGroupEntry[];
|
|
104
|
+
};
|
|
105
|
+
/** Union of all wallet entry types that can appear in an {@link AccountTreePayload}. */
|
|
106
|
+
export type AccountTreeWalletEntry = AccountWalletMnemonicPayload | AccountWalletPrivateKeyPayload;
|
|
107
|
+
/** Portable snapshot of the full account tree state (flat versioned format). */
|
|
108
|
+
export type AccountTreePayload = {
|
|
109
|
+
version: number;
|
|
110
|
+
wallets: AccountTreeWalletEntry[];
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Deeply read-only wallet view passed to {@link AccountTreeSnapshot.filterWallets}
|
|
114
|
+
* and {@link AccountTreeSnapshot.filterAllGroups} predicates.
|
|
115
|
+
*
|
|
116
|
+
* Entries are deep-cloned and deep-frozen when a snapshot is constructed, so
|
|
117
|
+
* callers cannot mutate wallet IDs, types, secrets, metadata, or groups.
|
|
118
|
+
*/
|
|
119
|
+
export type AccountTreeSnapshotWallet = DeepReadonly<AccountWalletMnemonicPayload | AccountWalletPrivateKeyPayload>;
|
|
120
|
+
/**
|
|
121
|
+
* Deeply read-only group view passed to {@link AccountTreeSnapshot.filterGroups}
|
|
122
|
+
* and {@link AccountTreeSnapshot.filterAllGroups} predicates.
|
|
123
|
+
*
|
|
124
|
+
* Entries are deep-cloned and deep-frozen when a snapshot is constructed, so
|
|
125
|
+
* callers cannot mutate group IDs, secrets, metadata, or parent wallet references.
|
|
126
|
+
*/
|
|
127
|
+
export type AccountTreeSnapshotGroup = DeepReadonly<AccountWalletMnemonicGroupEntry | AccountWalletPrivateKeyGroupEntry>;
|
|
128
|
+
/**
|
|
129
|
+
* Constructs an {@link AccountWalletPayloadId} from an entropy source ID.
|
|
130
|
+
*
|
|
131
|
+
* @param entropySourceId - Stable entropy source ID returned by `HdKeyring.toEntropySourceId()`.
|
|
132
|
+
* @returns The portable wallet payload ID.
|
|
133
|
+
*/
|
|
134
|
+
export declare function toWalletPayloadId(entropySourceId: string): AccountWalletPayloadId;
|
|
135
|
+
/**
|
|
136
|
+
* Constructs an {@link AccountGroupPayloadId} from a wallet payload ID and a sub-ID.
|
|
137
|
+
*
|
|
138
|
+
* @param walletId - The wallet payload ID this group belongs to.
|
|
139
|
+
* @param subId - The group-specific sub-ID (e.g. group index for mnemonic wallets, address for private-key wallets).
|
|
140
|
+
* @returns The portable group payload ID.
|
|
141
|
+
*/
|
|
142
|
+
export declare function toGroupPayloadId(walletId: AccountWalletPayloadId, subId: string | number): AccountGroupPayloadId;
|
|
143
|
+
/** Options accepted by {@link AccountTreeController.exportState}. */
|
|
144
|
+
export type ExportStateOptions = {
|
|
145
|
+
/** When `true`, secrets (mnemonic / private keys) are included. Requires the vault to be unlocked. */
|
|
146
|
+
includeSecrets?: boolean;
|
|
147
|
+
};
|
|
148
|
+
/** Current version of the {@link AccountTreePayload} format. */
|
|
149
|
+
export declare const ACCOUNT_TREE_PAYLOAD_CURRENT_VERSION = 1;
|
|
150
|
+
/**
|
|
151
|
+
* Superstruct schema for a fully versioned {@link AccountTreePayload}.
|
|
152
|
+
*
|
|
153
|
+
* Pins `version` to exactly {@link ACCOUNT_TREE_PAYLOAD_CURRENT_VERSION} so
|
|
154
|
+
* payloads from newer clients (v2+) are rejected rather than silently
|
|
155
|
+
* mis-handled as v1. Once a migration framework is wired up in
|
|
156
|
+
* {@link AccountTreeSnapshot.deserialize}, older versions will be up-migrated
|
|
157
|
+
* before this struct is checked, and newer versions will require a new struct.
|
|
158
|
+
*
|
|
159
|
+
* Secret fields (`value`, `privateKey`) use the Superstruct `sensitive()`
|
|
160
|
+
* wrapper so validation failures redact secrets from error output.
|
|
161
|
+
*/
|
|
162
|
+
export declare const AccountTreePayloadStruct: import("@metamask/superstruct").Struct<{
|
|
163
|
+
wallets: ({
|
|
164
|
+
id: `wallet:${string}`;
|
|
165
|
+
type: "mnemonic";
|
|
166
|
+
metadata: {
|
|
167
|
+
name: string;
|
|
168
|
+
};
|
|
169
|
+
groups: {
|
|
170
|
+
id: `wallet:${string}/${string}`;
|
|
171
|
+
metadata: {
|
|
172
|
+
name: string;
|
|
173
|
+
pinned: boolean;
|
|
174
|
+
hidden: boolean;
|
|
175
|
+
};
|
|
176
|
+
groupIndex: number;
|
|
177
|
+
}[];
|
|
178
|
+
value?: EncodedBytes | undefined;
|
|
179
|
+
} | {
|
|
180
|
+
id: `wallet:${string}`;
|
|
181
|
+
type: "private-key";
|
|
182
|
+
metadata: {
|
|
183
|
+
name: string;
|
|
184
|
+
};
|
|
185
|
+
groups: {
|
|
186
|
+
id: `wallet:${string}/${string}`;
|
|
187
|
+
metadata: {
|
|
188
|
+
name: string;
|
|
189
|
+
pinned: boolean;
|
|
190
|
+
hidden: boolean;
|
|
191
|
+
};
|
|
192
|
+
value?: {
|
|
193
|
+
privateKey: EncodedBytes;
|
|
194
|
+
encoding: "hexadecimal" | "base58" | "base32";
|
|
195
|
+
type?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account" | undefined;
|
|
196
|
+
} | undefined;
|
|
197
|
+
}[];
|
|
198
|
+
})[];
|
|
199
|
+
version: 1;
|
|
200
|
+
}, {
|
|
201
|
+
version: import("@metamask/superstruct").Struct<1, 1>;
|
|
202
|
+
wallets: import("@metamask/superstruct").Struct<({
|
|
203
|
+
id: `wallet:${string}`;
|
|
204
|
+
type: "mnemonic";
|
|
205
|
+
metadata: {
|
|
206
|
+
name: string;
|
|
207
|
+
};
|
|
208
|
+
groups: {
|
|
209
|
+
id: `wallet:${string}/${string}`;
|
|
210
|
+
metadata: {
|
|
211
|
+
name: string;
|
|
212
|
+
pinned: boolean;
|
|
213
|
+
hidden: boolean;
|
|
214
|
+
};
|
|
215
|
+
groupIndex: number;
|
|
216
|
+
}[];
|
|
217
|
+
value?: EncodedBytes | undefined;
|
|
218
|
+
} | {
|
|
219
|
+
id: `wallet:${string}`;
|
|
220
|
+
type: "private-key";
|
|
221
|
+
metadata: {
|
|
222
|
+
name: string;
|
|
223
|
+
};
|
|
224
|
+
groups: {
|
|
225
|
+
id: `wallet:${string}/${string}`;
|
|
226
|
+
metadata: {
|
|
227
|
+
name: string;
|
|
228
|
+
pinned: boolean;
|
|
229
|
+
hidden: boolean;
|
|
230
|
+
};
|
|
231
|
+
value?: {
|
|
232
|
+
privateKey: EncodedBytes;
|
|
233
|
+
encoding: "hexadecimal" | "base58" | "base32";
|
|
234
|
+
type?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account" | undefined;
|
|
235
|
+
} | undefined;
|
|
236
|
+
}[];
|
|
237
|
+
})[], import("@metamask/superstruct").Struct<{
|
|
238
|
+
id: `wallet:${string}`;
|
|
239
|
+
type: "mnemonic";
|
|
240
|
+
metadata: {
|
|
241
|
+
name: string;
|
|
242
|
+
};
|
|
243
|
+
groups: {
|
|
244
|
+
id: `wallet:${string}/${string}`;
|
|
245
|
+
metadata: {
|
|
246
|
+
name: string;
|
|
247
|
+
pinned: boolean;
|
|
248
|
+
hidden: boolean;
|
|
249
|
+
};
|
|
250
|
+
groupIndex: number;
|
|
251
|
+
}[];
|
|
252
|
+
value?: EncodedBytes | undefined;
|
|
253
|
+
} | {
|
|
254
|
+
id: `wallet:${string}`;
|
|
255
|
+
type: "private-key";
|
|
256
|
+
metadata: {
|
|
257
|
+
name: string;
|
|
258
|
+
};
|
|
259
|
+
groups: {
|
|
260
|
+
id: `wallet:${string}/${string}`;
|
|
261
|
+
metadata: {
|
|
262
|
+
name: string;
|
|
263
|
+
pinned: boolean;
|
|
264
|
+
hidden: boolean;
|
|
265
|
+
};
|
|
266
|
+
value?: {
|
|
267
|
+
privateKey: EncodedBytes;
|
|
268
|
+
encoding: "hexadecimal" | "base58" | "base32";
|
|
269
|
+
type?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account" | undefined;
|
|
270
|
+
} | undefined;
|
|
271
|
+
}[];
|
|
272
|
+
}, null>>;
|
|
273
|
+
}>;
|
|
274
|
+
/** Inferred TypeScript type for a value matching {@link AccountTreePayloadStruct}. */
|
|
275
|
+
export type AccountTreePayloadStructType = Infer<typeof AccountTreePayloadStruct>;
|
|
276
|
+
/**
|
|
277
|
+
* Asserts that `value` conforms to the v1 {@link AccountTreePayload} schema.
|
|
278
|
+
*
|
|
279
|
+
* Prefer {@link AccountTreeSnapshot.deserialize} at transport boundaries so
|
|
280
|
+
* validation stays paired with snapshot construction. Use this helper when you
|
|
281
|
+
* already hold a parsed object and need to assert its shape before further
|
|
282
|
+
* processing.
|
|
283
|
+
*
|
|
284
|
+
* @param value - Value to validate.
|
|
285
|
+
* @throws If `value` is not a valid v1 payload, including unsupported wallet types.
|
|
286
|
+
*/
|
|
287
|
+
export declare function assertAccountTreePayload(value: unknown): asserts value is AccountTreePayload;
|
|
288
|
+
//# sourceMappingURL=payload.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.cts","sourceRoot":"","sources":["../../src/state/payload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA8B;AAiB5D,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,oBAAmB;AAG7D,iFAAiF;AACjF,MAAM,MAAM,sBAAsB,GAAG,UAAU,MAAM,EAAE,CAAC;AAExD,6FAA6F;AAC7F,MAAM,MAAM,qBAAqB,GAAG,GAAG,sBAAsB,IAAI,MAAM,EAAE,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,0CAA0C;IAC1C,QAAQ,EAAE,sBAAsB,CAAC;IACjC,0GAA0G;IAC1G,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAIF;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,qBAAqB,GAC7B,oBAAoB,CAStB;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAClC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E,mEAAmE;AACnE,MAAM,MAAM,4BAA4B,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5D,iEAAiE;AACjE,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF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;AAEnC,gFAAgF;AAChF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,sBAAsB,EAAE,CAAC;CACnC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,yBAAyB,GAAG,YAAY,CAClD,4BAA4B,GAAG,8BAA8B,CAC9D,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAAG,YAAY,CACjD,+BAA+B,GAAG,iCAAiC,CACpE,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,eAAe,EAAE,MAAM,GACtB,sBAAsB,CAExB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,sBAAsB,EAChC,KAAK,EAAE,MAAM,GAAG,MAAM,GACrB,qBAAqB,CAEvB;AAED,qEAAqE;AACrE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,sGAAsG;IACtG,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAqFF,gEAAgE;AAChE,eAAO,MAAM,oCAAoC,IAAI,CAAC;AAEtD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGnC,CAAC;AAEH,sFAAsF;AACtF,MAAM,MAAM,4BAA4B,GAAG,KAAK,CAC9C,OAAO,wBAAwB,CAChC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,KAAK,IAAI,kBAAkB,CAcrC"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import type { KeyringAccount } from "@metamask/keyring-api";
|
|
2
|
+
import type { Infer } from "@metamask/superstruct";
|
|
3
|
+
import type { DeepReadonly, EncodedBytes } from "./utils.mjs";
|
|
4
|
+
/** Stable cross-device wallet identifier. Format: `wallet:<entropySourceId>`. */
|
|
5
|
+
export type AccountWalletPayloadId = `wallet:${string}`;
|
|
6
|
+
/** Stable cross-device group identifier. Format: `wallet:<entropySourceId>/<groupSubId>`. */
|
|
7
|
+
export type AccountGroupPayloadId = `${AccountWalletPayloadId}/${string}`;
|
|
8
|
+
/**
|
|
9
|
+
* Parsed representation of an {@link AccountGroupPayloadId}.
|
|
10
|
+
*/
|
|
11
|
+
export type ParsedPayloadGroupId = {
|
|
12
|
+
/** The wallet portion of the group ID. */
|
|
13
|
+
walletId: AccountWalletPayloadId;
|
|
14
|
+
/** The group-specific sub-ID (e.g. group index for mnemonic wallets, address for private-key wallets). */
|
|
15
|
+
subId: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Parses a payload group ID into its wallet ID and group sub-ID components.
|
|
19
|
+
*
|
|
20
|
+
* @param groupId - The payload group ID to parse.
|
|
21
|
+
* @returns The parsed wallet ID and group sub-ID.
|
|
22
|
+
* @throws If the group ID format is invalid.
|
|
23
|
+
*/
|
|
24
|
+
export declare function parsePayloadGroupId(groupId: AccountGroupPayloadId): ParsedPayloadGroupId;
|
|
25
|
+
/**
|
|
26
|
+
* Wallet type discriminants used in serialized {@link AccountTreePayload} entries.
|
|
27
|
+
*
|
|
28
|
+
* Use these constants instead of raw string literals so callers get autocomplete
|
|
29
|
+
* and a single source of truth for the discriminant values.
|
|
30
|
+
*/
|
|
31
|
+
export declare const AccountWalletPayloadType: {
|
|
32
|
+
readonly Mnemonic: "mnemonic";
|
|
33
|
+
readonly PrivateKey: "private-key";
|
|
34
|
+
};
|
|
35
|
+
export type AccountWalletPayloadType = (typeof AccountWalletPayloadType)[keyof typeof AccountWalletPayloadType];
|
|
36
|
+
/** Wallet-level metadata carried in every payload wallet entry. */
|
|
37
|
+
export type AccountWalletPayloadMetadata = {
|
|
38
|
+
name: string;
|
|
39
|
+
};
|
|
40
|
+
/** Group-level metadata carried in every payload group entry. */
|
|
41
|
+
export type AccountWalletGroupPayloadMetadata = {
|
|
42
|
+
name: string;
|
|
43
|
+
pinned: boolean;
|
|
44
|
+
hidden: boolean;
|
|
45
|
+
};
|
|
46
|
+
/** A single group entry inside an {@link AccountWalletMnemonicPayload}. */
|
|
47
|
+
export type AccountWalletMnemonicGroupEntry = {
|
|
48
|
+
/** Stable group payload ID. Format: `<walletPayloadId>/<groupIndex>`. */
|
|
49
|
+
id: AccountGroupPayloadId;
|
|
50
|
+
/** BIP-44 account index this group was derived at. */
|
|
51
|
+
groupIndex: number;
|
|
52
|
+
metadata: AccountWalletGroupPayloadMetadata;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Encoding formats for exported private key material.
|
|
56
|
+
*/
|
|
57
|
+
export declare const AccountWalletPrivateKeyEncoding: {
|
|
58
|
+
readonly Hexadecimal: "hexadecimal";
|
|
59
|
+
readonly Base58: "base58";
|
|
60
|
+
readonly Base32: "base32";
|
|
61
|
+
};
|
|
62
|
+
export type AccountWalletPrivateKeyEncoding = (typeof AccountWalletPrivateKeyEncoding)[keyof typeof AccountWalletPrivateKeyEncoding];
|
|
63
|
+
/** A single group entry inside an {@link AccountWalletPrivateKeyPayload}. */
|
|
64
|
+
export type AccountWalletPrivateKeyGroupEntry = {
|
|
65
|
+
/** Stable group payload ID. Format: `wallet:private-key/<address>`. */
|
|
66
|
+
id: AccountGroupPayloadId;
|
|
67
|
+
/**
|
|
68
|
+
* Private key material. Shape matches `ExportedAccount` from `@metamask/keyring-api/v2`
|
|
69
|
+
* so the importer knows how to decode the key without additional out-of-band information.
|
|
70
|
+
* Absent in metadata-only exports.
|
|
71
|
+
*/
|
|
72
|
+
value?: {
|
|
73
|
+
privateKey: EncodedBytes;
|
|
74
|
+
encoding: AccountWalletPrivateKeyEncoding;
|
|
75
|
+
/**
|
|
76
|
+
* Account type from `KeyringAccountType` (e.g. `'eip155:eoa'`, `'bip122:p2wpkh'`).
|
|
77
|
+
* Absent for EVM accounts -- import via `SimpleKeyring`.
|
|
78
|
+
* Present for non-EVM accounts -- routing to the BIP-44 Snap handling this type is not yet implemented.
|
|
79
|
+
*/
|
|
80
|
+
type?: KeyringAccount['type'];
|
|
81
|
+
};
|
|
82
|
+
metadata: AccountWalletGroupPayloadMetadata;
|
|
83
|
+
};
|
|
84
|
+
/** Payload entry for an HD (entropy) wallet and its derived account groups. */
|
|
85
|
+
export type AccountWalletMnemonicPayload = {
|
|
86
|
+
id: AccountWalletPayloadId;
|
|
87
|
+
type: typeof AccountWalletPayloadType.Mnemonic;
|
|
88
|
+
/** BIP-39 mnemonic phrase encoded as bytes. Absent in metadata-only exports. */
|
|
89
|
+
value?: EncodedBytes;
|
|
90
|
+
metadata: AccountWalletPayloadMetadata;
|
|
91
|
+
groups: AccountWalletMnemonicGroupEntry[];
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Payload entry for all imported private-key accounts.
|
|
95
|
+
*
|
|
96
|
+
* All local simple-keyring wallets are merged into this single entry;
|
|
97
|
+
* each account is represented as a separate group entry keyed by address.
|
|
98
|
+
*/
|
|
99
|
+
export type AccountWalletPrivateKeyPayload = {
|
|
100
|
+
id: AccountWalletPayloadId;
|
|
101
|
+
type: typeof AccountWalletPayloadType.PrivateKey;
|
|
102
|
+
metadata: AccountWalletPayloadMetadata;
|
|
103
|
+
groups: AccountWalletPrivateKeyGroupEntry[];
|
|
104
|
+
};
|
|
105
|
+
/** Union of all wallet entry types that can appear in an {@link AccountTreePayload}. */
|
|
106
|
+
export type AccountTreeWalletEntry = AccountWalletMnemonicPayload | AccountWalletPrivateKeyPayload;
|
|
107
|
+
/** Portable snapshot of the full account tree state (flat versioned format). */
|
|
108
|
+
export type AccountTreePayload = {
|
|
109
|
+
version: number;
|
|
110
|
+
wallets: AccountTreeWalletEntry[];
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Deeply read-only wallet view passed to {@link AccountTreeSnapshot.filterWallets}
|
|
114
|
+
* and {@link AccountTreeSnapshot.filterAllGroups} predicates.
|
|
115
|
+
*
|
|
116
|
+
* Entries are deep-cloned and deep-frozen when a snapshot is constructed, so
|
|
117
|
+
* callers cannot mutate wallet IDs, types, secrets, metadata, or groups.
|
|
118
|
+
*/
|
|
119
|
+
export type AccountTreeSnapshotWallet = DeepReadonly<AccountWalletMnemonicPayload | AccountWalletPrivateKeyPayload>;
|
|
120
|
+
/**
|
|
121
|
+
* Deeply read-only group view passed to {@link AccountTreeSnapshot.filterGroups}
|
|
122
|
+
* and {@link AccountTreeSnapshot.filterAllGroups} predicates.
|
|
123
|
+
*
|
|
124
|
+
* Entries are deep-cloned and deep-frozen when a snapshot is constructed, so
|
|
125
|
+
* callers cannot mutate group IDs, secrets, metadata, or parent wallet references.
|
|
126
|
+
*/
|
|
127
|
+
export type AccountTreeSnapshotGroup = DeepReadonly<AccountWalletMnemonicGroupEntry | AccountWalletPrivateKeyGroupEntry>;
|
|
128
|
+
/**
|
|
129
|
+
* Constructs an {@link AccountWalletPayloadId} from an entropy source ID.
|
|
130
|
+
*
|
|
131
|
+
* @param entropySourceId - Stable entropy source ID returned by `HdKeyring.toEntropySourceId()`.
|
|
132
|
+
* @returns The portable wallet payload ID.
|
|
133
|
+
*/
|
|
134
|
+
export declare function toWalletPayloadId(entropySourceId: string): AccountWalletPayloadId;
|
|
135
|
+
/**
|
|
136
|
+
* Constructs an {@link AccountGroupPayloadId} from a wallet payload ID and a sub-ID.
|
|
137
|
+
*
|
|
138
|
+
* @param walletId - The wallet payload ID this group belongs to.
|
|
139
|
+
* @param subId - The group-specific sub-ID (e.g. group index for mnemonic wallets, address for private-key wallets).
|
|
140
|
+
* @returns The portable group payload ID.
|
|
141
|
+
*/
|
|
142
|
+
export declare function toGroupPayloadId(walletId: AccountWalletPayloadId, subId: string | number): AccountGroupPayloadId;
|
|
143
|
+
/** Options accepted by {@link AccountTreeController.exportState}. */
|
|
144
|
+
export type ExportStateOptions = {
|
|
145
|
+
/** When `true`, secrets (mnemonic / private keys) are included. Requires the vault to be unlocked. */
|
|
146
|
+
includeSecrets?: boolean;
|
|
147
|
+
};
|
|
148
|
+
/** Current version of the {@link AccountTreePayload} format. */
|
|
149
|
+
export declare const ACCOUNT_TREE_PAYLOAD_CURRENT_VERSION = 1;
|
|
150
|
+
/**
|
|
151
|
+
* Superstruct schema for a fully versioned {@link AccountTreePayload}.
|
|
152
|
+
*
|
|
153
|
+
* Pins `version` to exactly {@link ACCOUNT_TREE_PAYLOAD_CURRENT_VERSION} so
|
|
154
|
+
* payloads from newer clients (v2+) are rejected rather than silently
|
|
155
|
+
* mis-handled as v1. Once a migration framework is wired up in
|
|
156
|
+
* {@link AccountTreeSnapshot.deserialize}, older versions will be up-migrated
|
|
157
|
+
* before this struct is checked, and newer versions will require a new struct.
|
|
158
|
+
*
|
|
159
|
+
* Secret fields (`value`, `privateKey`) use the Superstruct `sensitive()`
|
|
160
|
+
* wrapper so validation failures redact secrets from error output.
|
|
161
|
+
*/
|
|
162
|
+
export declare const AccountTreePayloadStruct: import("@metamask/superstruct").Struct<{
|
|
163
|
+
wallets: ({
|
|
164
|
+
id: `wallet:${string}`;
|
|
165
|
+
type: "mnemonic";
|
|
166
|
+
metadata: {
|
|
167
|
+
name: string;
|
|
168
|
+
};
|
|
169
|
+
groups: {
|
|
170
|
+
id: `wallet:${string}/${string}`;
|
|
171
|
+
metadata: {
|
|
172
|
+
name: string;
|
|
173
|
+
pinned: boolean;
|
|
174
|
+
hidden: boolean;
|
|
175
|
+
};
|
|
176
|
+
groupIndex: number;
|
|
177
|
+
}[];
|
|
178
|
+
value?: EncodedBytes | undefined;
|
|
179
|
+
} | {
|
|
180
|
+
id: `wallet:${string}`;
|
|
181
|
+
type: "private-key";
|
|
182
|
+
metadata: {
|
|
183
|
+
name: string;
|
|
184
|
+
};
|
|
185
|
+
groups: {
|
|
186
|
+
id: `wallet:${string}/${string}`;
|
|
187
|
+
metadata: {
|
|
188
|
+
name: string;
|
|
189
|
+
pinned: boolean;
|
|
190
|
+
hidden: boolean;
|
|
191
|
+
};
|
|
192
|
+
value?: {
|
|
193
|
+
privateKey: EncodedBytes;
|
|
194
|
+
encoding: "hexadecimal" | "base58" | "base32";
|
|
195
|
+
type?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account" | undefined;
|
|
196
|
+
} | undefined;
|
|
197
|
+
}[];
|
|
198
|
+
})[];
|
|
199
|
+
version: 1;
|
|
200
|
+
}, {
|
|
201
|
+
version: import("@metamask/superstruct").Struct<1, 1>;
|
|
202
|
+
wallets: import("@metamask/superstruct").Struct<({
|
|
203
|
+
id: `wallet:${string}`;
|
|
204
|
+
type: "mnemonic";
|
|
205
|
+
metadata: {
|
|
206
|
+
name: string;
|
|
207
|
+
};
|
|
208
|
+
groups: {
|
|
209
|
+
id: `wallet:${string}/${string}`;
|
|
210
|
+
metadata: {
|
|
211
|
+
name: string;
|
|
212
|
+
pinned: boolean;
|
|
213
|
+
hidden: boolean;
|
|
214
|
+
};
|
|
215
|
+
groupIndex: number;
|
|
216
|
+
}[];
|
|
217
|
+
value?: EncodedBytes | undefined;
|
|
218
|
+
} | {
|
|
219
|
+
id: `wallet:${string}`;
|
|
220
|
+
type: "private-key";
|
|
221
|
+
metadata: {
|
|
222
|
+
name: string;
|
|
223
|
+
};
|
|
224
|
+
groups: {
|
|
225
|
+
id: `wallet:${string}/${string}`;
|
|
226
|
+
metadata: {
|
|
227
|
+
name: string;
|
|
228
|
+
pinned: boolean;
|
|
229
|
+
hidden: boolean;
|
|
230
|
+
};
|
|
231
|
+
value?: {
|
|
232
|
+
privateKey: EncodedBytes;
|
|
233
|
+
encoding: "hexadecimal" | "base58" | "base32";
|
|
234
|
+
type?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account" | undefined;
|
|
235
|
+
} | undefined;
|
|
236
|
+
}[];
|
|
237
|
+
})[], import("@metamask/superstruct").Struct<{
|
|
238
|
+
id: `wallet:${string}`;
|
|
239
|
+
type: "mnemonic";
|
|
240
|
+
metadata: {
|
|
241
|
+
name: string;
|
|
242
|
+
};
|
|
243
|
+
groups: {
|
|
244
|
+
id: `wallet:${string}/${string}`;
|
|
245
|
+
metadata: {
|
|
246
|
+
name: string;
|
|
247
|
+
pinned: boolean;
|
|
248
|
+
hidden: boolean;
|
|
249
|
+
};
|
|
250
|
+
groupIndex: number;
|
|
251
|
+
}[];
|
|
252
|
+
value?: EncodedBytes | undefined;
|
|
253
|
+
} | {
|
|
254
|
+
id: `wallet:${string}`;
|
|
255
|
+
type: "private-key";
|
|
256
|
+
metadata: {
|
|
257
|
+
name: string;
|
|
258
|
+
};
|
|
259
|
+
groups: {
|
|
260
|
+
id: `wallet:${string}/${string}`;
|
|
261
|
+
metadata: {
|
|
262
|
+
name: string;
|
|
263
|
+
pinned: boolean;
|
|
264
|
+
hidden: boolean;
|
|
265
|
+
};
|
|
266
|
+
value?: {
|
|
267
|
+
privateKey: EncodedBytes;
|
|
268
|
+
encoding: "hexadecimal" | "base58" | "base32";
|
|
269
|
+
type?: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "stellar:account" | "any:account" | undefined;
|
|
270
|
+
} | undefined;
|
|
271
|
+
}[];
|
|
272
|
+
}, null>>;
|
|
273
|
+
}>;
|
|
274
|
+
/** Inferred TypeScript type for a value matching {@link AccountTreePayloadStruct}. */
|
|
275
|
+
export type AccountTreePayloadStructType = Infer<typeof AccountTreePayloadStruct>;
|
|
276
|
+
/**
|
|
277
|
+
* Asserts that `value` conforms to the v1 {@link AccountTreePayload} schema.
|
|
278
|
+
*
|
|
279
|
+
* Prefer {@link AccountTreeSnapshot.deserialize} at transport boundaries so
|
|
280
|
+
* validation stays paired with snapshot construction. Use this helper when you
|
|
281
|
+
* already hold a parsed object and need to assert its shape before further
|
|
282
|
+
* processing.
|
|
283
|
+
*
|
|
284
|
+
* @param value - Value to validate.
|
|
285
|
+
* @throws If `value` is not a valid v1 payload, including unsupported wallet types.
|
|
286
|
+
*/
|
|
287
|
+
export declare function assertAccountTreePayload(value: unknown): asserts value is AccountTreePayload;
|
|
288
|
+
//# sourceMappingURL=payload.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.mts","sourceRoot":"","sources":["../../src/state/payload.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA8B;AAiB5D,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,oBAAmB;AAG7D,iFAAiF;AACjF,MAAM,MAAM,sBAAsB,GAAG,UAAU,MAAM,EAAE,CAAC;AAExD,6FAA6F;AAC7F,MAAM,MAAM,qBAAqB,GAAG,GAAG,sBAAsB,IAAI,MAAM,EAAE,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,0CAA0C;IAC1C,QAAQ,EAAE,sBAAsB,CAAC;IACjC,0GAA0G;IAC1G,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAIF;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,qBAAqB,GAC7B,oBAAoB,CAStB;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAClC,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC;AAE3E,mEAAmE;AACnE,MAAM,MAAM,4BAA4B,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5D,iEAAiE;AACjE,MAAM,MA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