Autodoc manual

This commit is contained in:
zano build machine 2024-05-10 17:49:16 +03:00
parent d009116ea7
commit 74e656705e
45 changed files with 2157 additions and 1 deletions

2
.gitignore vendored
View file

@ -18,4 +18,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
docs/build

View file

@ -0,0 +1,25 @@
Check spent status of given key images.
URL: ```http:://127.0.0.1:11211/check_keyimages.bin```
### Request:
```json
{
}
```
### Request description:
```
```
### Response:
```json
{
"images_stat": [0],
"status": "OK"
}
```
### Response description:
```
"images_stat": List of spent states, where 1 means unspent and 0 means spent.
"status": Status of the call.
```

View file

@ -0,0 +1,23 @@
NO DESCRIPTION
URL: ```http:://127.0.0.1:11211/force_relay```
### Request:
```json
{
}
```
### Request description:
```
```
### Response:
```json
{
"status": "OK"
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,36 @@
Retrieves a specified portion of all registered aliases, allowing pagination through large sets of aliases.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "get_aliases",
"params": {
"count": 0,
"offset": 0
}
}
```
### Request description:
```
"count": The number of aliases to retrieve from the specified offset.
"offset": The offset in the list of all aliases from which to start retrieving.
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,53 @@
Obtain information for the given asset by its ID.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "get_asset_info",
"params": {
"asset_id": "cc4e69455e63f4a581257382191de6856c2156630b3fba0db4bdd73ffcfb36b6"
}
}
```
### Request description:
```
"asset_id": ID of an asset.
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"asset_descriptor": {
"current_supply": 500000000000000000,
"decimal_point": 12,
"full_name": "Zano wrapped USD",
"hidden_supply": false,
"meta_info": "Stable and private",
"owner": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8",
"ticker": "ZUSD",
"total_max_supply": 1000000000000000000
},
"status": "OK"
}
}
```
### Response description:
```
"asset_descriptor": Descriptor of the given asset.
"current_supply": Currently emitted supply for given asset
"decimal_point": Decimal point
"full_name": Full name of the asset
"hidden_supply": This one reserved for future use, will be documented later
"meta_info": Any other information assetiaded with asset in a free form
"owner": Owner's key, used to validate any operations on the asset altering, could be changed in case of transfer ownership
"ticker": Ticker associated with asset
"total_max_supply": Maximum possible supply for given asset, can't be changed after deployment
"status": Status of the call.
```

View file

@ -0,0 +1,57 @@
Return list of assets registered in Zano blockchain
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "get_assets_list",
"params": {
"count": 100,
"offset": 0
}
}
```
### Request description:
```
"count": Number of items to recieve
"offset": Offset for the item to start copying
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"assets": [{
"asset_id": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8",
"current_supply": 500000000000000000,
"decimal_point": 12,
"full_name": "Zano wrapped USD",
"hidden_supply": false,
"meta_info": "Stable and private",
"owner": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8",
"ticker": "ZUSD",
"total_max_supply": 1000000000000000000
}],
"status": "OK"
}
}
```
### Response description:
```
"assets": List of assets registered in Zano blockchain
"asset_id": Asset ID
"current_supply": Currently emitted supply for given asset
"decimal_point": Decimal point
"full_name": Full name of the asset
"hidden_supply": This one reserved for future use, will be documented later
"meta_info": Any other information assetiaded with asset in a free form
"owner": Owner's key, used to validate any operations on the asset altering, could be changed in case of transfer ownership
"ticker": Ticker associated with asset
"total_max_supply": Maximum possible supply for given asset, can't be changed after deployment
"status": Status code of operation, OK if success
```

View file

@ -0,0 +1,23 @@
Obtain global outputs' indexes for the given txs.
URL: ```http:://127.0.0.1:11211/get_o_indexes.bin```
### Request:
```json
{
}
```
### Request description:
```
```
### Response:
```json
{
"status": "OK"
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,34 @@
Obtain basic information about the transaction pool.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "get_pool_info",
"params": {
}
}
```
### Request description:
```
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"error_code": "",
"status": "OK"
}
}
```
### Response description:
```
"error_code": Error code, if there's any error (optional).
"status": Status code, OK if succeeded.
```

View file

@ -0,0 +1,33 @@
Retrieves basic information regarding PoS mining, including current PoS conditions and constraints.
URL: ```http:://127.0.0.1:11211/get_pos_details.bin```
### Request:
```json
{
}
```
### Request description:
```
```
### Response:
```json
{
"last_block_hash": "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
"pos_basic_difficulty": "",
"pos_mining_allowed": false,
"pos_sequence_factor_is_good": false,
"sm": "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
"starter_timestamp": 0,
"status": "OK"
}
```
### Response description:
```
"pos_basic_difficulty": Current PoS difficulty.
"pos_mining_allowed": Indicates whether PoS mining is currently allowed, which may be restricted under certain blockchain conditions or in testnets.
"pos_sequence_factor_is_good": Indicates whether the PoS sequence factor is at a level that allows for continued PoS mining, requiring a PoW block to reset if too high.
"starter_timestamp": Timestamp from which timestamps are evaluated for meeting PoS win condition.
"status": Status of the call.
```

View file

@ -0,0 +1,27 @@
Retreives transactions from tx pool (and other information).
URL: ```http:://127.0.0.1:11211/get_tx_pool.bin```
### Request:
```json
{
}
```
### Request description:
```
```
### Response:
```json
{
"status": "OK",
"tx_expiration_ts_median": 0,
"txs": ["7d914497d91442f8f3c2268397d914497d91442f8f3c22683585eaa60b53757d49bf046a96269cef45c1bc9ff7300cc2f8f3c22683585eaa60b53757d49bf046a96269cef45c1bc9ff7300cc"]
}
```
### Response description:
```
"status": Status of the call.
"tx_expiration_ts_median": Timestamp median value of last TX_EXPIRATION_TIMESTAMP_CHECK_WINDOW blocks.
"txs": Transactions as blobs.
```

View file

@ -0,0 +1,43 @@
Get votes' results from the given block range.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "get_votes",
"params": {
"h_end": 40000,
"h_start": 0
}
}
```
### Request description:
```
"h_end": End of the block range to serach in (excluding).
"h_start": Start of the block range to search in (including).
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"error_code": "",
"status": "OK",
"votes": {
"total_pos_blocks": 87482
}
}
}
```
### Response description:
```
"error_code": Error code, if any.
"status": Status of the call.
"votes": Found votes in the given range.
"total_pos_blocks": Number of blocks in a given range.
```

View file

@ -0,0 +1,29 @@
NO DESCRIPTION
URL: ```http:://127.0.0.1:11211/getblocks.bin```
### Request:
```json
{
"minimum_height": 0
}
```
### Request description:
```
"minimum_height": The minimum height of the returning buch of blocks.
```
### Response:
```json
{
"current_height": 0,
"start_height": 0,
"status": "OK"
}
```
### Response description:
```
"current_height": Current height of the blockchain.
"start_height": Starting height of the resulting bunch of blocks.
"status": Status of the call.
```

View file

@ -0,0 +1,25 @@
Return current blockchain height
URL: ```http:://127.0.0.1:11211/getheight```
### Request:
```json
{
}
```
### Request description:
```
```
### Response:
```json
{
"height": 11111,
"status": "OK"
}
```
### Response description:
```
"height": Height of the blockchain (equals to top block's height + 1).
"status": Status of the call.
```

View file

