Bitcoin-cli createrawtransaction with 3 outputs example
up vote
1
down vote
favorite
Is this possible to do?
I am trying to create a transaction with 1 input that will have 3 outputs.
I tried:
bitcoin-cli createrawtransaction "[{"txid":"b0d6607323d5dadcd67dd1b5b6d6e5f08b70c45d187c8cf17ebfa00f9c0fb65e","vout":1}]" "[{"2Mxmxo19LaqUePqkshcYQDzwW8SY6CpxzjN":0.00989748, "2N1ozs19uHsk2maPA5PiK8TEZQP8HfTd4Zn":0.23247816, "2NDgJmx7PykJRMK4QKTqUrfC6ewmccaq6fq":0.0001}]"
But get an error:
error code: -8
error message:
Invalid parameter, key-value pair must contain exactly one key
I don't understand what I'm doing wrong since the inputs and outputs both take in an array of values.
Any ideas?
This is version 0.17.0.
Here's the pretty print json
I'm pretty confident that there is no syntax issue.
"[
{
"txid": "b0d6607323d5dadcd67dd1b5b6d6e5f08b70c45d187c8cf17ebfa00f9c0fb65e",
"vout": 1
}
]"
"[
{
"2Mxmxo19LaqUePqkshcYQDzwW8SY6CpxzjN": 0.00989748,
"2N1ozs19uHsk2maPA5PiK8TEZQP8HfTd4Zn": 0.23247816,
"2NDgJmx7PykJRMK4QKTqUrfC6ewmccaq6fq": 0.0001
}
]"
json-rpc bitcoin-cli createrawtransaction
add a comment |
up vote
1
down vote
favorite
Is this possible to do?
I am trying to create a transaction with 1 input that will have 3 outputs.
I tried:
bitcoin-cli createrawtransaction "[{"txid":"b0d6607323d5dadcd67dd1b5b6d6e5f08b70c45d187c8cf17ebfa00f9c0fb65e","vout":1}]" "[{"2Mxmxo19LaqUePqkshcYQDzwW8SY6CpxzjN":0.00989748, "2N1ozs19uHsk2maPA5PiK8TEZQP8HfTd4Zn":0.23247816, "2NDgJmx7PykJRMK4QKTqUrfC6ewmccaq6fq":0.0001}]"
But get an error:
error code: -8
error message:
Invalid parameter, key-value pair must contain exactly one key
I don't understand what I'm doing wrong since the inputs and outputs both take in an array of values.
Any ideas?
This is version 0.17.0.
Here's the pretty print json
I'm pretty confident that there is no syntax issue.
"[
{
"txid": "b0d6607323d5dadcd67dd1b5b6d6e5f08b70c45d187c8cf17ebfa00f9c0fb65e",
"vout": 1
}
]"
"[
{
"2Mxmxo19LaqUePqkshcYQDzwW8SY6CpxzjN": 0.00989748,
"2N1ozs19uHsk2maPA5PiK8TEZQP8HfTd4Zn": 0.23247816,
"2NDgJmx7PykJRMK4QKTqUrfC6ewmccaq6fq": 0.0001
}
]"
json-rpc bitcoin-cli createrawtransaction
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Is this possible to do?
I am trying to create a transaction with 1 input that will have 3 outputs.
I tried:
bitcoin-cli createrawtransaction "[{"txid":"b0d6607323d5dadcd67dd1b5b6d6e5f08b70c45d187c8cf17ebfa00f9c0fb65e","vout":1}]" "[{"2Mxmxo19LaqUePqkshcYQDzwW8SY6CpxzjN":0.00989748, "2N1ozs19uHsk2maPA5PiK8TEZQP8HfTd4Zn":0.23247816, "2NDgJmx7PykJRMK4QKTqUrfC6ewmccaq6fq":0.0001}]"
But get an error:
error code: -8
error message:
Invalid parameter, key-value pair must contain exactly one key
I don't understand what I'm doing wrong since the inputs and outputs both take in an array of values.
Any ideas?
This is version 0.17.0.
Here's the pretty print json
I'm pretty confident that there is no syntax issue.
"[
{
"txid": "b0d6607323d5dadcd67dd1b5b6d6e5f08b70c45d187c8cf17ebfa00f9c0fb65e",
"vout": 1
}
]"
"[
{
"2Mxmxo19LaqUePqkshcYQDzwW8SY6CpxzjN": 0.00989748,
"2N1ozs19uHsk2maPA5PiK8TEZQP8HfTd4Zn": 0.23247816,
"2NDgJmx7PykJRMK4QKTqUrfC6ewmccaq6fq": 0.0001
}
]"
json-rpc bitcoin-cli createrawtransaction
Is this possible to do?
I am trying to create a transaction with 1 input that will have 3 outputs.
I tried:
bitcoin-cli createrawtransaction "[{"txid":"b0d6607323d5dadcd67dd1b5b6d6e5f08b70c45d187c8cf17ebfa00f9c0fb65e","vout":1}]" "[{"2Mxmxo19LaqUePqkshcYQDzwW8SY6CpxzjN":0.00989748, "2N1ozs19uHsk2maPA5PiK8TEZQP8HfTd4Zn":0.23247816, "2NDgJmx7PykJRMK4QKTqUrfC6ewmccaq6fq":0.0001}]"
But get an error:
error code: -8
error message:
Invalid parameter, key-value pair must contain exactly one key
I don't understand what I'm doing wrong since the inputs and outputs both take in an array of values.
Any ideas?
This is version 0.17.0.
Here's the pretty print json
I'm pretty confident that there is no syntax issue.
"[
{
"txid": "b0d6607323d5dadcd67dd1b5b6d6e5f08b70c45d187c8cf17ebfa00f9c0fb65e",
"vout": 1
}
]"
"[
{
"2Mxmxo19LaqUePqkshcYQDzwW8SY6CpxzjN": 0.00989748,
"2N1ozs19uHsk2maPA5PiK8TEZQP8HfTd4Zn": 0.23247816,
"2NDgJmx7PykJRMK4QKTqUrfC6ewmccaq6fq": 0.0001
}
]"
json-rpc bitcoin-cli createrawtransaction
json-rpc bitcoin-cli createrawtransaction
edited Nov 11 at 6:30
asked Nov 11 at 6:25
mocode10
103
103
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
You need to use (simplified notation) [{addr:amount},{addr:amount}]
for the outputs, not [{addr:amount,addr:amount}]
. This is to permit multiple outputs with the same address (which wouldn't be valid JSON in your assumed syntax).
A simpler alternative also exists, namely {addr:amount,addr:amount}
.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
You need to use (simplified notation) [{addr:amount},{addr:amount}]
for the outputs, not [{addr:amount,addr:amount}]
. This is to permit multiple outputs with the same address (which wouldn't be valid JSON in your assumed syntax).
A simpler alternative also exists, namely {addr:amount,addr:amount}
.
add a comment |
up vote
2
down vote
accepted
You need to use (simplified notation) [{addr:amount},{addr:amount}]
for the outputs, not [{addr:amount,addr:amount}]
. This is to permit multiple outputs with the same address (which wouldn't be valid JSON in your assumed syntax).
A simpler alternative also exists, namely {addr:amount,addr:amount}
.
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
You need to use (simplified notation) [{addr:amount},{addr:amount}]
for the outputs, not [{addr:amount,addr:amount}]
. This is to permit multiple outputs with the same address (which wouldn't be valid JSON in your assumed syntax).
A simpler alternative also exists, namely {addr:amount,addr:amount}
.
You need to use (simplified notation) [{addr:amount},{addr:amount}]
for the outputs, not [{addr:amount,addr:amount}]
. This is to permit multiple outputs with the same address (which wouldn't be valid JSON in your assumed syntax).
A simpler alternative also exists, namely {addr:amount,addr:amount}
.
answered Nov 11 at 7:45
Pieter Wuille
44.6k390151
44.6k390151
add a comment |
add a comment |
Thanks for contributing an answer to Bitcoin Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fbitcoin.stackexchange.com%2fquestions%2f80905%2fbitcoin-cli-createrawtransaction-with-3-outputs-example%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown