start page and docs

This commit is contained in:
avtushko2004 2023-09-03 10:57:14 +03:00
parent 97fe299a6f
commit 93361092f8
54 changed files with 3179 additions and 29 deletions

View file

@ -0,0 +1,32 @@
Returns alias details by alias address.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_alias_by_address",
"params": "ZxDNaMeZjwCjnHuU5gUNyrP1pM3U5vckbakzzV6dEHyDYeCpW8XGLBFTshcaY8LkG9RQn7FsQx8w2JeJzJwPwuDm2NfixPAXf"
}
```
---
### Response
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_alias_by_address",
"params": "ZxDNaMeZjwCjnHuU5gUNyrP1pM3U5vckbakzzV6dEHyDYeCpW8XGLBFTshcaY8LkG9RQn7FsQx8w2JeJzJwPwuDm2NfixPAXf"
}
```
### Response information
- address - string; public address associated with requested alias.
- alias - string; alias associated with the provided address
- comment - string; an arbitrary comment set by the owner. Can be empty.
- tracking_key - string; private view key for public address. Can be empty.

View file

@ -0,0 +1,39 @@
Returns alias details by alias name.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_alias_details",
"params": {
"alias": "kekzploit"
}
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"alias_details": {
"address": "ZxDNaMeZjwCjnHuU5gUNyrP1pM3U5vckbakzzV6dEHyDYeCpW8XGLBFTshcaY8LkG9RQn7FsQx8w2JeJzJwPwuDm2NfixPAXf",
"comment": "",
"tracking_key": ""
},
"status": "OK"
}
}
```
### Response information
- address - string; public address associated with requested alias.
- comment - string; an arbitrary comment set by the owner. Can be empty.
- tracking_key - string; private view key for public address. Can be empty.

View file

@ -0,0 +1,33 @@
Returns current reward that must be paid to register an alias name.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_alias_reward",
"params": {
"alias": "mickymouse"
}
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"reward": 100000000000,
"status": "OK"
}
}
```
### Response information
- reward - unsigned int; current reward (in atomic units) to be paid for an alias.

View file

@ -0,0 +1,48 @@
Returns all registered aliases
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_all_alias_details"
}
```
---
### Response
:::danger
This request has been shortened for the sake of the example, a real response will return many more aliases.
:::
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"aliases": [
{
"address": "ZxCn8fKmvenQRNdoFFsDinWMfucfC5H9Abb71HjUFbPcEgaCk1fdjqSe4ZDskYgLQtRUFYDH1AqUAWDHjmu84hSG394mceDgb",
"alias": "------",
"comment": "Coolest username",
"tracking_key": ""
},
],
"status": "OK"
}
}
```
### Reponse information
- address - string; address of a corresponding wallet.
- alias - string; alias name.
- comment - string; user-defined comment, made by alias owner (optional).
- tracking_key - string; hex-encoded secret view key (optional) of the wallet.

View file

@ -0,0 +1,33 @@
Returns IDs for all txs in the pool.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_all_pool_tx_list"
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"ids": [
"07af9af51abace52c6c9f5e96eac1f4123e56d8d2b2e1ac2ba5c6d68be94680f",
"968d44f9443b067debc4a467174ad5b640690e165a2f8d45b2904d082bc1312e"
],
"status": "OK"
}
}
```
### Response information
- ids - array of strings; list of hash identifiers for all transactions that are currently in the pool.

View file

@ -0,0 +1,140 @@
Returns block details for a specified identifier. Only for blocks in alternative chains.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_alt_block_details",
"params": {
"id": "498cafd7ae8d7a82abd5267a005ce01482d5580eddd9805dd0162e465cacb7df"
}
}
```
- id - hash identifier for a block.
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"block_details": {
"actual_timestamp": 1558705296,
"already_generated_coins": "0",
"base_reward": 1000000000000,
"blob": "",
"block_cumulative_size": 0,
"block_tself_size": 0,
"cumulative_diff_adjusted": "47701129767973676",
"cumulative_diff_precise": "12602457701330728735458",
"difficulty": "2053263042953598309",
"effective_fee_median": 0,
"height": 23138,
"id": "5391963eb274af8391fa89bc711122b5db9b6c3703cb8865d45505f919f9842b",
"is_orphan": true,
"miner_text_info": "1.0.31[29c0487]",
"object_in_json": "...",
"penalty": 0,
"pow_seed": "",
"prev_id": "62c3d7a0a2f7d253b78a8e48dc0407e7d8f0d26b4fdb8b52687b07a7c4020ba9",
"summary_reward": 1000000000000,
"this_block_fee_median": 0,
"timestamp": 1558705800,
"total_fee": 0,
"total_txs_size": 0,
"transactions_details": [
{
"amount": 2000000000000,
"blob": "",
"blob_size": 203,
"extra": [
{
"datails_view": "",
"short_view": "7eaeb2490d85b17773b30ffe9f32fce50a1e89ee5ed258531e6b66ae13b00327",
"type": "pub_key"
},
{
"datails_view": "312e302e33315b323963303438375d",
"short_view": "15 bytes",
"type": "user_data"
},
{
"datails_view": "",
"short_view": "0 bytes",
"type": "extra_padding"
},
{
"datails_view": "cefd",
"short_view": "cefd",
"type": "XOR"
},
{
"datails_view": "",
"short_view": "height: 23148",
"type": "unlock_time"
},
{
"datails_view": "",
"short_view": "timestamp: 1558705296 Fri, 24 May 2019 13:41:36 GMT",
"type": "pos_time"
}
],
"fee": 0,
"id": "a88f4ae2a89d5cbf9a76946785b6b45e898177cc0acd0b9c6ec5e35ccd73d9e8",
"ins": [
{
"amount": 0,
"kimage_or_ms_id": "",
"multisig_count": 0
},
{
"amount": 1000000000000,
"global_indexes": [
32159
],
"kimage_or_ms_id": "5125de7598e723efba04d83258f31a3b30b21ed036f8e52b0669b12b93264267",
"multisig_count": 0
}
],
"keeper_block": 0,
"object_in_json": "",
"outs": [
{
"amount": 1000000000000,
"global_index": 0,
"is_spent": false,
"minimum_sigs": 0,
"pub_keys": [
"6acb06f7e4916d38ecafb537065e4dedaf0949fd49787fad55256770eaa8b029"
]
},
{
"amount": 1000000000000,
"global_index": 0,
"is_spent": false,
"minimum_sigs": 0,
"pub_keys": [
"c5179786faf5fe9f0d2adfcf6c9b069aae0e1393b771efddef8efade4bb4ce73"
]
}
],
"pub_key": "7eaeb2490d85b17773b30ffe9f32fce50a1e89ee5ed258531e6b66ae13b00327",
"timestamp": 1558705296
}
],
"type": 0
},
"status": "OK"
}
}
```
### Response information
- see get_blocks_details method for more details.

View file

@ -0,0 +1,51 @@
Returns alternative blocks details for a specified range.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_alt_blocks_details",
"params": {
"offset": 1,
"count": 1
}
}
```
- offset - starting offset in the global list of alternative blocks
- count - number of blocks to be requested
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"blocks": [{
"actual_timestamp": 1537462404,
"already_generated_coins": 0,
"base_reward": 0,
"blob": "",
"block_cumulative_size": 0,
....
},{
"actual_timestamp": 1537462619,
"already_generated_coins": 0,
"base_reward": 0,
"blob": "",
"block_cumulative_size": 0,
....
}],
"status": "OK"
}
}
```
### Response information
- see get_blocks_details method for more details.

View file

@ -0,0 +1,112 @@
Return blocks details for a specified range of heights.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_blocks_details",
"params": {
"height_start": 1,
"count": 1
}
}
```
### Request parameters
- height_start - starting height
- count - number of blocks to be requested
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"blocks": [
{
"actual_timestamp": 1557342384,
"already_generated_coins": "17517204000000000000",
"base_reward": 1000000000000,
"blob": "",
"block_cumulative_size": 0,
"block_tself_size": 0,
"cumulative_diff_adjusted": "2",
"cumulative_diff_precise": "1",
"difficulty": "1",
"effective_fee_median": 10000,
"height": 1,
"id": "901214ab938219f5b33b547008607aee14d29950a34834a2e9973b96269bd0b0",
"is_orphan": false,
"miner_text_info": "",
"object_in_json": "{\n \"major_version\": 0, \n \"nonce\": 1532031558827332528, \n \"prev_id\": \"cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852\", \n \"minor_version\": 0, \n \"timestamp\": 1557342384, \n \"flags\": 0, \n \"miner_tx\": {\n \"version\": 1, \n \"vin\": [ {\n \"gen\": {\n \"height\": 1\n }\n }\n ], \n \"vout\": [ {\n \"amount\": 1000000000000, \n \"target\": {\n \"key\": \"ffd231f5386282c281f58c8d578c95b429b1b8ed5bddd6472d58b911384cd99300\"\n }\n }\n ], \n \"extra\": [ {\n \"pub_key\": \"24196c9ab3f827a586cc906a6133f0b4b0663eb15491fae33e9ade63d34ae398\"\n }, {\n \"extra_padding\": , \n \"buff\": [ ]\n }, {\n \"etc_tx_flags16\": , \n \"v\": 63119\n }, {\n \"unlock_time\": , \n \"v\": 11\n }, {\n \"string\": 8\"8f3f4736b24f69a8\"\n }], \n \"signatures\": [ ], \n \"attachment\": [ ]\n }, \n \"tx_hashes\": [ ]\n}",
"penalty": 0,
"pow_seed": "",
"prev_id": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"summary_reward": 1000000000000,
"this_block_fee_median": 0,
"timestamp": 1557342384,
"total_fee": 0,
"total_txs_size": 0,
"transactions_details": [
{
"amount": 1000000000000,
"blob": "",
"blob_size": 96,
"fee": 0,
"id": "8d0fbc9ee9948bc74bf6b80914e95997e9769641f3a20ef963c4264922ac004b",
"keeper_block": 1,
"object_in_json": "",
"pub_key": "24196c9ab3f827a586cc906a6133f0b4b0663eb15491fae33e9ade63d34ae398",
"timestamp": 1557342384
}
],
"type": 1
}
],
"status": "OK"
}
}
```
### Response parameters
- actual_timestamp — unsigned int; timestamp for the moment of block creation (for PoW blocks equal to timestamp, for PoS they differ).
- already_generated_coins — unsigned int; total number of coins generated, including this block.
- base_reward — unsigned int; base reward for the block (equal to reward if there are no transactions except the miner tx).
- blob
- block_cumulative_size — unsigned int; total size of block's transactions, in bytes. Miner tx is included in special cases.
- block_tself_size
- cumulative_diff_adjusted — unsigned int; cumulative PoS or PoW difficulty for the block, adjusted by the sequence factor (number of same type - blocks going sequentially one-by-one).
- cumulative_diff_precise — unsigned int; precise cumulative PoS or PoW difficulty for the block.
- difficulty — unsigned int; difficulty of the block.
- effective_fee_median — unsigned int; median of transaction fees within a specific window used in calculations for this block.
- height — unsigned int; block height.
- id — string; block hash identifier.
- is_orphan — boolean; orphan status for the block. False for normal blocks.
- miner_text_info — string; undefined text inserted by miner when the block was mined.
- object_in_json — string; JSON-serialized block object.
- penalty — unsigned int; difference between summary_reward and base_reward.
- pow_seed — some hex string .
- prev_id — string; hash identifier of the previous block.
- summary_reward — unsigned int; amount of coins this block has generated in miner tx.
- this_block_fee_median — unsigned int; median fee among the transactions for this block.
- timestamp — unsigned int; block timestamp (serves a special purpose for PoS blocks, which is why actual_timestamp should be used as actual block timestamp).
- total_fee — unsigned int; sum of transaction fees in this block.
- total_txs_size — unsigned int; total transaction size in this block (excluding the miner tx).
- transactions_details — array of tx_rpc_extended_info objects (see below get_tx_details description).
- amount
- blob
- blob_size
- fee
- id
- keeper_block
- object_in_json
- pub_key
- timestamp
- type — unsigned int; 0 if this is PoS block, 1 if this is PoW block

View file

@ -0,0 +1,32 @@
Returns the median for timestamps of the last 20 blocks
Displayed as returned median value plus 600 seconds, this is used to check the expiration time of parameters.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_current_core_tx_expiration_median"
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"expiration_median": 1684416559,
"status": "OK"
}
}
```
### Response information
- expiration_median - unsigned int; median value.

