name_history "name" ( options )
Looks up the current and all past data for the given name. -namehistory must be enabled.
Arguments:
1. name (string, required) The name to query for
2. options (json object, optional) Options for this RPC call
{
"nameEncoding": "str", (string) Encoding ("ascii", "utf8" or "hex") of the name argument
"valueEncoding": "str", (string) Encoding ("ascii", "utf8" or "hex") of the value argument
"byHash": "str", (string) Interpret "name" as hash ("direct" or "sha256d")
}
Result:
[ (json array)
{ (json object)
"name" : "str", (string) the requested name
"name_encoding" : "str", (string) the encoding of "name"
"name_error" : "str", (string) replaces "name" in case there is an error
"value" : "str", (string) the name's current value
"value_encoding" : "str", (string) the encoding of "value"
"value_error" : "str", (string) replaces "value" in case there is an error
"txid" : "hex", (string) the name's last update tx
"vout" : n, (numeric) the index of the name output in the last update
"address" : "str", (string) the address holding the name
"ismine" : true|false, (boolean) whether the name is owned by the wallet
"height" : n (numeric) the name's last update height
},
...
]
Examples:
> spacexpanse-cli name_history "myname"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "name_history", "params": ["myname"]}' -H 'content-type: text/plain;' http://127.0.0.1:11998/
[
{
"name": "name",
"detailsLines": [],
"properties": [
"string",
"required"
],
"description": "The name to query for"
},
{
"name": "options",
"detailsLines": [
" {",
" \"nameEncoding\": \"str\", (string) Encoding (\"ascii\", \"utf8\" or \"hex\") of the name argument",
" \"valueEncoding\": \"str\", (string) Encoding (\"ascii\", \"utf8\" or \"hex\") of the value argument",
" \"byHash\": \"str\", (string) Interpret \"name\" as hash (\"direct\" or \"sha256d\")",
" }"
],
"properties": [
"json object",
"optional"
],
"description": "Options for this RPC call"
}
]