@bn-onboard/common
Advanced tools
Comparing version 2.0.0-alpha.1 to 2.0.0-alpha.2
@@ -6,3 +6,4 @@ import { 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, EthChainIdRequest, EthBalanceRequest, EIP1102Request, EIP3085Request, EIP3326Request, AddChainParams, EIP1193Provider, MeetOneProvider, BinanceProvider, InjectedNameSpace, CustomWindow, InjectedProvider, ProviderRpcErrorCode, Chain, TokenSymbol, CustomNetwork } from './types'; | ||
export { default as accountSelect } from './account-select'; | ||
export { entryModal } from './entry-modal'; | ||
export { ProviderIdentityFlag, ProviderLabel, InjectedNameSpace }; | ||
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, EthChainIdRequest, EthBalanceRequest, EIP1102Request, EIP3085Request, EIP3326Request, AddChainParams, EIP1193Provider, MeetOneProvider, BinanceProvider, CustomWindow, InjectedProvider, ProviderRpcErrorCode, Chain, TokenSymbol, CustomNetwork }; |
@@ -205,4 +205,6 @@ import type { ExternalProvider } from '@ethersproject/providers'; | ||
gasPrice?: string; | ||
to?: string; | ||
to: string; | ||
value?: string; | ||
maxFeePerGas?: string; | ||
maxPriorityFeePerGas?: string; | ||
nonce?: string; | ||
@@ -209,0 +211,0 @@ } |
{ | ||
"name": "@bn-onboard/common", | ||
"version": "2.0.0-alpha.1", | ||
"version": "2.0.0-alpha.2", | ||
"scripts": { | ||
@@ -39,8 +39,3 @@ "build": "rollup -c", | ||
}, | ||
"dependencies": { | ||
"@ethersproject/providers": "^5.5.0", | ||
"eip-712": "^0.4.3", | ||
"joi": "^17.4.2", | ||
"rxjs": "^7.3.0" | ||
} | ||
"dependencies": {} | ||
} |
@@ -1,70 +0,3 @@ | ||
# Onboard V2 Core Package | ||
# @bn-onboard/common | ||
## Getting Started | ||
```javascript | ||
import Onboard from '@bn-onboard/core' | ||
import InjectedWallets from '@bn-onboard/injected-wallets' | ||
const injectedWallet = InjectedWallets() | ||
const onboard = Onboard({ | ||
// wallet modules that you would like the user to be able to select from | ||
wallets: [injectedWallet], | ||
// additional metadata for app information | ||
appMetadata: { | ||
name: '<APP_NAME>', | ||
icon: '<APP_SVG_ICON_STRING>', | ||
description: '<APP_DESCRIPTION' | ||
}, | ||
// a mapping of locales to i18n options (https://github.com/blocknative/onboard/blob/feature/v2/packages/core/src/types.ts#L134) | ||
// can be used to replace default text or add multiple language support | ||
i18n: { | ||
es: { | ||
connect: { | ||
selectingWallet: { | ||
sidebar: { | ||
heading: 'Comenzar' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}) | ||
// subscribe to all state updates and log | ||
const state$ = onboard.state.select() | ||
state$.subscribe(console.log) | ||
// or you can subscribe to a slice of state for when it updates | ||
const wallets$ = onboard.state.select('wallets') | ||
wallets$.subscribe(console.log) | ||
// Add networks that are valid for your app | ||
onboard.addChains([ | ||
{ | ||
id: '0x1', | ||
token: 'ETH', | ||
label: 'Ethereum Mainnet', | ||
rpcUrl: 'https://mainnet.infura.io/v3/ababf9851fd845d0a167825f97eeb12b' | ||
}, | ||
{ | ||
id: '0x4', | ||
token: 'rETH', | ||
label: 'Ethereum Rinkeby Testnet', | ||
rpcUrl: 'https://rinkeby.infura.io/v3/ababf9851fd845d0a167825f97eeb12b' | ||
}, | ||
{ | ||
id: '0x89', | ||
token: 'MATIC', | ||
label: 'Matic Mainnet', | ||
rpcUrl: 'https://matic-mainnet.chainstacklabs.com' | ||
} | ||
]) | ||
// connect a user wallet | ||
onboard.connectWallet() | ||
// set chain to mainnet | ||
onboard.setChain('0x1') | ||
``` | ||
## A collection of functions and types that are shared across various packages in the Onboard V2 monorepo |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
574849
0
12
5298
0
4
- Removed@ethersproject/providers@^5.5.0
- Removedeip-712@^0.4.3
- Removedjoi@^17.4.2
- Removedrxjs@^7.3.0
- Removed@ethersproject/abstract-provider@5.7.0(transitive)
- Removed@ethersproject/abstract-signer@5.7.0(transitive)
- Removed@ethersproject/address@5.7.0(transitive)
- Removed@ethersproject/base64@5.7.0(transitive)
- Removed@ethersproject/basex@5.7.0(transitive)
- Removed@ethersproject/bignumber@5.7.0(transitive)
- Removed@ethersproject/bytes@5.7.0(transitive)
- Removed@ethersproject/constants@5.7.0(transitive)
- Removed@ethersproject/hash@5.7.0(transitive)
- Removed@ethersproject/keccak256@5.7.0(transitive)
- Removed@ethersproject/logger@5.7.0(transitive)
- Removed@ethersproject/networks@5.7.1(transitive)
- Removed@ethersproject/properties@5.7.0(transitive)
- Removed@ethersproject/providers@5.7.2(transitive)
- Removed@ethersproject/random@5.7.0(transitive)
- Removed@ethersproject/rlp@5.7.0(transitive)
- Removed@ethersproject/sha2@5.7.0(transitive)
- Removed@ethersproject/signing-key@5.7.0(transitive)
- Removed@ethersproject/strings@5.7.0(transitive)
- Removed@ethersproject/transactions@5.7.0(transitive)
- Removed@ethersproject/web@5.7.1(transitive)
- Removed@findeth/abi@0.3.1(transitive)
- Removed@hapi/hoek@9.3.0(transitive)
- Removed@hapi/topo@5.1.0(transitive)
- Removed@sideway/address@4.1.5(transitive)
- Removed@sideway/formula@3.0.1(transitive)
- Removed@sideway/pinpoint@2.0.0(transitive)
- Removedbech32@1.1.4(transitive)
- Removedbn.js@4.12.15.2.1(transitive)
- Removedbrorand@1.1.0(transitive)
- Removedeip-712@0.4.3(transitive)
- Removedelliptic@6.5.4(transitive)
- Removedhash.js@1.1.7(transitive)
- Removedhmac-drbg@1.0.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedjoi@17.13.3(transitive)
- Removedjs-sha3@0.8.0(transitive)
- Removedkeccak@3.0.4(transitive)
- Removedminimalistic-assert@1.0.1(transitive)
- Removedminimalistic-crypto-utils@1.0.1(transitive)
- Removednode-addon-api@2.0.2(transitive)
- Removednode-gyp-build@4.8.4(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedrxjs@7.8.1(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedsuperstruct@0.10.13(transitive)
- Removedtslib@2.8.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedws@7.4.6(transitive)