@@ -73,8 +73,12 @@ const bwtd = await BwtDaemon({
73
73
// Set the gap limit of watched unused addresses
74
74
gap_limit: 100 ,
75
75
76
- // Progress notifications for history scanning (a full rescan from genesis can take 20-30 minutes)
77
- progress : (type , progress , detail ) => console .log (' bwt %s progress %f%%' , type, progress* 100 , detail),
76
+ // Progress notifications for initial block download and wallet rescanning
77
+ sync_progress : (progress , tip_time ) =>
78
+ console .log (` Initial block download in progress... (${ progress* 100 } % done, synced up to ${ tip_time} )` ),
79
+ scan_progress : (progress , eta ) =>
80
+ console .log (` Wallet rescanning in progress... (${ progress* 100 } done, ETA ${ eta} seconds)` ),
81
+ }
78
82
}).start ()
79
83
80
84
// Get the assigned address/port for the Electrum/HTTP servers
@@ -90,7 +94,8 @@ See [`example.js`](example.js) for a more complete example, including connecting
90
94
The list of options is available in the [ libbwt C FFI documentation] ( https://github.com/bwt-dev/libbwt#config-options ) .
91
95
The nodejs wrapper also provides the following additional options:
92
96
93
- - ` progress ` - callback for progress update notifications, invoked with ` (type, progress, detail) ` (optional)
97
+ - ` sync_progress ` - callback for IBD progress notifications, invoked with ` (progress, tip_time) `
98
+ - ` scan_progress ` - callback for wallet rescan progress notifications, invoked with ` (progress, eta) `
94
99
- ` electrum ` - setting to ` true ` is an alias for ` electrum_addr=127.0.0.1:0 `
95
100
- ` http ` - setting to ` true ` is an alias for ` http_addr=127.0.0.1:0 `
96
101
0 commit comments