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

web3

Package Overview
Dependencies
Maintainers
4
Versions
548
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3 - npm Package Compare versions

Comparing version 4.12.2-dev.9b32205.0 to 4.12.2-dev.b86d8ca.0

11

lib/commonjs/web3_eip6963.d.ts

@@ -1,2 +0,2 @@

import { Web3APISpec, EIP1193Provider } from "web3-types";
import { Web3APISpec, EIP1193Provider } from 'web3-types';
export declare enum Eip6963EventName {

@@ -16,2 +16,3 @@ eip6963announceProvider = "eip6963:announceProvider",

}
export declare type EIP6963ProviderResponse = Map<string, EIP6963ProviderDetail>;
export interface EIP6963AnnounceProviderEvent<API = Web3APISpec> extends CustomEvent {

@@ -24,9 +25,9 @@ type: Eip6963EventName.eip6963announceProvider;

}
export declare const eip6963ProvidersMap: Map<string, EIP6963ProviderDetail>;
export declare const eip6963ProvidersMap: EIP6963ProviderResponse;
export declare const web3ProvidersMapUpdated = "web3:providersMapUpdated";
export interface EIP6963ProvidersMapUpdateEvent extends CustomEvent {
type: string;
detail: Map<string, EIP6963ProviderDetail>;
detail: EIP6963ProviderResponse;
}
export declare const requestEIP6963Providers: () => Promise<unknown>;
export declare const onNewProviderDiscovered: (callback: (providerEvent: EIP6963AnnounceProviderEvent) => void) => void;
export declare const requestEIP6963Providers: () => Promise<EIP6963ProviderResponse>;
export declare const onNewProviderDiscovered: (callback: (providerEvent: EIP6963ProvidersMapUpdateEvent) => void) => void;

