@konemono/nostr-login 1.7.67 → 1.7.68

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.68",
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,6 +121,7 @@ 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,
125
126
  };
126
127
  console.log('Amber login success', info);
@@ -219,6 +220,7 @@ class AuthNostrService extends EventEmitter implements Signer {
219
220
 
220
221
  const info: Info = {
221
222
  pubkey,
223
+ name: nip19.npubEncode(pubkey),
222
224
  authMethod: 'amber' as any,
223
225
  };
224
226