View file

@ -0,0 +1,37 @@
Returns approximate block height for requested timestamp
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_est_height_from_date",
"params": {
"date": ""
}
}
```
### Request parameters
- date - unix timestamp
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"h": 0,
"status": "OK"
}
}
```
### Response parameters
- h - block height approximation

View file

@ -0,0 +1,106 @@
Returns block details for a specified identifier. Only for main chain blocks.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_main_block_details",
"params": {
"id": "498cafd7ae8d7a82abd5267a005ce01482d5580eddd9805dd0162e465cacb7df"
}
}
```
- id - hash identifier for a block.
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"block_details": {
"actual_timestamp": 1684411963,
"already_generated_coins": "13723707515881367168",
"base_reward": 1000000000000,
"blob": "",
"block_cumulative_size": 13786,
"block_tself_size": 0,
"cumulative_diff_adjusted": "2832707833905824613",
"cumulative_diff_precise": "1273127049356910428816679621",
"difficulty": "2128820872519086150618",
"effective_fee_median": 10000000000,
"height": 2111653,
"id": "498cafd7ae8d7a82abd5267a005ce01482d5580eddd9805dd0162e465cacb7df",
"is_orphan": false,
"miner_text_info": "",
"object_in_json": "{\n \"major_version\": 2, \n \"nonce\": 0, \n \"prev_id\": \"5c4fd7994c0fbdb419def7afc89fd7914e8f5b07daf6d8bf92cdf85c6dc83840\", \n \"minor_version\": 0, \n \"timestamp\": 1684410675, \n \"flags\": 1, \n \"miner_tx\": {\n \"version\": 1, \n \"vin\": [ {\n \"gen\": {\n \"height\": 2111653\n }\n }, {\n \"key\": {\n \"amount\": 900000000000000, \n \"key_offsets\": [ {\n \"uint64_t\": 18826\n }\n ], \n \"k_image\": \"c4f3351243326f66c1ba6fc5b744d8295992de2c210e28243a221092f3977fe9\", \n \"etc_details\": [ ]\n }\n }], \n \"vout\": [ {\n \"amount\": 30000000000, \n \"target\": {\n \"key\": \"7efc881ec1c060ca9a066ca6a5afcdc48537d74e1bfbaa068cf40cdb10cb086400\"\n }\n }, {\n \"amount\": 1000000000000, \n \"target\": {\n \"key\": \"b4b2021f61cf1a8db85edc27832afc25ab469b962d684fc00699dfa282c9448200\"\n }\n }, {\n \"amount\": 900000000000000, \n \"target\": {\n \"key\": \"d732ccf5d481e5fd834924fa0a3bab6ff51b9dd7064e675f160a4f4253cb91bd00\"\n }\n }\n ], \n \"extra\": [ {\n \"pub_key\": \"c093b0757ecae81a8322140aed69759faa200836ac4a4f32c9633ba32a8d488b\"\n }, {\n \"extra_padding\": , \n \"buff\": [ ]\n }, {\n \"derivation_hint\": , \n \"msg\": 2\"98ee\"\n }, {\n \"unlock_time\": , \n \"v\": 2111663\n }, {\n \"attachment\": , \n \"service_id\": 1\"64\", \n \"instruction\": 0\"\", \n \"body\": 8\"3b16666400000000\", \n \"security\": [ ], \n \"flags\": 0\n }], \n \"signatures\": [ [ \"d030c37a1feae460f3d15c146ec092abc54d3858d1c58d8d03c1148d5b953b0ee70f0633a95696b54f01f550f83b2b04b75e128f2fdc3ac53c3f4a3b934eda08\"\n ]\n ], \n \"attachment\": [ ]\n }, \n \"tx_hashes\": [ \"6348ae8c649404d26cbee8e0edbad018b64051499b4e1c02567862a1a74a5a3a\", \"a9492df7468241c1b26ab59abf600cbf336281992afd5c896cbc1f5f7336895b\", \"a5b06721f8d36d6e654fce9fbfaa7366499a46f1f98c2a47d79dd55a4c9653ac\"\n ]\n}",
"penalty": 0,
"pow_seed": "",
"prev_id": "5c4fd7994c0fbdb419def7afc89fd7914e8f5b07daf6d8bf92cdf85c6dc83840",
"summary_reward": 1030000000000,
"this_block_fee_median": 10000000000,
"timestamp": 1684410675,
"total_fee": 30000000000,
"total_txs_size": 13786,
"transactions_details": [
{
"amount": 901030000000000,
"blob": "",
"blob_size": 241,
"fee": 0,
"id": "de6b824024bbf3ab1240f86122d93a0f3b9e539026e58c9ca40937bbd54bfd04",
"keeper_block": 2111653,
"object_in_json": "",
"pub_key": "c093b0757ecae81a8322140aed69759faa200836ac4a4f32c9633ba32a8d488b",
"timestamp": 1684411963
},
{
"amount": 1390000000000,
"blob": "",
"blob_size": 2131,
"fee": 10000000000,
"id": "6348ae8c649404d26cbee8e0edbad018b64051499b4e1c02567862a1a74a5a3a",
"keeper_block": 2111653,
"object_in_json": "",
"pub_key": "116316309f51a8007ae95f8fa1aa54ad6de4357b7d9c2e4c12dad919b7fce578",
"timestamp": 1684411963
},
{
"amount": 1390000000000,
"blob": "",
"blob_size": 2171,
"fee": 10000000000,
"id": "a9492df7468241c1b26ab59abf600cbf336281992afd5c896cbc1f5f7336895b",
"keeper_block": 2111653,
"object_in_json": "",
"pub_key": "feecb2ae6efb4e03e392b4f33f512c1a36632346978c478d15cd3eee33708255",
"timestamp": 1684411963
},
{
"amount": 10000000000000,
"blob": "",
"blob_size": 9484,
"fee": 10000000000,
"id": "a5b06721f8d36d6e654fce9fbfaa7366499a46f1f98c2a47d79dd55a4c9653ac",
"keeper_block": 2111653,
"object_in_json": "",
"pub_key": "e66ad0eaf2a11e3325a12c7e5bd4cdeba1e3cc82396b50ae6cc2ad71d9cd542f",
"timestamp": 1684411963
}
],
"type": 0
},
"status": "OK"
}
}
```
### Response information
- see get_blocks_details method for more details.

View file

@ -0,0 +1,41 @@
Looks up multi-sig output by specified identifier.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_multisig_info",
"params": {
"ms_id": ""
}
}
```
### Request parameters
- ms_id - hash identifier of a multisig output
---
### Response
```json
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"out_no": 3,
"status": "OK",
"tx_id": "2df88a09b2d8b73a45824526c26e7f21836bbe0b111e1e8a6896c1a7fc8e03eb"
}
}
```
### Response information
- out_no - string; hash identifier of transaction, containing the given multisig output.
- status - string; "OK" if the output was found, "NOT FOUND" if the requested output was not found.
- tx_id - string; hash identifier of output's source transaction.
out_no — unsigned int; output local index in its source transaction.

View file

@ -0,0 +1,37 @@
Looks up an output in the global outputs table by specified amount and output global index.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_out_info",
"params": {
"amount": 1,
"i": 1
}
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"out_no": 0,
"status": "OK",
"tx_id": "5b3bb20dee6307b11f65f8fe2b976efdec570b46241e41df33e85f4cf2332b2a"
}
}
```
### Response information
- out_no - unsigned int; output local index in its source transaction.
- status - string; "OK" if the output was found, "NOT FOUND" if the requested output was not found.
- tx_id - string; hash identifier of output's source transaction.

View file

@ -0,0 +1,45 @@
Returns brief information for transactions currently in the pool.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_pool_txs_brief_details",
"params": {
"ids": ["", ""]
}
}
```
- ids - list of transaction hash identifiers for which information is requested. All transactions from the pool will be returned if ids is empty or if this parameter is omitted
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK",
"txs": [
{
"fee": 10000000000,
"id": "5864f3e061c70b47d4ea6a47e593aad66bb2462fa4036be2cd3dfede9faa7583",
"sz": 57913,
"total_amount": 500000000000000
}
]
}
}
```
### Response information
- fee - unsigned int; transaction fee.
- id - string; hash identifier.
- sz - unsigned int; size of serialized transaction in bytes (the same as blob_size in tx_rpc_extended_info).
- total_amount - unsigned int; sum of all transaction outputs.

View file

@ -0,0 +1,49 @@
Returns transactions that are currently in the pool
Note: Output is less detailed if ids parameter is empty or omitted.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_pool_txs_details",
"params": {
"ids": ["", ""]
}
}
```
- ids - list of transaction hash identifiers for which information is requested. All transactions from the pool will be returned if ids is empty or if this parameter is omitted
---
### Response
```json
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"status": "OK",
"txs": [
{
"amount": 500000000000000,
"blob": "",
"blob_size": 57913,
"fee": 10000000000,
"id": "5864f3e061c70b47d4ea6a47e593aad66bb2462fa4036be2cd3dfede9faa7583",
"keeper_block": 0,
"object_in_json": "",
"pub_key": "24a523aea7d0b1e69e5a393a7e5531455c4317e527ad83be7a871fea716dc45c",
"timestamp": 1558557359
}
]
}
}
```
### Response information
- txs - array of tx_rpc_extended_info objects; see get_tx_details method description for details.

View file

@ -0,0 +1,234 @@
Returns transaction details by specified transaction hash identifier.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_tx_details",
"params": {
"tx_hash": "ee25a5503726368eef558737f81f15fdc5f1e705b678df81315c83d8789ed4b3"
}
}
```
### Body parameters
- tx_hash - hash identifier of a transaction
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK",
"tx_info": {
"amount": 50000000000000,
"attachments": [
{
"datails_view": "ei<65><16><>(<28>",
"short_view": "P:",
"type": "service"
}
],
"blob": "",
"blob_size": 5377,
"extra": [
{
"datails_view": "",
"short_view": "(encrypted)",
"type": "payer"
},
{
"datails_view": "",
"short_view": "(encrypted)",
"type": "receiver"
},
{
"datails_view": "",
"short_view": "76a7575f488a5a32a766fc5da6d190cab4e90b1ab6d0178eed622a79e922a70d",
"type": "pub_key"
},
{
"datails_view": "0000",
"short_view": "0000",
"type": "FLAGS16"
},
{
"datails_view": "derivation_hash: 1c6e466c\nencrypted_key_derivation: 3d4cf9081c1abea76b595f7226a7d12faa596d33c93f16f4bbfb8856c4895ea9",
"short_view": "derivation_hash: 1c6e466c",
"type": "crypto_checksum"
},
{
"datails_view": "2013",
"short_view": "2 bytes",
"type": "derivation_hint"
},
{
"datails_view": ", \n\"sz\": 16, \n\"hsh\": \"eb9562934daa508c1f0d5a91cbe9322f0e363287676ab4398f65c9cb5bae8a99\", \n\"cnt\": 1",
"short_view": "16 bytes",
"type": "attachment_info"
}
],
"fee": 10000000000,
"id": "ee25a5503726368eef558737f81f15fdc5f1e705b678df81315c83d8789ed4b3",
"ins": [
{
"amount": 40000000000000,
"global_indexes": [
1471,
2212,
2224,
2231,
2410,
2508,
2689,
2823,
2969,
3017,
3379
],
"htlc_origin": "",
"kimage_or_ms_id": "e254e999afba8b58a608b2634a9420652b7ad084f27bc1a54328c67ea3a9ccad",
"multisig_count": 0
},
{
"amount": 5000000000000,
"global_indexes": [
1075,
1298,
12282,
12776,
14376,
15954,
16160,
17428,
18450,
24724,
27140
],
"htlc_origin": "",
"kimage_or_ms_id": "b4bbead78a93497bfc6e824f8912cde9293094086f8b9a1ece7a1de86bbe78b2",
"multisig_count": 0
},
{
"amount": 4000000000000,
"global_indexes": [
1426,
1664,
3516,
4478,
6674,
7302,
9144,
10512,
12721,
13115,
16637
],
"htlc_origin": "",
"kimage_or_ms_id": "8e59f6489a30ec67742dc81ab183b97f8a77bd9417f1a3d2578cf4091d32c564",
"multisig_count": 0
},
{
"amount": 900000000000,
"global_indexes": [
15912,
18039,
19507,
20049,
23693,
24192,
24966,
31687,
42782,
43082,
48814
],
"htlc_origin": "",
"kimage_or_ms_id": "3a684270c3ec0a32ed15123a17bd7f29ff0ee3ad2500831cbbc570f7b20b8c0e",
"multisig_count": 0
},
{
"amount": 90000000000,
"global_indexes": [
67559,
76419,
87859,
117969,
119009,
126366,
136622,
161655,
215760,
229083,
250363
],
"htlc_origin": "",
"kimage_or_ms_id": "61ff1dfb6b724c3dba0c16859aa72d014be37c92a44a7b48a17d8ae92d41030a",
"multisig_count": 0
},
{
"amount": 20000000000,
"global_indexes": [
13363,
17153,
34369,
46685,
65871,
75813,
93056,
97252,
113935,
120851,
133386
],
"htlc_origin": "",
"kimage_or_ms_id": "ec65b4482a5f8e49e09303da57f4054f19e68f4a4aeab935bca62a9d4297def7",
"multisig_count": 0
}
],
"keeper_block": 2110251,
"object_in_json": "",
"outs": [
{
"amount": 50000000000000,
"global_index": 3950,
"is_spent": false,
"minimum_sigs": 0,
"pub_keys": [
"e04eda49011a30b81629a279285ffda8d69e712b438ecfcc094a26481d8663de"
]
}
],
"pub_key": "76a7575f488a5a32a766fc5da6d190cab4e90b1ab6d0178eed622a79e922a70d",
"timestamp": 1684328300
}
}
}
```
### Response information
- amount - unsigned int; sum of transaction outputs.
- attachments - array of objects; list of transaction attachments.
- blob_size - unsigned int; size of serialized transaction in bytes.
- extra - array of objects; list of extra items.
- fee - unsigned int; transaction fee.
- id - string; hash identifier of the transaction.
- ins - array of objects; list of inputs.
- keeper_block - unsigned int; height of the block containing this transaction.
- object_in_json -
- outs
- amount -
- global_index -
- is_spent -
- minimum_sigs -
- pub_keys -
- pub_key - string; transaction public key.
- timestamp - unsigned int; actual timestamp of the block containing this transaction.

View file

@ -0,0 +1,56 @@
Returns a block header by the given hash identifier.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "getblockheaderbyhash",
"params": {
"hash": "067fb9861f702b4eabee2e2f9265db3b9adde8a2c43e5afe6887574a12923652"
}
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"block_header": {
"depth": 3336,
"difficulty": "6867412547068",
"hash": "067fb9861f702b4eabee2e2f9265db3b9adde8a2c43e5afe6887574a12923652",
"height": 2111612,
"major_version": 2,
"minor_version": 0,
"nonce": 5464575110210072335,
"orphan_status": false,
"prev_hash": "6860a4742f167fcf7c46e121c8e139fd5232537f580a22ae76ce8013c06d0f09",
"reward": 1000000000000,
"timestamp": 1684409286
},
"status": "OK"
}
}
```
### Response information
- depth - unsigned int; distance in blocks from the blockchain top. Always zero for this call.
- difficulty - unsigned int; block difficulty.
- hash - string; block identifier.
- height - unsigned int; block height.
- major_version - unsigned int; major version of a block.
- minor_version - unsigned int; minor version of a block.
- nonce - unsigned int; block nonce.
- orphan_status - boolean; is this block orphan or not? Always false for this call.
- prev_hash -
- reward - unsigned int; how much money this block has generated.
- timestamp - unsigned int; block timestamp.
---

View file

@ -0,0 +1,55 @@
Returns a block header by the given block height.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "getblockheaderbyheight",
"params": {
"height": 1
}
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"block_header": {
"- depth": 2114588,
"difficulty": "1",
"hash": "901214ab938219f5b33b547008607aee14d29950a34834a2e9973b96269bd0b0",
"height": 1,
"major_version": 0,
"minor_version": 0,
"nonce": 1532031558827332528,
"orphan_status": false,
"prev_hash": "cc608f59f8080e2fbfe3c8c80eb6e6a953d47cf2d6aebd345bada3a1cab99852",
"reward": 1000000000000,
"timestamp": 1557342384
},
"status": "OK"
}
}
```
### Response information
- depth - unsigned int; distance in blocks from the blockchain top.
- difficulty - unsigned int; block difficulty.
- hash - string; block identifier.
- height - unsigned int; block height.
- major_version - unsigned int; major version of a block.
- minor_version - unsigned int; minor version of a block.
- nonce - unsigned int; block nonce.
- orphan_status - boolean.
- prev_hash
- reward - unsigned int; how much money this block has generated.
- timestamp - unsigned int; block timestamp.

View file

@ -0,0 +1,202 @@
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "getinfo",
"params": {
"flags": 1
}
}
```
### Reponse parameters
- flags -
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"alias_count": 1241,
"alt_blocks_count": 0,
"block_reward": 1000000000000,
"current_blocks_median": 125000,
"current_max_allowed_block_size": 250000,
"current_network_hashrate_350": 0,
"current_network_hashrate_50": 0,
"daemon_network_state": 2,
"default_fee": 10000000000,
"expiration_median_timestamp": 0,
"grey_peerlist_size": 351,
"height": 2116212,
"incoming_connections_count": 3,
"last_block_hash": "93e27dcc1cf28962fe38561f09719a20766df0a888d57700ea1a86be9f605256",
"last_block_size": 0,
"last_block_timestamp": 1684684006,
"last_block_total_reward": 1000000000000,
"last_pos_timestamp": 0,
"last_pow_timestamp": 0,
"max_net_seen_height": 2116208,
"mi": {
"build_no": 121,
"mode": 0,
"ver_major": 1,
"ver_minor": 2,
"ver_revision": 0
},
"minimum_fee": 10000000000,
"net_time_delta_median": 0,
"offers_count": 0,
"outgoing_connections_count": 8,
"outs_stat": {
"amount_0_001": 0,
"amount_0_01": 0,
"amount_0_1": 0,
"amount_1": 0,
"amount_10": 0,
"amount_100": 0,
"amount_1000": 0,
"amount_10000": 0,
"amount_100000": 0,
"amount_1000000": 0
},
"performance_data": {
"all_txs_insert_time_5": 0,
"block_processing_time_0": 0,
"block_processing_time_1": 0,
"etc_stuff_6": 0,
"insert_time_4": 0,
"longhash_calculating_time_3": 0,
"map_size": 0,
"raise_block_core_event": 0,
"target_calculating_calc": 0,
"target_calculating_enum_blocks": 0,
"target_calculating_time_2": 0,
"tx_add_one_tx_time": 0,
"tx_append_is_expired": 0,
"tx_append_rl_wait": 0,
"tx_append_time": 0,
"tx_check_exist": 0,
"tx_check_inputs_attachment_check": 0,
"tx_check_inputs_loop": 0,
"tx_check_inputs_loop_ch_in_val_sig": 0,
"tx_check_inputs_loop_kimage_check": 0,
"tx_check_inputs_loop_scan_outputkeys_get_item_size": 0,
"tx_check_inputs_loop_scan_outputkeys_loop": 0,
"tx_check_inputs_loop_scan_outputkeys_loop_find_tx": 0,
"tx_check_inputs_loop_scan_outputkeys_loop_get_subitem": 0,
"tx_check_inputs_loop_scan_outputkeys_loop_handle_output": 0,
"tx_check_inputs_loop_scan_outputkeys_relative_to_absolute": 0,
"tx_check_inputs_prefix_hash": 0,
"tx_check_inputs_time": 0,
"tx_count": 0,
"tx_mixin_count": 0,
"tx_prapare_append": 0,
"tx_print_log": 0,
"tx_process_attachment": 0,
"tx_process_extra": 0,
"tx_process_inputs": 0,
"tx_push_global_index": 0,
"tx_store_db": 0,
"writer_tx_count": 0
},
"pos_allowed": true,
"pos_block_ts_shift_vs_actual": 0,
"pos_diff_total_coins_rate": 0,
"pos_difficulty": "2091093243540034788799",
"pos_sequence_factor": 0,
"pow_difficulty": 7499957992531,
"pow_sequence_factor": 0,
"seconds_for_10_blocks": 0,
"seconds_for_30_blocks": 0,
"status": "OK",
"synchronization_start_height": 2116099,
"synchronized_connections_count": 11,
"total_coins": "",
"transactions_cnt_per_day": 0,
"transactions_volume_per_day": 0,
"tx_count": 557235,
"tx_count_in_last_block": 0,
"tx_pool_performance_data": {
"begin_tx_time": 0,
"check_inputs_time": 0,
"check_inputs_types_supported_time": 0,
"check_keyimages_ws_ms_time": 0,
"db_commit_time": 0,
"expiration_validate_time": 0,
"tx_processing_time": 0,
"update_db_time": 0,
"validate_alias_time": 0,
"validate_amount_time": 0
},
"tx_pool_size": 1,
"white_peerlist_size": 21
}
}
```
- alias_count — unsigned int; number of total aliases registered.
- alt_blocks_count — unsigned int; number of alternative blocks known to this node.
- block_reward — unsigned int; base block reward for the next block (excluding fees and txs size penalty). Calculated only if both COMMAND_RPC_GET_INFO_FLAG_POS_DIFFICULTY and COMMAND_RPC_GET_INFO_FLAG_TOTAL_COINS flags are present.
- current_blocks_median — unsigned int; median of cumulative block sizes for the recent N blocks.
- current_max_allowed_block_size — unsigned int; maximum allowed cumulative size of a block in bytes.
- current_network_hashrate_350 — unsigned int; network hashrate calculated by difficulty within a window of the last 350 blocks. Calculated only if COMMAND_RPC_GET_INFO_FLAG_CURRENT_NETWORK_HASHRATE_350 flag is present.
- current_network_hashrate_50 — unsigned int; the same as above for last 50 blocks. Calculated only if COMMAND_RPC_GET_INFO_FLAG_CURRENT_NETWORK_HASHRATE_50 flag is present.
- daemon_network_state — unsigned int; current daemon state. Possible values and their meaning: <br />
daemon_network_state_connecting = 0, <br />
daemon_network_state_synchronizing = 1, <br />
daemon_network_state_online = 2, <br />
daemon_network_state_loading_core = 3, <br />
daemon_network_state_internal_error = 4, <br />
daemon_network_state_unloading_core = 5 <br />
- default_fee — unsigned int; current default fee.
- grey_peerlist_size — unsigned int; number of peers in the gray list (these are peers received from another node and this node has not yet attempted to connect to them).
- height — unsigned int; number of blocks in the main chain.
- incoming_connections_count — unsigned int; number of incoming P2P connections.
- last_block_size — unsigned int; cumulative size of the last block. Returned only if COMMAND_RPC_GET_INFO_FLAG_LAST_BLOCK_SIZE flag is present.
- last_block_total_reward — unsigned int; actual reward for the last block. Calculated only if both COMMAND_RPC_GET_INFO_FLAG_POS_DIFFICULTY and COMMAND_RPC_GET_INFO_FLAG_TOTAL_COINS flags are present.
- last_pos_timestamp — unsigned int; timestamp of the last PoS block in the main chain. Calculated only if COMMAND_RPC_GET_INFO_FLAG_LAST_POS_TIMESTAMP flag is present.
- last_pow_timestamp — unsigned int; timestamp of the last PoW block in the main chain. Calculated only if COMMAND_RPC_GET_INFO_FLAG_LAST_POW_TIMESTAMP flag is present.
- max_net_seen_height — unsigned int; size of the longest chain among this nodes peers.
- mi — object; the last received maintainer info message with recommended build versions from project maintainers. See below detailed description of maintainers_info_external object.
- minimum_fee — unsigned int; current tx fee minimum required by tx pool.
- net_time_delta_median — signed int; median of system time differences among this nodes peers. Calculated only if COMMAND_RPC_GET_INFO_FLAG_NET_TIME_DELTA_MEDIAN flag is present.
- offers_count — unsigned int; total number of market offers known to this node. Calculated only if COMMAND_RPC_GET_INFO_FLAG_PERFORMANCE flag is present and no --disable-market CLI option was specified.
- outgoing_connections_count — unsigned int; number of outgoing P2P connections.
- outs_stat — object; brief output statistics.
- pos_allowed — boolean; false if PoS blocks cannot be accepted yet, otherwise — true.
- pos_block_ts_shift_vs_actual — signed int; the difference between the block timestamp and actual block timestamp for the last PoS block in the main chain. Calculated only if COMMAND_RPC_GET_INFO_FLAG_POS_BLOCK_TS_SHIFT_VS_ACTUAL flag is present.
- pos_diff_total_coins_rate — unsigned int; current ratio of PoS difficulty to total coins mined. Calculated only if both COMMAND_RPC_GET_INFO_FLAG_POS_DIFFICULTY and COMMAND_RPC_GET_INFO_FLAG_TOTAL_COINS flags are present.
- pos_difficulty — unsigned int; difficulty for the next PoS block.
- pos_sequence_factor — unsigned int; size of a continuous sequence of PoS blocks starting from the top block. Calculated only if COMMAND_RPC_GET_INFO_FLAG_POS_SEQUENCE_FACTOR flag is present.
- pow_difficulty — unsigned int; difficulty for the next PoW block.
- pow_sequence_factor — unsigned int; size of a continuous sequence of PoW blocks starting from the top block. (Required flag: COMMAND_RPC_GET_INFO_FLAG_POW_SEQUENcE_FACTOR)
- seconds_for_10_blocks — unsigned int; timestamp difference between the top block and the 10th from the top. (Required flag: - COMMAND_RPC_GET_INFO_FLAG_SECONDS_FOR_10_BLOCKS)
- seconds_for_30_blocks — unsigned int; timestamp difference between the top block and the 30th from the top. (Required flag: COMMAND_RPC_GET_INFO_FLAG_SECONDS_FOR_30_BLOCKS)
- synchronization_start_height — unsigned int; size of the local blockchain when the synchronization process started for the first time after daemon start.
- synchronized_connections_count — unsigned int; number of synchronized peers.
- total_coins — unsigned int; number of emitted coins. (Required flag: COMMAND_RPC_GET_INFO_FLAG_TOTAL_COINS)
- transactions_cnt_per_day — unsigned int; number of non-coinbase transactions for the last 24 hours. (Required flag: COMMAND_RPC_GET_INFO_FLAG_TRANSACTIONS_DAILY_STAT)
- transactions_volume_per_day — unsigned int; total amount of non-miner transactions for the last 24 hours. (Required flag: COMMAND_RPC_GET_INFO_FLAG_TRANSACTIONS_DAILY_STAT)
- tx_count — unsigned int; total number of all non-coinbase transactions.
- tx_count_in_last_block — unsigned int; number of non-coinbase transactions in the last block. (Required flag: COMMAND_RPC_GET_INFO_FLAG_TX_COUNT_IN_LAST_BLOCK)
- tx_pool_size — unsigned int; number of transactions in the tx pool.
- white_peerlist_size — unsigned int; number of peers in the white list (total number of peers to which this node has ever been connected).
#### Fields of maintainers_info_external object:
- ver_major — unsigned int; major build version from project maintainers.
- ver_minor — unsigned int; minor build version from project maintainers.
- ver_revision — unsigned int; revision build version from project maintainers.
- mode — unsigned int; maintainers info message type: <br />
#define ALERT_TYPE_CALM 1 <br />
#define ALERT_TYPE_URGENT 2 <br />
#define ALERT_TYPE_CRITICAL 3 <br />

View file

@ -0,0 +1,39 @@
Mark offer as not active
### Request
```json
{
"jsonrpc": "2.0",
"id": "0",
"method": "marketplace_cancel_offer",
"params": {
"tx_id": "",
"no": 0
}
}
```
### Request parameters
- tx_id - id of the transaction with original offer posting(returned in marketplace_push_offer). Basically offers identified by carrier transactions id. Theoretically, one transaction can carry more than one offer, so then there is a second parameter which specifies an index of the offer inside carrier transaction, but since we didn't want to make the user interface and whole system way too complicated for using, by default API place only one offer per transaction.
- no - this parameter is 0 by default, must be used if transaction carries more then one offer.
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"tx_blob_size": 368,
"tx_hash": "d52014dae0b65168e0551acef9e95972041f3f38d92455d18c8b886baece3d90"
}
}
```
### Response parameters
- tx_blob_size
- tx_hash - string; tx hash of the transaction related to the offer being cancelled

View file

@ -0,0 +1,154 @@
General marketplace API which lets read offers related to given wallet
### Request body parameters
```json
{
"jsonrpc": "2.0",
"id": "0",
"method": "marketplace_global_get_offers_ex",
"params": {
"filter": {
"amount_low_limit": 0,
"amount_up_limit": 0,
"bonus": false,
"category": "",
"fake": false,
"keyword": "",
"limit": 100,
"location_city": "",
"location_country": "",
"offer_type_mask": 0,
"offset": 0,
"order_by": 0,
"primary": "",
"rate_low_limit": "0.000000",
"rate_up_limit": "0.000000",
"reverse": false,
"target": "",
"timestamp_start": 0,
"timestamp_stop": 0,
}
}
}
```
- amount_low_limit - filter offers selection by field amount of specified currency at lower boundary.
- amount_up_limit - filter offers selection by field amoun of specified currency t at higher boundary.
-bonus
- category - fiter by category, work's as substring matching, i.e. if categories set to "CLS:MAN:TSH" and filters category fileds set to "MAN" then it fits category condition.
- fake
- keyword - This use search by keyword throught the all fields.
- limit - Maximum records to return.
- location_city - Used to filter by city name or geo-tag
- location_country - Filters by country code.
- offer_type_mask - Specify type of the offer:
- offset - Offeset regarding first item which fit specified filter, count include only items which fit the filter. Userful for enumeration big amount or records, up to whole offers database enumeration.
- order_by - chose in how to order offers in selection. At this moment supported following ordering:
"order_by" |
--- | ---
0 | Order by timestamp (most usable)
1 | Order by an amount of Zano
2 | Order by the amount of specified currency
3 | Order by rate, which calculated as the amount currency divided to amount Zano
4 | Order by payment type(as string)
5 | Order by contact field(as string)
6 | Order by location: country string concatenated with city string
7 | Order by target string, basically title string
- primary -
- rate_low_limit - Filter by low limit of the rate between Zano and currency amount currency divided to amount Zano
- reverse - Reverse order
- target - Basically a title for subject of the Offer - could be the name of the goods or currency which supposed to be traded.
- timestamp_start - Setup a lower timestamp boundary. Useful if the offers are selecting for given time range.
- timestamp_stop - Setup a higher timestamp boundary. Useful if the offers are selecting for given time range.
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"offers": [
{
"ap": "20",
"at": "1",
"b": "",
"cat": "CLS:MAN:TSH",
"cnt": "Skype: some_skype, discord: some_user#01012",
"com": "Some nice comments about tshirt",
"do": "Additional conditions",
"et": 10,
"fee": 10000000000,
"index_in_tx": 0,
"lci": "",
"lco": "World Wide",
"ot": 1,
"p": "USD",
"pt": "Credit cards, BTC, ZANO, ETH",
"security": "0000000000000000000000000000000000000000000000000000000000000000",
"t": "T-shirt with Zano logo, made by Crypjunkie",
"timestamp": 1570219600,
"tx_hash": "6ba12c5d2c66d31f770bfdc88ae9dc90d007b9b33f946fc7c1d9750f8655331c",
"tx_original_hash": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"ap": "20",
"at": "1",
"b": "",
"cat": "CLS:MAN:TSH",
"cnt": "Skype: some_skype, discord: some_user#01012",
"com": "Some nice comments about tshirt",
"do": "Additional conditions",
"et": 10,
"fee": 10000000000,
"index_in_tx": 0,
"lci": "",
"lco": "World Wide",
"ot": 1,
"p": "USD",
"pt": "Credit cards, BTC, ZANO, ETH",
"security": "0000000000000000000000000000000000000000000000000000000000000000",
"t": "T-shirt with Zano logo, made by Crypjunkie",
"timestamp": 1570219840,
"tx_hash": "2987b671cc337203628a3a1bb7ac811e41f110864d6162d3c2276d2c79f694d6",
"tx_original_hash": "0000000000000000000000000000000000000000000000000000000000000000"
}
],
"status": "",
"total_offers": 0
}
}
```
### Response parameters
- ap - the amount of the currency specified for use in this offer
- at - the amount of the items to be sold/bought
- b -
- cat - category of the goods, could be specified with subcategories by separation CLS:MAN:TSH, which could mean Clothes->Man->Tshirts
- cnt - contacts, like skype, discord, telegram, whatever
- com - comments regarding this offer
- do - additional conditions, if need to specify
- et - expiration time, set in days, eg 5 - expire in 5 days after creation
- fee - fee paid for this transaction with the offer, it can be default offer, but the higher fee may bring offers to be higher in search results
- index_in_tx -
- lci - location city, if the also make sense for an offer, could be google geo-autocomplete id, like ChIJD7fiBh9u5kcRYJSMaMOCCwQ
- lco - location country, if this makes sense for an offer
- ot - offer type, 0 - buy currency for Zano, 1 - buy Zano for currency, 2 - buy goods for Zano, 3 - sell goods for Zano
- p -
- pt - payment type, Credit cards, Crypto, Paypal, Flexa
- security -
- t - description for the goods/service which is selling/seeking
- timestamp -
- tx_hash -
- tx_original_hash -

View file

@ -0,0 +1,67 @@
Broadcasts transaction that was previously signed using sign_transfer call
### Request
```json
{
"jsonrpc": "2.0",
"id": "0",
"method": "marketplace_push_offer",
"params": {
"od": {
"ap": "1000",
"at": "1",
"cat": "CLS:MAN:TSH",
"cnt": "https://zanobazaar.com",
"com": "This field is where you write a detailed overview of your product or service, make it good",
"do": "ZxDNaMeZjwCjnHuU5gUNyrP1pM3U5vckbakzzV6dEHyDYeCpW8XGLBFTshcaY8LkG9RQn7FsQx8w2JeJzJwPwuDm2NfixPAXf",
"et": 10,
"fee": 10000000000,
"lci": "THE ZANOVERSE",
"lco": "Decentralized",
"ot": 3,
"pt": "$ZANO",
"t": "Product Title",
"url": "QmVWxCy7JyEuvxMPpcQ4jBzsRxtMFjbF6VGMc4CGuN6iqK"
}
}
}
```
### Request parameters
- ap - the amount of the currency specified for use in this offer
- at - the amount of the items to be sold/bought
- cat - string; category of the goods, could be specified with subcategories by separation CLS:MAN:TSH, which could mean Clothes->Man->Tshirts
- cnt - string; contacts, like skype, discord, telegram, whatever
- com - string; comments regarding this offer
- do - string; additional conditions, if need to specify
- et - integer; expiration time, set in days, eg 5 - expire in 5 days after creation
- fee - fee paid for this transaction with the offer, it can be default offer, but the higher fee may bring offers to be higher in search results
- lci - string; location city, if the also make sense for an offer, could be google geo-autocomplete id, like ChIJD7fiBh9u5kcRYJSMaMOCCwQ
- lco - string; location country, if this makes sense for an offer
- ot - integer; offer type, 0 - buy currency for Zano, 1 - buy Zano for currency, 2 - buy goods for Zano, 3 - sell goods for Zano
- pt - string; payment type, Credit cards, Crypto, Paypal, Flexa
- t - string; description for the goods/service which is selling/seeking
- url - string; url of your stores web presence etc
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"tx_blob_size": 549,
"tx_hash": "2987b671cc337203628a3a1bb7ac811e41f110864d6162d3c2276d2c79f694d6"
}
}
```
### Response parameters
- tx_blob_size
- tx_hash - string; tx hash of the transaction related to the offer being pushed

View file

@ -0,0 +1,68 @@
This method update marketplace offer details
### Request
```json
{
"jsonrpc": "2.0",
"id": "0",
"method": "marketplace_push_update_offer",
"params": {
"tx_id": "",
"no": 0,
"od": {
"ap": "1000",
"at": "1",
"cat": "CLS:MAN:TSH",
"cnt": "https://zanobazaar.com",
"com": "This field is where you write a detailed overview of your product or service, make it good",
"do": "ZxDNaMeZjwCjnHuU5gUNyrP1pM3U5vckbakzzV6dEHyDYeCpW8XGLBFTshcaY8LkG9RQn7FsQx8w2JeJzJwPwuDm2NfixPAXf",
"et": 10,
"fee": 10000000000,
"lci": "THE ZANOVERSE",
"lco": "Decentralized",
"ot": 3,
"pt": "$ZANO",
"t": "Product Title",
"url": "QmVWxCy7JyEuvxMPpcQ4jBzsRxtMFjbF6VGMc4CGuN6iqK"
}
}
}
```
### Request parameters
- ap - the amount of the currency specified for use in this offer
- at - the amount of the items to be sold/bought
- cat - category of the goods, could be specified with subcategories by separation CLS:MAN:TSH, which could mean Clothes->Man->Tshirts
- cnt - contacts, like skype, discord, telegram, whatever
- com - comments regarding this offer
- do - additional conditions, if need to specify
- et - expiration time, set in days, eg 5 - expire in 5 days after creation
- fee - fee paid for this transaction with the offer, it can be default offer, but the higher fee may bring offers to be higher in search results
- lci - location city, if the also make sense for an offer, could be google geo-autocomplete id, like ChIJD7fiBh9u5kcRYJSMaMOCCwQ
- lco - location country, if this makes sense for an offer
- ot - offer type, 0 - buy currency for Zano, 1 - buy Zano for currency, 2 - buy goods for Zano, 3 - sell goods for Zano
- pt - payment type, Credit cards, Crypto, Paypal, Flexa
- t - description for the goods/service which is selling/seeking
- url - string; url of your stores web presence etc
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"tx_blob_size": 725,
"tx_hash": "06da9bac0f15fd7ab41983f9437f95835b1baef6810fe15b2ea831f60b058b4b"
}
}
```
### Response parameters
- tx_blob_size
- tx_hash - string; tx hash of the transaction related to the offer being pushed

View file

@ -0,0 +1,25 @@
Clears the transaction pool.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "reset_transaction_pool"
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
```

View file

@ -0,0 +1,35 @@
Returns type of an entity by specified hash identifier.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "search_by_id",
"params": {
"id": "ee25a5503726368eef558737f81f15fdc5f1e705b678df81315c83d8789ed4b3"
}
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK",
"types_found": [
"tx"
]
}
}
```
### Response information
- types_found — array of strings; a set of the types found (usually only one). Possible values: block, alt_block, key_image, tx, multisig_id.

View file

@ -0,0 +1,38 @@
### Request
```json
curl -i -X POST \
-H "Content-Type:application/json" \
-d \
'{
"jsonrpc": "2.0",
"id": 0,
"method": "validate_signature",
"params":
{
"buff": "aGFoYWhh",
"alias": "ravaga"
"pkey": "",
"sig": "80229d7660ad61a565af8f980cc86723b7a67d5d2f205e5f6895294ed700cd08e4be15bfb00889ad9731d51d7e8687585c2e27c031e214229a3fcc1ce3a17d0d"
}
}
}' \
'http://127.0.0.1:12111/json_rpc'
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
```

View file

@ -0,0 +1,128 @@
Checks redeemed proposal
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "atomics_check_htlc_redeemed",
"params": {
"htlc_tx_id": ""
}
}
```
### Body parameters
- htlc_tx_id - ID for transaction carrying HTLC.
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"last_item_index": 72,
"pi": {
"balance": 2260000000000,
"curent_height": 1623835,
"transfer_entries_count": 96,
"transfers_count": 3,
"unlocked_balance": 2260000000000
},
"total_transfers": 3,
"transfers": [
{
"amount": 1000000000000,
"comment": "",
"fee": 10000000000,
"height": 1131972,
"is_income": true,
"is_mining": false,
"is_mixing": false,
"is_service": false,
"payment_id": "",
"remote_addresses": [
"ZxCD4JQoUw6MD343aKyJx2Zx44fdkc2r22rwULfcBDrAKyfcqYPNjiFKfnXVyRcHgMLdJLrhmmvN4ViRBDfanhLZ1EdqY8vbk"
],
"show_sender": false,
"td": {
"rcv": [
1000000000000
]
},
"timestamp": 1625569494,
"transfer_internal_index": 0,
"tx_blob_size": 1225,
"tx_hash": "b4f6335a3d476629448aad0cbb5a56cbd36ea60d00dcfdb79b501d3f2d4abede",
"tx_type": 0,
"unlock_time": 0
},
{
"amount": 1000000000000,
"comment": "",
"fee": 10000000000,
"height": 1131972,
"is_income": true,
"is_mining": false,
"is_mixing": false,
"is_service": false,
"payment_id": "",
"remote_addresses": [
"ZxCD4JQoUw6MD343aKyJx2Zx44fdkc2r22rwULfcBDrAKyfcqYPNjiFKfnXVyRcHgMLdJLrhmmvN4ViRBDfanhLZ1EdqY8vbk"
],
"show_sender": false,
"td": {
"rcv": [
1000000000000
]
},
"timestamp": 1625569494,
"transfer_internal_index": 1,
"tx_blob_size": 1226,
"tx_hash": "0a7551887a82f893aedfe72aa32189a84743d0044d47b05a5000a2a08ce791a3",
"tx_type": 0,
"unlock_time": 0
},
{
"amount": 0,
"comment": "",
"fee": 10000000000,
"height": 1555055,
"is_income": false,
"is_mining": false,
"is_mixing": false,
"is_service": true,
"payment_id": "",
"recipients_aliases": [
"testtest"
],
"remote_addresses": [
"ZxDEMMwyGBE1JE1b5pYH4vExnTeFfN3gMeiC1wb7n5dVC43oLHAJXkq5pmiZqRMegTi4LzepmddWWAiUZBc44HJL2iStSuRPV"
],
"show_sender": false,
"td": {
"spn": [
10000000000
]
},
"timestamp": 1651003337,
"transfer_internal_index": 72,
"tx_blob_size": 324,
"tx_hash": "78695ec5cd55bc507955c53dcca11a08d13d91498d5edfd2b61415783f23c133",
"tx_type": 5,
"unlock_time": 0
}
]
}
}
```
### Response information
- origin_secrete_as_hex - Revealed origin secret, encoded in HEX. If this field is empty, then HTLC have not been redeemed yet.
- redeem_tx_id - ID of transaction that redeem HTLC. Likely you won't need this field, put it here just in case.

View file

@ -0,0 +1,46 @@
Creates atomic swap proposal
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "atomics_create_htlc_proposal",
"params": {
"amount": 1,
"counterparty_address": "",
"lock_blocks_count": 1,
"htlc_hash": ""
}
}
```
### Body parameters
- amount - amount of the coins going into HTLC. Fee for redeem transaction will be withheld from this amount too.
- counterparty_address - an address of the other part of atomic swap process
- lock_blocks_count - amount of blocks, which define a period of time, allotted for the redeem operation. 1 block - 1 minute, 1440 blocks is est 1 day.
- htlc_hash - Hash of the secret, if this field specified, then HTLC created with this hash, if this is empty, then wallet will derive secret in deterministic way, and in response will be returned derived_origin_secret, which will be the key for redeem of this HTLC and, obviously, for HTLC created by counter-party in the other blockchain. At this moment by default RPC API in wallet support only sha256 as hashing for HTLC, but we also have implemented support of RIPEMD-160 in core and wallet, so if anyone need access to this hash, please make a issue in our github, and we'll be happy to enable support of this hash too.
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"result_tx_blob": "b329cce92a23fdaf89a5ad907ca9c4c1fbd052b79ec8414438533c83b39afc2bb329cce92a23fdaf89a5ad907ca9c4c1fbd052b79ec8414438533c83b39afc2bb329cce92a23fdaf89a5ad907ca9c4c1fbd052b79ec8414438533c83",
"result_tx_id": "b329cce92a23fdaf89a5ad907ca9c4c1fbd052b79ec8414438533c83b39afc2b",
"derived_origin_secret_as_hex": "fe42b8c4742d2dbe4d5de5ae5212f75acb62b75e4b66b758ff8e252825c2d7a5"
}
}
```
### Response information
- result_tx_blob - Created and broadcasted transaction itself.
- result_tx_id - Created transaction id .
- derived_origin_secret_as_hex - If htlc_hash field in request was empty, then this field will keep secret, which was deterministically created by sender wallet(If wallet file was lost and recovered from backup with seed phrase, then secret for any particular HTLC created by this wallet will be possible to restore). This field is HEX-encoded, but sha256 supposed to be calculated from raw blob of this secret.

View file

@ -0,0 +1,44 @@
Shows the list of active proposals
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "atomics_get_list_of_active_htlc",
"params": {
"income_redeem_only": true
}
}
```
- income_redeem_only - Shows only incoming HTLCs, ie only those contracts which might be redeemed by this wallet.
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"htlcs": {
"counterparty_address": "ZxBvJDuQjMG9R2j4WnYUhBYNrwZPwuyXrC7FHdVmWqaESgowDvgfWtiXeNGu8Px9B24pkmjsA39fzSSiEQG1ekB225ZnrMTBp",
"sha256_hash": "8ee7377d6ee3632ea5b43bed2a5ea41c035abb3fe6146aec63e6c5cbbc4257f1",
"tx_id": "018c8bcf749063ee4a8127b84586a03f9bbd1909d9e5cfdb92007ebc463462d4",
"amount": 100000,
"is_redeem": "true"
}
}
}
```
### Response information
- counterparty_address - Address of the party created HTLC
- sha256_hash - Hash of the HTLC, by default sha256
- tx_id - ID of transaction carrying this HTLC(this ID needed for call of atomics_redeem_htlc)
- amount - Amount being transfered by this HTLC
- is_redeem - define, if this HTLC is incoming with respect to the current wallet

View file

@ -0,0 +1,40 @@
Redeems atomic swap
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "atomics_redeem_htlc",
"params": {
"tx_id": "",
"origin_secret_as_hex": ""
}
}
```
### Body parameters
- tx_id - Identify transaction which carry needed HTLC, by this we basically identify HTLC itself. (Theoretically one transaction can carry more then 1 HTLC, but since this unlikely will ever be used, current implementation of the wallet assume it only one HTLC per tx, and we identify HTLC by carrying tx_id. This can be changed in future, if needed, without hardfork).
- origin_secret_as_hex - Secret for HTLC, encoded in HEX. (sha256 supposed to be calculated from raw secret blob).
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"result_tx_blob": "df956c7c82cc2658333de5ca3c860edf956c7c82cc2658333de5ca3c860edf956c7c82cc2658333de5ca3c860edf956c7c82cc2658333de5ca3c860edf956c7c82cc2658333de5ca3c860e",
"result_tx_id": "612ca0baf8a1a8b7b86d9b56e3b9e1ef4bf6af6296ece8d75e85601fe3987b7b"
}
}
```
### Response information
- result_tx_blob - Created and broadcasted transaction in a hex encoded blob.
- result_tx_id - Created and broadcasted transaction's ID.

View file

@ -0,0 +1,45 @@
Gets list of incoming transfers by given payment IDs
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_payments",
"params": {
"payment_id": "",
"allow_locked_transactions": false
}
}
```
- payment_id - payment id of txs to search
- allow_locked_transactions - include transactions that are currently locked
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"payments": [
{
"amount": 100000000,
"block_height": 202556,
"tx_hash": "01220e8304d46b940a86e383d55ca5887b34f158a7365bbcdd17c5a305814a93",
"unlock_time": 0
}
]
}
}
```
### Response information
- amount - unsigned int; amount of coins in atomic units.
- block_height - unsigned int; height of the block containing corresponding transaction.
- tx_hash - string; transactions hash.
- unlock_time - unsigned int; if nonzero — unix timestamp since then this transfers coins can be spent. If it is less than 500000000, the value is treated as a minimum block height at which this transfers coin can be spent.

View file

@ -0,0 +1,11 @@
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_mining_history"
}
```

View file

@ -0,0 +1,46 @@
Gets list of incoming transfers by a given payment ID
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_payments",
"params": {
"payment_id": "",
"allow_locked_transactions": false
}
}
```
- payment_id - string; payment id to be searched
- allow_locked_transactions - include currently locked transactions
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"payments": [
{
"amount": 100000000,
"block_height": 202556,
"tx_hash": "01220e8304d46b940a86e383d55ca5887b34f158a7365bbcdd17c5a305814a93",
"unlock_time": 0
}
]
}
}
```
### Response information
- amount - unsigned int; amount of coins in atomic units.
- block_height - unsigned int; height of the block containing corresponding transaction.
- tx_hash - string; transactions hash.
- unlock_time - unsigned int; if nonzero — unix timestamp since then this transfers coins can be spent. If it is less than 500000000, the value is treated as a minimum block height at which this transfers coin can be spent.

View file

@ -0,0 +1,40 @@
This endpoint wasnt on original docs and was found in GitHub code, needs a description of what the endpoint does, any required request parameters? and descriptions for json response parameters
:::info
Check with Ravaga what this endpoint does.
:::
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_seed_phrase_info"
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"hash_sum_matched": false,
"require_password": false,
"syntax_correct": false,
"tracking": false
}
}
```
### Response information
- hash_sum_matched - ?
- require_password - ?
- syntax_correct - ?
- tracking - ?

View file

@ -0,0 +1,38 @@
Gets information related to wallet
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "get_wallet_info"
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"address": "ZxDbSpgDzyaMecaMUi6orsLimz3M8ptCzYzEuboTdYmwai8xhyATWnkHCt26Ts2kT75ajPGgmDAWR6xdpVBto8Vz1dmQJp8AJ",
"current_height": 2116310,
"is_whatch_only": false,
"path": "docs.wallet",
"transfer_entries_count": 0,
"transfers_count": 0
}
}
```
### Response parameters
- address - string; address associated with wallet
- current_height - current block height
- is_whatch_only
- path - string; path to wallet file
- transfer_entries_count - the number of transfers conducted by the wallet

View file

@ -0,0 +1,29 @@
Obtains wallets public address
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "getaddress"
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"address": "ZxDNaMeZjwCjnHuU5gUNyrP1pM3U5vckbakzzV6dEHyDYeCpW8XGLBFTshcaY8LkG9RQn7FsQx8w2JeJzJwPwuDm2NfixPAXf"
}
}
```
### Response information
- address - string; standard public address of the wallet.

View file

@ -0,0 +1,36 @@
Creates an integrated address for the wallet by embedding the given payment ID together with the wallet's public address.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "make_integrated_address",
"params": {
"payment_id": ""
}
}
```
- payment_id - hex-encoded payment identifier. If empty, random 8-byte payment ID will be generated and used.
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"integrated_address": "ZxBvJDuQjMG9R2j4WnYUhBYNrwZPwuyXrC7FHdVmWqaESgowDvgfWtiXeNGu8Px9B24pkmjsA39fzSSiEQG1ekB225ZnrMTBp",
"payment_id": "00000000ff00ff00"
}
}
```
### Response inforamtion
- integrated_address - string; the result.
- payment_id - string; hex-encoded payment ID, that was used (useful if an empty payment_id was given as an input).

View file

@ -0,0 +1,149 @@
[Multiassets] Fetches the list of wallets
### Request
```json
curl -i -X POST \
-H "Content-Type:application/json" \
-d \
'{
"jsonrpc": "2.0",
"id": 0,
"method": "mw_get_wallets",
"params": {}
}
}' \
'http://127.0.0.1:12111/json_rpc'
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"wallets": [
{
"wallet_id": 0,
"wi": {
"address": "ZxDA4mkxiiNPjBRyr2TcQCJNHTVSMt8s34snHJPoUxUwR9wMWad7cXDNGyBDKFjnpd16thHdmmBPpMhyCBjLXbDC1FTYpyrWs",
"balances": [
{
"asset_info": {
"asset_id": "d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a",
"current_supply": 0,
"decimal_point": 12,
"full_name": "Zano",
"meta_info": "",
"owner": "0000000000000000000000000000000000000000000000000000000000000000",
"ticker": "ZANO",
"total_max_supply": 0
},
"awaiting_in": 0,
"awaiting_out": 0,
"total": 0,
"unlocked": 0
}
],
"is_auditable": false,
"is_watch_only": false,
"mined_total": 0,
"path": "E:/home/projects/temp/testnet_wallet.zan",
"view_sec_key": "2fae8c8472b43443ba06cdcef456d9b27822e2650d11eb572204663556330b0d"
}
},
{
"wallet_id": 1,
"wi": {
"address": "ZxDrfTQcvsfiGccJWMTyiUHh9HTuQQffKTRaKgYGMkyrQq2hz4e9GXfiKt6PRLrsr4CPqhF1m6pEpYHTiPcm2Myj1bfXdhkw7",
"balances": [
{
"asset_info": {
"asset_id": "d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a",
"current_supply": 0,
"decimal_point": 12,
"full_name": "Zano",
"meta_info": "",
"owner": "0000000000000000000000000000000000000000000000000000000000000000",
"ticker": "ZANO",
"total_max_supply": 0
},
"awaiting_in": 0,
"awaiting_out": 0,
"total": 0,
"unlocked": 0
}
],
"is_auditable": false,
"is_watch_only": false,
"mined_total": 0,
"path": "E:/home/projects/temp/testnet_wallet2.zan",
"view_sec_key": "8651f48f90282d147a7e142c0b3a9cef49fa4a27fad9d69d5c37898ee6af2d0c"
}
},
{
"wallet_id": 2,
"wi": {
"address": "ZxC3q9Zd6xDKBq8ZrCDiZBap2yLW6FT8g8yxJEkcfYx7Y7GMDKF9g2QAHLNASbmBKS45w5fFa7dmQe67d1UJn9Xp14y51a3Gh",
"balances": [
{
"asset_info": {
"asset_id": "d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a",
"current_supply": 0,
"decimal_point": 12,
"full_name": "Zano",
"meta_info": "",
"owner": "0000000000000000000000000000000000000000000000000000000000000000",
"ticker": "ZANO",
"total_max_supply": 0
},
"awaiting_in": 0,
"awaiting_out": 0,
"total": 0,
"unlocked": 0
}
],
"is_auditable": false,
"is_watch_only": false,
"mined_total": 0,
"path": "E:/home/projects/temp/testnet_wallet3.zan",
"view_sec_key": "e9dec77214ae339621ddcba5cc1af9a44103f864ddd0fa8c19c6a0f173ce9c05"
}
},
{
"wallet_id": 3,
"wi": {
"address": "ZxDhY7J4iZBN7qg5T3KWQeEtMdBtvuGV6DdRvhZxcU4vCNfAE8wctxtCy5u965mtqzVKpGBTo7D9HFcGkXaL4v9F25TXQTQW1",
"balances": [
{
"asset_info": {
"asset_id": "d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a",
"current_supply": 0,
"decimal_point": 12,
"full_name": "Zano",
"meta_info": "",
"owner": "0000000000000000000000000000000000000000000000000000000000000000",
"ticker": "ZANO",
"total_max_supply": 0
},
"awaiting_in": 0,
"awaiting_out": 0,
"total": 0,
"unlocked": 0
}
],
"is_auditable": false,
"is_watch_only": false,
"mined_total": 0,
"path": "E:/home/projects/temp/testnet_wallet5.zan",
"view_sec_key": "c419279f71dce7b330f3406d499850b1b38a5dbae724db0ef98a7b36f9ad0800"
}
}
]
}
}
```

View file

@ -0,0 +1,31 @@
[Multiassets] Selects active wallet for further RPC calls
### Request
```json
curl -i -X POST \
-H "Content-Type:application/json" \
-d \
'{
"jsonrpc": "2.0",
"id": 0,
"method": "mw_select_wallet",
"params": {"wallet_id": 0}
}
}' \
'http://127.0.0.1:12111/json_rpc'
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"status": "OK"
}
}
```

View file

@ -0,0 +1,95 @@
Gets list of incoming or outgoing transfers by a given payment ID
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "search_for_transactions",
"params": {
"tx_id": "",
"in": true,
"out": false,
"pool": false,
"filter_by_height": false,
"min_height": 1,
"max_height": 1
}
}
```
- tx_id - hash of a transaction, if specified then only that tx will be returned (if it passes the filters)in - bool; include incomin txs in response
- in - if true then incoming transactions will be taken into account
- out - if true then outgoing transactions will be taken into account
- pool - if true, unconfirmed transactions from the pool will be taken into account as well
- filter_by_height - if true, transactions will be filtered by block height using min_height and max_height
- min_height - minimum block height (including)
- max_height - maximum block height (including)
---
:::danger
This request has been shortened for the sake of the example, a real response will return many more aliases.
:::
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"in": [
{
"amount": 100000000000000,
"comment": "twitter thread contest kekz",
"fee": 0,
"height": 2108980,
"is_income": true,
"is_mining": false,
"is_mixing": false,
"is_service": false,
"payment_id": "",
"remote_addresses": [
"aZxb4c9AMKP2rzg9JnJpV8M9Lm7MRiSoQSV9BJrJ4BVo9xTUw5JQoS4DjNzAcjfQsxRPJ38nWNh9c7w4UuZ7NCYxRvkgRbqEng9"
],
"show_sender": false,
"td": {
"rcv": [
100000000000000
]
},
"timestamp": 1684249681,
"transfer_internal_index": 0,
"tx_blob_size": 608,
"tx_hash": "41ec870cb4d03e62193f7b57cd4485c579441d009a9e44a31abc5b392a5991e3",
"tx_type": 0,
"unlock_time": 0
}
]
}
}
```
### Response information
- amount - integer; amount of coins in atomic units;
- comment - string; an optional comment set by the sender;
- fee - integer; transaction fee in atomic units;
- height - integer; height of the block containing corresponding transaction;
- is_income - Boolean; true if this is incoming transfer;
- is_mining - Boolean; true if this is a miner (i.e. coinbase) tx;
- is_mixing - Boolean; true if this tx is using mixins;
- is_service - Boolean; true if this is a special service tx, not a normal one;
- payment_id - string; (optional) hex-encoded payment identifier;
- remote_addresses - list of strings; (optional) sender address(es);
- show_sender - Boolean; true if sender address info is present;
- td - a wallet_transfer_info_details object;
- rcv - list of integers; received amounts in atomic units;
- timestamp - integer; Unix timestamp when the tx was received;
- transfer_internal_index -
- tx_blob_size -
- tx_hash - string; transactions hash.
- tx_type -
- unlock_time - unlock_time — unsigned int; if nonzero — unix timestamp since then this transfers coins can be spent. If it is less than 500000000, the value is treated as a minimum block height at which this transfers coin can be spent.

View file

@ -0,0 +1,35 @@
Signes a message with the wallet key
### Request
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"pkey": "a85e688adf2b87e09588f223e9ed67d48cf19b21752a172b973f96b52f289068",
"sig": "80229d7660ad61a565af8f980cc86723b7a67d5d2f205e5f6895294ed700cd08e4be15bfb00889ad9731d51d7e8687585c2e27c031e214229a3fcc1ce3a17d0d"
}
}
```
---
### Response
```json
curl -i -X POST \
-H "Content-Type:application/json" \
-d \
'{
"jsonrpc": "2.0",
"id": 0,
"method": "sign_message",
"params":
{
"buff": "aGFoYWhh",
}
}
}' \
'http://127.0.0.1:12111/json_rpc'
```

View file

@ -0,0 +1,38 @@
Signs a transaction prepared by watch-only wallet (for cold-signing process)
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "sign_transfer",
"params": {
"tx_unsigned_hex": ""
}
}
```
### Request information
- tx_unsigned_hex - hex-encoded unsigned transaction as returned from transfer call.
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"tx_hash": "855ae466c59b24295152740e84d7f823eaf3c91adfb1ba7b4ff1dc6085b79e63",
"tx_signed_hex": "00_LONG_HEX_00"
}
}
```
### Response information
- tx_hash - string; hash identifier of signed transaction.
- tx_signed_hex - string; hex-encoded signed transaction.

View file

@ -0,0 +1,36 @@
Creates an integrated address for the wallet by embedding the given payment ID together with the wallet's public address.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "split_integrated_address",
"params": {
"integrated_address": ""
}
}
```
- integrated_address - integrated or standard address
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"payment_id": "",
"standard_address": "ZxBvJDuQjMG9R2j4WnYUhBYNrwZPwuyXrC7FHdVmWqaESgowDvgfWtiXeNGu8Px9B24pkmjsA39fzSSiEQG1ekB225ZnrMTBp"
}
}
```
### Response information
- payment_id - string; hex-encoded payment ID, extracted from the given integrated address. Can be empty. Will be empty when a standard address is given as an input.
- standard_address - string; standard address with no payment ID attached.

View file

@ -0,0 +1,29 @@
Saves wallet update progress into a wallet file. Although progress is always saved upon graceful wallet application termination, with this call a user can manually trigger saving process. Otherwise, in a case of abnormal wallet application termination the progress wont be saved and it will take some time to synchronize on the next launch.
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "store"
}
```
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"wallet_file_size": 13441
}
}
```
### Response information
- wallet_file_size - size of wallet in KB

View file

