Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

Add network to nostr discovery events #1091

Merged
merged 2 commits into from
Mar 27, 2024
Merged

Conversation

benthecarman
Copy link
Collaborator

@benthecarman benthecarman commented Mar 27, 2024

Added to the spec as well

@TonyGiorgio
Copy link
Contributor

TonyGiorgio commented Mar 27, 2024

does anything else in nostr do network? Will this default to mainnet if network is not defined?

How do we delete the old event and create it with this?

@benthecarman
Copy link
Collaborator Author

does anything else in nostr do network?

not that ik of

Will this default to mainnet if network is not defined?

I made it require the network and skip any that don't have one, maybe that's a better strategy though

How do we delete the old event and create it with this?

it's a replaceable event, I already replaced the mutinynet one to add the network tag

@TonyGiorgio
Copy link
Contributor

TonyGiorgio commented Mar 27, 2024

I made it require the network and skip any that don't have one, maybe that's a better strategy though

None of the mainnet ones would have had it, and I doubt others feel the need to add it unless it's something other than mainnet.

@TonyGiorgio
Copy link
Contributor

Do you know why none of the existing federations show up in the discovery list on mainnet?

@benthecarman
Copy link
Collaborator Author

Do you know why none of the existing federations show up in the discovery list on mainnet?

Looks like they are doing the announcements with the old tag style of adding fedimint at the end. I can add handling for that

@benthecarman
Copy link
Collaborator Author

fixed
image

@TonyGiorgio
Copy link
Contributor

Why do these fedimints not have name or other information here?

@benthecarman
Copy link
Collaborator Author

Why do these fedimints not have name or other information here?

They didn't include it in the event

here's ones of these:

{
        "content": "",
        "created_at": 1711382821,
        "id": "773e22b5ac6ece5feded40a97a501015fb4141c123c9a2bcae3068770520bcb1",
        "kind": 38173,
        "pubkey": "c35ff8c340449f0d68af1aec4844bb44a9c0b8c1dd4f4d4efbc65e12039a348a",
        "sig": "9807459b342b91d27ee9b750fe12fdc333837d6191b58a6fac231ffba423c4d3c077596657c0138d61d0149c6262a70a1e613da8bed2ec570c811e605e0b32a2",
        "tags": [
            [
                "u",
                "fed11qgqrztmhwden5te0v3jkcarp9ekkz6twdejhgtfjx5kk6ctyv45hycfwv3jhvtnxv4jxjcn5vvhxxmmd9upqzgqjppuuzgeh39ne5nkek3a624lcmg752aa5uzelv8a94lf3x7uzfgyzt6t5",
                "fedimint"
            ],
            [
                "d",
                "120879c1233789679a4ed9b47ba557f8da3d4577b4e0b3f61fa5afd3137b824a"
            ]
        ]
    }

vs the mutinynet announcement

{
        "content": "{\"name\":\"Mutinynet\",\"website\":\"https://mutinynet.com\",\"lud16\":\"[email protected]\",\"picture\":\"https://void.cat/d/S2nb1mTm5HgbAMP9cXLqRb.webp\",\"about\":\"Mutinynet Signet Federation\"}",
        "created_at": 1711507423,
        "id": "c9f6a7d76e1572beb3c27d78f0ed76af75fa4ffb75bc6209893d1cb857a1d6c2",
        "kind": 38173,
        "pubkey": "024f93e1890e9e470fb729ea24426766508c0e0c5618b5b475f2d027d0814d09",
        "sig": "c7615d85e1b37627b1b0c00033b69766f12dc326360bd27840bfbdb822c710e0a3f723437ef2622a3a6a308ca48e7785cc459ca9749683dedd2ca646295ac015",
        "tags": [
            [
                "d",
                "c8d423964c7ad944d30f57359b6e5b260e211dcfdb945140e28d4df51fd572d2"
            ],
            [
                "u",
                "fed11qgqzc2nhwden5te0vejkg6tdd9h8gepwvejkg6tdd9h8garhduhx6at5d9h8jmn9wshxxmmd9uqqzgxg6s3evnr6m9zdxr6hxkdkukexpcs3mn7mj3g5pc5dfh63l4tj6g9zk4er"
            ],
            [
                "modules",
                "lightning,wallet,mint"
            ],
            [
                "n",
                "signet"
            ]
        ]
    }

@benthecarman
Copy link
Collaborator Author

benthecarman commented Mar 27, 2024

I have a todo to pull down the kind0 for the federation if they don't have their info in the announcement event. I figured the clients would implement it this bc it's pretty simple but I could implement it since bitcoin mints didn't do it yet

@TonyGiorgio TonyGiorgio merged commit 7f55f5b into master Mar 27, 2024
9 checks passed
@TonyGiorgio TonyGiorgio deleted the network-federations branch March 27, 2024 15:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants