File tree Expand file tree Collapse file tree 5 files changed +16
-6
lines changed Expand file tree Collapse file tree 5 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 1
1
import {
2
2
FaradayApi ,
3
+ LitApi ,
3
4
LndApi ,
4
5
LoopApi ,
5
6
PoolApi ,
@@ -12,7 +13,7 @@ import { wasmLog as log } from './util/log';
12
13
13
14
/** The default values for the LncConfig options */
14
15
const DEFAULT_CONFIG = {
15
- wasmClientCode : 'https://lightning.engineering/lnc-v0.2.2 -alpha.wasm' ,
16
+ wasmClientCode : 'https://lightning.engineering/lnc-v0.2.3 -alpha.wasm' ,
16
17
namespace : 'default' ,
17
18
serverHost : 'mailbox.terminal.lightning.today:443'
18
19
} as Required < LncConfig > ;
@@ -32,6 +33,7 @@ export default class LNC {
32
33
loop : LoopApi ;
33
34
pool : PoolApi ;
34
35
faraday : FaradayApi ;
36
+ lit : LitApi ;
35
37
36
38
constructor ( lncConfig ?: LncConfig ) {
37
39
// merge the passed in config with the defaults
@@ -62,6 +64,7 @@ export default class LNC {
62
64
this . loop = new LoopApi ( createRpc , this ) ;
63
65
this . pool = new PoolApi ( createRpc , this ) ;
64
66
this . faraday = new FaradayApi ( createRpc , this ) ;
67
+ this . lit = new LitApi ( createRpc , this ) ;
65
68
}
66
69
67
70
private get wasm ( ) {
Original file line number Diff line number Diff line change @@ -189,6 +189,9 @@ export default class LncCredentialStore implements CredentialStore {
189
189
190
190
/** Loads persisted data from localStorage */
191
191
private _load ( ) {
192
+ // do nothing if localStorage is not available
193
+ if ( typeof localStorage === 'undefined' ) return ;
194
+
192
195
try {
193
196
const key = `${ STORAGE_KEY } :${ this . namespace } ` ;
194
197
const json = localStorage . getItem ( key ) ;
@@ -202,6 +205,9 @@ export default class LncCredentialStore implements CredentialStore {
202
205
203
206
/** Saves persisted data to localStorage */
204
207
private _save ( ) {
208
+ // do nothing if localStorage is not available
209
+ if ( typeof localStorage === 'undefined' ) return ;
210
+
205
211
const key = `${ STORAGE_KEY } :${ this . namespace } ` ;
206
212
localStorage . setItem ( key , JSON . stringify ( this . persisted ) ) ;
207
213
}
Original file line number Diff line number Diff line change 51
51
"webpack-cli" : " 4.9.2"
52
52
},
53
53
"dependencies" : {
54
- "@lightninglabs/lnc-core" : " 0.2.2 -alpha" ,
54
+ "@lightninglabs/lnc-core" : " 0.2.3 -alpha" ,
55
55
"crypto-js" : " 4.1.1"
56
56
},
57
57
"browser" : {
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ module.exports = {
28
28
name : '@lightninglabs/lnc-web' ,
29
29
type : "umd" , // see https://webpack.js.org/configuration/output/#outputlibrarytype
30
30
} ,
31
+ globalObject : 'this' ,
31
32
path : path . resolve ( __dirname , 'dist' ) ,
32
33
} ,
33
34
} ;
Original file line number Diff line number Diff line change 80
80
" @jridgewell/resolve-uri" " 3.1.0"
81
81
" @jridgewell/sourcemap-codec" " 1.4.14"
82
82
83
- " @lightninglabs/[email protected] .2 -alpha " :
84
- version "0.2.2 -alpha"
85
- resolved "https://registry.yarnpkg.com/@lightninglabs/lnc-core/-/lnc-core-0.2.2 -alpha.tgz#37e1dcf3419844f70e5df7901ec55cb62a9b0b1e "
86
- integrity sha512-S46tZ6cH7jPgrotbZS9Pceyb2Nf+gaC9gmorm1DC7OpWxaf2gilelNk+0wVf9B8pqIwnBfr1z3h/sTophvLkUQ ==
83
+ " @lightninglabs/[email protected] .3 -alpha " :
84
+ version "0.2.3 -alpha"
85
+ resolved "https://registry.yarnpkg.com/@lightninglabs/lnc-core/-/lnc-core-0.2.3 -alpha.tgz#e1b92a9071d1dfb92e2d565710b56f28f57cbbd4 "
86
+ integrity sha512-93D/uU64ayAaJv5kv4Pqwvkt+uT7yCtmHD08aUzvql+lbWm6U7m5loZLxz7tACFLXVPOQ8OHJL25W+3QMEYthg ==
87
87
88
88
" @protobufjs/aspromise@^1.1.1" , "@protobufjs/aspromise@^1.1.2":
89
89
version "1.1.2"
You can’t perform that action at this time.
0 commit comments