@@ -34,9 +34,8 @@ "use strict";

})(Eip6963EventName = exports.Eip6963EventName || (exports.Eip6963EventName = {}));
;
exports.eip6963ProvidersMap = new Map();
exports.web3ProvidersMapUpdated = "web3:providersMapUpdated";
exports.web3ProvidersMapUpdated = 'web3:providersMapUpdated';
const requestEIP6963Providers = () => __awaiter(void 0, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
if (typeof window === 'undefined') {
reject(new Error("window object not available, EIP-6963 is intended to be used within a browser"));
reject(new Error('window object not available, EIP-6963 is intended to be used within a browser'));
}

@@ -55,3 +54,3 @@ window.addEventListener(Eip6963EventName.eip6963announceProvider, (event) => {

if (typeof window === 'undefined') {
throw new Error("window object not available, EIP-6963 is intended to be used within a browser");
throw new Error('window object not available, EIP-6963 is intended to be used within a browser');
}

@@ -58,0 +57,0 @@ window.addEventListener(exports.web3ProvidersMapUpdated, callback);

@@ -15,4 +15,4 @@ import { Web3Context, Web3ContextInitOptions, Web3SubscriptionConstructor } from 'web3-core';

static utils: typeof utils;
static requestEIP6963Providers: () => Promise<unknown>;
static onNewProviderDiscovered: (callback: (providerEvent: import("./web3_eip6963.js").EIP6963AnnounceProviderEvent<unknown>) => void) => void;
static requestEIP6963Providers: () => Promise<import("./web3_eip6963.js").EIP6963ProviderResponse>;
static onNewProviderDiscovered: (callback: (providerEvent: import("./web3_eip6963.js").EIP6963ProvidersMapUpdateEvent) => void) => void;
static modules: {

@@ -19,0 +19,0 @@ Web3Eth: typeof Web3Eth;

@@ -31,9 +31,8 @@ /*

})(Eip6963EventName || (Eip6963EventName = {}));
;
export const eip6963ProvidersMap = new Map();
export const web3ProvidersMapUpdated = "web3:providersMapUpdated";
export const web3ProvidersMapUpdated = 'web3:providersMapUpdated';
export const requestEIP6963Providers = () => __awaiter(void 0, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
if (typeof window === 'undefined') {
reject(new Error("window object not available, EIP-6963 is intended to be used within a browser"));
reject(new Error('window object not available, EIP-6963 is intended to be used within a browser'));
}

@@ -51,3 +50,3 @@ window.addEventListener(Eip6963EventName.eip6963announceProvider, (event) => {

if (typeof window === 'undefined') {
throw new Error("window object not available, EIP-6963 is intended to be used within a browser");
throw new Error('window object not available, EIP-6963 is intended to be used within a browser');
}

@@ -54,0 +53,0 @@ window.addEventListener(web3ProvidersMapUpdated, callback);

@@ -1,2 +0,2 @@

import { Web3APISpec, EIP1193Provider } from "web3-types";
import { Web3APISpec, EIP1193Provider } from 'web3-types';
export declare enum Eip6963EventName {

@@ -16,2 +16,3 @@ eip6963announceProvider = "eip6963:announceProvider",

}
export declare type EIP6963ProviderResponse = Map<string, EIP6963ProviderDetail>;
export interface EIP6963AnnounceProviderEvent<API = Web3APISpec> extends CustomEvent {

@@ -24,10 +25,10 @@ type: Eip6963EventName.eip6963announceProvider;

}
export declare const eip6963ProvidersMap: Map<string, EIP6963ProviderDetail>;
export declare const eip6963ProvidersMap: EIP6963ProviderResponse;
export declare const web3ProvidersMapUpdated = "web3:providersMapUpdated";
export interface EIP6963ProvidersMapUpdateEvent extends CustomEvent {
type: string;
detail: Map<string, EIP6963ProviderDetail>;
detail: EIP6963ProviderResponse;
}
export declare const requestEIP6963Providers: () => Promise<unknown>;
export declare const onNewProviderDiscovered: (callback: (providerEvent: EIP6963AnnounceProviderEvent) => void) => void;
export declare const requestEIP6963Providers: () => Promise<EIP6963ProviderResponse>;
export declare const onNewProviderDiscovered: (callback: (providerEvent: EIP6963ProvidersMapUpdateEvent) => void) => void;
//# sourceMappingURL=web3_eip6963.d.ts.map

@@ -15,4 +15,4 @@ import { Web3Context, Web3ContextInitOptions, Web3SubscriptionConstructor } from 'web3-core';

static utils: typeof utils;
static requestEIP6963Providers: () => Promise<unknown>;
static onNewProviderDiscovered: (callback: (providerEvent: import("./web3_eip6963.js").EIP6963AnnounceProviderEvent<unknown>) => void) => void;
static requestEIP6963Providers: () => Promise<import("./web3_eip6963.js").EIP6963ProviderResponse>;
static onNewProviderDiscovered: (callback: (providerEvent: import("./web3_eip6963.js").EIP6963ProvidersMapUpdateEvent) => void) => void;
static modules: {

@@ -19,0 +19,0 @@ Web3Eth: typeof Web3Eth;

{
"name": "web3",
"version": "4.12.2-dev.9b32205.0+9b32205",
"version": "4.12.2-dev.b86d8ca.0+b86d8ca",
"description": "Ethereum JavaScript API",

@@ -86,24 +86,24 @@ "main": "./lib/commonjs/index.js",

"typescript": "^4.7.4",
"web3-providers-ipc": "4.0.8-dev.9b32205.0+9b32205"
"web3-providers-ipc": "4.0.8-dev.b86d8ca.0+b86d8ca"
},
"dependencies": {
"web3-core": "4.5.2-dev.9b32205.0+9b32205",
"web3-errors": "1.3.1-dev.9b32205.0+9b32205",
"web3-eth": "4.8.3-dev.9b32205.0+9b32205",
"web3-eth-abi": "4.2.4-dev.9b32205.0+9b32205",
"web3-eth-accounts": "4.2.2-dev.9b32205.0+9b32205",
"web3-eth-contract": "4.7.1-dev.9b32205.0+9b32205",
"web3-eth-ens": "4.4.1-dev.9b32205.0+9b32205",
"web3-eth-iban": "4.0.8-dev.9b32205.0+9b32205",
"web3-eth-personal": "4.0.9-dev.9b32205.0+9b32205",
"web3-net": "4.1.1-dev.9b32205.0+9b32205",
"web3-providers-http": "4.2.1-dev.9b32205.0+9b32205",
"web3-providers-ws": "4.0.9-dev.9b32205.0+9b32205",
"web3-rpc-methods": "1.3.1-dev.9b32205.0+9b32205",
"web3-rpc-providers": "1.0.0-dev.9b32205.0+9b32205",
"web3-types": "1.7.1-dev.9b32205.0+9b32205",
"web3-utils": "4.3.2-dev.9b32205.0+9b32205",
"web3-validator": "2.0.7-dev.9b32205.0+9b32205"
"web3-core": "4.5.2-dev.b86d8ca.0+b86d8ca",
"web3-errors": "1.3.1-dev.b86d8ca.0+b86d8ca",
"web3-eth": "4.8.3-dev.b86d8ca.0+b86d8ca",
"web3-eth-abi": "4.2.4-dev.b86d8ca.0+b86d8ca",
"web3-eth-accounts": "4.2.2-dev.b86d8ca.0+b86d8ca",
"web3-eth-contract": "4.7.1-dev.b86d8ca.0+b86d8ca",
"web3-eth-ens": "4.4.1-dev.b86d8ca.0+b86d8ca",
"web3-eth-iban": "4.0.8-dev.b86d8ca.0+b86d8ca",
"web3-eth-personal": "4.0.9-dev.b86d8ca.0+b86d8ca",
"web3-net": "4.1.1-dev.b86d8ca.0+b86d8ca",
"web3-providers-http": "4.2.1-dev.b86d8ca.0+b86d8ca",
"web3-providers-ws": "4.0.9-dev.b86d8ca.0+b86d8ca",
"web3-rpc-methods": "1.3.1-dev.b86d8ca.0+b86d8ca",
"web3-rpc-providers": "1.0.0-dev.b86d8ca.0+b86d8ca",
"web3-types": "1.7.1-dev.b86d8ca.0+b86d8ca",
"web3-utils": "4.3.2-dev.b86d8ca.0+b86d8ca",
"web3-validator": "2.0.7-dev.b86d8ca.0+b86d8ca"
},
"gitHead": "9b322052ef266cc57b29080b20053991e0c9a0a9"
"gitHead": "b86d8cae50d60e56e96bde9d1b836ca01ecd0fbc"
}

@@ -12,20 +12,20 @@ <p align="center">

This is the main package of [web3.js](repo), it contains a collection of comprehensive [TypeScript](https://www.typescriptlang.org/) libraries for Interaction with the [Ethereum JSON RPC API](https://ethereum.org/developers/docs/apis/json-rpc) and utility functions.
This is the main package of [web3.js](repo), it contains a collection of comprehensive [TypeScript](https://www.typescriptlang.org/) libraries for Interaction with the [Ethereum JSON RPC API](https://ethereum.org/developers/docs/apis/json-rpc) and utility functions.
## Features
- **[Web3.js Plugins🧩](https://docs.web3js.org/guides/web3_plugin_guide/)**: Enhance or add any functionality by creating scalable web3 plugins for any project.
- **Abstractions over the [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc)**: Simplifying interaction for your Developer Experience.
- **Language aligned to the official [Ethereum terminology](https://ethereum.org/en/glossary)**
- **Tree-shaking focus**: Include only what you need during bundling for optimized performance.
- **Dynamic contract types and full API in TypeScript**: Enforced with strict types for enhanced security and safety.
- **Complete utilities and functionalities for all your Ethereum needs**
- **More efficient ABI Encoder & Decoder**
- **Extensive [documentation](https://docs.web3js.org/) with guides and APIs**
- **Large collection of test cases**
- **First-class APIs for interacting with [Smart Contracts](https://ethereum.org/en/glossary#smart-contract)**
- **ESM and CJS module builds**: Support for both ECMAScript module and CommonJS module builds for flexible integration with various project setups.
- **[Contracts dynamic types](https://docs.web3js.org/guides/smart_contracts/infer_contract_types/) & full API in TypeScript**
- **Using native BigInt instead of large BigNumber libraries**: Use native BigInt for improved efficiency compared to using large external BigNumber libraries.
- **Custom Output formatters**: Format any returned value to be a string, number, BigInt, etc., providing flexibility in handling output data.
- **[Web3.js Plugins🧩](https://docs.web3js.org/guides/web3_plugin_guide/)**: Enhance or add any functionality by creating scalable web3 plugins for any project.
- **Abstractions over the [JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc)**: Simplifying interaction for your Developer Experience.
- **Language aligned to the official [Ethereum terminology](https://ethereum.org/en/glossary)**
- **Tree-shaking focus**: Include only what you need during bundling for optimized performance.
- **Dynamic contract types and full API in TypeScript**: Enforced with strict types for enhanced security and safety.
- **Complete utilities and functionalities for all your Ethereum needs**
- **More efficient ABI Encoder & Decoder**
- **Extensive [documentation](https://docs.web3js.org/) with guides and APIs**
- **Large collection of test cases**
- **First-class APIs for interacting with [Smart Contracts](https://ethereum.org/en/glossary#smart-contract)**
- **ESM and CJS module builds**: Support for both ECMAScript module and CommonJS module builds for flexible integration with various project setups.
- **[Contracts dynamic types](https://docs.web3js.org/guides/smart_contracts/infer_contract_types/) & full API in TypeScript**
- **Using native BigInt instead of large BigNumber libraries**: Use native BigInt for improved efficiency compared to using large external BigNumber libraries.
- **Custom Output formatters**: Format any returned value to be a string, number, BigInt, etc., providing flexibility in handling output data.

@@ -32,0 +32,0 @@ ## Installation

@@ -33,4 +33,4 @@ /*

Wallet,
privateKeyToAddress,
parseAndValidatePrivateKey,
privateKeyToAddress,
parseAndValidatePrivateKey,
privateKeyToPublicKey,

@@ -106,6 +106,6 @@ } from 'web3-eth-accounts';

wallet,
privateKeyToAddress,
parseAndValidatePrivateKey,
privateKeyToAddress,
parseAndValidatePrivateKey,
privateKeyToPublicKey,
}
};
};

@@ -22,2 +22,2 @@ /*

export * as ws from 'web3-providers-ws';
export * from './web3_eip6963.js';
export * from './web3_eip6963.js';

@@ -18,75 +18,77 @@ /*

import { Web3APISpec, EIP1193Provider } from "web3-types";
import { Web3APISpec, EIP1193Provider } from 'web3-types';
export enum Eip6963EventName {
eip6963announceProvider = 'eip6963:announceProvider',
eip6963requestProvider = 'eip6963:requestProvider',
};
eip6963announceProvider = 'eip6963:announceProvider',
eip6963requestProvider = 'eip6963:requestProvider',
}
export interface EIP6963ProviderInfo {
uuid: string;
name: string;
icon: string;
rdns: string;
uuid: string;
name: string;
icon: string;
rdns: string;
}
export interface EIP6963ProviderDetail<API = Web3APISpec> {
info: EIP6963ProviderInfo;
provider: EIP1193Provider<API>;
info: EIP6963ProviderInfo;
provider: EIP1193Provider<API>;
}
export type EIP6963ProviderResponse = Map<string, EIP6963ProviderDetail>;
export interface EIP6963AnnounceProviderEvent<API = Web3APISpec> extends CustomEvent {
type: Eip6963EventName.eip6963announceProvider;
detail: EIP6963ProviderDetail<API>;
type: Eip6963EventName.eip6963announceProvider;
detail: EIP6963ProviderDetail<API>;
}
export interface EIP6963RequestProviderEvent extends Event {
type: Eip6963EventName.eip6963requestProvider;
type: Eip6963EventName.eip6963requestProvider;
}
export const eip6963ProvidersMap: Map<string, EIP6963ProviderDetail> = new Map();
export const eip6963ProvidersMap: EIP6963ProviderResponse = new Map();
export const web3ProvidersMapUpdated = "web3:providersMapUpdated";
export const web3ProvidersMapUpdated = 'web3:providersMapUpdated';
export interface EIP6963ProvidersMapUpdateEvent extends CustomEvent {
type: string;
detail: Map<string, EIP6963ProviderDetail>;
type: string;
detail: EIP6963ProviderResponse;
}
export const requestEIP6963Providers = async () =>
new Promise((resolve, reject) => {
if (typeof window === 'undefined') {
reject(new Error("window object not available, EIP-6963 is intended to be used within a browser"));
}
export const requestEIP6963Providers = async (): Promise<EIP6963ProviderResponse> =>
new Promise((resolve, reject) => {
if (typeof window === 'undefined') {
reject(
new Error(
'window object not available, EIP-6963 is intended to be used within a browser',
),
);
}
window.addEventListener(
Eip6963EventName.eip6963announceProvider as any,
(event: EIP6963AnnounceProviderEvent) => {
window.addEventListener(
Eip6963EventName.eip6963announceProvider as any,
(event: EIP6963AnnounceProviderEvent) => {
eip6963ProvidersMap.set(event.detail.info.uuid, event.detail);
eip6963ProvidersMap.set(
event.detail.info.uuid,
event.detail);
const newEvent: EIP6963ProvidersMapUpdateEvent = new CustomEvent(
web3ProvidersMapUpdated,
{ detail: eip6963ProvidersMap },
);
const newEvent: EIP6963ProvidersMapUpdateEvent = new CustomEvent(
web3ProvidersMapUpdated,
{ detail: eip6963ProvidersMap }
);
window.dispatchEvent(newEvent);
resolve(eip6963ProvidersMap);
},
);
window.dispatchEvent(newEvent);
resolve(eip6963ProvidersMap);
window.dispatchEvent(new Event(Eip6963EventName.eip6963requestProvider));
});
}
);
window.dispatchEvent(new Event(Eip6963EventName.eip6963requestProvider));
});
export const onNewProviderDiscovered = (callback: (providerEvent: EIP6963AnnounceProviderEvent) => void) => {
if (typeof window === 'undefined') {
throw new Error("window object not available, EIP-6963 is intended to be used within a browser");
}
window.addEventListener(web3ProvidersMapUpdated as any, callback );
}
export const onNewProviderDiscovered = (
callback: (providerEvent: EIP6963ProvidersMapUpdateEvent) => void,
) => {
if (typeof window === 'undefined') {
throw new Error(
'window object not available, EIP-6963 is intended to be used within a browser',
);
}
window.addEventListener(web3ProvidersMapUpdated as any, callback);
};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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