Why Nostr? What is Njump?
2024-05-12 23:38:27

xport.top on Nostr: How to backup and restore your contacts in Nostr. ...

How to backup and restore your contacts in Nostr.

There’s a paradoxical phenomenon. On the one hand, a high entry threshold to Nostr assumes you’re ready to take responsibility for your data, on the other hand, some nostriches still seems to have irrational behavior when it comes to anything related to personal responsibility for their own data. Most nostriches attend to leave default values in their list of relays and forget to backup important data is also a fairly common. Therefore, I’ve decided to share few tools to try and make your experience bit better.

The contact-list-backup tool is incredibly simple, yet very powerful. Unfortunately, there’s still no documentation, so let’s figure it out.

First, you’ll need to choose a relay and type a hex-32 of your npub you want to backup contacts for. In my case it looks like this:

In my case it looks like this

If you don’t know how to get a hex of your npub, there’s a tool for that called Bech32-for-Nostr and it’s purpose is to convert Nostr things like nsec, npub, note, naddr, nrelay, nevent, nprofile to hex32 and vice versa.

If you have hex-32 of your npub and you know exactly which relay stores the event with your contacts, then press the PULL CONTACTS button.

As a result, you’ll get a list of contacts.

That’s it! You have it! This is the backup of your contacts! Simple as that.

Next, let’s say you want to retranslate this backup to some relay, you’ll need to connect with Nostr by providing it with a user@provider or bunker protocol link. In my case, I use nos2x browser extension that stores my private key and helps me to sign events:

When I press the NIP-07 EVENT button, automatically it signs the event for me When I press the NIP-07 EVENT button, automatically it signs the event for me.

Last but not the least, press the PUSH CONTACTS button which will send your signed event to a relay of your choise.

That’s it! Now you know how to backup your contact list and restore it! Congrats!

If you find this article helpful, please share with your friends and follow me.

Author Public Key
npub1kyhz3xg746qg6syzpp6r7wpdnxmh03gcsu5xccqzyk94hmvanj9sh00v85