@konemono/nostr-login 1.7.67 → 1.7.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konemono/nostr-login",
3
- "version": "1.7.67",
3
+ "version": "1.7.69",
4
4
  "description": "",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -106,6 +106,7 @@ export class AmberDirectSigner implements Signer {
106
106
  params.append('returnType', 'signature');
107
107
  params.append('type', type);
108
108
  params.append('callbackUrl', callbackUrl);
109
+ params.append('name', window.location.hostname);
109
110
  if (pubkey) params.append('pubkey', pubkey);
110
111
  if (this._pubkey) params.append('current_user', this._pubkey);
111
112
 
@@ -121,7 +121,10 @@ class AuthNostrService extends EventEmitter implements Signer {
121
121
  if (response.type === 'get_public_key' || response.type.includes('pub')) {
122
122
  const info: Info = {
123
123
  pubkey: response.result,
124
+ name: nip19.npubEncode(response.result),
124
125
  authMethod: 'amber' as any,
126
+ relays: [],
127
+ signerPubkey: '',
125
128
  };
126
129
  console.log('Amber login success', info);
127
130
  this.onAuth('login', info);
@@ -219,7 +222,10 @@ class AuthNostrService extends EventEmitter implements Signer {
219
222
 
220
223
  const info: Info = {
221
224
  pubkey,
225
+ name: nip19.npubEncode(pubkey),
222
226
  authMethod: 'amber' as any,
227
+ relays: [],
228
+ signerPubkey: '',
223
229
  };
224
230
 
225
231
  this.onAuth('login', info);