@ -0,0 +1,27 @@
Retrieve random decoy outputs for specified amounts (legacy format).
URL: ```http:://127.0.0.1:11211/getrandom_outs.bin```
### Request:
```json
{
"outs_count": 0,
"use_forced_mix_outs": false
}
```
### Request description:
```
"outs_count": Number of decoy outputs requested for each amount.
"use_forced_mix_outs": If true, only outputs with a 'mix_attr' greater than 0 are used as decoys.
```
### Response:
```json
{
"status": "OK"
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,36 @@
Retrieve random decoy outputs for specified amounts (legacy format).
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "getrandom_outs",
"params": {
"outs_count": 0,
"use_forced_mix_outs": false
}
}
```
### Request description:
```
"outs_count": Number of decoy outputs requested for each amount.
"use_forced_mix_outs": If true, only outputs with a 'mix_attr' greater than 0 are used as decoys.
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,29 @@
Retrieve random decoy outputs for specified amounts, to be used for mixing in transactions.
URL: ```http:://127.0.0.1:11211/getrandom_outs1.bin```
### Request:
```json
{
"decoys_count": 0,
"height_upper_limit": 0,
"use_forced_mix_outs": false
}
```
### Request description:
```
"decoys_count": Number of decoy outputs required for each amount specified.
"height_upper_limit": Maximum blockchain height from which decoys can be taken. If nonzero, decoys must be at this height or older.
"use_forced_mix_outs": If true, only outputs with a 'mix_attr' greater than 0 are used as decoys.
```
### Response:
```json
{
"status": "OK"
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,38 @@
Retrieve random decoy outputs for specified amounts, to be used for mixing in transactions.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "getrandom_outs1",
"params": {
"decoys_count": 0,
"height_upper_limit": 0,
"use_forced_mix_outs": false
}
}
```
### Request description:
```
"decoys_count": Number of decoy outputs required for each amount specified.
"height_upper_limit": Maximum blockchain height from which decoys can be taken. If nonzero, decoys must be at this height or older.
"use_forced_mix_outs": If true, only outputs with a 'mix_attr' greater than 0 are used as decoys.
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,29 @@
Version 3 of the command to retrieve random decoy outputs for specified amounts, focusing on either pre-zarcanum or post-zarcanum zones based on the amount value.
URL: ```http:://127.0.0.1:11211/getrandom_outs3.bin```
### Request:
```json
{
"coinbase_percents": 0,
"height_upper_limit": 0,
"use_forced_mix_outs": false
}
```
### Request description:
```
"coinbase_percents": Specifies the estimated percentage of coinbase outputs to be included in the decoy sets, ranging from 0 to 100.
"height_upper_limit": Maximum blockchain height from which decoys can be taken. If nonzero, decoys must be at this height or older.
"use_forced_mix_outs": If true, only outputs with a 'mix_attr' greater than 0 are used as decoys.
```
### Response:
```json
{
"status": "OK"
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,38 @@
Version 3 of the command to retrieve random decoy outputs for specified amounts, focusing on either pre-zarcanum or post-zarcanum zones based on the amount value.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "getrandom_outs3",
"params": {
"coinbase_percents": 0,
"height_upper_limit": 0,
"use_forced_mix_outs": false
}
}
```
### Request description:
```
"coinbase_percents": Specifies the estimated percentage of coinbase outputs to be included in the decoy sets, ranging from 0 to 100.
"height_upper_limit": Maximum blockchain height from which decoys can be taken. If nonzero, decoys must be at this height or older.
"use_forced_mix_outs": If true, only outputs with a 'mix_attr' greater than 0 are used as decoys.
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,27 @@
Retreive transactions by their IDs.
URL: ```http:://127.0.0.1:11211/gettransactions```
### Request:
```json
{
}
```
### Request description:
```
```
### Response:
```json
{
"missed_tx": ["97d91442f8f3c22683585eaa60b53757d49bf046a96269cef45c1bc9ff7300cc"],
"status": "OK",
"txs_as_hex": ["7d914497d91442f8f3c2268397d914497d91442f8f3c22683585eaa60b53757d49bf046a96269cef45c1bc9ff7300cc2f8f3c22683585eaa60b53757d49bf046a96269cef45c1bc9ff7300cc"]
}
```
### Response description:
```
"missed_tx": Missed transactions hashes
"status": Status of the call.
"txs_as_hex": Transactions stored as blobs
```

View file

@ -0,0 +1,32 @@
Removes specified transactions from the transaction pool, typically to clear out transactions that are no longer valid or needed.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "remove_tx_from_pool",
"params": {
}
}
```
### Request description:
```
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,25 @@
Broadcasts a raw transaction encoded in hexadecimal format to the network.
URL: ```http:://127.0.0.1:11211/sendrawtransaction```
### Request:
```json
{
"tx_as_hex": ""
}
```
### Request description:
```
"tx_as_hex": The transaction data as a hexadecimal string, ready for network broadcast.
```
### Response:
```json
{
"status": "OK"
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,25 @@
NO DESCRIPTION
URL: ```http:://127.0.0.1:11211/set_maintainers_info.bin```
### Request:
```json
{
"maintainers_info_buff": "",
"sign": "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
}
```
### Request description:
```
```
### Response:
```json
{
"status": "OK"
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,27 @@
Initiates PoW mining process on a node using the specified miner address and the number of CPU threads.
URL: ```http:://127.0.0.1:11211/start_mining```
### Request:
```json
{
"miner_address": "",
"threads_count": 0
}
```
### Request description:
```
"miner_address": The address where the mining rewards will be deposited.
"threads_count": The number of CPU threads to use for mining.
```
### Response:
```json
{
"status": "OK"
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,23 @@
Stop PoW mining process on CPU.
URL: ```http:://127.0.0.1:11211/stop_mining```
### Request:
```json
{
}
```
### Request description:
```
```
### Response:
```json
{
"status": "OK"
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,34 @@
Adds new block to the blockchain.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "submitblock2",
"params": {
"b": ""
}
}
```
### Request description:
```
"b": Hex-encoded serialized block.
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
```
### Response description:
```
"status": Status of the call.
```

View file

@ -0,0 +1,53 @@
Add given asset id to local whitelist. This whitelist is stored with the wallet file and reset in case of wallet resync or restoring wallet from seed phrase.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "assets_whitelist_add",
"params": {
"asset_id": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8"
}
}
```
### Request description:
```
"asset_id": Asset id that needed to be added to local whitelist, asset_id must exist in the network
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"asset_descriptor": {
"current_supply": 500000000000000000,
"decimal_point": 12,
"full_name": "Zano wrapped USD",
"hidden_supply": false,
"meta_info": "Stable and private",
"owner": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8",
"ticker": "ZUSD",
"total_max_supply": 1000000000000000000
},
"status": "OK"
}
}
```
### Response description:
```
"asset_descriptor": Details of the asset, recieved from node
"current_supply": Currently emitted supply for given asset
"decimal_point": Decimal point
"full_name": Full name of the asset
"hidden_supply": This one reserved for future use, will be documented later
"meta_info": Any other information assetiaded with asset in a free form
"owner": Owner's key, used to validate any operations on the asset altering, could be changed in case of transfer ownership
"ticker": Ticker associated with asset
"total_max_supply": Maximum possible supply for given asset, can't be changed after deployment
"status": Status of the asset
```

View file

@ -0,0 +1,93 @@
Get whitelisted assets for this wallet, assets descriptors present in any of the lists in results would be present in balance() call results(if those assets are part of the wallet transfers). Assets that are not included in those lists won't be included in balance even if the wallet own inputs with such assets.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "assets_whitelist_get",
"params": {
}
}
```
### Request description:
```
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"global_whitelist": [{
"asset_id": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8",
"current_supply": 500000000000000000,
"decimal_point": 12,
"full_name": "Zano wrapped USD",
"hidden_supply": false,
"meta_info": "Stable and private",
"owner": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8",
"ticker": "ZUSD",
"total_max_supply": 1000000000000000000
}],
"local_whitelist": [{
"asset_id": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8",
"current_supply": 500000000000000000,
"decimal_point": 12,
"full_name": "Zano wrapped USD",
"hidden_supply": false,
"meta_info": "Stable and private",
"owner": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8",
"ticker": "ZUSD",
"total_max_supply": 1000000000000000000
}],
"own_assets": [{
"asset_id": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8",
"current_supply": 500000000000000000,
"decimal_point": 12,
"full_name": "Zano wrapped USD",
"hidden_supply": false,
"meta_info": "Stable and private",
"owner": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8",
"ticker": "ZUSD",
"total_max_supply": 1000000000000000000
}]
}
}
```
### Response description:
```
"global_whitelist": Global whitelist, well-known assets with adoption, mantained by the team and community
"asset_id": Asset ID
"current_supply": Currently emitted supply for given asset
"decimal_point": Decimal point
"full_name": Full name of the asset
"hidden_supply": This one reserved for future use, will be documented later
"meta_info": Any other information assetiaded with asset in a free form
"owner": Owner's key, used to validate any operations on the asset altering, could be changed in case of transfer ownership
"ticker": Ticker associated with asset
"total_max_supply": Maximum possible supply for given asset, can't be changed after deployment
"local_whitelist": Local whitelist, assets that hase been added to this wallet file manually(!)
"asset_id": Asset ID
"current_supply": Currently emitted supply for given asset
"decimal_point": Decimal point
"full_name": Full name of the asset
"hidden_supply": This one reserved for future use, will be documented later
"meta_info": Any other information assetiaded with asset in a free form
"owner": Owner's key, used to validate any operations on the asset altering, could be changed in case of transfer ownership
"ticker": Ticker associated with asset
"total_max_supply": Maximum possible supply for given asset, can't be changed after deployment
"own_assets": Own assets, the ones that is under control of this wallet
"asset_id": Asset ID
"current_supply": Currently emitted supply for given asset
"decimal_point": Decimal point
"full_name": Full name of the asset
"hidden_supply": This one reserved for future use, will be documented later
"meta_info": Any other information assetiaded with asset in a free form
"owner": Owner's key, used to validate any operations on the asset altering, could be changed in case of transfer ownership
"ticker": Ticker associated with asset
"total_max_supply": Maximum possible supply for given asset, can't be changed after deployment
```

