{"type":"rich","version":"1.0","title":"Innis wrote","author_name":"Innis (npub1l3…5cxyz)","author_url":"https://yabu.me/npub1l33660awkeycecn9grhrvzyn0fmes8245ke7k82y8njz8uqu3vlqk5cxyz","provider_name":"njump","provider_url":"https://yabu.me","html":"And also shipping jsr:@innis/nostr-nip07 today. The first adapter to be released that's built on top of @innis/nostr-core. It wraps the window.nostr surface that browser extensions inject, Alby and nos2x and Flamingo and anything else that puts a key holder behind a popup, into the same Signer interface every other signer in the stack implements. Application code never branches on what kind of identity is on the other end of the call.\n\nOne factory function in, a frozen Signer out. getPublicKey memoises after the first resolve. Encryption methods return a Result instead of throwing, because a missing NIP-44 implementation is information about the extension, not an exception to recover from. User rejection still throws. Clicking deny is a control-flow signal and belongs in the same channel as signEvent's other rejections.\n\nThe piece I care about most is the pubkey-mismatch check. If the user logs in as one identity and the extension later signs an event as another, the signer fires a callback and refuses to return the event. Extensions can switch accounts under you. Most code never notices. This one checks every signature against the pubkey the application thinks it has.\n\nBuilt on @innis/nostr-core. AI was involved, same terms as before. The architecture is mine. The decisions are mine. The machine held the other end of the board.\n\ndeno add jsr:@innis/nostr-nip07\nhttps://github.com/johninnis/nostr-nip07-ts\n\nMIT.\n\n#nostr #typescript #opensource #nostrdev\n\n\nnostr:nevent1qqsdyu7mkcyh4u7uqt7k2j34mt0vl5uwhr5g2ngy4pvsg7hhnev95nspp4mhxue69uhkummn9ekx7mqppamhxue69uhkummnw3ezumt0d5q3gamnwvaz7tmjv4kxz7fwv3sk6atn9e5k7q3ql33660awkeycecn9grhrvzyn0fmes8245ke7k82y8njz8uqu3vlqnp27tm"}
