Skip to content

Use Cases Examples

By interacting with the DCore you are using its functions. The most commonly used of them are accessible via CLI Wallet, which we will refer to and describe in the text below. Please take into consideration that the functions, which DCore can provide are unlimited, and the CLI Wallet is just a subset of the DCore. Keep reading for a short list of use cases which are possible in DCore.


Available Methods in a CLI Wallet

General methods:

For more information about methods provided by CLI Wallet, please visit API documentation.


Send a Message

By using the send_message method you can send a message to any recipients you want (at least one recipient is required).

Method definition:

send_message - Sends a text message to one or many users.

void send_message(string from,
                  std::vector<string> to,
                  string text);

Parameters:

  • from - An account sending the message.
  • to - One or multiple accounts receiving the message.
  • text - The body of the message.

Example:

send_message sender_acc [recv_acc1, recv_acc2] "Test message text."

Result:

send_message X [Y, Z] "Test message text."
null

Send message API developer documentation


Read a Message

To check and read received messages use get_messages method. It's described below.

Method definition:

get_messages - Receives receiver's messages.

vector<text_message>
get_messages(string receiver,
             uint32_t max_count);

Parameters:

  • receiver - Message receiver name which must be imported to caller's wallet.
  • max_count - Maximal number of the last messages to be displayed.

Returned value:

  • Vector of message objects.

Example:

get_messages recv_acc1 1

Response:

get_messages recv_acc1 1
[{
    "created": "2017-11-15T14:18:35",
    "from": "sender_acc",
    "to": [
      "recv_acc1",
      "recv_acc2"
    ],
    "text": "Test message text."
  }
]

Get messages API developer documentation


Vote for a Miner

To keep the network going and to influence its growth you can vote for miners who will be chosen to create new blocks, validate coming transactions, write valid transactions to the newly generated blocks and add the blocks to the blockchain. Every vote counts. At the time of writing this guide, voting process is done every 24 hours and the first 33 miners with the highest number of votes are elected to mining process.

To get enough information about the voting process, please keep reading. To use quick navigation, use redirection links to show a list of all miners, get information about a specific miner, vote for a specific miner.


Get a List of Miners

Let us assume you are going to cast your vote for a miner for the first time in your life. To know for whom you can vote, use the next method, which will show you a list of all miners.

Method definition:

list_miners - Shows a list of all registered miners in the blockchain. The list consists of all account names that own miners and the associated miner id, sorted by their name. This lists miners whether they are currently voted in or not. Use the lowerbound and limit parameters to page through the list. To retrieve all miners, start by setting lowerbound to the empty string "", and then each iteration, pass the last miner name returned as the lowerbound for the next list_miners() call.

map<string,miner_id_type> list_miners(string lowerbound, uint32_t limit);

Parameters:

  • lowerbound - The name of the first miner to return. If the named miner does not exist, the list will start at the miner that comes after lowerbound.
  • limit - Maximum number of miners to return (max: 1000).

Returned value:

  • a list of miners mapping miner names to miner ids.

Example:

list_miners "" 11

Response:

[[
    "init0",
    "1.4.1"
  ],[
    "init1",
    "1.4.2"
  ],[
    "init10",
    "1.4.11"
  ],[
    "init2",
    "1.4.3"
  ],[
    "init3",
    "1.4.4"
  ],[
    "init4",
    "1.4.5"
  ],[
    "init5",
    "1.4.6"
  ],[
    "init6",
    "1.4.7"
  ],[
    "init7",
    "1.4.8"
  ],[
    "init8",
    "1.4.9"
  ],[
    "init9",
    "1.4.10"
  ]
]

List miners API developer documentation

Get Info About a Miner

By calling the method get_miner you will know details about the specific miner. The list you have got in previous step provides you inputs for the method and you can check a miner you chose.

Another possibility how to get to know miners is to visit Slack thread named #mining.

Method definition:

get_miner - Returns information about the given miner.

miner_object get_miner(string owner_account);

Parameters:

  • owner_account - Name or id of the miner account owner, or the id of the miner.

Example:

get_miner init1

Response:

{
  "id": "1.4.2",
  "miner_account": "1.2.5",
  "last_aslot": 3027140,
  "signing_key": "DCT8NC1kNjEeqRp8SnEPQWtpeCLoJRuquH5jHtE78NNTthSi6t2uX",
  "pay_vb": "1.9.0",
  "vote_id": "0:1",
  "total_votes": "110114045499584",
  "url": "",
  "total_missed": 191805,
  "last_confirmed_block_num": 834559
}

Be aware, miner_account is equivalent to account_id.

Get miner API developer documentation

Vote for a Miner

One of the possibilities how to help and improve the network is to vote for miners. As you already know, they are responsible for validation of the received transactions and creating blocks based on the received notifications. Take into consideration your vote has a weight based on your current balance. Moreover, keep in mind, you cannot vote against a specific miner, only vote for a specific miner or not vote at all.

Method definition:

vote_for_miner - Vote for a given miner. An account can publish a list of all miners they approve of. This method allows you to add or remove miners from this list. Each account's vote is weighted according to the number of shares of the core asset owned by that account at the time the votes are tallied.

signed_transaction vote_for_miner(string voting_account,
                                  string miner,
                                  bool approve,
                                  bool broadcast = false);

Parameters:

  • voting_account - The name or id of the account who is voting with their shares.
  • miner - The name or id of the miner's account.
  • approve - trueif you wish to vote in favor of that miner, false to remove your vote in favor of that miner.
  • broadcast - true if you wish to broadcast the transaction.

Vote for miner API developer documentation


Show given votes for a specific miner

To provide review of your voting process CLI Wallet offers a functionality to list all your given votes for a specific miners. In addition, there is a possibility to show a list of active miners you voted for, and for which you did not.

Method definition:

search_miner_voting - Get miner voting info by account that match search term.

vector<miner_voting_info> search_miner_voting(string account_id,
                                              string term,
                                              bool only_my_votes,
                                              string order,
                                              string id,
                                              uint32_t count);

Parameters:

  • account_id - An account name.
  • term - A search term - miner name.
  • only_my_votes - true if selects only votes given by account.
  • order - Available options are name (or link if you do not know the name) or votes.
  • id - The id of content object to start searching from.
  • count - A maximum number of contents to fetch (must not exceed 1000).

Returned value:

  • The contents found.

Example 1:

search_miner_voting accountname "" true "" "" 100

Response 1:

[{
    "id": "1.4.1",
    "name": "init0",
    "url": "",
    "total_votes": "6126399992",
    "voted": true
  },{
    "id": "1.4.11",
    "name": "init10",
    "url": "",
    "total_votes": "6126399992",
    "voted": true
  }
]

Example 2:

search_miner_voting accountname "" false "" "" 100

Response 2:

[{
    "id": "1.4.1",
    "name": "init0",
    "url": "",
    "total_votes": "6126399992",
    "voted": true
  },{
    "id": "1.4.2",
    "name": "init1",
    "url": "",
    "total_votes": 0,
    "voted": false
  },{
    "id": "1.4.11",
    "name": "init10",
    "url": "",
    "total_votes": "6126399992",
    "voted": true
  },{
    "id": "1.4.3",
    "name": "init2",
    "url": "",
    "total_votes": 0,
    "voted": false
  },{
    "id": "1.4.4",
    "name": "init3",
    "url": "",
    "total_votes": 0,
    "voted": false
  },{
    "id": "1.4.5",
    "name": "init4",
    "url": "",
    "total_votes": 0,
    "voted": false
  },{
    "id": "1.4.6",
    "name": "init5",
    "url": "",
    "total_votes": 0,
    "voted": false
  },{
    "id": "1.4.7",
    "name": "init6",
    "url": "",
    "total_votes": 0,
    "voted": false
  },{
    "id": "1.4.8",
    "name": "init7",
    "url": "",
    "total_votes": 0,
    "voted": false
  },{
    "id": "1.4.9",
    "name": "init8",
    "url": "",
    "total_votes": 0,
    "voted": false
  },{
    "id": "1.4.10",
    "name": "init9",
    "url": "",
    "total_votes": 0,
    "voted": false
  }
]

Delegate Your Voting Rights

Another feature which is provided to you is delegation of your voting rights.

Method definition:

set_voting_proxy - Set the voting proxy for an account.

signed_transaction set_voting_proxy(string account_to_modify,
                                    optional<string> voting_account,
                                    bool broadcast = false);

Parameters:

  • account_to_modify - The name or id of the account to update.
  • voting_account - The name or id of an account authorized to vote account_to_modify's shares or null to vote your own shares.
  • broadcast - true if you wish to broadcast the transaction.

Returned value:

  • The signed transaction changing your vote proxy settings.

Example:

set_voting_proxy richard richard2 true

Response:

