@metamask-previews/account-api 0.9.0-2c74956 → 0.9.0-3e52ac6
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/dist/api/provider.cjs +0 -7
- package/dist/api/provider.cjs.map +1 -1
- package/dist/api/provider.d.cts +4 -10
- package/dist/api/provider.d.cts.map +1 -1
- package/dist/api/provider.d.mts +4 -10
- package/dist/api/provider.d.mts.map +1 -1
- package/dist/api/provider.mjs +1 -6
- package/dist/api/provider.mjs.map +1 -1
- package/dist/mocks/accounts.d.cts +7 -7
- package/dist/mocks/accounts.d.cts.map +1 -1
- package/dist/mocks/accounts.d.mts +7 -7
- package/dist/mocks/accounts.d.mts.map +1 -1
- package/package.json +2 -2
package/dist/api/provider.cjs
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AccountProviderType = void 0;
|
|
4
|
-
var AccountProviderType;
|
|
5
|
-
(function (AccountProviderType) {
|
|
6
|
-
AccountProviderType["Evm"] = "Evm";
|
|
7
|
-
AccountProviderType["Solana"] = "Solana";
|
|
8
|
-
AccountProviderType["Btc"] = "Btc";
|
|
9
|
-
})(AccountProviderType || (exports.AccountProviderType = AccountProviderType = {}));
|
|
10
3
|
//# sourceMappingURL=provider.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.cjs","sourceRoot":"","sources":["../../src/api/provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"provider.cjs","sourceRoot":"","sources":["../../src/api/provider.ts"],"names":[],"mappings":"","sourcesContent":["import type { EntropySourceId, KeyringAccount } from '@metamask/keyring-api';\n\n/**\n * An account provider is reponsible of providing accounts to an account group.\n */\nexport type AccountProvider<Account extends KeyringAccount> = {\n /**\n * Gets an account for a given ID.\n *\n * @returns An account, or undefined if not found.\n */\n getAccount: (id: Account['id']) => Account | undefined;\n\n /**\n * Gets all accounts for this provider.\n *\n * @returns A list of all account for this provider.\n */\n getAccounts: () => Account[];\n\n /**\n * Creates accounts for a given entropy source and a given group\n * index.\n *\n * @param options - Options.\n * @param options.entropySource - Entropy source to use.\n * @param options.groupIndex - Group index to use.\n * @returns The list of created accounts.\n */\n createAccounts: (options: {\n entropySource: EntropySourceId;\n groupIndex: number;\n }) => Promise<Account[]>;\n\n /**\n * Discover accounts for a given entropy source and a given group\n * index.\n *\n * NOTE: This method needs to also create the discovered accounts.\n *\n * @param options - Options.\n * @param options.entropySource - Entropy source to use.\n * @param options.groupIndex - Group index to use.\n * @returns The list of discovered and created accounts.\n */\n discoverAndCreateAccounts: (options: {\n entropySource: EntropySourceId;\n groupIndex: number;\n }) => Promise<Account[]>;\n};\n"]}
|
package/dist/api/provider.d.cts
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import type { EntropySourceId, KeyringAccount } from "@metamask/keyring-api";
|
|
2
|
-
export declare enum AccountProviderType {
|
|
3
|
-
Evm = "Evm",
|
|
4
|
-
Solana = "Solana",
|
|
5
|
-
Btc = "Btc"
|
|
6
|
-
}
|
|
7
2
|
/**
|
|
8
3
|
* An account provider is reponsible of providing accounts to an account group.
|
|
9
4
|
*/
|
|
10
5
|
export type AccountProvider<Account extends KeyringAccount> = {
|
|
11
|
-
/**
|
|
12
|
-
* The type of the provider.
|
|
13
|
-
*/
|
|
14
|
-
providerType: AccountProviderType;
|
|
15
6
|
/**
|
|
16
7
|
* Gets an account for a given ID.
|
|
17
8
|
*
|
|
@@ -38,16 +29,19 @@ export type AccountProvider<Account extends KeyringAccount> = {
|
|
|
38
29
|
groupIndex: number;
|
|
39
30
|
}) => Promise<Account[]>;
|
|
40
31
|
/**
|
|
41
|
-
* Discover accounts for a given entropy source
|
|
32
|
+
* Discover accounts for a given entropy source and a given group
|
|
33
|
+
* index.
|
|
42
34
|
*
|
|
43
35
|
* NOTE: This method needs to also create the discovered accounts.
|
|
44
36
|
*
|
|
45
37
|
* @param options - Options.
|
|
46
38
|
* @param options.entropySource - Entropy source to use.
|
|
39
|
+
* @param options.groupIndex - Group index to use.
|
|
47
40
|
* @returns The list of discovered and created accounts.
|
|
48
41
|
*/
|
|
49
42
|
discoverAndCreateAccounts: (options: {
|
|
50
43
|
entropySource: EntropySourceId;
|
|
44
|
+
groupIndex: number;
|
|
51
45
|
}) => Promise<Account[]>;
|
|
52
46
|
};
|
|
53
47
|
//# sourceMappingURL=provider.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.cts","sourceRoot":"","sources":["../../src/api/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,8BAA8B;AAE7E
|
|
1
|
+
{"version":3,"file":"provider.d.cts","sourceRoot":"","sources":["../../src/api/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,8BAA8B;AAE7E;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,OAAO,SAAS,cAAc,IAAI;IAC5D;;;;OAIG;IACH,UAAU,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,GAAG,SAAS,CAAC;IAEvD;;;;OAIG;IACH,WAAW,EAAE,MAAM,OAAO,EAAE,CAAC;IAE7B;;;;;;;;OAQG;IACH,cAAc,EAAE,CAAC,OAAO,EAAE;QACxB,aAAa,EAAE,eAAe,CAAC;QAC/B,UAAU,EAAE,MAAM,CAAC;KACpB,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAEzB;;;;;;;;;;OAUG;IACH,yBAAyB,EAAE,CAAC,OAAO,EAAE;QACnC,aAAa,EAAE,eAAe,CAAC;QAC/B,UAAU,EAAE,MAAM,CAAC;KACpB,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CAC1B,CAAC"}
|
package/dist/api/provider.d.mts
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import type { EntropySourceId, KeyringAccount } from "@metamask/keyring-api";
|
|
2
|
-
export declare enum AccountProviderType {
|
|
3
|
-
Evm = "Evm",
|
|
4
|
-
Solana = "Solana",
|
|
5
|
-
Btc = "Btc"
|
|
6
|
-
}
|
|
7
2
|
/**
|
|
8
3
|
* An account provider is reponsible of providing accounts to an account group.
|
|
9
4
|
*/
|
|
10
5
|
export type AccountProvider<Account extends KeyringAccount> = {
|
|
11
|
-
/**
|
|
12
|
-
* The type of the provider.
|
|
13
|
-
*/
|
|
14
|
-
providerType: AccountProviderType;
|
|
15
6
|
/**
|
|
16
7
|
* Gets an account for a given ID.
|
|
17
8
|
*
|
|
@@ -38,16 +29,19 @@ export type AccountProvider<Account extends KeyringAccount> = {
|
|
|
38
29
|
groupIndex: number;
|
|
39
30
|
}) => Promise<Account[]>;
|
|
40
31
|
/**
|
|
41
|
-
* Discover accounts for a given entropy source
|
|
32
|
+
* Discover accounts for a given entropy source and a given group
|
|
33
|
+
* index.
|
|
42
34
|
*
|
|
43
35
|
* NOTE: This method needs to also create the discovered accounts.
|
|
44
36
|
*
|
|
45
37
|
* @param options - Options.
|
|
46
38
|
* @param options.entropySource - Entropy source to use.
|
|
39
|
+
* @param options.groupIndex - Group index to use.
|
|
47
40
|
* @returns The list of discovered and created accounts.
|
|
48
41
|
*/
|
|
49
42
|
discoverAndCreateAccounts: (options: {
|
|
50
43
|
entropySource: EntropySourceId;
|
|
44
|
+
groupIndex: number;
|
|
51
45
|
}) => Promise<Account[]>;
|
|
52
46
|
};
|
|
53
47
|
//# sourceMappingURL=provider.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.mts","sourceRoot":"","sources":["../../src/api/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,8BAA8B;AAE7E
|
|
1
|
+
{"version":3,"file":"provider.d.mts","sourceRoot":"","sources":["../../src/api/provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,8BAA8B;AAE7E;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,OAAO,SAAS,cAAc,IAAI;IAC5D;;;;OAIG;IACH,UAAU,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,GAAG,SAAS,CAAC;IAEvD;;;;OAIG;IACH,WAAW,EAAE,MAAM,OAAO,EAAE,CAAC;IAE7B;;;;;;;;OAQG;IACH,cAAc,EAAE,CAAC,OAAO,EAAE;QACxB,aAAa,EAAE,eAAe,CAAC;QAC/B,UAAU,EAAE,MAAM,CAAC;KACpB,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAEzB;;;;;;;;;;OAUG;IACH,yBAAyB,EAAE,CAAC,OAAO,EAAE;QACnC,aAAa,EAAE,eAAe,CAAC;QAC/B,UAAU,EAAE,MAAM,CAAC;KACpB,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CAC1B,CAAC"}
|
package/dist/api/provider.mjs
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
(function (AccountProviderType) {
|
|
3
|
-
AccountProviderType["Evm"] = "Evm";
|
|
4
|
-
AccountProviderType["Solana"] = "Solana";
|
|
5
|
-
AccountProviderType["Btc"] = "Btc";
|
|
6
|
-
})(AccountProviderType || (AccountProviderType = {}));
|
|
1
|
+
export {};
|
|
7
2
|
//# sourceMappingURL=provider.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.mjs","sourceRoot":"","sources":["../../src/api/provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"provider.mjs","sourceRoot":"","sources":["../../src/api/provider.ts"],"names":[],"mappings":"","sourcesContent":["import type { EntropySourceId, KeyringAccount } from '@metamask/keyring-api';\n\n/**\n * An account provider is reponsible of providing accounts to an account group.\n */\nexport type AccountProvider<Account extends KeyringAccount> = {\n /**\n * Gets an account for a given ID.\n *\n * @returns An account, or undefined if not found.\n */\n getAccount: (id: Account['id']) => Account | undefined;\n\n /**\n * Gets all accounts for this provider.\n *\n * @returns A list of all account for this provider.\n */\n getAccounts: () => Account[];\n\n /**\n * Creates accounts for a given entropy source and a given group\n * index.\n *\n * @param options - Options.\n * @param options.entropySource - Entropy source to use.\n * @param options.groupIndex - Group index to use.\n * @returns The list of created accounts.\n */\n createAccounts: (options: {\n entropySource: EntropySourceId;\n groupIndex: number;\n }) => Promise<Account[]>;\n\n /**\n * Discover accounts for a given entropy source and a given group\n * index.\n *\n * NOTE: This method needs to also create the discovered accounts.\n *\n * @param options - Options.\n * @param options.entropySource - Entropy source to use.\n * @param options.groupIndex - Group index to use.\n * @returns The list of discovered and created accounts.\n */\n discoverAndCreateAccounts: (options: {\n entropySource: EntropySourceId;\n groupIndex: number;\n }) => Promise<Account[]>;\n};\n"]}
|
|
@@ -24,7 +24,7 @@ export declare const MOCK_SOL_ACCOUNT_1: Bip44Account<KeyringAccount>;
|
|
|
24
24
|
export declare const MOCK_BTC_P2WPKH_ACCOUNT_1: Bip44Account<KeyringAccount>;
|
|
25
25
|
export declare const MOCK_BTC_P2TR_ACCOUNT_1: Bip44Account<KeyringAccount>;
|
|
26
26
|
export declare const MOCK_SNAP_ACCOUNT_1: Bip44Account<{
|
|
27
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
27
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
28
28
|
id: string;
|
|
29
29
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
30
30
|
entropy?: {
|
|
@@ -43,7 +43,7 @@ export declare const MOCK_SNAP_ACCOUNT_1: Bip44Account<{
|
|
|
43
43
|
}>;
|
|
44
44
|
export declare const MOCK_SNAP_ACCOUNT_2: KeyringAccount;
|
|
45
45
|
export declare const MOCK_SNAP_ACCOUNT_3: Bip44Account<{
|
|
46
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
46
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
47
47
|
id: string;
|
|
48
48
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
49
49
|
entropy?: {
|
|
@@ -61,7 +61,7 @@ export declare const MOCK_SNAP_ACCOUNT_3: Bip44Account<{
|
|
|
61
61
|
methods: string[];
|
|
62
62
|
}>;
|
|
63
63
|
export declare const MOCK_SNAP_ACCOUNT_4: Bip44Account<{
|
|
64
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
64
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
65
65
|
id: string;
|
|
66
66
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
67
67
|
entropy?: {
|
|
@@ -92,7 +92,7 @@ export declare class MockAccountBuilder<Account extends KeyringAccount> {
|
|
|
92
92
|
}
|
|
93
93
|
export declare const MOCK_WALLET_1_ENTROPY_SOURCE = "mock-keyring-id-1";
|
|
94
94
|
export declare const MOCK_WALLET_1_EVM_ACCOUNT: Bip44Account<{
|
|
95
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
95
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
96
96
|
id: string;
|
|
97
97
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
98
98
|
entropy?: {
|
|
@@ -110,7 +110,7 @@ export declare const MOCK_WALLET_1_EVM_ACCOUNT: Bip44Account<{
|
|
|
110
110
|
methods: string[];
|
|
111
111
|
}>;
|
|
112
112
|
export declare const MOCK_WALLET_1_SOL_ACCOUNT: Bip44Account<{
|
|
113
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
113
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
114
114
|
id: string;
|
|
115
115
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
116
116
|
entropy?: {
|
|
@@ -128,7 +128,7 @@ export declare const MOCK_WALLET_1_SOL_ACCOUNT: Bip44Account<{
|
|
|
128
128
|
methods: string[];
|
|
129
129
|
}>;
|
|
130
130
|
export declare const MOCK_WALLET_1_BTC_P2WPKH_ACCOUNT: Bip44Account<{
|
|
131
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
131
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
132
132
|
id: string;
|
|
133
133
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
134
134
|
entropy?: {
|
|
@@ -146,7 +146,7 @@ export declare const MOCK_WALLET_1_BTC_P2WPKH_ACCOUNT: Bip44Account<{
|
|
|
146
146
|
methods: string[];
|
|
147
147
|
}>;
|
|
148
148
|
export declare const MOCK_WALLET_1_BTC_P2TR_ACCOUNT: Bip44Account<{
|
|
149
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
149
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
150
150
|
id: string;
|
|
151
151
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
152
152
|
entropy?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.cts","sourceRoot":"","sources":["../../src/mocks/accounts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,8BAA8B;AAe7E,OAAO,EAAkB,KAAK,YAAY,EAAE,yBAAe;AAa3D,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAC;AAEF,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AACzD,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AAEzD,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,cAAc,CAc1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,cAAc,CAc1D,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,cAAc,CAe3D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,YAAY,CAAC,cAAc,CAelE,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,YAAY,CAAC,cAAc,CAehE,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;
|
|
1
|
+
{"version":3,"file":"accounts.d.cts","sourceRoot":"","sources":["../../src/mocks/accounts.ts"],"names":[],"mappings":"AA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AAkB,CAAC,OAAO,CAAC;IAKvC,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,CAAC,OAAO,CAAC;IAK9D,iBAAiB,CACf,aAAa,EAAE,eAAe,GAC7B,kBAAkB,CAAC,OAAO,CAAC;IAO9B,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,kBAAkB,CAAC,OAAO,CAAC;IAO/D,GAAG,IAAI,OAAO;CAGf;AAED,eAAO,MAAM,4BAA4B,sBAAwB,CAAC;AAElE,eAAO,MAAM,yBAAyB;;;;eAnIpC,CAAF;;;;;;;;kBAOqB,CAAC;;;;;EAiId,CAAC;AACT,eAAO,MAAM,yBAAyB;;;;eAzIpC,CAAF;;;;;;;;kBAOqB,CAAC;;;;;EAuId,CAAC;AACT,eAAO,MAAM,gCAAgC;;;;eA/I3C,CAAF;;;;;;;;kBAOqB,CAAC;;;;;EA6Id,CAAC;AACT,eAAO,MAAM,8BAA8B;;;;eArJzC,CAAF;;;;;;;;kBAOqB,CAAC;;;;;EAmJd,CAAC"}
|
|
@@ -24,7 +24,7 @@ export declare const MOCK_SOL_ACCOUNT_1: Bip44Account<KeyringAccount>;
|
|
|
24
24
|
export declare const MOCK_BTC_P2WPKH_ACCOUNT_1: Bip44Account<KeyringAccount>;
|
|
25
25
|
export declare const MOCK_BTC_P2TR_ACCOUNT_1: Bip44Account<KeyringAccount>;
|
|
26
26
|
export declare const MOCK_SNAP_ACCOUNT_1: Bip44Account<{
|
|
27
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
27
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
28
28
|
id: string;
|
|
29
29
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
30
30
|
entropy?: {
|
|
@@ -43,7 +43,7 @@ export declare const MOCK_SNAP_ACCOUNT_1: Bip44Account<{
|
|
|
43
43
|
}>;
|
|
44
44
|
export declare const MOCK_SNAP_ACCOUNT_2: KeyringAccount;
|
|
45
45
|
export declare const MOCK_SNAP_ACCOUNT_3: Bip44Account<{
|
|
46
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
46
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
47
47
|
id: string;
|
|
48
48
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
49
49
|
entropy?: {
|
|
@@ -61,7 +61,7 @@ export declare const MOCK_SNAP_ACCOUNT_3: Bip44Account<{
|
|
|
61
61
|
methods: string[];
|
|
62
62
|
}>;
|
|
63
63
|
export declare const MOCK_SNAP_ACCOUNT_4: Bip44Account<{
|
|
64
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
64
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
65
65
|
id: string;
|
|
66
66
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
67
67
|
entropy?: {
|
|
@@ -92,7 +92,7 @@ export declare class MockAccountBuilder<Account extends KeyringAccount> {
|
|
|
92
92
|
}
|
|
93
93
|
export declare const MOCK_WALLET_1_ENTROPY_SOURCE = "mock-keyring-id-1";
|
|
94
94
|
export declare const MOCK_WALLET_1_EVM_ACCOUNT: Bip44Account<{
|
|
95
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
95
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
96
96
|
id: string;
|
|
97
97
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
98
98
|
entropy?: {
|
|
@@ -110,7 +110,7 @@ export declare const MOCK_WALLET_1_EVM_ACCOUNT: Bip44Account<{
|
|
|
110
110
|
methods: string[];
|
|
111
111
|
}>;
|
|
112
112
|
export declare const MOCK_WALLET_1_SOL_ACCOUNT: Bip44Account<{
|
|
113
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
113
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
114
114
|
id: string;
|
|
115
115
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
116
116
|
entropy?: {
|
|
@@ -128,7 +128,7 @@ export declare const MOCK_WALLET_1_SOL_ACCOUNT: Bip44Account<{
|
|
|
128
128
|
methods: string[];
|
|
129
129
|
}>;
|
|
130
130
|
export declare const MOCK_WALLET_1_BTC_P2WPKH_ACCOUNT: Bip44Account<{
|
|
131
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
131
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
132
132
|
id: string;
|
|
133
133
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
134
134
|
entropy?: {
|
|
@@ -146,7 +146,7 @@ export declare const MOCK_WALLET_1_BTC_P2WPKH_ACCOUNT: Bip44Account<{
|
|
|
146
146
|
methods: string[];
|
|
147
147
|
}>;
|
|
148
148
|
export declare const MOCK_WALLET_1_BTC_P2TR_ACCOUNT: Bip44Account<{
|
|
149
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
149
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
150
150
|
id: string;
|
|
151
151
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
152
152
|
entropy?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.mts","sourceRoot":"","sources":["../../src/mocks/accounts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,8BAA8B;AAe7E,OAAO,EAAkB,KAAK,YAAY,EAAE,yBAAe;AAa3D,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAC;AAEF,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AACzD,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AAEzD,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,cAAc,CAc1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,cAAc,CAc1D,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,cAAc,CAe3D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,YAAY,CAAC,cAAc,CAelE,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,YAAY,CAAC,cAAc,CAehE,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;
|
|
1
|
+
{"version":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,IAAI,CAAC,GAAG,kBAAkB,CAAC,OAAO,CAAC;IAK7D,QAAQ,IAAI,kBAAkB,CAAC,OAAO,CAAC;IAKvC,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,CAAC,OAAO,CAAC;IAK9D,iBAAiB,CACf,aAAa,EAAE,eAAe,GAC7B,kBAAkB,CAAC,OAAO,CAAC;IAO9B,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,kBAAkB,CAAC,OAAO,CAAC;IAO/D,GAAG,IAAI,OAAO;CAGf;AAED,eAAO,MAAM,4BAA4B,sBAAwB,CAAC;AAElE,eAAO,MAAM,yBAAyB;;;;eAnIpC,CAAF;;;;;;;;kBAOqB,CAAC;;;;;EAiId,CAAC;AACT,eAAO,MAAM,yBAAyB;;;;eAzIpC,CAAF;;;;;;;;kBAOqB,CAAC;;;;;EAuId,CAAC;AACT,eAAO,MAAM,gCAAgC;;;;eA/I3C,CAAF;;;;;;;;kBAOqB,CAAC;;;;;EA6Id,CAAC;AACT,eAAO,MAAM,8BAA8B;;;;eArJzC,CAAF;;;;;;;;kBAOqB,CAAC;;;;;EAmJd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/account-api",
|
|
3
|
-
"version": "0.9.0-
|
|
3
|
+
"version": "0.9.0-3e52ac6",
|
|
4
4
|
"description": "MetaMask Account API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"metamask",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"test:watch": "jest --watch"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@metamask/keyring-api": "20.
|
|
59
|
+
"@metamask/keyring-api": "20.1.0",
|
|
60
60
|
"@metamask/keyring-utils": "3.1.0",
|
|
61
61
|
"@metamask/superstruct": "^3.1.0",
|
|
62
62
|
"uuid": "^9.0.1"
|