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

web3-types

Package Overview
Dependencies
Maintainers
5
Versions
382
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-types - npm Package Compare versions

Comparing version 1.3.1-dev.a0d6730.0 to 1.3.1-dev.b05345b.0

8

lib/commonjs/apis/eth_execution_api.d.ts

@@ -30,2 +30,3 @@ import { Address, HexString32Bytes, Uint, HexStringBytes, HexStringSingleByte, HexString256Bytes, FeeHistoryBase, HexString8Bytes, Uint256, BlockNumberOrTag, Filter, AccessList, TransactionHash, TransactionReceiptBase, BlockBase, LogBase } from '../eth_types.js';

readonly accessList: AccessList;
readonly gasPrice: Uint;
}

@@ -36,2 +37,3 @@ export interface Transaction1559SignedAPI extends Transaction1559UnsignedAPI {

readonly s: Uint;
readonly v?: never;
}

@@ -41,2 +43,4 @@ export interface Transaction2930UnsignedAPI extends BaseTransactionAPI {

readonly accessList: AccessList;
readonly maxFeePerGas?: never;
readonly maxPriorityFeePerGas?: never;
}

@@ -47,5 +51,9 @@ export interface Transaction2930SignedAPI extends Transaction2930UnsignedAPI {

readonly s: Uint;
readonly v?: never;
}
export interface TransactionLegacyUnsignedAPI extends BaseTransactionAPI {
readonly gasPrice: Uint;
readonly accessList?: never;
readonly maxFeePerGas?: never;
readonly maxPriorityFeePerGas?: never;
}

@@ -52,0 +60,0 @@ export interface TransactionLegacySignedAPI extends TransactionLegacyUnsignedAPI {

15

lib/commonjs/web3_base_provider.d.ts

@@ -49,2 +49,15 @@ /// <reference types="node" />

}
export interface MetaMaskProvider<API extends Web3APISpec> extends SimpleProvider<API> {
on(event: 'connect', listener: (info: ProviderInfo) => void): void;
on(event: 'disconnect', listener: (error: ProviderRpcError) => void): void;
on(event: 'message', listener: (message: ProviderMessage) => void): void;
on(event: 'chainChanged', listener: (chainId: ProviderChainId) => void): void;
on(event: 'accountsChanged', listener: (accounts: ProviderAccounts) => void): void;
removeListener(event: 'connect', listener: (info: ProviderInfo) => void): void;
removeListener(event: 'disconnect', listener: (error: ProviderRpcError) => void): void;
removeListener(event: 'message', listener: (message: ProviderMessage) => void): void;
removeListener(event: 'chainChanged', listener: (chainId: ProviderChainId) => void): void;
removeListener(event: 'accountsChanged', listener: (accounts: ProviderAccounts) => void): void;
isMetaMask: boolean;
}
export declare type Eip1193Compatible<API extends Web3APISpec = EthExecutionAPI> = Omit<Omit<Web3BaseProvider, 'request'>, 'asEIP1193Provider'> & {

@@ -108,4 +121,4 @@ request<Method extends Web3APIMethod<API>, ResultType = Web3APIReturnType<API, Method> | unknown>(request: Web3APIPayload<API, Method>): Promise<ResultType>;

}
export declare type SupportedProviders<API extends Web3APISpec = Web3EthExecutionAPI> = EIP1193Provider<API> | Web3BaseProvider<API> | LegacyRequestProvider | LegacySendProvider | LegacySendAsyncProvider | SimpleProvider<API>;
export declare type SupportedProviders<API extends Web3APISpec = Web3EthExecutionAPI> = EIP1193Provider<API> | Web3BaseProvider<API> | LegacyRequestProvider | LegacySendProvider | LegacySendAsyncProvider | SimpleProvider<API> | MetaMaskProvider<API>;
export declare type Web3BaseProviderConstructor = new <API extends Web3APISpec>(url: string, net?: Socket) => Web3BaseProvider<API>;
export {};

@@ -30,2 +30,3 @@ import { Address, HexString32Bytes, Uint, HexStringBytes, HexStringSingleByte, HexString256Bytes, FeeHistoryBase, HexString8Bytes, Uint256, BlockNumberOrTag, Filter, AccessList, TransactionHash, TransactionReceiptBase, BlockBase, LogBase } from '../eth_types.js';

readonly accessList: AccessList;
readonly gasPrice: Uint;
}

@@ -36,2 +37,3 @@ export interface Transaction1559SignedAPI extends Transaction1559UnsignedAPI {

readonly s: Uint;
readonly v?: never;
}

@@ -41,2 +43,4 @@ export interface Transaction2930UnsignedAPI extends BaseTransactionAPI {

readonly accessList: AccessList;
readonly maxFeePerGas?: never;
readonly maxPriorityFeePerGas?: never;
}

@@ -47,5 +51,9 @@ export interface Transaction2930SignedAPI extends Transaction2930UnsignedAPI {

readonly s: Uint;
readonly v?: never;
}
export interface TransactionLegacyUnsignedAPI extends BaseTransactionAPI {
readonly gasPrice: Uint;
readonly accessList?: never;
readonly maxFeePerGas?: never;
readonly maxPriorityFeePerGas?: never;
}

@@ -52,0 +60,0 @@ export interface TransactionLegacySignedAPI extends TransactionLegacyUnsignedAPI {

@@ -49,2 +49,15 @@ /// <reference types="node" />

}
export interface MetaMaskProvider<API extends Web3APISpec> extends SimpleProvider<API> {
on(event: 'connect', listener: (info: ProviderInfo) => void): void;
on(event: 'disconnect', listener: (error: ProviderRpcError) => void): void;
on(event: 'message', listener: (message: ProviderMessage) => void): void;
on(event: 'chainChanged', listener: (chainId: ProviderChainId) => void): void;
on(event: 'accountsChanged', listener: (accounts: ProviderAccounts) => void): void;
removeListener(event: 'connect', listener: (info: ProviderInfo) => void): void;
removeListener(event: 'disconnect', listener: (error: ProviderRpcError) => void): void;
removeListener(event: 'message', listener: (message: ProviderMessage) => void): void;
removeListener(event: 'chainChanged', listener: (chainId: ProviderChainId) => void): void;
removeListener(event: 'accountsChanged', listener: (accounts: ProviderAccounts) => void): void;
isMetaMask: boolean;
}
export declare type Eip1193Compatible<API extends Web3APISpec = EthExecutionAPI> = Omit<Omit<Web3BaseProvider, 'request'>, 'asEIP1193Provider'> & {

@@ -108,5 +121,5 @@ request<Method extends Web3APIMethod<API>, ResultType = Web3APIReturnType<API, Method> | unknown>(request: Web3APIPayload<API, Method>): Promise<ResultType>;

}
export declare type SupportedProviders<API extends Web3APISpec = Web3EthExecutionAPI> = EIP1193Provider<API> | Web3BaseProvider<API> | LegacyRequestProvider | LegacySendProvider | LegacySendAsyncProvider | SimpleProvider<API>;
export declare type SupportedProviders<API extends Web3APISpec = Web3EthExecutionAPI> = EIP1193Provider<API> | Web3BaseProvider<API> | LegacyRequestProvider | LegacySendProvider | LegacySendAsyncProvider | SimpleProvider<API> | MetaMaskProvider<API>;
export declare type Web3BaseProviderConstructor = new <API extends Web3APISpec>(url: string, net?: Socket) => Web3BaseProvider<API>;
export {};
//# sourceMappingURL=web3_base_provider.d.ts.map

4

package.json
{
"name": "web3-types",
"version": "1.3.1-dev.a0d6730.0+a0d6730",
"version": "1.3.1-dev.b05345b.0+b05345b",
"description": "Provide the common data structures and interfaces for web3 modules.",

@@ -59,3 +59,3 @@ "main": "./lib/commonjs/index.js",

},
"gitHead": "a0d6730e317ab97fa4983c09880a0a1d01af9b74"
"gitHead": "b05345b21d3f5c01d5fdb0462ed7e5fbe19a2331"
}

@@ -71,2 +71,3 @@ /*

readonly accessList: AccessList;
readonly gasPrice: Uint;
}

@@ -78,2 +79,3 @@

readonly s: Uint;
readonly v?: never;
}

@@ -84,2 +86,4 @@

readonly accessList: AccessList;
readonly maxFeePerGas?: never;
readonly maxPriorityFeePerGas?: never;
}

@@ -91,2 +95,3 @@

readonly s: Uint;
readonly v?: never;
}

@@ -96,2 +101,5 @@

readonly gasPrice: Uint;
readonly accessList?: never;
readonly maxFeePerGas?: never;
readonly maxPriorityFeePerGas?: never;
}

@@ -98,0 +106,0 @@

@@ -115,2 +115,3 @@ /*

export type Eip1193EventName =

@@ -137,2 +138,18 @@ | 'connect'

export interface MetaMaskProvider<API extends Web3APISpec> extends SimpleProvider<API> {
on(event: 'connect', listener: (info: ProviderInfo) => void): void;
on(event: 'disconnect', listener: (error: ProviderRpcError) => void): void;
on(event: 'message', listener: (message: ProviderMessage) => void): void;
on(event: 'chainChanged', listener: (chainId: ProviderChainId) => void): void;
on(event: 'accountsChanged', listener: (accounts: ProviderAccounts) => void): void;
removeListener(event: 'connect', listener: (info: ProviderInfo) => void): void;
removeListener(event: 'disconnect', listener: (error: ProviderRpcError) => void): void;
removeListener(event: 'message', listener: (message: ProviderMessage) => void): void;
removeListener(event: 'chainChanged', listener: (chainId: ProviderChainId) => void): void;
removeListener(event: 'accountsChanged', listener: (accounts: ProviderAccounts) => void): void;
isMetaMask: boolean;
}
export type Eip1193Compatible<API extends Web3APISpec = EthExecutionAPI> = Omit<

@@ -330,3 +347,4 @@ // eslint-disable-next-line no-use-before-define

| LegacySendAsyncProvider
| SimpleProvider<API>;
| SimpleProvider<API>
| MetaMaskProvider<API>;

@@ -333,0 +351,0 @@ export type Web3BaseProviderConstructor = new <API extends Web3APISpec>(

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