OK I did it. Instead of a P2TR address for your npub, I impl...

npub1q6mcr8tlr3l4gus3sfnw6772s7zae6hqncmw5wj27ejud5wcxf7q0nx7d5
hex
5444ee09a0692a9d30500cb1a735935dcf76351d44ae4ce5ce31d2dd8147a562nevent
nevent1qqs9g38wpxsxj25axpgqevd8xkf4mnmkx5w5ftjvuh8rr5kas9r62csprpmhxue69uhhyetvv9ujuem4d36kwatvw5hx6mm9qgsqddupn4l3cl65wggcyehd009g0pwuatsfudh28f90vewx68vrylqn5yd0dKind-1 (TextNote)
OK I did it. Instead of a P2TR address for your npub, I implemented Silent Payments.
I managed to:
- Create a Silent Payment address from my npub,
- Send a Silent Payment from Cake Wallet (the only wallet I could find that supported it)
- Detect the valid transaction outputs that containthe Silent Payment
- Swept the funds from the Silent Payment to a fresh bitcoin address that I control using the corresponding nsec (redacted in diagram, below, of course)
So the bottom line, I have shown that any npub can receive silent payments and sweep those funds to another wallet. Total privacy on the public blockchain. No one know I received or sent the funds.
I have the command line working and I will figure how to wire this into the web app in the coming days. That should put an end to the debate of using your social nsec as a wallet.
The command line looks like:
$>openetr sweep-silent-payment NSEC TXID DESTINATION_ADDRESS
/cc
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqgkwaehxw309aex2mrp0yh8qunfd4skctnwv46qqgqyv87tanzvxd6y8xfj66u0zynfendhejtn44a9pt3k9kcntfr5m5n74m66 nostr:nprofile1qythwumn8ghj7ct5d3shxtnwdaehgu3wd3skuep0qyt8wumn8ghj7etyv4hzumn0wd68ytnvv9hxgtcqyphydppzm7m554ecwq4gsgaek2qk32atse2l4t9ks57dpms4mmhfx5ltf6v nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq3qamnwvaz7tmwdaehgu3wd4hk6tcqyprqcf0xst760qet2tglytfay2e3wmvh9asdehpjztkceyh0s5r9cpvx58v nostr:nprofile1qyfhwue69uhhyetvv9uju6nzx56jucm0d5qs6amnwvaz7tmwdaejumr0dsqzqvhpsfmr23gwhv795lgjc8uw0v44z3pe4sg2vlh08k0an3wx3cj96l2ln2 nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq37amnwvaz7tmwdaehgu3dwfjkccte9ejx2un9ddex7umn9ekk2tcqyqlhwrt96wnkf2w9edgr4cfruchvwkv26q6asdhz4qg08pm6w3djg3c8m4j
#silentpayments

Raw JSON
{
"kind": 1,
"id": "5444ee09a0692a9d30500cb1a735935dcf76351d44ae4ce5ce31d2dd8147a562",
"pubkey": "06b7819d7f1c7f5472118266ed7bca8785dceae09e36ea3a4af665c6d1d8327c",
"created_at": 1779213309,
"tags": [
[
"t",
"silentpayments"
],
[
"p",
"0461fcbecc4c3374439932d6b8f11269ccdb7cc973ad7a50ae362db135a474dd",
"wss://relay.ditto.pub",
"mention"
],
[
"p",
"6e468422dfb74a5738702a8823b9b28168abab8655faacb6853cd0ee15deee93",
"wss://atlas.nostr.land/",
"mention"
],
[
"p",
"460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c",
"wss://nos.lol/",
"mention"
],
[
"p",
"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245",
"ws://relay.jb55.com",
"mention"
],
[
"p",
"3f770d65d3a764a9c5cb503ae123e62ec7598ad035d836e2a810f3877a745b24",
"wss://nos.lol/",
"mention"
],
[
"r",
"wss://relay.getsafebox.app/"
],
[
"r",
"wss://espelho.girino.org/"
],
[
"r",
"wss://relay.nostrplebs.com/"
],
[
"r",
"wss://relay.primal.net/"
],
[
"r",
"wss://atlas.nostr.land/invoices"
],
[
"imeta",
"url https://blossom.primal.net/4d80e674b1e97310eaf1b0b612caa80dd7dfeef501f94440f70ecf1603fb3b64.png",
"m image/png",
"dim 2012x1458",
"service nip96"
],
[
"client",
"Primal Web"
]
],
"content": "OK I did it. Instead of a P2TR address for your npub, I implemented Silent Payments.\n\nI managed to: \n\n1. Create a Silent Payment address from my npub, \n2. Send a Silent Payment from Cake Wallet (the only wallet I could find that supported it)\n3. Detect the valid transaction outputs that containthe Silent Payment\n4. Swept the funds from the Silent Payment to a fresh bitcoin address that I control using the corresponding nsec (redacted in diagram, below, of course)\n\n\n\n\nSo the bottom line, I have shown that any npub can receive silent payments and sweep those funds to another wallet. Total privacy on the public blockchain. No one know I received or sent the funds.\n\nI have the command line working and I will figure how to wire this into the web app in the coming days. That should put an end to the debate of using your social nsec as a wallet.\n\nThe command line looks like:\n\n$\u003eopenetr sweep-silent-payment NSEC TXID DESTINATION_ADDRESS\n\n/cc\n\nnostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqgkwaehxw309aex2mrp0yh8qunfd4skctnwv46qqgqyv87tanzvxd6y8xfj66u0zynfendhejtn44a9pt3k9kcntfr5m5n74m66 nostr:nprofile1qythwumn8ghj7ct5d3shxtnwdaehgu3wd3skuep0qyt8wumn8ghj7etyv4hzumn0wd68ytnvv9hxgtcqyphydppzm7m554ecwq4gsgaek2qk32atse2l4t9ks57dpms4mmhfx5ltf6v nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq3qamnwvaz7tmwdaehgu3wd4hk6tcqyprqcf0xst760qet2tglytfay2e3wmvh9asdehpjztkceyh0s5r9cpvx58v nostr:nprofile1qyfhwue69uhhyetvv9uju6nzx56jucm0d5qs6amnwvaz7tmwdaejumr0dsqzqvhpsfmr23gwhv795lgjc8uw0v44z3pe4sg2vlh08k0an3wx3cj96l2ln2 nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq37amnwvaz7tmwdaehgu3dwfjkccte9ejx2un9ddex7umn9ekk2tcqyqlhwrt96wnkf2w9edgr4cfruchvwkv26q6asdhz4qg08pm6w3djg3c8m4j \n\n\n#silentpayments\n\nhttps://blossom.primal.net/4d80e674b1e97310eaf1b0b612caa80dd7dfeef501f94440f70ecf1603fb3b64.png ",
"sig": "bc05cbe2527c6dadaf5d517fb853d2097a05367bc3c54bd5384570ff554310ebfd6399faa65406a7c1affe4f6e8bdc2909c775bd17b2c1af31dd49ac370514b1"
}