Ich habe kleine Beträge auf mehreren Konten in derselben Wallet. Ich möchte sie alle an das Standardkonto senden (normalerweise als "" bezeichnet). Ist für dieses Szenario ein RPC-Befehl verfügbar?
HINWEIS : Kontofunktionen sind veraltet und werden in Bitcoin Core entfernt v0.18.0
. Es wird empfohlen, label
ab und später zur API zu wechseln v0.17.0
, siehe Versionshinweise 14023 .
Je nachdem, was Sie zu tun versuchen, können Sie sie entweder mit move RPC verschieben :
move "fromaccount" "toaccount" amount ( minconf "comment" )
DEPRECATED. Move a specified amount from one account in your wallet to another.
Arguments:
1. "fromaccount" (string, required) The name of the account to move funds from. May be the default account using "".
2. "toaccount" (string, required) The name of the account to move funds to. May be the default account using "".
3. amount (numeric) Quantity of BTC to move between accounts.
4. (dummy) (numeric, optional) Ignored. Remains for backward compatibility.
5. "comment" (string, optional) An optional comment, stored in the wallet only.
Result: true|false (boolean) true if successful.
Examples:
Move 0.01 BTC from the default account to the account named tabby
> bitcoin-cli move "" "tabby" 0.01
Move 0.01 BTC timotei to akiko with a comment and funds have 6 confirmations
> bitcoin-cli move "timotei" "akiko" 0.01 6 "happy birthday!"
As a json rpc call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "move", "params": ["timotei", "akiko",
0.01, 6, "happy birthday!"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
Oder Sie können die Adresse des Standardkontos mit dem RPC getaccountaddress abrufen :
$ bitcoin-cli getaccountaddress ""
und senden Sie es dann mit sendfrom RPC an diese Adresse :
$ bitcoin-cli sendfrom <account-name> <to-address> <amount>
Madhu Krypto
JBaczuk
sendrawtransaction
rpc. Ich denke, wenn Siesendtoaddress
den vollen Betrag verwenden und senden, wird er von mehreren Konten abgerufen, aber die Kontofunktion funktioniert nicht wie erwartet und Bitcoin aktualisiert den Kontostand nicht.Madhu Krypto
JBaczuk
listaccounts
obwohl es an diese Adresse gesendet wurde. Tut mir leid, ich habe keinen wirklich guten Vorschlag für die Verwendung der Bitcoin Core Wallet, aber es gibt viele andere Wallet-Implementierungen, die wahrscheinlich besser dafür geeignet wären.