Do you mean to say that the user can combine data and address entries?
The outputs array, outputs []
, must contain at minimum either an obj containing {"address" ".."}
or an obj containing {"data": ".."}
. You can also specify both, but you must have at least one.
I’m reading over this block of help text again.
0(json array, required) The outputs (key-value pairs), where none of the keys are duplicated.
1 That is, each address can only appear once and there can only be one 'data' object.
2 For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also
3 accepted as second parameter.
just using separate objs
0[
1 {
2 "bc1address1":"0.01",
3 },
4 {
5 "bc1address2":"0.02",
6 },
7 {
8 "data":"ff00ff00ff"
9 }
10]
or…
Also note:
a dictionary, which holds the key-value pairs directly, is also accepted as second parameter.
I believe this is saying you can also do something like:
0[
1 {
2 "bc1address1":"0.01",
3 "bc1address2":"0.02",
4 "data":"ff00ff00ff"
5 }
6]
I think this style is for compatibility reasons per docs, so I’m guessing it’s preferred/future proof to break everything out into individual objects. Please correct me if I’m wrong!
Current:
"Either {\"data\"} or {\"address\"}, are required, but specifying both is optional.\n"
Something like this be better?:
"At least one object containing the key \"data\" or \"address\" is required.\n"