Bitcoin Forum
May 03, 2024, 05:18:19 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: send from address to address  (Read 206 times)
David9996 (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 2


View Profile
July 31, 2019, 11:53:50 PM
 #1

Hi Guys,

Thanks for the help. It's really good to see a community so warm and welcoming!

I got my client up and running, working with RPC :-)

I'm running a testnet client so I can mess with transactions (without losing my money by accident!).


I know that the SendFrom command is depreciated, There's two things I'm hoping you can help with.


1. How do I sendtoaddress but from a particular address, e.g. 1 user sending another bitcoin , how can i specify it to come from their address/label.
2. Setting up users and assigning their addresses through 'labels' (as i know the account feature is gone, would be ok?)
3. how can i calculate the sendfee?  - i used sendtxfee to '6' which  means 6 blocks = 20/40 mins, right?

Thanks
1714756699
Hero Member
*
Offline Offline

Posts: 1714756699

View Profile Personal Message (Offline)

Ignore
1714756699
Reply with quote  #2

1714756699
Report to moderator
1714756699
Hero Member
*
Offline Offline

Posts: 1714756699

View Profile Personal Message (Offline)

Ignore
1714756699
Reply with quote  #2

1714756699
Report to moderator
Make sure you back up your wallet regularly! Unlike a bank account, nobody can help you if you lose access to your BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4165


View Profile
August 01, 2019, 01:17:41 AM
Merited by ABCbits (1)
 #2

1. How do I sendtoaddress but from a particular address, e.g. 1 user sending another bitcoin , how can i specify it to come from their address/label.

You can use the createrawtransction command and specify which UTXO to be used in the transaction. You can use listunspent to find out the specific UTXOs to use. Thereafter, you can just sign the transaction normally.
2. Setting up users and assigning their addresses through 'labels' (as i know the account feature is gone, would be ok?)

Since labels don't have a balance associated with them, you can still group addresses together by labels but it would be troublesome to calculate the total balance.
3. how can i calculate the sendfee?  - i used sendtxfee to '6' which  means 6 blocks = 20/40 mins, right?
Do you mean settxfee? That command interprets 6 as 6BTC/KB and it doesn't have floating fee. You can use estimatesmartfee to get the floating fee and use another command to set the fee.



While creating the raw transaction, you can just select UTXOs with its total value that equates to the total output value. You can use fundrawtransaction to have the client add UTXOs for the fees.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
August 01, 2019, 03:54:44 AM
 #3

I know that the SendFrom command is depreciated, There's two things I'm hoping you can help with.
1. How do I sendtoaddress but from a particular address, e.g. 1 user sending another bitcoin , how can i specify it to come from their address/label.
2. Setting up users and assigning their addresses through 'labels' (as i know the account feature is gone, would be ok?)
It sounds like you're trying to setup some sort of online "custodial" type wallet where your users are able to send one another funds within the confines of your system. In this instance, you may be better off simply running like a "normal" custodial setup, controlling the wallets/addresses in the backend and using a database to track payments into, within and out of your system, rather than trying to have multiple users within essentially the same wallet.

You'd be able to generate receive addresses as required and simply assign a generated "deposit" address to a specific user in the database... If UserAAddress receives funds, then UserABalance = UserABalance + amount. If User A then wants to send User B funds, you simply alter the appropriate values in the database (off-chain). So UserABalance = UserABalance - amount... UserBBalance = UserBBalance + amount etc.

Should a user wish to withdraw funds from the service or send to an external address, you can then simply create a transaction from your master wallet, and it doesn't really matter what address the funds come from... you then simply debit the appropriate amount from the user balance... UserABalance = UserABalance - amount.

Obviously, this is a dramatic simplification of the setup, and you'd need to consider ways to minimise risk to the funds in your system wallet should your system security be compromised... most services tend to use a system of hot wallets and cold storage to achieve this.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!