@linenext/dapp-portal-sdk
Version:
Dapp Portal SDK
27 lines (26 loc) • 1.23 kB
TypeScript
import { ProviderHandlerInterface } from "./interface";
import { RequestArguments } from "../interface";
import { EventEmitter } from "eventemitter3";
import { DappPortalSDKConfig } from "../../config/config";
import { SdkDappInfoDto } from "../../dto/SdkDappInfoDto";
export declare class WalletConnectProviderHandler implements ProviderHandlerInterface {
private readonly walletName;
private readonly eventBus;
private readonly config;
private readonly walletConnectClient;
constructor(eventBus: EventEmitter, config: DappPortalSDKConfig, walletName: string, clientInfo: SdkDappInfoDto);
static init(eventBus: EventEmitter, config: DappPortalSDKConfig, walletName: string): Promise<WalletConnectProviderHandler>;
request(requestArgs: RequestArguments): Promise<unknown>;
private connect;
private connectAndSign;
switchChain(chainId: string): Promise<void>;
private getCurrentChainId;
disconnect(): Promise<void>;
private convertToEthParam;
private convertInputFieldToDataField;
private convertLegacyResponse;
private convertSignTransactionResponse;
private requestWithConverter;
private convertBitgetRpcError;
private convertWalletConnectError;
}