Creates poll transaction.

Request Structure

JSON object:

{
  "method": "poll",
  "subcommand": ["create"],
  "arguments": {
    "net": "network_name",
    "question": "Question_string",
    "options": "Option1,Option2,...OptionN",
    "expire": "poll_expire_time_in_RCF822",
    "max_votes_count": "Votes_count",
    "delegated_key_required": "null",
    "vote_changing_allowed": "null",
    "token": "ticker",
    "fee": "value_datoshi",
    "w": "fee_wallet_name"
  },
  "id": "1"
}

Parameters: net (network_name) - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received using - Node Command - NET LIST question - subject of the poll string in quotes, limit - 200 characters options - answer options strings in quotes listed through commas, limit of a one answer - 100 characters, number of options - not more than 10 expire - poll end time optional, time format is RCF822, use time of your system max_votes_count - maximum number of votes being accepted optional delegated_key_required - allows to vote only for users who has delegated key optional vote_changing_allowed - allows to change previously sent answer in the poll optional token - a name of the token which will be used to participate in the poll optional fee - validator’s commission, because poll is a transaction too w - name of the wallet from which commission will be paid

Curl Example

Request:

curl --unix-socket /opt/cellframe-node/var/run/node_cli -X POST http://localhost/connect -d '{
  "method": "poll",
  "subcommand": ["create"],
  "arguments": {
    "net": "foobar",
    "question": "mypersonalvoting",
    "options": "yes,no,maybe",
    "fee": "0.05e+18",
    "w": "foobar_master_0"
  },
  "id": "1"
}'

Response:

{
  "type": 0,
  "result": "Datum 0x88DC38903DA6E616C91510BF51E4D57F0DC599F1CAA47B0BA20D82D8EB747D02 successfully added to mempool",
  "errors": null,
  "id": 1
}