@web3-onboard/common
Advanced tools
Comparing version
@@ -1,3 +0,3 @@ | ||
import type { RequestPatch, EventCallback, AccountSelectAPI, SelectAccountOptions, BasePath, DerivationPath, Asset, ScanAccounts, ScanAccountsOptions, AccountAddress, Account, AccountsList, AppMetadata, RecommendedInjectedWallets, WalletInit, WalletHelpers, WalletExclusions, InjectedWalletOptions, APIKey, Device, WalletModule, GetInterfaceHelpers, InjectedWalletModule, Platform, DeviceOS, DeviceBrowser, DeviceOSName, DeviceBrowserName, DeviceType, ChainId, RpcUrl, WalletInterface, ProviderMessage, ProviderInfo, ProviderAccounts, ProviderEvent, SimpleEventEmitter, ConnectListener, DisconnectListener, MessageListener, ChainListener, AccountsListener, Balance, EthAccountsRequest, EthBalanceRequest, EIP1102Request, SelectAccountsRequest, EIP3326Request, EIP3085Request, EthChainIdRequest, EthSignTransactionRequest, EthSignMessageRequest, EIP712Request, AddChainParams, EIP1193Provider, MeetOneProvider, BinanceProvider, CustomWindow, InjectedProvider, Chain, TokenSymbol, CustomNetwork, TransactionObject } from './types'; | ||
export { ProviderIdentityFlag, ProviderLabel, ProviderRpcErrorCode, InjectedNameSpace } from './types'; | ||
import type { RequestPatch, AccountSelectAPI, SelectAccountOptions, BasePath, DerivationPath, Asset, ScanAccounts, ScanAccountsOptions, AccountAddress, Account, AccountsList, AppMetadata, RecommendedInjectedWallets, WalletInit, WalletHelpers, APIKey, Device, WalletModule, GetInterfaceHelpers, Platform, DeviceOS, DeviceBrowser, DeviceOSName, DeviceBrowserName, DeviceType, ChainId, RpcUrl, WalletInterface, ProviderMessage, ProviderInfo, ProviderAccounts, ProviderEvent, SimpleEventEmitter, ConnectListener, DisconnectListener, MessageListener, ChainListener, AccountsListener, Balance, EthAccountsRequest, EthBalanceRequest, EIP1102Request, SelectAccountsRequest, EIP3326Request, EIP3085Request, EthChainIdRequest, EthSignTransactionRequest, EthSignMessageRequest, EIP712Request, AddChainParams, EIP1193Provider, Chain, TokenSymbol, CustomNetwork, TransactionObject } from './types'; | ||
export { ProviderRpcErrorCode } from './types'; | ||
export { ProviderRpcError } from './errors'; | ||
@@ -8,2 +8,2 @@ export { createEIP1193Provider } from './eip-1193'; | ||
export { SofiaProLight, SofiaProRegular, SofiaProSemiBold } from './fonts'; | ||
export type { RequestPatch, EventCallback, AccountSelectAPI, SelectAccountOptions, BasePath, DerivationPath, Asset, ScanAccounts, ScanAccountsOptions, AccountAddress, Account, AccountsList, AppMetadata, RecommendedInjectedWallets, WalletInit, WalletHelpers, WalletExclusions, InjectedWalletOptions, APIKey, Device, WalletModule, GetInterfaceHelpers, InjectedWalletModule, Platform, DeviceOS, DeviceBrowser, DeviceOSName, DeviceBrowserName, DeviceType, ChainId, RpcUrl, WalletInterface, ProviderMessage, ProviderInfo, ProviderAccounts, ProviderEvent, SimpleEventEmitter, ConnectListener, DisconnectListener, MessageListener, ChainListener, AccountsListener, Balance, EthAccountsRequest, EthBalanceRequest, EIP1102Request, SelectAccountsRequest, EIP3326Request, EIP3085Request, EthChainIdRequest, EthSignTransactionRequest, EthSignMessageRequest, EIP712Request, AddChainParams, EIP1193Provider, MeetOneProvider, BinanceProvider, CustomWindow, InjectedProvider, Chain, TokenSymbol, CustomNetwork, TransactionObject }; | ||
export type { RequestPatch, AccountSelectAPI, SelectAccountOptions, BasePath, DerivationPath, Asset, ScanAccounts, ScanAccountsOptions, AccountAddress, Account, AccountsList, AppMetadata, RecommendedInjectedWallets, WalletInit, WalletHelpers, APIKey, Device, WalletModule, GetInterfaceHelpers, Platform, DeviceOS, DeviceBrowser, DeviceOSName, DeviceBrowserName, DeviceType, ChainId, RpcUrl, WalletInterface, ProviderMessage, ProviderInfo, ProviderAccounts, ProviderEvent, SimpleEventEmitter, ConnectListener, DisconnectListener, MessageListener, ChainListener, AccountsListener, Balance, EthAccountsRequest, EthBalanceRequest, EIP1102Request, SelectAccountsRequest, EIP3326Request, EIP3085Request, EthChainIdRequest, EthSignTransactionRequest, EthSignMessageRequest, EIP712Request, AddChainParams, EIP1193Provider, Chain, TokenSymbol, CustomNetwork, TransactionObject }; |
@@ -1,2 +0,2 @@ | ||
import type { ethers, providers, BigNumber } from 'ethers'; | ||
import type { ethers, BigNumber } from 'ethers'; | ||
import type EventEmitter from 'eventemitter3'; | ||
@@ -48,9 +48,2 @@ import type { TypedData as EIP712TypedData } from 'eip-712'; | ||
}; | ||
export interface EventCallback { | ||
connect?: <T = ProviderInfo>(info: T) => ProviderInfo; | ||
disconnect?: <T = ProviderRpcError>(error: T) => ProviderRpcError; | ||
message?: <T = ProviderMessage>(message: T) => ProviderMessage; | ||
chainChanged?: <T = ChainId>(chainId: T) => ChainId; | ||
accountsChanged?: <T = ProviderAccounts>(accounts: T) => ProviderAccounts; | ||
} | ||
export declare type AccountSelectAPI = (options: SelectAccountOptions) => Promise<Account>; | ||
@@ -120,9 +113,2 @@ export declare type SelectAccountOptions = { | ||
}; | ||
export declare type WalletExclusions = { | ||
[key in ProviderLabel | string]?: Platform[] | boolean; | ||
}; | ||
export interface InjectedWalletOptions { | ||
custom?: InjectedWalletModule[]; | ||
filter?: WalletExclusions; | ||
} | ||
export interface APIKey { | ||
@@ -136,4 +122,16 @@ apiKey: string; | ||
}; | ||
export declare type Platform = DeviceOSName | DeviceBrowserName | DeviceType | 'all'; | ||
export declare type DeviceOS = { | ||
name: DeviceOSName; | ||
version: string; | ||
}; | ||
export declare 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 interface WalletModule { | ||
label: ProviderLabel | string; | ||
label: string; | ||
/** | ||
@@ -155,22 +153,2 @@ * Gets the icon of the wallet | ||
}; | ||
export interface InjectedWalletModule extends WalletModule { | ||
injectedNamespace: InjectedNameSpace; | ||
checkProviderIdentity: (helpers: { | ||
provider: any; | ||
device: Device; | ||
}) => boolean; | ||
platforms: Platform[]; | ||
} | ||
export declare type Platform = DeviceOSName | DeviceBrowserName | DeviceType | 'all'; | ||
export declare type DeviceOS = { | ||
name: DeviceOSName; | ||
version: string; | ||
}; | ||
export declare 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 declare type ChainId = string; | ||
@@ -295,84 +273,2 @@ export declare type RpcUrl = string; | ||
} | ||
export interface MeetOneProvider extends providers.ExternalProvider { | ||
wallet?: string; | ||
} | ||
export interface BinanceProvider extends EIP1193Provider { | ||
bbcSignTx: () => void; | ||
requestAccounts: () => Promise<ProviderAccounts>; | ||
isUnlocked: boolean; | ||
} | ||
export declare enum InjectedNameSpace { | ||
Ethereum = "ethereum", | ||
Binance = "BinanceChain", | ||
Web3 = "web3", | ||
Arbitrum = "arbitrum", | ||
XFI = "xfi" | ||
} | ||
export interface CustomWindow extends Window { | ||
BinanceChain: BinanceProvider; | ||
ethereum: InjectedProvider; | ||
web3: providers.ExternalProvider | MeetOneProvider; | ||
arbitrum: InjectedProvider; | ||
xfi: { | ||
ethereum: InjectedProvider; | ||
}; | ||
} | ||
export declare type InjectedProvider = providers.ExternalProvider & BinanceProvider & MeetOneProvider & providers.ExternalProvider & Record<string, boolean>; | ||
/** | ||
* The `ProviderIdentityFlag` is a property on an injected provider | ||
* that uniquely identifies that provider | ||
*/ | ||
export declare enum ProviderIdentityFlag { | ||
AlphaWallet = "isAlphaWallet", | ||
AToken = "isAToken", | ||
Binance = "bbcSignTx", | ||
Bitpie = "isBitpie", | ||
BlankWallet = "isBlank", | ||
Coinbase = "isToshi", | ||
CoinbaseExtension = "isCoinbaseWallet", | ||
Detected = "request", | ||
Dcent = "isDcentWallet", | ||
Frame = "isFrame", | ||
HuobiWallet = "isHbWallet", | ||
HyperPay = "isHyperPay", | ||
ImToken = "isImToken", | ||
Liquality = "isLiquality", | ||
MeetOne = "wallet", | ||
MetaMask = "isMetaMask", | ||
MyKey = "isMYKEY", | ||
OwnBit = "isOwnbit", | ||
Status = "isStatus", | ||
Trust = "isTrust", | ||
TokenPocket = "isTokenPocket", | ||
TP = "isTp", | ||
WalletIo = "isWalletIO", | ||
XDEFI = "isXDEFI" | ||
} | ||
export declare enum ProviderLabel { | ||
AlphaWallet = "AlphaWallet", | ||
AToken = "AToken", | ||
Binance = "Binance Smart Wallet", | ||
Bitpie = "Bitpie", | ||
BlankWallet = "BlankWallet", | ||
Brave = "Brave Wallet", | ||
Coinbase = "Coinbase Wallet", | ||
Dcent = "D'CENT", | ||
Detected = "Detected Wallet", | ||
Frame = "Frame", | ||
HuobiWallet = "Huobi Wallet", | ||
HyperPay = "HyperPay", | ||
ImToken = "imToken", | ||
Liquality = "Liquality", | ||
MeetOne = "MeetOne", | ||
MetaMask = "MetaMask", | ||
MyKey = "MyKey", | ||
Opera = "Opera Wallet", | ||
OwnBit = "OwnBit", | ||
Status = "Status Wallet", | ||
Trust = "Trust Wallet", | ||
TokenPocket = "TokenPocket", | ||
TP = "TP Wallet", | ||
WalletIo = "Wallet.io", | ||
XDEFI = "XDEFI Wallet" | ||
} | ||
export declare enum ProviderRpcErrorCode { | ||
@@ -379,0 +275,0 @@ ACCOUNT_ACCESS_REJECTED = 4001, |
{ | ||
"name": "@web3-onboard/common", | ||
"version": "2.0.0-alpha.3", | ||
"version": "2.0.0-alpha.4", | ||
"scripts": { | ||
@@ -19,2 +19,3 @@ "build": "rollup -c", | ||
], | ||
"license": "MIT", | ||
"devDependencies": { | ||
@@ -21,0 +22,0 @@ "@rollup/plugin-json": "^4.1.0", |
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
0
-100%531804
-1.23%4976
-3.32%