applesauce-core 0.0.0-next-20250213194606 → 0.0.0-next-20250214163422

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.
@@ -0,0 +1,7 @@
1
+ import { isNip05, NIP05_REGEX } from "nostr-tools/nip05";
2
+ /** Returns the name and domain for a NIP-05 address */
3
+ export declare function parseNIP05Address(address: string): {
4
+ name: string;
5
+ domain: string;
6
+ } | null;
7
+ export { isNip05, NIP05_REGEX };
@@ -0,0 +1,10 @@
1
+ import { isNip05, NIP05_REGEX } from "nostr-tools/nip05";
2
+ /** Returns the name and domain for a NIP-05 address */
3
+ export function parseNIP05Address(address) {
4
+ const match = address.match(NIP05_REGEX);
5
+ if (!match)
6
+ return null;
7
+ const [, name = "_", domain] = match;
8
+ return { name, domain };
9
+ }
10
+ export { isNip05, NIP05_REGEX };
@@ -7,6 +7,7 @@ export * from "./comment.js";
7
7
  export * from "./contacts.js";
8
8
  export * from "./content.js";
9
9
  export * from "./delete.js";
10
+ export * from "./dns-identity.js";
10
11
  export * from "./emoji.js";
11
12
  export * from "./event.js";
12
13
  export * from "./external-id.js";
@@ -7,6 +7,7 @@ export * from "./comment.js";
7
7
  export * from "./contacts.js";
8
8
  export * from "./content.js";
9
9
  export * from "./delete.js";
10
+ export * from "./dns-identity.js";
10
11
  export * from "./emoji.js";
11
12
  export * from "./event.js";
12
13
  export * from "./external-id.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "applesauce-core",
3
- "version": "0.0.0-next-20250213194606",
3
+ "version": "0.0.0-next-20250214163422",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",