There is a list of commands to interact with the network as service:

Node Command - NET_SRV ORDER FIND

Looks up for orders using different filters

CLI Example

Command syntax:

net_srv order find
-net <net_name>  
[-direction {sell | buy}] 
[-srv_uid <service_UID>] 
[-price_unit <price_unit>] 
[-price_token <token_ticker>] 
[-price_min <price_minimum>] 
[-price_max <price_maximum>]

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list
-direction {sell | buy} - direction of token exchange: sell - as provider, buy - as client (optional)
-srv_uid - UID of the service (optional)
-price_unit - set 'SECOND' for use seconds
-price_token - ticker of the token (optional)
-price_min - filtration by minimum order price (optional)
-price_max - filtration by maximum order price (optional)
 

Example:

Command:

cellframe-node-cli net_srv order find 
-direction sell 
-srv_uid 0x0000000000000001 
-price_unit SECOND 
-price_token tKEL  
-price_min 0.0 
-price_max 0.00003 
-net riemann 
-chain main

Response:

Found 21 orders:
 
== Order 0x9184E0FC994A9BA22C1235FA980AB174319E5DA5205775123826C99CA812E1FB ==
  version:          3
  direction:        SERV_DIR_SELL
  created:          Thu, 18 Apr 2024 23:49:30 -0700
  srv_uid:          0x0000000000000001
  price:            0.000000000000001 (1000)
  price_token:      tKEL
  units:            5242880
  price_unit:       SECOND
  node_addr:        E02A::FB56::1B0A::19C8
  node_location:    Europe - Germany
  tx_cond_hash:     0x0000000000000000000000000000000000000000000000000000000000000000
  ext:              0x52024765726D616E7900
  pkey:             0xE23EF5A0EA0604EADD74EB2F365809AE222EB88B7EA72C9ADA7AF8B78EA4E21E
 ...
  continue

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"net_srv", "params":["net_srv;order;find;-direction;sell;-srv_uid;0x0000000000000001;-price_unit;SECOND;-price_token;tKEL; -price_min;0.0;-price_max;0.00003;-net;riemann;-chain;main"], "id":"1"}'

Response:

{ 
"type": 0,
"result": "Found 21 orders:\n== Order 0x9184E0FC994A9BA22C1235FA980AB174319E5DA5205775123826C99CA812E1FB ==\n  version:          3\n  direction:        SERV_DIR_SELL\n  created:          Thu, 18 Apr 2024 23:49:30 -0700\n  srv_uid:          0x0000000000000001\n  price:            0.000000000000001 (1000)\n  price_token:      tKEL\n  units:            5242880\n  price_unit:       SECOND\n  node_addr:        E02A::FB56::1B0A::19C8\n  node_location:    Europe - Germany\n  tx_cond_hash:     0x0000000000000000000000000000000000000000000000000000000000000000\n  ext:              0x52024765726D616E7900\n  pkey:             0xE23EF5A0EA0604EADD74EB2F365809AE222EB88B7EA72C9ADA7AF8B78EA4E21E\n
 

continue
,
"errors": null,
"id": 1 
}
Link to original

Node Command - NET_SRV ORDER DELETE

Deletes order (order can be deleted only by a person who previously created it)

 

CLI Example

Command syntax:

net_srv order delete
-net <net_name>  
-hash <ip_addr>
-cert <cert_name>

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list (optional)
hash - hash of the order
cert - certificate which was used to sign order

Example:

Command:

cellframe-node-cli net_srv order delete 
-hash 0xC4D4A5B737466AE975D66E63B0DEE35EDA53493B1A9BBC58280445158E863734 
-net riemann 
-cert mastercert

Response:

Deleted order 0xC4D4A5B737466AE975D66E63B0DEE35EDA53493B1A9BBC58280445158E863734

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"net_srv", "params":["net_srv;order;delete;-hash;0x89C49CC794D67CE0C24E87F0F984E092EF4CDFE446F56D7CB8AC2CBD2FBF9A76;-net;riemann;-cert;mastercert"], "id":"1"}'

Response:

{ 
"type": 0,
"result": "Deleted order 0x89C49CC794D67CE0C24E87F0F984E092EF4CDFE446F56D7CB8AC2CBD2FBF9A76\n",
"errors": null,
"id": 1 
}
Link to original

Node Command - NET_SRV ORDER DUMP

Shows an order info by the order hash  

CLI Example

Command syntax:

net_srv  order dump
-net <net_name> 
-hash <ip_addr>

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list (optional)
hash - hash of the order
 

Example:

Command:

cellframe-node-cli net_srv order dump 
-net riemann 
-hash 0x84841198C0F98BE33FAC05F897DFB9E273352F79329784C916476787C638FD3B

Response:

