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

@web3-react/types

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3-react/types - npm Package Compare versions

Comparing version 6.0.7 to 8.0.0-alpha.0

src/index.ts

36

dist/index.d.ts

@@ -1,13 +0,29 @@

export interface AbstractConnectorArguments {
supportedChainIds?: number[];
/// <reference types="node" />
import { State, StoreApi } from 'zustand/vanilla';
import type { EventEmitter } from 'events';
export interface Web3ReactState extends State {
chainId: number | undefined;
accounts: string[] | undefined;
activating: boolean;
error: Error | undefined;
}
export interface ConnectorUpdate<T = number | string> {
provider?: any;
chainId?: T;
account?: null | string;
export declare type Web3ReactStore = StoreApi<Web3ReactState>;
export interface Actions {
startActivation: () => void;
update: (state: Partial<Pick<Web3ReactState, 'chainId' | 'accounts'>>) => void;
reportError: (error: Error) => void;
}
export declare enum ConnectorEvent {
Update = "Web3ReactUpdate",
Error = "Web3ReactError",
Deactivate = "Web3ReactDeactivate"
export interface RequestArguments {
readonly method: string;
readonly params?: readonly unknown[] | object;
}
export interface Provider extends EventEmitter {
request(args: RequestArguments): Promise<unknown>;
}
export declare abstract class Connector {
protected readonly actions: Actions;
provider: Provider | undefined;
deactivate?(): Promise<void>;
constructor(actions: Actions);
abstract activate(): Promise<void>;
}

@@ -1,8 +0,5 @@

'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./types.cjs.production.min.js')
} else {
module.exports = require('./types.cjs.development.js')
export class Connector {
constructor(actions) {
this.actions = actions;
}
}
{
"name": "@web3-react/types",
"publishConfig": {
"access": "public"
},
"version": "6.0.7",
"description": "A simple, maximally extensible, dependency minimized framework for building modern Ethereum dApps",
"keywords": [
"react",
"react-hooks",
"hooks",
"ethereum",
"javascript",
"typescript",
"web3",
"context",
"frontend",
"dapp"
],
"author": "Noah Zinsmeister <noahwz@gmail.com>",
"repository": {
"type": "git",
"url": "git://github.com/NoahZinsmeister/web3-react.git"
},
"version": "8.0.0-alpha.0",
"type": "module",
"main": "dist/index.js",
"module": "dist/types.esm.js",
"typings": "dist/index.d.ts",
"files": [
"dist"
],
"types": "dist/index.d.ts",
"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"lint": "tsdx lint src"
"prebuild": "rm -rf dist",
"build": "tsc",
"start": "tsc --watch"
},
"license": "GPL-3.0-or-later",
"gitHead": "b1fed167c94efd9123f271262351cdff83d510d3"
"peerDependencies": {
"zustand": "^3.5.10"
},
"gitHead": "3397fa8972d1ab2a7b9a527423ed68c3e646ea43"
}
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