An event detailing the current Ledger status is now emitted when the status is
changed.
-```
-Ledger.addEventListener('ledgerstatuschanged', (event) => {
- console.log(event.detail)
- // output displays current status
-})
+```javascript
+Ledger.addEventListener("ledgerstatuschanged", (event) => {
+ console.log(event.detail);
+ // output displays current status
+});
```
An event is also emitted when a wallet is locked or unlocked, including Ledger
wallets.
-```
-myWallet.addEventListener('locked', () => { // no other event data... })
-myWallet.addEventListener('unlocked', () => { // no other event data... })
+```javascript
+myWallet.addEventListener("locked", () => {
+ /* no other event data... */
+});
+myWallet.addEventListener("unlocked", () => {
+ /* no other event data... */
+});
```
## v0.10.1
`wallet.config()` method with a settings object can set the desired transport
explicitly. For example:
-```
-const myLedger = await Wallet.create('Ledger')
-await myLedger.config({ connection: 'ble' }) // other options are 'hid' or 'usb'
+```javascript
+const myLedger = await Wallet.create("Ledger");
+await myLedger.config({ connection: "ble" }); // other options are 'hid' or 'usb'
```
### Other Changes
Proof-of-work required to publish blocks is now provided by the `nano-pow`
package. This enables fast PoW using the best available browser GPU technology
and frees up `libnemo` to focus on wallet, account, and block interactions. More
-information on `nano-pow` can be found [here](https://npmjs.com/nano-pow).
+information on `nano-pow` can be found at its
+[npm package page](https://npmjs.com/nano-pow).
#### Persistent rolodex