== Order 0x84841198C0F98BE33FAC05F897DFB9E273352F79329784C916476787C638FD3B ==
  version:          3
  direction:        SERV_DIR_SELL
  created:          Tue, 25 Jul 2023 03:59:33 -0700
  srv_uid:          0x0000000000000001
  price:            0.0000000000000012 (1200)
  price_token:      tKEL
  units:            300
  price_unit:       SECOND
  node_addr:        D860::D9D5::1C57::A6B3
  node_location:    Europe - France
  tx_cond_hash:     0x0000000000000000000000000000000000000000000000000000000000000000
  ext:              0x52024672616E636500
  pkey:             0xC6FB9B9370C01F52AD31D1B22A8AB1F1B18AF190EB48BA8F7E24E3DA6E67C8C2

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"net_srv", "params":["net_srv;order;dump;-net;riemann;-hash;0x84841198C0F98BE33FAC05F897DFB9E273352F79329784C916476787C638FD3B"], "id":"1"}'

Response:

{ 
"type": 0,
"result": "== Order 0x84841198C0F98BE33FAC05F897DFB9E273352F79329784C916476787C638FD3B ==\n  version:          3\n  direction:        SERV_DIR_SELL\n  created:          Tue, 25 Jul 2023 03:59:33 -0700\n  srv_uid:          0x0000000000000001\n  price:            0.0000000000000012 (1200)\n  price_token:      tKEL\n  units:            300\n  price_unit:       SECOND\n  node_addr:        D860::D9D5::1C57::A6B3\n  node_location:    Europe - France\n  tx_cond_hash:     0x0000000000000000000000000000000000000000000000000000000000000000\n  ext:              0x52024672616E636500\n  pkey:             0xC6FB9B9370C01F52AD31D1B22A8AB1F1B18AF190EB48BA8F7E24E3DA6E67C8C2\n",
"errors": null,
"id": 1
}
Link to original

Node Command - NET_SRV ORDER CREATE

Creates an order with the specified parameters

 

CLI Example

Command syntax:

net_srv order create
-net <net_name>  
-direction {sell | buy} 
-srv_uid <Service UID> 
-price <Price>
-price_unit <Price Unit> 
-price_token <token_ticker> 
-units <units> 
[-node_addr <Node Address>] 
[-tx_cond <TX Cond Hash>]
[-expires <Unix time when expires>] 
[-cert <cert name to sign order>]
[-region <Region name>] 
[-continent <Continent name>]

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list (optional)
-direction {sell | buy} - direction of token exchange: sell - from, buy - to 
-srv_uid - UID of the service 
-price - price for the number of units specified in the parameter `-units`, for example, 100 datoshi for 3600 seconds of the service
-price_unit - preferable unit of service (seconds\bytes)
-price_token - ticker of the token 
-units - number of units in one portion of the service
-node_addr - address of the node in the service network (optional)
-tx_cond - hash of the conditional transaction (optional)
-expires - time of order expiring (optional)
-cert - name of the master node certificate which is used to sign order (optional)
-region - the region in which the node is located (optional)
-continent - the continent in which the node is located (optional)

Example:

Command:

cellframe-node-cli net_srv order create 
-direction sell 
-srv_uid 0x0000000000000001 
-price 0.000007 
-price_unit SEC 
-price_token tKEL 
-units 500 
-net riemann 
-cert mastercert

Response:

Created order 0xC4D4A5B737466AE975D66E63B0DEE35EDA53493B1A9BBC58280445158E863734

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"net_srv", "params":["net_srv;order;create;-direction;sell;-srv_uid;0x0000000000000001;-price;0.000007;-price_unit;SEC;-price_token;tKEL;-units;500;-net;riemann;-cert;mastercert"], "id":"1"}'

Response:

{ 
"type": 0,
"result": "Created order 0x89C49CC794D67CE0C24E87F0F984E092EF4CDFE446F56D7CB8AC2CBD2FBF9A76\n",
"errors": null,
"id": 1
}
Link to original

Node Command - NET_SRV GET LIMITS

Gets service limits (information about available unspent units)

 

CLI Example

Command syntax:

net_srv get_limits 
-net <net_name> 
-srv_uid <Service_UID> 
-provider_pkey_hash <Service_provider_public_key_hash> 
-client_pkey_hash <Client_public_key_hash>

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list (optional)
-srv_uid - UID of the service 
-provider_pkey_hash - hash of the service providers public key
-client_pkey_hash - hash of the clients public key
 

Example:

Command:

cellframe-node-cli net_srv get_limits 
-net riemann 
-srv_uid 0x0000000000000001 
-provider_pkey_hash 0xE23EF5A0EA0604EADD74EB2F365809AE222EB88B7EA72C9ADA7AF8B78EA4E21E 
-client_pkey_hash 0xF5B9D0C675D671E05198812F40B8C0AF4CBE5C477BAA2940AE751F6B37E1F335

