Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@walletconnect/types
Advanced tools
@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.
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.'
};
web3.js is a collection of libraries that allow you to interact with a local or remote Ethereum node using HTTP, IPC, or WebSocket. It provides functionalities for interacting with smart contracts, sending transactions, and more. Unlike @walletconnect/types, which focuses on type definitions for WalletConnect, web3.js provides a comprehensive set of tools for Ethereum development.
ethers.js is a library for interacting with the Ethereum blockchain and its ecosystem. It provides utilities for sending transactions, interacting with smart contracts, and more. While @walletconnect/types provides type definitions for WalletConnect, ethers.js offers a full suite of tools for Ethereum development, including wallet management and contract interaction.
web3modal is a library that allows developers to easily integrate multiple wallet providers into their applications. It provides a modal for users to select their preferred wallet. While @walletconnect/types focuses on type definitions for WalletConnect, web3modal provides a user interface for connecting to various wallet providers, including WalletConnect.
Typings for WalletConnect Protocol
FAQs
Typings for WalletConnect Protocol
The npm package @walletconnect/types receives a total of 556,705 weekly downloads. As such, @walletconnect/types popularity was classified as popular.
We found that @walletconnect/types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.