@web3auth/wallet-connect-v2-adapter
Version:
wallet connect v2 adapter for web3auth
36 lines (35 loc) • 1.77 kB
TypeScript
import type { EngineTypes, ProposalTypes } from "@walletconnect/types";
import { ChainNamespaceType } from "@web3auth/base";
import { IAdapterSettings } from "./interface";
export declare enum DEFAULT_EIP155_METHODS {
ETH_SEND_TRANSACTION = "eth_sendTransaction",
ETH_SIGN_TRANSACTION = "eth_signTransaction",
ETH_SIGN = "eth_sign",
PERSONAL_SIGN = "personal_sign",
ETH_SIGN_TYPED_DATA = "eth_signTypedData",
ETH_SIGN_TYPED_DATA_V3 = "eth_signTypedData_v3",
ETH_SIGN_TYPED_DATA_V4 = "eth_signTypedData_v4",
ADD_ETHEREUM_CHAIN = "wallet_addEthereumChain",
SWITCH_ETHEREUM_CHAIN = "wallet_switchEthereumChain"
}
export declare enum DEFAULT_SOLANA_METHODS {
SIGN_TRANSACTION = "solana_signTransaction",
SIGN_MESSAGE = "solana_signMessage"
}
export declare enum DEFAULT_EIP_155_EVENTS {
ETH_CHAIN_CHANGED = "chainChanged",
ETH_ACCOUNTS_CHANGED = "accountsChanged"
}
export declare enum DEFAULT_SOLANA_EVENTS {
SOL_CHAIN_CHANGED = "chainChanged",
SOL_ACCOUNTS_CHANGED = "accountsChanged"
}
export declare const SOLANA_CAIP_CHAIN_MAP: Record<string, string>;
export declare const getNamespacesFromChains: (chains: string[]) => string[];
export declare const getSupportedMethodsByNamespace: (namespace: string) => DEFAULT_EIP155_METHODS[] | DEFAULT_SOLANA_METHODS[];
export declare const getSupportedEventsByNamespace: (namespace: string) => DEFAULT_EIP_155_EVENTS[] | DEFAULT_SOLANA_EVENTS[];
export declare const getRequiredNamespaces: (chains: string[]) => ProposalTypes.RequiredNamespaces;
export declare const getWalletConnectV2Settings: (namespace: ChainNamespaceType, chainIds: string[], projectID: string) => Promise<{
adapterSettings: IAdapterSettings;
loginSettings: EngineTypes.ConnectParams;
}>;