Update README.md

This commit is contained in:
Marco Argentieri
2023-01-14 17:13:38 +01:00
committed by GitHub
parent 525a3baee4
commit 089334acd7

View File

@@ -106,10 +106,7 @@ class MobileHandler extends NostrSigner {
if (!this.event) throw new Error('No origin event');
// emit event to the UI to show a modal
this.events.emit('sign_event_request', {
sender: this.event.pubkey,
event,
});
this.events.emit('sign_event_request', event);
// wait for the user to approve or reject the request
return new Promise((resolve, reject) => {
@@ -132,6 +129,8 @@ class MobileHandler extends NostrSigner {
Generate a key to identify the remote signer, it is used to be reached by the apps.
An instance that extends `NostrSigner` has access to `isConnected(pubkey:string): boolean` method that tells you if the current request is from an app that has been granted the connection by the current signer app.
```typescript
// random key
const secretKey = secp.utils.bytesToHex(secp.utils.randomPrivateKey());