View file

@ -0,0 +1,34 @@
Remove given asset id from local whitelist. This whitelist is stored with the wallet file and reset in case of wallet resync or restoring wallet from seed phrase.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "assets_whitelist_remove",
"params": {
"asset_id": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8"
}
}
```
### Request description:
```
"asset_id": Asset id to be removed from local whitelist
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
```
### Response description:
```
"status": Command result (OK if success)
```

View file

@ -0,0 +1,34 @@
Trivially decrypt base64 encoded data message with chacha using wallet spend key
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "decrypt_data",
"params": {
"buff": "ZGNjc2Ztc2xrZm12O2xrZm12OydlbGtmdm0nbGtmbXY="
}
}
```
### Request description:
```
"buff": base64 encoded data message to be decrypted
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"res_buff": "ZGNjc2Ztc2xrZm12O2xrZm12OydlbGtmdm0nbGtmbXY="
}
}
```
### Response description:
```
"res_buff": base64 encoded resulted data message
```

View file

@ -0,0 +1,62 @@
Deploy new asset in the system.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "deploy_asset",
"params": {
"asset_descriptor": {
"current_supply": 500000000000000000,
"decimal_point": 12,
"full_name": "Zano wrapped USD",
"hidden_supply": false,
"meta_info": "Stable and private",
"owner": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8",
"ticker": "ZUSD",
"total_max_supply": 1000000000000000000
},
"destinations": [{
"address": "ZxBvJDuQjMG9R2j4WnYUhBYNrwZPwuyXrC7FHdVmWqaESgowDvgfWtiXeNGu8Px9B24pkmjsA39fzSSiEQG1ekB225ZnrMTBp",
"amount": 10000000000000,
"asset_id": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852"
}]
}
}
```
### Request description:
```
"asset_descriptor": Descriptor that holds all information about asset - ticker, emission, description etc
"current_supply": Currently emitted supply for given asset
"decimal_point": Decimal point
"full_name": Full name of the asset
"hidden_supply": This one reserved for future use, will be documented later
"meta_info": Any other information assetiaded with asset in a free form
"owner": Owner's key, used to validate any operations on the asset altering, could be changed in case of transfer ownership
"ticker": Ticker associated with asset
"total_max_supply": Maximum possible supply for given asset, can't be changed after deployment
"destinations": Addresses where to receive emitted coins. Asset id in destinations should be set to 0000000000000000000000000000000000000000000000000000000000000000
"address": Destination address
"amount": Amount to transfer to destination
"asset_id": Asset id to transfer
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"new_asset_id": "40fa6db923728b38962718c61b4dc3af1acaa1967479c73703e260dc3609c58d",
"result_tx": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8"
}
}
```
### Response description:
```
"new_asset_id": Issued asset id
"result_tx": Id of transaction that carries asset registration command, asset would be registered as soon as transaction got confirmed
```

View file

@ -0,0 +1,43 @@
Emmit new coins of the the asset, that is controlled by this wallet.
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "emit_asset",
"params": {
"asset_id": "40fa6db923728b38962718c61b4dc3af1acaa1967479c73703e260dc3609c58d",
"destinations": [{
"address": "ZxBvJDuQjMG9R2j4WnYUhBYNrwZPwuyXrC7FHdVmWqaESgowDvgfWtiXeNGu8Px9B24pkmjsA39fzSSiEQG1ekB225ZnrMTBp",
"amount": 10000000000000,
"asset_id": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852"
}]
}
}
```
### Request description:
```
"asset_id": Id of the asset to emit more coins
"destinations": Addresses where to receive emitted coins. Asset id in destinations should be set to 0000000000000000000000000000000000000000000000000000000000000000
"address": Destination address
"amount": Amount to transfer to destination
"asset_id": Asset id to transfer
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"result_tx": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8"
}
}
```
### Response description:
```
"result_tx": Id of transaction that carries asset registration command, asset would be registered as soon as transaction got confirmed
```

View file

@ -0,0 +1,34 @@
Trivially encrypt base64 encoded data message with chacha using wallet spend key
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "encrypt_data",
"params": {
"buff": "ZGNjc2Ztc2xrZm12O2xrZm12OydlbGtmdm0nbGtmbXY="
}
}
```
### Request description:
```
"buff": base64 encoded data message to be encrypted
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"res_buff": "ZGNjc2Ztc2xrZm12O2xrZm12OydlbGtmdm0nbGtmbXY="
}
}
```
### Response description:
```
"res_buff": base64 encoded resulted data message
```

View file

@ -0,0 +1,38 @@
Return information about wallet's pre-zarcanum era outputs. Those outputs should be converted to post-zarcanum varian with trnasfering it sooner or later. (Only outputs that have been created in Zarcanum era can participaet in staking)
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "get_bare_outs_stats",
"params": {
}
}
```
### Request description:
```
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"expected_total_fee": 10000000000,
"total_amount": 12000000000000,
"total_bare_outs": 112,
"txs_count": 2
}
}
```
### Response description:
```
"expected_total_fee": Expected total transaction fee required for processing the transaction.
"total_amount": Total amount of native coins involved in bare outputs.
"total_bare_outs": Total number of inspent bare outputs in the wallet.
"txs_count": Total number of transactions needed to convert all bare outputs .
```

View file

