function on(event: string,callback: (error: Error | null, payload: any | null) => void): void;
Events: connect
, disconnect
, session_request
, session_update
, call_request
, wc_sessionRequest
, wc_sessionUpdate
async function createSession(): Promise<void>;
function approveSession({chainId: number, // Requiredaccounts: string[] // Required}): void;
function rejectSession({message: 'OPTIONAL_ERROR_MESSAGE'}): void;
function updateSession({chainId: number, // Requiredaccounts: string[] // Required}): void;
function killSession(): void;
async function sendTransaction({from: string, // Requiredto: string, // RequiredgasLimit: string, // RequiredgasPrice: string, // Requiredvalue: string, // Requireddata: string, // Requirednonce: string // Required}): Promise<string>;
Returns: Transaction hash
async function signTransaction({from: string, // Requiredto: string, // RequiredgasLimit: string, // RequiredgasPrice: string, // Requiredvalue: string, // Requireddata: string, // Requirednonce: string // Required}): Promise<string>;
Returns: Signed Transaction
async function signMessage(params: string[]): Promise<string>;
Returns: Signature
async function signPersonalMessage(params: string[]): Promise<string>;
Returns: Signature
async function signTypedData(params: any[]): Promise<string>;
Returns: Signature
async function sendCustomRequest(payload: IJsonRpcRequest): Promise<any>;
Returns: JSON-RPC Response
function approveRequest({id: number, // Requiredresult: any // Required}): void;
function rejectRequest({id: 1,error: {message: "OPTIONAL_ERROR_MESSAGE"}}): void;