nostr-tools 0.20.0 → 0.20.1

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.
Files changed (2) hide show
  1. package/nip05.js +6 -0
  2. package/package.json +1 -1
package/nip05.js CHANGED
@@ -15,6 +15,12 @@ export async function searchDomain(domain, query = '') {
15
15
  export async function queryName(fullname) {
16
16
  try {
17
17
  let [name, domain] = fullname.split('@')
18
+
19
+ if (!domain) {
20
+ domain = name
21
+ name = '_'
22
+ }
23
+
18
24
  let res = await (
19
25
  await fetch(`https://${domain}/.well-known/nostr.json?name=${name}`)
20
26
  ).json()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nostr-tools",
3
- "version": "0.20.0",
3
+ "version": "0.20.1",
4
4
  "description": "Tools for making a Nostr client.",
5
5
  "repository": {
6
6
  "type": "git",