Shows events list.

Command syntax:

dag event list 
-net <net_name> 
-chain <chain_name> 
-from {events | events_lasts | threshold | round.new | round.<round_id_in_hex>}

Options:

-net - name of the Cellframe network. The list of networks can be found in the <Config_dir> \ etc \ network folder folder or received by the Cellframe-Node-Cli Net List command
-chain - the name of Chain. The list of chain can be found in the directory <Config_dir> \ etc \ network \ <network_name> or get the Cellframe-Node-App Net List Chains command
-from - ledger section, from where the events will be unloaded (events, events_lasts, threshold, round.new). Must be indicated in HEX format. Use "events" as default.

CLI Example

Command:

cellframe-node-cli dag event list 
-net riemann 
-chain zerochain 
-from events

Response:

0xC08E77BBDB20C19E9D4A6A6F2FA0AF64990833951E24D7398C0773445898885E: ts_create=Thu, 30 Mar 2023 02:19:40 +0000

        0xE94BBE15850C1DBD533BEDD8160CEE0BCF92F3EE8887CA2769C6931C570CD86B: ts_create=Thu, 06 Apr 2023 16:32:00 +0000

        0xCB2C05E3601F5F835FE163F29105B10DCC5D9396E52BDCE0F127F79016F60907: ts_create=Mon, 10 Apr 2023 14:53:49 +0000

...

        0x23F9419DBAF7B380EBE12D34565682B15C17AF2D0E5346B51948025526831B52: ts_create=Wed, 22 Nov 2023 19:02:46 +0000

riemann.zerochain have total 28 events :

JSON-RPC Example

JSON-RPC Request - DAG EVENT LIST

Shows events list.

Request Structure

JSON object:

{
  "method": "dag",
  "subcommand": ["event","list"],
  "arguments": {
    "net": "network_name",
    "chain": "chain_name",
    "from": "events | events_lasts | threshold | round.new  | round.<round_id_in_hex>"
  },
  "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 chain - the name of chain (main or zerochain) from - ledger section, from where the events will be unloaded (events, events_lasts, threshold, round.new). Must be indicated in HEX format. Use events as default.

If you make a request in the Cellframe network, use parameter chain:zerochain.

Curl Example

Request:

curl --unix-socket /opt/cellframe-node/var/run/node_cli -X POST http://localhost/connect -d '
{
  "method": "dag",
  "subcommand": ["event","list"],
  "arguments": {
    "net": "riemann",
    "chain": "zerochain",
    "from": "events"
  },
  "id": "1"
}'

Response:

{
  "type"2,
  "result": [
#over 500 events missed for making this response readable
    {
      "EVENTS": [
        {
          "limit""unlimit"
        },
        {
          "#""585",
          "event number"5,
          "hash""0x5B20594334D6B94EC96CCE234CC56785376D79DCB3D7445D5C2AF4C52B225546",
          "ts_create""Mon, 10 Apr 2023 15:15:40 +0000"
        },
        {
          "#""586",
          "event number"4,
          "hash""0x5297CB7384BF93FB76EF574341CF60E1C297736D6C780BA64C956E9F888FE964",
          "ts_create""Mon, 10 Apr 2023 15:04:41 +0000"
        },
        {
          "#""587",
          "event number"3,
          "hash""0xCB2C05E3601F5F835FE163F29105B10DCC5D9396E52BDCE0F127F79016F60907",
          "ts_create""Mon, 10 Apr 2023 14:53:49 +0000"
        },
        {
          "#""588",
          "event number"2,
          "hash""0xE94BBE15850C1DBD533BEDD8160CEE0BCF92F3EE8887CA2769C6931C570CD86B",
          "ts_create""Thu, 06 Apr 2023 16:32:00 +0000"
        },
        {
          "#""589",
          "event number"1,
          "hash""0xC08E77BBDB20C19E9D4A6A6F2FA0AF64990833951E24D7398C0773445898885E",
          "ts_create""Thu, 30 Mar 2023 02:19:40 +0000"
        }
      ],
      "net name""riemann",
      "chain""zerochain",
      "total events"589
    }
  ],
  "id"1
}
Link to original