@@ -9,10 +9,10 @@ JavaScript library to easily onboard users to ethereum apps by enabling wallet s
9
9
## Quick Start with Default Modules
10
10
11
11
``` javascript
12
- import { init , modules } from " bn-onboard"
12
+ import Onboard from " bn-onboard"
13
13
14
14
// initialize onboard
15
- const onboard = init ({
15
+ const onboard = Onboard . init ({
16
16
dappId: " Your apiKey here" ,
17
17
networkId: 1 ,
18
18
subscriptions: {
@@ -28,15 +28,15 @@ const onboard = init({
28
28
},
29
29
modules: {
30
30
// default wallets that are included: MetaMask, Dapper, Coinbase, Trust, WalletConnect
31
- walletSelect: modules .select .defaults ({
31
+ walletSelect: Onboard . modules .select .defaults ({
32
32
// if you want fortmatic as a wallet option
33
33
fortmaticInit: { apiKey: " Your fortmatic key here" },
34
34
// if you want portis as a wallet option
35
35
portisInit: { apiKey: " Your portis key here" },
36
36
networkId: 4
37
37
}),
38
38
// default ready steps are: connect, network, balance
39
- walletReady: modules .ready .defaults ({
39
+ walletReady: Onboard . modules .ready .defaults ({
40
40
networkId: 4 ,
41
41
minimumBalance: " 200000000000000000"
42
42
})
@@ -227,13 +227,13 @@ fortmatic({
227
227
#### Example
228
228
229
229
``` javascript
230
- import { init , modules } from " bnc-onboard"
230
+ import Onboard from " bnc-onboard"
231
231
232
232
// PICK AND CHOOSE MODULES
233
233
234
- const { portis , dapper , metamask , fortmatic } = modules .select
234
+ const { portis , dapper , metamask , fortmatic } = Onboard . modules .select
235
235
236
- const onboard = init ({
236
+ const onboard = Onboard . init ({
237
237
// ...
238
238
modules: {
239
239
walletSelect: {
@@ -257,10 +257,10 @@ const onboard = init({
257
257
258
258
// USE ALL OF THE DEFAULT MODULES
259
259
260
- const onboard = init ({
260
+ const onboard = Onboard . init ({
261
261
// ...
262
262
modules: {
263
- walletSelect: modules .select .defaults ({
263
+ walletSelect: Onboard . modules .select .defaults ({
264
264
portisInit: { apiKey: " Your portis key here" },
265
265
networkId: 4
266
266
}),
@@ -302,13 +302,13 @@ balance(String) // the minimum balance in wei required to interact with your da
302
302
#### Example
303
303
304
304
``` javascript
305
- import { init , modules } from " bnc-onboard"
305
+ import Onboard from " bnc-onboard"
306
306
307
307
// PICK AND CHOOSE MODULES
308
308
309
- const { connect , network , balance } = modules .ready
309
+ const { connect , network , balance } = Onboard . modules .ready
310
310
311
- const onboard = init ({
311
+ const onboard = Onboard . init ({
312
312
// ...
313
313
modules: {
314
314
// ....
@@ -320,11 +320,11 @@ const onboard = init({
320
320
321
321
// USE ALL OF THE DEFAULT MODULES
322
322
323
- const onboard = init ({
323
+ const onboard = Onboard . init ({
324
324
// ...
325
325
modules: {
326
326
// ...
327
- walletReady: modules .ready .defaults ({
327
+ walletReady: Onboard . modules .ready .defaults ({
328
328
networkId: 1 ,
329
329
minimumBalance: " 400000000000"
330
330
})
0 commit comments