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

@walletconnect/types

Package Overview
Dependencies
Maintainers
11
Versions
658
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@walletconnect/types

Typings for WalletConnect Protocol

  • 2.14.0-canary.1
  • npm
  • Socket score

Version published
Weekly downloads
696K
decreased by-7.18%
Maintainers
11
Weekly downloads
 
Created

What is @walletconnect/types?

@walletconnect/types is a TypeScript package that provides type definitions for the WalletConnect protocol. It is used to ensure type safety and consistency when developing applications that integrate with WalletConnect.

What are @walletconnect/types's main functionalities?

Session Types

Defines the structure of a WalletConnect session, including details about the peer, permissions, and expiry.

import { SessionTypes } from '@walletconnect/types';

const session: SessionTypes.Created = {
  topic: 'abc123',
  relay: { protocol: 'waku' },
  peer: { metadata: { name: 'Example DApp', description: 'An example decentralized application', url: 'https://example.com', icons: ['https://example.com/icon.png'] } },
  permissions: { blockchain: { chains: ['eip155:1'] }, jsonrpc: { methods: ['eth_sendTransaction'] } },
  expiry: 1234567890
};

Proposal Types

Defines the structure of a WalletConnect proposal, including details about the proposer and required namespaces.

import { ProposalTypes } from '@walletconnect/types';

const proposal: ProposalTypes.Struct = {
  id: 1,
  params: {
    proposer: { publicKey: '0xabc123', metadata: { name: 'Example DApp', description: 'An example decentralized application', url: 'https://example.com', icons: ['https://example.com/icon.png'] } },
    requiredNamespaces: { eip155: { methods: ['eth_sendTransaction'], chains: ['eip155:1'], events: ['accountsChanged'] } }
  }
};

Error Types

Defines the structure of error types used in WalletConnect, including error codes and messages.

import { ErrorTypes } from '@walletconnect/types';

const error: ErrorTypes.Provider = {
  code: 4001,
  message: 'User rejected the request.'
};

Other packages similar to @walletconnect/types

Keywords

FAQs

Package last updated on 09 Aug 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