WebRTC TipXmr Idea

# TipXmr TipXmr is a free software solution for accepting monero supercharts without the overhead of existing solutions such as shadowpay which require running and configuring a virtual private server w/ DNS settings or a local server and configuring the associated NAT settings. TipXmr uses WebRTC to establish direct peer-to-peer connections in the browser to send data from the sender to the reciever of a tip along with the associated superchat message. WebAssembly bindings to the monero library are then used to scan blocks for the payments on the blockchain. TipXmr aims to be: - Fully non-custodial, tips are sent directly to a wallet of your choosing. - Transaction data and messages are sent directly peer-to-peer. - Accepting payments is as easy as opening a webpage and sharing a link. - Easy to integrate with OBS - Application can be self-hosted, and _all_ server dependencies can be easily modified: - STUN - used to gather self IP metadata used for establishing a peer-to-peer WebRTC connections. - SaltyRTC - end-to-end encrypted signalling protocol used to send/recieve connection offers for establishing WebRTC connections. - Monero Node - a local or remote node used to scan for incoming transactions # Basic Flow - Streamer opens `https://tipxmr.com/[dashboard]` which opens up their superchat dashboard. - They choose either `external wallet` or `browser wallet` mode. If they select `existing wallet` a box to upload a _view key_ is provided - if they choose this option superchats can be _confirmed_. They provide a name for this wallet. - They can then choose a _monero node_ to connect to with the following defaults: - (Ideal) A detected locally hosted node - One of a number of community run nodes (with a sensible default) - Enter a custom address - They can choose to override the default STUN server `webrtc.stun.tipxmr.com` with one of their own choosing (advanced). - They can choose to override the default salty signalling server `webrtc.saltyrtc.tipxmr.com` (advanced) - After having completed the wallet creation wizard they will be able to download a `<name>.wallet.json` file to their computer which contains something like: ```json { "name": "<name>", "wallet": { "type": "browser" | "external", // browser wallet fields "created_date": "2022-04-05 T19:00:102", "seed": ["fish", "basketball", ...], // external wallet fields "view_key": "18fc..." }, "config": { "node": "node.sethforprivacy.com:18089", "stun": "stun.stunprotocol.org", "salty": { "host": "server.saltyrtc.org", "port": "443", "key": "8fe...", ... } } } ``` They can then enter a password for the wallet to encrypt the file in local storage. The usual 'ensure you have backed up the above file/seed phrase...' message is shown when using a browser wallet (along w/ a recommendation to use an external wallet). Wallets can be restored using these files. - The streamers wallet is selected and they are prompted to enter the password to decrypt the config stored in local storage. A connection is made to their selected STUN server, monero node and SaltyRTC server. The status is displayed (along with any errors) in a bar at the top of the page along with the synchronization status. A link with the tipping url is displayed e.g. `https://tipxmr.com/tip#d18f..123f` - Viewers then visit `https://tipxmr.com/tip#d18f..123f` at which point they can enter a superchat. The information necessary to connect to the streamer is encoded after the `#`. - The Viewer writes their message and enters the amount they wish to send, this is then communicated to via WebRTC to the server, which generates a payment url which is send back to the viewer and displays as a QR code. - The viewer then makes the payment using the provided QR code in their preferred wallet. - They than continue to poll the steamer via WebRTC for confirmation of the payment, at which point it is shown as recieved. If however the streamer is not using a 'confirmation' style wallet (existing but no view keys) it is marked as 'recieved'. - If the streamer goes offline, a message is displayed to the viewer. - The streamer can click a button to pop-out a view of the superchat feed for use with OBS in a seperate window, or copy a url such as `https://tipxmr.com/obs?mode=default&show_unconfirmed#85f...fhR` which contains the nessacery metadata to connect to the other 'server' tab and authenticate as a view to recieve the superchat messages which are then displayed nicely. 


submitted by /u/Low_Application_7086
[link] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *