Anchoring to XRPL...
Computing SHA-256 hash

SDK Playground

Explore the S4 Ledger Python SDK — hash, anchor, and verify defense records with live API calls

Connected to /api

Code Editor

Python
Calls live API at /api/*
Output
Click "Run" to execute the code above...

How It Works

SHA-256 computed via POST /api/hash
Anchor calls POST /api/anchor — records saved to API
Metrics live from GET /api/metrics
130+ real defense record types across all branches
Anchored records appear on Metrics & Transactions pages

Install the SDK

pip install s4-ledger-sdk

Requires Python 3.8+ and xrpl-py

SDK Quick Reference

MethodDescription
hash_record()SHA-256 hash of record content
anchor_record()Anchor hash to XRPL with $SLS fee
verify_record()Verify record against anchored hash
batch_anchor()Anchor multiple records in one call
get_transaction()Look up anchored transaction
list_records()List all anchored records

Live API Endpoints

EndpointMethod
/api/hashPOST — compute SHA-256
/api/anchorPOST — anchor record
/api/metricsGET — dashboard data
/api/transactionsGET — recent activity
/api/record-typesGET — 130+ types