@ -0,0 +1,139 @@
Returns wallet history of transactions V2(post-zarcanum version)
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "get_recent_txs_and_info2",
"params": {
"count": 100,
"exclude_mining_txs": false,
"exclude_unconfirmed": false,
"offset": 0,
"order": "FROM_END_TO_BEGIN",
"update_provision_info": true
}
}
```
### Request description:
```
"count": How many items to fetch, if items fetched is less then count, then it enumeration is over
"exclude_mining_txs": Exclude mining/staking transactions from results(last_item_index should be used for subsequential calls)
"exclude_unconfirmed": Do not include uncomfirmed transactions in results (it also not included is offset is non zero)
"offset": Offset from what index to start fetching transfers entries(if filters are used then last_item_index could be used from previous call)
"order": Order: "FROM_BEGIN_TO_END" or "FROM_END_TO_BEGIN"
"update_provision_info": If update pi is required, could be false only if need to optimize performance(appliable for a veru big wallets)
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"last_item_index": 1,
"pi": {
"balance": 100000000000,
"curent_height": 121212,
"transfer_entries_count": 3,
"transfers_count": 1,
"unlocked_balance": 90000000000
},
"total_transfers": 1,
"transfers": [{
"comment": "Comment here",
"contract": [{
"cancel_expiration_time": 0,
"contract_id": "0000000000000000000000000000000000000000000000000000000000000000",
"expiration_time": 0,
"height": 0,
"is_a": false,
"payment_id": "",
"private_detailes": {
"a_addr": "ZxBiDtnzhro111111111111111111111111111111111111111111111111111111111111111111111111111111116xzE1X",
"a_pledge": 0,
"b_addr": "ZxBiDtnzhro111111111111111111111111111111111111111111111111111111111111111111111111111111116xzE1X",
"b_pledge": 0,
"c": "",
"t": "",
"to_pay": 0
},
"state": 0,
"timestamp": 0
}],
"employed_entries": {
},
"fee": 10000000000,
"height": 0,
"is_mining": false,
"is_mixing": false,
"is_service": false,
"payment_id": "00000000ff00ff00",
"remote_addresses": ["ZxBvJDuQjMG9R2j4WnYUhBYNrwZPwuyXrC7FHdVmWqaESgowDvgfWtiXeNGu8Px9B24pkmjsA39fzSSiEQG1ekB225ZnrMTBp"],
"remote_aliases": ["roger"],
"service_entries": [{
"body": "dcfd7e055a6a3043ea3541a571a57a63e25dcc64e4a270f14fa9a58ac5dbec85dcfd7e055a6a3043ea3541a571a57a63e25dcc64e4a270f14fa9a58ac5dbec85",
"flags": 0,
"instruction": "K",
"security": "d8f6e37f28a632c06b0b3466db1b9d2d1b36a580ee35edfd971dc1423bc412a5",
"service_id": "C"
}],
"show_sender": false,
"subtransfers": [{
"amount": 1000000000000,
"asset_id": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"is_income": false
}],
"timestamp": 1712590951,
"transfer_internal_index": 12,
"tx_blob_size": 0,
"tx_hash": "5509650e12c8f901e6731a2bfaf3abfd64409e3e1366d3d94cd11db8beddb0c3",
"tx_type": 0,
"unlock_time": 0
}]
}
}
```
### Response description:
```
"last_item_index": Last item index
"pi": Details on wallet balance etc
"balance": Current balance of native coins
"curent_height": Current sync height of the wallet
"transfer_entries_count": Number of UTXO entries in wallet
"transfers_count": Number of transfers in wallet
"unlocked_balance": Unlocked balance oof native coins
"total_transfers": Total transfers
"transfers": Transfers
"comment": Some human-readable comment
"contract": Escrow contract if it's part of transaction
"employed_entries": Mark entries from transaction that was connected to this wallet
"fee": Transaction fee
"height": Height of the block that included transaction(0 i transaction is unconfirmed)
"is_mining": Tells if this transaction is coinbase transaction(ie generated by PoW mining or by PoS staking)
"is_mixing": Tells if this transaction using mixins or not(auditble wallets normally don't use mixins)
"is_service": Tells if this transaction is used as utility by one of Zano services(contracts, ionic swaps, etc)
"payment_id": HEX-encoded payment id blob, if it was present
"remote_addresses": Remote addresses of this transfer(destination if it's outgoing transfer or sender if it's incoming transaction)
"remote_aliases": Aliases for remot addresses, of discovered
"service_entries": Additional entries that might be stored in transaction but not part of it's consensus
"body": Hex-encoded body of the attachment
"flags": Flags that help wallet to automatically process some properties of the attachment(combination of TX_SERVICE_ATTACHMENT_ENCRYPT_BODY=1, TX_SERVICE_ATTACHMENT_DEFLATE_BODY=2, TX_SERVICE_ATTACHMENT_ENCRYPT_BODY_ISOLATE_AUDITABLE=4,TX_SERVICE_ATTACHMENT_ENCRYPT_ADD_PROOF=8 )
"instruction": Instruction that make sence for this particular service
"security": Hex-encoded public key of the owner, optional
"service_id": Service ID, identificator that diferent one service from another
"show_sender": If sender is included in tx
"subtransfers": Essential part of transfer entry: amounts that been transfered in this transaction grouped by asset id
"amount": Amount of asset the had been transfered
"asset_id": Asset id
"is_income": Indicates if transfer was income our outgoing
"timestamp": Timestamp of the block that included transaction in blockchain, 0 for unconfirmed
"transfer_internal_index": Index of this entry in the wallet's array of transaction's history
"tx_blob_size": Size of transaction in bytes
"tx_hash": Transaction ID(hash)
"tx_type": Could be one of this: GUI_TX_TYPE_NORMAL=0, GUI_TX_TYPE_PUSH_OFFER=1, GUI_TX_TYPE_UPDATE_OFFER=2, GUI_TX_TYPE_CANCEL_OFFER=3, GUI_TX_TYPE_NEW_ALIAS=4,GUI_TX_TYPE_UPDATE_ALIAS=5,GUI_TX_TYPE_COIN_BASE=6,GUI_TX_TYPE_ESCROW_PROPOSAL=7,GUI_TX_TYPE_ESCROW_TRANSFER=8,GUI_TX_TYPE_ESCROW_RELEASE_NORMAL=9,GUI_TX_TYPE_ESCROW_RELEASE_BURN=10,GUI_TX_TYPE_ESCROW_CANCEL_PROPOSAL=11,GUI_TX_TYPE_ESCROW_RELEASE_CANCEL=12,GUI_TX_TYPE_HTLC_DEPOSIT=13,GUI_TX_TYPE_HTLC_REDEEM=14
"unlock_time": Unlock time of this transfer (if present)
```

View file

@ -0,0 +1,40 @@
Cancel existing offer that this wallet created(it actually create transaction that says that existing order got canceled)
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "marketplace_cancel_offer",
"params": {
"fee": 10000000000,
"no": 0,
"tx_id": "40fa6db923728b38962718c61b4dc3af1acaa1967479c73703e260dc3609c58d"
}
}
```
### Request description:
```
"fee": Fee for operation
"no": Number of offer entrie inside transacton(likely 0)
"tx_id": Transaction ID represented as a hexadecimal string
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"tx_blob_size": 1232,
"tx_hash": "40fa6db923728b38962718c61b4dc3af1acaa1967479c73703e260dc3609c58d"
}
}
```
### Response description:
```
"tx_blob_size": Size of the transaction blob
"tx_hash": Transaction hash
```

View file

@ -0,0 +1,118 @@
Fetch wallet's offers listed in the marketplace with given filters
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "marketplace_get_offers_ex",
"params": {
"filter": {
"amount_low_limit": 0,
"amount_up_limit": 0,
"bonus": false,
"category": "",
"keyword": "tubes",
"limit": 100,
"location_city": "",
"location_country": "",
"offer_type_mask": 0,
"offset": 0,
"order_by": 0,
"primary": "",
"rate_low_limit": "0.1",
"rate_up_limit": "0.1",
"reverse": false,
"target": "",
"timestamp_start": 0,
"timestamp_stop": 0
}
}
}
```
### Request description:
```
"filter": Filter options.
"amount_low_limit": Lower limit for the amount of offers
"amount_up_limit": Upper limit for the amount of offers
"bonus": Bonus associated with the offers
"category": Category of the offers
"keyword": Keyword for searching offers
"limit": Maximum number of results to return
"location_city": City of the location for the offers
"location_country": Country of the location for the offers
"offer_type_mask": Mask representing the types of offers to include in the results, conbination of this: OFFER_TYPE_MASK_PRIMARY_TO_TARGET 0x00000001, OFFER_TYPE_MASK_TARGET_TO_PRIMARY 0x00000002, OFFER_TYPE_MASK_GOODS_TO_PRIMARY 0x00000004, OFFER_TYPE_MASK_PRIMARY_TO_GOODS 0x00000008
"offset": Offset for pagination
"order_by": Field to order the results by one on this: ORDER_BY_TIMESTAMP=0,ORDER_BY_AMOUNT_PRIMARY=1,ORDER_BY_AMOUNT_TARGET=2,ORDER_BY_AMOUNT_RATE=3,ORDER_BY_PAYMENT_TYPES=4,ORDER_BY_CONTACTS=5,ORDER_BY_LOCATION=6,ORDER_BY_NAME=7
"primary": Primary field for the offers
"rate_low_limit": Lower limit for the rate
"rate_up_limit": Upper limit for the rate
"reverse": Flag to indicate whether the results should be sorted in reverse order
"target": Target entity of the offers
"timestamp_start": Start timestamp for filtering results
"timestamp_stop": Stop timestamp for filtering results
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"offers": [{
"ap": "100000",
"at": "10000000",
"b": "",
"cat": "",
"cnt": "Ranko +38211111111",
"com": "Dobr dan",
"do": "full amount, by parts",
"et": 0,
"fee": 10000000000,
"index_in_tx": 0,
"lci": "Kolasin",
"lco": "Montenegro",
"ot": 0,
"p": "ZANO",
"pt": "zano",
"security": "40fa6db923728b38962718c61b4dc3af1acaa1967479c73703e260dc3609c58d",
"t": "USDT",
"timestamp": 1712683857,
"tx_hash": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"tx_original_hash": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"url": ""
}],
"status": "OK",
"total_offers": 1
}
}
```
### Response description:
```
"offers": List of offers related to the operation.
"ap": Amount of the currency
"at": Smount of other currency or goods
"b": Bonus associated with the offer
"cat": Category of the offer
"cnt": Contacts related to the offer
"com": Comment associated with the offer
"do": Deal option for the offer
"et": Expiration time of the offer
"fee": Fee associated with the transaction
"index_in_tx": Index of the tx_service_attachment entrie in transaction
"lci": City of the offer location
"lco": Country of the offer location
"ot": Type of the offer: OFFER_TYPE_PRIMARY_TO_TARGET(SELL ORDER) - 0, OFFER_TYPE_TARGET_TO_PRIMARY(BUY ORDER) - 1 etc.
"p": Currency for goods
"pt": Types of payment accepted for the offer
"security": Onwer's public key for access control
"t": Target: currency / goods
"timestamp": Timestamp of the transaction
"tx_hash": Transaction hash represented as a hexadecimal string
"tx_original_hash": Origin transaction hash represented as a hexadecimal string(if offer updated)
"url": URL for previewing the offer
"status": Status of the operation.
"total_offers": Total number of offers.
```

View file

@ -0,0 +1,78 @@
Creates new offer and publish it on the blockchain
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "marketplace_push_offer",
"params": {
"od": {
"ap": "100000",
"at": "10000000",
"b": "",
"cat": "",
"cnt": "Ranko +38211111111",
"com": "Dobr dan",
"do": "full amount, by parts",
"et": 0,
"fee": 10000000000,
"index_in_tx": 0,
"lci": "Kolasin",
"lco": "Montenegro",
"ot": 0,
"p": "ZANO",
"pt": "zano",
"security": "40fa6db923728b38962718c61b4dc3af1acaa1967479c73703e260dc3609c58d",
"t": "USDT",
"timestamp": 1712683857,
"tx_hash": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"tx_original_hash": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"url": ""
}
}
}
```
### Request description:
```
"ap": Amount of the currency
"at": Smount of other currency or goods
"b": Bonus associated with the offer
"cat": Category of the offer
"cnt": Contacts related to the offer
"com": Comment associated with the offer
"do": Deal option for the offer
"et": Expiration time of the offer
"fee": Fee associated with the transaction
"index_in_tx": Index of the tx_service_attachment entrie in transaction
"lci": City of the offer location
"lco": Country of the offer location
"ot": Type of the offer: OFFER_TYPE_PRIMARY_TO_TARGET(SELL ORDER) - 0, OFFER_TYPE_TARGET_TO_PRIMARY(BUY ORDER) - 1 etc.
"p": Currency for goods
"pt": Types of payment accepted for the offer
"security": Onwer's public key for access control
"t": Target: currency / goods
"timestamp": Timestamp of the transaction
"tx_hash": Transaction hash represented as a hexadecimal string
"tx_original_hash": Origin transaction hash represented as a hexadecimal string(if offer updated)
"url": URL for previewing the offer
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"tx_blob_size": 1234,
"tx_hash": "40fa6db923728b38962718c61b4dc3af1acaa1967479c73703e260dc3609c58d"
}
}
```
### Response description:
```
"tx_blob_size": Size of the transaction blob
"tx_hash": Transaction hash
```

