Repository navigation
Support NIP-46 remote signer (bunker) - #43
Merged
Merged
Conversation
Route every private-key operation through a Signer interface backed by either a local nsec or a NIP-46 remote signer. The bunker client is algia's own because go-nostr v0.52's never surfaces auth_url and its keyer.BunkerSigner.Decrypt calls nip44_encrypt. The client key authorized by the signer and the user's pubkey are kept in bunker-session[-<profile>].json so later runs reconnect without the one-time secret and read-only commands never contact the signer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow
privatekeyto be abunker://URL or NIP-05 identifier so the nsec need not live in the config file.Signerinterface (local nsec / NIP-46 bunker) and route all signing, NIP-04/NIP-44 encryption, gift wrap, NIP-42 and NIP-98/Blossom auth through itauth_url, andkeyer.BunkerSigner.Decryptcallsnip44_encryptbunker-session[-<profile>].json(0600); read-only commands don't contact the signerdelegation createreturns an error with a remote signerTested against
nak bunker+nak serve: post, reply, like, event, NIP-17/NIP-04 DM send & decrypt, Blossom upload/list, NIP-42 auth, reconnect without secret, unauthorized client rejection.