Skip to content

Commit 37e8a9a

Browse files
committed
Update libbwt, add support for ephemeral token
1 parent e0753c3 commit 37e8a9a

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ bwtd.shutdown()
8686

8787
See [`example.js`](example.js) for a more complete example, including connecting to the HTTP API.
8888

89+
The API servers are unauthenticated by default, but
90+
[authentication can be enabled](https://github.com/bwt-dev/bwt/blob/master/doc/auth.md).
91+
8992
The list of options is available in the [libbwt C FFI documentation](https://github.com/bwt-dev/libbwt#config-options).
9093
The nodejs wrapper also provides the following additional options:
9194

index.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,15 @@ class BwtDaemon extends EventEmitter {
9696
case 'progress:scan':
9797
this.emit('progress:scan', progress_n, detail_n /*ETA in seconds*/)
9898
break
99+
case 'access_token':
100+
this.access_token = detail_s
101+
break
99102
case 'ready:http':
100-
this.http_addr = detail_s
101-
this.http_url = `http://${this.http_addr}/`
102-
break
103+
this.http_addr = detail_s
104+
this.http_url = `http://${this.http_addr}/`
105+
break
103106
case 'ready:electrum':
104-
this.electrum_addr = detail_s
107+
this.electrum_addr = detail_s
105108
break
106109
case 'ready':
107110
this.emit('ready')

0 commit comments

Comments
 (0)