View file

@ -0,0 +1,82 @@
Updates existing offer that this wallet created, and publish updated version on the blockchain
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "marketplace_push_update_offer",
"params": {
"no": 0,
"od": {
"ap": "100000",
"at": "10000000",
"b": "",
"cat": "",
"cnt": "Ranko +38211111111",
"com": "Dobr dan",
"do": "full amount, by parts",
"et": 0,
"fee": 10000000000,
"index_in_tx": 0,
"lci": "Kolasin",
"lco": "Montenegro",
"ot": 0,
"p": "ZANO",
"pt": "zano",
"security": "40fa6db923728b38962718c61b4dc3af1acaa1967479c73703e260dc3609c58d",
"t": "USDT",
"timestamp": 1712683857,
"tx_hash": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"tx_original_hash": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"url": ""
},
"tx_id": "40fa6db923728b38962718c61b4dc3af1acaa1967479c73703e260dc3609c58d"
}
}
```
### Request description:
```
"no": Number of offer entrie inside transacton(likely 0)
"ap": Amount of the currency
"at": Smount of other currency or goods
"b": Bonus associated with the offer
"cat": Category of the offer
"cnt": Contacts related to the offer
"com": Comment associated with the offer
"do": Deal option for the offer
"et": Expiration time of the offer
"fee": Fee associated with the transaction
"index_in_tx": Index of the tx_service_attachment entrie in transaction
"lci": City of the offer location
"lco": Country of the offer location
"ot": Type of the offer: OFFER_TYPE_PRIMARY_TO_TARGET(SELL ORDER) - 0, OFFER_TYPE_TARGET_TO_PRIMARY(BUY ORDER) - 1 etc.
"p": Currency for goods
"pt": Types of payment accepted for the offer
"security": Onwer's public key for access control
"t": Target: currency / goods
"timestamp": Timestamp of the transaction
"tx_hash": Transaction hash represented as a hexadecimal string
"tx_original_hash": Origin transaction hash represented as a hexadecimal string(if offer updated)
"url": URL for previewing the offer
"tx_id": Transaction ID represented as a hexadecimal string
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"tx_blob_size": 1232,
"tx_hash": "40fa6db923728b38962718c61b4dc3af1acaa1967479c73703e260dc3609c58d"
}
}
```
### Response description:
```
"tx_blob_size": Size of the transaction blob
"tx_hash": Transaction hash
```

View file

@ -0,0 +1,38 @@
Proxy call to daemon(node), might be not effective in some cases, so need to be carefull with use of it
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "proxy_to_daemon",
"params": {
"base64_body": "ewogICAgImpzb25ycGMiOiAiMi4wIiwKICAgICJpZCI6IDAsCiAgICAibWV0aG9kIjogImdldF9taW5pbmdfaGlzdG9yeSIKfQ==",
"uri": "\/json_rpc"
}
}
```
### Request description:
```
"base64_body": Base64 encoded request body
"uri": URI for daemon API
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"base64_body": "ewogICJpZCI6IDAsCiAgImpzb25ycGMiOiAiMi4wIiwKICAicmVzdWx0IjogewogICAgInBheW1lbnRzIjogWwogICAgICB7CiAgICAgICAgInBheW1lbnRfaWQiOiAiMDAwMDAwMDBmZjAwZmYwMCIsCiAgICAgICAgImFtb3VudCI6IDEwMDAwMDAwMCwKICAgICAgICAiYmxvY2tfaGVpZ2h0IjogMjAyNTU2LAogICAgICAgICJ0eF9oYXNoIjogIjAxMjIwZTgzMDRkNDZiOTQwYTg2ZTM4M2Q1NWNhNTg4N2IzNGYxNThhNzM2NWJiY2RkMTdjNWEzMDU4MTRhOTMiLAogICAgICAgICJ1bmxvY2tfdGltZSI6IDAKICAgICAgfSwKICAgICAgewogICAgICAgICJwYXltZW50X2lkIjogIjAwMDAwMDAwZmYwMGZmMDEiLAogICAgICAgICJhbW91bnQiOiAxMDAwMDAwMDAsCiAgICAgICAgImJsb2NrX2hlaWdodCI6IDIwMjU1NiwKICAgICAgICAidHhfaGFzaCI6ICIwYjVlYjk2ODVjMGMxMWRiNzdlMmNkZDk4NzljOGQzYjgxNTUyM2M2ZTRiZjAzZGNlZTYyYzU4M2I3ZTFmNzcyIiwKICAgICAgICAidW5sb2NrX3RpbWUiOiAwCiAgICAgIH0KICAgIF0KICB9Cn0=",
"response_code": 200
}
}
```
### Response description:
```
"base64_body": Base64 encoded daemon response body
"response_code": Response code
```

