@reown/appkit-controllers
Version:
#### 🔗 [Website](https://reown.com/appkit)
41 lines (40 loc) • 1.64 kB
TypeScript
import { type ChainNamespace } from '@reown/appkit-common';
import type { Connection } from '@reown/appkit-common';
interface ExcludeConnectorAddressFromConnectionsParamters {
connections: Connection[];
connectorId?: string;
addresses?: string[];
}
interface ValidateAccountSwitchParamters {
namespace: ChainNamespace;
connection: Connection;
address?: string;
}
export declare const ConnectionControllerUtil: {
getConnectionStatus(connection: Connection, namespace: ChainNamespace): "connected" | "disconnected" | "active";
validateAccountSwitch({ namespace, connection, address }: ValidateAccountSwitchParamters): void;
excludeConnectorAddressFromConnections({ connections, connectorId, addresses }: ExcludeConnectorAddressFromConnectionsParamters): Connection[];
excludeExistingConnections(connectorIds: string[], newConnections: Connection[]): Connection[];
getConnectionsByConnectorId(connections: Connection[], connectorId: string): Connection[];
filterConnectionsByAccountType(connections: Connection[], accountType: string): {
accounts: {
type?: string;
address: string;
}[];
name?: string;
icon?: string;
recent?: boolean;
networkIcon?: string;
caipNetwork?: import("@reown/appkit-common").CaipNetwork;
connectorId: string;
auth?: {
name: string | undefined;
username: string | undefined;
};
}[];
getConnectionsData(namespace: ChainNamespace): {
connections: Connection[];
recentConnections: Connection[];
};
};
export {};