Transaction

76fdca3cb80d7b6f354671dfd4a92312a8f24442ed3e86f69fcb5b2b1d4c4309
Timestamp (utc)
2024-03-28 04:40:20
Fee Paid
0.00000021 BSV
(
0.00632761 BSV
-
0.00632740 BSV
)
Fee Rate
10.15 sat/KB
Version
1
Confirmations
93,411
Size Stats
2,067 B

2 Outputs

Total Output:
0.00632740 BSV
  • j"1LAnZuoQdcKCkpDBKQMCgziGMoPC4VQUckM<div class="post">We need someone to write sample code, preferably Python or Java, showing the recommended way to use the JSON-RPC interface to create an account system.&nbsp; Most sites that sell things will need something like this.&nbsp; Someone who's kept up on the JSON-RPC threads here should have some idea how it should work.<br/><br/>When a user is logged in to their account, you show the bitcoin address they can send to to add funds.&nbsp; Before showing it, you check if it's been used, if it has then you replace it with a new one (getnewaddress &lt;username&gt;).&nbsp; You only need to keep the latest bitcoin address for the account in your database.&nbsp; (I posted a sample code fragment for this in an earlier thread somewhere, search on getnewaddress)<br/><br/>You use getreceivedbylabel &lt;username&gt; with the username as the label to get the "credit" amount of the account.&nbsp; You need to keep a "debit" amount in your database.&nbsp; The current balance of the account is (credit - debit).&nbsp; When the user spends money, you increase debit.<br/><br/>If you're requiring more than 0 confirmations, it's nice if you show the current balance (0 confirmations) and the available balance (1 or more confirmations), so they can immediately see that their payment is acknowledged.&nbsp; Not all sites need to wait for confirmations, so the dual current &amp; available should be optional.&nbsp; Most sites selling digital goods are fine to accept 0 confirmations. <br/><br/>A nice sample app for this would be a simple bank site, which would have the above, plus the option to send a payment to a bitcoin address.&nbsp; The sample code should be the simplest possible with the minimum extra stuff to make it a working site.<br/><br/>vekja.net is an example of a site like this.<br/></div> text/html
    https://whatsonchain.com/tx/76fdca3cb80d7b6f354671dfd4a92312a8f24442ed3e86f69fcb5b2b1d4c4309