Bitcoin Forum
July 06, 2024, 05:30:27 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Multiple Addresses in Default Account to connect Bitcoin to NXT  (Read 681 times)
l8orre (OP)
Legendary
*
Offline Offline

Activity: 1181
Merit: 1018


View Profile
June 27, 2014, 03:50:13 PM
 #1

I am currently building a Bridge Adaptor to emulate the Bitcoin Api and connect bitcoind-api calls to the NXT server.

Unfortunately, I am a bit confused by the 'accounts' features in the wallet.

The most pertinent question I have to solve is this:


since the bitcoin call 'sendtoaddress' always debits the default account in the wallet (wiki), which one of the addresses that may be associated with the default account is debited?

It appears to me that if the default account (denominated by the empty string "") is associated with multiple addresses, then the 'sendtoaddress' call would have to choose one of these addresses.

Is this correct?

And if the amount to be sent would exceed the amount in any of the individual addresses associated with the default account, but be smaller than the sum of the amounts in the addresses in the default account, would this result in multiple transactions being sent from the multiple addresses in the default account?

And how would the addresses to be sent from be chosen?


I would be grateful for tips from BTC wallet experts, Thank You!




en.bitcoin.it/wiki/Accounts_explained#The_Default_Account

Account Names

Accounts are named with arbitrary strings; you may use any JSON string other than "*" (JSON strings are sent and returned as UTF-8 encoded Unicode).

Bitcoin creates two accounts automatically: it implicitly creates a default account with the empty string as its name, and it explicitly creates an account named Your Address when a new wallet is created.
The Default Account

The default account is named with the empty string ("" in JSON). Generated coins are always credited to the default account, and the sendtoaddress method always debits the default account.
Accounts and Receiving Addresses

Each account is associated with zero or more receiving addresses, and every receiving address is associated with exactly one account. Coins sent to a receiving address in the wallet are credited to the associated account.
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!