@web3-react/types
Advanced tools
Comparing version 6.0.7 to 8.0.0-alpha.0
@@ -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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
2
73
Yes
37711
1
6
2
2
1
0