View file

@ -0,0 +1,45 @@
Register an alias for the address
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "register_alias",
"params": {
"al": {
"address": "ZxCSpsGGeJsS8fwvQ4HktDU3qBeauoJTR6j73jAWWZxFXdF7XTbGm4YfS2kXJmAP4Rf5BVsSQ9iZ45XANXEYsrLN2L2W77dH7",
"alias": "zxdya6q6whzwqjkmtcsjpc3ku",
"comment": "Society is never gonna make any progress until we all learn to pretend to like each other.",
"tracking_key": "18bb94f69ed61b47b6556f3871b89dff8f9a6f4f798f706fd199b05ccf8ef20c"
},
"authority_key": ""
}
}
```
### Request description:
```
"al": Alias details
"address": Address of the alias.
"alias": Alias itself, a brief shortcut for an address.
"comment": Arbitrary comment (optional).
"tracking_key": View secret key of the corresponding address (optional).
"authority_key": Key for registering aliases shorter than 6 letters (team)
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"tx_id": "97d91442f8f3c22683585eaa60b53757d49bf046a96269cef45c1bc9ff7300cc"
}
}
```
### Response description:
```
"tx_id": If success - transactions that performs registration(alias becomes available after few confirmations)
```

View file

@ -0,0 +1,284 @@
Search for transacrions in the wallet by few parameters
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "search_for_transactions2",
"params": {
"filter_by_height": true,
"in": true,
"max_height": 20000,
"min_height": 11000,
"out": true,
"pool": false,
"tx_id": "97d91442f8f3c22683585eaa60b53757d49bf046a96269cef45c1bc9ff7300cc"
}
}
```
### Request description:
```
"filter_by_height": Do filter transactions by height or not.
"in": Search over incoming transactions.
"max_height": Maximum height for filtering transactions.
"min_height": Minimum height for filtering transactions.
"out": Search over outgoing transactions.
"pool": Search over pool transactions.
"tx_id": Transaction ID represented as a hexadecimal string.
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"in": [{
"comment": "Comment here",
"contract": [{
"cancel_expiration_time": 0,
"contract_id": "0000000000000000000000000000000000000000000000000000000000000000",
"expiration_time": 0,
"height": 0,
"is_a": false,
"payment_id": "",
"private_detailes": {
"a_addr": "ZxBiDtnzhro111111111111111111111111111111111111111111111111111111111111111111111111111111116xzE1X",
"a_pledge": 0,
"b_addr": "ZxBiDtnzhro111111111111111111111111111111111111111111111111111111111111111111111111111111116xzE1X",
"b_pledge": 0,
"c": "",
"t": "",
"to_pay": 0
},
"state": 0,
"timestamp": 0
}],
"employed_entries": {
},
"fee": 10000000000,
"height": 0,
"is_mining": false,
"is_mixing": false,
"is_service": false,
"payment_id": "00000000ff00ff00",
"remote_addresses": ["ZxBvJDuQjMG9R2j4WnYUhBYNrwZPwuyXrC7FHdVmWqaESgowDvgfWtiXeNGu8Px9B24pkmjsA39fzSSiEQG1ekB225ZnrMTBp"],
"remote_aliases": ["roger"],
"service_entries": [{
"body": "dcfd7e055a6a3043ea3541a571a57a63e25dcc64e4a270f14fa9a58ac5dbec85dcfd7e055a6a3043ea3541a571a57a63e25dcc64e4a270f14fa9a58ac5dbec85",
"flags": 0,
"instruction": "K",
"security": "d8f6e37f28a632c06b0b3466db1b9d2d1b36a580ee35edfd971dc1423bc412a5",
"service_id": "C"
}],
"show_sender": false,
"subtransfers": [{
"amount": 1000000000000,
"asset_id": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"is_income": false
}],
"timestamp": 1712590951,
"transfer_internal_index": 12,
"tx_blob_size": 0,
"tx_hash": "5509650e12c8f901e6731a2bfaf3abfd64409e3e1366d3d94cd11db8beddb0c3",
"tx_type": 0,
"unlock_time": 0
}],
"out": [{
"comment": "Comment here",
"contract": [{
"cancel_expiration_time": 0,
"contract_id": "0000000000000000000000000000000000000000000000000000000000000000",
"expiration_time": 0,
"height": 0,
"is_a": false,
"payment_id": "",
"private_detailes": {
"a_addr": "ZxBiDtnzhro111111111111111111111111111111111111111111111111111111111111111111111111111111116xzE1X",
"a_pledge": 0,
"b_addr": "ZxBiDtnzhro111111111111111111111111111111111111111111111111111111111111111111111111111111116xzE1X",
"b_pledge": 0,
"c": "",
"t": "",
"to_pay": 0
},
"state": 0,
"timestamp": 0
}],
"employed_entries": {
},
"fee": 10000000000,
"height": 0,
"is_mining": false,
"is_mixing": false,
"is_service": false,
"payment_id": "00000000ff00ff00",
"remote_addresses": ["ZxBvJDuQjMG9R2j4WnYUhBYNrwZPwuyXrC7FHdVmWqaESgowDvgfWtiXeNGu8Px9B24pkmjsA39fzSSiEQG1ekB225ZnrMTBp"],
"remote_aliases": ["roger"],
"service_entries": [{
"body": "dcfd7e055a6a3043ea3541a571a57a63e25dcc64e4a270f14fa9a58ac5dbec85dcfd7e055a6a3043ea3541a571a57a63e25dcc64e4a270f14fa9a58ac5dbec85",
"flags": 0,
"instruction": "K",
"security": "d8f6e37f28a632c06b0b3466db1b9d2d1b36a580ee35edfd971dc1423bc412a5",
"service_id": "C"
}],
"show_sender": false,
"subtransfers": [{
"amount": 1000000000000,
"asset_id": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"is_income": false
}],
"timestamp": 1712590951,
"transfer_internal_index": 12,
"tx_blob_size": 0,
"tx_hash": "5509650e12c8f901e6731a2bfaf3abfd64409e3e1366d3d94cd11db8beddb0c3",
"tx_type": 0,
"unlock_time": 0
}],
"pool": [{
"comment": "Comment here",
"contract": [{
"cancel_expiration_time": 0,
"contract_id": "0000000000000000000000000000000000000000000000000000000000000000",
"expiration_time": 0,
"height": 0,
"is_a": false,
"payment_id": "",
"private_detailes": {
"a_addr": "ZxBiDtnzhro111111111111111111111111111111111111111111111111111111111111111111111111111111116xzE1X",
"a_pledge": 0,
"b_addr": "ZxBiDtnzhro111111111111111111111111111111111111111111111111111111111111111111111111111111116xzE1X",
"b_pledge": 0,
"c": "",
"t": "",
"to_pay": 0
},
"state": 0,
"timestamp": 0
}],
"employed_entries": {
},
"fee": 10000000000,
"height": 0,
"is_mining": false,
"is_mixing": false,
"is_service": false,
"payment_id": "00000000ff00ff00",
"remote_addresses": ["ZxBvJDuQjMG9R2j4WnYUhBYNrwZPwuyXrC7FHdVmWqaESgowDvgfWtiXeNGu8Px9B24pkmjsA39fzSSiEQG1ekB225ZnrMTBp"],
"remote_aliases": ["roger"],
"service_entries": [{
"body": "dcfd7e055a6a3043ea3541a571a57a63e25dcc64e4a270f14fa9a58ac5dbec85dcfd7e055a6a3043ea3541a571a57a63e25dcc64e4a270f14fa9a58ac5dbec85",
"flags": 0,
"instruction": "K",
"security": "d8f6e37f28a632c06b0b3466db1b9d2d1b36a580ee35edfd971dc1423bc412a5",
"service_id": "C"
}],
"show_sender": false,
"subtransfers": [{
"amount": 1000000000000,
"asset_id": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"is_income": false
}],
"timestamp": 1712590951,
"transfer_internal_index": 12,
"tx_blob_size": 0,
"tx_hash": "5509650e12c8f901e6731a2bfaf3abfd64409e3e1366d3d94cd11db8beddb0c3",
"tx_type": 0,
"unlock_time": 0
}]
}
}
```
### Response description:
```
"in": List of incoming transactions.
"comment": Some human-readable comment
"contract": Escrow contract if it's part of transaction
"employed_entries": Mark entries from transaction that was connected to this wallet
"fee": Transaction fee
"height": Height of the block that included transaction(0 i transaction is unconfirmed)
"is_mining": Tells if this transaction is coinbase transaction(ie generated by PoW mining or by PoS staking)
"is_mixing": Tells if this transaction using mixins or not(auditble wallets normally don't use mixins)
"is_service": Tells if this transaction is used as utility by one of Zano services(contracts, ionic swaps, etc)
"payment_id": HEX-encoded payment id blob, if it was present
"remote_addresses": Remote addresses of this transfer(destination if it's outgoing transfer or sender if it's incoming transaction)
"remote_aliases": Aliases for remot addresses, of discovered
"service_entries": Additional entries that might be stored in transaction but not part of it's consensus
"body": Hex-encoded body of the attachment
"flags": Flags that help wallet to automatically process some properties of the attachment(combination of TX_SERVICE_ATTACHMENT_ENCRYPT_BODY=1, TX_SERVICE_ATTACHMENT_DEFLATE_BODY=2, TX_SERVICE_ATTACHMENT_ENCRYPT_BODY_ISOLATE_AUDITABLE=4,TX_SERVICE_ATTACHMENT_ENCRYPT_ADD_PROOF=8 )
"instruction": Instruction that make sence for this particular service
"security": Hex-encoded public key of the owner, optional
"service_id": Service ID, identificator that diferent one service from another
"show_sender": If sender is included in tx
"subtransfers": Essential part of transfer entry: amounts that been transfered in this transaction grouped by asset id
"amount": Amount of asset the had been transfered
"asset_id": Asset id
"is_income": Indicates if transfer was income our outgoing
"timestamp": Timestamp of the block that included transaction in blockchain, 0 for unconfirmed
"transfer_internal_index": Index of this entry in the wallet's array of transaction's history
"tx_blob_size": Size of transaction in bytes
"tx_hash": Transaction ID(hash)
"tx_type": Could be one of this: GUI_TX_TYPE_NORMAL=0, GUI_TX_TYPE_PUSH_OFFER=1, GUI_TX_TYPE_UPDATE_OFFER=2, GUI_TX_TYPE_CANCEL_OFFER=3, GUI_TX_TYPE_NEW_ALIAS=4,GUI_TX_TYPE_UPDATE_ALIAS=5,GUI_TX_TYPE_COIN_BASE=6,GUI_TX_TYPE_ESCROW_PROPOSAL=7,GUI_TX_TYPE_ESCROW_TRANSFER=8,GUI_TX_TYPE_ESCROW_RELEASE_NORMAL=9,GUI_TX_TYPE_ESCROW_RELEASE_BURN=10,GUI_TX_TYPE_ESCROW_CANCEL_PROPOSAL=11,GUI_TX_TYPE_ESCROW_RELEASE_CANCEL=12,GUI_TX_TYPE_HTLC_DEPOSIT=13,GUI_TX_TYPE_HTLC_REDEEM=14
"unlock_time": Unlock time of this transfer (if present)
"out": List of outgoing transactions.
"comment": Some human-readable comment
"contract": Escrow contract if it's part of transaction
"employed_entries": Mark entries from transaction that was connected to this wallet
"fee": Transaction fee
"height": Height of the block that included transaction(0 i transaction is unconfirmed)
"is_mining": Tells if this transaction is coinbase transaction(ie generated by PoW mining or by PoS staking)
"is_mixing": Tells if this transaction using mixins or not(auditble wallets normally don't use mixins)
"is_service": Tells if this transaction is used as utility by one of Zano services(contracts, ionic swaps, etc)
"payment_id": HEX-encoded payment id blob, if it was present
"remote_addresses": Remote addresses of this transfer(destination if it's outgoing transfer or sender if it's incoming transaction)
"remote_aliases": Aliases for remot addresses, of discovered
"service_entries": Additional entries that might be stored in transaction but not part of it's consensus
"body": Hex-encoded body of the attachment
"flags": Flags that help wallet to automatically process some properties of the attachment(combination of TX_SERVICE_ATTACHMENT_ENCRYPT_BODY=1, TX_SERVICE_ATTACHMENT_DEFLATE_BODY=2, TX_SERVICE_ATTACHMENT_ENCRYPT_BODY_ISOLATE_AUDITABLE=4,TX_SERVICE_ATTACHMENT_ENCRYPT_ADD_PROOF=8 )
"instruction": Instruction that make sence for this particular service
"security": Hex-encoded public key of the owner, optional
"service_id": Service ID, identificator that diferent one service from another
"show_sender": If sender is included in tx
"subtransfers": Essential part of transfer entry: amounts that been transfered in this transaction grouped by asset id
"amount": Amount of asset the had been transfered
"asset_id": Asset id
"is_income": Indicates if transfer was income our outgoing
"timestamp": Timestamp of the block that included transaction in blockchain, 0 for unconfirmed
"transfer_internal_index": Index of this entry in the wallet's array of transaction's history
"tx_blob_size": Size of transaction in bytes
"tx_hash": Transaction ID(hash)
"tx_type": Could be one of this: GUI_TX_TYPE_NORMAL=0, GUI_TX_TYPE_PUSH_OFFER=1, GUI_TX_TYPE_UPDATE_OFFER=2, GUI_TX_TYPE_CANCEL_OFFER=3, GUI_TX_TYPE_NEW_ALIAS=4,GUI_TX_TYPE_UPDATE_ALIAS=5,GUI_TX_TYPE_COIN_BASE=6,GUI_TX_TYPE_ESCROW_PROPOSAL=7,GUI_TX_TYPE_ESCROW_TRANSFER=8,GUI_TX_TYPE_ESCROW_RELEASE_NORMAL=9,GUI_TX_TYPE_ESCROW_RELEASE_BURN=10,GUI_TX_TYPE_ESCROW_CANCEL_PROPOSAL=11,GUI_TX_TYPE_ESCROW_RELEASE_CANCEL=12,GUI_TX_TYPE_HTLC_DEPOSIT=13,GUI_TX_TYPE_HTLC_REDEEM=14
"unlock_time": Unlock time of this transfer (if present)
"pool": List of pool transactions.
"comment": Some human-readable comment
"contract": Escrow contract if it's part of transaction
"employed_entries": Mark entries from transaction that was connected to this wallet
"fee": Transaction fee
"height": Height of the block that included transaction(0 i transaction is unconfirmed)
"is_mining": Tells if this transaction is coinbase transaction(ie generated by PoW mining or by PoS staking)
"is_mixing": Tells if this transaction using mixins or not(auditble wallets normally don't use mixins)
"is_service": Tells if this transaction is used as utility by one of Zano services(contracts, ionic swaps, etc)
"payment_id": HEX-encoded payment id blob, if it was present
"remote_addresses": Remote addresses of this transfer(destination if it's outgoing transfer or sender if it's incoming transaction)
"remote_aliases": Aliases for remot addresses, of discovered
"service_entries": Additional entries that might be stored in transaction but not part of it's consensus
"body": Hex-encoded body of the attachment
"flags": Flags that help wallet to automatically process some properties of the attachment(combination of TX_SERVICE_ATTACHMENT_ENCRYPT_BODY=1, TX_SERVICE_ATTACHMENT_DEFLATE_BODY=2, TX_SERVICE_ATTACHMENT_ENCRYPT_BODY_ISOLATE_AUDITABLE=4,TX_SERVICE_ATTACHMENT_ENCRYPT_ADD_PROOF=8 )
"instruction": Instruction that make sence for this particular service
"security": Hex-encoded public key of the owner, optional
"service_id": Service ID, identificator that diferent one service from another
"show_sender": If sender is included in tx
"subtransfers": Essential part of transfer entry: amounts that been transfered in this transaction grouped by asset id
"amount": Amount of asset the had been transfered
"asset_id": Asset id
"is_income": Indicates if transfer was income our outgoing
"timestamp": Timestamp of the block that included transaction in blockchain, 0 for unconfirmed
"transfer_internal_index": Index of this entry in the wallet's array of transaction's history
"tx_blob_size": Size of transaction in bytes
"tx_hash": Transaction ID(hash)
"tx_type": Could be one of this: GUI_TX_TYPE_NORMAL=0, GUI_TX_TYPE_PUSH_OFFER=1, GUI_TX_TYPE_UPDATE_OFFER=2, GUI_TX_TYPE_CANCEL_OFFER=3, GUI_TX_TYPE_NEW_ALIAS=4,GUI_TX_TYPE_UPDATE_ALIAS=5,GUI_TX_TYPE_COIN_BASE=6,GUI_TX_TYPE_ESCROW_PROPOSAL=7,GUI_TX_TYPE_ESCROW_TRANSFER=8,GUI_TX_TYPE_ESCROW_RELEASE_NORMAL=9,GUI_TX_TYPE_ESCROW_RELEASE_BURN=10,GUI_TX_TYPE_ESCROW_CANCEL_PROPOSAL=11,GUI_TX_TYPE_ESCROW_RELEASE_CANCEL=12,GUI_TX_TYPE_HTLC_DEPOSIT=13,GUI_TX_TYPE_HTLC_REDEEM=14
"unlock_time": Unlock time of this transfer (if present)
```

