@metamask-previews/multichain-account-service 0.4.0-preview-50d4945e → 0.4.0-preview-7b6467c
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 +9 -0
- package/dist/MultichainAccountGroup.cjs +20 -0
- package/dist/MultichainAccountGroup.cjs.map +1 -1
- package/dist/MultichainAccountGroup.d.cts +6 -0
- package/dist/MultichainAccountGroup.d.cts.map +1 -1
- package/dist/MultichainAccountGroup.d.mts +6 -0
- package/dist/MultichainAccountGroup.d.mts.map +1 -1
- package/dist/MultichainAccountGroup.mjs +20 -0
- package/dist/MultichainAccountGroup.mjs.map +1 -1
- package/dist/MultichainAccountService.cjs +18 -0
- package/dist/MultichainAccountService.cjs.map +1 -1
- package/dist/MultichainAccountService.d.cts +10 -0
- package/dist/MultichainAccountService.d.cts.map +1 -1
- package/dist/MultichainAccountService.d.mts +10 -0
- package/dist/MultichainAccountService.d.mts.map +1 -1
- package/dist/MultichainAccountService.mjs +18 -0
- package/dist/MultichainAccountService.mjs.map +1 -1
- package/dist/MultichainAccountWallet.cjs +18 -0
- package/dist/MultichainAccountWallet.cjs.map +1 -1
- package/dist/MultichainAccountWallet.d.cts +10 -0
- package/dist/MultichainAccountWallet.d.cts.map +1 -1
- package/dist/MultichainAccountWallet.d.mts +10 -0
- package/dist/MultichainAccountWallet.d.mts.map +1 -1
- package/dist/MultichainAccountWallet.mjs +18 -0
- package/dist/MultichainAccountWallet.mjs.map +1 -1
- package/dist/providers/EvmAccountProvider.cjs +3 -2
- package/dist/providers/EvmAccountProvider.cjs.map +1 -1
- package/dist/providers/EvmAccountProvider.d.cts +5 -14
- package/dist/providers/EvmAccountProvider.d.cts.map +1 -1
- package/dist/providers/EvmAccountProvider.d.mts +5 -14
- package/dist/providers/EvmAccountProvider.d.mts.map +1 -1
- package/dist/providers/EvmAccountProvider.mjs +4 -3
- package/dist/providers/EvmAccountProvider.mjs.map +1 -1
- package/dist/providers/SnapAccountProvider.cjs +3 -17
- package/dist/providers/SnapAccountProvider.cjs.map +1 -1
- package/dist/providers/SnapAccountProvider.d.cts +1 -13
- package/dist/providers/SnapAccountProvider.d.cts.map +1 -1
- package/dist/providers/SnapAccountProvider.d.mts +1 -13
- package/dist/providers/SnapAccountProvider.d.mts.map +1 -1
- package/dist/providers/SnapAccountProvider.mjs +4 -18
- package/dist/providers/SnapAccountProvider.mjs.map +1 -1
- package/dist/providers/SolAccountProvider.cjs +20 -20
- package/dist/providers/SolAccountProvider.cjs.map +1 -1
- package/dist/providers/SolAccountProvider.d.cts.map +1 -1
- package/dist/providers/SolAccountProvider.d.mts.map +1 -1
- package/dist/providers/SolAccountProvider.mjs +21 -21
- package/dist/providers/SolAccountProvider.mjs.map +1 -1
- package/dist/tests/accounts.d.cts +7 -7
- package/dist/tests/accounts.d.mts +7 -7
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +9 -1
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +9 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -14,27 +14,27 @@ class SolAccountProvider extends SnapAccountProvider_1.SnapAccountProvider {
|
|
|
14
14
|
account.metadata.keyring.type === keyring_controller_1.KeyringTypes.snap);
|
|
15
15
|
}
|
|
16
16
|
async createAccounts({ entropySource, groupIndex, }) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
26
|
-
// Solana Snap does not use BIP-44 typed options for the moment
|
|
27
|
-
// so we "inject" them (the `AccountsController` does a similar thing
|
|
28
|
-
// for the moment).
|
|
29
|
-
account.options.entropy = {
|
|
30
|
-
type: keyring_api_1.KeyringAccountEntropyTypeOption.Mnemonic,
|
|
31
|
-
id: entropySource,
|
|
32
|
-
groupIndex,
|
|
33
|
-
derivationPath,
|
|
34
|
-
};
|
|
35
|
-
(0, BaseAccountProvider_1.assertIsBip44Account)(account);
|
|
36
|
-
return [account];
|
|
17
|
+
const createAccount = await this.getRestrictedSnapAccountCreator();
|
|
18
|
+
// Create account without any confirmation nor selecting it.
|
|
19
|
+
// TODO: Use the new keyring API `createAccounts` method with the "bip-44:derive-index"
|
|
20
|
+
// type once ready.
|
|
21
|
+
const derivationPath = `m/44'/501'/${groupIndex}'/0'`;
|
|
22
|
+
const account = await createAccount({
|
|
23
|
+
entropySource,
|
|
24
|
+
derivationPath,
|
|
37
25
|
});
|
|
26
|
+
// Solana Snap does not use BIP-44 typed options for the moment
|
|
27
|
+
// so we "inject" them (the `AccountsController` does a similar thing
|
|
28
|
+
// for the moment).
|
|
29
|
+
account.options.entropy = {
|
|
30
|
+
type: keyring_api_1.KeyringAccountEntropyTypeOption.Mnemonic,
|
|
31
|
+
id: entropySource,
|
|
32
|
+
groupIndex,
|
|
33
|
+
derivationPath,
|
|
34
|
+
};
|
|
35
|
+
const accounts = [account];
|
|
36
|
+
(0, BaseAccountProvider_1.assertAreBip44Accounts)(accounts);
|
|
37
|
+
return accounts;
|
|
38
38
|
}
|
|
39
39
|
async discoverAndCreateAccounts(_) {
|
|
40
40
|
return []; // TODO: Implement account discovery.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolAccountProvider.cjs","sourceRoot":"","sources":["../../src/providers/SolAccountProvider.ts"],"names":[],"mappings":";;;AAEA,uDAG+B;AAC/B,qEAA4D;AAK5D,
|
|
1
|
+
{"version":3,"file":"SolAccountProvider.cjs","sourceRoot":"","sources":["../../src/providers/SolAccountProvider.ts"],"names":[],"mappings":";;;AAEA,uDAG+B;AAC/B,qEAA4D;AAK5D,mEAA+D;AAC/D,mEAA4D;AAE5D,MAAa,kBAAmB,SAAQ,yCAAmB;IAGzD,YAAY,SAA4C;QACtD,KAAK,CAAC,kBAAkB,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;IACtD,CAAC;IAED,mBAAmB,CAAC,OAAsC;QACxD,OAAO,CACL,OAAO,CAAC,IAAI,KAAK,4BAAc,CAAC,WAAW;YAC3C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAM,iCAAY,CAAC,IAAe,CAChE,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,EACnB,aAAa,EACb,UAAU,GAIX;QACC,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,+BAA+B,EAAE,CAAC;QAEnE,4DAA4D;QAC5D,uFAAuF;QACvF,mBAAmB;QACnB,MAAM,cAAc,GAAG,cAAc,UAAU,MAAM,CAAC;QACtD,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC;YAClC,aAAa;YACb,cAAc;SACf,CAAC,CAAC;QAEH,+DAA+D;QAC/D,qEAAqE;QACrE,mBAAmB;QACnB,OAAO,CAAC,OAAO,CAAC,OAAO,GAAG;YACxB,IAAI,EAAE,6CAA+B,CAAC,QAAQ;YAC9C,EAAE,EAAE,aAAa;YACjB,UAAU;YACV,cAAc;SACf,CAAC;QAEF,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,IAAA,4CAAsB,EAAC,QAAQ,CAAC,CAAC;QAEjC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,yBAAyB,CAAC,CAG/B;QACC,OAAO,EAAE,CAAC,CAAC,qCAAqC;IAClD,CAAC;;AArDH,gDAsDC;AArDQ,iCAAc,GAAG,kCAA4C,CAAC","sourcesContent":["import { type Bip44Account } from '@metamask/account-api';\nimport type { EntropySourceId, KeyringAccount } from '@metamask/keyring-api';\nimport {\n KeyringAccountEntropyTypeOption,\n SolAccountType,\n} from '@metamask/keyring-api';\nimport { KeyringTypes } from '@metamask/keyring-controller';\nimport type { InternalAccount } from '@metamask/keyring-internal-api';\nimport type { SnapId } from '@metamask/snaps-sdk';\nimport type { MultichainAccountServiceMessenger } from 'src/types';\n\nimport { assertAreBip44Accounts } from './BaseAccountProvider';\nimport { SnapAccountProvider } from './SnapAccountProvider';\n\nexport class SolAccountProvider extends SnapAccountProvider {\n static SOLANA_SNAP_ID = 'npm:@metamask/solana-wallet-snap' as SnapId;\n\n constructor(messenger: MultichainAccountServiceMessenger) {\n super(SolAccountProvider.SOLANA_SNAP_ID, messenger);\n }\n\n isAccountCompatible(account: Bip44Account<InternalAccount>): boolean {\n return (\n account.type === SolAccountType.DataAccount &&\n account.metadata.keyring.type === (KeyringTypes.snap as string)\n );\n }\n\n async createAccounts({\n entropySource,\n groupIndex,\n }: {\n entropySource: EntropySourceId;\n groupIndex: number;\n }): Promise<Bip44Account<KeyringAccount>[]> {\n const createAccount = await this.getRestrictedSnapAccountCreator();\n\n // Create account without any confirmation nor selecting it.\n // TODO: Use the new keyring API `createAccounts` method with the \"bip-44:derive-index\"\n // type once ready.\n const derivationPath = `m/44'/501'/${groupIndex}'/0'`;\n const account = await createAccount({\n entropySource,\n derivationPath,\n });\n\n // Solana Snap does not use BIP-44 typed options for the moment\n // so we \"inject\" them (the `AccountsController` does a similar thing\n // for the moment).\n account.options.entropy = {\n type: KeyringAccountEntropyTypeOption.Mnemonic,\n id: entropySource,\n groupIndex,\n derivationPath,\n };\n\n const accounts = [account];\n assertAreBip44Accounts(accounts);\n\n return accounts;\n }\n\n async discoverAndCreateAccounts(_: {\n entropySource: EntropySourceId;\n groupIndex: number;\n }) {\n return []; // TODO: Implement account discovery.\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolAccountProvider.d.cts","sourceRoot":"","sources":["../../src/providers/SolAccountProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,8BAA8B;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,8BAA8B;AAM7E,OAAO,KAAK,EAAE,eAAe,EAAE,uCAAuC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,4BAA4B;AAClD,OAAO,KAAK,EAAE,iCAAiC,EAAE,kB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1 @@
|
|
|
1
|
-
{"version":3,"file":"SolAccountProvider.d.mts","sourceRoot":"","sources":["../../src/providers/SolAccountProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,8BAA8B;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,8BAA8B;AAM7E,OAAO,KAAK,EAAE,eAAe,EAAE,uCAAuC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,4BAA4B;AAClD,OAAO,KAAK,EAAE,iCAAiC,EAAE,kBAAkB;AAGnE,OAAO,EAAE,mBAAmB,EAAE,kCAA8B;AAE5D,qBAAa,kBAAmB,SAAQ,mBAAmB;IACzD,MAAM,CAAC,cAAc,SAAgD;gBAEzD,SAAS,EAAE,iCAAiC;IAIxD,mBAAmB,CAAC,OAAO,EAAE,YAAY,CAAC,eAAe,CAAC,GAAG,OAAO;IAO9D,cAAc,CAAC,EACnB,aAAa,EACb,UAAU,GACX,EAAE;QACD,aAAa,EAAE,eAAe,CAAC;QAC/B,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"SolAccountProvider.d.mts","sourceRoot":"","sources":["../../src/providers/SolAccountProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,8BAA8B;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,8BAA8B;AAM7E,OAAO,KAAK,EAAE,eAAe,EAAE,uCAAuC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,4BAA4B;AAClD,OAAO,KAAK,EAAE,iCAAiC,EAAE,kBAAkB;AAGnE,OAAO,EAAE,mBAAmB,EAAE,kCAA8B;AAE5D,qBAAa,kBAAmB,SAAQ,mBAAmB;IACzD,MAAM,CAAC,cAAc,SAAgD;gBAEzD,SAAS,EAAE,iCAAiC;IAIxD,mBAAmB,CAAC,OAAO,EAAE,YAAY,CAAC,eAAe,CAAC,GAAG,OAAO;IAO9D,cAAc,CAAC,EACnB,aAAa,EACb,UAAU,GACX,EAAE;QACD,aAAa,EAAE,eAAe,CAAC;QAC/B,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE,CAAC;IA4BrC,yBAAyB,CAAC,CAAC,EAAE;QACjC,aAAa,EAAE,eAAe,CAAC;QAC/B,UAAU,EAAE,MAAM,CAAC;KACpB;CAGF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KeyringAccountEntropyTypeOption, SolAccountType } from "@metamask/keyring-api";
|
|
2
2
|
import { KeyringTypes } from "@metamask/keyring-controller";
|
|
3
|
-
import {
|
|
3
|
+
import { assertAreBip44Accounts } from "./BaseAccountProvider.mjs";
|
|
4
4
|
import { SnapAccountProvider } from "./SnapAccountProvider.mjs";
|
|
5
5
|
export class SolAccountProvider extends SnapAccountProvider {
|
|
6
6
|
constructor(messenger) {
|
|
@@ -11,27 +11,27 @@ export class SolAccountProvider extends SnapAccountProvider {
|
|
|
11
11
|
account.metadata.keyring.type === KeyringTypes.snap);
|
|
12
12
|
}
|
|
13
13
|
async createAccounts({ entropySource, groupIndex, }) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
23
|
-
// Solana Snap does not use BIP-44 typed options for the moment
|
|
24
|
-
// so we "inject" them (the `AccountsController` does a similar thing
|
|
25
|
-
// for the moment).
|
|
26
|
-
account.options.entropy = {
|
|
27
|
-
type: KeyringAccountEntropyTypeOption.Mnemonic,
|
|
28
|
-
id: entropySource,
|
|
29
|
-
groupIndex,
|
|
30
|
-
derivationPath,
|
|
31
|
-
};
|
|
32
|
-
assertIsBip44Account(account);
|
|
33
|
-
return [account];
|
|
14
|
+
const createAccount = await this.getRestrictedSnapAccountCreator();
|
|
15
|
+
// Create account without any confirmation nor selecting it.
|
|
16
|
+
// TODO: Use the new keyring API `createAccounts` method with the "bip-44:derive-index"
|
|
17
|
+
// type once ready.
|
|
18
|
+
const derivationPath = `m/44'/501'/${groupIndex}'/0'`;
|
|
19
|
+
const account = await createAccount({
|
|
20
|
+
entropySource,
|
|
21
|
+
derivationPath,
|
|
34
22
|
});
|
|
23
|
+
// Solana Snap does not use BIP-44 typed options for the moment
|
|
24
|
+
// so we "inject" them (the `AccountsController` does a similar thing
|
|
25
|
+
// for the moment).
|
|
26
|
+
account.options.entropy = {
|
|
27
|
+
type: KeyringAccountEntropyTypeOption.Mnemonic,
|
|
28
|
+
id: entropySource,
|
|
29
|
+
groupIndex,
|
|
30
|
+
derivationPath,
|
|
31
|
+
};
|
|
32
|
+
const accounts = [account];
|
|
33
|
+
assertAreBip44Accounts(accounts);
|
|
34
|
+
return accounts;
|
|
35
35
|
}
|
|
36
36
|
async discoverAndCreateAccounts(_) {
|
|
37
37
|
return []; // TODO: Implement account discovery.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolAccountProvider.mjs","sourceRoot":"","sources":["../../src/providers/SolAccountProvider.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,+BAA+B,EAC/B,cAAc,EACf,8BAA8B;AAC/B,OAAO,EAAE,YAAY,EAAE,qCAAqC;AAK5D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"SolAccountProvider.mjs","sourceRoot":"","sources":["../../src/providers/SolAccountProvider.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,+BAA+B,EAC/B,cAAc,EACf,8BAA8B;AAC/B,OAAO,EAAE,YAAY,EAAE,qCAAqC;AAK5D,OAAO,EAAE,sBAAsB,EAAE,kCAA8B;AAC/D,OAAO,EAAE,mBAAmB,EAAE,kCAA8B;AAE5D,MAAM,OAAO,kBAAmB,SAAQ,mBAAmB;IAGzD,YAAY,SAA4C;QACtD,KAAK,CAAC,kBAAkB,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;IACtD,CAAC;IAED,mBAAmB,CAAC,OAAsC;QACxD,OAAO,CACL,OAAO,CAAC,IAAI,KAAK,cAAc,CAAC,WAAW;YAC3C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAM,YAAY,CAAC,IAAe,CAChE,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,EACnB,aAAa,EACb,UAAU,GAIX;QACC,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,+BAA+B,EAAE,CAAC;QAEnE,4DAA4D;QAC5D,uFAAuF;QACvF,mBAAmB;QACnB,MAAM,cAAc,GAAG,cAAc,UAAU,MAAM,CAAC;QACtD,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC;YAClC,aAAa;YACb,cAAc;SACf,CAAC,CAAC;QAEH,+DAA+D;QAC/D,qEAAqE;QACrE,mBAAmB;QACnB,OAAO,CAAC,OAAO,CAAC,OAAO,GAAG;YACxB,IAAI,EAAE,+BAA+B,CAAC,QAAQ;YAC9C,EAAE,EAAE,aAAa;YACjB,UAAU;YACV,cAAc;SACf,CAAC;QAEF,MAAM,QAAQ,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,sBAAsB,CAAC,QAAQ,CAAC,CAAC;QAEjC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,yBAAyB,CAAC,CAG/B;QACC,OAAO,EAAE,CAAC,CAAC,qCAAqC;IAClD,CAAC;;AApDM,iCAAc,GAAG,kCAA4C,CAAC","sourcesContent":["import { type Bip44Account } from '@metamask/account-api';\nimport type { EntropySourceId, KeyringAccount } from '@metamask/keyring-api';\nimport {\n KeyringAccountEntropyTypeOption,\n SolAccountType,\n} from '@metamask/keyring-api';\nimport { KeyringTypes } from '@metamask/keyring-controller';\nimport type { InternalAccount } from '@metamask/keyring-internal-api';\nimport type { SnapId } from '@metamask/snaps-sdk';\nimport type { MultichainAccountServiceMessenger } from 'src/types';\n\nimport { assertAreBip44Accounts } from './BaseAccountProvider';\nimport { SnapAccountProvider } from './SnapAccountProvider';\n\nexport class SolAccountProvider extends SnapAccountProvider {\n static SOLANA_SNAP_ID = 'npm:@metamask/solana-wallet-snap' as SnapId;\n\n constructor(messenger: MultichainAccountServiceMessenger) {\n super(SolAccountProvider.SOLANA_SNAP_ID, messenger);\n }\n\n isAccountCompatible(account: Bip44Account<InternalAccount>): boolean {\n return (\n account.type === SolAccountType.DataAccount &&\n account.metadata.keyring.type === (KeyringTypes.snap as string)\n );\n }\n\n async createAccounts({\n entropySource,\n groupIndex,\n }: {\n entropySource: EntropySourceId;\n groupIndex: number;\n }): Promise<Bip44Account<KeyringAccount>[]> {\n const createAccount = await this.getRestrictedSnapAccountCreator();\n\n // Create account without any confirmation nor selecting it.\n // TODO: Use the new keyring API `createAccounts` method with the \"bip-44:derive-index\"\n // type once ready.\n const derivationPath = `m/44'/501'/${groupIndex}'/0'`;\n const account = await createAccount({\n entropySource,\n derivationPath,\n });\n\n // Solana Snap does not use BIP-44 typed options for the moment\n // so we \"inject\" them (the `AccountsController` does a similar thing\n // for the moment).\n account.options.entropy = {\n type: KeyringAccountEntropyTypeOption.Mnemonic,\n id: entropySource,\n groupIndex,\n derivationPath,\n };\n\n const accounts = [account];\n assertAreBip44Accounts(accounts);\n\n return accounts;\n }\n\n async discoverAndCreateAccounts(_: {\n entropySource: EntropySourceId;\n groupIndex: number;\n }) {\n return []; // TODO: Implement account discovery.\n }\n}\n"]}
|
|
@@ -42,7 +42,7 @@ export declare const MOCK_SOL_ACCOUNT_1: Bip44Account<InternalAccount>;
|
|
|
42
42
|
export declare const MOCK_BTC_P2WPKH_ACCOUNT_1: Bip44Account<InternalAccount>;
|
|
43
43
|
export declare const MOCK_BTC_P2TR_ACCOUNT_1: Bip44Account<InternalAccount>;
|
|
44
44
|
export declare const MOCK_SNAP_ACCOUNT_1: Bip44Account<{
|
|
45
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
45
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
46
46
|
id: string;
|
|
47
47
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
48
48
|
entropy?: {
|
|
@@ -75,7 +75,7 @@ export declare const MOCK_SNAP_ACCOUNT_1: Bip44Account<{
|
|
|
75
75
|
}>;
|
|
76
76
|
export declare const MOCK_SNAP_ACCOUNT_2: InternalAccount;
|
|
77
77
|
export declare const MOCK_SNAP_ACCOUNT_3: Bip44Account<{
|
|
78
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
78
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
79
79
|
id: string;
|
|
80
80
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
81
81
|
entropy?: {
|
|
@@ -107,7 +107,7 @@ export declare const MOCK_SNAP_ACCOUNT_3: Bip44Account<{
|
|
|
107
107
|
methods: string[];
|
|
108
108
|
}>;
|
|
109
109
|
export declare const MOCK_SNAP_ACCOUNT_4: Bip44Account<{
|
|
110
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
110
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
111
111
|
id: string;
|
|
112
112
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
113
113
|
entropy?: {
|
|
@@ -152,7 +152,7 @@ export declare class MockAccountBuilder<Account extends KeyringAccount> {
|
|
|
152
152
|
}
|
|
153
153
|
export declare const MOCK_WALLET_1_ENTROPY_SOURCE = "mock-keyring-id-1";
|
|
154
154
|
export declare const MOCK_WALLET_1_EVM_ACCOUNT: Bip44Account<{
|
|
155
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
155
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
156
156
|
id: string;
|
|
157
157
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
158
158
|
entropy?: {
|
|
@@ -184,7 +184,7 @@ export declare const MOCK_WALLET_1_EVM_ACCOUNT: Bip44Account<{
|
|
|
184
184
|
methods: string[];
|
|
185
185
|
}>;
|
|
186
186
|
export declare const MOCK_WALLET_1_SOL_ACCOUNT: Bip44Account<{
|
|
187
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
187
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
188
188
|
id: string;
|
|
189
189
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
190
190
|
entropy?: {
|
|
@@ -216,7 +216,7 @@ export declare const MOCK_WALLET_1_SOL_ACCOUNT: Bip44Account<{
|
|
|
216
216
|
methods: string[];
|
|
217
217
|
}>;
|
|
218
218
|
export declare const MOCK_WALLET_1_BTC_P2WPKH_ACCOUNT: Bip44Account<{
|
|
219
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
219
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
220
220
|
id: string;
|
|
221
221
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
222
222
|
entropy?: {
|
|
@@ -248,7 +248,7 @@ export declare const MOCK_WALLET_1_BTC_P2WPKH_ACCOUNT: Bip44Account<{
|
|
|
248
248
|
methods: string[];
|
|
249
249
|
}>;
|
|
250
250
|
export declare const MOCK_WALLET_1_BTC_P2TR_ACCOUNT: Bip44Account<{
|
|
251
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
251
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
252
252
|
id: string;
|
|
253
253
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
254
254
|
entropy?: {
|
|
@@ -42,7 +42,7 @@ export declare const MOCK_SOL_ACCOUNT_1: Bip44Account<InternalAccount>;
|
|
|
42
42
|
export declare const MOCK_BTC_P2WPKH_ACCOUNT_1: Bip44Account<InternalAccount>;
|
|
43
43
|
export declare const MOCK_BTC_P2TR_ACCOUNT_1: Bip44Account<InternalAccount>;
|
|
44
44
|
export declare const MOCK_SNAP_ACCOUNT_1: Bip44Account<{
|
|
45
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
45
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
46
46
|
id: string;
|
|
47
47
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
48
48
|
entropy?: {
|
|
@@ -75,7 +75,7 @@ export declare const MOCK_SNAP_ACCOUNT_1: Bip44Account<{
|
|
|
75
75
|
}>;
|
|
76
76
|
export declare const MOCK_SNAP_ACCOUNT_2: InternalAccount;
|
|
77
77
|
export declare const MOCK_SNAP_ACCOUNT_3: Bip44Account<{
|
|
78
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
78
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
79
79
|
id: string;
|
|
80
80
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
81
81
|
entropy?: {
|
|
@@ -107,7 +107,7 @@ export declare const MOCK_SNAP_ACCOUNT_3: Bip44Account<{
|
|
|
107
107
|
methods: string[];
|
|
108
108
|
}>;
|
|
109
109
|
export declare const MOCK_SNAP_ACCOUNT_4: Bip44Account<{
|
|
110
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
110
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
111
111
|
id: string;
|
|
112
112
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
113
113
|
entropy?: {
|
|
@@ -152,7 +152,7 @@ export declare class MockAccountBuilder<Account extends KeyringAccount> {
|
|
|
152
152
|
}
|
|
153
153
|
export declare const MOCK_WALLET_1_ENTROPY_SOURCE = "mock-keyring-id-1";
|
|
154
154
|
export declare const MOCK_WALLET_1_EVM_ACCOUNT: Bip44Account<{
|
|
155
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
155
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
156
156
|
id: string;
|
|
157
157
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
158
158
|
entropy?: {
|
|
@@ -184,7 +184,7 @@ export declare const MOCK_WALLET_1_EVM_ACCOUNT: Bip44Account<{
|
|
|
184
184
|
methods: string[];
|
|
185
185
|
}>;
|
|
186
186
|
export declare const MOCK_WALLET_1_SOL_ACCOUNT: Bip44Account<{
|
|
187
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
187
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
188
188
|
id: string;
|
|
189
189
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
190
190
|
entropy?: {
|
|
@@ -216,7 +216,7 @@ export declare const MOCK_WALLET_1_SOL_ACCOUNT: Bip44Account<{
|
|
|
216
216
|
methods: string[];
|
|
217
217
|
}>;
|
|
218
218
|
export declare const MOCK_WALLET_1_BTC_P2WPKH_ACCOUNT: Bip44Account<{
|
|
219
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
219
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
220
220
|
id: string;
|
|
221
221
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
222
222
|
entropy?: {
|
|
@@ -248,7 +248,7 @@ export declare const MOCK_WALLET_1_BTC_P2WPKH_ACCOUNT: Bip44Account<{
|
|
|
248
248
|
methods: string[];
|
|
249
249
|
}>;
|
|
250
250
|
export declare const MOCK_WALLET_1_BTC_P2TR_ACCOUNT: Bip44Account<{
|
|
251
|
-
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "any:account";
|
|
251
|
+
type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
|
|
252
252
|
id: string;
|
|
253
253
|
options: Record<string, import("@metamask/utils").Json> & {
|
|
254
254
|
entropy?: {
|
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n AccountsControllerAccountAddedEvent,\n AccountsControllerAccountRemovedEvent,\n AccountsControllerGetAccountAction,\n AccountsControllerGetAccountByAddressAction,\n AccountsControllerListMultichainAccountsAction,\n} from '@metamask/accounts-controller';\nimport type { RestrictedMessenger } from '@metamask/base-controller';\nimport type {\n KeyringControllerGetStateAction,\n KeyringControllerStateChangeEvent,\n KeyringControllerWithKeyringAction,\n} from '@metamask/keyring-controller';\nimport type { HandleSnapRequest as SnapControllerHandleSnapRequestAction } from '@metamask/snaps-controllers';\n\nimport type {\n MultichainAccountService,\n serviceName,\n} from './MultichainAccountService';\n\nexport type MultichainAccountServiceGetMultichainAccountGroupAction = {\n type: `${typeof serviceName}:getMultichainAccountGroup`;\n handler: MultichainAccountService['getMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountGroupsAction = {\n type: `${typeof serviceName}:getMultichainAccountGroups`;\n handler: MultichainAccountService['getMultichainAccountGroups'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountWalletAction = {\n type: `${typeof serviceName}:getMultichainAccountWallet`;\n handler: MultichainAccountService['getMultichainAccountWallet'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountWalletsAction = {\n type: `${typeof serviceName}:getMultichainAccountWallets`;\n handler: MultichainAccountService['getMultichainAccountWallets'];\n};\n\nexport type MultichainAccountServiceCreateNextMultichainAccountGroupAction = {\n type: `${typeof serviceName}:createNextMultichainAccountGroup`;\n handler: MultichainAccountService['createNextMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceCreateMultichainAccountGroupAction = {\n type: `${typeof serviceName}:createMultichainAccountGroup`;\n handler: MultichainAccountService['createMultichainAccountGroup'];\n};\n\n/**\n * All actions that {@link MultichainAccountService} registers so that other\n * modules can call them.\n */\nexport type MultichainAccountServiceActions =\n | MultichainAccountServiceGetMultichainAccountGroupAction\n | MultichainAccountServiceGetMultichainAccountGroupsAction\n | MultichainAccountServiceGetMultichainAccountWalletAction\n | MultichainAccountServiceGetMultichainAccountWalletsAction\n | MultichainAccountServiceCreateNextMultichainAccountGroupAction\n | MultichainAccountServiceCreateMultichainAccountGroupAction;\n\n/**\n * All events that {@link MultichainAccountService} publishes so that other modules\n * can subscribe to them.\n */\nexport type MultichainAccountServiceEvents = never;\n\n/**\n * All actions registered by other modules that {@link MultichainAccountService}\n * calls.\n */\nexport type AllowedActions =\n | AccountsControllerListMultichainAccountsAction\n | AccountsControllerGetAccountAction\n | AccountsControllerGetAccountByAddressAction\n | SnapControllerHandleSnapRequestAction\n | KeyringControllerWithKeyringAction\n | KeyringControllerGetStateAction;\n\n/**\n * All events published by other modules that {@link MultichainAccountService}\n * subscribes to.\n */\nexport type AllowedEvents =\n | KeyringControllerStateChangeEvent\n | AccountsControllerAccountAddedEvent\n | AccountsControllerAccountRemovedEvent;\n\n/**\n * The messenger restricted to actions and events that\n * {@link MultichainAccountService} needs to access.\n */\nexport type MultichainAccountServiceMessenger = RestrictedMessenger<\n 'MultichainAccountService',\n MultichainAccountServiceActions | AllowedActions,\n MultichainAccountServiceEvents | AllowedEvents,\n AllowedActions['type'],\n AllowedEvents['type']\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n AccountsControllerAccountAddedEvent,\n AccountsControllerAccountRemovedEvent,\n AccountsControllerGetAccountAction,\n AccountsControllerGetAccountByAddressAction,\n AccountsControllerListMultichainAccountsAction,\n} from '@metamask/accounts-controller';\nimport type { RestrictedMessenger } from '@metamask/base-controller';\nimport type {\n KeyringControllerGetStateAction,\n KeyringControllerStateChangeEvent,\n KeyringControllerWithKeyringAction,\n} from '@metamask/keyring-controller';\nimport type { HandleSnapRequest as SnapControllerHandleSnapRequestAction } from '@metamask/snaps-controllers';\n\nimport type {\n MultichainAccountService,\n serviceName,\n} from './MultichainAccountService';\n\nexport type MultichainAccountServiceGetMultichainAccountGroupAction = {\n type: `${typeof serviceName}:getMultichainAccountGroup`;\n handler: MultichainAccountService['getMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountGroupsAction = {\n type: `${typeof serviceName}:getMultichainAccountGroups`;\n handler: MultichainAccountService['getMultichainAccountGroups'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountWalletAction = {\n type: `${typeof serviceName}:getMultichainAccountWallet`;\n handler: MultichainAccountService['getMultichainAccountWallet'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountWalletsAction = {\n type: `${typeof serviceName}:getMultichainAccountWallets`;\n handler: MultichainAccountService['getMultichainAccountWallets'];\n};\n\nexport type MultichainAccountServiceCreateNextMultichainAccountGroupAction = {\n type: `${typeof serviceName}:createNextMultichainAccountGroup`;\n handler: MultichainAccountService['createNextMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceCreateMultichainAccountGroupAction = {\n type: `${typeof serviceName}:createMultichainAccountGroup`;\n handler: MultichainAccountService['createMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceAlignWalletAction = {\n type: `${typeof serviceName}:alignWallet`;\n handler: MultichainAccountService['alignWallet'];\n};\n\nexport type MultichainAccountServiceAlignWalletsAction = {\n type: `${typeof serviceName}:alignWallets`;\n handler: MultichainAccountService['alignWallets'];\n};\n\n/**\n * All actions that {@link MultichainAccountService} registers so that other\n * modules can call them.\n */\nexport type MultichainAccountServiceActions =\n | MultichainAccountServiceGetMultichainAccountGroupAction\n | MultichainAccountServiceGetMultichainAccountGroupsAction\n | MultichainAccountServiceGetMultichainAccountWalletAction\n | MultichainAccountServiceGetMultichainAccountWalletsAction\n | MultichainAccountServiceCreateNextMultichainAccountGroupAction\n | MultichainAccountServiceCreateMultichainAccountGroupAction\n | MultichainAccountServiceAlignWalletAction\n | MultichainAccountServiceAlignWalletsAction;\n\n/**\n * All events that {@link MultichainAccountService} publishes so that other modules\n * can subscribe to them.\n */\nexport type MultichainAccountServiceEvents = never;\n\n/**\n * All actions registered by other modules that {@link MultichainAccountService}\n * calls.\n */\nexport type AllowedActions =\n | AccountsControllerListMultichainAccountsAction\n | AccountsControllerGetAccountAction\n | AccountsControllerGetAccountByAddressAction\n | SnapControllerHandleSnapRequestAction\n | KeyringControllerWithKeyringAction\n | KeyringControllerGetStateAction;\n\n/**\n * All events published by other modules that {@link MultichainAccountService}\n * subscribes to.\n */\nexport type AllowedEvents =\n | KeyringControllerStateChangeEvent\n | AccountsControllerAccountAddedEvent\n | AccountsControllerAccountRemovedEvent;\n\n/**\n * The messenger restricted to actions and events that\n * {@link MultichainAccountService} needs to access.\n */\nexport type MultichainAccountServiceMessenger = RestrictedMessenger<\n 'MultichainAccountService',\n MultichainAccountServiceActions | AllowedActions,\n MultichainAccountServiceEvents | AllowedEvents,\n AllowedActions['type'],\n AllowedEvents['type']\n>;\n"]}
|
package/dist/types.d.cts
CHANGED
|
@@ -27,11 +27,19 @@ export type MultichainAccountServiceCreateMultichainAccountGroupAction = {
|
|
|
27
27
|
type: `${typeof serviceName}:createMultichainAccountGroup`;
|
|
28
28
|
handler: MultichainAccountService['createMultichainAccountGroup'];
|
|
29
29
|
};
|
|
30
|
+
export type MultichainAccountServiceAlignWalletAction = {
|
|
31
|
+
type: `${typeof serviceName}:alignWallet`;
|
|
32
|
+
handler: MultichainAccountService['alignWallet'];
|
|
33
|
+
};
|
|
34
|
+
export type MultichainAccountServiceAlignWalletsAction = {
|
|
35
|
+
type: `${typeof serviceName}:alignWallets`;
|
|
36
|
+
handler: MultichainAccountService['alignWallets'];
|
|
37
|
+
};
|
|
30
38
|
/**
|
|
31
39
|
* All actions that {@link MultichainAccountService} registers so that other
|
|
32
40
|
* modules can call them.
|
|
33
41
|
*/
|
|
34
|
-
export type MultichainAccountServiceActions = MultichainAccountServiceGetMultichainAccountGroupAction | MultichainAccountServiceGetMultichainAccountGroupsAction | MultichainAccountServiceGetMultichainAccountWalletAction | MultichainAccountServiceGetMultichainAccountWalletsAction | MultichainAccountServiceCreateNextMultichainAccountGroupAction | MultichainAccountServiceCreateMultichainAccountGroupAction;
|
|
42
|
+
export type MultichainAccountServiceActions = MultichainAccountServiceGetMultichainAccountGroupAction | MultichainAccountServiceGetMultichainAccountGroupsAction | MultichainAccountServiceGetMultichainAccountWalletAction | MultichainAccountServiceGetMultichainAccountWalletsAction | MultichainAccountServiceCreateNextMultichainAccountGroupAction | MultichainAccountServiceCreateMultichainAccountGroupAction | MultichainAccountServiceAlignWalletAction | MultichainAccountServiceAlignWalletsAction;
|
|
35
43
|
/**
|
|
36
44
|
* All events that {@link MultichainAccountService} publishes so that other modules
|
|
37
45
|
* can subscribe to them.
|
package/dist/types.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mCAAmC,EACnC,qCAAqC,EACr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C,kCAAkC,CAAC,CAAC;CACvE,CAAC;AAEF,MAAM,MAAM,0DAA0D,GAAG;IACvE,IAAI,EAAE,GAAG,OAAO,WAAW,+BAA+B,CAAC;IAC3D,OAAO,EAAE,wBAAwB,CAAC,8BAA8B,CAAC,CAAC;CACnE,CAAC;AAEF,MAAM,MAAM,yCAAyC,GAAG;IACtD,IAAI,EAAE,GAAG,OAAO,WAAW,cAAc,CAAC;IAC1C,OAAO,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,0CAA0C,GAAG;IACvD,IAAI,EAAE,GAAG,OAAO,WAAW,eAAe,CAAC;IAC3C,OAAO,EAAE,wBAAwB,CAAC,cAAc,CAAC,CAAC;CACnD,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GACvC,uDAAuD,GACvD,wDAAwD,GACxD,wDAAwD,GACxD,yDAAyD,GACzD,8DAA8D,GAC9D,0DAA0D,GAC1D,yCAAyC,GACzC,0CAA0C,CAAC;AAE/C;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,8CAA8C,GAC9C,kCAAkC,GAClC,2CAA2C,GAC3C,qCAAqC,GACrC,kCAAkC,GAClC,+BAA+B,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,aAAa,GACrB,iCAAiC,GACjC,mCAAmC,GACnC,qCAAqC,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,iCAAiC,GAAG,mBAAmB,CACjE,0BAA0B,EAC1B,+BAA+B,GAAG,cAAc,EAChD,8BAA8B,GAAG,aAAa,EAC9C,cAAc,CAAC,MAAM,CAAC,EACtB,aAAa,CAAC,MAAM,CAAC,CACtB,CAAC"}
|
package/dist/types.d.mts
CHANGED
|
@@ -27,11 +27,19 @@ export type MultichainAccountServiceCreateMultichainAccountGroupAction = {
|
|
|
27
27
|
type: `${typeof serviceName}:createMultichainAccountGroup`;
|
|
28
28
|
handler: MultichainAccountService['createMultichainAccountGroup'];
|
|
29
29
|
};
|
|
30
|
+
export type MultichainAccountServiceAlignWalletAction = {
|
|
31
|
+
type: `${typeof serviceName}:alignWallet`;
|
|
32
|
+
handler: MultichainAccountService['alignWallet'];
|
|
33
|
+
};
|
|
34
|
+
export type MultichainAccountServiceAlignWalletsAction = {
|
|
35
|
+
type: `${typeof serviceName}:alignWallets`;
|
|
36
|
+
handler: MultichainAccountService['alignWallets'];
|
|
37
|
+
};
|
|
30
38
|
/**
|
|
31
39
|
* All actions that {@link MultichainAccountService} registers so that other
|
|
32
40
|
* modules can call them.
|
|
33
41
|
*/
|
|
34
|
-
export type MultichainAccountServiceActions = MultichainAccountServiceGetMultichainAccountGroupAction | MultichainAccountServiceGetMultichainAccountGroupsAction | MultichainAccountServiceGetMultichainAccountWalletAction | MultichainAccountServiceGetMultichainAccountWalletsAction | MultichainAccountServiceCreateNextMultichainAccountGroupAction | MultichainAccountServiceCreateMultichainAccountGroupAction;
|
|
42
|
+
export type MultichainAccountServiceActions = MultichainAccountServiceGetMultichainAccountGroupAction | MultichainAccountServiceGetMultichainAccountGroupsAction | MultichainAccountServiceGetMultichainAccountWalletAction | MultichainAccountServiceGetMultichainAccountWalletsAction | MultichainAccountServiceCreateNextMultichainAccountGroupAction | MultichainAccountServiceCreateMultichainAccountGroupAction | MultichainAccountServiceAlignWalletAction | MultichainAccountServiceAlignWalletsAction;
|
|
35
43
|
/**
|
|
36
44
|
* All events that {@link MultichainAccountService} publishes so that other modules
|
|
37
45
|
* can subscribe to them.
|
package/dist/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mCAAmC,EACnC,qCAAqC,EACrC,kCAAkC,EAClC,2CAA2C,EAC3C,8CAA8C,EAC/C,sCAAsC;AACvC,OAAO,KAAK,EAA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,EAAE,GAAG,OAAO,WAAW,+BAA+B,CAAC;IAC3D,OAAO,EAAE,wBAAwB,CAAC,8BAA8B,CAAC,CAAC;CACnE,CAAC;AAEF,MAAM,MAAM,yCAAyC,GAAG;IACtD,IAAI,EAAE,GAAG,OAAO,WAAW,cAAc,CAAC;IAC1C,OAAO,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,0CAA0C,GAAG;IACvD,IAAI,EAAE,GAAG,OAAO,WAAW,eAAe,CAAC;IAC3C,OAAO,EAAE,wBAAwB,CAAC,cAAc,CAAC,CAAC;CACnD,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GACvC,uDAAuD,GACvD,wDAAwD,GACxD,wDAAwD,GACxD,yDAAyD,GACzD,8DAA8D,GAC9D,0DAA0D,GAC1D,yCAAyC,GACzC,0CAA0C,CAAC;AAE/C;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,8CAA8C,GAC9C,kCAAkC,GAClC,2CAA2C,GAC3C,qCAAqC,GACrC,kCAAkC,GAClC,+BAA+B,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,aAAa,GACrB,iCAAiC,GACjC,mCAAmC,GACnC,qCAAqC,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,iCAAiC,GAAG,mBAAmB,CACjE,0BAA0B,EAC1B,+BAA+B,GAAG,cAAc,EAChD,8BAA8B,GAAG,aAAa,EAC9C,cAAc,CAAC,MAAM,CAAC,EACtB,aAAa,CAAC,MAAM,CAAC,CACtB,CAAC"}
|
package/dist/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n AccountsControllerAccountAddedEvent,\n AccountsControllerAccountRemovedEvent,\n AccountsControllerGetAccountAction,\n AccountsControllerGetAccountByAddressAction,\n AccountsControllerListMultichainAccountsAction,\n} from '@metamask/accounts-controller';\nimport type { RestrictedMessenger } from '@metamask/base-controller';\nimport type {\n KeyringControllerGetStateAction,\n KeyringControllerStateChangeEvent,\n KeyringControllerWithKeyringAction,\n} from '@metamask/keyring-controller';\nimport type { HandleSnapRequest as SnapControllerHandleSnapRequestAction } from '@metamask/snaps-controllers';\n\nimport type {\n MultichainAccountService,\n serviceName,\n} from './MultichainAccountService';\n\nexport type MultichainAccountServiceGetMultichainAccountGroupAction = {\n type: `${typeof serviceName}:getMultichainAccountGroup`;\n handler: MultichainAccountService['getMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountGroupsAction = {\n type: `${typeof serviceName}:getMultichainAccountGroups`;\n handler: MultichainAccountService['getMultichainAccountGroups'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountWalletAction = {\n type: `${typeof serviceName}:getMultichainAccountWallet`;\n handler: MultichainAccountService['getMultichainAccountWallet'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountWalletsAction = {\n type: `${typeof serviceName}:getMultichainAccountWallets`;\n handler: MultichainAccountService['getMultichainAccountWallets'];\n};\n\nexport type MultichainAccountServiceCreateNextMultichainAccountGroupAction = {\n type: `${typeof serviceName}:createNextMultichainAccountGroup`;\n handler: MultichainAccountService['createNextMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceCreateMultichainAccountGroupAction = {\n type: `${typeof serviceName}:createMultichainAccountGroup`;\n handler: MultichainAccountService['createMultichainAccountGroup'];\n};\n\n/**\n * All actions that {@link MultichainAccountService} registers so that other\n * modules can call them.\n */\nexport type MultichainAccountServiceActions =\n | MultichainAccountServiceGetMultichainAccountGroupAction\n | MultichainAccountServiceGetMultichainAccountGroupsAction\n | MultichainAccountServiceGetMultichainAccountWalletAction\n | MultichainAccountServiceGetMultichainAccountWalletsAction\n | MultichainAccountServiceCreateNextMultichainAccountGroupAction\n | MultichainAccountServiceCreateMultichainAccountGroupAction;\n\n/**\n * All events that {@link MultichainAccountService} publishes so that other modules\n * can subscribe to them.\n */\nexport type MultichainAccountServiceEvents = never;\n\n/**\n * All actions registered by other modules that {@link MultichainAccountService}\n * calls.\n */\nexport type AllowedActions =\n | AccountsControllerListMultichainAccountsAction\n | AccountsControllerGetAccountAction\n | AccountsControllerGetAccountByAddressAction\n | SnapControllerHandleSnapRequestAction\n | KeyringControllerWithKeyringAction\n | KeyringControllerGetStateAction;\n\n/**\n * All events published by other modules that {@link MultichainAccountService}\n * subscribes to.\n */\nexport type AllowedEvents =\n | KeyringControllerStateChangeEvent\n | AccountsControllerAccountAddedEvent\n | AccountsControllerAccountRemovedEvent;\n\n/**\n * The messenger restricted to actions and events that\n * {@link MultichainAccountService} needs to access.\n */\nexport type MultichainAccountServiceMessenger = RestrictedMessenger<\n 'MultichainAccountService',\n MultichainAccountServiceActions | AllowedActions,\n MultichainAccountServiceEvents | AllowedEvents,\n AllowedActions['type'],\n AllowedEvents['type']\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n AccountsControllerAccountAddedEvent,\n AccountsControllerAccountRemovedEvent,\n AccountsControllerGetAccountAction,\n AccountsControllerGetAccountByAddressAction,\n AccountsControllerListMultichainAccountsAction,\n} from '@metamask/accounts-controller';\nimport type { RestrictedMessenger } from '@metamask/base-controller';\nimport type {\n KeyringControllerGetStateAction,\n KeyringControllerStateChangeEvent,\n KeyringControllerWithKeyringAction,\n} from '@metamask/keyring-controller';\nimport type { HandleSnapRequest as SnapControllerHandleSnapRequestAction } from '@metamask/snaps-controllers';\n\nimport type {\n MultichainAccountService,\n serviceName,\n} from './MultichainAccountService';\n\nexport type MultichainAccountServiceGetMultichainAccountGroupAction = {\n type: `${typeof serviceName}:getMultichainAccountGroup`;\n handler: MultichainAccountService['getMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountGroupsAction = {\n type: `${typeof serviceName}:getMultichainAccountGroups`;\n handler: MultichainAccountService['getMultichainAccountGroups'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountWalletAction = {\n type: `${typeof serviceName}:getMultichainAccountWallet`;\n handler: MultichainAccountService['getMultichainAccountWallet'];\n};\n\nexport type MultichainAccountServiceGetMultichainAccountWalletsAction = {\n type: `${typeof serviceName}:getMultichainAccountWallets`;\n handler: MultichainAccountService['getMultichainAccountWallets'];\n};\n\nexport type MultichainAccountServiceCreateNextMultichainAccountGroupAction = {\n type: `${typeof serviceName}:createNextMultichainAccountGroup`;\n handler: MultichainAccountService['createNextMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceCreateMultichainAccountGroupAction = {\n type: `${typeof serviceName}:createMultichainAccountGroup`;\n handler: MultichainAccountService['createMultichainAccountGroup'];\n};\n\nexport type MultichainAccountServiceAlignWalletAction = {\n type: `${typeof serviceName}:alignWallet`;\n handler: MultichainAccountService['alignWallet'];\n};\n\nexport type MultichainAccountServiceAlignWalletsAction = {\n type: `${typeof serviceName}:alignWallets`;\n handler: MultichainAccountService['alignWallets'];\n};\n\n/**\n * All actions that {@link MultichainAccountService} registers so that other\n * modules can call them.\n */\nexport type MultichainAccountServiceActions =\n | MultichainAccountServiceGetMultichainAccountGroupAction\n | MultichainAccountServiceGetMultichainAccountGroupsAction\n | MultichainAccountServiceGetMultichainAccountWalletAction\n | MultichainAccountServiceGetMultichainAccountWalletsAction\n | MultichainAccountServiceCreateNextMultichainAccountGroupAction\n | MultichainAccountServiceCreateMultichainAccountGroupAction\n | MultichainAccountServiceAlignWalletAction\n | MultichainAccountServiceAlignWalletsAction;\n\n/**\n * All events that {@link MultichainAccountService} publishes so that other modules\n * can subscribe to them.\n */\nexport type MultichainAccountServiceEvents = never;\n\n/**\n * All actions registered by other modules that {@link MultichainAccountService}\n * calls.\n */\nexport type AllowedActions =\n | AccountsControllerListMultichainAccountsAction\n | AccountsControllerGetAccountAction\n | AccountsControllerGetAccountByAddressAction\n | SnapControllerHandleSnapRequestAction\n | KeyringControllerWithKeyringAction\n | KeyringControllerGetStateAction;\n\n/**\n * All events published by other modules that {@link MultichainAccountService}\n * subscribes to.\n */\nexport type AllowedEvents =\n | KeyringControllerStateChangeEvent\n | AccountsControllerAccountAddedEvent\n | AccountsControllerAccountRemovedEvent;\n\n/**\n * The messenger restricted to actions and events that\n * {@link MultichainAccountService} needs to access.\n */\nexport type MultichainAccountServiceMessenger = RestrictedMessenger<\n 'MultichainAccountService',\n MultichainAccountServiceActions | AllowedActions,\n MultichainAccountServiceEvents | AllowedEvents,\n AllowedActions['type'],\n AllowedEvents['type']\n>;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/multichain-account-service",
|
|
3
|
-
"version": "0.4.0-preview-
|
|
3
|
+
"version": "0.4.0-preview-7b6467c",
|
|
4
4
|
"description": "Service to manage multichain accounts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@metamask/base-controller": "^8.1.0",
|
|
51
|
-
"@metamask/eth-snap-keyring": "^16.
|
|
52
|
-
"@metamask/keyring-api": "^20.
|
|
53
|
-
"@metamask/keyring-internal-api": "^8.
|
|
51
|
+
"@metamask/eth-snap-keyring": "^16.1.0",
|
|
52
|
+
"@metamask/keyring-api": "^20.1.0",
|
|
53
|
+
"@metamask/keyring-internal-api": "^8.1.0",
|
|
54
54
|
"@metamask/keyring-snap-client": "^7.0.0",
|
|
55
55
|
"@metamask/keyring-utils": "^3.1.0",
|
|
56
56
|
"@metamask/snaps-sdk": "^9.0.0",
|