7 |
What is NIP-05 for Nostr?
8 |
9 | In the NIP-05 nostr protocol, a human-readable identifier is used instead of a public key to describe users.
10 | This identifier is often described as something similar to an email address.
11 | For example, using an address like me@nostrprotocol.net allows your friends to easily find and
12 | follow you as a follower with this address.
13 |
14 |
What is a Nostrprotocol.net Identifier?
15 |
16 | You can easily obtain a Nostrprotocol.net identifier for your nickname or name for free with Nostrprotocol.net.
17 | All you have to do is follow the steps below.
18 |
19 |
Steps to obtain an identifier
20 |
21 | - First, open the registration page.
22 | - Enter the public key value you are using on Nostr.
23 | - Choose a prefix for your identifier. For example, if you choose 'nostr',
24 | your identifier will be 'nostr@nostrprotocol.net'. You must select a minimum of 4 characters.
25 | - In this step, you need to send the direct message given to you through any Nostr client.
26 | - The system will send you an automatic direct message confirming that the transaction has been
27 | approved after it has recognized the message you sent. Afterwards, you can enter your NIP-05 identifier
28 | through any Nostr client of your choice.
29 |
30 |
Contact
31 |
32 | If you have any qu estions, you can send an email to nip05@nostrprotocol.net or
33 | send a message through nostr.
34 |
35 | );
36 | };
37 |
38 | export default Home;
39 |
--------------------------------------------------------------------------------
/src/client/src/routes/home/style.css:
--------------------------------------------------------------------------------
1 | .home {
2 | margin-top: 3.5rem;
3 | }
4 |
5 | .home > ul {
6 | list-style-type: decimal;
7 | }
--------------------------------------------------------------------------------
/src/client/src/routes/register/index.tsx:
--------------------------------------------------------------------------------
1 | import { h } from 'preact';
2 | import style from './style.css';
3 | import { useForm } from "react-hook-form";
4 | import { useRef, useState } from 'preact/hooks';
5 |
6 | const Register = () => {
7 | const [ isSuccess, setIsSuccess ] = useState(false);
8 | const [ errMessage, setErrMessage ] = useState('');
9 | const { register, handleSubmit, formState: { errors } } = useForm();
10 | const copyTextRef = useRef(null);
11 | const [ buttonText, setButtonText ] = useState('Copy');
12 |
13 | const onSubmit = async(data) => {
14 | const res = await fetch('/api/register', {
15 | method: 'POST',
16 | mode: 'cors',
17 | headers: {
18 | 'Content-Type': 'application/json'
19 | },
20 | body: JSON.stringify(data)
21 | });
22 | const json = await res.json();
23 | if (res.status === 200) {
24 | setIsSuccess(true);
25 | } else {
26 | setErrMessage(json.message);
27 | }
28 | };
29 |
30 | const handleCopyTextClick = async() => {
31 | await navigator.clipboard.writeText(copyTextRef.current.value);
32 | setButtonText('Copied');
33 | }
34 |
35 | return (
36 |
37 | {!isSuccess &&
}
65 | {isSuccess &&
66 |
Congratulations, your registration has been created. What you need to do now is:
67 |
80 |
Points to remember:
81 |
82 | - Send the message exactly as it is.
83 | - Make sure the message is sent from an account that matches the public key you provided during registration.
84 |
85 |
}
86 |
87 | );
88 | };
89 |
90 | export default Register;
91 |
--------------------------------------------------------------------------------
/src/client/src/routes/register/style.css:
--------------------------------------------------------------------------------
1 | .register {
2 | margin-top: 3.5rem;
3 | }
4 |
5 | .inputWrapper {
6 | display: flex;
7 | flex-direction: column;
8 | }
9 |
10 | .page {
11 | width: 750px;
12 | margin: auto;
13 | padding-top: 10px;
14 | }
15 |
16 | form {
17 | margin-top: 58px;
18 | padding: 64px;
19 |
20 | background: #E5E5E5;
21 | border-radius: 20px 20px 20px 20px;
22 | min-height: 400px;
23 |
24 | display: flex;
25 | flex-direction: column;
26 | gap: 30px;
27 | }
28 |
29 | .inputWrapper input{
30 | height: 56px;
31 |
32 | background: #FAFAFC;
33 |
34 | border: 1px solid #E6E6F0;
35 | border-radius: 8px;
36 |
37 | margin-bottom: 20px;
38 | color: black;
39 | font-size: 21px;
40 | }
41 |
42 | .inputWrapper label {
43 | font-size: 18px;
44 | line-height: 24px;
45 |
46 | color: #4E4958;
47 |
48 | padding-bottom: 8px;
49 | }
50 |
51 | .inputWrapper button {
52 | margin: auto;
53 | width: 40%;
54 | font-size: 20px;
55 | line-height: 26px;
56 | display: flex;
57 | justify-content: center;
58 | align-items: center;
59 | gap: 10px;
60 | padding: 15px 40px;
61 | margin: 52px auto;
62 | background: #FF5374;
63 | color:#FFFFFF ;
64 | border: none;
65 | border-radius: 20px;
66 | width: 600px;
67 | height:57px;
68 | cursor: pointer;
69 | }
70 |
71 | .inputWrapper button:hover {
72 | background: #cf3e5b;
73 | }
74 |
75 | .error {
76 | color: #cf3e5b;
77 | font-size: 15px;
78 | }
79 |
80 | .textarea {
81 | border-style: solid;
82 | border-width: 1px;
83 | border-color: black;
84 | background-color: white;
85 | color: black;
86 | font-size: 15px;
87 | width:100%;
88 | margin: 10px;
89 | }
--------------------------------------------------------------------------------
/src/client/src/style/index.css:
--------------------------------------------------------------------------------
1 | :root {
2 | font-family: 'Helvetica Neue', arial, sans-serif;
3 | font-weight: 400;
4 | -webkit-font-smoothing: antialiased;
5 | -moz-osx-font-smoothing: grayscale;
6 |
7 | color-scheme: light dark;
8 | color: #444;
9 | background: #fafafa;
10 | }
11 |
--------------------------------------------------------------------------------
/src/client/src/sw.js:
--------------------------------------------------------------------------------
1 | import { getFiles, setupPrecaching, setupRouting } from 'preact-cli/sw/';
2 |
3 | setupRouting();
4 | setupPrecaching(getFiles());
5 |
--------------------------------------------------------------------------------
/src/client/src/template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |