MCPcopy Index your code
hub / github.com/astraly-labs/pragma-miden

github.com/astraly-labs/pragma-miden @py-v0.1.8

Chat with this repo
repository ↗ · DeepWiki ↗ · release py-v0.1.8 ↗ · + Follow
232 symbols 526 edges 60 files 46 documented · 20%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Pragma Miden

A decentralized oracle for Miden — prices published directly on-chain, aggregated via Foreign Procedure Invocation.

Documentation · Publish Prices · Consume Data

🟢 Live oracle: miden.pragma.build — real-time BTC / ETH / WBTC / USDT / DAI medians, published every Starknet tick by the pragma-sdk price-pusher.


Deployments

Testnet (Miden 0.15)

Role Account ID Explorer
Oracle 0x7ad4aa02b1816c117e32853e210c28 view
Publisher 0x6d37b2d4aedd697140338bb31c67e3 view

Addresses change between testnet iterations. This table is the source of truth.


Quick start

Consume prices (Rust):

git clone https://github.com/astraly-labs/pragma-miden
cd pragma-miden
cargo run --release -p consume-price
# BTC/USD: $68199.00

Publish prices (Python SDK):

from pragma_sdk.miden.client import PragmaMidenClient, MidenEntry

client = PragmaMidenClient(network="testnet")
await client.publish_entries([
    MidenEntry(pair="1:0", price=68199_000000, decimals=6),
])

→ Full integration guides at docs.pragma.build/pragma/miden.


License

MIT — see LICENSE.

Extension points exported contracts — how you extend this code

TryIntoDecimalFelts (Interface)
A trait for converting a Pair into a fixed-size array of Felts [1 implementers]
crates/types/src/pair.rs
Binance24hTicker (Interface)
* Binance API helper to fetch 24h ticker statistics * Used for metadata (change24h, high24h, low24h) in the Oracle Expl
oracle-explorer/lib/binance-api.ts
Asset (Interface)
(no doc)
oracle-explorer/types/asset.ts
ChartModalProps (Interface)
(no doc)
oracle-explorer/components/ChartModal.tsx
MedianResult (Interface)
(no doc)
oracle-explorer/app/api/prices/route.ts
CacheEntry (Interface)
(no doc)
oracle-explorer/lib/cache.ts
PriceDataPoint (Interface)
(no doc)
oracle-explorer/components/ChartModal.tsx
PragmaHistoryEntry (Interface)
(no doc)
oracle-explorer/app/api/history/seed/route.ts

Core symbols most depended-on inside this repo

build
called by 30
crates/accounts/src/oracle/mod.rs
get_oracle_component_library
called by 12
crates/accounts/src/oracle/mod.rs
get_oracle_component
called by 8
crates/accounts/src/oracle/mod.rs
rt
called by 7
crates/cli/publisher/src/lib.rs
cached_client
called by 7
crates/cli/publisher/src/lib.rs
get_store_config
called by 7
crates/cli/publisher/src/lib.rs
encode
called by 6
crates/types/src/pair.rs
get_publisher_component_library
called by 6
crates/accounts/src/publisher/mod.rs

Shape

Function 133
Method 54
Class 24
Interface 17
Enum 4

Languages

Rust71%
TypeScript26%
Python3%

Modules by API surface

crates/types/src/pair.rs30 symbols
crates/accounts/tests/test_oracle.rs17 symbols
crates/accounts/src/oracle/mod.rs13 symbols
crates/cli/utils/src/network.rs12 symbols
crates/cli/publisher/src/lib.rs12 symbols
crates/accounts/src/publisher/mod.rs12 symbols
crates/cli/utils/src/storage.rs9 symbols
oracle-explorer/lib/db.ts8 symbols
crates/cli/utils/src/client.rs7 symbols
oracle-explorer/components/ChartModal.tsx6 symbols
oracle-explorer/app/page.tsx6 symbols
oracle-explorer/app/api/prices/route.ts5 symbols

For agents

$ claude mcp add pragma-miden \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page