Post
Topic
Board Development & Technical Discussion
Re: Accounts bitcoin code
by
richerandprettier
on 15/05/2022, 06:27:38 UTC
Some pseudocode using the Accounts based commands in 0.1.0

print "send to " + getaccountaddress(username) + " to fund your account"
print "balance: " + getbalance(username, 0)
print "available balance: " + getbalance(username, 6)

// if you make a sale, move the money from their account to your "" account
if (move(username, "", amount, 6, "purchased item"))
    SendTheGoods()

// withdrawal
sendfrom(username, bitcoinaddress, amount, 6, "withdrawal by user")


You can use listtransactions(username) to show them a list of their recent transactions.

https://bitcointalk.org/Themes/custom1/images/bdaycake.gif

Bitcoin: 1GwvLW9qJ8uaYjew3cFvPiqxViWhuU1pKT