View file

@ -0,0 +1,38 @@
Execute transactions needed be convert all bare(pre-zarcanum) outputs to post-zarcanum outputs. (Only outputs that have been created in Zarcanum era can participaet in staking)
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "sweep_bare_outs",
"params": {
}
}
```
### Request description:
```
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"amount_swept": 12000000000000,
"bare_outs_swept": 112,
"fee_spent": 10000000000,
"txs_sent": 2
}
}
```
### Response description:
```
"amount_swept": Amount of native coins swept in the transactions.
"bare_outs_swept": Number of bare outputs swept in the transactions.
"fee_spent": Total fee spent on the transactions.
"txs_sent": Total number of transactions sent.
```

View file

@ -0,0 +1,52 @@
Tries to transfer all coins with amount below the given limit to the given address
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "sweep_below",
"params": {
"address": "ZxBvJDuQjMG9R2j4WnYUhBYNrwZPwuyXrC7FHdVmWqaESgowDvgfWtiXeNGu8Px9B24pkmjsA39fzSSiEQG1ekB225ZnrMTBp",
"amount": 1000000000000,
"fee": 10000000000,
"mixin": 15,
"payment_id_hex": "1dfe5a88ff9effb3"
}
}
```
### Request description:
```
"address": Public address for sending or receiving native coins.
"amount": Threshold amount of native coins to sweep.
"fee": Transaction fee required for processing the transaction.
"mixin": Number of outputs from the blockchain to mix with when sending a transaction to improve privacy.
"payment_id_hex": Payment ID associated with the transaction in hexadecimal format.
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"amount_swept": 101000000000,
"amount_total": 100000000000,
"outs_swept": 112,
"outs_total": 10,
"tx_hash": "01220e8304d46b940a86e383d55ca5887b34f158a7365bbcdd17c5a305814a93",
"tx_unsigned_hex": "8304d46b940a86e383d55ca5887b34f158a7365bbcdd17c5a305814a9334f158a7368304d46b940a86e383d55ca5887b34f158a7365bbcdd17c5a305814a9334f158a736"
}
}
```
### Response description:
```
"amount_swept": Amount of native coins swept in the transaction.
"amount_total": Total amount of native coins involved in the transaction.
"outs_swept": Number of outputs swept in the transaction.
"outs_total": Total number of outputs in the transaction.
"tx_hash": Transaction ID (hash) format.
"tx_unsigned_hex": Unsigned transaction data in hexadecimal format.
```