{
  "ref_block_num": 47625,
  "ref_block_prefix": 2529286176,
  "expiration": "2017-12-22T13:49:40",
  "operations": [[
      2,{
        "fee": {
          "amount": 500000,
          "asset_id": "1.3.0"
        },
        "account": "1.2.71",
        "new_options": {
          "memo_key": "DCT8NC1kNjEeqRp8SnEPQWtpeCLoJRuquH5jHtE78NNTthSi6t2uX",
          "voting_account": "1.2.78",
          "num_miner": 0,
          "votes": [
            "0:0",
            "0:1",
            "0:2",
            "0:3",
            "0:4",
            "0:5",
            "0:6",
            "0:7",
            "0:8",
            "0:9",
            "0:10"
          ],
          "extensions": [],
          "allow_subscription": false,
          "price_per_subscribe": {
            "amount": 0,
            "asset_id": "1.3.0"
          },
          "subscription_period": 0
        },
        "extensions": {}
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "2062bb191fe9ffce227a6f796582982fb45068a084661b6fef8e108177f3eb008b23e71d19a851f96f785887b0c2c840db6339e19c4569499a2e972a39cf643e3d"
  ]
}

Set voting proxy API developer documentation


Proposal to Change the Count of Voted Miners

To provide a proposal to change how many miners will be voted, use the next method.

Method definition:

set_desired_miner_count - Set your vote for the number of miners in the system. Each account can voice their opinion on how many miners there should be in the active miner list. These are independent of each other. You must vote your approval of at least as many miners as you claim there should be (you can't say that there should be 20 miners but only vote for 10). There are maximum values for each set in the blockchain parameters (currently defaulting to 1001). This setting can be changed at any time. If your account has a voting proxy set, your preferences will be ignored.

signed_transaction
set_desired_miner_count(string account_to_modify,
                        uint16_t desired_number_of_miners,
                        bool broadcast = false);

Returned value:

  • The signed transaction changing your vote proxy settings.

Example:

set_desired_miner_count richard 11 true

Response:

{
  "ref_block_num": 47616,
  "ref_block_prefix": 3219005700,
  "expiration": "2017-12-22T13:48:50",
  "operations": [[
      2,{
        "fee": {
          "amount": 500000,
          "asset_id": "1.3.0"
        },
        "account": "1.2.71",
        "new_options": {
          "memo_key": "DCT8NC1kNjEeqRp8SnEPQWtpeCLoJRuquH5jHtE78NNTthSi6t2uX",
          "voting_account": "1.2.3",
          "num_miner": 11,
          "votes": [
            "0:0",
            "0:1",
            "0:2",
            "0:3",
            "0:4",
            "0:5",
            "0:6",
            "0:7",
            "0:8",
            "0:9",
            "0:10"
          ],
          "extensions": [],
          "allow_subscription": false,
          "price_per_subscribe": {
            "amount": 0,
            "asset_id": "1.3.0"
          },
          "subscription_period": 0
        },
        "extensions": {}
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "202d0694f993d471613372724a8467d930c481e3c502e87430dce4ad9c9b18db173d3505b15b9279edc3f18925106cacadc64df86d1e3977bea3834cdba2195c34"
  ]
}

Set desired miner count API developer documentation


Change Proposal for Blockchain Parameters

There is an option to make a change proposal for some blockchain parameters. Note, it is a signed transaction, so you will pay transaction fee. Moreover, it filters unreasonable proposals.

Command definition:

propose_parameter_change - Creates a transaction to propose a parameter change. Multiple parameters can be specified if an atomic change is desired.

signed_transaction propose_parameter_change (string proposing_account,
                                             fc::time_point_sec expiration_time,
                                             variant_object changed_values,
                                             bool broadcast = false)        

Parameters:

  • proposing_account - The account paying the fee to propose the transaction.
  • expiration_time - Timestamp specifying when the proposal will either take effect or expire.
  • changed_values - The values to change. All other chain parameters are filled in with default values.
  • broadcast - true if you wish to broadcast the transaction.

Returned value:

  • The signed version of the transaction.

Example:

propose_parameter_change alien "2018-05-30T19:36:11" {"block_interval":15} true

Response:

{
  "ref_block_num": 46239,
  "ref_block_prefix": 1270744930,
  "expiration": "2018-05-15T13:49:05",
  "operations": [[
      9,{
        "fee": {
          "amount": 500004,
          "asset_id": "1.3.0"
        },
        "fee_paying_account": "1.2.30",
        "expiration_time": "2018-05-30T19:36:11",
        "proposed_ops": [{
            "op": [
              8,{
                "fee": {
                  "amount": 10,
                  "asset_id": "1.3.0"
                },
                "new_parameters": {
                  "current_fees": {
                    "parameters": [[
                        0,{
                          "fee": 500000
                        }
                      ],[
                        1,{
                          "basic_fee": 500000
                        }
                      ],[
                        2,{
                          "fee": 500000
                        }
                      ],[
                        3,{
                          "basic_fee": 500000
                        }
                      ],[
                        4,{
                          "fee": 500000
                        }
                      ],[
                        5,{
                          "fee": 10
                        }
                      ],[
                        6,{
                          "fee": 50000000
                        }
                      ],[
                        7,{
                          "fee": 500000
                        }
                      ],[
                        8,{
                          "fee": 10
                        }
                      ],[
                        9,{
                          "fee": 500000,
                          "price_per_kbyte": 10
                        }
                      ],[
                        10,{
                          "fee": 500000,
                          "price_per_kbyte": 10
                        }
                      ],[
                        11,{
                          "fee": 500000
                        }
                      ],[
                        12,{
                          "fee": 500000
                        }
                      ],[
                        13,{
                          "fee": 500000
                        }
                      ],[
                        14,{
                          "fee": 500000,
                          "price_per_kbyte": 10
                        }
                      ],[
                        15,{
                          "fee": 0
                        }
                      ],[
                        16,{
                          "fee": 500000
                        }
                      ],[
                        17,{
                          "fee": 500000
                        }
                      ],[
                        18,{
                          "fee": 500000,
                          "price_per_kbyte": 10
                        }
                      ],[
                        19,{
                          "fee": 5000000
                        }
                      ],[
                        20,{
                          "fee": 0
                        }
                      ],[
                        21,{
                          "fee": 0
                        }
                      ],[
                        22,{
                          "fee": 0
                        }
                      ],[
                        23,{
                          "fee": 0
                        }
                      ],[
                        24,{
                          "fee": 0
                        }
                      ],[
                        25,{
                          "fee": 0
                        }
                      ],[
                        26,{
                          "fee": 0
                        }
                      ],[
                        27,{
                          "fee": 0
                        }
                      ],[
                        28,{
                          "fee": 0
                        }
                      ],[
                        29,{
                          "fee": 0
                        }
                      ],[
                        30,{
                          "fee": 0
                        }
                      ],[
                        31,{
                          "fee": 0
                        }
                      ],[
                        32,{
                          "fee": 0
                        }
                      ],[
                        33,{
                          "fee": 0
                        }
                      ],[
                        34,{
                          "fee": 0
                        }
                      ],[
                        35,{
                          "fee": 0
                        }
                      ],[
                        36,{
                          "fee": 0
                        }
                      ],[
                        37,{
                          "fee": 0
                        }
                      ],[
                        38,{
                          "fee": 0
                        }
                      ]
                    ],
                    "scale": 10000
                  },
                  "block_interval": 15,
                  "maintenance_interval": 86400,
                  "maintenance_skip_slots": 3,
                  "miner_proposal_review_period": 1209600,
                  "maximum_transaction_size": 4096,
                  "maximum_block_size": 2048000,
                  "maximum_time_until_expiration": 86400,
                  "maximum_proposal_lifetime": 2419200,
                  "maximum_asset_feed_publishers": 10,
                  "maximum_miner_count": 1001,
                  "maximum_authority_membership": 10,
                  "cashback_vesting_period_seconds": 31536000,
                  "cashback_vesting_threshold": 1000000000,
                  "max_predicate_opcode": 1,
                  "max_authority_depth": 2,
                  "extensions": []
                }
              }
            ]
          }
        ],
        "review_period_seconds": 1209600,
        "extensions": []
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "1f43c6efa44266e8dda0dbb125c75f336fa05a4f8143c842a03e41de9b35e43c986a3f65fd7513e3b4cc3d333132192988385f0400af94f22cd1dae84572210e94"
  ]
}

Show All Available Commands

By calling the next method you will get list of all methods, which are provided by CLI Wallet.

help

Help API developer documentation


Show a Particular Method Definition

To receive concrete definition of the specific Wallet API method you can use the following method.

get_help command_name

Parameters:

  • command_name - A name of the API method you want help with.

Returned value:

  • A multi-line string describing the specific method.

Get help API developer documentation


Other Useful Methods

info

Show the basic information about the network.

Example:

info

Response:

info
{
  "head_block_num": 504529,
  "head_block_id": "0007b2d1c06a3455fd70bab335b28e0710c2bdfb",
  "head_block_age": "6 seconds old",
  "next_maintenance_time": "9 hours in the future",
  "chain_id": "17401602b201b3c45a3ad98afc6fb458f91f519bd30d1058adf6f2bed66376bc",
  "participation": "90.62500000000000000",
  "active_miners": [
    "1.4.11",
    "1.4.2",
    "1.4.3",
    "1.4.4",
    "1.4.1",
    "1.4.5",
    "1.4.6",
    "1.4.7",
    "1.4.8",
    "1.4.9",
    "1.4.10"
  ]
}

Info API developer documentation

about

Returns info such as client version, git version of graphene, version of boost, openssl.

Returned value:

  • Compile time info and client and dependencies versions.

Example:

about

Response:

about
{
  "client_version": "1.1.0-1-g99d76aa",
  "graphene_revision": "99d76aac327fb3028d6aa22d67d6b8feeef3b391",
  "graphene_revision_age": "31 days ago",
  "fc_revision": "53102f1f456b9943c46cad986d0c4da85dbad610",
  "fc_revision_age": "71 days ago",
  "compile_date": "compiled on Nov 13 2017 at 11:20:00",
  "boost_version": "1.60",
  "openssl_version": "OpenSSL 1.0.1t  3 May 2016",
  "build": "linux 64-bit"
}

About API developer documentation

get_object

All data are stored in the database as objects. Accounts, transactions, content information, etcetera. So it is useful to know that get_object method can display any object stored in the database.

Method definition:

get_object - Returns the blockchain object corresponding to the given id. This generic function can be used to retrieve any object from the blockchain that is assigned an id. Certain types of objects have specialized convenience functions to return their objects, e.g. assets have get_asset, accounts have get_account, but this function will work for any object.

Every object id consists of 3 numbers x.y.z, where:

  • x defines the platform level and can have values 0, 1 or 2
  • y defines the object type. This type is different for different platform levels
  • z is the serial number of the object within its object type. For example, if blockchain has 200 registered accounts, their serial numbers will be 0 to 199.

Platform levels

  • if the x value is 1 then the possible values are
    • 0 null_object_type
    • 1 base_object_type
    • 2 account_object_type
    • 3 asset_object_type
    • 4 miner_object_type
    • 5 custom_object_type
    • 6 proposal_object_type
    • 7 operation_history_object_type
    • 8 withdraw_permission_object_type
    • 9 vesting_balance_object_type
    • 10 OBJECT_TYPE_COUNT - Sentry value which contains the number of different object types
  • if the x value is 2 then the possible values are
    • 0 impl_global_property_object_type
    • 1 impl_dynamic_global_property_object_type
    • 2 impl_reserved0_object_type -formerly index_meta_object_type
    • 3 impl_asset_dynamic_data_type
    • 4 impl_account_balance_object_type
    • 5 impl_account_statistics_object_type
    • 6 impl_transaction_object_type
    • 7 impl_block_summary_object_type
    • 8 impl_account_transaction_history_object_type
    • 9 impl_chain_property_object_type
    • 10 impl_miner_schedule_object_type
    • 11 impl_budget_record_object_type
    • 12 impl_buying_object_type
    • 13 impl_content_object_type
    • 14 impl_publisher_object_type
    • 15 impl_subscription_object_type
    • 16 impl_seeding_statistics_object_type
    • 17 impl_transaction_detail_object_type
    • 18 impl_messaging_object_type

Additionally, if the object does not exist the return value is null. So, if you would like to list all accounts for example, you just start with the account with serial number 0 and increase this number until you get the null return result.

variant get_object(object_id_type id);

Parameters:

  • id - An id of the object to return.

Returned value:

  • The requested object.

Example:

get_object 1.3.0

Response:

get_object 1.3.0
[{
    "id": "1.3.0",
    "symbol": "DCT",
    "precision": 8,
    "issuer": "1.2.1",
    "description": "",
    "options": {
      "max_supply": "7319777577456900",
      "core_exchange_rate": {
        "base": {
          "amount": 1,
          "asset_id": "1.3.0"
        },
        "quote": {
          "amount": 1,
          "asset_id": "1.3.0"
        }
      },
      "is_exchangeable": true,
      "extensions": []
    },
    "dynamic_asset_data_id": "2.3.0"
  }
]

Get object API developer documentation

get_account

Shows account data object - same as get_object if you do not have the account object id but know the account name.

Method definition:

get_account - Returns information about the given account.

account_object get_account(string account_name_or_id);

Parameters:

  • account_name_or_id - A name or id of the account to provide information about.

Returned value:

  • The public account data stored in the blockchain.

Example:

get_account accountname

Get account API developer documentation

get_account_history

List the most current operations on particular account.

Method definition:

get_account_history - Returns the most recent operations on the named account. This returns a list of operation history objects, which describes activity on the account. Note that this API doesn't give a way to retrieve more than the most recent 100 transactions, you can interface directly with the blockchain to get more history or use History API.

vector<operation_detail> get_account_history(string name, int limit);

Parameters:

  • name - A name or id of the account.
  • limit - A number of entries to return (starting from the most recent) (max 100).

Returned value:

  • A list of operation_history_objects.

Example:

get_account_history accountname 12

Get account history API developer documentation

list_account_balances

Method definition:

list_account_balances - List the balances of an account. Each account can have multiple balances, one for each type of asset owned by that account.

vector<asset> list_account_balances(string id);

Parameters:

  • id - A name or id of the account whose balances you want to retrieve.

Returned value:

  • A list of the given account's balances.

Example:

list_account_balances accountname

List account balancies API developer documentation

list_assets

Get a list of existing assets.

Method definition:

list_assets - Lists all assets registered on the blockchain. To list all assets, pass the empty string "" for the lowerbound to start at the beginning of the list, and iterate as necessary.

vector<asset_object> list_assets(string lowerbound, uint32_t limit);

Parameters:

  • lowerbound - The symbol of the first asset to include in the list.
  • limit - The maximum number of assets to return (max: 100).

Returned value:

  • The list of asset objects, ordered by symbol.

Example:

list_assets "" 1

Response:

list_assets "" 1
[{
    "id": "1.3.17",
    "symbol": "AUD",
    "precision": 4,
    "issuer": "1.2.15",
    "description": "Australian dollar",
    "monitored_asset_opts": {
      "feeds": [],
      "current_feed": {
        "core_exchange_rate": {
          "base": {
            "amount": 0,
            "asset_id": "1.3.0"
          },
          "quote": {
            "amount": 0,
            "asset_id": "1.3.0"
          }
        }
      },
      "current_feed_publication_time": "2017-11-16T12:11:10",
      "feed_lifetime_sec": 86400,
      "minimum_feeds": 1
    },
    "options": {
      "max_supply": 0,
      "core_exchange_rate": {
        "base": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
        "quote": {
          "amount": 0,
          "asset_id": "1.3.0"
        }
      },
      "is_exchangeable": true,
      "extensions": []
    },
    "dynamic_asset_data_id": "2.3.17"
  }
]

List assets API developer documentation

get_asset

Shows asset data object - same as get_object - if you do not have the asset object id, but you know the asset name.

Method definition:

get_asset - Returns information about the given asset.

asset_object get_asset(string asset_name_or_id);

Parameters:

  • asset_name_or_id - A symbol or id of the asset in question.

Returned value:

  • The information about the asset stored in the blockchain.

Example:

get_asset DCT

Response:

{
  "id": "1.3.0",
  "symbol": "DCT",
  "precision": 8,
  "issuer": "1.2.1",
  "description": "",
  "options": {
    "max_supply": "7319777577456900",
    "core_exchange_rate": {
      "base": {
        "amount": 1,
        "asset_id": "1.3.0"
      },
      "quote": {
        "amount": 1,
        "asset_id": "1.3.0"
      }
    },
    "is_exchangeable": true,
    "extensions": []
  },
  "dynamic_asset_data_id": "2.3.0"
}

Get asset API developer documentation

price_to_dct

Converts any asset price to DCT (in satoshi units).

Method definition:

price_to_dct - Converts asset into DCT, using current price feed.

string price_to_dct(string amount, string asset_symbol_or_id);

Parameters:

  • amount - An amount to convert in nominal units.
  • asset_symbol - A symbol or id of the asset to convert.

Returned value:

  • Price in DCT.

Example 1:

price_to_dct 123 DCT

Result 1:

price_to_dct 123 DCT
"12300000000"

Example 2:

price_to_dct 123 MCB

Result 2:

price_to_dct 123 MCB
"24600000000"

Price to dct API developer documentation


Upload Content

The upload process consists of two required steps which you need to do before you are going to start with the upload. To know how to maintain them, please follow the links provided which will redirect you to the specific part with instructions.

Requirements:

To upload the content use the submit_content_async method. In provided example we are using these 2 seeders : 1.2.17 and 1.2.18.

Method definition:

submit_content_async - This function is used to create package, upload package and submit content in one step.

void submit_content_async (string author,
                           vector<pair<string, uint32_t>> co_authors,
                           string content_dir,
                           string samples_dir,
                           string protocol,
                           vector<regional_price_info> price_amounts,
                           vector<account_id_type> seeders,
                           fc::time_point_sec expiration,
                           string synopsis);

Parameters:

  • author - The author of the content.
  • co_authors - The co-authors' account name or id mapped to corresponding payment split based on basis points.
  • content_dir - Path to the directory containing all content that should be packed.
  • samples_dir - Path to the directory containing samples of content.
  • protocol - Protocol for uploading package (IPFS).
  • price_amounts - The prices of the content per regions.
  • seeders - List of the seeders, which will publish the content.
  • expiration - The expiration time of the content. The content is available to buy till its expiration time.
  • synopsis - The description of the content.

Example:

submit_content_async accountname [] "/path/to/file/testfile.txt" "" "ipfs" \
[{"region":"AE","amount":"1","asset_symbol":"DCT"}] ["1.2.17","1.2.18"] \
"2017-11-17T23:59:59" "{\"content_type_id\":\"0\",\"title\":\"greatTestFile\", \
\"description\":\"some description.. \"}"

Where content_type_id is a number specifying the target network and the content type according to the lists.

  • list of ContentObjectApplication values

    • 0 - DCore
  • list of ContentObjectType values

    • 0 - None
    • 1 - Music
    • 2 - Movie
    • 3 - Book
    • 4 - AudioBook
    • 5 - Software
    • 6 - Game
    • 7 - Picture
    • 8 - Document

For example, "0.5" means DCore network and Software type specified.

Result:

submit_content_async accountname [] "/path/to/file/testfile.txt" "" "ipfs" \
[{"region":"AE","amount":"1","asset_symbol":"DCT"}] ["1.2.18","1.2.17"] \
"2017-11-17T23:59:59" "{\"content_type_id\":\"0\",\"title\":\"greatTestFile\", \
\"description\":\"some description.. \"}"
null

Submit content async API developer documentation

Find a Seeder

This is one of the mandatory steps of the upload process. Without specifying who will seed the content prepared for upload, the process will not work. To see who is available for seeding the content, use method you like from the ones described in the text below (get a list of seeders by price, region, upload, rating). Please, follow provided instructions.

Note

Let us notify you all methods have the same structure of response. That is why we provide you an example of a response only for the first method list_seeders_by_price.

Find a Seeder by Price

Method definition:

list_seeders_by_price - Get a list of seeders by price, in increasing order.

vector<seeder_object> list_seeders_by_price(uint32_t count);

Parameters:

  • count - Maximum number of seeders to retrieve.

Returned value:

  • The list of seeders who were found.

Example:

list_seeders_by_price 5

Response:

[{
    "id": "2.14.1",
    "seeder": "1.2.16",
    "free_space": 874,
    "price": {
      "amount": 1,
      "asset_id": "1.3.0"
    },
    "expiration": "2017-11-14T12:42:25",
    "pubKey": {
      "s": "108509137992084552766842257584642929445130808368600055288928130756106214148863141200188299504000640159872636359336882924163527129138321742300857400054934."
    },
    "ipfs_ID": "Qma7mvd4A9nDfuEyw65Y5Toik2BZmDcM35xFq1SeuQns7n",
    "stats": "2.16.1",
    "rating": 0,
    "region_code": ""
  },{
    "id": "2.14.2",
    "seeder": "1.2.17",
    "free_space": 854,
    "price": {
      "amount": 1,
      "asset_id": "1.3.0"
    },
    "expiration": "2017-11-14T12:48:15",
    "pubKey": {
      "s": "8490319717792401336022711903211688203776011372958543603431635388400597658916629399144065413122027733188246528373794568719741969521921155180202961044843254."
    },
    "ipfs_ID": "QmUc1fB7vYuZLxUvEJPb6w2z5apKRgmKqWjCm7A8yG9u81",
    "stats": "2.16.2",
    "rating": 22,
    "region_code": ""
  },{
    "id": "2.14.3",
    "seeder": "1.2.18",
    "free_space": 991,
    "price": {
      "amount": 1,
      "asset_id": "1.3.0"
    },
    "expiration": "2017-11-14T12:52:20",
    "pubKey": {
      "s": "2303777410538172886271756794595982408449215299184180786707946414344825115577210309329094182704710373375176575047946743652593825273038473592524248046488588."
    },
    "ipfs_ID": "QmTWG4AtyXxLPtZ6iahoaT8HBA2cDSSeAvkbrzNVT8KS4p",
    "stats": "2.16.3",
    "rating": 594,
    "region_code": "SK"
  }
]

List seeders by price API developer documentation

Find a Seeder by Region

Method definition:

list_seeders_by_region - Get a list of seeders by region. Region code is declared by ISO 3166-1 alpha-2 standard.

vector<seeder_object> list_seeders_by_region(string region_code);

Parameters:

  • region_code - Code of a region from which seeders are.

Returned value:

  • The list of seeders who were found.

Example:

list_seeders_by_region "SK"

List seeders by region API developer documentation

Find a Seeder by Rating

Method definition:

list_seeders_by_rating - Get a list of seeders by rating, in decreasing order.

vector<seeder_object> list_seeders_by_rating(uint32_t count);

Parameters:

  • count - Maximum number of seeders to retrieve.

Returned value:

  • The list of seeders who were found.

Example:

list_seeders_by_rating 5

List seeders by rating API developer documentation

Find a Seeder by Upload

Method definition:

list_seeders_by_upload - Get a list of seeders ordered by total upload, in decreasing order.

optional<vector<seeder_object>> list_seeders_by_upload(uint32_t count);

Parameters:

  • count - Maximum number of seeders to retrieve.

Returned value:

  • The list of seeders who were found.

Example:

list_seeders_by_upload 5

List seeders by upload API developer documentation


Cancel Uploaded Content

There is possibility to cancel already uploaded content. To do so, use the content_cancellation method. Note that the content will stop being available for purchase immediately, but it will be available for download up to 24 hours since cancellation.

Method definition:

content_cancellation - This function can be used to cancel submitted content. Seeders keep seeding this content in the next 24 hours.

signed_transaction content_cancellation(string author,
                                        string URI,
                                        bool broadcast);

Parameters:

  • author - The author of the content.
  • URI - The URI of the content.
  • broadcast - true to broadcast the transaction on the network.

Returned value:

  • Signed transaction cancelling the content.

Example:

content_cancellation publisher-account "ipfs:QmcZhT3QoN69JGXmhJ6V4WU48tyV6EiKxNkkRox8gUHsqS" true

Response:

content_cancellation publisher-account "ipfs:QmcZhT3QoN69JGXmhJ6V4WU48tyV6EiKxNkkRox8gUHsqS"
true
{
  "ref_block_num": 5135,
  "ref_block_prefix": 2650308055,
  "expiration": "2017-11-16T12:30:25",
  "operations": [[
      32,{
        "fee": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
        "author": "1.2.15",
        "URI": "ipfs:QmcZhT3QoN69JGXmhJ6V4WU48tyV6EiKxNkkRox8gUHsqS"
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "1f3fc750fb9a67ae398a791a7a7b0da0862591955b3cb8d791cb984ed32b1f064978ef5c9cc2e38d242fc6ed723f0bfc296f17ca620571150d7a70f4f980430cb4"
  ]
}

Content cancellation API developer documentation


Buy Content

The process of buying content consists of few steps. To buy and access content you need the content id and the proper decryption key (AES key).

Let us start by finding an item to download.

List Available Content

By using the following method, you will get a list of all the currently available items. The list is dynamic. Expired or hidden items will not be listed.

Method definition:

search_content - Get a list of contents ordered alphabetically by search term.

vector<content_summary> search_content(string term,
                                       string order,
                                       string user,
                                       string region_code,
                                       string id,
                                       string type,
                                       uint32_t count);

Parameters:

  • term - Search term.
  • order - Order field.
  • user - Content owner.
  • region_code - Two letter region code.
  • id - The id of content object to start searching from.
  • type - The application and content type to be filtered.
  • count - Maximum number of contents to fetch (must not exceed 100).

Returned value:

  • The items (content) found.

Example:

search_content "flower" "" accountname "AE" "" "" 3

Response:

search_content "flower" "" accountname "AE" "" "" 3
[{
    "id": "2.13.72",
    "author": "publisher-account",
    "price": {
      "amount": 100000000,
      "asset_id": "1.3.0"
    },
    "synopsis": "{\"content_type_id\":\"0\",\"title\":\"Apllejuiceflower\",\"description\":\"test descriptin for the test flower \"}",
    "status": "Uploaded",
    "URI": "ipfs:QmRHS5siC3bTY6hDAdD5ELagZfpLkbYbudaeoV211YJ2FU",
    "_hash": "822c778d5d33d24a0d661d3249d2b9a3efc8f66f",
    "AVG_rating": 0,
    "size": 5,
    "expiration": "2017-11-17T23:59:59",
    "created": "2017-11-14T09:22:15",
    "times_bought": 0
  }
]

Search content API developer documentation

Purchase Content

In the previous step we got properties for an item using the item's URI (Unified Resource Identifier). Based on the URI the Purchase Content function will know exactly what is being purchased.

There are two possibilities from here. If the downloader selects automatic download it is not possible to modify paid asset set by author. If the item is purchased without automatic download selected it is possible to set other assets for payment.

Automatic Download of Content

By downloading content automatically you can save some time and method calls. But, there is no possibility to pay for content with assets other than those set by the uploader.

Method definition:

download_content - Downloads encrypted content specified by provided URI.

void download_content(string consumer,
                      string URI,
                      string region_code_from,
                      bool broadcast = false);

Parameters:

  • consumer - Consumer of the content.
  • URI - The URI of the content.
  • region_code_from - Two letter region code.
  • broadcast - true to broadcast the transaction on the network.

Example:

download_content mickey "ipfs:QmRHS5siC3bTY6hDAdD5ELagZfpLkbYbudaeoV211YJ2FU" "AE" true

Result:

null

Please, proceed by following instructions written in the List your purchases part.

Download content API developer documentation

Manual Download of Content

This step consists of two actions. The first one uses request_to_buy call and the second one download_package.

Method definition:

request_to_buy - This function is used to send a request to buy a content. This request is caught by seeders.

signed_transaction request_to_buy(string consumer,
                                  string URI,
                                  string price_asset_name,
                                  string price_amount,
                                  string str_region_code_from,
                                  bool broadcast);

Parameters:

  • consumer - Consumer of the content.
  • URI - The URI of the content.
  • price_asset_name - Ticker symbol of the asset which will be used to buy content.
  • price_amount - The price of the content.
  • str_region_code_from - Two letter region code.
  • broadcast - true to broadcast the transaction on the network.

Returned value:

  • The signed transaction requesting buying of the content.

Example:

request_to_buy andrew "ipfs:QmRHS5siC3bTY6hDAdD5ELagZfpLkbYbudaeoV211YJ2FU" DCT 2 "AE" true

Response:

{
  "ref_block_num": 54202,
  "ref_block_prefix": 2346282037,
  "expiration": "2017-11-15T11:20:20",
  "operations": [[
      21,{
      "fee": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
         "URI": "ipfs:QmRHS5siC3bTY6hDAdD5ELagZfpLkbYbudaeoV211YJ2FU",
        "consumer": "1.2.75",
        "price": {
          "amount": 200000000,
          "asset_id": "1.3.0"
        },
        "region_code_from": 4,
        "pubKey": {
          "s": "4303628372841098204725325886169480368712308731846406620978518465243755034949712651980700780736242269928176997284623659672330921098152069204211868999952586."
        }
      }
    ]
  ],
  "extensions": [],
  "signatures": [
  "202a710e6222b4b28efeef1d287be8483c8fd49de6b3a436a3b7eafcbb28c88b0125a022facb6b6881520ea6745488f37666697c5b4e69a23a55af4ed943b3e9bf"
  ]
  }

Request to buy API developer documentation

The second step's part.

Method definition:

  • download_package - Downloads specified package.
void download_package(string url);

Parameters:

  • url - The URL of the package.

Example:

download_package "ipfs:QmYKkYWABMNiX8Mt1VHPSqm9pVz2gAN4KTfYz81idpfBzR"

Result:

download_package "ipfs:QmYKkYWABMNiX8Mt1VHPSqm9pVz2gAN4KTfYz81idpfBzR"
null

Download package API developer documentation

List Your Purchases

To proceed correctly you will need to know your account id or name (the first parameter) of the buyer.

Method definition:

search_my_purchases - Get history buying objects by consumer that match search term.

vector<buying_object_ex> search_my_purchases(account_id_or_name,
                                             term,
                                             order,
                                             id,
                                             uint32_t count);

Parameters:

  • account_id_or_name - Consumer of the buyings to retrieve.
  • term - Search term to look up in Title and Description.
  • order - Sort data by field.
  • id - Object_id to start searching from.
  • count - Maximum number of contents to fetch (must not exceed 100).

Returned value:

  • History purchased objects corresponding to the provided consumer and matching term.

Example:

search_my_purchases mickey "" "" "" 2

Response:

[{
    "id": "2.12.67",
    "consumer": "1.2.73",
    "URI": "ipfs:QmRHS5siC3bTY6hDAdD5ELagZfpLkbYbudaeoV211YJ2FU",
    "synopsis": "{\"content_type_id\":\"0\",\"title\":\"Apllejuiceflower\",\"description\":\"test descriptin for the test flower \"}",
    "price": {
      "amount": 100000000,
      "asset_id": "1.3.0"
    },
     "paid_price_before_exchange": {
      "amount": 100000000,
      "asset_id": "1.3.0"
    },
    "paid_price_after_exchange": {
      "amount": 100000000,
      "asset_id": "1.3.0"
    },
    "seeders_answered": [
      "1.2.18",
      "1.2.17"
    ],
    "size": 5,
    "rating": 0,
    "comment": "",
    "expiration_time": "2017-11-15T12:27:30",
    "pubKey": {
      "s": "10384416749140257128583102389624607251654392586672946391438154410634414297114005655788618266551181783174334468876296512914387596163700640306113614522603976."
    },
    "key_particles": [{
        "C1": {
          "s": "7713541882884265737001144964407618286238469746991155829237368493864906459364159840366328822361837163546845186666114160890902773989019773380701434654220048."
        },
        "D1": {
          "s": "2692769396320662590732095382046790594075004387215914992857698150956473426023071796292163107553139158816276027313452036566715084008768822495671492946343936."
        }
      },{
        "C1": {
          "s": "6773119226898217031462006811313926243329502497094879661060451283455969563980673100681433599331398298113160613787560192551976238315248808417231992172920752."
        },
        "D1": {
          "s": "4654198223728504093980753883811654976741761019946052282686348856710255155548774806614798135855247295621547714324832986380763167537020809512198958238385012."
        }
      }
    ],
    "expired": false,
    "delivered": true,
    "expiration_or_delivery_time": "2017-11-14T12:27:40",
    "rated_or_commented": false,
    "created": "2017-11-14T09:22:15",
    "region_code_from": 4,
    "total_key_parts": 2,
    "received_key_parts": 2,
    "total_download_bytes": 0,
    "received_download_bytes": 0,
    "status_text": "Unknown",
    "author_account": "accountname",
    "AVG_rating": 0,
    "times_bought": 1,
    "hash": "822c778d5d33d24a0d661d3249d2b9a3efc8f66f"
}]

Search my purchases API developer documentation

Make Request to Get Encryption Key

Method definition:

restore_encryption_key - Restores AES key (used to encrypt and decrypt content) from key particles stored in a buying object.

DInteger restore_encryption_key(std::string account,
                                buying_id_type buying);

Parameters:

  • account - Consumers account id or name.
  • buying - The buying object containing key particles.

Returned value:

  • Restored AES key from particles.

Example:

restore_encryption_key mickey "2.12.67"

Result:

restore_encryption_key mickey "2.12.67"
"90119978168686416626538113977783330590824857160509159322627126482134770984565."

Restore encryption key API developer documentation

Get Encrypted Content

Method definition:

extract_package - Extract selected package.

void extract_package(string& package_hash,
                     string& output_dir,
                     DInteger& aes_key);

Parameters:

  • package_hash - Hash of package that needs to be extracted.
  • output_dir - Directory where extracted files will be created.
  • aes_key - AES key for decryption.

Example:

extract_package "822c778d5d33d24a0d661d3249d2b9a3efc8f66f" /path/to/download/the/ content/
"90119978168686416626538113977783330590824857160509159322627126482134770984565."

Result:

extract_package "822c778d5d33d24a0d661d3249d2b9a3efc8f66f" /path/to/download/the/ content/
"90119978168686416626538113977783330590824857160509159322627126482134770984565."
null

Extract package API developer documentation


Set a Subscription

In this section we will provide you instructions about two main topics regarding subscription settings, which are as follows:

  • Enable Subscriptions - for author account.
  • Subscribe to an author's content - for consumers.

Enable Subscriptions

Every author has an opportunity to decide whether he will enable subscriptions for content submitted/uploaded by that account. Subscribers can download any content from the author during the period set by author, free of further charge.

Method definition:

set_subscription - This function is used for to allow/disallow content subscription.

signed_transaction set_subscription(string account,
                                    bool allow_subscription,
                                    uint32_t subscription_period,
                                    string price_amount,
                                    string price_asset_symbol,
                                    bool broadcast = false);

Parameters:

  • account - The name or id of the account to update.
  • allow_subscription - true if account (author) wants to allow subscription to his submitted content, false otherwise.
  • subscription_period - Duration/period of subscription in days.
  • price_amount - Price for subscription per one subscription period. If the value is set to 0, your content is for free for everyone during the specified period.
  • price_asset_symbol - Ticker symbol of the asset which will be used to buy subscription.
  • broadcast - True if you wish to broadcast the transaction.

Returned value:

  • The signed transaction updating the account.

Example:

set_subscription ronald `true` 7 1 DCT true

Response:

{
  "ref_block_num": 28882,
  "ref_block_prefix": 1659860295,
  "expiration": "2017-11-30T12:55:35",
  "operations": [[
      2,{
      "fee": {
          "amount": 500000,
          "asset_id": "1.3.0"
        },
        "account": "1.2.69",
        "new_options": {
          "memo_key": "DCT8SFcioQFYXnNHNSAEcLb5o5EovrhjPk4SMbYnag6t6VhwuvMAc",
          "voting_account": "1.2.3",
          "num_miner": 0,
          "votes": [],
          "extensions": [],
          "allow_subscription": true,
          "price_per_subscribe": {
            "amount": 100000000,
            "asset_id": "1.3.0"
          },
          "subscription_period": 7
        },
        "extensions": {}
      }
      ]
  ],
  "extensions": [],
  "signatures": [
  "1f455713747fe18b0a6dd362784cdf6ca2696540935195dda754632cf057eed5c10b888c5d7754646f7c1d6dccafc6d1d9f1e5b39b0ef9345cb11fe82f1b094fc3"
  ]
}

Set subscription API developer documentation

Provide Your Content for Free

Another possibility how to spread your content to majority of consumers is to provide your content for free. To do so, you can do it one of two ways. They differ based on the target.

Free Content for Everyone

Simply set up parmeters as mentioned in the above section enable subscriptions and note the price_amount parameter, which needs to be set to zero value.

Free Content for a Specific User

To provide free content to specific users, follow steps written bellow.

Method definition:

subscribe_by_author - Creates a subscription to author. This function is used by author.

signed_transaction subscribe_by_author(string from,
                                       string to,
                                       bool broadcast = false);

Parameters:

  • from - The account obtaining subscription from the author.
  • to - The name or id of the author account.
  • broadcast - true, if you want to broadcast the transaction.

Returned value:

  • The signed transaction subscribing the consumer to the author.

Example:

subscribe_by_author andrew ronald true

Response:

{
  "ref_block_num": 29290,
  "ref_block_prefix": 520269651,
  "expiration": "2017-11-30T13:33:05",
  "operations": [[
      27,{
        "fee": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
        "from": "1.2.75",
        "to": "1.2.69"
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "1f66a13b157f765f0adf58d7094107843994bc767999f48209971c056cfa89ed8b123154389b699005dee27f2e42ae50eb481e20b02ee7e4ad134718c45ab2c078"
  ]
}

Subscribe by author API developer documentation

Cancel the Option to Subscribe to Your Account

Authors have an opportunity to cancel future subscriptions at any time. Be aware, existing subscriptions will still continue until the period of the access expires. The method which is used for the purpose is described in the Enable Subscriptions section and we will provide a simple call and response.

Example:

set_subscription ronald false "" "" "" true

Response:

{
  "ref_block_num": 28907,
  "ref_block_prefix": 1065306194,
  "expiration": "2017-11-30T12:57:50",
  "operations": [[
      2,{
        "fee": {
          "amount": 500000,
          "asset_id": "1.3.0"
        },
        "account": "1.2.69",
        "new_options": {
          "memo_key": "DCT8SFcioQFYXnNHNSAEcLb5o5EovrhjPk4SMbYnag6t6VhwuvMAc",
          "voting_account": "1.2.3",
          "num_miner": 0,
          "votes": [],
          "extensions": [],
          "allow_subscription": false,
          "price_per_subscribe": {
            "amount": 0,
            "asset_id": "1.3.0"
          },
          "subscription_period": 0
        },
        "extensions": {}
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "1f7460e3e80ec67adc415b59047e1e1e90716d0f95e16c4f1f53995d8e29b9dd9f58dcac5c02669ad3f5d3999a6ef860f101fd552b81827739d1e31108986605fb"
  ]
}

Subscribe to an Author

In case you want to subscribe to an author and to use their submitted content we provide you two options. The difference between them is just the automatic process of subscription's renewal. Let us have a closer look at it.

One-time Subscription

Method definition:

subscribe_to_author - Creates a subscription to an author. This function is used by consumers.

signed_transaction subscribe_to_author(string from,
                                       string to,
                                       string price_amount,
                                       string price_asset_symbol,
                                       bool broadcast = false);

Parameters:

  • from - Account who wants subscription to author.
  • to - The author you wish to subscribe to.
  • price_amount - Price for the subscription. Must be greater than or equal to the value set by author.
  • price_asset_symbol - Ticker symbol of the asset which will be used to buy subscription (must be DCT).
  • broadcast - true if you wish to broadcast the transaction.

Returned value:

  • The signed transaction subscribing the consumer to the author.

Example:

subscribe_to_author andrew ronald 1 DCT true

Response:

{
  "ref_block_num": 28983,
  "ref_block_prefix": 1509270629,
  "expiration": "2017-11-30T13:04:45",
  "operations": [[
      26,{
        "fee": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
        "from": "1.2.75",
        "to": "1.2.69",
        "price": {
          "amount": 450000000,
          "asset_id": "1.3.0"
        }
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "1f6f680dfe9daf5f6ff357c7657c44127c34e443f8158bf2a16cc90bb222b4f98c6adb5b9629398be2c3ed6e885618de31ad5968e576c7771ab879765ad6983110"
  ]
}

Subscribe to author API developer documentation

Automatic Subscription Renewal

Method definition:

set_automatic_renewal_of_subscription - This function can be used to allow/disallow automatic renewal of expired subscription (set by consumer).

signed_transaction
set_automatic_renewal_of_subscription(string account_id_or_name,
                                      subscription_id_type subscription_id,
                                      bool automatic_renewal,
                                      bool broadcast = false);

Parameters:

  • account_id_or_name - The name or id of the account to update.
  • subscription_id - The id of the subscription.
  • automatic_renewal - true if consumer's account wants to allow automatic renewal of subscription, false otherwise. Moreover, the false value is used in case of cancellation of the automatic renewal which was already set.
  • broadcast - true, if you want to broadcast the transaction to the network.

Returned value:

  • The signed transaction allowing/disallowing renewal of the subscription.

Example:

set_automatic_renewal_of_subscription andrew "2.15.0" true true

Response:

{
"ref_block_num": 29323,
  "ref_block_prefix": 1264372630,
  "expiration": "2017-11-30T13:36:10",
  "operations": [[
      28,{
      "fee": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
        "consumer": "1.2.75",
        "subscription": "2.15.0",
        "automatic_renewal": true
         }
    ]
  ],
  "extensions": [],
  "signatures": [
  "200d710e5e58bd2d1dd11ea771c2bd9e9680f4707ae2045114bbd86c351032e0d74489275781a92f7164f7c9cbda23135711026f18c0ff441107ada92294a88c36"
  ]
}

Set automatic renewal of subscription API developer documentation


Asset Transactions

DCore users can transfer of any amount and any asset using the following method. Keep in mind, transaction fees are paid for every transfer and the fee value is independent of the transfer parameters.

Method definition:

transfer - Transfer an amount of an asset from one account to another.

signed_transaction transfer(string from,
                            string to,
                            string amount,
                            string asset_symbol,
                            string memo,
                            bool broadcast = false);

Parameters:

  • from - The name or id of the account sending the funds.
  • to - The name or id of the account receiving the funds.
  • amount - The amount to send (in nominal units - to send half of a DCT, specify 0.5).
  • asset_symbol - The symbol or id of the asset to send.
  • memo - A memo to attach to the transaction. The memo will be encrypted in the transaction and readable for the receiver. There is no length limit other than the limit imposed by maximum transaction size.
  • broadcast - true to broadcast the transaction on the network.

Returned value:

  • The signed transaction transferring assets.

Example:

transfer sender-account receiver-account 100.5 DCT "note :-)" true

Response:

transfer sender-account receiver-account 100.5 DCT "note :-)" true
{
  "ref_block_num": 24127,
  "ref_block_prefix": 3582976257,
  "expiration": "2017-11-13T13:19:35",
  "operations": [[
      0,{
        "fee": {
          "amount": 500000,
          "asset_id": "1.3.0"
        },
        "from": "1.2.15",
        "to": "1.2.69",
        "amount": {
          "amount": "10050000000",
          "asset_id": "1.3.0"
        },
        "memo": {
          "from": "DCT5VrGVjdjUqmg8bKDXZAC3C8ib28WXJVTmWQ8A9SKXTgGPMX7yP",
          "to": "DCT5wSrG4yDau5ADsCizp6XDiMfYezmUWc81ieakMcxr8EcnkS2Xa",
          "nonce": "7783730735245512665",
          "message": "3733db9288dcd8a756e139d6a3c9a731"
        },
        "extensions": []
 }
    ]
  ],
  "extensions": [],
  "signatures": [
   "1f5335fbf42dbc856c3b4174dc6ed235c753af326c62edbe8a13f4f2c0abdc95134d42cceae60de9edf12f385f0299b3e7291f64e8ca3140956e779582fe613075"
  ]
}

Transfer API developer documentation


Revenue Share

The automated process of revenue sharing can be applied as follows.

  • First, submit the content and specify collaborators and their shares.
  • Second, every content purchase will automatically divide the revenue to all collaborators as was specified in the first step.

Submit Content

Use the same submit_content_async method as for standard content upload. Exception is, specify the co-authors parameter.

In the example below we assume 2 collaborators: Andrew with 20% share and Gordon with 10% share. The rest of the share belongs to the author, in this case, let us assume, it is Richard. Note, shares are not defined in percents but as basis points. Meaning that 1 percent is represented by number 100, 100% is 10000. This gives the maximum precision on 0.01%.

Example:

submit_content_async richard [[andrew, 2000], [gordon, 1000]] "/home/roni/test_txt_file.txt" "" "ipfs" [{"region":"","amount":"1","asset_symbol":"DCT"}] ["1.2.18","1.2.17"] "2017-12-17T23:59:59" "{\"content_type_id\":\"0\",\"title\":\"greatTestFile\",\"description\":\"some description.. \"}"

After submit you can check if the content is successfully uploaded by listing the content submitted by the user richard using the method search_content:

Example:

subscribe_to_author andrew ronald 1 DCT true
search_content "" "" richard "" "" "" 1

Response:

search_content "" "" richard "" "" "" 1
[{
    "id": "2.13.110",
    "author": "richard",
    "price": {
      "amount": 100000000,
      "asset_id": "1.3.0"
    },
    "synopsis": "{\"content_type_id\":\"0\",\"title\":\"greatTestFile\",\"description\":\"some description.. \"}",
    "status": "Uploaded",
    "URI": "ipfs:QmbEMGa2xKcq2T4kDhjWA92aGRAS5eh7irPbcQGd6dijPv",
    "_hash": "b117997be856d618a8acb5de9b2efca3ab66d302",
    "AVG_rating": 0,
    "size": 1,
    "expiration": "2017-12-17T23:59:59",
    "created": "2017-11-28T14:31:50",
    "times_bought": 0
  }
]

To get the object info for this content use its object id 2.13.110:

get_object "2.13.110"

Response:

[{
    "id": "2.13.110",
    "author": "1.2.71",
    "co_authors": [[
        "1.2.74",
        1000
      ],[
        "1.2.75",
        2000
      ]
    ],
    "expiration": "2017-12-17T23:59:59",
    "created": "2017-11-28T14:31:50",
    "price": {
      "map_price": [[
          1,{
            "amount": 100000000,
            "asset_id": "1.3.0"
          }
        ]
      ]
    },
    "size": 1,
    "synopsis": "{\"content_type_id\":\"0\",\"title\":\"greatTestFile\",\"description\":\"some description.. \"}",
    "URI": "ipfs:QmbEMGa2xKcq2T4kDhjWA92aGRAS5eh7irPbcQGd6dijPv",
    "quorum": 2,
    "key_parts": [[
        "1.2.17",{
          "C1": {
            "s": "9274257764822891496843240669950335288766878160247722553989318467429729261880162007248009447117402248900833652481643543721067970404762136308687973227697784."
          },
          "D1": {
            "s": "4247758360551140648391648003261403140485678666835801170242438268384086263805083547219259547433640675542813654555776832571041392995884513769763801325511192."
          }
        }
      ],[
        "1.2.18",{
          "C1": {
            "s": "695038958721775918620330438278966877938377889572654746293613581598725183048484007165418103953888625330617410249193012966357215129734390399344620434673889."
          },
          "D1": {
            "s": "10465431516644469444930762173588868043592575484090863934480836915662448521196431345191894557261901680318058959581707012227307149660916067445390418060790681."
          }
        }
      ]
    ],
    "_hash": "b117997be856d618a8acb5de9b2efca3ab66d302",
    "last_proof": [[
        "1.2.17",
        "2017-11-28T14:32:00"
      ],[
        "1.2.18",
        "2017-11-28T14:32:00"
      ]
    ],
    "is_blocked": false,
    "AVG_rating": 0,
    "num_of_ratings": 0,
    "times_bought": 0,
    "publishing_fee_escrow": {
      "amount": 40,
      "asset_id": "1.3.0"
    },
    "cd": {
      "n": 1,
      "u_seed": "c59e63ce4eed0c444aaf0b9ab1f48094",
      "pubKey": "1e9b7913fee78da601570aeeed9dcfaeda7473f6ac67a2d0dc577a07048a41bc01"
    },
    "seeder_price": [[
        "1.2.17",
        1
      ],[
        "1.2.18",
        1
      ]
    ]
  }
]

Get object API developer documentation

You can see that co_authors are defined in the content object as their ids and their shares are included as well.

Now, the content is ready for the purchase and its paid price will be divided among author and co-authors.

Receiving Revenue

To show received revenues we need to purchase previously uploaded content which has specified more co-authors.

First, check all account balances using list_account_balances method:

list_account_balances andrew
list_account_balances andrew
[{
    "amount": "9999800000000",
    "asset_id": "1.3.0"
  }
]
list_account_balances gordon
list_account_balances gordon
[{
    "amount": "10000000000000",
    "asset_id": "1.3.0"
  }
]
list_account_balances richard
list_account_balances richard
[{
    "amount": "100000000",
    "asset_id": "1.3.0"
  }
]

We can see that:

  • Andrew has 99998 DCTs,
  • Gordon has 100000 DCTs,
  • Richard has 1 DCT.

List account balances API developer documentation

Now, we are going to purchase the content.

Example:

request_to_buy ronald "ipfs:QmbEMGa2xKcq2T4kDhjWA92aGRAS5eh7irPbcQGd6dijPv" DCT 1 "" true

Response:

{
  "ref_block_num": 64117,
  "ref_block_prefix": 627554675,
  "expiration": "2017-11-28T14:41:20",
  "operations": [[
      21,{
        "fee": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
        "URI": "ipfs:QmbEMGa2xKcq2T4kDhjWA92aGRAS5eh7irPbcQGd6dijPv",
        "consumer": "1.2.69",
        "price": {
          "amount": 100000000,
          "asset_id": "1.3.0"
        },
        "region_code_from": 1,
        "pubKey": {
          "s": "11224933810420815644655150682984238678969894060884174721245566248880572373802513237336032957982220238017402523910349667941324210305815656093475818233530468."
        }
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "1f4a0df36d2b8529ec17962f17ab5db2e740170f58b0ab34b9a500a5b73e29e3d85b3d286410e7b88583340267d4a5368e2de789efb7a6048b10b5f209e0afdbe9"
  ]
}

Request to buy API developer documentation

And check the balances once again:

list_account_balances andrew
list_account_balances andrew
[{
    "amount": "9999820000000",
    "asset_id": "1.3.0"
  }
]
list_account_balances gordon
list_account_balances gordon
[{
    "amount": "10000010000000",
    "asset_id": "1.3.0"
  }
]
list_account_balances richard
list_account_balances richard
[{
    "amount": "170000000",
    "asset_id": "1.3.0"
  }
]

And we can see, everyone received their revenue share:

  • andrew has 99998.2 DCTs (99998 + 0.2),
  • gordon has 100000.1 DCTs (100000 + 0.1),
  • richard has 1.7 DCTs (1 + 0.7),

Which makes the total 1 DCT payed for the content.


Custom Tokens

To create a new custom token (user_issued_asset) use the create_user_issued_asset method. Except for the symbol and precision parameters, it is possible to change parameters later by calling method update_asset. Be aware, if parameter is_fixed_max_supply was during the first setup set to true, there will not be possibility to update parameter max_supply by calling method update_asset. Once was it set, its modifications are not allowed. The issuer can be changed as well, but only by the currently valid issuer. Also note, the core_exchange_rate is using the satoshi representation of DCT and is defined as a ratio of a "base" and "quote", where quote is meant to be the denominator.

Method definition:

create_user_issued_asset - Creates a new user-issued asset. Some options can be changed later using update_asset.

signed_transaction
create_user_issued_asset(string issuer,
                         string symbol,
                         uint8_t precision,
                         string description,
                         uint64_t max_supply,
                         price core_exchange_rate,
                         bool is_exchangeable,
                         bool is_fixed_max_supply,
                         bool broadcast = false);

Parameters:

  • issuer - The name or id of the account who will pay the fee and become the issuer of the new asset. This can be updated later.
  • symbol - The ticker symbol of the new asset.
  • precision - The number of digits of precision to the right of the decimal point, must be less than or equal to 12. E.g. value set to 0 means precision is set to units, which means there are no decimal representations of asset's amount.
  • description - Asset's description. Maximal length is 1000 chars.
  • max_supply - The maximum supply of this asset which may exist at any given time.
  • core_exchange_rate - Core_exchange_rate technically needs to store the asset id of this new asset. Since this id is not known at the time this operation is created, create this price as though the new asset has instance id 1 (in provided example we use 1.3.1, as DCT's code is 1.3.0) and the chain will overwrite it with the new asset's id.
  • is_exchangeable - true to allow implicit conversion of this asset to/from core asset.
  • is_fixed_max_supply - true to deny future modifications of max_supply parameter.
  • broadcast - true to broadcast the transaction on the network.

Returned value:

  • The signed transaction creating a new custom token.

Example:

create_user_issued_asset alien MCCC 0 "Mick credits" 10000 {"base":{"amount":200000000,"asset_id":1.3.0},"quote":{"amount":1,"asset_id":1.3.1}} true false true

Response:

{
  "ref_block_num": 59571,
  "ref_block_prefix": 4222948911,
  "expiration": "2018-04-23T14:06:20",
  "operations": [[
      3,{
        "fee": {
          "amount": 100000000,
          "asset_id": "1.3.0"
        },
        "issuer": "1.2.30",
        "symbol": "MCCC",
        "precision": 0,
        "description": "Mick credits",
        "options": {
          "max_supply": 10000,
          "core_exchange_rate": {
            "base": {
              "amount": 200000000,
              "asset_id": "1.3.0"
            },
            "quote": {
              "amount": 1,
              "asset_id": "1.3.1"
            }
          },
          "is_exchangeable": true,
          "extensions": [[
              1,{
                "is_fixed_max_supply": false
              }
            ]
          ]
        },
        "is_exchangeable": true,
        "extensions": []
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "20331fca29ff7de6dafb3cb180d1a1920b601c1c2587b2e7634a609f689a55a9575600e4553381362731cfe2dd07a0ab8a2ec7ac7a5b2f764d68d506012658acfe"
  ]
}

Create user issued asset API developer documentation

Issue Created Asset

Custom token issuer is able to issue new custom tokens at anytime. The only restriction is based on the value set as max_supply parameter.

Method definition:

issue_asset - Issue new shares of a custom token.

signed_transaction issue_asset(string to_account,
                               string amount,
                               string symbol,
                               string memo,
                               bool broadcast = false);

Parameters:

  • to_account - The name or id of the account to receive the new shares.
  • amount - The amount to issue, in nominal units.
  • symbol - The ticker symbol of the asset to issue.
  • memo - A memo to include in the transaction, readable by the recipient.
  • broadcast - true to broadcast the transaction on the network.

Returned value:

  • The signed transaction issuing the new shares.

Example:

issue_asset mickey 500 MCC "creating funds" true

Response:

issue_asset mickey 500 MCC "creating funds" true
{
  "ref_block_num": 39762,
  "ref_block_prefix": 3654765070,
  "expiration": "2017-11-14T13:11:50",
  "operations": [[
      4,{
        "fee": {
          "amount": 552734,
          "asset_id": "1.3.0"
        },
        "issuer": "1.2.73",
        "asset_to_issue": {
          "amount": 500,
          "asset_id": "1.3.34"
        },
        "issue_to_account": "1.2.73",
        "memo": {
          "from": "DCT5VrGVjdjUqmg8bKDXZAC3C8ib28WXJVTmWQ8A9SKXTgGPMX7yP",
          "to": "DCT5wSrG4yDau5ADsCizp6XDiMfYezmUWc81ieakMcxr8EcnkS2Xa",
          "nonce": "12179244057494284541",
          "message": "91d85802da178df3f5f74f419084481a2a01b843449f82a7788bed829fa2b50a"
        },
        "extensions": []
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "1f215bca01f517105bb8649828abdca0799bea89ec00bfaca992572a5b6a0983571a8c961705fc39dce8d2f024f2eecaea6132e80b6a18d4463ec04f5103272669"
  ]
}

Issue asset API developer documentation

Verify if the funds were created correctly by calling list_account_balances.

Example:

list_account_balances mickey

Response:

list_account_balances mickey
[{
    "amount": "100037396947266",
    "asset_id": "1.3.0"
  },{
    "amount": 500,
    "asset_id": "1.3.34"
  }
]

List account balances API developer documentation

Funding Pools

Once assets are issued you can fund the asset pools. Pools are used for exchanging asset for DCT and vice versa. Useful for setting content prices in less volatile currencies.

Method definition:

fund_asset_pools - Pay into the pools for the given asset. Custom Tokens can optionally have a pool for the core asset (DCT) which is automatically used to pay transaction fees for any transaction using that asset (using the asset's core exchange rate). Allows anyone to deposit core/asset into pools. The pools are used when conversion between assets is needed (paying fees, paying for a content using other assets).

signed_transaction fund_asset_pools(string from,
                                    string uia_amount,
                                    string uia_symbol,
                                    string dct_amount,
                                    string dct_symbol,
                                    bool broadcast = false);

Parameters:

  • from - A name or id of the account sending the core asset.
  • uia_amount - An amount of "this" asset to deposit.
  • uia_symbol - A name or id of the asset whose pool you wish to fund.
  • dct_amount - An amount of the core asset to deposit.
  • dct_symbol - A name or id of the DCT asset.
  • broadcast - true to broadcast the transaction to the network.

Returned value:

  • The signed transaction funding the fee pool.

Example:

fund_asset_pools mickey 900 MCC 1000 DCT true

Response:

fund_asset_pools mickey 900 MCC 1000 DCT true
{
  "ref_block_num": 40906,
  "ref_block_prefix": 3394212377,
  "expiration": "2017-11-14T15:03:00",
  "operations": [[
      33,{
        "fee": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
        "from_account": "1.2.73",
        "uia_asset": {
          "amount": 900,
          "asset_id": "1.3.34"
        },
        "dct_asset": {
          "amount": "100000000000",
          "asset_id": "1.3.0"
        },
        "extensions": []
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "1f54b76013f3fe6082951703201943e9266b1269edf3f4ac2aefac43ea2bdf9831509f6191de0a3b88df1bd16d1126f88ef1f6db4d81a9ba78f1854d7e8ddf5a7f"
  ]
}

Fund asset pools API developer documentation

Finding the Asset Id

Check asset's id and dynamic_asset_data_id object id, which provides information about its supply or current pool.

Method definition:

get_asset - Returns information about the given asset.

asset_object get_asset(string asset_name_or_id);

Parameters:

  • asset_name_or_id - The symbol or id of the asset in question.

Returned value:

  • The information about the asset stored in the blockchain.

Example:

get_asset MCC

Response:

get_asset MCC
{
  "id": "1.3.34",
  "symbol": "MCC",
  "precision": 0,
  "issuer": "1.2.73",
  "description": "Mickey credits",
  "options": {
    "max_supply": 10000,
    "core_exchange_rate": {
      "base": {
        "amount": 200000000,
        "asset_id": "1.3.0"
      },
      "quote": {
        "amount": 1,
        "asset_id": "1.3.34"
      }
    },
    "is_exchangeable": true,
    "extensions": []
  },
  "dynamic_asset_data_id": "2.3.34"
}

Get asset API developer documentation

Show dynamic_asset_data_id object:

Example:

get_object "2.3.34"

Response:

[{
    "id": "2.3.33",
    "current_supply": 0,
    "asset_pool": 0,
    "core_pool": 1250000
  }
]

Units used for parameter core_pool are in DCT and its Satoshi representation.

Get object API developer documentation

Update Asset Parameters

To update already existing asset's parameters use update_user_issued_asset method. Note that only the issuer is able to update the asset paramaters. In exchange rate parameter make sure that the asset id is correct - in this case the id is 1.3.34. As a reminder, DCT's id is 1.3.0. To get your asset id you can use get_asset method mentioned in the section above.

Method definition:

update_user_issued_asset - Update the options specific to a custom token. Custom tokens have some options which are not relevant to other asset types. This operation is used to update these options.

signed_transaction update_user_issued_asset(string symbol,
                                            string new_issuer,
                                            string description,
                                            uint64_t max_supply,
                                            price core_exchange_rate,
                                            bool is_exchangeable,
                                            bool broadcast = false);

Parameters:

  • symbol - The name or id of the asset to update, which must be a market-issued asset.
  • new_issuer - If the asset is to be given a new issuer, specify his id here.
  • description - Asset description.
  • max_supply - The maximum supply of this asset, which may exist at any given time.
  • core_exchange_rate - Price used to convert non-core asset to core asset.
  • is_exchangeable - true to allow implicit conversion of this asset to/from core asset.
  • broadcast - true to broadcast the transaction on the network.

Returned value:

  • The signed transaction updating the user issued asset.

Example:

update_user_issued_asset MCC "" "" 20000 {"base":{"amount":200000000,"asset_id":1.3.0},"quote":{"amount":1,"asset_id":1.3.34}} true true

Response:

{
  "ref_block_num": 5707,
  "ref_block_prefix": 3762837208,
  "expiration": "2017-11-16T13:22:55",
  "operations": [[
      36,{
        "fee": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
        "issuer": "1.2.73",
        "asset_to_update": "1.3.34",
        "new_description": "",
        "max_supply": 20000,
        "core_exchange_rate": {
          "base": {
            "amount": 200000000,
            "asset_id": "1.3.0"
          },
          "quote": {
            "amount": 1,
            "asset_id": "1.3.34"
          }
        },
        "is_exchangeable": true,
        "extensions": []
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "20323b8730d22cad290b935baaf0612be39f71780a32fb94d65c81bb408b882dc7247a593c8a00e64194eb1a8876db94716751eecc9e38d5d83c1fe1f25a04a4bb"
  ]
}

Update user issued asset API developer documentation


Leave Ratings and Feedback

After buying a content you can provide your rating to it with adding a message in comment by using the following method.

Method definition:

leave_rating_and_comment - Rates and comments a content.

void leave_rating_and_comment(string consumer,
                              string URI,
                              uint64_t rating,
                              string comment,
                              bool broadcast);

Parameters:

  • consumer - Consumer giving the rating.
  • URI - An URI of the content.
  • rating - A rating. The available options are 1-5, where 5 represents maximum value and it is equal to the best possible rating value.
  • comment - The maximum length of a comment is 100 characters.
  • broadcast - True to broadcast the transaction on the network.

Example:

leave_rating_and_comment ronald "ipfs:QmbEMGa2xKcq2T4kDhjWA92aGRAS5eh7irPbcQGd6dijPv" 3 "" true

Result:

leave_rating_and_comment ronald "ipfs:QmbEMGa2xKcq2T4kDhjWA92aGRAS5eh7irPbcQGd6dijPv" 3 "" true
null

Leave rating and comment API developer documentation

Show Ratings and Feedback

By using the following method you can get the list of specific content's feedbacks.

Method definition:

search_feedback - Search in users's feedbacks.

vector<rating_object_ex> search_feedback(const string& user,
                                         const string& URI,
                                         const string& id,
                                         uint32_t count) const;

Parameters:

  • user - An author of the feedback.
  • URI - A content object URI.
  • id - An id of buying object which was created when the content was bought and which you want to start searching from.
  • count - A maximum number of feedbacks to fetch.

Returned value:

  • The feedback found.

Example:

search_feedback "" "ipfs:QmbEMGa2xKcq2T4kDhjWA92aGRAS5eh7irPbcQGd6dijPv" "" 1

Response:

[{
    "id": "2.12.10",
    "consumer": "1.2.18",
    "URI": "ipfs:QmPeUDhUwuE5GyBCfKRnvYbnAFkJy5tZsc66Br9q5fC9WW",
    "synopsis": "{\"content_type_id\":\"0\",\"title\":\"pub10\",\"description\":\"10\"}",
    "price": {
      "amount": 0,
      "asset_id": "1.3.0"
    },
    "paid_price_before_exchange": {
      "amount": 100000000,
      "asset_id": "1.3.0"
    },
    "paid_price_after_exchange": {
      "amount": 100000000,
      "asset_id": "1.3.0"
    },
    "seeders_answered": [
      "1.2.16",
      "1.2.17"
    ],
    "size": 1,
    "rating": 3,
    "comment": "My thoughts, cokolveeeeeek",
    "expiration_time": "2018-02-15T14:19:55",
    "pubKey": {
      "s": "3398805210386417935659085342997301774661754175089581995591046947463280571859128574508785989129943525087773479778688676124243911952000486510467516111177374."
    },
    "key_particles": [{
        "C1": {
          "s": "4730495964088102863481086931352588725438836281298049151157894088843250827108215403351413412083972123346919215336243741564359356403705458821440673650234719."
        },
        "D1": {
          "s": "6368979732194225890750024605297344654612766559073680060805207127978861940996481109426678444471439618971162236475165721894047335715486167813435682042159993."
        }
      },{
        "C1": {
          "s": "1809809520611446425413566075467645796356667394533640508655655307978980141418364895888659074557843373369254826809769869930149887514237139410215166761230763."
        },
        "D1": {
          "s": "10744080555769203028989095373028482227029097140915548357994120606641455681270049985696763698654666346852762243081013307044988846709403139829971512431733102."
        }
      }
    ],
    "expired": false,
    "delivered": true,
    "expiration_or_delivery_time": "2018-02-14T14:20:00",
    "rated_or_commented": true,
    "created": "2018-02-14T12:55:35",
    "region_code_from": 1,
    "author": "peters"
  }
]

Search feedback API developer documentation