Ledger

A ledger resource contains information about a given ledger.

To learn more about the concept of ledgers in the DigitalBits network, take a look at the DigitalBits ledger concept guide.

Attributes

Attribute Type
id string The id is a unique identifier for this ledger.
paging_token number A paging token suitable for use as a cursor parameter.
hash string A hex-encoded SHA-256 hash of the ledger’s XDR-encoded form.
prev_hash string The hash of the ledger that chronologically came before this one.
sequence number Sequence number of this ledger, suitable for use as the as the :id parameter for url templates that require a ledger number.
transaction_count number The number of transactions in this ledger.
operation_count number The number of operations in this ledger.
closed_at string An ISO 8601 formatted string of when this ledger was closed.
total_coins string The total number of lumens in circulation.
fee_pool string The sum of all transaction fees (in lumens) since the last inflation operation. They are redistributed during [inflation].
base_fee number The fee the network charges per operation in a transaction.
base_reserve string The reserve the network uses when calculating an account’s minimum balance.
max_tx_set_size number The maximum number of transactions validators have agreed to process in a given ledger.
protocol_version number The protocol version that the DigitalBits network was running when this ledger was committed.
header_xdr string A base64 encoded string of the raw LedgerHeader xdr struct for this ledger.
base_fee_in_stroops number The fee the network charges per operation in a transaction. Expressed in stroops.
base_reserve_in_stroops number The reserve the network uses when calculating an account’s minimum balance. Expressed in stroops.
Example Relation templated
self /ledgers/500
effects /ledgers/500/effects/{?cursor,limit,order} The effects in this transaction true
operations /ledgers/500/operations/{?cursor,limit,order} The operations in this ledger true
transactions /ledgers/500/transactions/{?cursor,limit,order} The transactions in this ledger true

Example

{
  "_links": {
    "effects": {
      "href": "/ledgers/500/effects/{?cursor,limit,order}",
      "templated": true
    },
    "operations": {
      "href": "/ledgers/500/operations/{?cursor,limit,order}",
      "templated": true
    },
    "self": {
      "href": "/ledgers/500"
    },
    "transactions": {
      "href": "/ledgers/500/transactions/{?cursor,limit,order}",
      "templated": true
    }
  },
  "id": "689f00d4824b8e69330bf4ad7eb10092ff2f8fdb76d4668a41eebb9469ef7f30",
  "paging_token": "2147483648000",
  "hash": "689f00d4824b8e69330bf4ad7eb10092ff2f8fdb76d4668a41eebb9469ef7f30",
  "prev_hash": "b608e110c7cc58200c912140f121af50dc5ef407aabd53b76e1741080aca1cf0",
  "sequence": 500,
  "transaction_count": 0,
  "operation_count": 0,
  "closed_at": "2015-07-09T21:39:28Z",
  "total_coins": "100000000000.0000000",
  "fee_pool": "0.0025600",
  "base_fee": 100,
  "base_reserve": "10.0000000",
  "max_tx_set_size": 50,
  "protocol_version": 8,
  "header_xdr": "...",
  "base_fee_in_stroops": 100,
  "base_reserve_in_stroops": 100000000,
}

Endpoints

Resource Type Resource URI Template
All ledgers Collection /ledgers
Single Ledger Single /ledgers/:id
Ledger Transactions Collection /ledgers/:ledger_id/transactions
Ledger Operations Collection /ledgers/:ledger_id/operations
Ledger Payments Collection /ledgers/:ledger_id/payments
Ledger Effects Collection /ledgers/:ledger_id/effects

Edit this doc in GitHub

THE FUTURE OF LOYALTY STARTS HERE

Stay up to date on the latest happenings at DigitalBits. Get the latest news.