View file

@ -0,0 +1,53 @@
Update asset descriptor(you can change only owner so far)
URL: ```http:://127.0.0.1:11211/json_rpc```
### Request:
```json
{
"id": 0,
"jsonrpc": "2.0",
"method": "update_asset",
"params": {
"asset_descriptor": {
"current_supply": 500000000000000000,
"decimal_point": 12,
"full_name": "Zano wrapped USD",
"hidden_supply": false,
"meta_info": "Stable and private",
"owner": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8",
"ticker": "ZUSD",
"total_max_supply": 1000000000000000000
},
"asset_id": "40fa6db923728b38962718c61b4dc3af1acaa1967479c73703e260dc3609c58d"
}
}
```
### Request description:
```
"asset_descriptor": Descriptor that holds all information about asset that need to be updated (only owner could be updated)
"current_supply": Currently emitted supply for given asset
"decimal_point": Decimal point
"full_name": Full name of the asset
"hidden_supply": This one reserved for future use, will be documented later
"meta_info": Any other information assetiaded with asset in a free form
"owner": Owner's key, used to validate any operations on the asset altering, could be changed in case of transfer ownership
"ticker": Ticker associated with asset
"total_max_supply": Maximum possible supply for given asset, can't be changed after deployment
"asset_id": Id of the asset to update
```
### Response:
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"result_tx": "f74bb56a5b4fa562e679ccaadd697463498a66de4f1760b2cd40f11c3a00a7a8"
}
}
```
### Response description:
```
"result_tx": Id of transaction that carries asset registration command, asset would be registered as soon as transaction got confirmed
```