Response:

Provider 0xE23EF5A0EA0604EADD74EB2F365809AE222EB88B7EA72C9ADA7AF8B78EA4E21E. Client 0xF5B9D0C675D671E05198812F40B8C0AF4CBE5C477BAA2940AE751F6B37E1F335 remain service values:
 
SEC: 0
 
BYTES: 0

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"net_srv", "params":["net_srv;get_limits;-net;riemann;-srv_uid;0x0000000000000001;-provider_pkey_hash;0xE23EF5A0EA0604EADD74EB2F365809AE222EB88B7EA72C9ADA7AF8B78EA4E21E;-client_pkey_hash;0xF5B9D0C675D671E05198812F40B8C0AF4CBE5C477BAA2940AE751F6B37E1F335"],"id":"1"}'

Response:

{ 
"type": 0,
"result": "Provider 0xE23EF5A0EA0604EADD74EB2F365809AE222EB88B7EA72C9ADA7AF8B78EA4E21E. Client 0xF5B9D0C675D671E05198812F40B8C0AF4CBE5C477BAA2940AE751F6B37E1F335 remain service values:\nSEC: 0\nBYTES: 0\n",
"errors": null,
"id": 1
}
Link to original

Node Command - NET_SRV REPORT

Shows usage statistics 

CLI Example

Command syntax:

cellframe-node-cli net_srv report 
-net <net_name> 

Options:

-net - name of the Cellframe Network. The list of networks can be found in the <Config_dir> \ etc \ network folder or received by The Cellframe-Node-CLI using command - net list (optional)
 

Example:

Command:

cellframe-node-cli net_srv report 
-net riemann

Response:

Service report:
 
SRV UID: 0x0000000000000001
 
Client pkey hash: 0xBD982A6450494448477F38C1F8F5ED632A3F51EB86945CE76A0E84786E402360
 
        payed:
                using time:             0
                bytes sent:             0
                bytes received:         0
                units used:             0
                datoshi value:          0
 
        grace:
                using time:             109
                bytes sent:             18909751
                bytes received:         73313924
                units used:             0
                datoshi value:          586
 
        free:
                using time:             0
                bytes sent:             0
                bytes received:         0
                units used:             0
 
SRV UID: 0x0000000000000001
 
Client pkey hash: 0xF5B9D0C675D671E05198812F40B8C0AF4CBE5C477BAA2940AE751F6B37E1F335
 
        payed:
                using time:             4011
                bytes sent:             13643340
                bytes received:         670241797
                units used:             0
                datoshi value:          4346
 
        grace:
                using time:             5499
                bytes sent:             23452974
                bytes received:         900287200
                units used:             0
                datoshi value:          28244
 
        free:
                using time:             0
                bytes sent:             0
                bytes received:         0
                units used:             0

JSON-RPC Example

Command:

curl --unix-socket /opt/cellframe-node/var/run/node_cli 
-X POST http://localhost/connect 
-d '{"method":"net_srv", "params":["net_srv;report;-net;riemann"], "id":"1"}'

Response:

{ 
"type": 0,
"result": "Service report:\nSRV UID: 0x0000000000000001\nClient pkey hash: 0xBD982A6450494448477F38C1F8F5ED632A3F51EB86945CE76A0E84786E402360\n \tpayed:\n\t\tusing time:\t\t0\n\t\tbytes sent:\t\t0\n\t\tbytes received:\t\t0\n\t\tunits used:\t\t0\n\t\tdatoshi value:\t\t0\n\tgrace:\n\t\tusing time:\t\t109\n\t\tbytes sent:\t\t18909751\n\t\tbytes received:\t\t73313924\n\t\tunits used:\t\t0\n\t\tdatoshi value:\t\t586\n\tfree:\n\t\tusing time:\t\t0\n\t\tbytes sent:\t\t0\n\t\tbytes received:\t\t0\n\t\tunits used:\t\t0\nSRV UID: 0x0000000000000001\nClient pkey hash: 0xF5B9D0C675D671E05198812F40B8C0AF4CBE5C477BAA2940AE751F6B37E1F335\n \tpayed:\n\t\tusing time:\t\t4011\n\t\tbytes sent:\t\t13643340\n\t\tbytes received:\t\t670241797\n\t\tunits used:\t\t0\n\t\tdatoshi value:\t\t4346\n\tgrace:\n\t\tusing time:\t\t5499\n\t\tbytes sent:\t\t23452974\n\t\tbytes received:\t\t900287200\n\t\tunits used:\t\t0\n\t\tdatoshi value:\t\t28244\n\tfree:\n\t\tusing time:\t\t0\n\t\tbytes sent:\t\t0\n\t\tbytes received:\t\t0\n\t\tunits used:\t\t0\n",
"errors": null,
"id": 1
}
Link to original