@reown/appkit-controllers 1.8.15-e95f0d61c614677233e13ea9f055d3f75fcdba81.0 → 1.8.15-viem-upgrade.0
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/esm/src/controllers/ConnectorController.js +5 -2
- package/dist/esm/src/controllers/ConnectorController.js.map +1 -1
- package/dist/esm/src/controllers/TransactionsController.js +1 -1
- package/dist/esm/src/controllers/TransactionsController.js.map +1 -1
- package/dist/esm/src/utils/ConnectorUtil.js +27 -0
- package/dist/esm/src/utils/ConnectorUtil.js.map +1 -1
- package/dist/esm/src/utils/ConstantsUtil.js +4 -1
- package/dist/esm/src/utils/ConstantsUtil.js.map +1 -1
- package/dist/esm/tests/utils/ConnectorUtil.test.js +83 -0
- package/dist/esm/tests/utils/ConnectorUtil.test.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/controllers/ConnectorController.d.ts +2 -2
- package/dist/types/src/controllers/OptionsController.d.ts +1 -1
- package/dist/types/src/utils/ChainControllerUtil.d.ts +1 -1
- package/dist/types/src/utils/ConnectorUtil.d.ts +16 -0
- package/dist/types/src/utils/ConstantsUtil.d.ts +1 -1
- package/dist/types/src/utils/ViemUtil.d.ts +367 -14
- package/dist/types/tests/utils/ConnectorUtil.test.d.ts +1 -0
- package/package.json +6 -6
|
@@ -29,11 +29,11 @@ export declare const ConnectorController: {
|
|
|
29
29
|
addConnector(connector: Connector | AuthConnector): void;
|
|
30
30
|
getAuthConnector(chainNamespace?: ChainNamespace): AuthConnector | undefined;
|
|
31
31
|
getAnnouncedConnectorRdns(): (string | undefined)[];
|
|
32
|
-
getConnectorById(id: string):
|
|
32
|
+
getConnectorById(id: string): ConnectorWithProviders | undefined;
|
|
33
33
|
getConnector({ id, namespace }: {
|
|
34
34
|
id: string;
|
|
35
35
|
namespace: ChainNamespace;
|
|
36
|
-
}):
|
|
36
|
+
}): ConnectorWithProviders | undefined;
|
|
37
37
|
syncIfAuthConnector(connector: Connector | AuthConnector): void;
|
|
38
38
|
/**
|
|
39
39
|
* Returns the connectors filtered by namespace.
|
|
@@ -1726,7 +1726,7 @@ export declare const OptionsController: {
|
|
|
1726
1726
|
*/
|
|
1727
1727
|
| undefined;
|
|
1728
1728
|
readonly defaultAccountTypes: {
|
|
1729
|
-
readonly eip155?: "
|
|
1729
|
+
readonly eip155?: "smartAccount" | "eoa" | undefined;
|
|
1730
1730
|
readonly solana?: "eoa" | undefined;
|
|
1731
1731
|
readonly bip122?: "payment" | "ordinal" | "stx" | undefined;
|
|
1732
1732
|
readonly polkadot?: "eoa" | undefined;
|
|
@@ -17,7 +17,7 @@ export declare function getActiveNetworkTokenAddress(): string;
|
|
|
17
17
|
* @param namespace - The namespace of the account
|
|
18
18
|
* @returns The preferred account type
|
|
19
19
|
*/
|
|
20
|
-
export declare function getPreferredAccountType(namespace: ChainNamespace | undefined): "
|
|
20
|
+
export declare function getPreferredAccountType(namespace: ChainNamespace | undefined): "payment" | "ordinal" | "stx" | "smartAccount" | "eoa" | undefined;
|
|
21
21
|
/**
|
|
22
22
|
* Get the active CAIP network for a given chain namespace, if no namespace is provided, it returns the active CAIP network
|
|
23
23
|
* @param chainNamespace - The chain namespace to get the active CAIP network for
|
|
@@ -33,6 +33,22 @@ export declare const ConnectorUtil: {
|
|
|
33
33
|
*/
|
|
34
34
|
getConnectorTypeOrder({ recommended, featured, custom, recent, announced, injected, multiChain, external, overriddenConnectors }: GetConnectorTypeOrderParameters): string[];
|
|
35
35
|
sortConnectorsByExplorerWallet(connectors: ConnectorWithProviders[]): ConnectorWithProviders[];
|
|
36
|
+
/**
|
|
37
|
+
* Returns the priority of a connector. Base Account has highest priority, followed by Coinbase then the rest.
|
|
38
|
+
*
|
|
39
|
+
* This is needed because Base Account and Coinbase share the same explorer wallet ID.
|
|
40
|
+
* Without prioritization, selecting Base Account could incorrectly trigger the Coinbase Wallet extension.
|
|
41
|
+
*
|
|
42
|
+
* @param connector - The connector to get the priority of.
|
|
43
|
+
* @returns The priority of the connector.
|
|
44
|
+
*/
|
|
45
|
+
getPriority(connector: ConnectorWithProviders): 1 | 0 | 2;
|
|
46
|
+
/**
|
|
47
|
+
* Sorts connectors by priority.
|
|
48
|
+
* @param connectors - The connectors to sort.
|
|
49
|
+
* @returns Sorted connectors.
|
|
50
|
+
*/
|
|
51
|
+
sortConnectorsByPriority(connectors: ConnectorWithProviders[]): ConnectorWithProviders[];
|
|
36
52
|
getAuthName({ email, socialUsername, socialProvider }: {
|
|
37
53
|
email: string;
|
|
38
54
|
socialUsername?: string | null;
|
|
@@ -76,7 +76,7 @@ export declare const ConstantsUtil: {
|
|
|
76
76
|
receive: true;
|
|
77
77
|
send: true;
|
|
78
78
|
emailShowWallets: true;
|
|
79
|
-
connectorTypeOrder: ("
|
|
79
|
+
connectorTypeOrder: ("walletConnect" | "recent" | "injected" | "featured" | "custom" | "external" | "recommended")[];
|
|
80
80
|
analytics: true;
|
|
81
81
|
allWallets: true;
|
|
82
82
|
legalCheckbox: false;
|