Socket
Socket
Sign inDemoInstall

@web3-onboard/common

Package Overview
Dependencies
Maintainers
2
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3-onboard/common - npm Package Compare versions

Comparing version 2.2.3 to 2.2.4-alpha.1

86

dist/types.d.ts

@@ -12,3 +12,3 @@ import type { ConnectionInfo } from 'ethers/lib/utils';

*/
export declare type RequestPatch = {
export type RequestPatch = {
eth_accounts?: ((args: {

@@ -60,3 +60,3 @@ baseRequest: EIP1193Provider['request'];

name: string;
icon: string;
icon?: string;
logo?: string;

@@ -70,3 +70,3 @@ description?: string;

}
export declare type TermsOfServiceAgreementOptions = {
export type TermsOfServiceAgreementOptions = {
version: string;

@@ -76,3 +76,3 @@ termsUrl?: string;

};
export declare type RecommendedInjectedWallets = {
export type RecommendedInjectedWallets = {
name: string;

@@ -85,4 +85,4 @@ url: string;

*/
export declare type WalletInit = (helpers: WalletHelpers) => WalletModule | WalletModule[] | null;
export declare type WalletHelpers = {
export type WalletInit = (helpers: WalletHelpers) => WalletModule | WalletModule[] | null;
export type WalletHelpers = {
device: Device;

@@ -93,3 +93,3 @@ };

}
export declare type Device = {
export type Device = {
os: DeviceOS;

@@ -99,14 +99,14 @@ type: DeviceType;

};
export declare type Platform = DeviceOSName | DeviceBrowserName | DeviceType | 'all';
export declare type DeviceOS = {
export type Platform = DeviceOSName | DeviceBrowserName | DeviceType | 'all';
export type DeviceOS = {
name: DeviceOSName;
version: string;
};
export declare type DeviceBrowser = {
export type DeviceBrowser = {
name: DeviceBrowserName;
version: string;
};
export declare type DeviceOSName = 'Windows Phone' | 'Windows' | 'macOS' | 'iOS' | 'Android' | 'Linux' | 'Chrome OS';
export declare type DeviceBrowserName = 'Android Browser' | 'Chrome' | 'Chromium' | 'Firefox' | 'Microsoft Edge' | 'Opera' | 'Safari';
export declare type DeviceType = 'desktop' | 'mobile' | 'tablet';
export type DeviceOSName = 'Windows Phone' | 'Windows' | 'macOS' | 'iOS' | 'Android' | 'Linux' | 'Chrome OS';
export type DeviceBrowserName = 'Android Browser' | 'Chrome' | 'Chromium' | 'Firefox' | 'Microsoft Edge' | 'Opera' | 'Safari';
export type DeviceType = 'desktop' | 'mobile' | 'tablet';
export interface WalletModule {

@@ -124,3 +124,3 @@ label: string;

}
export declare type GetInterfaceHelpers = {
export type GetInterfaceHelpers = {
chains: Chain[];

@@ -131,6 +131,6 @@ appMetadata: AppMetadata | null;

};
export declare type ChainId = string;
export declare type DecimalChainId = number;
export declare type RpcUrl = string;
export declare type WalletInterface = {
export type ChainId = string;
export type DecimalChainId = number;
export type RpcUrl = string;
export type WalletInterface = {
provider: EIP1193Provider;

@@ -151,8 +151,8 @@ instance?: unknown;

}
export declare type AccountAddress = string;
export type AccountAddress = string;
/**
* An array of addresses
*/
export declare type ProviderAccounts = AccountAddress[];
export declare type ProviderEvent = 'connect' | 'disconnect' | 'message' | 'chainChanged' | 'accountsChanged';
export type ProviderAccounts = AccountAddress[];
export type ProviderEvent = 'connect' | 'disconnect' | 'message' | 'chainChanged' | 'accountsChanged';
export interface SimpleEventEmitter {

@@ -162,11 +162,11 @@ on(event: ProviderEvent, listener: ConnectListener | DisconnectListener | MessageListener | ChainListener | AccountsListener): void;

}
export declare type ConnectListener = (info: ProviderInfo) => void;
export declare type DisconnectListener = (error: ProviderRpcError) => void;
export declare type MessageListener = (message: ProviderMessage) => void;
export declare type ChainListener = (chainId: ChainId) => void;
export declare type AccountsListener = (accounts: ProviderAccounts) => void;
export type ConnectListener = (info: ProviderInfo) => void;
export type DisconnectListener = (error: ProviderRpcError) => void;
export type MessageListener = (message: ProviderMessage) => void;
export type ChainListener = (chainId: ChainId) => void;
export type AccountsListener = (accounts: ProviderAccounts) => void;
/**
* The hexadecimal representation of the users
*/
export declare type Balance = string;
export type Balance = string;
export interface TransactionObject {

@@ -198,4 +198,4 @@ data?: string;

}
declare type Address = string;
declare type Message = string;
type Address = string;
type Message = string;
export interface EthSignMessageRequest {

@@ -233,3 +233,3 @@ method: 'eth_sign';

}
export declare type AddChainParams = {
export type AddChainParams = {
chainId: ChainId;

@@ -280,7 +280,23 @@ chainName?: string;

export interface Chain {
/**
* String indicating chain namespace.
* Defaults to 'evm' but will allow other chain namespaces in the future
*/
namespace?: 'evm';
id: ChainId;
rpcUrl: string;
label: string;
token: TokenSymbol;
/**
* Recommended to include. Used for network requests
* (eg Alchemy or Infura end point).
* PLEASE NOTE: Some wallets require an rpcUrl, label,
* and token for actions such as adding a new chain.
* It is recommended to include rpcUrl, label,
* and token for full functionality.
*/
rpcUrl?: string;
label?: string;
token?: TokenSymbol;
/**
* The color used to represent the chain and
* will be used as a background for the icon
*/
color?: string;

@@ -292,6 +308,6 @@ icon?: string;

}
export declare type ChainWithDecimalId = Omit<Chain, 'id'> & {
export type ChainWithDecimalId = Omit<Chain, 'id'> & {
id: DecimalChainId;
};
export declare type TokenSymbol = string;
export type TokenSymbol = string;
export interface CustomNetwork {

@@ -298,0 +314,0 @@ networkId: number;

import Joi from 'joi';
export declare type ValidateReturn = Joi.ValidationResult | null;
export type ValidateReturn = Joi.ValidationResult | null;
export declare function validate(validator: Joi.Schema, data: unknown): ValidateReturn;
export declare const chainIdValidation: Joi.AlternativesSchema;
export declare const chainNamespaceValidation: Joi.StringSchema;
export declare const chainIdValidation: Joi.AlternativesSchema<any>;
export declare const chainNamespaceValidation: Joi.StringSchema<string>;
/** Related to ConnectionInfo from 'ethers/lib/utils' */
export declare const providerConnectionInfoValidation: Joi.ObjectSchema<any>;
export declare const chainValidation: Joi.ObjectSchema<any>;

@@ -24,5 +24,5 @@ import Joi from 'joi';

id: chainIdValidation.required(),
rpcUrl: Joi.string().required(),
label: Joi.string().required(),
token: Joi.string().required(),
rpcUrl: Joi.string(),
label: Joi.string(),
token: Joi.string(),
icon: Joi.string(),

@@ -29,0 +29,0 @@ color: Joi.string(),

{
"name": "@web3-onboard/common",
"version": "2.2.3",
"version": "2.2.4-alpha.1",
"description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",

@@ -5,0 +5,0 @@ "keywords": [

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