Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@walletconnect/se-sdk

Package Overview
Dependencies
Maintainers
11
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@walletconnect/se-sdk

Single-Ethreum-SDK for WalletConnect Protocol

  • 1.7.1
  • npm
  • Socket score

Version published
Weekly downloads
4.3K
increased by21.51%
Maintainers
11
Weekly downloads
 
Created
Source

@walletconnect/se-sdk

API Interface

class ClientLV {
  public init(params: { core: CoreClient }): Promise<void>;

  public pair(params: { uri: string }): Promise<void>;

  // ----------------- Sign ----------------- //

  public approveSession(params: {
    id: number;
    chainId: number;
    accounts: string[];
  }): Promise<Session>;

  public rejectSession(params: {
    id: number;
    error: {
  	  message: "OPTIONAL_ERROR_MESSAGE"
    }
  }): Promise<void>;

  public updateSession(params: {
    topic: string;
    chainId: number;
    accounts: string[];
  }): Promise<void>;

  public approveRequest(params: {
    topic: string;
    id: number,
    result: any,
  }): void;

  public rejectRequest(params: {
    topic: string;
    id: number,
    error: {
      message: "OPTIONAL_ERROR_MESSAGE"
    }
  }): void;


  public disconnectSession(params: {
    topic: string;
    error: {
      message: "OPTIONAL_ERROR_MESSAGE"
    }
  }): Promise<void>;

  public getActiveSessions(): Promise<Record<string, Session>>;

  public getPendingSessionProposals(): Promise<Record<number, SessionProposal>>;

  public getPendingSessionRequests(): Promise<Record<number, SessionRequest>>;

  // ----------------- Auth ----------------- //

 public approveAuthRequest(params: {
    id: number;
    signature: string;
    address: string;
  }): Promise<void>;

  public rejectAuthRequest(params: { id: number; error: ErrorResponse }): Promise<void>;

 public formatAuthMessage(
    payload: SingleEthereumTypes.CacaoRequestPayload,
    address: string,
  ): string;

  public getPendingAuthRequests(): Record<number, SingleEthereumTypes.PendingAuthRequest>;

  // ----------------- Events ----------------- //

  public on("session_proposal", (sessionProposal: SessionProposal) => {}): void;

  public on("session_request", (sessionRequest: SessionRequest) => {}): void;

  public on("session_delete", (sessionDelete: {
    id: number,
    topic: string
  }) => {}): void;

  public on("auth_request", (params: {
    id: number,
    topic: string,
    params: {
      requester: AuthEngineTypes.PendingRequest["requester"], cacaoPayload: AuthEngineTypes.CacaoRequestPayload
    }
  }) => {}): void;

}

Keywords

FAQs

Package last updated on 25 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc