@web3-react/types
Advanced tools
Comparing version 8.0.0-alpha.0 to 8.0.0-beta.0
/// <reference types="node" /> | ||
import { State, StoreApi } from 'zustand/vanilla'; | ||
import type { EventEmitter } from 'events'; | ||
import type { EventEmitter } from 'node:events'; | ||
import type { State, StoreApi } from 'zustand/vanilla'; | ||
export interface Web3ReactState extends State { | ||
@@ -11,6 +11,10 @@ chainId: number | undefined; | ||
export declare type Web3ReactStore = StoreApi<Web3ReactState>; | ||
export interface Web3ReactStateUpdate { | ||
chainId?: number; | ||
accounts?: string[]; | ||
} | ||
export interface Actions { | ||
startActivation: () => void; | ||
update: (state: Partial<Pick<Web3ReactState, 'chainId' | 'accounts'>>) => void; | ||
reportError: (error: Error) => void; | ||
startActivation: () => () => void; | ||
update: (stateUpdate: Web3ReactStateUpdate) => void; | ||
reportError: (error: Error | undefined) => void; | ||
} | ||
@@ -24,8 +28,20 @@ export interface RequestArguments { | ||
} | ||
export interface ProviderConnectInfo { | ||
readonly chainId: string; | ||
} | ||
export interface ProviderRpcError extends Error { | ||
message: string; | ||
code: number; | ||
data?: unknown; | ||
} | ||
export interface ProviderMessage { | ||
readonly type: string; | ||
readonly data: unknown; | ||
} | ||
export declare abstract class Connector { | ||
provider: Provider | undefined; | ||
protected readonly actions: Actions; | ||
provider: Provider | undefined; | ||
deactivate?(): Promise<void>; | ||
constructor(actions: Actions); | ||
abstract activate(): Promise<void>; | ||
abstract activate(...args: unknown[]): Promise<void> | void; | ||
deactivate?(...args: unknown[]): Promise<void> | void; | ||
} |
{ | ||
"name": "@web3-react/types", | ||
"version": "8.0.0-alpha.0", | ||
"keywords": [ | ||
"web3-react" | ||
], | ||
"author": "Noah Zinsmeister <noahwz@gmail.com>", | ||
"license": "GPL-3.0-or-later", | ||
"repository": "github:NoahZinsmeister/web3-react", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"version": "8.0.0-beta.0", | ||
"type": "module", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist/*" | ||
], | ||
"exports": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js", | ||
"require": "./dist/cjs/index.js" | ||
}, | ||
"types": "./dist/index.d.ts", | ||
"module": "./dist/index.js", | ||
"main": "./dist/cjs/index.js", | ||
"scripts": { | ||
"prebuild": "rm -rf dist", | ||
"build": "tsc", | ||
"build": "tsc && tsc --project tsconfig.cjs.json", | ||
"start": "tsc --watch" | ||
}, | ||
"peerDependencies": { | ||
"zustand": "^3.5.10" | ||
"dependencies": { | ||
"zustand": "^4.0.0-beta.0" | ||
}, | ||
"gitHead": "3397fa8972d1ab2a7b9a527423ed68c3e646ea43" | ||
"gitHead": "22a97b1fa8adee3a923b2af5b28d2174312fc288" | ||
} |
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
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
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
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
1
0
2
37703
3
59
+ Addedzustand@^4.0.0-beta.0
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedreact@18.3.1(transitive)
+ Addeduse-sync-external-store@1.2.2(transitive)
+ Addedzustand@4.5.5(transitive)
- Removedzustand@3.7.2(transitive)