File tree Expand file tree Collapse file tree 2 files changed +71
-0
lines changed Expand file tree Collapse file tree 2 files changed +71
-0
lines changed Original file line number Diff line number Diff line change 7
7
" dist/esm/*" ,
8
8
" dist/cjs/*"
9
9
],
10
+ "types" : " ./types.d.ts" ,
10
11
"devDependencies" : {
11
12
"rollup" : " ^1.12.0" ,
12
13
"rollup-plugin-commonjs" : " ^10.0.0" ,
Original file line number Diff line number Diff line change
1
+ export as namespace onboard
2
+
3
+ interface onboardApi {
4
+ walletSelect : ( autoSelectWallet ?: string ) => any
5
+ walletReady : ( ) => any
6
+ config : configOptions
7
+ getState : ( ) => any
8
+ }
9
+
10
+ interface configOptions {
11
+ darkMode : boolean
12
+ }
13
+
14
+ interface selectDefaultsOptions {
15
+ heading ?: string
16
+ description ?: string
17
+ networkId : number
18
+ fortmaticInit ?: any
19
+ portisInit ?: any
20
+ walletConnectInit ?: any
21
+ }
22
+
23
+ interface select {
24
+ defaults : ( options : selectDefaultsOptions ) => any
25
+ metamask : ( ) => any
26
+ dapper : ( ) => any
27
+ walletConnect : ( options : { infuraKey : string } ) => any
28
+ coinbase : ( ) => any
29
+ trust : ( ) => any
30
+ portis : ( options : { apiKey : string ; network : string } ) => any
31
+ fortmatic : ( options : { apiKey : string ; network : string } ) => any
32
+ }
33
+
34
+ interface ready {
35
+ defaults : ( options : { networkId : number ; minimumBalance : string } ) => any
36
+ connect : ( ) => any
37
+ network : ( correctNetwork : number ) => any
38
+ balance : ( minimumBalance : string ) => any
39
+ }
40
+
41
+ export function init ( initialization : initializationObject ) : onboardApi
42
+
43
+ export namespace modules {
44
+ let select : select
45
+ let ready : ready
46
+ }
47
+
48
+ interface wallet {
49
+ provider : any
50
+ name : string
51
+ }
52
+
53
+ interface subscriptions {
54
+ address : ( address : string ) => void
55
+ network : ( network : number ) => void
56
+ balance : ( balance : string ) => void
57
+ wallet : ( wallet : wallet ) => void
58
+ }
59
+
60
+ interface modulesInit {
61
+ walletSelect : any
62
+ walletReady : any
63
+ }
64
+
65
+ interface initializationObject {
66
+ networkId : number
67
+ dappId : string
68
+ subscriptions ?: subscriptions
69
+ modules : modulesInit
70
+ }
You can’t perform that action at this time.
0 commit comments