Shows ledger information

CLI Example

Command syntax:

ledger info 
-hash <tx_hash> 
-net <net_name> 
[-unspent]

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
-hash - hash of the transaction
-unspent - extra parameter which shows transactions with unspent OUT's (optional)

Example:

Command:

cellframe-node-cli ledger info 
-hash 0x31BC6C8DB3B00A719824182743554865B9AB38C0D1CCD6A85AC8075ECD6075C5 
-net foobar

Response:

transaction: hash 0x31BC6C8DB3B00A719824182743554865B9AB38C0D1CCD6A85AC8075ECD6075C5
 TS Created: Thu Jan 25 06:38:11 2024
 Token ticker: BUZ
 Items:
     IN:
Tx_prev_hash: 0xDAF48202160FF9C703FBF502E379B4BA98BF359E3BD71BE5318D06605646438E
              Tx_out_prev_idx: 2
     OUT:
              Value: 10000000.0 (10000000000000000000000000)
              Address: ptV4n68gTebdUTcbpMWKhfpsGuugvEdK6bwKS8P1q9gkUCKHKKo6t2ed41FPz1CTWVyKwZqRXZYLngxzFTErgdei8QuGdS3Bpv72HGVt
     OUT COND:
     Header:
              ts_expires: never
              value: 1.0 (1000000000000000000)
              subtype: DAP_CHAIN_TX_OUT_COND_SUBTYPE_FEE
              uid: 0x0000000000000000
     OUT:
              Value: 9999999999999999999999999999988999998.8 (9999999999999999999999999999988999998800000000000000000)
              Address: ptV4n68gTebdUTcbmp9YLvesZ9v4pddjDbHYz24CGH5mfirNynRPCqKHajj5M5ahtx6uTZpkyEqi9rcPExfSGZwrzCkkVdQuzeEzKRVj
Signature:
    Type: sig_dil
    Public key hash: 0x70E9CCE59EB345DD9E5B8E0CBF1F18C2C9072B021A9B12C3AD4FC6577091F200
    Public key size: 1196
    Signature size: 2096
    Sender addr: ptV4n68gTebdUTcbmp9YLvesZ9v4pddjDbHYz24CGH5mfirNynRPCqKHajj5M5ahtx6uTZpkyEqi9rcPExfSGZwrzCkkVdQuzeEzKRVj

Spent OUTs:
    all OUTs yet unspent

JSON-RPC Example

Command:

curl -X POST http://rpc.cellframe.net/connect -d '{"method":"ledger", "params":["ledger;info;-hash;0x31BC6C8DB3B00A719824182743554865B9AB38C0D1CCD6A85AC8075ECD6075C5;-net;foobar"], "id":"1"}'

Response:

{
"type": 0,
"result": "same as cli response",
"errors": null,
"id": 1
}