Kevacoin Client/API calls list
Kevacoin is derived from Bitcoin and it shares many common commands and APIs. Kevacoin has a new set of APIs/Commands for key-value related operations, which are documented here. For other APIs/Commands, please refer to Bitcoin's RPC API Reference.
To list all commands, or get help for specific Kevacoin command:
kevacoin-cli help
kevacoin-cli help getnewaddress
NOTE
The following "account" related wallet commands are deprecated and will be removed in the future releases:
getaccount
getaccountaddress
getaddressesbyaccount
getreceivedbyaccount
listaccounts
listreceivedbyaccount
move
setaccount
Instead, use getnewaddress to get a new address:
kevacoin-cli getnewaddress
Use sendtoaddress to send an amount to a given address:
kevacoin-cli sendtoaddress VTRMKQcFgd4LQyoBT28GNBrt9f6AaEUVJn 0.1
Key-value related operations
keva_namespace
Create a namepsace with the given display name.
Arguments
<display_name>: (string, required) The display name of the namespace. This is for your internal use only and does not require to be unique across the network.
Results
[
{
txid: xxxxxxxxxxxxxx, (string) Transaction Id
namespaceId: Nxxxxxx (string) Unique namespace id, with "N" prefix.
}
]
Examples
kevacoin-cli keva_namespace "my first namespace"
[
{
"txid": "244fcb0f30e26b0fbf346e82494a7ae5e8c3d7e3e70974105e9a19d1b92cb4f5",
"namespaceId": "NfjHmcWxHndbfMRG7FeXWtmBEaRp896wBC"
}
]
keva_list_namespaces
List all the namespaces belong to the current wallet.
Arguments
None.
Results
[
{
NamespaceId : Display Name
}
]
Examples
kevacoin-cli keva_list_namespaces
[
{
"NfjHmcWxHndbfMRG7FeXWtmBEaRp896wBC": "my first namespace"
}
]
keva_put
Insert or update a key value pair in the given namespace.
Arguments
-
<namespaceId>: (string, required) The namespace Id (with "N" prefix) returned by thekeva_namepsacethe call. It is the namespace in which key-pair will be inserted or updated. -
<key>: (string, required) The key, with maximum size 255 bytes. -
<value>: (string, required) The value, with maximum size 3072 bytes. -
<address>: (string, optional) (Version 0.16.7.0 or above) Transfer the namespace to the given address. Use the option to transfer the namespace to a different wallet (warning: you will no longer be able to update the namespace if it is in a different wallet).
Results
The transaction id of this operation.
Examples
kevacoin-cli keva_put NfjHmcWxHndbfMRG7FeXWtmBEaRp896wBC "first key" "first value" eb6eb57259b5468a156bbca77d56b4863349e1b4bcf7795a6037aef39530b319
keva_pending
List all the pending key-value transactions belong to the current wallet.
Arguments
Results
[
{
"op": (string) name of operation
"namespace": (string) namespace id
"display name": (string) display name of the namespace
"txid": (string) transaction Id
}
]
Examples
kevacoin-cli keva_pending
[
{
"op": "keva_namespace",
"namespace": "NfjHmcWxHndbfMRG7FeXWtmBEaRp896wBC",
"display name": "my first namespace",
"txid": "244fcb0f30e26b0fbf346e82494a7ae5e8c3d7e3e70974105e9a19d1b92cb4f5"
},
{
"op": "keva_put",
"namespace": "NfjHmcWxHndbfMRG7FeXWtmBEaRp896wBC",
"key": "first key",
"value": "first value",
"txid": "eb6eb57259b5468a156bbca77d56b4863349e1b4bcf7795a6037aef39530b319"
}
]
keva_get
Retrieve the value associated with the given key.
Arguments
-
<namespaceId>: (string, required) The namespace Id (with "N" prefix) which holds the key-value pair. -
<key>: (string, required) The key.
Results
The value associated with the key in the specified namespace.
Examples
kevacoin-cli keva_get NfjHmcWxHndbfMRG7FeXWtmBEaRp896wBC "first key" first value
keva_delete
Delete the key-value pair in the given namespace.
Arguments
-
<namespaceId>: (string, required) The namespace Id (with "N" prefix) which holds the key-value pair. -
<key>: (string, required) The key.
Results
The transaction id of this operation.
Examples
kevacoin-cli keva_delete NfjHmcWxHndbfMRG7FeXWtmBEaRp896wBC "first key" bf9f4d5767576e511c8277ef8474a8a47f925306a06ebe01a53f8b116ffcc836
keva_filter
Scan and list keys matching a regular expression.
Arguments
-
<namespace>(string) namespace Id -
<regexp>(string, optional) filter keys with this regexp -
<maxage>(numeric, optional, default=36000) only consider names updated in the last<maxage>blocks; 0 means all names -
<from>(numeric, optional, default=0) return from this position onward; index starts at 0. -
<nb>(numeric, optional, default=0) return only<nb>entries; 0 means all. -
<stat>(string, optional) if set to the string<stat>, print statistics instead of returning the names
Results
[
{
"name": (string) the name of the key,
"value": (string) the value associated with the key,
"txid": (string) transaction id,
"address": (string) address that holds this key-value pair,
"height": (number) the height of the block that holds this transaction.
}
]
Examples
kevacoin-cli keva_filter NfjHmcWxHndbfMRG7FeXWtmBEaRp896wBC "first*"
[
{
"name": "first key",
"value": "first value",
"txid": "7620f6b81997f99c47d478157cbe8129b9841afa0337cb9a80a78d9d9d2bf27f",
"vout": 0,
"address": "K9ATguB1UJjTKgYmySGWf7sHBVMf9ME2zM",
"height": 650
}
]