Basic Ledger Operations
State Queries (L0)
Core ledger state queries available through Layer 0.
Get Address Balance
Retrieves the current balance for a specified address.
Endpoint
GET /dag/{address}/balance
Parameters
address
(path parameter): The blockchain address to query
Response
Success (200 OK)
{
"balance": <amount>,
"ordinal": <long>
}
balance
: Current balance of the addressordinal
: Transaction ordinal number representing the state version
Not Found (404)
- Returned when the address has no recorded balance
Transaction Submission (L1)
Core transaction operations available through Layer 1.
Submit Transaction
Submits a new transaction to the network.
Endpoint
POST /transactions
Request Body
A signed transaction object that must include:
- Transaction data
- Digital signature
- Other required transaction fields as defined in the Transaction schema
Response
Success (200 OK)
{
"hash": "<transaction_hash>"
}
hash
: The hash of the submitted transaction
Bad Request (400)
{
"errors": [
{
"cause": "<error_message>"
}
]
}
- Returned when:
- Request body cannot be parsed as a valid signed transaction
- Transaction validation fails
- Transaction format is invalid
Notes
- All transactions are logged for debugging purposes
- Transaction validation occurs before acceptance
- Invalid transactions will be rejected with specific error messages
- Successful submission does not guarantee inclusion in the chain (only validates and accepts the transaction)