dankswoops on Nostr: ESBuild compiles nostr-tools into nostr-tools.js. Background.js imports this file but ...
ESBuild compiles nostr-tools into nostr-tools.js. Background.js imports this file but you could cut the middle man and put tools inside background.js and compile it together. I'm unable to find proper documentation on how the logic of signEvent works.
I'm pretty sure I'm implementing this function wrong and that's all I need help with.
https://github.com/dankswoops/NostrKeyring/blob/a9d16a57567121c2090738203199b867e1c83f2d/extension/background.js#L9I'm happy to put $100 of btc on it. To get the test environment setup, npm i, npm run build, put the extension into firefox using manifest json at about:debugging#/runtime/this-firefox
Then create a user profile, log into that user to pass the keys to background.js and now you should be able to edit bg.js, test a nip-07 signEvent login.
to retest: change the code, refresh the extension, log out then in of the user, and try to signEvent.
That's all you need to know dev on it.
Published at
2024-10-15 16:32:21Event JSON
{
"id": "b23a90f8b78e82fdce1d157cc4f6e86ae0730dc1e27bb63d6e8d97eb00163b00",
"pubkey": "20ed9331673df584362a43709dd29de705a1bb58f3cd2af8e8c0b5f82c54c099",
"created_at": 1729009941,
"kind": 1,
"tags": [
[
"e",
"0d6660c7cefbbf6d8c15b76bcd0c65b3b6ad64b48f05b0a432f460b44380094c",
"",
"root"
],
[
"e",
"aa25be13ce24f1350507f8f15d59825bc38c0aa5f866431a95f6de802387e5e6",
"",
"reply"
],
[
"p",
"460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c"
],
[
"p",
"20ed9331673df584362a43709dd29de705a1bb58f3cd2af8e8c0b5f82c54c099"
]
],
"content": "ESBuild compiles nostr-tools into nostr-tools.js. Background.js imports this file but you could cut the middle man and put tools inside background.js and compile it together. I'm unable to find proper documentation on how the logic of signEvent works. \n\nI'm pretty sure I'm implementing this function wrong and that's all I need help with.\n\nhttps://github.com/dankswoops/NostrKeyring/blob/a9d16a57567121c2090738203199b867e1c83f2d/extension/background.js#L9\n\nI'm happy to put $100 of btc on it. To get the test environment setup, npm i, npm run build, put the extension into firefox using manifest json at about:debugging#/runtime/this-firefox\n\nThen create a user profile, log into that user to pass the keys to background.js and now you should be able to edit bg.js, test a nip-07 signEvent login.\n\nto retest: change the code, refresh the extension, log out then in of the user, and try to signEvent. \n\nThat's all you need to know dev on it.",
"sig": "006394f735d184e2f898813fb7da20bfdf479adeb1f857f772900fb3d285a2f44d76cdea31b4a24f1d8f49fc7eab1cc01d4a251ae02eb884fa5fe060550fc878"
}