@ -0,0 +1,36 @@
Broadcasts transaction that was previously signed using sign_transfer call
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "submit_transfer",
"params": {
"tx_signed_hex": ""
}
}
```
### Request information
- tx_signed_hex - hex-encoded signed transaction as returned from sign_transfer call.
---
### Response
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"tx_hash": "0554849abdb62f7d1902ddd14ce005722a340fc14fab4a375adc8749abf4e10b"
}
}
```
### Response information
- tx_hash - string; transaction hash identifier.

View file

@ -0,0 +1,15 @@
Sweeps dust below certain level
### Request
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "sweep_below",
"params": {
"": ""
}
}
```
---

View file

@ -0,0 +1,50 @@
Creates a transaction and broadcasts it to the network
### Request
:::caution
If you use multiple addresses in destinations field, make sure there are maximum 1 integrated address involved, or, if "payment id" parameter was specified, then integrated addresses are not allowed.
:::
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "transfer",
"params": {
"destinations": "",
"fee": 0,
"mixin": 10,
"payment_id": "",
"comment": ""
}
}
```
- destinations - list of transfer_destination objects (see below); list of recipients with corresponding amount of coins for each.
- fee - transaction fee in atomic units. Minimum: 10^10 atomic units.
- mixin - number of foreign outputs to be mixed in with each input. Increases untraceability. Specify zero for direct and traceable transfers.
- payment_id - hex-encoded payment id. Can be empty if payment ID is not required for this transfer.
- comment - text commentary which follow the transaction in encrypted form and is visible only to the sender and the receiver.
---
### Response
```json
{
"id": "0",
"jsonrpc": "2.0",
"result": {
"tx_hash": "b329cce92a23fdaf89a5ad907ca9c4c1fbd052b79ec8414438533c83b39afc2b",
"tx_unsigned_hex": ""
}
}
```
### Response information
- tx_hash - string; hash identifier of the transaction that was successfully sent.
- tx_unsigned_hex - string; hex-encoded unsigned transaction (for watch-only wallets; to be used in cold-signing process).

View file

@ -3,3 +3,7 @@ sidebar_position: 1
---
# Overview
Hello
# Zano Docs API

View file

@ -0,0 +1,6 @@
import React from "react";
import Link from "@docusaurus/Link";
const Button = ({ text, link }) => <Link to={link}>{text}</Link>;
export default Button;

View file

@ -1,23 +0,0 @@
import React from "react";
import Link from "@docusaurus/Link";
const buttons = [
{
text: "Users",
link: "docs/use/intro",
},
];
const Button = ({ text, link }) => <Link to={link}>{text}</Link>;
const Buttons = () => {
return (
<div>
{buttons.map((button) => (
<Button key={button.text} text={button.text} link={button.link} />
))}
</div>
);
};
export default Buttons;

View file

@ -0,0 +1,170 @@
import React from "react";
import ProjectImage from "../../../static/img/blue.jpg";
import Button from "../../components/Button/Button";
import "./startpage.css";
function StartPage () {
return (
<>
<main className="main-content">
<StartArticle />
<LearnMoreComponent />
</main>
</>
);
}
function StartArticle () {
return (
<div className="article-intro">
<article>
<div className="article-welcome">
<h1>Zano Documentation</h1>
<span>
Sed ut perspiciatis unde omnis
iste natus error sit voluptatem
accusantium doloremque laudantium,
totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae
vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia
voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni
dolores eos qui ratione voluptatem sequi nesciunt.
</span>
</div>
<StartTextBlock
textBlockTitle={"Getting started"}
textBlockItems={
[
{
textBlockLink: "#",
textBlockLinkText: "Unassigned link",
textBlockContent: `At vero eos et accusamus et iusto
odio dignissimosducimus qui blanditiis praesentium
voluptatum deleniti atque corrupti quos dolores et
quas molestias excepturi sint occaecati cupiditate
non provident, similique sunt in culpa qui officia
deserunt mollitia animi, id est laborum et dolorum fuga`,
}
]
}
/>
<StartTextBlock
textBlockTitle={"Start learning"}
textBlockItems={
[
{
textBlockLink: "#",
textBlockLinkText: "Unassigned link",
textBlockContent: `At vero eos et accusamus et iusto
odio dignissimosducimus qui blanditiis praesentium
voluptatum deleniti atque corrupti quos dolores et
quas molestias excepturi sint occaecati cupiditate
non provident, similique sunt in culpa qui officia
deserunt mollitia animi, id est laborum et dolorum fuga`,
}
]
}
/>
<StartTextBlock
textBlockTitle={"Mine and Stake"}
textBlockItems={
[
{
textBlockLink: "#",
textBlockLinkText: "Unassigned link",
textBlockContent: `At vero eos et accusamus et iusto
odio dignissimosducimus qui blanditiis praesentium
voluptatum deleniti atque corrupti quos dolores et
quas molestias excepturi sint occaecati cupiditate
non provident, similique sunt in culpa qui officia
deserunt mollitia animi, id est laborum et dolorum fuga`,
}
]
}
/>
<StartTextBlock
textBlockTitle={"Build on Zano"}
textBlockItems={
[
{
textBlockLink: "#",
textBlockLinkText: "Unassigned link",
textBlockContent: `At vero eos et accusamus et iusto
odio dignissimosducimus qui blanditiis praesentium
voluptatum deleniti atque corrupti quos dolores et
quas molestias excepturi sint occaecati cupiditate
non provident, similique sunt in culpa qui officia
deserunt mollitia animi, id est laborum et dolorum fuga`,
},
{
textBlockLink: "#",
textBlockLinkText: "Unassigned link",
textBlockContent: `On the other hand,
we denounce with righteous indignation and dislike men who are so beguiled and demoralized
by the charms of pleasure of the moment, so blinded by desire,
that they cannot foresee the pain and trouble that are bound to ensue;`,
}
]
}
/>
</article>
<BuildedProjects />
</div>
);
}
function BuildedProjects () {
return (
<div>
<div className="builded-projects">
<span>Projects built on Zano</span>
<div className="builded-projects__images">
<img src={ProjectImage} alt="" width="280px" height="115px"/>
<img src={ProjectImage} alt="" width="280px" height="115px"/>
<img src={ProjectImage} alt="" width="280px" height="115px"/>
</div>
</div>
</div>
);
}
function LearnMoreComponent (props) {
return (
<div className="learn-more">
<h2>Learn more</h2>
<div className="learn-more__links">
<Button link="#" text="Developers"/>
<Button link="#" text="Miners/Stakers"/>
<Button link="#" text="Users"/>
</div>
</div>
);
}
function StartTextBlock (props) {
return (
<div className="start-text-block">
<h2>{props.textBlockTitle}</h2>
{props.textBlockItems.map((item) => (
<StartTextBlockItem
key={item.textBlockLink}
textBlockLink={item.textBlockLink}
textBlockLinkText={item.textBlockLinkText}
textBlockContent={item.textBlockContent}
/>
))}
</div>
);
}
function StartTextBlockItem (props) {
return (
<>
<span>
<a href={props.textBlockLink}>{props.textBlockLinkText + " "}</a>
{props.textBlockContent}
</span>
</>
)
}
export default StartPage;

View file

@ -0,0 +1,172 @@
@import url("../../css/custom.css");
.main-content{
margin: 3% 20% 3% 20%;
display: flex;
justify-content: center;
flex-direction: column;
width: 60%;
}
.article-welcome > h1{
font-size: 3rem;
}
@media (max-width: 600px) {
.main-content{
margin: 3% 10% 3% 10%;
width: 80%;
}
}
@media (max-width: 460px) {
.main-content{
margin: 3% 5% 3% 5%;
width: 90%;
}
.article-welcome > h1{
font-size: 2rem;
}
}
.article-intro > article {
display: flex;
flex-direction: column;
}
.start-text-block {
font-size: var(--ifm-code-font-size);
margin-top: 20px;
display: flex;
flex-direction: column;
}
.start-text-block > h2 {
margin-block-start: 0;
margin-block-end: 0;
}
.start-text-block > span {
font-size: var(--ifm-code-font-size);
margin-top: 15px;
}
.start-text-block > span > a {
font-size: var(--ifm-code-font-size);
color: var(--ifm-color-primary-lighter);
text-decoration: none;
}
.builded-projects{
width: 100%;
display: flex;
flex-direction: column;
margin-top: 3%;
}
.builded-projects span {
font-size: var(--ifm-code-font-size);
font-weight: 500;
}
.builded-projects__images{
display: flex;
margin-top: 15px;
}
.builded-projects__images :not(:first-child){
margin-left: 20px;
}
@media (max-width: 900px) {
.builded-projects__images{
display: flex;
flex-direction: column;
}
.builded-projects__images :not(:first-child){
margin-left: 0;
margin-top: 20px;
}
}
.learn-more{
margin-top: 40px;
display: flex;
flex-direction: column;
margin-bottom: 50px;
}
.learn-more > h2 {
margin-block-start: 0;
margin-block-end: 0;
}
.learn-more > div{
margin-top: 20px;
display: flex;
flex-direction: row;
align-items: center;
}
.learn-more > div > :not(:first-child){
margin-left: 20px;
}
.learn-more > div > a{
display: flex;
align-items: center;
text-decoration: none;
color: var(--ifm-link-color);
font-weight: 600;
width: 280px;
padding: 25px 0px 25px 20px;
border-radius: 0.625rem;
border: 1px solid var(--ifm-color-emphasis-300);
backdrop-filter: blur(3px);
}
.learn-more > div > a:hover{
transition: border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default);
border: 0.0625rem solid var(--ifm-color-primary-lighter);
}
@media (max-width: 900px) {
.learn-more > div{
display: flex;
flex-direction: column;
align-items: start;
}
.learn-more > div > :not(:first-child){
margin-top: 10px;
margin-left: 0;
}
}
@media (max-width: 400px) {
.learn-more > div{
display: flex;
flex-direction: column;
align-items: start;
}
.learn-more > div > a{
width: 220px;
}
.learn-more > div > :not(:first-child){
margin-top: 10px;
margin-left: 0;
}
}

View file

@ -1,8 +1,7 @@
import React from "react";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Layout from "@theme/Layout";
import Intro from "../components/Intro/Intro";
import Buttons from "../components/Buttons/Buttons";
import StartPage from "./StartPage/StartPage";
const Home = () => {
const { siteConfig } = useDocusaurusContext();
@ -11,10 +10,7 @@ const Home = () => {
title={`Hello from ${siteConfig.title}`}
description="Blockchain privacy for mass adoption"
>
<main>
<Intro />
<Buttons />
</main>
<StartPage />
</Layout>
);
};

BIN
static/img/blue.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB